:root {
    --accent: #c1121f;
    --accent-dark: #9b0e18;
    --accent-soft: #fde8ea;
    --ink: #0c1222;
    --ink-muted: #3d4659;
    --text: #141824;
    --text-muted: #5c6478;
    --border: #dde1ea;
    --bg: #ffffff;
    --bg-soft: #f3f5f9;
    --serif: "Fraunces", Georgia, serif;
    --sans: "IBM Plex Sans", system-ui, sans-serif;
    --container: min(1440px, 96vw);
    --radius: 4px;
    --shadow-card: 0 8px 28px rgba(12, 18, 34, 0.06);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg-soft);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--accent);
}

.container {
    width: var(--container);
    margin-inline: auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 24px rgba(12, 18, 34, 0.12);
}

.masthead {
    background: linear-gradient(135deg, var(--ink) 0%, #1a2338 100%);
    color: #f4f6fb;
    padding: 1rem 0 0.65rem;
}

.masthead-block {
    padding-bottom: 0.85rem;
}

.masthead-inner {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.masthead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
}

.masthead-tagline {
    margin: 0;
    max-width: 36rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: rgba(244, 246, 251, 0.78);
}

.masthead-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 120;
    flex-shrink: 0;
}

.meta-pill {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(244, 246, 251, 0.9);
    white-space: nowrap;
}

.search-toggle,
.menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: transparent;
    color: #f4f6fb;
    border-radius: var(--radius);
    cursor: pointer;
}

.search-toggle:hover,
.menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.logo--wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: #fff;
    min-width: 0;
    flex-shrink: 1;
}

.logo-word {
    font-family: var(--sans);
    font-size: clamp(1.25rem, 2.5vw, 1.55rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
}

.logo-tld {
    color: rgba(244, 246, 251, 0.65);
    font-weight: 500;
}

.logo-footer .logo-word {
    color: #fff;
}

.main-nav {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.nav-scroll-wrap {
    display: flex;
    align-items: stretch;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
}

.nav-list::-webkit-scrollbar {
    display: none;
}

.nav-list a {
    display: block;
    white-space: nowrap;
    padding: 0.85rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-muted);
    border-bottom: 3px solid transparent;
}

.nav-list a.is-active {
    color: var(--ink);
    border-bottom-color: var(--accent);
}

.nav-list a:hover {
    color: var(--accent);
}

body.nav-open {
    overflow: hidden;
}

.nav-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(12, 18, 34, 0.55);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
    z-index: 200;
}

.nav-drawer-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 88vw);
    height: 100vh;
    height: 100dvh;
    background: var(--ink);
    color: #f4f6fb;
    z-index: 210;
    transform: translateX(100%);
    pointer-events: none;
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.nav-drawer.is-open {
    transform: translateX(0);
    pointer-events: auto;
}

.nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-drawer-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav-drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: transparent;
    color: #f4f6fb;
    border-radius: var(--radius);
    cursor: pointer;
}

.nav-drawer-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-drawer-body {
    overflow-y: auto;
    padding: 0.5rem 0 1.5rem;
}

.nav-drawer-body ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-drawer-body a {
    display: block;
    padding: 0.85rem 1.15rem;
    font-weight: 500;
    font-size: 0.95rem;
    color: #f4f6fb;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-drawer-body a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

/* Layout */
.site-main {
    min-height: 60vh;
    background: var(--bg-soft);
    padding-bottom: 2rem;
}

.layout-home,
.layout-article {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 280px;
    gap: 2.25rem;
    align-items: start;
    background: var(--bg);
    margin-top: 1.25rem;
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 2px);
    box-shadow: var(--shadow-card);
    max-width: 100%;
    overflow-x: clip;
}

.home-center,
.article-main,
.sidebar-left,
.sidebar-right {
    min-width: 0;
    max-width: 100%;
}

.article-main {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Story cards */
.story-card {
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--border);
}

.story-card--featured {
    padding: 1.25rem;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    background: var(--bg);
    box-shadow: var(--shadow-card);
}

.story-card:last-child {
    border-bottom: none;
}

.story-media {
    display: block;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.story-media img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.story-media:hover img {
    transform: scale(1.02);
}

.story-meta-top {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.story-kicker,
.article-kicker {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-soft);
    padding: 0.25rem 0.5rem;
    border-radius: 2px;
    margin: 0 0 0.5rem;
}

.story-title {
    font-family: var(--serif);
    font-size: 1.05rem;
    line-height: 1.35;
    margin: 0 0 0.5rem;
    font-weight: 700;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.story-card--featured .story-title {
    font-size: clamp(1.25rem, 2.5vw, 1.65rem);
}

.story-title a:hover {
    color: var(--accent-dark);
}

.story-excerpt {
    color: var(--text-muted);
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
}

.story-meta-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.story-meta-bottom.compact {
    margin-top: 0.5rem;
}

.story-author {
    font-weight: 600;
    color: var(--text);
}

.story-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.story-cats {
    font-weight: 600;
    text-transform: capitalize;
}

/* Sidebar widgets */
.widget {
    margin-bottom: 2rem;
}

.widget-title {
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink);
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--ink);
}

.most-read-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.most-read-list li {
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
    align-items: start;
}

.most-read-num {
    font-family: var(--sans);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}

.most-read-list a {
    font-size: 0.9rem;
    line-height: 1.35;
}

.widget-tip {
    background: var(--ink);
    color: #f4f6fb;
    padding: 1.25rem;
    border-radius: var(--radius);
}

.widget-tip .widget-title {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.25);
}

.widget-tip p {
    color: rgba(244, 246, 251, 0.78);
}

.widget-tip p {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.tip-link {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Latest grid */
.latest-grid-section {
    margin-top: 1.25rem;
    padding: 2rem 0 3rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 2px);
    box-shadow: var(--shadow-card);
}

.latest-grid-section .container {
    padding-inline: 2rem;
}

.section-heading {
    font-family: var(--serif);
    font-size: 1.65rem;
    margin: 0 0 1.5rem;
    color: var(--ink);
}

.grid-item {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-soft);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.grid-item:hover {
    border-color: #c5cad6;
    box-shadow: var(--shadow-card);
}

.latest-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem 1.25rem;
}

.grid-item h3 {
    font-family: var(--serif);
    font-size: 1rem;
    line-height: 1.35;
    margin: 0.35rem 0 0;
    font-weight: 700;
}

.grid-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Article page */
.article-title {
    font-family: var(--serif);
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    line-height: 1.25;
    margin: 0 0 0.75rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.article-subtitle {
    font-family: var(--serif);
    font-size: 1.15rem;
    color: var(--text-muted);
    margin: 0 0 1rem;
    line-height: 1.4;
}

.article-byline {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.byline-name {
    display: block;
    font-weight: 700;
}

.byline-role {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.article-cats {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.article-hero {
    margin: 0 0 1.75rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.article-hero img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.article-hero--portrait img {
    aspect-ratio: auto;
    max-height: min(85vh, 820px);
    object-fit: cover;
    object-position: center top;
}

.prose .article-photo {
    margin: 1.75rem 0;
    border-radius: var(--radius);
    overflow: hidden;
}

.prose .article-photo img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}

.prose .article-photo figcaption {
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg-soft);
    border-top: 1px solid var(--border);
    line-height: 1.45;
}

.prose {
    font-size: 1.05rem;
    line-height: 1.75;
    max-width: 68ch;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.article-main .prose {
    max-width: 100%;
}

.prose p {
    margin: 0 0 1.15rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.prose h2 {
    font-family: var(--serif);
    font-size: 1.35rem;
    margin: 2.25rem 0 1rem;
    line-height: 1.3;
}

.prose h3 {
    font-family: var(--serif);
    font-size: 1.1rem;
    margin: 1.5rem 0 0.75rem;
}

.prose ul {
    margin: 0 0 1.15rem;
    padding-left: 1.25rem;
}

.prose li {
    margin-bottom: 0.35rem;
}

.pull-quote {
    font-family: var(--serif);
    font-size: 1.2rem;
    line-height: 1.5;
    border-left: 4px solid var(--accent);
    padding: 0.5rem 0 0.5rem 1.25rem;
    margin: 1.5rem 0;
    color: var(--text);
}

.article-lead {
    font-size: 1.12rem;
    line-height: 1.65;
}

.article-footer {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-style: italic;
}

.source-attribution {
    margin-top: 2rem;
    padding: 1.25rem 1.35rem;
    background: var(--bg-soft);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    font-size: 0.95rem;
}

.source-attribution p {
    margin: 0 0 0.65rem;
}

.source-attribution p:last-child {
    margin-bottom: 0;
    color: var(--text-muted);
}

.source-attribution a {
    color: var(--accent-dark);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.wire-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.article-not-found {
    padding: 4rem 0;
}

.page-static {
    max-width: 720px;
    margin-top: 1.25rem;
    padding: 2.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 2px);
    box-shadow: var(--shadow-card);
}

.page-static .lead {
    font-size: 1.15rem;
    color: var(--text-muted);
}

.page-static section {
    margin-top: 2rem;
}

.page-static h2 {
    font-family: var(--serif);
    font-size: 1.25rem;
}

/* Footer */
.site-footer {
    background: var(--ink);
    color: #f4f6fb;
    padding: 2.5rem 0 0;
    margin-top: 2rem;
}

.site-footer .footer-col h3 {
    color: rgba(244, 246, 251, 0.92);
}

.site-footer .footer-col a {
    color: rgba(244, 246, 251, 0.72);
}

.site-footer .footer-col a:hover {
    color: #fff;
}

.site-footer .footer-tagline {
    color: rgba(244, 246, 251, 0.65);
}

.site-footer .newsletter-form input {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.site-footer .footer-bottom {
    border-top-color: rgba(255, 255, 255, 0.12);
    color: rgba(244, 246, 251, 0.55);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 2rem;
    padding-bottom: 2rem;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 28ch;
}

.logo-footer {
    align-items: flex-start;
    text-align: left;
    margin-bottom: 0.75rem;
}

.footer-col h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 1rem;
}

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-col li {
    margin-bottom: 0.45rem;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-col a:hover {
    color: var(--accent);
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.newsletter-form input {
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
}

.newsletter-form button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.55rem 1rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
}

.newsletter-form button:hover {
    background: var(--accent-dark);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 1rem 0 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
    .layout-home,
    .layout-article {
        grid-template-columns: minmax(0, 1fr) 280px;
    }

    .sidebar-left {
        display: none;
    }

    .latest-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .masthead-tagline {
        font-size: 0.78rem;
        line-height: 1.4;
    }

    .masthead-row {
        gap: 0.5rem;
    }

    .logo-word {
        font-size: 1.15rem;
    }

    .meta-pill--date {
        display: none;
    }

    .meta-pill--weather {
        font-size: 0.68rem;
        padding: 0.3rem 0.5rem;
    }

    .search-toggle,
    .menu-btn {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }

    .masthead-meta {
        gap: 0.35rem;
    }

    .layout-home,
    .layout-article {
        grid-template-columns: 1fr;
        padding: 1.25rem;
        margin-top: 0.75rem;
    }

    .latest-grid-section .container {
        padding-inline: 1rem;
    }

    .sidebar-right {
        order: 3;
    }

    .latest-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .nav-arrow {
        display: none;
    }
}
