:root {
    --ink: #18242a;
    --muted: #6c7478;
    --accent: #244a73; /* Previous red accent: #b44332 */
    --line: #dadbd6;
    --paper: #f6f5f0;
    --card: #fffefa;
    --tag: #edf0ee;
    --header-height: 69px;
    --footer-height: 45px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'DM Sans', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}

.header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.header-build-date {
    color: #9aadaa;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 1px;
}


/* PAGE LAYOUT */

.page-shell {
    flex: 1;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 18px calc(var(--footer-height) + 8px);
}

.edition-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 3px 11px;
    border-bottom: 1px solid var(--line);
}

.edition-metrics {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 28px;
}

.edition-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.edition-label {
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
}

.edition-latest .edition-label {
    color: var(--accent);
}

.edition-value {
    color: var(--ink);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
}

.signal-dot {
    width: 6px;
    height: 6px;
    flex-shrink: 0;
    background: var(--accent);
    border-radius: 50%;
}

/* THREE-COLUMN NEWS GRID */

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 0;
}

.news-column {
    min-width: 0;
    padding: 16px 12px 0;
}

.news-column:first-child {
    padding-left: 0;
}

.news-column:last-child {
    padding-right: 0;
}

.news-column + .news-column {
    border-left: 1px solid var(--line);
}

/* STICKY SWIMLANE HEADINGS */

.section-heading {
    position: sticky;
    top: var(--header-height);
    z-index: 50;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    justify-content: center;

    column-gap: 10px;
    row-gap: 4px;
    padding: 12px 0 9px;
    border-bottom: 2px solid var(--ink);
    margin-top: -12px;
    margin-bottom: 9px;
    background: var(--paper);
}

.section-index {
    font-size: 9px;
    letter-spacing: 1.2px;
    font-weight: 700;
    color: var(--accent);
}

h2 {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 19px;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin: 0;
}

.section-caption {
    font-size: 10px;
    color: var(--muted);
}

/* EMPTY STATES */

.empty-state {
    font-size: 12px;
    color: var(--muted);
    padding: 13px;
    border: 1px dashed var(--line);
}

.feed-empty {
    margin: 16px 0 26px;
    padding: 28px 18px;
    border-top: 2px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-align: center;
}

.feed-empty h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 5px;
}

.feed-empty p {
    font-size: 13px;
    color: var(--muted);
    margin: 0;
}

/* FIXED FOOTER */

.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #17272b;
    color: #94a5a5;
}

.footer-inner {
    max-width: 1800px;
    min-height: var(--footer-height);
    padding: 12px 22px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 9px;
    letter-spacing: 1.2px;
}

/* TABLET */

@media (max-width: 950px) {
    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .slow-column {
        grid-column: 1 / -1;
        border-left: 0 !important;
        border-top: 1px solid var(--line);
        margin-top: 16px;
        padding-left: 0;
        padding-right: 0;
    }

    .featured-column {
        padding-right: 0;
    }

    .slow-column .card-stack {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

/* MOBILE */

@media (max-width: 620px) {
    :root {
        --header-height: 64px;
    }

    .page-shell {
        padding: 0 12px calc(var(--footer-height) + 8px);
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .featured-column {
        order: 1;
    }

    .fast-column {
        order: 2;
    }

    .slow-column {
        order: 3;
    }

    .news-column,
    .news-column:first-child,
    .news-column:last-child {
        grid-column: auto;
        border-left: 0;
        border-top: 1px solid var(--line);
        padding: 16px 0 0;
        margin-top: 12px;
    }

    .news-column:first-child {
        border-top: 1px solid var(--line);
        margin-top: 12px;
    }

    .featured-column {
        border-top: 0;
        margin-top: 0;
        padding-top: 0;
    }

    .slow-column .card-stack {
        display: flex;
    }

    .section-heading {
        top: var(--header-height);
    }

    .edition-strip > span:last-child {
        display: none;
    }

    .footer-inner {
        padding: 12px;
    }
}
