/*
Theme Name: The Wayland Post
Description: Custom newspaper theme for The Wayland Post, Wayland MA
Version: 1.0
Author: Dave Watkins
Text Domain: wayland-post
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    color: #292929;
    background: #fff;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; transition: color 0.12s ease; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* Sans-serif utility */
.twp-sans {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ===== LAYOUT CONTAINER ===== */
.twp-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== UTILITY BAR ===== */
.twp-topbar {
    background: #1a1a1a;
    color: #ccc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
}

.twp-topbar .twp-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 6px;
    padding-bottom: 6px;
}

.twp-topbar a { color: #eee; }
.twp-topbar a:hover { color: #fff; }

.twp-topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.twp-topbar-right .twp-donate {
    background: #c0392b;
    color: #fff;
    padding: 3px 10px;
    font-weight: 700;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 2px;
}

.twp-topbar-right .twp-donate:hover { background: #a93226; }

.twp-social-icons { display: flex; gap: 10px; }
.twp-social-icons a { color: #999; font-size: 0.9rem; }
.twp-social-icons a:hover { color: #fff; }

/* ===== MASTHEAD ===== */
.twp-masthead {
    text-align: center;
    padding: 16px 0 14px;
    border-bottom: 1px solid #e0e0e0;
}

.twp-logo {
    max-width: 480px;
    width: 100%;
    height: auto;
    display: inline-block;
}

/* ===== PRIMARY NAV (horizontal sub-bar, no dropdowns) ===== */
.twp-nav {
    border-bottom: 3px double #1a1a1a;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.twp-nav > .twp-container > ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.twp-nav > .twp-container > ul > li {
    border-right: 1px solid #e0e0e0;
    position: relative;
}

.twp-nav > .twp-container > ul > li:last-child { border-right: none; }

.twp-nav > .twp-container > ul > li > a {
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 10px 18px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #333;
}

.twp-nav > .twp-container > ul > li > a:hover { color: #c0392b; background: #faf9f5; }

/* Active section highlight */
.twp-nav > .twp-container > ul > li.twp-nav-active > a {
    color: #c0392b;
    border-bottom: 2px solid #c0392b;
}

/* Sub-nav bar — full-width horizontal strip below main nav */
.twp-subnav {
    display: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 100%;
    width: 100vw;
    max-width: 1140px;
    background: #faf9f5;
    border-bottom: 1px solid #e0e0e0;
    z-index: 99;
    padding: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.twp-nav > .twp-container > ul > li:hover > .twp-subnav,
.twp-nav > .twp-container > ul > li:focus-within > .twp-subnav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.twp-subnav a {
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 8px 16px;
    color: #555;
    white-space: nowrap;
    letter-spacing: 0.03em;
}

.twp-subnav a:hover {
    color: #c0392b;
    background: #f0efe8;
}

/* ===== SECTION TITLE ===== */
.twp-section-header {
    padding: 32px 0 0;
}

.twp-section-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #1a1a1a;
    padding-bottom: 8px;
    border-bottom: 2px solid #1a1a1a;
    margin-bottom: 16px;
}

/* ===== VIEW BADGE ===== */
.twp-views {
    display: inline-block;
    background: #1a1a1a;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 6px;
    letter-spacing: 0.02em;
}

/* ===== CATEGORY LABEL ===== */
.twp-cat {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #c0392b;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block;
    margin-top: 6px;
}

/* ===== META LINE ===== */
.twp-meta {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.7rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.twp-meta strong { color: #555; font-weight: 600; }

/* ===== READ MORE ===== */
.twp-more {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.7rem;
    color: #c0392b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: inline-block;
    margin-top: 6px;
}

.twp-more:hover { color: #922b21; }

/* ===== HERO ===== */
.twp-hero {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 0;
    padding: 24px 0;
    border-bottom: 1px solid #ddd;
}

.twp-hero-main {
    padding-right: 28px;
    border-right: 1px solid #e0e0e0;
}

.twp-hero h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1.06;
    margin: 8px 0 12px;
    letter-spacing: -0.025em;
}

.twp-hero h2 a:hover { color: #444; }

.twp-hero .twp-excerpt {
    font-size: 1rem;
    line-height: 1.65;
    color: #555;
}

.twp-hero-img {
    margin-top: 14px;
    overflow: hidden;
}

.twp-hero-img-placeholder {
    background: #f0efe8;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* Hero sidebar */
.twp-hero-side {
    padding-left: 24px;
}

.twp-trending {
    padding: 12px 0;
    border-bottom: 1px solid #e8e8e8;
}

.twp-trending:last-child { border-bottom: none; }

.twp-trending h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 5px 0 3px;
}

.twp-trending h3 a:hover { color: #555; }

/* ===== 3-COL GRID ===== */
.twp-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-top: 0;
}

.twp-grid-3 > .twp-story {
    padding: 16px 20px 16px 0;
    border-right: 1px solid #e0e0e0;
}

.twp-grid-3 > .twp-story:nth-child(2) { padding-left: 20px; }
.twp-grid-3 > .twp-story:nth-child(3) { padding-left: 20px; border-right: none; padding-right: 0; }

.twp-story h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.22;
    margin: 5px 0 6px;
}

.twp-story h3 a:hover { color: #555; }

.twp-story .twp-excerpt {
    font-size: 0.88rem;
    line-height: 1.6;
    color: #555;
}

/* ===== FLOATED THUMBNAILS ===== */
img.twp-thumb {
    width: 140px !important;
    max-width: 140px !important;
    height: 100px !important;
    object-fit: cover;
    margin-bottom: 6px;
    display: inline;
}

img.twp-thumb-left {
    float: left !important;
    margin-right: 14px;
    margin-left: 0;
}

img.twp-thumb-right {
    float: right !important;
    margin-left: 14px;
    margin-right: 0;
}

.twp-story::after,
.twp-list-story::after,
.twp-trending::after {
    content: '';
    display: table;
    clear: both;
}

/* ===== 2-COL WITH SIDEBAR ===== */
.twp-2col {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 0;
}

.twp-2col-main {
    padding-right: 28px;
    border-right: 1px solid #e0e0e0;
}

.twp-2col-side {
    padding-left: 24px;
}

/* ===== LIST STORIES ===== */
.twp-list-story {
    padding: 12px 0;
    border-bottom: 1px solid #e8e8e8;
}

.twp-list-story:first-child { padding-top: 0; }

.twp-list-story h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 4px 0 3px;
}

.twp-list-story h3 a:hover { color: #555; }

.twp-list-story .twp-excerpt {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.55;
}

/* ===== HEADLINE-ONLY LIST ===== */
.twp-headline {
    padding: 10px 0;
    border-bottom: 1px solid #e8e8e8;
}

.twp-headline:first-child { padding-top: 0; }

.twp-headline h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.28;
}

.twp-headline h3 a:hover { color: #555; }

/* ===== MOST READ ===== */
.twp-most-read {
    background: #f9f8f4;
    padding: 16px 18px;
    border: 1px solid #e8e5da;
}

.twp-most-read-header {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding-bottom: 8px;
    border-bottom: 2px solid #1a1a1a;
    margin-bottom: 10px;
}

.twp-mr-item {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #e8e5da;
    align-items: flex-start;
}

.twp-mr-item:last-child { border-bottom: none; }

.twp-mr-num {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 900;
    color: #d5d0c3;
    min-width: 18px;
    line-height: 1;
}

.twp-mr-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.28;
}

.twp-mr-title a:hover { color: #555; }

/* ===== AD ===== */
.twp-ad {
    border: 1px solid #e8e5da;
    padding: 45px 16px;
    text-align: center;
    color: #c8c4b8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fcfbf7;
}

.twp-ad + .twp-ad { margin-top: 16px; }

/* ===== SAFETY TABLE ===== */
.twp-safety-tbl { width: 100%; border-collapse: collapse; }
.twp-safety-tbl tr { border-bottom: 1px solid #e8e8e8; }

.twp-safety-tbl td {
    padding: 10px 14px 10px 0;
    vertical-align: top;
    font-size: 0.85rem;
    line-height: 1.55;
    color: #555;
}

.twp-safety-tbl .twp-sdate {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    white-space: nowrap;
    color: #999;
    font-size: 0.72rem;
    min-width: 70px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* ===== SIDEBAR LINK ===== */
.twp-slink {
    padding: 10px 0;
    border-bottom: 1px solid #e8e8e8;
}

.twp-slink:first-child { padding-top: 0; }

.twp-slink h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 0.88rem;
    line-height: 1.28;
}

.twp-slink h4 a:hover { color: #555; }

.twp-slink-views {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.65rem;
    color: #aaa;
}

/* ===== OBITS ===== */
.twp-obit h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.98rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.twp-obit h3 a:hover { color: #555; }

.twp-obit-detail {
    font-size: 0.82rem;
    color: #777;
    line-height: 1.5;
}

/* ===== SECTION BORDER ===== */
.twp-section-border {
    border-bottom: 1px solid #ddd;
    padding-bottom: 32px;
}

/* ===== FOOTER ===== */
.twp-footer {
    background: #1a1a1a;
    color: #999;
    padding: 36px 0 28px;
    margin-top: 0;
}

.twp-footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.twp-footer h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.twp-footer p {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.8rem;
    line-height: 1.5;
    margin: 2px 0;
}

.twp-footer h4 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #777;
    margin-bottom: 10px;
}

.twp-footer li {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.8rem;
    line-height: 1.9;
}

.twp-footer a { color: #aaa; }
.twp-footer a:hover { color: #fff; }

.twp-footer-social { display: flex; gap: 12px; margin-top: 10px; }
.twp-footer-social a { color: #666; font-size: 1rem; }
.twp-footer-social a:hover { color: #fff; }

.twp-footer-bottom {
    border-top: 1px solid #333;
    margin-top: 24px;
    padding-top: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.72rem;
    color: #666;
    text-align: center;
}

/* ===== SINGLE POST — GLOBE STYLE ===== */

/* Article + sidebar layout */
.twp-article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 0;
    padding-top: 28px;
}

.twp-article-col {
    padding-right: 32px;
    border-right: 1px solid #e0e0e0;
}

.twp-article-sidebar {
    padding-left: 28px;
    position: sticky;
    top: 60px;
    align-self: start;
}

/* Category label link */
.twp-article-header .twp-cat {
    margin-bottom: 6px;
    font-size: 0.7rem;
}

/* Headline */
.twp-article-header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.6rem;
    font-weight: 900;
    line-height: 1.06;
    letter-spacing: -0.025em;
    margin: 6px 0 14px;
}

/* Deck / subtitle */
.twp-article-header .twp-subtitle {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1.2rem;
    color: #555;
    line-height: 1.55;
    margin-bottom: 16px;
}

/* Byline bar */
.twp-byline-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    padding: 10px 0;
    margin-bottom: 20px;
}

.twp-byline {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.78rem;
    color: #888;
}

.twp-byline strong {
    color: #292929;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
}

.twp-byline-date {
    display: block;
    margin-top: 2px;
    font-size: 0.72rem;
    color: #aaa;
}

/* Share icons */
.twp-share {
    display: flex;
    gap: 6px;
}

.twp-share a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 50%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    color: #888;
    transition: all 0.15s;
}

.twp-share a:hover {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

/* Featured image — full width */
.twp-article-featured {
    margin: 0 0 24px;
}

.twp-article-featured img { width: 100%; }

.twp-article-featured figcaption {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.72rem;
    color: #999;
    padding-top: 6px;
    border-bottom: 1px solid #e8e8e8;
    padding-bottom: 8px;
}

.twp-photo-credit {
    font-style: italic;
    color: #bbb;
}

/* Drop cap */
.twp-article-body > p:first-of-type::first-letter {
    float: left;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 4.2rem;
    font-weight: 900;
    line-height: 0.8;
    padding-right: 8px;
    padding-top: 6px;
    color: #1a1a1a;
}

/* Article body */
.twp-article-body {
    padding-bottom: 32px;
}

.twp-article-body p {
    margin-bottom: 1.25em;
    font-size: 1.08rem;
    line-height: 1.78;
}

.twp-article-body h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 1.8em 0 0.6em;
}

.twp-article-body h3 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 1.5em 0 0.5em;
}

.twp-article-body blockquote {
    border-left: 3px solid #c0392b;
    padding: 4px 0 4px 20px;
    margin: 1.5em 0;
    font-style: italic;
    color: #555;
}

.twp-article-body ul, .twp-article-body ol {
    padding-left: 1.5em;
    margin-bottom: 1.2em;
}

.twp-article-body li {
    list-style: disc;
    margin-bottom: 0.4em;
    font-size: 1.08rem;
    line-height: 1.78;
}

.twp-article-body ol li { list-style: decimal; }

.twp-article-body figure { margin: 1.5em 0; }
.twp-article-body figure img { width: 100%; }
.twp-article-body figcaption {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.72rem;
    color: #999;
    padding-top: 6px;
}

/* Newsletter CTA */
.twp-newsletter-cta {
    background: #f9f8f4;
    border: 1px solid #e8e5da;
    padding: 24px 28px;
    margin: 32px 0;
    text-align: center;
}

.twp-newsletter-cta h3 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 6px;
}

.twp-newsletter-cta p {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 12px !important;
    line-height: 1.5 !important;
}

.twp-newsletter-cta .twp-cta-btn {
    display: inline-block;
    background: #c0392b;
    color: #fff;
    padding: 10px 28px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: none;
    cursor: pointer;
}

.twp-newsletter-cta .twp-cta-btn:hover { background: #a93226; }

/* Tags */
.twp-article-tags {
    border-top: 1px solid #e0e0e0;
    padding-top: 14px;
    margin-bottom: 32px;
}

.twp-article-tags span {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #888;
    margin-right: 6px;
}

.twp-article-tags a {
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.72rem;
    color: #555;
    border: 1px solid #ddd;
    padding: 3px 10px;
    margin: 3px 4px 3px 0;
}

.twp-article-tags a:hover { background: #f5f5f0; border-color: #bbb; }

/* Related stories */
.twp-related {
    border-top: 2px solid #1a1a1a;
    padding-top: 20px;
    margin-top: 8px;
}

.twp-related-header {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 14px;
}

.twp-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.twp-related-grid > div {
    padding-right: 16px;
    border-right: 1px solid #e0e0e0;
}

.twp-related-grid > div:nth-child(2) { padding-left: 16px; }
.twp-related-grid > div:last-child { padding-left: 16px; border-right: none; padding-right: 0; }

.twp-related-grid .twp-rel-img {
    margin-bottom: 8px;
    overflow: hidden;
}

.twp-related-grid .twp-rel-img img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.twp-related-grid h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 4px;
}

.twp-related-grid h4 a:hover { color: #555; }

/* Sidebar subscribe CTA */
.twp-sidebar-cta {
    margin-top: 28px;
    padding: 20px 18px;
    background: #f9f8f4;
    border: 1px solid #e8e5da;
    text-align: center;
}

.twp-sidebar-cta h4 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.twp-sidebar-cta p {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.8rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 12px;
}

.twp-sidebar-cta .twp-cta-btn {
    display: inline-block;
    background: #c0392b;
    color: #fff;
    padding: 8px 22px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.twp-sidebar-cta .twp-cta-btn:hover { background: #a93226; }

/* ===== ARCHIVE / CATEGORY ===== */
.twp-archive-header {
    padding: 28px 0 0;
    border-bottom: 2px solid #1a1a1a;
    margin-bottom: 20px;
}

.twp-archive-header h1 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding-bottom: 8px;
}

.twp-archive-list {
    max-width: 720px;
}

.twp-archive-story {
    padding: 20px 0;
    border-bottom: 1px solid #e8e8e8;
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 20px;
    align-items: start;
}

.twp-archive-story h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 4px 0 6px;
}

.twp-archive-story h2 a:hover { color: #555; }

.twp-archive-story .twp-excerpt {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.55;
}

.twp-archive-img { overflow: hidden; }

.twp-archive-img img {
    width: 100%;
    height: 130px;
    object-fit: cover;
}

/* ===== SEARCH ===== */
.twp-search-form {
    display: flex;
    gap: 8px;
    margin: 20px 0;
}

.twp-search-form input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.9rem;
}

.twp-search-form button {
    padding: 10px 20px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
}

.twp-search-form button:hover { background: #333; }

/* ===== 404 ===== */
.twp-404 {
    text-align: center;
    padding: 80px 20px;
}

.twp-404 h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 12px;
}

.twp-404 p { font-size: 1.1rem; color: #666; }

/* ===== PAGINATION ===== */
.twp-pagination {
    padding: 24px 0;
    display: flex;
    gap: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.82rem;
}

.twp-pagination a, .twp-pagination span {
    padding: 6px 12px;
    border: 1px solid #ddd;
}

.twp-pagination .current {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.twp-pagination a:hover { background: #f5f5f0; }

/* ===== PAGE TEMPLATE ===== */
.twp-page-body {
    max-width: 720px;
    margin: 0 auto;
    padding: 28px 0 40px;
}

.twp-page-body h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 20px;
}

.twp-page-body p { margin-bottom: 1.2em; font-size: 1.05rem; line-height: 1.75; }
.twp-page-body h2 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.4rem; margin: 1.5em 0 0.5em; }
.twp-page-body ul, .twp-page-body ol { padding-left: 1.5em; margin-bottom: 1.2em; }
.twp-page-body li { list-style: disc; margin-bottom: 0.4em; font-size: 1.05rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
    .twp-hero { grid-template-columns: 1fr; }
    .twp-hero-main { padding-right: 0; border-right: none; padding-bottom: 20px; border-bottom: 1px solid #e0e0e0; }
    .twp-hero-side { padding-left: 0; padding-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
    .twp-2col { grid-template-columns: 1fr; }
    .twp-2col-main { padding-right: 0; border-right: none; padding-bottom: 20px; }
    .twp-2col-side { padding-left: 0; padding-top: 16px; }
    .twp-article-layout { grid-template-columns: 1fr; }
    .twp-article-col { padding-right: 0; border-right: none; }
    .twp-article-sidebar {
        position: static;
        padding-left: 0;
        padding-top: 24px;
        border-top: 1px solid #e0e0e0;
        margin-top: 24px;
    }
    .twp-archive-story { grid-template-columns: 1fr 160px; }
    .twp-subnav { max-width: 100vw; }
}

@media (max-width: 720px) {
    .twp-grid-3, .twp-related-grid { grid-template-columns: 1fr; }
    .twp-grid-3 > .twp-story,
    .twp-related-grid > div {
        padding: 14px 0;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    .twp-grid-3 > .twp-story:nth-child(2),
    .twp-grid-3 > .twp-story:nth-child(3),
    .twp-related-grid > div:nth-child(2),
    .twp-related-grid > div:last-child { padding-left: 0; }
    .twp-hero h2 { font-size: 1.8rem; }
    .twp-article-header h1 { font-size: 1.8rem; }
    .twp-logo { max-width: 300px; }
    .twp-hero-side { grid-template-columns: 1fr; }
    .twp-footer-grid { grid-template-columns: 1fr; }
    .twp-archive-story { grid-template-columns: 1fr; }
    .twp-archive-img { display: none; }
    .twp-byline-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
    .twp-article-body > p:first-of-type::first-letter { font-size: 3.2rem; }
}

@media (max-width: 520px) {
    .twp-nav > .twp-container > ul > li > a { font-size: 0.68rem; padding: 8px 10px; }
    .twp-topbar .twp-container { flex-direction: column; gap: 3px; text-align: center; }
    .twp-subnav a { font-size: 0.66rem; padding: 6px 10px; }
}
