/* ══════════════════════════════════════════════════════════════════════
   Daily AI Brief — Public stylesheet
   Editorial technology publication: white ground, dark navy, serif headlines.
   ══════════════════════════════════════════════════════════════════════ */

/* ─── Design tokens ─────────────────────────────────────────────────── */
:root {
    /*
     * Brand — dark navy blue on white.
     *
     * #12336b sits at 218° 71% 25%. The previous #0f2947 was only 17%
     * lightness at lower saturation, which read as charcoal rather than
     * navy. This holds 12.3:1 against white (AAA) as body-weight text and
     * as white-on-navy in the button and footer.
     */
    --color-primary:        #12336b;
    --color-primary-dark:   #0c2450;
    --color-primary-mid:    #1b4489;
    --color-primary-light:  #2f62b5;
    --color-primary-wash:   #eef2fb;

    /* Surfaces — carrying a trace of the brand hue, not neutral grey */
    --color-background:     #ffffff;
    --color-surface:        #ffffff;
    --color-surface-muted:  #f4f7fc;
    --color-surface-sunken: #e9eef8;

    /* Text */
    --color-text:           #151e2c;
    --color-text-soft:      #3c4a5f;
    --color-text-muted:     #5b6b7f;
    --color-heading:        #12336b;
    --color-link:           #1b4489;

    /* Lines */
    --color-border:         #e1e7f1;
    --color-border-strong:  #c6d1e3;
    --color-rule:           #12336b;

    /* Status */
    --color-success:        #14663f;
    --color-success-bg:     #e8f5ee;
    --color-warning:        #8a5300;
    --color-warning-bg:     #fdf3e3;
    --color-danger:         #a4232b;
    --color-danger-bg:      #fdeced;
    --color-info:           #1b4489;
    --color-info-bg:        #eaf0fa;

    /* Type */
    --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-serif: 'Merriweather', Georgia, 'Times New Roman', serif;

    /* Spacing scale */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-5:  1.5rem;
    --space-6:  2rem;
    --space-7:  2.5rem;
    --space-8:  3rem;
    --space-9:  4rem;
    --space-10: 5rem;

    /* Layout */
    --container:      1240px;
    --container-pad:  1.5rem;
    --measure:        720px;   /* article reading width */

    /* Restrained rounding — not everything is a pill */
    --radius-sm: 4px;
    --radius:    6px;
    --radius-lg: 8px;

    /* Two soft shadows only */
    --shadow-sm: 0 1px 2px rgba(18, 51, 107, .06);
    --shadow:    0 2px 8px rgba(18, 51, 107, .08);

    --header-h:        76px;
    --header-h-stuck:  64px;
}

/* ─── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    /* Offset in-page anchors by the sticky header height. */
    scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
    margin: 0;
    background: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Guarantees no sideways scroll at any viewport. */
    overflow-x: hidden;
    /* Android/iOS paint a grey box over a tapped link; the :active and
       :focus-visible styles already give better feedback than that. */
    -webkit-tap-highlight-color: transparent;
}

/* Restore a deliberate pressed state now the default highlight is off. */
@media (pointer: coarse) {
    a:active, button:active, .btn:active, .chip:active, .topic:active {
        opacity: .75;
    }
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 700; color: var(--color-heading); line-height: 1.25; }
p  { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--color-link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--color-border); margin: var(--space-6) 0; }

/* Visible, consistent keyboard focus everywhere. */
:focus-visible {
    outline: 2px solid var(--color-primary-light);
    outline-offset: 2px;
    border-radius: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--color-primary);
    color: #fff;
    padding: .75rem 1.25rem;
    border-radius: 0 0 var(--radius) 0;
    font-weight: 600;
}
.skip-link:focus {
    left: 0;
    text-decoration: none;
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ─── Layout ────────────────────────────────────────────────────────── */
/*
 * Notched and rounded displays.
 *
 * In landscape on an iPhone the notch eats into the left or right edge, and
 * the home indicator sits over the bottom. Without these the header brand and
 * the footer's last row slide underneath. max() keeps the normal gutter on
 * every device that reports no inset.
 */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    /* max() keeps the normal gutter on every device that reports no inset,
       and widens it only where the hardware actually intrudes. */
    padding-inline:
        max(var(--container-pad), env(safe-area-inset-left))
        max(var(--container-pad), env(safe-area-inset-right));
}

.section { padding-block: var(--space-8); }
.section--tight { padding-block: var(--space-6); }
.section--muted { background: var(--color-surface-muted); }
.section + .section--muted,
.section--muted + .section { border-top: 1px solid var(--color-border); }

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--color-rule);
}

.section-title {
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--color-heading);
}

.section-link {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--color-text-muted);
    white-space: nowrap;
}
.section-link:hover { color: var(--color-primary); }

/* ─── Editorial primitives ──────────────────────────────────────────── */

/* Small-caps category label — the editorial convention, no emoji. */
.kicker {
    display: inline-block;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--color-primary-light);
}
/*
 * Small standalone links carry a padded hit area.
 *
 * WCAG 2.2 SC 2.5.8 asks for a 24x24px target. These sit at 18-21px tall
 * because they are set in small caps or a small weight, and they are not
 * inline in a sentence, so the inline exception does not cover them. Padding
 * plus an equal negative margin enlarges what the finger hits while taking
 * the space back from the layout — the rendered position does not move.
 */
a.kicker,
a.section-link,
.footer-bottom__links a,
.masthead__links a,
.info-row__value a {
    display: inline-block;
    padding-block: .25rem;
    margin-block: -.25rem;
}
.kicker--onDark { color: rgba(255, 255, 255, .82); }
a.kicker:hover { color: var(--color-primary); text-decoration: none; }

/* Byline / date / reading-time row. */
.meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    font-size: .8125rem;
    color: var(--color-text-muted);
}
.meta__sep { color: var(--color-border-strong); }
.meta--onDark { color: rgba(255, 255, 255, .72); }
.meta--onDark .meta__sep { color: rgba(255, 255, 255, .4); }

/* ─── Header ────────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    transition: box-shadow .2s ease;
}

/*
 * Three-column grid rather than a flex row.
 *
 * The centre track sizes to the navigation and the two 1fr side tracks
 * absorb the remaining width equally, so the nav is centred on the page
 * grid while the brand stays hard left and the actions hard right. The
 * previous flex row packed all three groups to the left — the auto margin
 * that was meant to push the actions across sat on the <ul> inside <nav>,
 * where it had no effect on the outer row, leaving ~440px of dead space.
 */
.header-inner {
    display: flex;
    align-items: center;
    height: var(--header-h);
    transition: height .2s ease;
}

/*
 * The navigation is anchored to the brand rather than mathematically centred.
 * Centring it in a 1240px bar leaves ~200px of air on both sides, which is
 * what made the row read as four disconnected pieces. Anchoring binds the
 * wordmark and the links into one masthead unit and lets the utility cluster
 * hold the right edge, which is the standard editorial masthead composition.
 */
.site-nav { margin-left: clamp(1.75rem, 3.4vw, 3.25rem); }

/* Auto margin here — not on the <ul> inside <nav>, where the previous rule
   sat and had no effect on this row, stranding ~440px at the right edge. */
.header-actions { margin-left: auto; }

/* Sticky: tighten the bar and lift it off the page, but only once scrolled. */
.site-header.is-stuck { box-shadow: 0 1px 3px rgba(18, 51, 107, .07); }
.site-header.is-stuck .header-inner { height: var(--header-h-stuck); }

/* ─── Brand ─────────────────────────────────────────────────────────── */
.brand {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
    min-width: 0;
    font-family: var(--font-serif);
    font-size: 1.3125rem;
    font-weight: 700;
    letter-spacing: -.015em;
    line-height: 1;
    color: var(--color-primary);
    white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--color-primary-dark); }

/* The logo image (icon + wordmark). Its width/height attributes reserve the
   box, so the header never shifts while it loads. */
.brand__logo { display: block; height: 32px; width: auto; max-width: 100%; }

/* ─── Primary navigation ────────────────────────────────────────────── */


.nav-list {
    display: flex;
    align-items: center;
    /* Scales the rhythm down on narrower desktops rather than letting the
       items crowd or wrap. */
    gap: clamp(1.125rem, 1.9vw, 1.875rem);
    list-style: none;
}

.nav-list a {
    position: relative;
    display: block;
    padding: .5rem 0;
    font-size: .9375rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--color-text-soft);
    white-space: nowrap;
    transition: color .18s ease;
}

/* Editorial rule that grows from the centre — no background pill. */
.nav-list a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--color-primary);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .18s ease;
}
.nav-list a:hover { color: var(--color-primary); text-decoration: none; }
.nav-list a:hover::after { transform: scaleX(1); }

.nav-list a.is-active { color: var(--color-primary); font-weight: 600; }
.nav-list a.is-active::after { transform: scaleX(1); }

/* ─── Header actions ────────────────────────────────────────────────── */
.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    flex-shrink: 0;
}


/* 40px square: same height as the newsletter button, so the two controls
   share one optical baseline. */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}
.icon-btn:hover {
    background: var(--color-surface-muted);
    border-color: var(--color-border);
    color: var(--color-primary);
}
.icon-btn svg { width: 19px; height: 19px; }

.btn--newsletter {
    height: 40px;
    padding-inline: 1.125rem;
    font-size: .875rem;
    font-weight: 600;
    border-radius: var(--radius);
    white-space: nowrap;
}

.nav-toggle { display: none; }

/* ─── Header search drawer ──────────────────────────────────────────── */
.header-search {
    border-top: 1px solid var(--color-border);
    background: var(--color-surface-muted);
    padding-block: var(--space-4);
}
.header-search[hidden] { display: none; }

/* ─── Mobile navigation ─────────────────────────────────────────────── */
.mobile-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(360px, 86vw);
    z-index: 120;
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    box-shadow: -8px 0 32px rgba(18, 51, 107, .10);
    transform: translateX(100%);
    transition: transform .26s cubic-bezier(.4, 0, .2, 1);
    visibility: hidden;
    overflow-y: auto;
    /* Stops a scroll gesture inside the panel from chaining to the page. */
    overscroll-behavior: contain;
}
.mobile-nav.is-open { transform: translateX(0); visibility: visible; }

/* Anchored to the right edge and full height, so it meets both the notch in
   landscape and the home indicator in portrait. */
.mobile-nav { padding-right: env(safe-area-inset-right); }
.mobile-nav__foot { padding-bottom: calc(var(--space-5) + env(safe-area-inset-bottom)); }

.mobile-nav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    height: var(--header-h);
    padding-inline: var(--space-5);
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.mobile-nav__links {
    flex: 1;
    padding: var(--space-3) var(--space-5);
}

.mobile-nav__links a {
    display: block;
    /* 52px tall: a comfortable touch target well above the 44px minimum. */
    padding: .95rem 0;
    font-size: 1.0625rem;
    font-weight: 500;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    transition: color .18s ease;
}
.mobile-nav__links a:last-child { border-bottom: 0; }
.mobile-nav__links a:hover,
.mobile-nav__links a.is-active { color: var(--color-primary); text-decoration: none; }
.mobile-nav__links a.is-active { font-weight: 600; }

.mobile-nav__foot {
    padding: var(--space-5);
    border-top: 1px solid var(--color-border);
    background: var(--color-surface-muted);
    flex-shrink: 0;
}
.mobile-nav__foot .btn { height: 46px; }

/*
 * Landscape phones leave roughly 375px of height. The drawer's header and
 * footer are fixed, so without this the link list loses its scroll room and
 * the subscribe button can end up unreachable.
 */
@media (max-height: 30em) and (pointer: coarse) {
    .mobile-nav__head { height: auto; padding-block: var(--space-3); }
    .mobile-nav__links a { padding-block: .6rem; font-size: 1rem; }
    .mobile-nav__foot { padding-block: var(--space-3); }
    .mobile-nav__note { display: none; }
}
.mobile-nav__note {
    margin-top: .625rem;
    font-size: .75rem;
    line-height: 1.5;
    color: var(--color-text-muted);
    text-align: center;
}

.nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 119;
    background: rgba(18, 51, 107, .38);
    opacity: 0;
    visibility: hidden;
    transition: opacity .26s ease, visibility .26s ease;
}
.nav-scrim.is-open { opacity: 1; visibility: visible; }

/* ─── Buttons ───────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .625rem 1.125rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; }

.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn--primary:active { background: #061523; }

.btn--outline {
    background: transparent;
    border-color: var(--color-border-strong);
    color: var(--color-primary);
}
.btn--outline:hover { border-color: var(--color-primary); background: var(--color-primary-wash); }

.btn--onDark { background: #fff; color: var(--color-primary); }
.btn--onDark:hover { background: rgba(255, 255, 255, .9); color: var(--color-primary-dark); }

.btn--sm { padding: .45rem .8rem; font-size: .8125rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ─── Forms ─────────────────────────────────────────────────────────── */
.field { margin-bottom: var(--space-4); }

.label {
    display: block;
    margin-bottom: .4rem;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--color-heading);
}
.label .req { color: var(--color-danger); }

.input,
.textarea,
.select {
    display: block;
    width: 100%;
    padding: .625rem .75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius);
    /*
     * 16px, not 15px, and this is not a style choice.
     *
     * Safari on iOS zooms the entire page in when a focused control is set
     * below 16px — and does not zoom back out afterwards. At 15px every
     * search, contact and newsletter field jerked the layout on tap and left
     * the reader pinching to recover. 1rem is the smallest size that does not
     * trigger it. Coarse-pointer devices also get a taller control below.
     */
    font-size: 1rem;
    color: var(--color-text);
    transition: border-color .15s ease, box-shadow .15s ease;
}

/*
 * Touch devices get larger controls and targets. `pointer: coarse` asks about
 * the input device rather than the screen size, so this reaches a touchscreen
 * laptop and skips a narrow desktop window.
 */
@media (pointer: coarse) {
    .input,
    .textarea,
    .select {
        padding: .75rem .875rem;
        min-height: 48px;
    }
    .btn { min-height: 48px; }
    .icon-btn { width: 44px; height: 44px; }
}
.input:focus,
.textarea:focus,
.select:focus {
    outline: none;
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(44, 90, 140, .14);
}
.input::placeholder, .textarea::placeholder { color: #94a3b8; }
.textarea { resize: vertical; min-height: 8rem; }

.field-hint { margin-top: .35rem; font-size: .75rem; color: var(--color-text-muted); }

.search-form { display: flex; gap: .5rem; }
.search-form--hero { max-width: 520px; margin-top: 1.25rem; }
.search-form .input { flex: 1; min-width: 0; }

/* ─── Notices ───────────────────────────────────────────────────────── */
.alert__list { margin: .5rem 0 0 1.1rem; padding-left: 0; }
.notice {
    padding: .875rem 1rem;
    border: 1px solid;
    border-left-width: 3px;
    border-radius: var(--radius);
    font-size: .875rem;
    margin-bottom: var(--space-4);
}
.notice--success { background: var(--color-success-bg); border-color: var(--color-success); color: var(--color-success); }
.notice--error   { background: var(--color-danger-bg);  border-color: var(--color-danger);  color: var(--color-danger); }
.notice--warning { background: var(--color-warning-bg); border-color: var(--color-warning); color: var(--color-warning); }
.notice--info    { background: var(--color-info-bg);    border-color: var(--color-info);    color: var(--color-info); }

/* ─── Masthead ──────────────────────────────────────────────────────── */
/* One quiet line under the header saying what the publication is. Sized and
   ruled like a print masthead so it reads as part of the furniture rather
   than as a marketing banner competing with the lead headline. */
.masthead {
    padding-block: var(--space-5) var(--space-4);
    border-bottom: 1px solid var(--color-border);
    text-align: center;
}
.masthead__name {
    font-family: var(--font-serif);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--color-heading);
    line-height: 1.3;
}
.masthead__tagline {
    margin-top: .4rem;
    margin-inline: auto;
    max-width: 68ch;
    font-size: .9375rem;
    line-height: 1.55;
    color: var(--color-text-soft);
}
.masthead__links {
    margin-top: .6rem;
    font-size: .8125rem;
    color: var(--color-text-muted);
}
.masthead__links a { color: var(--color-text-muted); }
.masthead__links a:hover { color: var(--color-primary); }
.masthead__dot { margin-inline: .5rem; color: var(--color-border-strong); }

/* ─── Lead story ────────────────────────────────────────────────────── */
.lead {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: var(--space-7);
    /*
     * Asymmetric on purpose: a tighter lead-in from the masthead so the top
     * story starts promptly, then a generous rule-off before the next
     * section. --space-6 is the same opening gutter the article page uses,
     * so both templates share one rhythm below the header.
     */
    padding-block: var(--space-6) var(--space-8);
    align-items: start;
}
/*
 * Solo lead — no briefs beside it, which is what a young archive looks like.
 *
 * Stacking the image above the headline and capping the block at 900px left a
 * third of the row empty and read as a layout that had lost its second
 * column. Setting the story itself side by side fills the width deliberately
 * and keeps the headline on a sane measure, which a full-width stack would
 * not. It collapses back to the stacked form on tablets and phones, where
 * side-by-side would squeeze both halves.
 */
.lead--solo { grid-template-columns: 1fr; }

@media (min-width: 64.0625em) {
    /*
     * The card's children are flat siblings (figure, kicker, headline,
     * standfirst, meta), so the figure is pinned to column one across every
     * row and the rest flow down column two.
     *
     * row-gap is explicitly 0: a single `gap` would space the kicker, the
     * headline and the standfirst apart by the column gutter and leave the
     * text drifting down the column instead of reading as one block. The
     * elements carry their own vertical rhythm already.
     */
    .lead--solo .lead-story {
        display: grid;
        grid-template-columns: 1.15fr 1fr;
        column-gap: var(--space-7);
        row-gap: 0;
        align-items: start;
    }
    .lead--solo .lead-story__figure {
        grid-column: 1;
        grid-row: 1 / span 20;
        margin-bottom: 0;
        align-self: stretch;
    }
    .lead--solo .lead-story > :not(.lead-story__figure) { grid-column: 2; }
    /*
     * Height follows the text rather than a fixed ratio, so the two halves
     * always finish level whatever the headline length — a fixed ratio left
     * the image hanging well below the byline. min-height keeps a short
     * headline from squashing it to a strip.
     */
    .lead--solo .lead-story__img {
        aspect-ratio: auto;
        height: 100%;
        min-height: 21rem;
        object-fit: cover;
    }
    .lead--solo .lead-story__excerpt { max-width: none; }
    /* Push the text block off the very top edge so it optically aligns with
       the image rather than sitting a hair above it. */
    .lead--solo .kicker { margin-top: .25rem; }
}

.lead-story__figure {
    display: block;
    margin-bottom: var(--space-4);
    background: var(--color-surface-sunken);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.lead-story__img { transition: transform .4s ease; }
.lead-story__figure:hover .lead-story__img { transform: scale(1.015); }
.lead-story__img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.lead-story__title {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 3.4vw, 2.5rem);
    line-height: 1.18;
    letter-spacing: -.015em;
    margin-block: .5rem .625rem;
}
.lead-story__title a { color: inherit; transition: color .18s ease; }
.lead-story__title a:hover { color: var(--color-primary-light); text-decoration: none; }
.lead-story__excerpt {
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--color-text-soft);
    margin-bottom: .875rem;
    max-width: 60ch;
}

/* Secondary stories beside the lead */
/*
 * The 2px rule sits on the same baseline as the top of the lead image, so
 * the two columns start on one line rather than drifting apart.
 */
.lead-aside {
    display: flex;
    flex-direction: column;
    border-top: 2px solid var(--color-rule);
    padding-top: .875rem;
}
.lead-aside__title {
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: .25rem;
}

.brief {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 84px;
    gap: var(--space-4);
    /* Equal padding on both edges gives every row the same optical height,
       so the separators land on a consistent rhythm. */
    padding-block: var(--space-4);
    border-bottom: 1px solid var(--color-border);
    align-items: start;
}
.brief:last-child { border-bottom: 0; }
.brief__body { min-width: 0; }
.brief__title {
    font-family: var(--font-serif);
    font-size: .9375rem;
    font-weight: 700;
    line-height: 1.35;
    margin-block: .3rem .4rem;
}
.brief__title a { color: inherit; transition: color .18s ease; }
.brief__title a:hover { color: var(--color-primary-light); text-decoration: none; }
.brief__img {
    display: block;
    width: 84px;
    height: 63px;
    object-fit: cover;
    border-radius: var(--radius);
    background: var(--color-surface-sunken);
    transition: opacity .18s ease;
}
.brief:hover .brief__img { opacity: .88; }

/* ─── Story cards ───────────────────────────────────────────────────── */
.story-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-6) var(--space-5);
}
.story-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.story-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.story {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.story__figure {
    display: block;
    margin-bottom: .875rem;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-surface-sunken);
}
.story__img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform .35s ease;
}
/* Restrained: a small settle on the image only — no card lift, no shadow. */
.story:hover .story__img { transform: scale(1.025); }
.story__title a { transition: color .18s ease; }
.story__title {
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.35;
    margin-block: .35rem .5rem;
}
.story__title a { color: inherit; }
.story__title a:hover { color: var(--color-primary-light); text-decoration: none; }
.story__excerpt {
    font-size: .875rem;
    line-height: 1.6;
    color: var(--color-text-soft);
    margin-bottom: .625rem;
}

/* Compact horizontal variant (sidebars) */
.story--row {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: var(--space-3);
    align-items: start;
    padding-block: var(--space-3);
    border-bottom: 1px solid var(--color-border);
}
.story--row:last-child { border-bottom: 0; }
.story--row .story__figure { margin: 0; }
.story--row .story__img { width: 76px; height: 58px; aspect-ratio: auto; }
.story--row .story__title { font-size: .875rem; margin-block: 0 .3rem; }

/* ─── Ranked list (Trending) ────────────────────────────────────────── */
.ranked { list-style: none; }
.ranked__item {
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: var(--space-3);
    padding-block: var(--space-4);
    border-bottom: 1px solid var(--color-border);
}
.ranked__item:last-child { border-bottom: 0; }
.ranked__num {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-border-strong);
    line-height: 1.2;
}
.ranked__title {
    font-family: var(--font-serif);
    font-size: .9375rem;
    font-weight: 700;
    line-height: 1.4;
    margin-block: .2rem .35rem;
}
.ranked__title a { color: inherit; }
.ranked__title a:hover { color: var(--color-primary-light); text-decoration: none; }

/* ─── Topic list ────────────────────────────────────────────────────── */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: var(--space-4);
}
.topic {
    display: block;
    padding: var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-primary);
    border-radius: var(--radius);
}
.topic:hover { border-color: var(--color-primary-light); border-left-color: var(--color-primary); text-decoration: none; box-shadow: var(--shadow-sm); }
/* Both are <span>s, so they need an explicit block display: without it the
   name and the count ran together on one line and the margin-top below was
   silently ignored, which is not the two-line card this was designed as. */
.topic__name {
    display: block;
    font-size: .9375rem;
    font-weight: 600;
    color: var(--color-heading);
}
.topic__count {
    display: block;
    font-size: .75rem;
    color: var(--color-text-muted);
    margin-top: .2rem;
}

/* ─── Section chips ─────────────────────────────────────────────────── */
/* A quiet row of section shortcuts. Same visual family as .tag, one step
   larger, because these are navigation rather than metadata. */
.chip-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-bottom: var(--space-6);
}
.chip-row--center { justify-content: center; margin-top: var(--space-5); margin-bottom: 0; }
.chip-row__label {
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-right: .25rem;
}
.chip {
    display: inline-block;
    padding: .4rem .85rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: .8125rem;
    font-weight: 500;
    color: var(--color-text-soft);
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.chip:hover {
    background: var(--color-primary-wash);
    border-color: var(--color-primary-light);
    color: var(--color-primary);
    text-decoration: none;
}

/* ─── Page hero (category / tag / search) ───────────────────────────── */
.page-hero {
    padding-block: var(--space-7) var(--space-6);
    border-bottom: 2px solid var(--color-rule);
    margin-bottom: var(--space-7);
}
.page-hero__title {
    font-family: var(--font-serif);
    font-size: clamp(1.75rem, 4vw, 2.375rem);
    line-height: 1.2;
    letter-spacing: -.015em;
    margin-block: .35rem .5rem;
}
.page-hero__desc {
    font-size: 1rem;
    color: var(--color-text-soft);
    max-width: 62ch;
}
.page-hero__count {
    margin-top: .75rem;
    font-size: .8125rem;
    color: var(--color-text-muted);
}
.page-hero__count--spaced { margin-bottom: var(--space-6); }

/* Breadcrumb used as the first element of a page rather than inside an
   article header, where it would otherwise sit flush against the viewport. */
.breadcrumb--page { padding-top: var(--space-5); }

/* ─── Article ───────────────────────────────────────────────────────── */
.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: var(--space-9);
    padding-block: var(--space-6) var(--space-9);
    align-items: start;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    font-size: .75rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
}
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb__sep { color: var(--color-border-strong); }

.article-header { max-width: var(--measure); margin-bottom: var(--space-5); }

.article-title {
    font-family: var(--font-serif);
    font-size: clamp(1.875rem, 4.2vw, 2.75rem);
    line-height: 1.16;
    letter-spacing: -.02em;
    margin-block: .5rem .75rem;
}

.article-standfirst {
    font-size: 1.1875rem;
    line-height: 1.6;
    color: var(--color-text-soft);
    margin-bottom: var(--space-5);
}

.article-byline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
    padding-block: var(--space-4);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    font-size: .8125rem;
    color: var(--color-text-muted);
}
.article-byline__author { font-weight: 600; color: var(--color-heading); }

.article-figure { margin-block: var(--space-6); }
.article-figure img {
    width: 100%;
    max-height: 560px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    background: var(--color-surface-sunken);
}
.article-figure figcaption {
    margin-top: .6rem;
    font-size: .75rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* ─── Article body typography ───────────────────────────────────────── */
.prose {
    max-width: var(--measure);
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--color-text);
}
/*
 * Vertical rhythm for the article body: every block gets air above it except
 * the first.
 *
 * There used to be a ".prose p { margin: 0 }" immediately below this rule.
 * It was meant as a reset, but the global reset at the top of this file
 * already zeroes paragraph margins — and being a class-plus-type selector it
 * out-specified the flow rule above, so it silently removed the spacing from
 * every paragraph that did not directly follow a heading. Paragraphs after a
 * list, a blockquote, a figure, a code block, or simply after another
 * paragraph all ran together with no separation at all.
 */
.prose > * + * { margin-top: 1.4em; }

.prose h2, .prose h3, .prose h4 {
    font-family: var(--font-serif);
    color: var(--color-heading);
    line-height: 1.3;
}
.prose h2 {
    font-size: 1.625rem;
    margin-top: 2.2em;
    padding-top: .6em;
    border-top: 1px solid var(--color-border);
    letter-spacing: -.01em;
}
.prose h3 { font-size: 1.3125rem; margin-top: 1.9em; }
.prose h4 { font-size: 1.0625rem; margin-top: 1.7em; font-family: var(--font-sans); font-weight: 700; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .8em; }

.prose a {
    color: var(--color-primary-light);
    text-decoration: underline;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
}
.prose a:hover { color: var(--color-primary); text-decoration-thickness: 2px; }

.prose strong { font-weight: 700; color: var(--color-heading); }

.prose ul, .prose ol { padding-left: 1.35em; }
.prose li { margin-top: .5em; }
.prose li::marker { color: var(--color-primary-light); }

.prose blockquote {
    margin-inline: 0;
    padding: .25em 0 .25em 1.35em;
    border-left: 3px solid var(--color-primary);
    font-size: 1.1875rem;
    font-style: italic;
    color: var(--color-text-soft);
}
.prose blockquote p + p { margin-top: .8em; }

.prose img {
    border-radius: var(--radius);
    background: var(--color-surface-sunken);
}

.prose figure figcaption {
    margin-top: .6rem;
    font-family: var(--font-sans);
    font-size: .75rem;
    color: var(--color-text-muted);
}

.prose code {
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
    font-size: .875em;
    background: var(--color-surface-sunken);
    padding: .15em .4em;
    border-radius: var(--radius-sm);
    color: var(--color-primary-dark);
}
.prose pre {
    background: var(--color-primary-dark);
    color: #e8eef6;
    padding: 1.25rem;
    border-radius: var(--radius);
    /* Long lines scroll inside the block instead of widening the page. */
    overflow-x: auto;
    font-size: .875rem;
    line-height: 1.65;
}
.prose pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

/* Tables scroll horizontally on their own rather than breaking the layout. */
.prose .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Paint containment stops a wide table from growing the document scroll
       width; the table keeps its own horizontal scrollbar. */
    contain: paint;
}
/* The wrapper is focusable (main.js adds tabindex="0") so the table can be
   scrolled without a pointing device — WCAG 2.1.1. Give that focus somewhere
   visible to land, outside the clipped area. */
.prose .table-scroll:focus-visible {
    outline: 2px solid var(--color-primary-light);
    outline-offset: 3px;
}
.prose table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-sans);
    font-size: .875rem;
}
.prose th, .prose td {
    padding: .7rem .85rem;
    border: 1px solid var(--color-border);
    text-align: left;
    vertical-align: top;
}
.prose th { background: var(--color-surface-muted); font-weight: 600; color: var(--color-heading); }

.prose hr { margin-block: 2.2em; }

/* ─── Article extras ────────────────────────────────────────────────── */
.article-footer { max-width: var(--measure); }

.tag-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}
.tag-list__label {
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.tag {
    display: inline-block;
    padding: .3rem .7rem;
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: .75rem;
    font-weight: 500;
    color: var(--color-text-soft);
}
.tag:hover {
    background: var(--color-primary-wash);
    border-color: var(--color-primary-light);
    color: var(--color-primary);
    text-decoration: none;
}
.tag-list--spaced { margin-top: var(--space-6); }

.article-newsletter { margin-top: var(--space-7); }

.sources { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--color-border); }
.sources__title {
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
}
.sources__list { list-style: none; }
.sources__list li { padding-block: .4rem; font-size: .875rem; }
.sources__list li + li { border-top: 1px solid var(--color-border); }

.share { margin-top: var(--space-6); padding-block: var(--space-5); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.share__row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.share__label {
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-right: .25rem;
}
.share__btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .8rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius);
    font-size: .8125rem;
    font-weight: 500;
    color: var(--color-text-soft);
    cursor: pointer;
}
.share__btn:hover { border-color: var(--color-primary); color: var(--color-primary); text-decoration: none; }
.share__btn svg { width: 15px; height: 15px; }

.prevnext {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-top: var(--space-6);
}
.prevnext__item {
    padding: var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    min-width: 0;
}
.prevnext__item:hover { border-color: var(--color-primary-light); text-decoration: none; box-shadow: var(--shadow-sm); }
.prevnext__dir {
    display: block;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: .35rem;
}
.prevnext__title {
    font-family: var(--font-serif);
    font-size: .9375rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-heading);
}
.prevnext__item--next { text-align: right; }

/* ─── Sidebar ───────────────────────────────────────────────────────── */
.sidebar { position: sticky; top: calc(var(--header-h) + var(--space-5)); }

.widget { margin-bottom: var(--space-6); }
.widget__title {
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--color-heading);
    padding-bottom: .625rem;
    margin-bottom: var(--space-3);
    border-bottom: 2px solid var(--color-rule);
}
.widget--boxed {
    padding: var(--space-5);
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}
.widget--boxed .widget__title { border-bottom-color: var(--color-border-strong); }

/* ─── Newsletter ────────────────────────────────────────────────────── */
.newsletter {
    background: var(--color-primary);
    color: #fff;
    padding: var(--space-8) var(--space-6);
    border-radius: var(--radius-lg);
}
.newsletter__inner { max-width: 620px; margin-inline: auto; text-align: center; }
.newsletter__eyebrow {
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .65);
    margin-bottom: .625rem;
}
.newsletter__title {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3vw, 1.875rem);
    line-height: 1.25;
    color: #fff;
    margin-bottom: .625rem;
}
.newsletter__desc {
    font-size: .9375rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .82);
    margin-bottom: var(--space-5);
}
.newsletter__form {
    display: flex;
    gap: .5rem;
    max-width: 460px;
    margin-inline: auto;
}
.newsletter__form .input {
    flex: 1;
    min-width: 0;
    border-color: transparent;
}
.newsletter__form .input:focus { box-shadow: 0 0 0 3px rgba(255, 255, 255, .3); }
.newsletter__fineprint {
    margin-top: .875rem;
    font-size: .75rem;
    color: rgba(255, 255, 255, .72);
}
/* On the navy panel the default link colour is all but invisible (1.31:1).
   White keeps it legible at 12.3:1; the underline keeps it identifiable as a
   link without relying on colour alone. */
.newsletter a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.newsletter a:hover { text-decoration-thickness: 2px; }
.newsletter__msg {
    margin-top: .875rem;
    font-size: .8125rem;
    font-weight: 500;
    min-height: 1.2em;
}
.newsletter__msg.is-success { color: #a7f3d0; }
.newsletter__msg.is-error   { color: #fecaca; }

/* Compact sidebar variant */
.newsletter--compact { padding: var(--space-5); text-align: left; }
.newsletter--compact .newsletter__inner { text-align: left; }
.newsletter--compact .newsletter__title { font-size: 1.125rem; }
.newsletter--compact .newsletter__form { flex-direction: column; max-width: none; }

/* ─── Empty states ──────────────────────────────────────────────────── */
.empty {
    padding: var(--space-9) var(--space-5);
    text-align: center;
    border: 1px dashed var(--color-border-strong);
    border-radius: var(--radius-lg);
    background: var(--color-surface-muted);
}
.empty__title {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    color: var(--color-heading);
    margin-bottom: .4rem;
}
.empty__text { font-size: .875rem; color: var(--color-text-muted); max-width: 42ch; margin-inline: auto; }

/* ─── Pagination ────────────────────────────────────────────────────── */
.pagination { margin-top: var(--space-8); }
.pagination__list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .375rem;
    list-style: none;
}
.pagination__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding-inline: .75rem;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius);
    font-size: .875rem;
    font-weight: 500;
    color: var(--color-text-soft);
    background: var(--color-surface);
}
.pagination__btn:hover { border-color: var(--color-primary); color: var(--color-primary); text-decoration: none; }
.pagination__btn.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    cursor: default;
}
.pagination__ellipsis {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding-inline: .4rem;
    color: var(--color-text-muted);
}

/* ─── Contact / About ───────────────────────────────────────────────── */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: var(--space-7);
    align-items: start;
    padding-bottom: var(--space-9);
}

.panel {
    padding: var(--space-6);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}
.panel--muted { background: var(--color-surface-muted); }
.panel__title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin-bottom: .5rem;
}
.panel__desc { font-size: .875rem; color: var(--color-text-muted); margin-bottom: var(--space-5); }
.panel__action { margin-top: var(--space-5); }

.info-row {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding-block: var(--space-4);
    border-bottom: 1px solid var(--color-border);
}
.info-row:last-child { border-bottom: 0; }

/* Sidebar list of policies, shown on every legal page. */
.legal-nav { list-style: none; }
.legal-nav li { border-bottom: 1px solid var(--color-border); }
.legal-nav li:last-child { border-bottom: 0; }
.legal-nav a,
.legal-nav__current {
    display: block;
    padding-block: var(--space-4);
    font-size: .9375rem;
    line-height: 1.35;
}
.legal-nav a { color: var(--color-text-soft); transition: color .18s ease; }
.legal-nav a:hover { color: var(--color-primary); }
/* The page you are already on: present, but not offered as a destination. */
.legal-nav__current { color: var(--color-heading); font-weight: 600; }
.info-row__label {
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.info-row__value { font-size: .9375rem; color: var(--color-text); }

.prose-page { max-width: var(--measure); }

/* ─── Notice page ───────────────────────────────────────────────────── */
/* A single short message with its actions — the unsubscribe states. Narrow
   measure and generous vertical space so it does not read as a broken page. */
.notice-page {
    max-width: 34rem;
    margin-inline: auto;
    padding-block: var(--space-9);
    text-align: center;
}
.notice-page__title {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 3.4vw, 2rem);
    line-height: 1.25;
    margin-block: .5rem .75rem;
}
.notice-page__text {
    color: var(--color-text-soft);
    margin-bottom: var(--space-6);
}
.notice-page__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    justify-content: center;
}

/* ─── Error pages ───────────────────────────────────────────────────── */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58vh;
    min-height: 58dvh;
    padding-block: var(--space-9);
    text-align: center;
}
.error-page__code {
    font-family: var(--font-serif);
    font-size: clamp(3.5rem, 12vw, 6rem);
    font-weight: 700;
    line-height: 1;
    color: var(--color-primary);
    letter-spacing: -.03em;
}
.error-page__title {
    font-family: var(--font-serif);
    font-size: clamp(1.375rem, 3vw, 1.75rem);
    margin-block: var(--space-4) .625rem;
}
.error-page__desc {
    font-size: .9375rem;
    color: var(--color-text-muted);
    max-width: 44ch;
    margin-inline: auto;
    margin-bottom: var(--space-6);
}
.error-page__actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* ─── Footer ────────────────────────────────────────────────────────── */
.site-footer {
    margin-top: var(--space-9);
    background: var(--color-primary);
    color: rgba(255, 255, 255, .78);
    padding-block: var(--space-8) calc(var(--space-5) + env(safe-area-inset-bottom));
}
.footer-grid {
    display: grid;
    /* Brand column plus four link columns: Sections, Publication, Follow, Legal. */
    grid-template-columns: 1.7fr 1fr 1fr 1fr 1fr;
    gap: var(--space-7) var(--space-5);
    padding-bottom: var(--space-7);
    border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.footer-brand__name {
    display: inline-block;
    font-family: var(--font-serif);
    font-size: 1.1875rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: .625rem;
}
.footer-brand__desc {
    font-size: .8125rem;
    line-height: 1.65;
    max-width: 38ch;
    color: rgba(255, 255, 255, .68);
}
.footer-col__title {
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: var(--space-4);
}
.footer-col ul { list-style: none; }
.footer-col li + li { margin-top: .5rem; }
.footer-col a { font-size: .8125rem; color: rgba(255, 255, 255, .72); }
.footer-col a:hover { color: #fff; }

.footer-social { display: flex; gap: .5rem; margin-top: var(--space-4); }
.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: var(--radius);
    color: rgba(255, 255, 255, .8);
}
.footer-social a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.footer-social svg { width: 16px; height: 16px; }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding-top: var(--space-5);
    font-size: .75rem;
    color: rgba(255, 255, 255, .6);
}
.footer-bottom__links { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.footer-bottom a { color: rgba(255, 255, 255, .68); }
.footer-bottom a:hover { color: #fff; }

/* ══════════════════════════════════════════════════════════════════════
   Responsive — tested at 320 / 375 / 390 / 414 / 480 / 768 / 1024 / 1280+
   and on emulated iPhone SE/14/14 Pro Max, Pixel 8, iPad, Galaxy Fold.

   Breakpoints are in em, not px, and deliberately so. An em in a media query
   resolves against the browser's root font size, so these thresholds track
   text zoom as well as viewport width — which is what a breakpoint is
   actually asking: "is there still room for this layout?"

   With px thresholds, a reader at 200% text size kept the full desktop header
   at 1280px even though its contents no longer fitted, and the row overflowed
   by ~240px on every page (WCAG 1.4.4). In em the compact header engages at
   the point it stops fitting, at any zoom level. Divide by 16 to read them as
   pixels: 75em = 1200px, 67.5em = 1080px, 48em = 768px, 37.5em = 600px.
   ══════════════════════════════════════════════════════════════════════ */

/* Large desktop */
@media (max-width: 75em) {
    .article-layout { gap: var(--space-7); }
}

/* Tablet landscape */
@media (max-width: 64em) {
    :root { --container-pad: 1.25rem; }

    .lead { grid-template-columns: 1fr; gap: var(--space-6); }
    .lead-aside { border-top-width: 2px; }

    .article-layout { grid-template-columns: minmax(0, 1fr); }
    .sidebar {
        position: static;
        max-width: var(--measure);
        padding-top: var(--space-6);
        border-top: 1px solid var(--color-border);
    }

    .story-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split { grid-template-columns: 1fr; }
}

/*
 * Compact header.
 *
 * The switch happens at 1080px — while the six links still fit — because
 * the row starts to look cramped before it actually overflows. The header
 * becomes brand | search + menu, and the navigation moves into the panel.
 */
@media (max-width: 67.5em) {
    .site-nav { display: none; }
    .nav-toggle { display: inline-flex; }
    .header-actions .btn--newsletter { display: none; }
}

@media (max-width: 48em) {
    :root {
        --space-8: 2.25rem;
        --space-9: 2.75rem;
        --header-h:       66px;
        --header-h-stuck: 60px;
    }

    .story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .section { padding-block: var(--space-7); }
    .prevnext { grid-template-columns: 1fr; }
    .prevnext__item--next { text-align: left; }
    .newsletter { padding: var(--space-6) var(--space-5); }
    .article-figure img { max-height: 360px; }
}

/* Phones */
@media (max-width: 37.5em) {
    :root { --container-pad: 1rem; }

    .story-grid,
    .story-grid--2,
    .story-grid--4 { grid-template-columns: 1fr; gap: var(--space-6); }

    .brand { font-size: 1.0625rem; }

    .lead { padding-block: var(--space-5); }
    .lead-story__excerpt { font-size: 1rem; }

    .masthead { padding-block: var(--space-4) var(--space-3); }
    .masthead__tagline { font-size: .875rem; }
    .masthead__links { margin-top: .5rem; }

    .article-standfirst { font-size: 1.0625rem; }

    /* Comfortable measure without cramping on a small screen. */
    .prose { font-size: 1rem; line-height: 1.75; }
    .prose h2 { font-size: 1.375rem; }
    .prose h3 { font-size: 1.1875rem; }
    .prose blockquote { font-size: 1.0625rem; padding-left: 1rem; }
    .prose pre { padding: 1rem; font-size: .8125rem; }

    .article-figure { margin-block: var(--space-5); }
    .article-figure img { max-height: 260px; border-radius: var(--radius); }

    .newsletter__form { flex-direction: column; }
    .newsletter__form .btn { width: 100%; }

    .search-form { flex-direction: column; }
    .search-form .btn { width: 100%; }

    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6) var(--space-4); }
    .footer-brand { grid-column: 1 / -1; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }

    .share__row { gap: .4rem; }
    .share__btn { padding: .45rem .65rem; font-size: .75rem; }
}

/* Small phones (320px) */
@media (max-width: 25em) {
    .brief { grid-template-columns: 1fr 68px; }
    .brief__img { width: 68px; height: 52px; }
    .footer-grid { grid-template-columns: 1fr; }
    .pagination__btn { min-width: 36px; height: 36px; padding-inline: .5rem; font-size: .8125rem; }
}

/* ─── Forced colours (Windows High Contrast) ────────────────────────── */
/*
 * In forced-colours mode the OS replaces the palette wholesale. Backgrounds
 * and shadows are dropped, so anything whose meaning came only from a fill
 * loses it — cards and chips flatten into the page, and the mobile drawer
 * becomes indistinguishable from the content behind it. Re-assert the
 * boundaries with borders, which forced-colours mode keeps.
 */
@media (forced-colors: active) {
    .story,
    .topic,
    .chip,
    .tag,
    .panel,
    .newsletter,
    .empty,
    .prevnext__item,
    .share__btn {
        border: 1px solid;
    }
    .mobile-nav { border-left: 2px solid; }
    .site-header { border-bottom: 1px solid; }
    .kicker,
    .nav-list a.is-active { forced-color-adjust: none; }
    /* Keep the logo's own colours rather than letting the OS repaint it. */
    .brand__logo { forced-color-adjust: none; }
    :focus-visible { outline: 3px solid; outline-offset: 2px; }
}

/* ─── Motion & print ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

@media print {
    .site-header, .site-footer, .sidebar, .share, .newsletter,
    .prevnext, .mobile-nav, .nav-scrim, .skip-link { display: none !important; }
    body { color: #000; background: #fff; }
    .article-layout { display: block; }
    .prose { max-width: none; font-size: 11pt; }
    .prose a::after { content: ' (' attr(href) ')'; font-size: 9pt; color: #555; }
}

/* Flash messages shown after a redirect back to a public page. */
.flash-stack {
    display: grid;
    gap: 0.5rem;
    padding-top: 1rem;
}
.flash-stack .notice { margin: 0; }

/* Admin article preview (rendered with the public layout). */
.preview-banner { padding-top: 1rem; }
.tag-list--spaced { margin-top: 2rem; }

/* Optional analytics preferences, accessible on small screens. */
.privacy-panel { position: fixed; bottom: 4.5rem; left: 1rem; right: 1rem; max-width: 36rem; padding: 1.25rem; background: #fff; color: #12336b; border: 1px solid #bbc6d6; border-radius: .75rem; box-shadow: 0 8px 30px #0003; z-index: 1000; max-height: 65vh; overflow: auto; }
.privacy-panel[hidden], .privacy-settings[hidden] { display: none; }
.privacy-panel h2 { font-size: 1.2rem; }
.privacy-panel p { margin: .75rem 0; }
.privacy-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.privacy-settings { position: fixed; bottom: 1rem; left: 1rem; background: #fff; color: #12336b; border: 1px solid #bbc6d6; z-index: 999; }
