/* Dispatch: the Ping2Prompt theme.
   Three faces: Bricolage (headlines), Inter (body), Geist Mono (labels, times, code).
   Everything is built from the tokens below (colour, series hues, spacing, motion), each with
   a light and a dark value; the accent is Ghost's own brand-colour setting. */

:root {
    --font-head: var(--gh-font-heading, var(--font-head-theme, "Bricolage")), "Helvetica Neue", Arial, sans-serif;
    --font-body: var(--gh-font-body, "InterVar", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
    --font-mono: "GeistMono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --bg: #f5f4ee;
    --bg-raised: #fffefa;
    --bg-sunken: #ecebe3;
    --ink: #15161a;
    --ink-2: #4b4f5c;
    --ink-3: #646874;                                    /* 4.9:1 on --bg, 4.5:1 on --bg-sunken */
    --rule: #d8d5ca;
    --rule-strong: #15161a;
    --accent: var(--ghost-accent-color, #221aff);
    --accent-ink: #ffffff;
    --accent-text: var(--accent);                       /* accent used as text on --bg */
    --accent-soft: color-mix(in srgb, var(--accent) 8%, var(--bg));
    /* severity and series hues double as small text: each is at least 4.5:1 on --bg */
    --critical: #c81e2d;
    --high: #b84a08;
    --medium: #8a6800;
    --low: #26734a;
    --breaking: #c81e2d;
    --shadow: 0 1px 2px rgb(21 22 26 / 0.06), 0 8px 24px -12px rgb(21 22 26 / 0.18);

    /* one hue per series; used for the dot on chips, cards and menu entries */
    --s-friday-footgun: #b84a08;
    --s-homelab-breach: #c81e2d;
    --s-patch-roulette: #806000;
    --s-under-the-hood: #221aff;
    --s-weekend-build: #1f7a4a;
    --s-deep-dive: #6d3fd1;
    --s-prompt-shift: #0a7480;

    --wrap: 1280px;
    --gutter: clamp(16px, 3vw, 32px);
    --radius: 4px;
    --thumb: 96px;
    --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 1rem; --space-4: 1.5rem; --space-5: 2.5rem; --space-6: 4rem;
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* strong ease-out: responds at once, settles softly */
    --ease: 160ms var(--ease-out);

    color-scheme: light;
}

:root[data-scheme="dark"] {
    --bg: #0f1014;
    --bg-raised: #16171d;
    --bg-sunken: #0a0b0e;
    --ink: #ebeae4;
    --ink-2: #b4b7c2;
    --ink-3: #80848f;
    --rule: #272932;
    --rule-strong: #ebeae4;
    --accent-ink: #ffffff;
    --accent-text: color-mix(in srgb, var(--accent) 45%, #ffffff);
    --accent-soft: color-mix(in srgb, var(--accent) 22%, var(--bg));
    --s-friday-footgun: #ff8c42;
    --s-homelab-breach: #ff5a68;
    --s-patch-roulette: #e8c33a;
    --s-under-the-hood: #8f8aff;
    --s-weekend-build: #5fcf8d;
    --s-deep-dive: #b79bff;
    --s-prompt-shift: #4fd0dd;
    --critical: #ff5a68;
    --high: #ff8c42;
    --medium: #e8c33a;
    --low: #5fcf8d;
    --breaking: #ff5a68;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px -12px rgb(0 0 0 / 0.7);
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root[data-scheme="system"] {
        --bg: #0f1014;
        --bg-raised: #16171d;
        --bg-sunken: #0a0b0e;
        --ink: #ebeae4;
        --ink-2: #b4b7c2;
        --ink-3: #80848f;
        --rule: #272932;
        --rule-strong: #ebeae4;
        --accent-text: color-mix(in srgb, var(--accent) 45%, #ffffff);
        --accent-soft: color-mix(in srgb, var(--accent) 22%, var(--bg));
        --s-friday-footgun: #ff8c42;
        --s-homelab-breach: #ff5a68;
        --s-patch-roulette: #e8c33a;
        --s-under-the-hood: #8f8aff;
        --s-weekend-build: #5fcf8d;
        --s-deep-dive: #b79bff;
        --s-prompt-shift: #4fd0dd;
        --critical: #ff5a68;
        --high: #ff8c42;
        --medium: #e8c33a;
        --low: #5fcf8d;
        --breaking: #ff5a68;
        --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px -12px rgb(0 0 0 / 0.7);
        color-scheme: dark;
    }
}

/* ---------- base ---------- */

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

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 72px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.55;
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-text); }
img, svg, video { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; margin: 0; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
time { white-space: nowrap; }
kbd {
    font-family: var(--font-mono);
    font-size: 0.75em;
    padding: 0.1em 0.4em;
    border: 1px solid var(--rule);
    border-bottom-width: 2px;
    border-radius: 3px;
    background: var(--bg-raised);
}

.mono { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.01em; }
.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ink-3);
    margin: 0 0 0.6rem;
}
.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap;
}
.skip-link {
    position: absolute; left: -999px; top: 8px;
    background: var(--accent); color: var(--accent-ink);
    padding: 8px 12px; z-index: 100;
}
.skip-link:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap-narrow { width: 100%; max-width: 720px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap-medium { width: 100%; max-width: 1000px; margin-inline: auto; padding-inline: var(--gutter); }
.wrap-article { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: var(--gutter); }

.site { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; padding-bottom: 4rem; }

/* ---------- buttons, chips ---------- */

.button {
    display: inline-flex; align-items: center; gap: 0.4em;
    padding: 0.5em 0.95em;
    background: var(--accent); color: var(--accent-ink);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    font-family: var(--font-mono); font-size: 0.78rem; font-weight: 500;
    letter-spacing: 0.02em; text-decoration: none; cursor: pointer;
    white-space: nowrap;
}
.button { transition: filter var(--ease), background-color var(--ease), color var(--ease), transform var(--ease); }
.button:hover { filter: brightness(1.1); color: var(--accent-ink); }
.button-ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.button-ghost:hover { background: var(--ink); color: var(--bg); filter: none; }
.link-button { background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-button:hover { color: var(--accent-text); }
.icon-button {
    display: inline-grid; place-items: center;
    width: 36px; height: 36px;
    background: transparent; border: 1px solid transparent; border-radius: var(--radius);
    cursor: pointer;
}
.icon-button:hover { border-color: var(--rule); background: var(--bg-raised); }

.labels { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }
.labels:empty { display: none; }
.chip {
    display: inline-block;
    font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.08em;
    line-height: 1; padding: 4px 6px 3px;
    border: 1px solid var(--rule); border-radius: 3px;
    color: var(--ink-2); text-decoration: none;
}
.chip-breaking { background: #b3192a; border-color: #b3192a; color: #fff; }
.chip-sev { border-width: 1px; }
.chip-critical { color: var(--critical); border-color: var(--critical); }
.chip-high { color: var(--high); border-color: var(--high); }
.chip-medium { color: var(--medium); border-color: var(--medium); }
.chip-low { color: var(--low); border-color: var(--low); }
.chip-column { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip-column::before { content: ""; display: inline-block; width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--series, currentColor); margin-right: 0.5em; }
.chip-opinion { color: var(--accent-text); border-color: var(--accent); }
.chip-product { text-transform: none; letter-spacing: 0.02em; font-weight: 500; background: var(--bg-raised); }
.chip-product:hover { border-color: var(--accent); color: var(--accent-text); }

/* ---------- masthead ---------- */

.masthead { border-bottom: 1px solid var(--rule-strong); background: var(--bg); position: relative; z-index: 20; }
.masthead-top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center; gap: 1rem 1.5rem;
    padding-block: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand-logo { height: 34px; width: auto; }
.brand-name {
    font-family: var(--font-head); font-weight: 800; font-size: 1.75rem;
    letter-spacing: -0.03em; font-variation-settings: "wdth" 85;
    text-decoration: none;
}
.brand:hover, .brand-name:hover { color: inherit; }
.brand-tagline { margin: 0; color: var(--ink-3); font-size: 0.85rem; max-width: 48ch; border-left: 1px solid var(--rule); padding-left: 1.5rem; line-height: 1.3; }
.masthead-tools { display: flex; align-items: center; gap: 0.35rem; }
.icon-sun, .icon-moon { grid-area: 1 / 1; }
:root[data-scheme="dark"] .icon-sun { display: none; }
:root:not([data-scheme="dark"]) .icon-moon { display: none; }
:root[data-scheme="dark"] .brand-logo-invert { filter: invert(1); }
@media (prefers-color-scheme: dark) {
    :root[data-scheme="system"] .icon-sun { display: none; }
    :root[data-scheme="system"] .icon-moon { display: block; }
    :root[data-scheme="system"] .brand-logo-invert { filter: invert(1); }
}
.nav-toggle { display: none; }
@media (max-width: 600px) {
    .masthead-tools { gap: 0.15rem; }
    .masthead-tools .button-ghost, .masthead-tools .scheme-toggle { display: none; }
    .brand-logo { height: 28px; }
}

.site-nav { border-top: 1px solid var(--rule); }
.site-nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.sections-nav { display: flex; align-items: stretch; gap: 0; }
.sections-nav > li > a, .nav-drop > summary {
    display: flex; align-items: center; gap: 0.4em;
    padding: 0.7rem 0.9rem 0.6rem;
    text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.72rem; font-weight: 500;
    text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap;
    cursor: pointer; transition: border-color var(--ease), color var(--ease);
}
.sections-nav > li:first-child > a { padding-left: 0; }
.sections-nav > li > a:hover, .nav-drop > summary:hover, .nav-drop[open] > summary { border-bottom-color: var(--accent); color: var(--ink); }
.sections-nav > li > a[aria-current="page"] { border-bottom-color: var(--ink); font-weight: 700; }
.nav-drop-item { position: relative; }
.nav-drop > summary { list-style: none; user-select: none; }
.nav-drop > summary::-webkit-details-marker { display: none; }
.icon-chevron { transition: transform var(--ease); }
.nav-drop[open] .icon-chevron { transform: rotate(180deg); }
.nav-drop-menu {
    position: absolute; top: 100%; left: 0; z-index: 30; min-width: 17rem;
    background: var(--bg-raised); border: 1px solid var(--rule-strong); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 0.4rem;
}
.nav-drop-menu a {
    display: flex; align-items: center; gap: 0.6em;
    padding: 0.55rem 0.7rem; border-radius: 3px;
    font-family: var(--font-body); font-size: 0.92rem; letter-spacing: 0; text-transform: none; text-decoration: none;
}
.nav-drop-menu a:hover, .nav-drop-menu a:focus-visible { background: var(--bg-sunken); color: var(--ink); }
.nav-drop-all { border-top: 1px solid var(--rule); margin-top: 0.3rem; padding-top: 0.3rem; }
.nav-drop-all a { color: var(--ink-2); font-size: 0.85rem; }
.series-dot { flex: none; width: 0.55em; height: 0.55em; border-radius: 50%; background: var(--series, var(--ink-3)); }
.pages-nav .nav { display: flex; gap: 1.2rem; }
.pages-nav a { font-size: 0.85rem; text-decoration: none; color: var(--ink-2); }
.pages-nav a:hover, .pages-nav .nav-current a { color: var(--ink); text-decoration: underline; }
.nav-scheme { display: none; }

@media (max-width: 900px) {
    .masthead-top { grid-template-columns: minmax(0, 1fr) auto; }
    .brand { min-width: 0; }
    .brand-name { font-size: 1.4rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .brand-tagline { display: none; }
    .nav-toggle { display: inline-grid; }
    .site-nav { display: none; }
    .site-nav.is-open { display: block; }
    .site-nav-inner { flex-direction: column; align-items: stretch; gap: 0; padding-block: 0.25rem 0.9rem; }
    .sections-nav { flex-direction: column; }
    .sections-nav > li { border-bottom: 1px solid var(--rule); }
    .sections-nav > li > a, .nav-drop > summary { padding: 0.9rem 0; border-bottom: 0; font-size: 0.8rem; justify-content: space-between; }
    .sections-nav > li > a[aria-current="page"] { color: var(--accent-text); }
    .nav-drop-menu { position: static; border: 0; box-shadow: none; background: none; padding: 0 0 0.6rem; min-width: 0; }
    .nav-drop-menu a { padding: 0.6rem 0.25rem; }
    .pages-nav .nav { flex-wrap: wrap; padding: 0.9rem 0 0.4rem; }
    .pages-nav a { font-size: 0.95rem; }
    .nav-scheme { display: block; text-align: left; padding: 0.5rem 0; color: var(--ink-2); }
}

/* series hues: any element with s-<tag slug> gets its series colour */
.s-friday-footgun { --series: var(--s-friday-footgun); }
.s-homelab-breach { --series: var(--s-homelab-breach); }
.s-patch-roulette { --series: var(--s-patch-roulette); }
.s-under-the-hood { --series: var(--s-under-the-hood); }
.s-weekend-build { --series: var(--s-weekend-build); }
.s-deep-dive { --series: var(--s-deep-dive); }
.s-prompt-shift { --series: var(--s-prompt-shift); }

/* ---------- ticker ---------- */

.ticker {
    display: flex; align-items: stretch;
    border-bottom: 1px solid var(--rule);
    background: var(--bg-raised);
    overflow: hidden;
}
.ticker-label {
    flex: none; display: flex; align-items: center;
    padding: 0.45rem 0.9rem;
    background: var(--breaking); color: #fff;
    text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; font-size: 0.7rem;
}
.ticker-track { flex: 1; overflow: hidden; display: flex; align-items: center; }
.ticker-list { display: flex; gap: 2.5rem; padding-inline: 1.25rem; white-space: nowrap; will-change: transform; }
.ticker-list li a { text-decoration: none; display: inline-block; min-height: 24px; line-height: 24px; }
.ticker-list li a:hover { text-decoration: underline; }
.ticker-list time { color: var(--ink-3); margin-right: 0.5rem; }
.ticker-list time::after { content: "/"; margin-left: 0.5rem; }
@keyframes ticker { to { transform: translateX(-50%); } }
.ticker-track.is-running .ticker-list { animation: ticker var(--ticker-duration, 60s) linear infinite; }
.ticker-track:hover .ticker-list, .ticker-track:focus-within .ticker-list { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
    .ticker-track.is-running .ticker-list { animation: none; }
    .ticker-track { overflow-x: auto; }
}

/* ---------- home: hero ---------- */

.hero { border-bottom: 1px solid var(--rule-strong); background: var(--bg-raised); }
.hero-grid {
    display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 420px);
    gap: 2rem clamp(2rem, 6vw, 5rem); align-items: center;
    padding-block: clamp(2rem, 5vw, 3.75rem);
}
.hero-signal {
    display: flex; align-items: center; gap: 0.7em; margin: 0 0 1.1rem;
    text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.7rem; font-weight: 500; color: var(--ink-3);
}
.hero-dot { width: 0.6em; height: 0.6em; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero-line { width: clamp(2.5rem, 8vw, 6rem); height: 1px; background: linear-gradient(90deg, var(--accent), var(--rule-strong)); }
.hero-caret { width: 0.5em; height: 1.15em; background: var(--ink); margin-left: -0.35em; }
.hero-title {
    font-size: clamp(2.5rem, 6.2vw, 4.75rem); font-weight: 800; line-height: 0.98; letter-spacing: -0.045em;
    font-variation-settings: "wdth" 85; text-wrap: balance; max-width: 14ch;
}
.hero-text { font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.45; color: var(--ink-2); max-width: 52ch; margin: 1.25rem 0 0; text-wrap: pretty; }
.hero-signup { background: var(--bg); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 1.5rem; }
.hero-signup-title { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.02em; margin: 0 0 0.3rem; }
.hero-signup-text { color: var(--ink-2); font-size: 0.95rem; margin: 0 0 1rem; }
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-title { max-width: none; }
}

/* ---------- home: featured coverage ---------- */

.featured {
    display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(260px, 1fr);
    gap: 2rem 2.5rem; padding-block: 2.25rem; border-bottom: 1px solid var(--rule-strong);
}
.lead-link { display: block; text-decoration: none; }
.lead-link:hover { color: inherit; }
.lead-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: var(--bg-sunken); }
.lead-body { padding-top: 1rem; }
.lead-title {
    font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 700;
    letter-spacing: -0.025em; margin: 0.5rem 0 0.6rem;
    font-variation-settings: "wdth" 92; text-wrap: balance;
}
.lead-link:hover .lead-title, .secondary-link:hover .secondary-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.lead-dek { font-size: 1.05rem; color: var(--ink-2); max-width: 60ch; }
.meta { color: var(--ink-3); }
.meta-sep { margin-inline: 0.35em; }

.featured-side { display: flex; flex-direction: column; gap: 1.75rem; border-left: 1px solid var(--rule); padding-left: 2.5rem; }
.secondary + .secondary { border-top: 1px solid var(--rule); padding-top: 1.75rem; }
.secondary-link { display: block; text-decoration: none; }
.secondary-link:hover { color: inherit; }
.secondary-image { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: var(--radius); background: var(--bg-sunken); }
.secondary-body { padding-top: 0.75rem; }
.secondary-title { font-size: 1.25rem; font-weight: 650; line-height: 1.18; letter-spacing: -0.015em; margin: 0.45rem 0 0.45rem; }
@media (max-width: 900px) {
    .featured { grid-template-columns: 1fr; }
    .featured-side { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 1.75rem; }
}
@media (min-width: 560px) and (max-width: 900px) {
    .featured-side { flex-direction: row; }
    .featured-side .secondary { flex: 1; }
    .secondary + .secondary { border-top: 0; padding-top: 0; }
}

/* ---------- series ---------- */

.series { padding-block: 2rem 0.5rem; }
.series-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; padding-top: 1rem; }
.series-card {
    display: flex; flex-direction: column;
    background: var(--bg-raised); border: 1px solid var(--rule); border-top: 3px solid var(--series, var(--rule-strong));
    border-radius: var(--radius); transition: border-color var(--ease), box-shadow var(--ease);
}
.series-card:hover, .series-card:focus-within { border-color: var(--series, var(--rule-strong)); box-shadow: var(--shadow); }
.series-card-head { display: flex; flex-direction: column; gap: 0.45rem; flex: 1; padding: 1rem 1.1rem 0.9rem; text-decoration: none; }
.series-card-head:hover { color: inherit; }
.series-name { font-family: var(--font-head); font-weight: 700; font-size: 1.12rem; line-height: 1.15; letter-spacing: -0.015em; }
.series-desc { color: var(--ink-2); font-size: 0.88rem; line-height: 1.45; flex: 1; }
.series-count { display: inline-flex; align-items: center; gap: 0.4em; color: var(--ink-3); margin-top: 0.2rem; }
.series-card-head:hover .series-count { color: var(--series, var(--accent-text)); }
.series-latest { border-top: 1px solid var(--rule); padding: 0.4rem 1.1rem 0.8rem; }
.series-latest li + li { border-top: 1px solid var(--rule); }
.series-latest a { display: block; padding: 0.6rem 0; font-size: 0.92rem; line-height: 1.35; text-decoration: none; }
.series-latest a:hover { text-decoration: underline; }
.series-page .series-grid { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.5rem; }
.series-page .series-name { font-size: 1.35rem; }

.filter-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.filter-list a {
    display: block; padding: 0.35em 0.75em; border: 1px solid var(--rule); border-radius: 999px;
    font-size: 0.72rem; letter-spacing: 0.04em; text-decoration: none; color: var(--ink-2);
    transition: border-color var(--ease), color var(--ease);
}
.filter-list a:hover { border-color: var(--ink); color: var(--ink); }
.filter-list a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.archive-head .filter-nav { margin-top: 1.25rem; }
.empty-state { padding: 2.5rem 0; color: var(--ink-2); }

/* ---------- the wire ---------- */

.home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 3rem;
    padding-block: 2rem;
}
.rail { position: sticky; top: 1rem; align-self: start; display: flex; flex-direction: column; gap: 2rem; }
@media (max-width: 1000px) {
    .home-grid { grid-template-columns: 1fr; gap: 2rem; }
    .rail { position: static; }
}

.section-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    border-bottom: 2px solid var(--rule-strong);
    padding-bottom: 0.4rem; margin-bottom: 0.25rem;
}
.section-title { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.section-note { color: var(--ink-3); }
.section-head .filter-nav { padding-bottom: 0.15rem; }

.wire-page { padding-top: 1.5rem; }
.wire-list { display: flex; flex-direction: column; }
.wire-day {
    position: sticky; top: 0; z-index: 2;
    background: var(--bg);
    padding: 0.9rem 0 0.35rem;
    border-bottom: 1px solid var(--rule-strong);
    font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink);
}
.wire-item { border-bottom: 1px solid var(--rule); }
.wire-link {
    display: grid;
    grid-template-columns: 3.4rem minmax(0, 1fr) auto;
    gap: 0.75rem 1rem;
    align-items: start;
    padding: 0.8rem 0;
    text-decoration: none;
}
.wire-link:hover, .wire-link:focus-visible { color: inherit; background: linear-gradient(90deg, var(--bg-raised), transparent); outline: none; }
.wire-link:focus-visible { box-shadow: inset 2px 0 0 var(--accent); }
.wire-time { color: var(--ink-3); padding-top: 0.2rem; font-variant-numeric: tabular-nums; }
.wire-body { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.wire-title { font-family: var(--font-head); font-size: 1.1rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.wire-link:hover .wire-title { text-decoration: underline; text-underline-offset: 3px; }
.wire-dek { color: var(--ink-2); font-size: 0.9rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wire-thumb { width: var(--thumb); height: calc(var(--thumb) * 9 / 16); object-fit: cover; border-radius: 3px; background: var(--bg-sunken); margin-top: 0.15rem; }
@media (max-width: 600px) {
    .wire-link { grid-template-columns: 2.9rem minmax(0, 1fr); }
    .wire-thumb { display: none; }
    .wire-dek { display: none; }
}

.pagination { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 0; }
.pagination-pos { color: var(--ink-3); }

/* ---------- newsletter signup ---------- */

.signup-form { display: flex; flex-direction: column; gap: 0.45rem; }
.signup-label { color: inherit; opacity: 0.75; }
.signup-row { display: flex; gap: 0.5rem; }
.signup-input {
    flex: 1; min-width: 0; padding: 0.7em 0.85em;
    font: inherit; font-size: 1rem;                     /* 16px: no zoom on focus in iOS */
    background: var(--bg-raised); color: var(--ink);
    border: 1px solid var(--rule-strong); border-radius: var(--radius);
}
.signup-input::placeholder { color: var(--ink-3); }
.signup-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.signup-form .button { justify-content: center; padding-inline: 1.1em; font-size: 0.82rem; }
.signup-form .label-default { display: inline-flex; align-items: center; gap: 0.4em; }
.signup-form .label-loading, .signup-form .label-success { display: none; }
.signup-form.loading .label-default, .signup-form.success .label-default { display: none; }
.signup-form.loading .label-loading { display: inline; }
.signup-form.loading .button { opacity: 0.7; pointer-events: none; }
.signup-form.success .label-success { display: inline; }
.signup-form.success .signup-row, .signup-form.success .signup-label { display: none; }
.signup-success, .signup-error { display: none; margin: 0; font-size: 0.82rem; line-height: 1.45; }
.signup-form.success .signup-success { display: block; padding: 0.8em 1em; border: 1px solid currentColor; border-radius: var(--radius); }
.signup-form.error .signup-error { display: block; color: var(--form-error, var(--critical)); }
.signup-member { margin: 0; }
.signup-member a { color: inherit; }
@media (max-width: 420px) {
    .signup-row { flex-direction: column; }
}

/* the full-width band on the home page and under articles: inverted, so it reads as one block */
.signup {
    --form-error: color-mix(in srgb, var(--critical) 45%, var(--bg));
    display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, 1fr); gap: 1.5rem 3rem; align-items: center;
    background: var(--ink); color: var(--bg);
    padding: clamp(1.5rem, 4vw, 2.75rem); border-radius: var(--radius); margin-top: 3rem;
}
.signup .eyebrow { color: color-mix(in srgb, var(--bg) 60%, transparent); }
.signup h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.03em; margin-bottom: 0.5rem; font-variation-settings: "wdth" 90; }
.signup-copy p { color: color-mix(in srgb, var(--bg) 80%, transparent); font-size: 1rem; max-width: 50ch; margin: 0; }
.signup-points { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.95rem; color: color-mix(in srgb, var(--bg) 88%, transparent); }
.signup-points li { display: grid; grid-template-columns: 1.4em 1fr; }
.signup-points li::before { content: "\2192"; font-family: var(--font-mono); opacity: 0.6; }
.signup .signup-input { background: var(--bg); border-color: transparent; }
.signup-note { margin: 0.75rem 0 0; color: color-mix(in srgb, var(--bg) 62%, transparent); }
.signup-note a { color: var(--bg); }
.signup a:hover { color: inherit; text-decoration-thickness: 2px; }
.signup :focus-visible { outline-color: var(--bg); }
@media (max-width: 760px) { .signup { grid-template-columns: 1fr; } }

/* ---------- rail blocks ---------- */

.trust { border-top: 2px solid var(--rule-strong); padding-top: 0.8rem; font-size: 0.9rem; color: var(--ink-2); }
.trust-links a { color: var(--ink); }
.topics { border-top: 2px solid var(--rule-strong); padding-top: 0.8rem; }
.topics-list { display: flex; flex-wrap: wrap; gap: 6px; }
.topics-list .chip { padding: 6px 8px 5px; font-size: 0.72rem; }
.chip-count { color: var(--ink-3); margin-left: 0.3em; }

/* ---------- newsletter page ---------- */

.newsletter-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, 420px); gap: 2.5rem clamp(2rem, 6vw, 5rem); padding-block: 2.25rem 1rem; align-items: start; }
.newsletter-join { position: sticky; top: 1rem; }
.newsletter-join .hero-signup { background: var(--bg-raised); }
.newsletter-list { margin: 1rem 0 0; }
.newsletter-list > div { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: 0.25rem 1.5rem; padding: 0.95rem 0; border-top: 1px solid var(--rule); }
.newsletter-list dt { font-family: var(--font-head); font-weight: 650; font-size: 1.05rem; }
.newsletter-list dd { margin: 0; color: var(--ink-2); }
.newsletter-small { color: var(--ink-3); font-size: 0.88rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
@media (max-width: 900px) {
    .newsletter-grid { grid-template-columns: 1fr; }
    .newsletter-join { position: static; order: -1; }
}
@media (max-width: 560px) { .newsletter-list > div { grid-template-columns: 1fr; } }

.desk-more { display: inline-flex; align-items: center; gap: 0.3em; color: var(--ink-3); text-decoration: none; }
.desk-more:hover { color: var(--accent-text); }

/* ---------- cards ---------- */

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; padding-top: 1rem; }
.card-link { display: flex; flex-direction: column; gap: 0.5rem; text-decoration: none; }
.card-link:hover { color: inherit; }
.card-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 3px; background: var(--bg-sunken); }
.card-title { font-size: 1.05rem; line-height: 1.25; }
.card-link:hover .card-title { text-decoration: underline; }
.card-dek { color: var(--ink-2); font-size: 0.88rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- archive heads ---------- */

.archive-head { padding: 2.5rem 0 1.5rem; border-bottom: 1px solid var(--rule-strong); max-width: 760px; }
.archive-head-wide { max-width: none; }
/* a series archive carries its hue: a bar above the eyebrow (no --series, no bar) */
.archive-head[class*=" s-"] .eyebrow::before { content: ""; display: block; width: 3rem; height: 4px; margin-bottom: 0.9rem; background: var(--series, transparent); }
.archive-image { aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); margin-bottom: 1.25rem; }
.archive-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-bottom: 1rem; }
.archive-title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; letter-spacing: -0.03em; font-variation-settings: "wdth" 88; }
.archive-desc { font-size: 1.1rem; color: var(--ink-2); margin: 0.75rem 0 0; max-width: 60ch; }
.archive-meta { color: var(--ink-3); margin: 0.75rem 0 0; }
.error-wrap { padding-top: 3rem; }
.error-details { margin-top: 1rem; color: var(--ink-3); }

/* ---------- post ---------- */

.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 50; pointer-events: none; }
.progress-bar { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }

.post-head { padding-top: 1.75rem; }
/* standing pages (About, methodology, privacy): the summary is set off from the body */
.page .post-head { padding-top: 2.5rem; padding-bottom: 1.5rem; margin-bottom: 1.75rem; border-bottom: 1px solid var(--rule-strong); }
.crumbs { margin-bottom: 1.5rem; color: var(--ink-3); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.2rem 0; }
.crumbs li + li::before { content: "/"; margin-inline: 0.6em; color: var(--rule); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.post-verify { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.9rem 0 0; }
.post-verify:empty { display: none; }
.verify {
    display: inline-flex; align-items: center; gap: 0.45em;
    padding: 0.3em 0.7em; border: 1px solid var(--rule); border-radius: 999px;
    font-size: 0.72rem; text-decoration: none; color: var(--ink-2); background: var(--bg-raised);
    transition: border-color var(--ease), color var(--ease);
}
.verify:hover { border-color: var(--ink); color: var(--ink); }
.verify-source .icon-check, .verify-lab .icon-check { color: var(--low); }
.verify-lab { border-color: var(--low); }
.verify-opinion { border-color: var(--accent-text); color: var(--accent-text); }
.verify-scenario, .verify-corrected { border-color: var(--ink); color: var(--ink); }
.label-note { margin: 0 0 1.6rem; padding: 0.7rem 1rem; border: 1px solid var(--rule); border-left: 3px solid var(--ink); font-size: 0.95em; }
.label-note p { margin: 0; }
a.post-updated { text-decoration: none; }
a.post-updated[href]:hover { text-decoration: underline; }
.post-labels { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 1.1rem; }
.post-title {
    font-size: clamp(2.1rem, 5vw, 3.7rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.02;
    font-variation-settings: "wdth" 88; max-width: 22ch; text-wrap: balance;
}
.post-dek { font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.4; color: var(--ink-2); margin: 1.1rem 0 0; max-width: 58ch; text-wrap: pretty; }
.post-meta { display: flex; flex-wrap: wrap; gap: 0.4em; color: var(--ink-3); margin-top: 1.5rem; padding-top: 0.8rem; border-top: 1px solid var(--rule); }
.post-meta a { color: inherit; }
.post-updated[hidden] { display: none; }
.post-updated { color: var(--accent-text); }
.post-figure { margin: 2rem auto 0; }
.post-image { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; border-radius: var(--radius); background: var(--bg-sunken); }
.post-caption { color: var(--ink-3); margin-top: 0.5rem; }
.post-caption a { color: inherit; }

/* Body: a sticky tools rail beside a wide, large-type measure on desktop; one column below */
.post-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem 4rem; padding-top: 2rem; }
.post-main { min-width: 0; max-width: 800px; }
.post-rail { display: flex; flex-direction: column; gap: 1.5rem; }
.post-toc[hidden] { display: none; }
.post-toc summary { cursor: pointer; list-style: none; margin: 0; display: flex; align-items: center; gap: 0.5em; }
.post-toc summary::-webkit-details-marker { display: none; }
.post-toc summary::after { content: "+"; font-weight: 500; color: var(--ink-3); }
.post-toc[open] summary::after { content: "–"; }
.post-toc-list { counter-reset: toc; margin-top: 0.7rem; border-left: 1px solid var(--rule); display: flex; flex-direction: column; }
.post-toc-list li { counter-increment: toc; }
.post-toc-list a {
    display: grid; grid-template-columns: 2ch 1fr; gap: 0.6em;
    padding: 0.4em 0 0.4em 0.9em; margin-left: -1px; border-left: 2px solid transparent;
    color: var(--ink-2); text-decoration: none; line-height: 1.35; font-size: 0.8rem;
}
.post-toc-list a::before { content: counter(toc, decimal-leading-zero); color: var(--ink-3); font-weight: 500; }
.post-toc-list a:hover { color: var(--ink); }
.post-toc-list a.is-active { color: var(--ink); border-left-color: var(--accent); }
.post-toc-list a.is-active::before { color: var(--accent-text); }
.post-rail-share .eyebrow { margin-bottom: 0.5rem; }
.post-share-list { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; color: var(--ink-2); }
.post-share-list a, .post-share-list .link-button { color: inherit; text-decoration: none; }
.post-share-list a:hover, .post-share-list .link-button:hover { color: var(--accent-text); }
.post-rail-share { display: none; }

@media (min-width: 1080px) {
    .post-body { grid-template-columns: 200px minmax(0, 800px); column-gap: clamp(3rem, 6vw, 6rem); padding-top: 2.75rem; }
    .post-rail { position: sticky; top: 84px; align-self: start; padding-top: 0.35rem; }
    .post-rail-share { display: block; }
    .post-foot .post-share { display: none; }
    .post-toc summary::after { display: none; }
    .post-toc summary { pointer-events: none; }
}

.post-content { font-size: 1.125rem; line-height: 1.7; }
.post-content > :first-child { margin-top: 0 !important; padding-top: 0; border-top: 0; }
.post-content > p:first-child { font-size: 1.3rem; line-height: 1.5; font-weight: 450; letter-spacing: -0.005em; }
.post-foot { padding-top: 2rem; margin-top: 3rem; border-top: 1px solid var(--rule-strong); }
.post-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.post-tags .eyebrow { margin: 0 0.4rem 0 0; }
.post-share { color: var(--ink-3); margin-top: 1rem; }
.post-share a, .post-share .link-button { color: var(--ink); }

.related { padding-top: 3rem; }
@media print {
    .masthead, .site-footer, .post-rail, .signup, .related, .progress, .post-share, .comments { display: none !important; }
    .post-body { display: block; }
    body { background: #fff; color: #000; }
    .gh-content a::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #444; overflow-wrap: anywhere; }
}
.comments { padding-top: 3rem; }

/* ---------- content (posts render Ghost HTML cards) ---------- */

.gh-content { counter-reset: section; }
.gh-content > * + * { margin-top: 1.3em; }
.gh-content h2 {
    counter-increment: section;
    display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 0.75em;
    font-size: clamp(1.5rem, 2.2vw, 1.9rem); font-weight: 700; letter-spacing: -0.025em; line-height: 1.12;
    margin-top: 2.4em; padding-top: 1.1em; border-top: 1px solid var(--rule);
    font-variation-settings: "wdth" 92;
}
.gh-content h2::before {
    content: counter(section, decimal-leading-zero);
    font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em;
    color: var(--accent-text); transform: translateY(-0.15em);
}
.gh-content h3 { font-size: 1.3rem; font-weight: 650; margin-top: 2em; letter-spacing: -0.015em; }
.gh-content h2 + h3 { margin-top: 1.2em; }
.gh-content h4 { font-size: 0.82rem; margin-top: 1.8em; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-2); font-weight: 600; }
.gh-content h2 + p, .gh-content h3 + p, .gh-content h4 + p { margin-top: 0.8em; }
.gh-content p { margin: 1.3em 0 0; text-wrap: pretty; }  /* same as the sibling rule; beats it on specificity */
.gh-content a { color: var(--accent-text); text-decoration-thickness: 1px; }
.gh-content ul, .gh-content ol { padding-left: 1.5em; }
.gh-content ul { list-style: disc; }
.gh-content ol { list-style: decimal; }
.gh-content li + li { margin-top: 0.5em; }
.gh-content li::marker { color: var(--accent-text); font-weight: 600; }
.gh-content strong { font-weight: 650; }
.gh-content hr { border: 0; border-top: 1px solid var(--rule); margin: 3em 0 2em; }
.gh-content small { font-size: 0.85rem; color: var(--ink-2); line-height: 1.5; display: inline-block; }
.gh-content small strong { color: var(--ink); }
.gh-content blockquote {
    margin: 1.8em 0; padding: 0.3em 0 0.3em 1.4em;
    border-left: 4px solid var(--accent);
    font-family: var(--font-head); font-size: 1.35rem; line-height: 1.35; font-weight: 500; letter-spacing: -0.015em;
    color: var(--ink); font-variation-settings: "wdth" 94;
}
.gh-content blockquote p + p { margin-top: 0.6em; }
.gh-content blockquote cite, .gh-content blockquote small { display: block; margin-top: 0.6em; font-family: var(--font-mono); font-size: 0.78rem; font-style: normal; font-weight: 400; color: var(--ink-3); }
.gh-content code {
    font-family: var(--font-mono); font-size: 0.86em;
    background: var(--bg-sunken); border: 1px solid var(--rule); border-radius: 3px;
    padding: 0.1em 0.35em;
}
.gh-content pre {
    font-family: var(--font-mono); font-size: 0.86rem; line-height: 1.6;
    background: var(--bg-sunken); border: 1px solid var(--rule); border-left: 3px solid var(--rule-strong); border-radius: var(--radius);
    padding: 1.1em 1.3em; overflow-x: auto; margin-block: 1.6em;
}
.gh-content pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.gh-content table {
    width: 100%; border-collapse: collapse;
    font-size: 0.92rem; line-height: 1.45; font-variant-numeric: tabular-nums;
    display: block; overflow-x: auto; margin-block: 1.6em;
    background: var(--bg-raised); border: 1px solid var(--rule); border-radius: var(--radius);
}
.gh-content th, .gh-content td { text-align: left; padding: 0.7em 0.9em; border-bottom: 1px solid var(--rule); vertical-align: top; }
.gh-content tr:last-child td { border-bottom: 0; }
.gh-content th { font-family: var(--font-mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); background: var(--bg-sunken); border-bottom: 1px solid var(--rule-strong); }
.gh-content td:first-child { font-weight: 600; }
.gh-content td code { white-space: nowrap; }
.gh-content figure { margin: 2em 0; }
.gh-content figcaption { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-3); margin-top: 0.5em; }
.gh-content img { border-radius: var(--radius); }
.gh-content .kg-width-wide { max-width: 1000px; width: calc(100vw - 2 * var(--gutter)); margin-inline: calc(50% - 50vw + var(--gutter)); }
.gh-content .kg-width-full { width: 100vw; margin-inline: calc(50% - 50vw); }
.gh-content .kg-width-wide img, .gh-content .kg-width-full img { width: 100%; }
.gh-content .kg-bookmark-container { display: flex; color: inherit; text-decoration: none; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.gh-content .kg-bookmark-content { padding: 1em; flex: 1; }
.gh-content .kg-bookmark-title { font-weight: 600; }
.gh-content .kg-bookmark-description { color: var(--ink-2); font-size: 0.9rem; }
.gh-content .kg-bookmark-thumbnail img { height: 100%; width: 200px; object-fit: cover; border-radius: 0; }
.gh-content .kg-callout-card { display: flex; gap: 0.8em; padding: 1em 1.2em; border-radius: var(--radius); background: var(--bg-sunken); }
.gh-content .kg-button-card { display: flex; }
.gh-content .kg-btn { display: inline-block; padding: 0.6em 1em; background: var(--accent); color: var(--accent-ink); border-radius: var(--radius); text-decoration: none; }
.gh-content .kg-toggle-card { border: 1px solid var(--rule); border-radius: var(--radius); padding: 1em; }
.gh-content .kg-header-card { padding: 2em; text-align: center; }
.gh-content .kg-signup-card { padding: 2em; background: var(--ink); color: var(--bg); border-radius: var(--radius); }

/* Sources: grouped into one box by the script; plain heading + list without it */
.gh-content .post-sources {
    margin-top: 3em; padding: 1.2em 1.4em 1.3em;
    background: var(--bg-raised); border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: var(--radius);
}
.gh-content .post-sources h2 {
    display: block; margin: 0; padding: 0; border: 0;
    font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-2);
    counter-increment: none;
}
.gh-content .post-sources h2::before { content: none; }
.gh-content .post-sources ul, .gh-content .post-sources ol { margin-top: 0.8em; padding-left: 1.2em; font-size: 0.95rem; line-height: 1.5; }
.gh-content .post-sources a { overflow-wrap: anywhere; }

/* Code blocks: the script adds the bar (language, copy) */
.gh-content .code-block { margin-block: 1.6em; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: var(--bg-sunken); }
.gh-content .code-bar { display: flex; justify-content: space-between; align-items: center; padding: 0.45em 1em; border-bottom: 1px solid var(--rule); color: var(--ink-3); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.gh-content .code-bar .link-button { text-transform: none; letter-spacing: 0.02em; text-decoration: none; color: var(--ink-2); }
.gh-content .code-bar .link-button:hover { color: var(--accent-text); }
.gh-content .code-block pre { margin: 0; border: 0; border-radius: 0; }
.gh-content kbd { font-size: 0.82em; }
.gh-content .table-scroll { overflow-x: auto; margin-block: 1.6em; background: var(--bg-raised); border: 1px solid var(--rule); border-radius: var(--radius); }
.gh-content .table-scroll > table { display: table; margin: 0; border: 0; border-radius: 0; background: none; min-width: 100%; width: max-content; max-width: none; }
@media (min-width: 700px) { .gh-content .table-scroll > table { width: 100%; } }
.gh-content .table-scroll:focus-visible, .gh-content pre:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.gh-content tbody tr:hover td { background: var(--accent-soft); }
.gh-content mark { background: color-mix(in srgb, var(--medium) 30%, transparent); color: inherit; padding: 0 0.15em; }

/* The newsroom's small-print trailer (disclosure, sources, affiliate, credit): a boxed note */
.gh-content hr + p {
    padding: 1.1em 1.3em; background: var(--bg-sunken); border-radius: var(--radius);
    border-left: 3px solid var(--rule-strong);
}
.gh-content hr + p small { color: var(--ink-2); }
.gh-content hr + p + p { padding: 0 1.3em; }
.gh-content hr + p + p small { color: var(--ink-3); }

/* Members-only content teaser rendered by Ghost */
.gh-content .kg-cta-card { padding: 1.5em; border: 1px solid var(--rule); border-radius: var(--radius); }
.post-content .gh-post-upgrade-cta, .post-content .gh-post-upgrade-cta-content { background: var(--bg-raised); border: 1px solid var(--rule); padding: 1.5em; border-radius: var(--radius); margin-top: 2em; text-align: center; }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--rule-strong); background: var(--bg-raised); padding-top: 2.5rem; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 2rem; padding-bottom: 2rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand .brand-name { font-size: 1.4rem; text-decoration: none; display: inline-block; margin-bottom: 0.5rem; }
.footer-brand p { color: var(--ink-2); max-width: 44ch; }
.footer-note { font-size: 0.85rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.35rem; }
.footer-col a { text-decoration: none; color: var(--ink-2); }
.footer-col a:hover { color: var(--accent-text); text-decoration: underline; }
.footer-col .nav-secondary { margin-top: 0.35rem; }
.keys li { color: var(--ink-2); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; border-top: 1px solid var(--rule); padding-block: 1rem 1.5rem; color: var(--ink-3); }
.footer-bottom a { color: inherit; }

/* ---------- misc ---------- */

/* ---------- topics index ---------- */
.topics-all { margin: 0.8rem 0 0; }
.topic-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 2rem; padding-block: 1.5rem 2.5rem; }
.topic-index a { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; transition: border-color var(--ease), color var(--ease); }
.topic-index a:hover { border-bottom-color: var(--ink); color: var(--ink); }
.topic-name { font-family: var(--font-head); font-weight: 650; font-size: 1.05rem; }
.topic-count { color: var(--ink-3); white-space: nowrap; }
.wire-page + .signup, .series-page + .signup, .topic-index + .signup { margin-top: 2.5rem; }

/* ==========================================================================================
   Stage layout (theme 2.0): fixed top bar, left rail, bottom bar, numbered front-page sections.
   Shapes are square with one cut corner; labels are mono capitals; the lead card is always dark.
   ========================================================================================== */

:root {
    --bar: 44px;            /* top bar height */
    --foot: 36px;           /* bottom bar height */
    --rail: 0px;            /* left rail width (set on wide screens) */
    --cut: 14px;            /* size of the cut corner */
    --card: #0b0b0d;        /* the dark card, in both schemes */
    --card-ink: #f4f3ee;
    --card-ink-2: #b9b8b2;
    --text-scale: 1;
}
:root[data-text="s"] { --text-scale: 0.92; }
:root[data-text="l"] { --text-scale: 1.12; }
html { font-size: calc(100% * var(--text-scale)); scroll-padding-top: calc(var(--bar) + 16px); }
@media (min-width: 1200px) { :root { --rail: 44px; } }

.cut { clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%); }
.site { padding-top: var(--bar); padding-bottom: var(--foot); padding-left: var(--rail); }
.read-more { display: inline-flex; align-items: center; gap: 0.5em; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.read-more::after { content: ""; border: 4px solid transparent; border-left-color: currentColor; border-right: 0; transition: transform var(--ease); }
a:hover > .read-more::after, .read-more:hover::after, .lead-card:hover .read-more::after, .weekend-card:hover .read-more::after { transform: translateX(3px); }

/* kicker: the red label with its marker */
.kicker { display: inline-flex; align-items: center; gap: 0.5em; color: var(--series, var(--accent-text)); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.7rem; font-weight: 600; }
.kicker::before { content: ""; border: 3px solid transparent; border-left: 4px solid currentColor; border-right: 0; }
.kicker-breaking { color: var(--breaking); }
.tile-meta { color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.7rem; white-space: nowrap; }

/* bookmark toggle */
.bookmark { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; margin: -6px; padding: 0; background: none; border: 0; color: var(--ink-3); cursor: pointer; transition: color var(--ease), transform var(--ease); }
.bookmark:hover { color: var(--ink); }
.bookmark:active { transform: scale(0.9); }
.bookmark[aria-pressed="true"] { color: var(--accent-text); }
.bookmark[aria-pressed="true"] .icon-bookmark path { fill: currentColor; }

/* ---------- top bar ---------- */
.topbar {
    position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--bar);
    display: flex; align-items: center; gap: 1rem; padding: 0 10px;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
}
.topbar-logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; flex: none; }
.topbar-logo img { width: 28px; height: 28px; border-radius: 3px; }
.topbar-mark { display: grid; place-items: center; width: 28px; height: 28px; background: var(--accent); color: var(--accent-ink); font-family: var(--font-head); font-weight: 700; clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%); }
.topbar-name { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.topbar-nav > ul { display: flex; align-items: center; }
.topbar-nav > ul > li { position: relative; }
.topbar-nav > ul > li > a, .topbar-nav .nav-drop > summary {
    display: flex; align-items: center; gap: 0.35em; height: var(--bar); padding: 0 0.8rem;
    text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.7rem; font-weight: 600;
    text-decoration: none; border: 0; cursor: pointer; white-space: nowrap; transition: color var(--ease);
}
.topbar-nav > ul > li > a:hover, .topbar-nav .nav-drop > summary:hover, .topbar-nav .nav-drop[open] > summary { color: var(--accent-text); border: 0; }
.topbar-nav > ul > li > a[aria-current="page"] { color: var(--accent-text); }
.topbar-nav .icon-chevron { width: 10px; height: 10px; }
.topbar-nav .nav-drop-menu { top: calc(var(--bar) - 4px); border-radius: 0; border-color: var(--rule-strong); clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%); box-shadow: none; padding: 0.6rem; }
.mega { display: grid; grid-template-columns: 11rem minmax(16rem, 22rem); gap: 0 1.5rem; }
.mega-label { color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.6875rem; padding: 0.4rem 0.7rem 0.5rem; margin: 0; }
.mega-col a { text-transform: none; letter-spacing: 0; }
.mega-story { display: flex !important; flex-direction: column; align-items: flex-start !important; gap: 0.3rem !important; }
.mega-story-title { font-family: var(--font-head); font-weight: 650; font-size: 0.95rem; line-height: 1.2; }

.marquee { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.9rem; height: 100%; padding-inline: 1rem; border-inline: 1px solid var(--rule); }
.marquee-label { flex: none; display: inline-flex; align-items: center; gap: 0.6em; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.7rem; font-weight: 700; color: var(--ink-2); }
.marquee-label.is-breaking { color: var(--breaking); }
.marquee-dot { width: 7px; height: 7px; background: currentColor; }
.marquee-label.is-breaking .marquee-dot { animation: blink 1.6s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.marquee .ticker-track { flex: 1; min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 5%, #000 92%, transparent); }
.marquee .ticker-list { padding: 0; gap: 3rem; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.7rem; font-weight: 500; }
.marquee .ticker-list a { text-decoration: none; }

.topbar-tools { display: flex; align-items: center; gap: 6px; flex: none; margin-left: auto; }
.tool { position: relative; display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; background: var(--bg-raised); border: 1px solid var(--rule); border-radius: 3px; cursor: pointer; transition: border-color var(--ease), transform var(--ease), background-color var(--ease); }
.tool:hover { border-color: var(--ink); }
.tool:active { transform: scale(0.94); }
.tool svg { width: 15px; height: 15px; }
.tool-count { position: absolute; top: -5px; right: -5px; min-width: 15px; height: 15px; padding: 0 3px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 0.6rem; border-radius: 8px; }
.tool-count[hidden] { display: none; }
.topbar-cta { height: 30px; display: inline-flex; align-items: center; padding: 0 0.9rem; background: var(--ink); border-color: var(--ink); color: var(--bg); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.7rem; font-weight: 700; --cut: 9px; }
.topbar-cta:hover { color: var(--bg); filter: none; background: var(--accent); border-color: var(--accent); }
.topbar-menu { display: none; }

@media (max-width: 1100px) {
    .topbar-nav { display: none; }
    .topbar-menu { display: inline-grid; }
}
@media (max-width: 620px) {
    .marquee { visibility: hidden; padding: 0; border: 0; }
    .topbar-name { font-size: 1rem; }
    .topbar-cta { display: none; }
}

/* ---------- left rail (wide screens) ---------- */
.rail-left { display: none; }
@media (min-width: 1200px) {
    .rail-left {
        position: fixed; z-index: 50; inset: var(--bar) auto var(--foot) 0; width: var(--rail);
        display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 0;
        border-right: 1px solid var(--rule); color: var(--ink-3);
        text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.6875rem;
    }
    .rail-date, .rail-tag { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
    .rail-date { color: var(--ink-2); }
    .rail-tag { max-height: 40%; overflow: hidden; }
    .rail-track { flex: 1; width: 1px; background: var(--rule); position: relative; }
    .rail-track .rail-fill { position: absolute; inset: 0 0 auto 0; height: 100%; background: var(--accent); transform-origin: top; transform: scaleY(var(--progress, 0)); }
}

/* ---------- bottom bar ---------- */
.bottombar {
    position: fixed; inset: auto 0 0 0; z-index: 60; height: var(--foot);
    display: flex; align-items: center; gap: 12px; padding: 0 14px 0 calc(var(--rail) + 14px);
    background: var(--bg);
    border-top: 1px solid var(--rule); color: var(--ink-3);
    text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.6875rem;
}
.bar-step { background: none; border: 0; padding: 4px 6px; color: var(--ink-2); cursor: pointer; font-size: 0.8rem; line-height: 1; transition: color var(--ease), transform var(--ease); }
.bar-step:hover { color: var(--ink); }
.bar-step:active { transform: scale(0.9); }
.bar-step[disabled] { color: var(--rule); cursor: default; }
.bar-track { width: min(200px, 30vw); height: 1px; background: var(--rule); position: relative; }
.bar-fill { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(var(--progress, 0)); }
.bar-pct { min-width: 3.2em; }
.bar-section { margin-left: auto; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-index { color: var(--ink-2); white-space: nowrap; }
.site-footer { margin-bottom: 0; }

/* ---------- panels (native popovers) ---------- */
.panel {
    position: fixed; inset: calc(var(--bar) + 8px) 10px auto auto; margin: 0; width: min(380px, calc(100vw - 20px));
    max-height: calc(100dvh - var(--bar) - var(--foot) - 24px); overflow: auto;
    background: var(--bg-raised); color: var(--ink); border: 1px solid var(--rule-strong); padding: 0 1rem 1rem;
    transform-origin: top right;
    transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), overlay 180ms allow-discrete, display 180ms allow-discrete;
    opacity: 0; transform: translateY(-6px) scale(0.98);
}
.panel:popover-open { opacity: 1; transform: none; }
@starting-style { .panel:popover-open { opacity: 0; transform: translateY(-6px) scale(0.98); } }
.panel::backdrop { background: rgb(0 0 0 / 0.25); }
.panel-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 0.8rem 0; margin-bottom: 0.4rem; background: var(--bg-raised); border-bottom: 1px solid var(--rule); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.7rem; font-weight: 700; }
.panel-label { color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.6875rem; margin: 1.1rem 0 0.5rem; }
.panel-note, .panel-empty { color: var(--ink-3); font-size: 0.85rem; margin: 1rem 0 0; }
.panel-empty[hidden] { display: none; }
.panel-list li { display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 0.75rem; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
.panel-list a { font-family: var(--font-head); font-weight: 650; line-height: 1.2; text-decoration: none; }
.panel-list .tile-meta { grid-column: 1; }
.panel-list button { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.panel-clear { margin-top: 0.9rem; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; }
/* search panel */
.panel-search { width: min(560px, calc(100vw - 20px)); }
.search-form { margin: 0.6rem 0 0; }
.search-input { width: 100%; font: inherit; font-size: 1rem; padding: 0.7rem 0.8rem; color: var(--ink); background: var(--bg); border: 1px solid var(--rule-strong); border-radius: 0; }
.search-input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.search-results { list-style: none; margin: 0.6rem 0 0; padding: 0; }
.search-results li { border-bottom: 1px solid var(--rule); }
.search-hit { display: grid; gap: 0.25rem; padding: 0.75rem 0.4rem; text-decoration: none; }
.search-hit:hover, .search-hit:focus-visible { background: var(--bg); }
.search-kind { color: var(--accent-text); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.6875rem; }
.search-title { font-family: var(--font-head); font-weight: 650; line-height: 1.2; }
.search-ping { color: var(--ink-2); font-size: 0.86rem; line-height: 1.45; }
.search-foot { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.08em; }
@media (hover: none) { .search-foot { display: none; } }

/* My Tech Stack */
.stack-page section { margin: 0 0 2.6rem; }
.stack-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1.2rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--rule-strong); margin-bottom: 1rem; }
.stack-h { margin: 0; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; }
.stack-count { color: var(--ink-2); font-weight: 400; }
.stack-actions, .stack-controls { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; }
.stack-controls .segments { grid-auto-columns: auto; }
.stack-controls .segments button { padding: 0.55em 0.8em; min-height: 32px; }
.stack-note { color: var(--ink-2); font-size: 0.9rem; max-width: 80ch; margin: 0.6rem 0; }
.stack-filter { max-width: 34rem; margin-bottom: 1rem; }
.stack-group { border: 0; padding: 0; margin: 0 0 1.2rem; min-width: 0; }
.stack-group-title { padding: 0; font-family: var(--font-head); font-weight: 700; font-size: 1rem; margin-bottom: 0.5rem; }
.stack-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.stack-chip { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.7rem; min-height: 36px; border: 1px solid var(--rule-strong); cursor: pointer; font-size: 0.9rem; background: var(--bg-raised); }
.stack-chip input { accent-color: var(--accent); width: 1rem; height: 1rem; margin: 0; }
.stack-chip:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.stack-chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.stack-chip-meta { font-size: 0.6875rem; opacity: 0.75; }
.stack-versions { margin-top: 0.6rem; }
.stack-versions summary { cursor: pointer; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; padding: 0.4rem 0; }
.stack-version-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.6rem 1rem; }
.stack-version { display: grid; gap: 0.25rem; font-size: 0.85rem; }
.stack-list { list-style: none; margin: 0; padding: 0; }
.stack-item { padding: 0.9rem 0; border-bottom: 1px solid var(--rule); }
.stack-item-meta { display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; margin: 0 0 0.3rem; color: var(--ink-2); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.1em; }
.stack-kind { color: var(--accent-text); font-weight: 700; }
.stack-sev { font-weight: 700; color: var(--ink); }
.stack-item-title { font-size: 1.15rem; line-height: 1.2; margin: 0; }
.stack-item-title a { text-decoration: none; }
.stack-item-title a:hover { text-decoration: underline; }
.stack-item-ping { margin: 0.35rem 0 0; color: var(--ink-2); font-size: 0.93rem; line-height: 1.5; max-width: 85ch; }
.stack-alerts { margin: 1rem 0 1.6rem; }
.stack-alert { border: 1px solid var(--rule-strong); border-left: 3px solid var(--ink-3); padding: 0.9rem 1rem; margin: 0 0 0.8rem; background: var(--bg-raised); }
.stack-alert.sev-edge-critical { border-left-color: var(--critical, #c62828); }
.stack-alert.sev-edge-high { border-left-color: var(--high, #d9730d); }
.stack-alert-title { font-size: 1.05rem; margin: 0 0 0.6rem; }
.stack-alert-facts { margin: 0; display: grid; gap: 0.3rem; font-size: 0.9rem; }
.stack-alert-facts > div { display: grid; grid-template-columns: 7rem 1fr; gap: 0.6rem; }
.stack-alert-facts dt { color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.6875rem; padding-top: 0.2rem; }
.stack-alert-facts dd { margin: 0; overflow-wrap: anywhere; }
.stack-apply { margin: 0.7rem 0 0; padding-top: 0.6rem; border-top: 1px solid var(--rule); font-size: 0.88rem; color: var(--ink-2); }
.stack-apply-likely_affected { color: var(--ink); font-weight: 600; }
.stack-digest-form { display: grid; gap: 0.7rem; max-width: 34rem; }
.stack-consent { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.9rem; }
.stack-consent input { margin-top: 0.25rem; accent-color: var(--accent); }
.stack-home-empty { max-width: 75ch; color: var(--ink-2); }
.stack-home-empty[hidden] { display: none; }
.stack-actions .link-button { min-height: 28px; padding: 0.3rem 0; }
@media (max-width: 700px) {
    .stack-alert-facts > div { grid-template-columns: 1fr; gap: 0; }
    .stack-controls { width: 100%; }
    .stack-controls .segments { width: 100%; grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); }
    .stack-controls .segments button { border-top: 1px solid var(--rule); margin-top: -1px; }
    .stack-controls [data-stack-sorts] { grid-template-columns: repeat(2, 1fr); }
}

.segments { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--rule-strong); }
.segments button { padding: 0.6em 0.5em; background: none; border: 0; border-left: 1px solid var(--rule); cursor: pointer; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.7rem; transition: background-color var(--ease), color var(--ease); }
.segments button:first-child { border-left: 0; }
.segments button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.panel-menu { inset: 0 0 0 auto; width: min(420px, 100vw); max-height: none; height: 100dvh; border-width: 0 0 0 1px; transform-origin: right center; transform: translateX(16px); }
.panel-menu:popover-open { transform: none; }
@starting-style { .panel-menu:popover-open { transform: translateX(16px); } }
.menu-list a { display: flex; align-items: center; gap: 0.6em; padding: 0.5rem 0; font-family: var(--font-head); font-weight: 650; font-size: 1.15rem; text-decoration: none; border-bottom: 1px solid var(--rule); }
.menu-series a { font-size: 1rem; }
.panel-cta { display: flex; justify-content: center; margin: 1.5rem 0 0.8rem; padding: 0.9em; background: var(--ink); border-color: var(--ink); color: var(--bg); }

/* ---------- stage ---------- */
.stage { counter-reset: stage; padding-inline: clamp(14px, 2vw, 28px); max-width: 1680px; margin-inline: auto; }
.stage-section { padding-block: clamp(2rem, 5vw, 4rem); border-top: 1px solid var(--rule); }
.stage-section:first-child { border-top: 0; padding-top: 20px; }
.stage-head { display: flex; align-items: baseline; gap: 0.9rem; margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.7rem; }
.stage-head::before { counter-increment: stage; content: counter(stage, decimal-leading-zero); color: var(--ink-3); }
.stage-section:first-child { counter-increment: stage; }
.stage-title { font: inherit; font-weight: 700; letter-spacing: inherit; }
.stage-more { margin-left: auto; color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; gap: 0.5em; }
.stage-more::after { content: ""; border: 3px solid transparent; border-left: 4px solid currentColor; border-right: 0; }
.stage-num { display: none; }

/* featured */
.featured-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: stretch; }
/* The tiles share the lead card's height as equal rows separated by rules: any spare height
   sits inside a row, above its meta line, never as an empty band between articles. */
.featured-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 0 clamp(1.25rem, 2.5vw, 2rem); align-content: stretch; }
.featured-tiles .tile { padding-block: 1rem; border-top: 1px solid var(--rule); }
.featured-tiles .tile:nth-child(-n + 2) { border-top: 0; padding-top: 0; }
.featured-tiles .tile-title { font-size: 1.12rem; }
.featured-tiles .tile-dek { -webkit-line-clamp: 4; }
/* the lead photo takes whatever height the four rows give the card: no spare black below */
.s-featured .lead-card-media { flex: 1 1 auto; min-height: 260px; }
.lead-card { --cut: 26px; display: flex; flex-direction: column; background: var(--card); color: var(--card-ink); padding: clamp(14px, 2.2vw, 30px); clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%); position: relative; }
.lead-card::before, .lead-card::after { content: ""; position: absolute; width: 8px; height: 8px; border: 1px solid var(--card-ink); opacity: 0.8; }
.lead-card::before { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.lead-card::after { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.lead-card-media { display: block; flex: 1; min-height: 240px; overflow: hidden; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%); }
.lead-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .lead-card:hover .lead-card-media img, .weekend-card:hover .weekend-media img { transform: scale(1.02); } }
.lead-card-body { padding-top: 1.25rem; }
.lead-card-top { display: flex; align-items: center; gap: 0.9rem; }
.lead-card-top .tile-meta { color: var(--card-ink-2); }
.lead-card-top .bookmark { margin-left: auto; color: var(--card-ink-2); }
.lead-card-top .bookmark:hover, .lead-card .bookmark[aria-pressed="true"] { color: var(--card-ink); }
.lead-card .kicker { color: color-mix(in srgb, var(--series, var(--accent)) 60%, #fff); }
.lead-card-title { font-size: clamp(1.6rem, 2.8vw, 2.4rem); font-weight: 700; letter-spacing: -0.01em; line-height: 1.08; margin: 0.6rem 0 0.7rem; text-wrap: balance; }
.lead-card-title a, .weekend-title a { color: inherit; text-decoration: none; }
.lead-card-title a::after, .tile-title a::after, .desk-hero-title a::after, .photo-tile-title a::after, .weekend-title a::after { content: ""; position: absolute; inset: 0; }
.lead-card-dek { color: var(--card-ink-2); max-width: 62ch; margin: 0; }
.lead-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.4rem; padding-right: var(--cut); color: var(--card-ink-2); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.7rem; }
.lead-card-foot .read-more { color: var(--card-ink); }
.lead-card .bookmark, .tile .bookmark, .desk-hero .bookmark { position: relative; z-index: 2; }

.tile { position: relative; display: flex; gap: 1rem; }
.tile-body { display: flex; flex-direction: column; gap: 0.55rem; min-width: 0; flex: 1; }
.tile-title { font-size: 1.2rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.005em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.tile-title a { text-decoration: none; }
.tile:hover .tile-title, .desk-hero:hover .desk-hero-title, .photo-tile:hover .photo-tile-title a { color: var(--accent-text); }
.tile-dek { color: var(--ink-2); font-size: 0.92rem; line-height: 1.45; margin: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; padding-top: 0.3rem; }
.tile-thumb { flex: none; width: 84px; height: 84px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%); }
.tile-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* patch watch */
.live-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.live-list { border-left: 1px solid var(--rule-strong); }
.live-item { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 1rem; padding: 0 0 1.4rem 1.25rem; }
.live-item::before { content: ""; position: absolute; left: -4px; top: 5px; width: 7px; height: 7px; background: var(--accent); }
.live-time { grid-column: 1 / -1; color: var(--accent-text); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.7rem; }
.live-title { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; line-height: 1.2; text-decoration: none; }
.live-item .chip { align-self: start; }
.brief-card { --cut: 20px; display: flex; flex-direction: column; gap: 0.6rem; padding: 1.4rem; background: var(--card); color: var(--card-ink); text-decoration: none; }
.brief-card:hover { color: var(--card-ink); }
.brief-card .kicker { color: color-mix(in srgb, var(--accent) 60%, #fff); }
.brief-card-title { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; line-height: 1.15; }
.brief-card-dek { color: var(--card-ink-2); font-size: 0.92rem; }
.brief-card .read-more { margin-top: 0.6rem; }

/* the wire, two columns */
.wire-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(1.5rem, 4vw, 3.5rem); }
.wire-cols .wire-day { grid-column: 1 / -1; }

/* desks */
.desk-lead-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); }
.desk-hero { position: relative; display: flex; flex-direction: column; gap: 0.7rem; }
.desk-hero-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; margin-bottom: 0.5rem; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%); }
.desk-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.desk-hero-title { font-size: clamp(1.5rem, 2.6vw, 2.2rem); font-weight: 700; line-height: 1.08; text-wrap: balance; }
.desk-hero-title a, .photo-tile-title a { text-decoration: none; }
.desk-hero-dek { color: var(--ink-2); max-width: 62ch; margin: 0; }
.desk-side { display: flex; flex-direction: column; }
.desk-side .tile { padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.desk-side .tile:first-child { border-top: 0; padding-top: 0; }
.desk-side-wide { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 3rem; }
.desk-grid-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); }
.desk-grid-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem clamp(1rem, 2vw, 1.5rem); align-content: start; }
.photo-tile { position: relative; display: flex; flex-direction: column; gap: 0.5rem; }
.photo-tile-media { display: block; aspect-ratio: 3 / 2; overflow: hidden; margin-bottom: 0.3rem; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%); }
.photo-tile-media img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile-title { font-size: 1.1rem; font-weight: 700; line-height: 1.15; }
.ledger-row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto; gap: 0.5rem 1.5rem; align-items: baseline; padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.ledger-row:first-child { border-top: 0; padding-top: 0; }
.ledger-time { display: flex; flex-direction: column; }
.ledger-clock { font-family: var(--font-head); font-weight: 700; font-size: 1.7rem; line-height: 1; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.ledger-date { color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.6875rem; margin-top: 0.35rem; }
.ledger-title { font-size: 1.25rem; font-weight: 700; line-height: 1.15; }
.ledger-title a { text-decoration: none; }
.ledger-dek { color: var(--ink-2); font-size: 0.92rem; margin: 0.35rem 0 0; max-width: 85ch; }

/* opinion, weekend */
.quote-card { --cut: 26px; display: flex; flex-direction: column; gap: 1rem; padding: clamp(1.5rem, 4vw, 3rem); background: var(--card); color: var(--card-ink); text-decoration: none; }
.quote-card:hover { color: var(--card-ink); }
.quote-mark { font-family: var(--font-head); font-size: 4rem; line-height: 0.6; color: var(--accent); }
.quote-text { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 2.1rem); line-height: 1.15; max-width: 40ch; text-wrap: balance; }
.quote-by { color: var(--card-ink-2); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.7rem; }
.opinion-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; margin-top: 2rem; }
.weekend-card { --cut: 26px; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(1.25rem, 3vw, 2.5rem); padding: clamp(14px, 2.2vw, 30px); background: var(--card); color: var(--card-ink); }
.weekend-copy { display: flex; flex-direction: column; gap: 0.8rem; }
.weekend-card .kicker { color: color-mix(in srgb, var(--series, var(--accent)) 60%, #fff); }
.weekend-title { font-size: clamp(1.7rem, 3vw, 2.6rem); font-weight: 700; line-height: 1.05; text-wrap: balance; }
.weekend-dek { color: var(--card-ink-2); margin: 0; }
.weekend-copy .lead-card-foot { margin-top: auto; padding-right: 0; }
.weekend-media { display: block; overflow: hidden; min-height: 260px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%); }
.weekend-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease-out); }

/* ranked list (series) */
.ranked { counter-reset: rank; }
.ranked-row { counter-increment: rank; border-top: 1px solid var(--rule); }
.ranked-row:first-child { border-top: 0; }
.ranked-row a { display: grid; grid-template-columns: 3.5rem minmax(10rem, 20rem) minmax(0, 1fr) auto; gap: 0.25rem 1.5rem; align-items: baseline; padding: 1rem 0; text-decoration: none; }
.ranked-row a::before { content: counter(rank, decimal-leading-zero); font-family: var(--font-head); font-weight: 700; font-size: 1.7rem; line-height: 1; color: var(--series, var(--accent-text)); }
.ranked-name { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; line-height: 1.15; }
.ranked-desc { color: var(--ink-2); font-size: 0.92rem; }
.ranked-row a:hover .ranked-name { color: var(--series, var(--accent-text)); }

/* what we cover */
.cover-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.cover-title { font-family: var(--font-head); font-weight: 700; font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1; letter-spacing: -0.02em; text-transform: uppercase; margin: 0 0 1rem; text-wrap: balance; }
.cover-text { color: var(--ink-2); font-size: 1.1rem; max-width: 56ch; margin-bottom: 2rem; }
.s-inbox .signup { margin: 0; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%); border-radius: 0; }

@media (max-width: 900px) {
    .featured-grid, .live-grid, .desk-lead-grid, .desk-grid-grid, .weekend-card, .cover-grid { grid-template-columns: 1fr; }
    .wire-cols { grid-template-columns: 1fr; }
    .weekend-media { order: -1; min-height: 200px; }
    .ranked-row a { grid-template-columns: 3rem 1fr auto; }
    .ranked-desc { grid-column: 2 / -1; grid-row: 2; }
    .ledger-row { grid-template-columns: 5.5rem 1fr; }
    .ledger-row > .tile-meta { display: none; }
    .bar-track { display: none; }
}
@media (max-width: 520px) {
    .featured-tiles, .desk-grid-tiles { grid-template-columns: 1fr; }
    .featured-tiles { grid-auto-rows: auto; }
    .featured-tiles .tile:nth-child(2) { border-top: 1px solid var(--rule); padding-top: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .panel, .panel-menu { transition: opacity 150ms ease; transform: none; }
    .lead-card-media img, .weekend-media img { transition: none; }
    .marquee-label.is-breaking .marquee-dot { animation: none; }
}

/* ---------- article (stage layout) ---------- */
.article, .article-wide { padding-inline: clamp(14px, 2vw, 28px); max-width: 1680px; margin-inline: auto; }
.article { counter-reset: stage; }
.article .stage-section:first-child { counter-increment: none; }
.article-head { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr); gap: clamp(1.5rem, 4.5vw, 4rem); align-items: start; padding-top: 28px !important; }
.article-head-plain { grid-template-columns: minmax(0, 1fr); max-width: 980px; margin-inline: auto; }
.article-media { margin: 0; }
.article-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-sunken); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%); }
.article-caption { color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.6875rem; margin-top: 0.6rem; }
.article-caption a { color: inherit; }
.article-intro { min-width: 0; }
.article .crumbs { margin: 0 0 1rem; }
.article .crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6em; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.7rem; font-weight: 600; }
.article .crumbs li:first-child { display: none; }
.article .crumbs li::before { content: none; }
.article .crumbs li + li + li::before { content: ""; display: inline-block; width: 3px; height: 3px; background: currentColor; margin-right: 0.6em; vertical-align: middle; }
.article .crumbs li:nth-child(2)::before { content: ""; display: inline-block; border: 3px solid transparent; border-left: 4px solid var(--accent); border-right: 0; margin-right: 0.5em; }
.article .crumbs a { text-decoration: none; color: var(--ink); }
.article .crumbs a:hover { color: var(--accent-text); }
/* our headlines run long (they name the product and the action), so the scale stops lower than a
   two-word magazine title would */
.article-title { font-size: clamp(2rem, 3.9vw, 3.5rem); font-weight: 700; line-height: 1.02; letter-spacing: -0.015em; text-wrap: balance; }
.article-dek { font-size: clamp(1.05rem, 1.4vw, 1.25rem); line-height: 1.5; color: var(--ink); margin: 1.4rem 0 0; max-width: 68ch; text-wrap: pretty; }
/* Short Ping: the article's summary. A ruled block with an accent edge; no box, no motion. */
.short-ping { margin: 1.4rem 0 0; padding: 0.15rem 0 0.2rem 1rem; border-left: 3px solid var(--accent); max-width: 68ch; }
.short-ping-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 1.5rem; }
.short-ping-label { margin: 0; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent-text); }
.short-ping-copy { appearance: none; background: none; border: 1px solid var(--rule); color: var(--ink-2); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.1em; padding: 0.3rem 0.6rem; min-height: 24px; cursor: pointer; }
.short-ping-copy:hover, .short-ping-copy:focus-visible { color: var(--ink); border-color: var(--ink); }
.short-ping-text { margin: 0.45rem 0 0; font-size: clamp(1.02rem, 1.3vw, 1.15rem); line-height: 1.5; color: var(--ink); text-wrap: pretty; }
:root[data-leading="relaxed"] .short-ping-text { line-height: 1.7; }
@media print { .short-ping-copy { display: none; } }
.article-author { display: flex; align-items: center; gap: 0.8rem; margin-top: 1.4rem; }
.article-avatar { flex: none; width: 40px; height: 40px; object-fit: cover; clip-path: polygon(0 0, 100% 0, 100% 75%, 75% 100%, 0 100%); }
.article-avatar-mark { display: grid; place-items: center; background: var(--ink); color: var(--bg); }
.article-author-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.article-author-name { font-family: var(--font-head); font-weight: 700; text-decoration: none; }
.article-author-bio { color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.6875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem 0.9rem; margin-top: 1.4rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.7rem; }
.article-meta-line { flex: 1; min-width: 2rem; height: 1px; background: var(--rule); }
.article-meta .bookmark { width: 30px; height: 30px; margin: 0; background: var(--bg-raised); border: 1px solid var(--rule); border-radius: 3px; color: var(--ink); }
.article-meta .bookmark:hover { border-color: var(--ink); }
.article-meta .tool.is-done { border-color: var(--low); color: var(--low); }
.article .post-verify { margin-top: 1.1rem; }
.article-products { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 0.8rem; }
.article-products:empty { display: none; }

.article-body { border-top: 0 !important; padding-top: clamp(1.5rem, 4vw, 3.5rem) !important; }
.article-body .post-toc { display: none; }
.article-content { max-width: 800px; margin-inline: auto; font-size: 1.0625rem; line-height: 1.65; }
.article-content > p:first-child { font-size: inherit; line-height: inherit; font-weight: inherit; letter-spacing: 0; }
.article-content > p:first-of-type::first-letter { float: left; font-family: var(--font-head); font-weight: 700; font-size: 3.6em; line-height: 0.82; padding: 0.06em 0.12em 0 0; }
.article-content h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; letter-spacing: -0.01em; margin-top: 2.2em; padding-top: 0; border-top: 0; }
.article-content h2::before { content: none; }
.article-content blockquote { border-left: 3px solid var(--ink); padding: 0.2em 0 0.2em 1em; margin-inline: 0; font-weight: 500; }
.article-content img, .article-content figure img { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%); border-radius: 0; }
.article-content figcaption { font-family: var(--font-mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.6875rem; text-align: left; }
.article-content hr + p { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%); border-radius: 0; border-left: 0; }

.article-foot { max-width: none; }
.hash-tags { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.7rem; font-weight: 600; margin-bottom: 2rem; }
.hash-tags a { color: var(--accent-text); text-decoration: none; }
.hash-tags a:hover { color: var(--ink); }
.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem clamp(1.5rem, 4vw, 3.5rem); }
.post-nav-item { display: grid; grid-template-columns: auto 1fr; gap: 0.2rem 1rem; align-content: start; text-decoration: none; }
.post-nav-label { grid-column: 1 / -1; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.6875rem; margin-bottom: 0.5rem; }
.post-nav-item img { grid-row: 2 / span 2; width: 56px; height: 56px; object-fit: cover; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%); }
.post-nav-title { grid-column: 2; font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.post-nav-dek { grid-column: 2; color: var(--ink-2); font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-nav-item:hover .post-nav-title { color: var(--accent-text); }
.article-foot .post-share { margin-top: 2rem; }
.comments-box { max-width: 800px; margin-inline: auto; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem clamp(1.25rem, 3vw, 2.5rem); }
.related .photo-tile-media { aspect-ratio: 16 / 9; }
.related .tile-foot { justify-content: flex-start; margin: 0; padding: 0; }
.related .tile-foot .bookmark { margin-left: auto; position: relative; z-index: 2; }
.related .photo-tile-title { font-size: 1.25rem; }
.bar-heading { position: absolute; left: 50%; transform: translateX(-50%); color: var(--ink-2); max-width: 36vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-heading[hidden] { display: none; }

@media (max-width: 900px) {
    .article-head, .post-nav { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bar-heading { display: none; }
}
@media (max-width: 520px) { .related-grid { grid-template-columns: 1fr; } }
@media print {
    .topbar, .rail-left, .bottombar, .panel, .article-foot, .article-wide, .article-meta .tool, .bookmark { display: none !important; }
    .site { padding: 0; }
}

/* ---------- reader settings: width, line spacing, shortcuts ---------- */
:root[data-width="narrow"] .article-content, :root[data-width="narrow"] .comments-box, :root[data-width="narrow"] .page .gh-content { max-width: 640px; }
:root[data-leading="relaxed"] .gh-content { line-height: 1.95; }
:root[data-leading="relaxed"] .tile-dek, :root[data-leading="relaxed"] .article-dek { line-height: 1.7; }
.keys-list { margin: 0; display: grid; gap: 0.45rem; font-size: 0.72rem; color: var(--ink-2); }
.keys-list > div { display: grid; grid-template-columns: 5.5rem 1fr; align-items: center; }
.keys-list dt, .keys-list dd { margin: 0; }
.panel-row-reading { display: none; }
@media (min-width: 1000px) and (min-height: 560px) { .panel-row-reading { display: block; } }


/* image zoom */
.article-content img.is-zoomable { cursor: zoom-in; }
.lightbox { padding: 0; border: 0; background: none; max-width: 96vw; max-height: 94dvh; cursor: zoom-out; }
.lightbox img { max-width: 96vw; max-height: 94dvh; object-fit: contain; }
.lightbox::backdrop { background: rgb(0 0 0 / 0.88); }
.lightbox[open] { animation: lightbox-in 180ms var(--ease-out); }
@keyframes lightbox-in { from { opacity: 0; transform: scale(0.97); } }


/* ---------- columns reading mode (wide screens): the page is a row of full-height columns ---------- */
@media (min-width: 1000px) and (min-height: 560px) {
    :root[data-reading="columns"] { overflow: hidden; }
    :root[data-reading="columns"] body { overflow: hidden; height: 100dvh; }
    :root[data-reading="columns"] .site {
        display: flex; flex-direction: row; height: 100dvh; overflow-x: auto; overflow-y: hidden;
        overscroll-behavior: none; scrollbar-width: none; scroll-padding-left: var(--rail);
    }
    :root[data-reading="columns"] .site::-webkit-scrollbar { display: none; }
    :root[data-reading="columns"] .site-main,
    :root[data-reading="columns"] .stage,
    :root[data-reading="columns"] .article { display: contents; }
    :root[data-reading="columns"] .stage-section,
    :root[data-reading="columns"] .site-main > :not(.stage):not(.article):not(.visually-hidden),
    :root[data-reading="columns"] .site-footer {
        flex: 0 0 auto; width: calc(100vw - var(--rail)); height: 100%; max-width: none; margin: 0;
        overflow-x: hidden; overflow-y: auto; scrollbar-width: thin;
        padding: 22px clamp(18px, 2.4vw, 34px); border-top: 0; border-left: 1px solid var(--rule);
    }
    :root[data-reading="columns"] .stage-section:first-child { border-left: 0; }
    :root[data-reading="columns"] .visually-hidden { position: fixed; top: 0; left: 0; }
    :root[data-reading="columns"] .site-footer { width: min(960px, calc(100vw - var(--rail))); }

    /* section titles turn into a vertical strip on the column's left edge */
    :root[data-reading="columns"] .stage-section:has(> .stage-head) { position: relative; padding-left: 4rem; }
    :root[data-reading="columns"] .stage-section > .stage-head {
        position: absolute; inset: 22px auto 22px 1.25rem; width: 1.2rem; margin: 0;
        writing-mode: vertical-rl; transform: rotate(180deg); align-items: center; white-space: nowrap;
    }
    :root[data-reading="columns"] .stage-section > .stage-head .stage-more { margin-left: 0; margin-top: auto; }

    /* sections that are one composition fill the column's height */
    :root[data-reading="columns"] .s-featured .featured-grid,
    :root[data-reading="columns"] .desk-grid .desk-grid-grid,
    :root[data-reading="columns"] .s-weekend .weekend-card,
    :root[data-reading="columns"] .s-opinion .quote-card { min-height: 100%; }
    :root[data-reading="columns"] .s-weekend .weekend-card, :root[data-reading="columns"] .s-opinion .quote-card { justify-content: center; }
    :root[data-reading="columns"] .article-head { align-content: center; padding-top: 22px !important; }
    :root[data-reading="columns"] .s-inbox { display: flex; flex-direction: column; justify-content: center; }
    :root[data-reading="columns"] .ranked-row a { grid-template-columns: 3.5rem minmax(10rem, 18rem) minmax(0, 1fr) auto; }

    /* the article body flows across as many text columns as it needs (width set by the script) */
    :root[data-reading="columns"] .article-body { overflow: hidden; padding-top: 22px !important; }
    :root[data-reading="columns"] .article-content {
        max-width: none; margin: 0; height: 100%; width: 34rem;
        column-width: 34rem; column-gap: 3.5rem; column-fill: auto; column-rule: 1px solid var(--rule);
    }
    :root[data-reading="columns"][data-width="narrow"] .article-content { width: 26rem; column-width: 26rem; }
    :root[data-reading="columns"] .article-content > * { break-inside: avoid-column; }
    :root[data-reading="columns"] .article-content > p, :root[data-reading="columns"] .article-content > ul, :root[data-reading="columns"] .article-content > ol { break-inside: auto; orphans: 3; widows: 3; }
    :root[data-reading="columns"] .article-content h2 { break-after: avoid-column; margin-top: 1.4em; }
    :root[data-reading="columns"] .article-content img { max-height: 60dvh; width: 100%; object-fit: cover; }
    :root[data-reading="columns"] .related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
    .lightbox[open] { animation: none; }
}

/* ==========================================================================================
   Motion: hover only. A headline breaks for a moment, a photo tears into bands under
   scanlines, a nav label re-tunes; and one page-change effect between pages. Nothing animates
   on load or on scroll: the page is simply there (entrance and scroll-reveal effects were
   removed in 2.5 because they made the site feel slow). data-motion on <html>: "glitch" or "none"; readers
   who ask for reduced motion always get "none" (set before first paint in default.hbs).
   ========================================================================================== */

@keyframes text-break {
    0%   { transform: translateX(0); text-shadow: none; clip-path: inset(0 0 0 0); }
    20%  { transform: translateX(-3px); text-shadow: 3px 0 0 var(--glitch-a), -3px 0 0 var(--glitch-b); clip-path: inset(0 0 45% 0); }
    40%  { transform: translateX(3px); text-shadow: -2px 0 0 var(--glitch-a), 2px 0 0 var(--glitch-b); clip-path: inset(30% 0 0 0); }
    60%  { transform: translateX(-1px); text-shadow: 1px 0 0 var(--glitch-a); clip-path: inset(0 0 0 0); }
    80%  { transform: translateX(1px); text-shadow: none; }
    100% { transform: none; text-shadow: none; clip-path: none; }
}
@keyframes text-break-flat {
    0%   { margin-left: 0; text-shadow: none; opacity: 1; }
    20%  { margin-left: -3px; text-shadow: 3px 0 0 var(--glitch-a), -3px 0 0 var(--glitch-b); opacity: 0.85; }
    40%  { margin-left: 3px; text-shadow: -2px 0 0 var(--glitch-a), 2px 0 0 var(--glitch-b); opacity: 1; }
    60%  { margin-left: -1px; text-shadow: 1px 0 0 var(--glitch-a); }
    80%  { margin-left: 1px; text-shadow: none; }
    100% { margin-left: 0; text-shadow: none; }
}
@keyframes glitch-band-a {
    0%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
    4%  { clip-path: inset(18% 0 62% 0); transform: translateX(-9px); }
    8%  { clip-path: inset(22% 0 60% 0); transform: translateX(6px); }
    12% { clip-path: inset(0 0 100% 0); }
    52% { clip-path: inset(0 0 100% 0); }
    55% { clip-path: inset(70% 0 12% 0); transform: translateX(8px); }
    59% { clip-path: inset(0 0 100% 0); }
}
@keyframes glitch-band-b {
    0%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
    22% { clip-path: inset(0 0 100% 0); }
    25% { clip-path: inset(48% 0 34% 0); transform: translateX(10px); }
    29% { clip-path: inset(52% 0 30% 0); transform: translateX(-5px); }
    33% { clip-path: inset(0 0 100% 0); }
    78% { clip-path: inset(6% 0 84% 0); transform: translateX(-7px); }
    82% { clip-path: inset(0 0 100% 0); }
}
@keyframes glitch-bar { from { transform: translateY(-100%); } to { transform: translateY(650%); } }

:root { --glitch-a: var(--accent); --glitch-b: #19d3da; }

/* ---- 2. hover (pointer devices only: a tap would leave it stuck) ---- */
@media (hover: hover) and (pointer: fine) {
    /* Card headlines carry the card-wide link (a::after). A transform, filter or clip on the
       headline would shrink that link to the headline while the effect plays, so these break
       with a colour split and a nudge only. */
    :root[data-motion="glitch"] .tile:hover .tile-title,
    :root[data-motion="glitch"] .lead-card:hover .lead-card-title,
    :root[data-motion="glitch"] .desk-hero:hover .desk-hero-title,
    :root[data-motion="glitch"] .photo-tile:hover .photo-tile-title,
    :root[data-motion="glitch"] .weekend-card:hover .weekend-title { animation: text-break-flat 300ms step-end 1; }
    :root[data-motion="glitch"] .ledger-row:hover .ledger-title,
    :root[data-motion="glitch"] .live-item:hover .live-title,
    :root[data-motion="glitch"] .wire-link:hover .wire-title,
    :root[data-motion="glitch"] .ranked-row a:hover .ranked-name,
    :root[data-motion="glitch"] .post-nav-item:hover .post-nav-title,
    :root[data-motion="glitch"] .mega-story:hover .mega-story-title,
    :root[data-motion="glitch"] .brief-card:hover .brief-card-title,
    :root[data-motion="glitch"] .topic-index a:hover .topic-name,
    :root[data-motion="glitch"] .menu-list a:hover,
    :root[data-motion="glitch"] .topbar-cta:hover,
    :root[data-motion="glitch"] .read-more:hover { animation: text-break 300ms step-end 1; }

    /* photo: two bands of the same picture slip sideways under scanlines while a bar sweeps down */
    .glitch { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; opacity: 0; }
    .glitch i, .glitch b { position: absolute; inset: 0; }
    .glitch i { background: var(--glitch-img) center / cover no-repeat; clip-path: inset(0 0 100% 0); }
    .glitch b { background: repeating-linear-gradient(180deg, transparent 0 2px, rgb(0 0 0 / 0.16) 2px 3px); }
    .glitch b::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 16%; background: linear-gradient(180deg, transparent, rgb(255 255 255 / 0.16) 50%, transparent); transform: translateY(-100%); }
    :root[data-motion="glitch"] :is(.lead-card, .desk-hero, .photo-tile, .tile, .weekend-card, .post-nav-item):hover .glitch,
    :root[data-motion="glitch"] .article-media:hover .glitch { opacity: 1; }
    :root[data-motion="glitch"] :is(.lead-card, .desk-hero, .photo-tile, .tile, .weekend-card, .article-media):hover .glitch i:nth-child(1) { animation: glitch-band-a 2.6s step-end infinite; }
    :root[data-motion="glitch"] :is(.lead-card, .desk-hero, .photo-tile, .tile, .weekend-card, .article-media):hover .glitch i:nth-child(2) { animation: glitch-band-b 3.1s step-end -1.4s infinite; }
    :root[data-motion="glitch"] :is(.lead-card, .desk-hero, .photo-tile, .tile, .weekend-card, .article-media):hover .glitch b::after { animation: glitch-bar 2.4s linear infinite; }
}
.lead-card-media, .desk-hero-media, .photo-tile-media, .tile-thumb, .weekend-media, .article-media { position: relative; }
.article-media { overflow: hidden; }
.article-media .glitch { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 30px), calc(100% - 30px) 100%, 0 100%); bottom: auto; aspect-ratio: 16 / 9; }


/* ---- page change: the bars stay put, the old page drops out in scanlines, the new one locks in.
   The only non-hover motion left; it plays between pages, never while reading or scrolling. ---- */
@keyframes glitch-out {
    0%   { opacity: 1; transform: none; filter: none; mask-image: none; }
    25%  { transform: translateX(4px); filter: saturate(0.4); mask-image: repeating-linear-gradient(180deg, #000 0 3px, transparent 3px 4px); }
    50%  { transform: translateX(-4px); filter: saturate(0); mask-image: repeating-linear-gradient(180deg, #000 0 1px, transparent 1px 2px); }
    75%  { transform: translateX(2px); opacity: 0.7; filter: saturate(0); mask-image: repeating-linear-gradient(180deg, #000 0 1px, transparent 1px 4px); }
    100% { opacity: 0; mask-image: repeating-linear-gradient(180deg, #000 0 1px, transparent 1px 4px); }
}
@keyframes signal-in {
    0%   { opacity: 0; transform: translateX(-6px); clip-path: inset(0 0 70% 0); }
    25%  { opacity: 0.7; transform: translateX(4px); clip-path: inset(35% 0 20% 0); }
    45%  { opacity: 0.4; transform: translateX(-2px); clip-path: inset(0 0 0 0); }
    65%  { opacity: 1; transform: translateX(1px); }
    100% { opacity: 1; transform: none; clip-path: none; }
}
@view-transition { navigation: auto; }
.topbar { view-transition-name: chrome-top; }
.rail-left { view-transition-name: chrome-rail; }
.bottombar { view-transition-name: chrome-bottom; }
::view-transition-group(chrome-top), ::view-transition-group(chrome-rail), ::view-transition-group(chrome-bottom),
::view-transition-new(chrome-top), ::view-transition-new(chrome-rail), ::view-transition-new(chrome-bottom) { animation: none; }
::view-transition-old(chrome-top), ::view-transition-old(chrome-rail), ::view-transition-old(chrome-bottom) { display: none; }
::view-transition { background: var(--bg); }
::view-transition-old(root) { animation: glitch-out 220ms step-end forwards; }
::view-transition-new(root) { animation: signal-in 300ms step-end 120ms backwards; }
:root[data-motion="none"]::view-transition-old(root), :root[data-motion="none"]::view-transition-new(root) { animation: none; }
@media (prefers-reduced-motion: reduce) {
    ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* the menu hangs directly off the bar so the pointer can travel into it without a gap */
.topbar-nav .nav-drop-menu { top: var(--bar); }
.topbar-nav .nav-drop-menu::before { content: ""; position: absolute; inset: -8px 0 auto 0; height: 8px; }

/* ---- nav hover: the label re-tunes (letters scramble and settle, script), an accent bar draws
   in under it, and menu rows take an accent edge ---- */
.topbar-nav > ul > li > a, .topbar-nav .nav-drop > summary { position: relative; }
.topbar-nav > ul > li > a::after, .topbar-nav .nav-drop > summary::after {
    content: ""; position: absolute; left: 0.8rem; right: 0.8rem; bottom: 9px; height: 2px;
    background: var(--accent); transform: scaleX(0); transform-origin: left;
    transition: transform 180ms var(--ease-out);
}
.topbar-nav > ul > li > a[aria-current="page"]::after, .topbar-nav .nav-drop[open] > summary::after { transform: scaleX(1); }
.topbar-nav .nav-drop-menu a { position: relative; transition: color var(--ease), background-color var(--ease), padding-left var(--ease); }
.topbar-nav .nav-drop-menu a::before { content: ""; position: absolute; left: 0; top: 20%; bottom: 20%; width: 2px; background: var(--accent); transform: scaleY(0); transition: transform 160ms var(--ease-out); }
.topbar-nav .nav-drop-menu a:focus-visible::before { transform: scaleY(1); }
[data-scramble] { display: inline-block; white-space: pre; }
@media (hover: hover) and (pointer: fine) {
    .topbar-nav > ul > li > a:hover::after, .topbar-nav .nav-drop > summary:hover::after { transform: scaleX(1); }
    .topbar-nav .nav-drop-menu a:hover { color: var(--accent-text); padding-left: 1rem; }
    .topbar-nav .nav-drop-menu a:hover::before { transform: scaleY(1); }
    .topbar-nav .icon-chevron { transition: transform var(--ease); }
    .topbar-nav .nav-drop > summary:hover .icon-chevron { transform: translateY(2px); }
    .topbar-nav .nav-drop[open] > summary:hover .icon-chevron { transform: rotate(180deg) translateY(2px); }
    .tool:hover svg { animation: tool-nudge 240ms step-end 1; }
}
@keyframes tool-nudge { 0% { transform: translate(1px, -1px); } 35% { transform: translate(-1px, 1px); } 70% { transform: translate(1px, 0); } 100% { transform: none; } }
:root[data-motion="none"] .tool:hover svg { animation: none; }
@media (prefers-reduced-motion: reduce) {
    .topbar-nav > ul > li > a::after, .topbar-nav .nav-drop > summary::after, .topbar-nav .nav-drop-menu a::before { transition: none; }
    .topbar-nav .nav-drop-menu a:hover { padding-left: 0.7rem; }
    .tool:hover svg { animation: none; }
}

/* the article's own top progress line is replaced by the bottom bar */
.progress { display: none; }
.post-meta .bookmark { margin-left: 0.4rem; vertical-align: middle; }

/* topics page: one group per coverage area */
.topic-group { padding-block: 2rem 0.5rem; border-top: 1px solid var(--rule); }
.topic-group:first-of-type { border-top: 0; }
.topic-group-head { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 0.4rem 2.5rem; align-items: baseline; }
.topic-group-title { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 700; letter-spacing: -0.01em; }
.topic-group-blurb { color: var(--ink-2); margin: 0; max-width: 70ch; }
.topic-group .topic-index { padding-block: 1rem 0.5rem; }
.topic-watching { color: var(--ink-2); font-size: 0.92rem; line-height: 1.7; margin: 0.8rem 0 1.2rem; max-width: 110ch; }
.topic-watching .mono { display: inline-block; margin-right: 0.7em; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.6875rem; }
@media (max-width: 800px) { .topic-group-head { grid-template-columns: 1fr; } }

/* ---------- interaction polish ---------- */

/* Press feedback: anything that acts like a button gives way slightly under the pointer. */
.icon-button, .filter-list a, .verify, .chip-product, .code-bar .link-button, .pagination a {
    transition: border-color var(--ease), color var(--ease), background-color var(--ease), transform var(--ease);
}
.button:active, .icon-button:active, .filter-list a:active, .verify:active, .chip-product:active,
.code-bar .link-button:active, .pagination a:active { transform: scale(0.97); }

/* The Series menu opens from its trigger (top left), quickly, and only when the browser can
   do it as an interruptible transition; elsewhere it simply appears. */
.nav-drop-menu { transform-origin: top left; transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out); }
@starting-style { .nav-drop[open] > .nav-drop-menu { opacity: 0; transform: translateY(-4px) scale(0.97); } }

/* A featured photo answers the pointer; the frame stays put. Pointer devices only: a tap
   would leave the hover state stuck on a touch screen. */
.lead-image, .secondary-image { transition: filter 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
    .lead-link:hover .lead-image, .secondary-link:hover .secondary-image { filter: brightness(1.06) contrast(1.02); }
}
@media (hover: none) {
    .series-card:hover { box-shadow: none; border-color: var(--rule); border-top-color: var(--series, var(--rule-strong)); }
    .button:hover { filter: none; }
}

/* Times, dates and counts line up and do not jitter. */
.mono, .meta, time { font-variant-numeric: tabular-nums; }

/* Reduced motion: keep colour and opacity changes (they explain state), drop movement. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
    .button:active, .icon-button:active, .filter-list a:active, .verify:active, .chip-product:active,
    .code-bar .link-button:active, .pagination a:active { transform: none; }
    .nav-drop-menu { transition: opacity 150ms ease; }
    .icon-chevron { transition: none; }
}
@media (prefers-reduced-motion: reduce) {
    @starting-style { .nav-drop[open] > .nav-drop-menu { transform: none; } }
}

::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }


/* ==== 2.11.0: frontend audit fixes ==================================================== */
/* Labels were 9.9-10.9px; nothing on the site is now smaller than 11px (sizes above). */

/* Touch targets: at least 24x24 CSS px (WCAG 2.2 AA 2.5.8) */
.bar-step { min-width: 28px; min-height: 28px; }
.stage-more, .read-more { min-height: 24px; }
.chip { min-height: 24px; }
.stack-groups input[type="checkbox"], .stack-digest-form input[type="checkbox"] { width: 20px; height: 20px; }
.stack-groups label { min-height: 28px; }

/* Article header: the byline note wraps instead of being cut off; the share and save buttons
   stay together and the time keeps its width when the script shows the reader's own zone, so
   nothing below moves (was a 0.11 layout shift on phones). */
.article-author-bio { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.5; }
.article-tools { display: inline-flex; align-items: center; gap: 0.4rem; flex: none; }
.article-meta time[data-time-long] { min-width: 27ch; }
@media (max-width: 480px) {
    .article-meta { gap: 0.4rem 0.6rem; }
    .article-meta-line { display: none; }
    .article-tools { margin-left: auto; }
    .article-meta time[data-time-long] { min-width: 0; flex: 1 1 100%; order: 3; min-height: 1.4em; }
}

/* Lead card on phones: the corner mark no longer sits on the byline */
@media (max-width: 640px) {
    .lead-card::after { display: none; }
    .lead-card-foot { padding-right: calc(var(--cut) + 4px); }
}

/* My Tech Stack: while the product list loads, hold a screen's height so the feed and the
   form below do not jump when it arrives (was a 0.43 layout shift). */
.stack-groups:has([data-stack-loading]) { min-height: 100vh; }

/* 2.11.1: a long bare address (a status-page link in the corrections log) wraps on phones */
.article-content a, .page-content a, .post-content a, .corrections a, .sources a { overflow-wrap: anywhere; }
.site-main { overflow-wrap: break-word; }

/* ==========================================================================================
   2.12.0: columns mode as one continuous strip. Each front-page section is as wide as its
   content needs (a timeline is narrow, a lead with tiles is wide) and fills the height of
   the screen, so nothing is cut off at the bottom and there are no empty full-screen pages.
   ========================================================================================== */
.rail-left { background: var(--bg); }
@media (min-width: 1000px) and (min-height: 560px) {
    :root[data-reading="columns"] .stage > .stage-section {
        width: var(--col-w, 760px); max-width: calc(100vw - var(--rail) - 24px);
        margin-left: clamp(20px, 3.5vw, 64px);
    }
    :root[data-reading="columns"] .stage > .stage-section:first-child { margin-left: 0; }
    :root[data-reading="columns"] .stage > .s-featured { --col-w: calc(100vw - var(--rail) - 24px); overflow: hidden; }
    :root[data-reading="columns"] .stage > .s-live { --col-w: 470px; }
    :root[data-reading="columns"] .stage > .desk-ledger { --col-w: 700px; }
    :root[data-reading="columns"] .stage > .s-wire { --col-w: 540px; }
    :root[data-reading="columns"] .stage > .desk-lead { --col-w: 1080px; }
    :root[data-reading="columns"] .stage > .desk-lead:has(> .desk-side-wide) { --col-w: 960px; }
    :root[data-reading="columns"] .stage > .desk-grid { --col-w: 1180px; }
    :root[data-reading="columns"] .stage > .s-opinion { --col-w: 1040px; }
    :root[data-reading="columns"] .stage > .s-weekend { --col-w: 1100px; }
    :root[data-reading="columns"] .stage > .s-series { --col-w: 920px; }
    :root[data-reading="columns"] .stage > .s-cover { --col-w: 1140px; }
    :root[data-reading="columns"] .stage > .s-stack { --col-w: 640px; }
    :root[data-reading="columns"] .stage > .s-inbox { --col-w: 980px; }

    /* featured: the lead card and the tiles share exactly the height of the screen */
    :root[data-reading="columns"] .s-featured .featured-grid { height: 100%; min-height: 0; grid-template-rows: minmax(0, 1fr); }
    :root[data-reading="columns"] .s-featured .lead-card { min-height: 0; }
    :root[data-reading="columns"] .s-featured .lead-card-media { flex: 1 1 0; min-height: 0; }
    :root[data-reading="columns"] .s-featured .lead-card-body { flex: none; }
    :root[data-reading="columns"] .s-featured .lead-card-title { font-size: clamp(1.5rem, 2.4vw, 2.2rem); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
    :root[data-reading="columns"] .s-featured .lead-card-dek { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
    :root[data-reading="columns"] .s-featured .featured-tiles { min-height: 0; grid-template-rows: repeat(3, minmax(0, 1fr)); grid-auto-rows: 0; }
    :root[data-reading="columns"] .s-featured .featured-tiles .tile { min-height: 0; overflow: hidden; padding-block: 0.85rem; }
    :root[data-reading="columns"] .s-featured .featured-tiles .tile:nth-child(n + 7) { display: none; }
    :root[data-reading="columns"] .s-featured .featured-tiles .tile-dek { -webkit-line-clamp: 2; }

    /* patch watch: the timeline on top, the daily brief at the foot of the column */
    :root[data-reading="columns"] .s-live .live-grid { display: flex; flex-direction: column; gap: 1.5rem; min-height: 100%; }
    :root[data-reading="columns"] .s-live .brief-card { margin-top: auto; padding: 1.1rem 1.2rem; gap: 0.45rem; }
    :root[data-reading="columns"] .s-live .brief-card-title { font-size: 1.15rem; }
    :root[data-reading="columns"] .s-live .brief-card-dek { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
    :root[data-reading="columns"] .s-live .brief-card .read-more { margin-top: 0.3rem; }
    :root[data-reading="columns"] .s-live .live-title { font-size: 1.05rem; }
    :root[data-reading="columns"] .s-live .live-item { padding-bottom: 1.1rem; }

    /* ledgers: the rows share the column's height */
    :root[data-reading="columns"] .desk-ledger .ledger { display: flex; flex-direction: column; height: 100%; }
    :root[data-reading="columns"] .desk-ledger .ledger-row { flex: 1 1 0; min-height: 0; overflow: hidden; grid-template-columns: 6rem minmax(0, 1fr) auto; align-content: start; }
    :root[data-reading="columns"] .desk-ledger .ledger-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
    :root[data-reading="columns"] .s-opinion { display: flex; flex-direction: column; }
    :root[data-reading="columns"] .s-opinion .quote-card { flex: 1 1 auto; min-height: 0; }
    :root[data-reading="columns"] .s-opinion .opinion-more:not(:has(*)) { display: none; }
    :root[data-reading="columns"] .desk-ledger .ledger-dek { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }

    /* the wire: one column that scrolls on its own, fading out at the foot */
    :root[data-reading="columns"] .s-wire .wire-cols { grid-template-columns: minmax(0, 1fr); }
    :root[data-reading="columns"] .s-wire { mask-image: linear-gradient(#000 calc(100% - 48px), transparent); }

    /* desks: the hero photo takes the spare height; side tiles share the column */
    :root[data-reading="columns"] .desk-lead .desk-lead-grid { height: 100%; grid-template-rows: minmax(0, 1fr); }
    :root[data-reading="columns"] .desk-lead .desk-hero { min-height: 0; }
    :root[data-reading="columns"] .desk-lead .desk-hero-media { flex: 1 1 0; min-height: 0; aspect-ratio: auto; }
    :root[data-reading="columns"] .desk-lead .desk-hero-dek { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
    :root[data-reading="columns"] .desk-lead .desk-side { min-height: 0; }
    :root[data-reading="columns"] .desk-lead .desk-side .tile { flex: 1 1 0; min-height: 0; overflow: hidden; }
    :root[data-reading="columns"] .desk-lead .desk-side-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; align-content: start; gap: 0 2.5rem; }
    :root[data-reading="columns"] .desk-lead .desk-side-wide .tile { flex: none; overflow: visible; padding-block: 1.5rem; }
    :root[data-reading="columns"] .desk-lead .desk-side-wide .tile:nth-child(-n + 2) { padding-top: 0; }
    :root[data-reading="columns"] .desk-lead .desk-side-wide .tile-thumb { width: 120px; height: 120px; }
    :root[data-reading="columns"] .desk-lead .desk-side-wide .tile:nth-child(2) { border-top: 0; padding-top: 0; }
    :root[data-reading="columns"] .desk-grid .desk-grid-grid { height: 100%; min-height: 0; grid-template-rows: minmax(0, 1fr); }
    :root[data-reading="columns"] .desk-grid .lead-card { min-height: 0; }
    :root[data-reading="columns"] .desk-grid .lead-card-media { flex: 1 1 0; min-height: 0; }
    :root[data-reading="columns"] .desk-grid .lead-card-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
    :root[data-reading="columns"] .desk-grid .lead-card-dek { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
    :root[data-reading="columns"] .desk-grid .desk-grid-tiles { min-height: 0; grid-template-rows: repeat(2, minmax(0, 1fr)); align-content: stretch; }
    :root[data-reading="columns"] .desk-grid .photo-tile { min-height: 0; }
    :root[data-reading="columns"] .desk-grid .photo-tile-media { flex: 1 1 0; min-height: 0; aspect-ratio: auto; }
    :root[data-reading="columns"] .desk-grid .photo-tile-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; flex: none; }

    :root[data-reading="columns"] .s-cover .cover-title { font-size: clamp(1.8rem, 3.4vw, 3rem); }
}
/* tall screens have room for a fourth row of featured tiles */
@media (min-width: 1000px) and (min-height: 1000px) {
    :root[data-reading="columns"] .s-featured .featured-tiles { grid-template-rows: repeat(4, minmax(0, 1fr)); }
    :root[data-reading="columns"] .s-featured .featured-tiles .tile:nth-child(n + 7) { display: flex; }
}
/* short screens: headlines only */
@media (min-width: 1000px) and (min-height: 560px) and (max-height: 760px) {
    :root[data-reading="columns"] .s-featured .featured-tiles .tile-dek,
    :root[data-reading="columns"] .s-featured .lead-card-dek { display: none; }
    :root[data-reading="columns"] .s-featured .featured-tiles .tile-title { -webkit-line-clamp: 2; }
}

/* phones: tighter cards, and the breaking ticker gets its own row under the top bar */
@media (max-width: 620px) {
    .topbar .marquee.mono {
        visibility: visible; position: absolute; inset: 100% 0 auto 0; height: 30px; padding: 0 14px;
        background: var(--bg); border: 0; border-bottom: 1px solid var(--rule);
    }
    :root:has(.topbar .marquee.mono) .site { padding-top: calc(var(--bar) + 30px); }
    :root:has(.topbar .marquee.mono) { scroll-padding-top: calc(var(--bar) + 46px); }
    .lead-card-dek { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
    .featured-tiles .tile-dek { -webkit-line-clamp: 2; }
    .featured-tiles .tile { padding-block: 1.1rem; }
}

/* ---- Monetization: the sponsor slot and advert positions (theme 2.14) ------------------- */
/* Sponsor: one labelled line of text. Quiet on purpose: it sits above the article. */
.sponsor-slot {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin: 0 0 1.5rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--line, currentColor);
    border-radius: 6px;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--ink-2);
}
.sponsor-label, .ad-label {
    flex: none;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.sponsor-text p { margin: 0; }
.sponsor-text a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.s-wire .sponsor-slot { margin: 0 0 1rem; }
/* on an article the slot is as wide as the text below it (the columns layout keeps it full width) */
.article-body > .sponsor-slot { max-width: 800px; margin-inline: auto; }
:root[data-width="narrow"] .article-body > .sponsor-slot { max-width: 640px; }
@media (min-width: 900px) {
    /* columns layout: the text is exactly one screen tall, so the slot above it takes its
       height out of the text's instead of pushing the last lines off the page */
    :root[data-reading="columns"] .article-body:has(> .sponsor-slot) { display: flex; flex-direction: column; }
    :root[data-reading="columns"] .article-body > .sponsor-slot { flex: none; align-self: flex-start; max-width: min(60rem, 90vw); margin: 0 0 1.25rem; }
    :root[data-reading="columns"] .article-body:has(> .sponsor-slot) > .article-content { flex: 1 1 0; min-height: 0; height: auto; }
}
.article-content .ad-slot { break-inside: avoid; }
/* Adverts: hidden until dispatch.js gives the position an ad unit; the height is reserved
   then, so the text below does not jump when the advert arrives. */
.ad-slot[hidden] { display: none; }
.ad-slot {
    display: block;
    margin: 2rem auto;
    max-width: 100%;
    min-height: 280px;
    text-align: center;
    overflow: hidden;
}
.ad-slot .ad-label { display: block; margin-bottom: 0.4rem; }
.ad-slot ins { display: block; }
@media print { .ad-slot, .sponsor-slot { display: none !important; } }
