/* =============================================================================
   BLOG 2026 — one stylesheet for the whole blog family:
   /blog, the six hubs (/blog/{all,basics,compare,guides,playbooks,research})
   and every post. Replaces blog-post.css, the inline <style> blocks in
   blog.html / the hub pages, and the dark-era inline <style> every post used
   to ship. If a rule belongs to the blog, it lives HERE, in cascade order:

     1 tokens → 2 base → 3 chrome (tag, chip, buttons, nav, footer, progress)
     → 4 index components → 5 post components → 6 responsive → 7 reduced motion

   No importance overrides, no `body .x` specificity hacks (they existed to
   beat the inline templates, which are gone). Nothing renders under 12px: every mono
   label is --t-mono (0.75rem), every sans meta --t-small (0.8125rem).

   Design language: the homepage's report, continued — light forensic paper,
   ink type in Schibsted Grotesk 700-800, JetBrains Mono as the data voice,
   one ultramarine accent doing all the conversion work, hairlines instead of
   boxes wherever a box is not a card. The three dark components (.cover,
   .code, .post-cta, plus .callout--verdict) each set their own ground.
   Token names mirror home-2026.css so the two sheets can merge later.
   ========================================================================== */

/* ── 1. Tokens ──────────────────────────────────────────────────────────── */
:root {
    /* surfaces + ink */
    --paper: #f6f7f3;            /* page ground, index and post */
    --surface: #ffffff;          /* cards, code header, inputs */
    --ink: #161c15;              /* headings, strong, card titles */
    --mark: #101410;             /* logo square, nav hover ink, "current" pill fill */
    --text: #3d453e;             /* body copy */
    --text-dim: #5c665e;         /* meta, captions, excerpts */
    --hairline: rgba(22, 28, 21, 0.10);
    --hairline-soft: rgba(22, 28, 21, 0.06);

    /* accent */
    --accent: #2733d9;
    --accent-deep: #1f2abf;      /* links, hover, accent text on light */
    --accent-wash: #edefff;      /* tinted fills (callout note, inline code bg) */
    --accent-line: rgba(39, 51, 217, 0.28);
    --accent-peri: #9daef7;      /* accent text on dark surfaces only */

    /* the self-consistent dark components (each sets its own bg) */
    --tile: #0d120d;             /* cover art tile */
    --code-bg: #141813;          /* code blocks, end CTA card, verdict callout */
    --code-fg: #e6e8e3;

    /* semantic, never used as accent */
    --ok: #15803d;
    --warn: #b45309;
    --danger: #dc2626;

    --sans: 'Schibsted Grotesk', -apple-system, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 18px;
    --r-pill: 999px;
    --el-1: 0 1px 2px rgba(18, 24, 18, 0.05), 0 1px 3px rgba(18, 24, 18, 0.03);
    --el-2: 0 2px 4px rgba(18, 24, 18, 0.04), 0 10px 26px -8px rgba(18, 24, 18, 0.10);
    --el-3: 0 4px 10px rgba(18, 24, 18, 0.05), 0 26px 60px -18px rgba(18, 24, 18, 0.18);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);

    /* layout */
    --shell: 1140px;             /* same as the pill nav */
    --gutter: clamp(16px, 4vw, 28px);
    --measure: 700px;            /* post column: ~74 characters at 17px */
    --rail: 232px;               /* TOC rail at >= 1180px */
    --nav-h: 60px;

    /* type floor: nothing renders under 12px */
    --t-mono: 0.75rem;           /* 12px — every mono label */
    --t-small: 0.8125rem;        /* 13px — meta, captions */
    --t-body: 1.0625rem;         /* 17px desktop body */
}

/* ── 2. Base ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; background: var(--paper); color-scheme: light; }

/* Belt for §6.1: clip, not hidden, so sticky/position still work and no
   scroll container is created. The real fix is overflow-wrap in the post
   body; this only stops a decorative layer from ever widening the page. */
html, body { overflow-x: clip; }

body {
    font-family: var(--sans);
    background: var(--paper);
    color: var(--text);
    font-size: 1rem;
    line-height: 1.65;
    min-height: 100vh;
    display: flex; flex-direction: column;   /* sticky footer */
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
body > nav { width: 100%; }
body > main { flex: 1 0 auto; width: 100%; }

::selection { background: rgba(39, 51, 217, 0.14); color: var(--ink); }

img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--accent-deep); }
button { font: inherit; color: inherit; }
input, textarea { font: inherit; }

/* Accessibility atoms — a11y.css carries the same skip-link/focus rules
   site-wide; these keep the family whole if it is ever loaded alone. */
.skip-link {
    position: absolute; top: -40px; left: 0; z-index: 10001;
    transform: translateY(-100%);
    background: var(--ink); color: #fff;
    padding: 10px 18px;
    font-family: var(--mono); font-size: var(--t-mono); font-weight: 600;
    letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
    transition: transform 0.15s;
}
.skip-link:focus { transform: translateY(48px); outline: none; }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

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

/* The 1140 shell every index block and the post's related/newsletter use. */
.bl-shell { max-width: var(--shell); margin: 0 auto; padding: 0 var(--gutter); width: 100%; }

/* ── 3. Chrome ──────────────────────────────────────────────────────────── */

/* Specimen tag: the mono evidence label every section head and every block
   label (TOC, key takeaways, FAQ, related, newsletter) leads with. Sits ON a
   full-width hairline (.bl-rule) like a tab on a report divider. */
.bl-tag {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--mono); font-size: var(--t-mono); font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--text-dim);
}
.bl-tag::before {
    content: ''; width: 8px; height: 8px; flex-shrink: 0;
    border: 2px solid var(--accent);
}
.bl-tag--bare::before { display: none; }
/* Carries real content (article count, update date, the RSS link), so it gets
   the same readable grey as the tag — the spec's rgba(22,28,21,.35) measured
   2.2:1 on --paper, under the 4.5:1 AA floor for 12px text (review 2026-09-01). */
.bl-tag-meta {
    margin-left: auto; color: var(--text-dim);
    letter-spacing: 0.1em; font-weight: 500; white-space: nowrap;
}
.bl-tag-meta a { color: inherit; text-decoration: none; }
.bl-tag-meta a:hover { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }

.bl-rule { border: 0; border-top: 1px solid var(--hairline); margin: 0 0 18px; }

/* Read link: "Read the article", "Open the scanner" — the arrow is CSS so the
   generator writes plain text and every arrow moves the same way. */
.readlink {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--sans); font-size: 0.9rem; font-weight: 700;
    color: var(--accent-deep); text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.15s;
}
.readlink::after { content: '\2192'; transition: transform 0.2s var(--ease); }
.readlink:hover { border-bottom-color: var(--accent-line); }
.readlink:hover::after { transform: translateX(6px); }

/* Avatar: a round photo, or the initials mark until the owner supplies one. */
.avatar {
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0; border-radius: 50%; overflow: hidden;
    width: 22px; height: 22px; object-fit: cover;
    background: var(--mark);
}
.avatar--22 { width: 22px; height: 22px; }
.avatar--40 { width: 40px; height: 40px; }
.avatar--64 { width: 64px; height: 64px; }
.avatar--initials {
    color: #fff; background: var(--mark);
    font-family: var(--mono); font-weight: 600; letter-spacing: 0.04em;
    font-size: var(--t-mono); line-height: 1; text-transform: uppercase;
}
.avatar--40.avatar--initials { font-size: var(--t-small); }
.avatar--64.avatar--initials { font-size: 1.1rem; }

/* 3px dot separator in meta rows. */
.dot {
    display: inline-block; width: 3px; height: 3px; border-radius: 50%;
    background: currentColor; opacity: 0.6; vertical-align: middle; flex-shrink: 0;
}

/* Section chip: one style for all five sections — no per-category colours.
   Always a real link (/blog/<section>), never a button. */
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 36px; padding: 0 12px;
    border: 1px solid var(--hairline); border-radius: var(--r-pill);
    font-family: var(--mono); font-size: var(--t-mono); font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase; line-height: 1;
    color: var(--ink); background: var(--surface); text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.chip:hover { border-color: rgba(22, 28, 21, 0.3); }
.chip--current { background: var(--mark); color: #fff; border-color: var(--mark); }
.chip--current:hover { border-color: var(--mark); }
.chip-n { opacity: 0.55; font-weight: 500; letter-spacing: 0.04em; }
.chip--current .chip-n { opacity: 0.7; }
/* Inside cover art: periwinkle on the tile's own ground. */
.chip--on-tile {
    min-height: 26px; padding: 0 9px;
    color: var(--accent-peri); border-color: rgba(157, 174, 247, 0.5);
    background: rgba(10, 14, 10, 0.6);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.chip--on-tile:hover { border-color: rgba(157, 174, 247, 0.8); }

/* Buttons. Plain labels ("Get started free", "Read the docs"); no square
   brackets anywhere in the family. */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 22px;
    font-family: var(--sans); font-size: 0.95rem; font-weight: 650;
    letter-spacing: -0.01em; text-decoration: none; line-height: 1.2;
    border-radius: var(--r-md); border: 1px solid transparent;
    cursor: pointer; white-space: nowrap; background: transparent; color: inherit;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease,
                transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn svg { flex-shrink: 0; }
.btn--primary { background: var(--accent); color: #fff; box-shadow: var(--el-1); }
.btn--primary:hover { background: var(--accent-deep); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 26px -8px rgba(39, 51, 217, 0.45); }
.btn--primary:active { transform: translateY(0); }
.btn--ghost { background: transparent; color: var(--ink); border-color: rgba(22, 28, 21, 0.22); }
.btn--ghost:hover { border-color: var(--ink); background: rgba(22, 28, 21, 0.03); }
.btn--ghost-on-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.btn--ghost-on-dark:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); color: #fff; }
.btn--small { min-height: 38px; padding: 0 18px; font-size: 0.86rem; border-radius: 10px; }
.btn[disabled], .btn:disabled { opacity: 0.6; cursor: default; transform: none; }

/* Nav — the site-wide floating pill (light-page.css / home-2026.css values):
   1140px pill, 60px tall, 14px off the top, sentence-case links, ink logo
   square, blue CTA. */
nav.site-nav {
    position: sticky; top: 14px; z-index: 100;
    max-width: 1140px; margin: 14px auto 0; padding: 0 16px;
    background: none;
}
.nav-inner {
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid var(--hairline); border-radius: 999px;
    box-shadow: 0 8px 30px rgba(16, 20, 16, 0.07);
    height: var(--nav-h); padding: 0 12px 0 24px;
    display: flex; align-items: center; gap: 24px;
}
.nav-logo {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--sans); font-size: 1.25rem; font-weight: 700;
    letter-spacing: -0.02em; color: var(--mark); text-decoration: none;
    white-space: nowrap;
}
.logo-mark {
    width: 28px; height: 28px; display: flex; align-items: center;
    justify-content: center; background: var(--mark); color: #fff;
    border-radius: 9px; flex-shrink: 0;
}
.logo-mark svg { color: #fff; display: block; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
    display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px;
    font-size: 0.9rem; font-weight: 500; color: #68706a;
    text-decoration: none; border-radius: 999px;
    transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a.active, .nav-links a[aria-current="page"] { color: var(--mark); background: rgba(16, 20, 16, 0.05); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-login {
    display: inline-flex; align-items: center; min-height: 44px;
    padding: 8px 14px; font-size: 0.9rem; font-weight: 500;
    color: #68706a; text-decoration: none; border-radius: 999px;
    transition: color 0.2s, background 0.2s; white-space: nowrap;
}
.nav-login:hover { color: var(--mark); background: rgba(16, 20, 16, 0.05); }
/* The pill CTA: same geometry as .btn-bracket-accent on every other page. */
.nav-actions .btn, .mob-actions .btn {
    min-height: 0; padding: 10px 20px; font-size: 0.85rem; font-weight: 700;
    border-radius: 999px;
}

#mobile-menu-btn {
    display: none; align-items: center; justify-content: center;
    width: 44px; height: 44px; background: transparent; border: none;
    border-radius: 999px; color: var(--mark); cursor: pointer;
}
#mobile-menu-btn:hover { background: rgba(16, 20, 16, 0.05); }
#mobile-menu-btn svg { display: block; }
#mobile-menu-btn .ico-close { display: none; }
#mobile-menu-btn[aria-expanded="true"] .ico-menu { display: none; }
#mobile-menu-btn[aria-expanded="true"] .ico-close { display: block; }

#mobile-menu {
    display: none; position: sticky; top: 88px; z-index: 99;
    max-width: 1140px; margin: 8px auto 0;
    background: var(--surface); border: 1px solid var(--hairline);
    border-radius: 16px; box-shadow: var(--el-3);
    padding: 16px 24px 24px;
}
#mobile-menu.is-open { display: block; }
#mobile-menu > a {
    display: block; padding: 12px 2px;
    font-size: 0.95rem; font-weight: 500; color: #5f6660;
    text-decoration: none; border-bottom: 1px solid var(--hairline-soft);
}
#mobile-menu > a:hover { color: var(--mark); }
.mob-actions { display: flex; gap: 10px; margin-top: 16px; }
.mob-actions > a { flex: 1 1 0; }

/* Footer — the homepage footer, with the type floor applied (column heads
   0.64rem → 0.75rem, bottom row 0.76rem → 0.8125rem). */
footer.site-footer {
    background: var(--surface); border-top: 1px solid var(--hairline);
    padding: 64px var(--gutter) 40px; width: 100%;
}
.footer-inner {
    max-width: var(--shell); margin: 0 auto;
    display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 48px;
}
.footer-logo {
    display: inline-flex; align-items: center; gap: 9px;
    font-family: var(--sans); font-size: 1.05rem; font-weight: 750;
    letter-spacing: -0.02em; color: var(--ink); text-decoration: none;
}
.footer-logo .logo-mark { width: 24px; height: 24px; border-radius: 7px; }
.footer-tagline { margin-top: 12px; font-size: 0.9rem; color: var(--text-dim); max-width: 30ch; line-height: 1.6; }
.footer-links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col-head {
    font-family: var(--mono); font-size: var(--t-mono); font-weight: 600;
    letter-spacing: 0.11em; text-transform: uppercase; color: var(--ink);
    margin-bottom: 6px;
}
.footer-col a { font-size: 0.85rem; color: var(--text-dim); text-decoration: none; transition: color 0.15s; }
.footer-col a:hover { color: var(--accent-deep); }
.footer-bottom {
    max-width: var(--shell); margin: 48px auto 0; padding-top: 26px;
    border-top: 1px solid var(--hairline-soft);
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px 24px; flex-wrap: wrap;
    font-size: var(--t-small); color: var(--text-dim);
}
.footer-bottom a { color: var(--text-dim); text-decoration: none; }
.footer-bottom a:hover { color: var(--accent-deep); }
.footer-bottom-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-status { display: inline-flex; align-items: center; gap: 8px; }
.footer-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

/* Reading progress — created by blog.js on post pages only. */
.read-progress {
    position: fixed; top: 0; left: 0; z-index: 1000;
    width: 100%; height: 3px; background: var(--accent);
    transform: scaleX(0); transform-origin: 0 50%;
    pointer-events: none;
}

/* ── 4. Index components ────────────────────────────────────────────────── */

/* Masthead */
.bl-mast { padding: 40px 0 28px; }
.bl-h1 {
    font-family: var(--sans);
    font-size: clamp(2.4rem, 5vw, 3.9rem); font-weight: 800; line-height: 1.02;
    letter-spacing: -0.04em; color: var(--ink); max-width: 14ch;
    margin-top: 28px; text-wrap: balance; overflow-wrap: anywhere;
}
.bl-mast--section .bl-h1 { max-width: 18ch; }
.bl-dek { font-size: 1.1rem; line-height: 1.65; color: var(--text); max-width: 52ch; margin-top: 14px; }

/* Section nav: the only filter UI — server-rendered links, one per section. */
.section-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }

/* Featured post: one <a> per index. */
.bl-feature {
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0;
    border: 1px solid var(--hairline); border-radius: var(--r-lg);
    background: var(--surface); overflow: hidden; box-shadow: var(--el-1);
    color: inherit; text-decoration: none;
    transition: box-shadow 0.26s var(--ease), border-color 0.26s;
}
.bl-feature:hover { box-shadow: var(--el-3); border-color: rgba(22, 28, 21, 0.16); }
.bl-feature:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.bl-feature-body {
    padding: 40px 44px; min-width: 0;
    display: flex; flex-direction: column; justify-content: center; gap: 14px;
}
.bl-feature-body .bl-tag::before { display: none; }
.bl-feature-title {
    font-family: var(--sans);
    font-size: clamp(1.5rem, 2.3vw, 2.05rem); font-weight: 750; line-height: 1.15;
    letter-spacing: -0.03em; color: var(--ink); overflow-wrap: anywhere;
    transition: color 0.15s;
}
.bl-feature:hover .bl-feature-title { color: var(--accent-deep); }
.bl-feature-dek {
    font-size: 1rem; line-height: 1.65; color: var(--text);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.bl-feature-body .pc-meta { margin-top: 4px; padding-top: 0; border-top: 0; }
.bl-feature-body .readlink { margin-top: 6px; align-self: flex-start; }

/* Rails */
.bl-rail { margin-top: 56px; }
.bl-feature + .bl-rail { margin-top: 48px; }
/* Two-column head at ≥880: h2 left; blurb + "All N →" share one baseline on
   the right (an even split — a 46ch blurb does not fit a 5fr column). */
.bl-rail-head {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px 40px; align-items: end; margin-top: 14px;
}
.bl-rail-h2 {
    font-family: var(--sans); font-size: 1.5rem; font-weight: 750; line-height: 1.15;
    letter-spacing: -0.025em; color: var(--ink);
}
.bl-rail-h2 a { color: inherit; text-decoration: none; }
.bl-rail-h2 a:hover { color: var(--accent-deep); }
.bl-rail-side { display: flex; align-items: baseline; justify-content: flex-end; gap: 20px; flex-wrap: wrap; }
.bl-rail-sub { flex: 1 1 auto; font-size: 0.95rem; line-height: 1.5; color: var(--text-dim); max-width: 46ch; }
.bl-rail-all {
    font-family: var(--sans); font-size: 0.85rem; font-weight: 650; white-space: nowrap;
    color: var(--accent-deep); text-decoration: none;
    border-bottom: 1px solid var(--accent-line); transition: border-color 0.15s;
}
.bl-rail-all:hover { border-bottom-color: var(--accent-deep); }
.bl-rail .pc-grid { margin-top: 24px; }

/* Card grid: three across; two ≤1023; one ≤640. */
.pc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
/* /blog/all holds every card: the ones past the first fold skip initial layout. */
.pc-grid--all .pc:nth-child(n+10) { content-visibility: auto; contain-intrinsic-size: auto 420px; }
.pc.is-hidden { display: none; }
.bl-empty { padding: 32px 0; font-size: 0.95rem; color: var(--text-dim); }
.bl-empty[hidden] { display: none; }

/* Post card — the whole card is the link; the title carries the affordance.
   No .reveal, no opacity-0 state, ever: cards are painted in the first frame. */
.pc {
    display: flex; flex-direction: column; min-width: 0;
    background: var(--surface); border: 1px solid var(--hairline);
    border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--el-1);
    color: inherit; text-decoration: none;
    transition: transform 0.26s var(--ease), box-shadow 0.26s var(--ease), border-color 0.26s;
}
.pc:hover { transform: translateY(-3px); box-shadow: var(--el-2); border-color: rgba(22, 28, 21, 0.16); }
.pc:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.pc-body { padding: 20px 22px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }
.pc-title {
    font-family: var(--sans); font-size: 1.05rem; font-weight: 700; line-height: 1.35;
    letter-spacing: -0.015em; color: var(--ink); transition: color 0.15s;
}
.pc:hover .pc-title { color: var(--accent-deep); }
.pc-excerpt {
    font-size: 0.9rem; line-height: 1.6; color: var(--text-dim);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pc-meta {
    margin-top: auto; padding-top: 12px; border-top: 1px solid var(--hairline-soft);
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px;
    font-size: var(--t-small); color: var(--text-dim); line-height: 1.3;
}
.pc-author { color: var(--ink); font-weight: 600; }
.pc-meta time, .pc-read {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--mono); font-size: var(--t-mono); font-weight: 500; letter-spacing: 0.02em;
    white-space: nowrap;
}
.pc-meta time::before, .pc-read::before {
    content: ''; width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6;
}

/* Cover art tile — the telemetry ground. The SVG is inlined at build time
   (scripts/lib/cover-sig.js); the id and the corner bracket are HTML so they
   obey the 12px floor. Sections differ by motif (data-motif), never by hue. */
.cover {
    position: relative; overflow: hidden; display: block;
    aspect-ratio: 16 / 9; background: var(--tile); color: #fff;
}
.cover::before {
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(ellipse at 85% -20%, rgba(39, 51, 217, 0.14), transparent 60%),
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: auto, 26px 26px, 26px 26px;
}
.cover > svg {
    position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%;
    opacity: 0.9; display: block;
    transition: opacity 0.4s ease, transform 0.6s var(--ease);
    transform-origin: 50% 50%;
}
.pc:hover .cover > svg, .bl-feature:hover .cover > svg { opacity: 1; transform: scale(1.03); }
.cover-id {
    position: absolute; top: 12px; left: 14px; z-index: 2;
    font-family: var(--mono); font-size: var(--t-mono); font-weight: 700;
    letter-spacing: 0.14em; color: rgba(255, 255, 255, 0.55); line-height: 1;
    white-space: nowrap;
}
.cover-corner {
    position: absolute; top: 14px; right: 14px; z-index: 2; width: 14px; height: 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.45); border-width: 1.5px 1.5px 0 0;
}
.cover .chip--on-tile { position: absolute; left: 14px; bottom: 14px; z-index: 2; }
.cover--feature { aspect-ratio: 3 / 2; min-height: 320px; height: 100%; }
.cover--feature .cover-id { top: 16px; left: 18px; }
.cover--feature .cover-corner { top: 18px; right: 18px; }
.cover--feature .chip--on-tile { left: 18px; bottom: 18px; }
/* Post header strip: 5:1, capped, no chip (the chips sit under it). */
.cover--strip { margin: 18px 0 22px; aspect-ratio: 5 / 1; max-height: 140px; border-radius: var(--r-md); width: 100%; }

/* Most read: a full-width surface band holding the shell. */
.bl-mostread {
    margin-top: 72px; padding: 56px 0;
    background: var(--surface);
    border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
}
.mostread { list-style: none; margin-top: 8px; columns: 2; column-gap: 48px; }
.mostread li { break-inside: avoid; page-break-inside: avoid; border-bottom: 1px solid var(--hairline); }
.mostread a {
    display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 2px 8px; align-items: start;
    padding: 14px 0; color: inherit; text-decoration: none;
}
.mostread-n {
    grid-row: 1 / span 2;
    font-family: var(--mono); font-size: 1rem; font-weight: 700; line-height: 1.35;
    color: var(--accent-deep); font-variant-numeric: tabular-nums;
}
.mostread-title {
    font-family: var(--sans); font-size: 1rem; font-weight: 650; line-height: 1.35;
    color: var(--ink); transition: color 0.15s; overflow-wrap: anywhere;
}
.mostread a:hover .mostread-title { color: var(--accent-deep); }
.mostread-meta { font-size: var(--t-small); color: var(--text-dim); }

/* Newsletter — one component: end of the index, every hub, every post. */
.nl {
    background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg);
    padding: 32px; max-width: 760px; margin: 56px auto 0; box-shadow: var(--el-1);
}
.nl h2 {
    font-family: var(--sans); font-size: 1.35rem; font-weight: 750; line-height: 1.25;
    letter-spacing: -0.02em; color: var(--ink); margin-top: 16px;
}
.nl p { font-size: 0.95rem; line-height: 1.6; color: var(--text-dim); margin-top: 8px; max-width: 52ch; }
.nl-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.nl-form[hidden] { display: none; }
/* The one field style: newsletter input and the /blog/all search. */
.field, .bl-search {
    flex: 1 1 220px; min-width: 220px; min-height: 44px; padding: 0 14px;
    border: 1px solid rgba(22, 28, 21, 0.22); border-radius: var(--r-md);
    font-family: var(--sans); font-size: 1rem; color: var(--ink);
    background: var(--surface); -webkit-appearance: none; appearance: none;
    transition: border-color 0.15s;
}
.field::placeholder, .bl-search::placeholder { color: var(--text-dim); opacity: 1; }
.field:focus, .bl-search:focus { border-color: var(--accent); outline: 2px solid var(--accent-line); outline-offset: 0; }
.nl-msg { margin-top: 10px; font-size: var(--t-small); line-height: 1.5; color: var(--text-dim); }
.nl-msg:empty { display: none; }
.nl-msg.is-ok { color: var(--accent-deep); font-weight: 600; }
.nl-msg.is-err { color: var(--danger); }

/* /blog/all toolbar: the only page that holds every card, so the only page
   where search is honest. */
.bl-toolbar { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin: 28px 0 20px; }
.bl-search { flex: 1 1 260px; max-width: 440px; }
.bl-count { font-size: var(--t-small); color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bl-mast + .pc-grid { margin-top: 8px; }

/* ── 5. Post components ─────────────────────────────────────────────────── */

/* Header band: paper, hairline bottom, a subtle radial wash. The inner column
   is the article + TOC width so the header lines up with the layout below. */
header.post-head {
    position: relative; overflow: hidden;
    background: var(--paper); border-bottom: 1px solid var(--hairline);
    padding: 32px 0 36px;
}
header.post-head::before {
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: radial-gradient(ellipse at 82% 8%, rgba(39, 51, 217, 0.12), transparent 55%);
}
.post-head-inner {
    position: relative; z-index: 1;
    max-width: calc(var(--measure) + var(--rail) + 48px + 2 * var(--gutter));
    margin: 0 auto; padding: 0 var(--gutter);
}
.post-crumbs {
    display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px;
    font-family: var(--mono); font-size: var(--t-mono); font-weight: 500;
    color: var(--text-dim); letter-spacing: 0.02em;
}
.post-crumbs a { color: inherit; text-decoration: none; }
.post-crumbs a:hover { color: var(--ink); }
.crumb-sep { color: rgba(22, 28, 21, 0.3); }
.post-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
h1.post-title {
    font-family: var(--sans);
    font-size: clamp(2.1rem, 4.4vw, 3.25rem); font-weight: 780; line-height: 1.06;
    letter-spacing: -0.035em; color: var(--ink); max-width: 22ch;
    text-wrap: balance; hyphens: manual; overflow-wrap: anywhere;
}
p.post-dek { font-size: 1.2rem; line-height: 1.55; color: var(--text); max-width: 60ch; margin-top: 16px; overflow-wrap: anywhere; }
.post-meta {
    margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
    font-size: var(--t-small); color: var(--text-dim); line-height: 1.35;
}
.post-meta-author { display: flex; align-items: center; gap: 10px; }
.post-meta-stack { display: flex; flex-direction: column; gap: 1px; }
.post-meta-name { font-weight: 700; color: var(--ink); text-decoration: none; }
.post-meta-name:hover { color: var(--accent-deep); }
.post-meta-role { font-size: var(--t-small); color: var(--text-dim); }
.post-meta-when {
    display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px 10px;
    font-family: var(--mono); font-size: var(--t-mono); font-weight: 500; letter-spacing: 0.02em;
}
.post-meta-when time { white-space: nowrap; }

/* Layout: article 700px + a 232px TOC rail at ≥1180; one column below. */
.post-layout {
    max-width: calc(var(--measure) + var(--rail) + 48px + 2 * var(--gutter));
    margin: 0 auto; padding: 48px var(--gutter) 32px;
    display: grid; grid-template-columns: minmax(0, var(--measure)) var(--rail);
    column-gap: 48px; align-items: start;
}
.post-layout > * { min-width: 0; }           /* grid children cannot force the column wider */
article.post-body { grid-column: 1; }
aside.post-toc {
    grid-column: 2; grid-row: 1;
    position: sticky; top: calc(var(--nav-h) + 28px);
    max-height: calc(100vh - var(--nav-h) - 56px); overflow-y: auto;
    padding-bottom: 8px;
}
.post-toc .bl-tag { margin-bottom: 10px; }
.toc { list-style: none; }
.toc a {
    display: block; padding: 6px 0 6px 14px;
    border-left: 2px solid var(--hairline-soft);
    font-size: var(--t-small); line-height: 1.4; color: var(--text-dim); text-decoration: none;
    transition: color 0.15s, border-color 0.15s;
}
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--accent-deep); border-left-color: var(--accent); font-weight: 600; }
.toc-top {
    display: inline-block; margin-top: 14px; padding-left: 14px;
    font-family: var(--mono); font-size: var(--t-mono); font-weight: 500; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--text-dim); text-decoration: none;
}
.toc-top:hover { color: var(--ink); }
/* Inline variant (<1180): a <details> after the key takeaways. */
.post-toc--inline {
    display: none; margin-bottom: 2rem;
    background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md);
    padding: 14px 18px;
}
.post-toc--inline summary {
    display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none;
    font-family: var(--mono); font-size: var(--t-mono); font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim);
    min-height: 28px;
}
.post-toc--inline summary::-webkit-details-marker { display: none; }
.post-toc--inline summary::before { content: ''; width: 8px; height: 8px; flex-shrink: 0; border: 2px solid var(--accent); }
.post-toc--inline summary::after {
    content: ''; margin-left: auto; width: 8px; height: 8px;
    border: solid var(--text-dim); border-width: 0 1.5px 1.5px 0;
    transform: rotate(45deg) translateY(-2px); transition: transform 0.2s var(--ease);
}
.post-toc--inline[open] summary::after { transform: rotate(225deg) translateY(-2px); }
.post-toc--inline .toc { margin-top: 10px; }
.post-toc--inline .toc-top { display: none; }

/* Body typography (§5.5). */
.post-body { font-size: var(--t-body); line-height: 1.75; color: var(--text); }
.post-body > :first-child { margin-top: 0; }
.post-body h2 {
    font-family: var(--sans); font-size: clamp(1.5rem, 2.4vw, 1.85rem); font-weight: 750; line-height: 1.2;
    letter-spacing: -0.025em; color: var(--ink); margin: 2.8rem 0 0.9rem; hyphens: auto;
    scroll-margin-top: 96px;
}
.post-body h3 {
    font-family: var(--sans); font-size: 1.25rem; font-weight: 700; line-height: 1.3;
    letter-spacing: -0.015em; color: var(--ink); margin: 2rem 0 0.6rem;
    scroll-margin-top: 96px;
}
.post-body h4 { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin: 1.6rem 0 0.5rem; scroll-margin-top: 96px; }
.post-body p, .post-body ul, .post-body ol { margin-bottom: 1.35rem; }
.post-body strong { font-weight: 700; color: var(--ink); }
/* Prose links only — the TOC, readlinks, chips, the author name and the CTA
   buttons live inside the article too and carry their own link styles. */
.post-body p a, .post-body li a, .post-body td a, .post-body th a, .post-body dd a, .post-body dt a,
.post-body blockquote a, .post-body figcaption a, .post-body h2 a, .post-body h3 a, .post-body h4 a {
    color: var(--accent-deep); text-decoration: underline;
    text-decoration-color: var(--accent-line); text-underline-offset: 3px; text-decoration-thickness: 1px;
    transition: text-decoration-color 0.15s;
}
.post-body p a:hover, .post-body li a:hover, .post-body td a:hover, .post-body dd a:hover,
.post-body blockquote a:hover, .post-body figcaption a:hover { text-decoration-color: currentColor; }
.post-body ul, .post-body ol { padding-left: 1.35rem; }
.post-body li + li { margin-top: 0.45rem; }
.post-body ul li::marker { color: var(--accent); }
.post-body ol li::marker { font-family: var(--mono); font-size: 0.9em; font-weight: 600; color: var(--accent-deep); }
.post-body li > ul, .post-body li > ol { margin: 0.45rem 0 0; }
.post-body blockquote {
    font-family: var(--sans); font-size: 1.25rem; font-weight: 500; line-height: 1.45; color: var(--ink);
    border-left: 3px solid var(--accent); padding: 4px 0 4px 20px; margin: 2rem 0;
}
.post-body blockquote p { margin: 0; }
.post-body blockquote p + p { margin-top: 0.6rem; }
.post-body blockquote cite { display: block; margin-top: 0.6rem; font-style: normal; font-family: var(--mono); font-size: var(--t-mono); color: var(--text-dim); }
.post-body hr { border: 0; border-top: 1px solid var(--hairline); margin: 3rem 0; }
.post-body code {
    font-family: var(--mono); font-size: 0.9em; font-weight: 400;
    background: var(--accent-wash); border: 1px solid var(--accent-line); border-radius: 5px;
    padding: 0.1em 0.35em; color: var(--accent-deep);
}
.post-body small { font-size: var(--t-small); }
.post-body figcaption { font-family: var(--mono); font-size: var(--t-mono); color: var(--text-dim); }
.post-body kbd { font-family: var(--mono); font-size: 0.85em; border: 1px solid var(--hairline); border-bottom-width: 2px; border-radius: 4px; padding: 0.05em 0.4em; color: var(--ink); }

/* §6.1 — the 415px bug. Long unbreakable tokens (URLs, identifiers,
   "A/B/C" lists) must break rather than widen the mobile layout viewport —
   measured 415/404/443px on 390px. */
.post-body p, .post-body li, .post-body td, .post-body th, .post-body dd, .post-body dt,
.post-body h1, .post-body h2, .post-body h3, .post-body figcaption, .post-body blockquote,
.pc-title, .pc-excerpt, .post-title, .post-dek { overflow-wrap: anywhere; }
.post-body code:not(pre code) { overflow-wrap: anywhere; word-break: break-word; }
.post-body pre code { white-space: pre; }                 /* code blocks scroll, never wrap */
.post-body img, .post-body svg, .post-body video, .post-body iframe { max-width: 100%; height: auto; }
/* Cells inside the scroll wrapper get break-word, not anywhere: `anywhere`
   feeds a one-character min-content into auto table layout, so a five-column
   table at its 520px minimum split "Residential" into "Residenti / al" on a
   390px phone (measured). `break-word` keeps the longest word as the column
   minimum — the table grows and .post-table scrolls — and still breaks a
   token that is wider than its cell. A table the generator forgot to wrap
   keeps the rule above. */
.post-table td, .post-table th { overflow-wrap: break-word; }

/* Code blocks — self-consistent dark component. The copy button is in the
   HTML (blog.js wires it), so it exists without JS and the layout never shifts. */
.code {
    margin: 1.6rem 0; border-radius: 14px; overflow: hidden;
    background: var(--code-bg); box-shadow: var(--el-2); border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--code-fg);
}
.code-head {
    display: flex; justify-content: space-between; align-items: center;
    height: 38px; padding: 0 12px 0 16px;
    background: rgba(255, 255, 255, 0.04); border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.code-lang {
    font-family: var(--mono); font-size: var(--t-mono); font-weight: 600;
    letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5);
}
.code-copy {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 28px; padding: 0 10px; cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 7px;
    background: rgba(255, 255, 255, 0.08); color: #eef1eb;
    font-family: var(--sans); font-size: var(--t-mono); font-weight: 600; line-height: 1;
    transition: background 0.15s, border-color 0.15s;
}
.code-copy:hover { background: rgba(255, 255, 255, 0.14); }
/* 44px hit area around the 28/32px button (a11y.css draws a 24px one; this
   one wins on specificity so the family does not depend on that sheet). */
.code .code-copy { position: relative; }
.code .code-copy::after {
    content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 100%; height: 100%; min-width: 44px; min-height: 44px;
}
.code-copy:focus-visible { outline: 2px solid var(--accent-peri); outline-offset: 2px; }
.code-copy.is-copied { border-color: rgba(157, 174, 247, 0.6); color: var(--accent-peri); }
.code-copy::before {
    content: ''; display: none; width: 16px; height: 16px; flex-shrink: 0;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23eef1eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='11' height='11' rx='2'/%3E%3Cpath d='M5 15V5a2 2 0 0 1 2-2h10'/%3E%3C/svg%3E");
}
.code-copy.is-copied::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239daef7' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E");
}
.code pre {
    margin: 0; padding: 18px 20px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    tab-size: 2; font-family: var(--mono); font-size: 0.84rem; font-weight: 400; line-height: 1.6;
    color: var(--code-fg); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.code pre::-webkit-scrollbar { height: 6px; }
.code pre::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 3px; }
.code pre::-webkit-scrollbar-track { background: transparent; }
.code pre code {
    display: block; min-width: 0; white-space: pre;
    background: none; border: 0; padding: 0; border-radius: 0;
    color: inherit; font-size: inherit; font-family: inherit;
}
.code mark.hl { background: rgba(39, 51, 217, 0.35); color: #fff; padding: 0.05em 0; }

/* Tables: a scroll wrapper, mono heads, semantic colour never alone. */
.post-table {
    overflow-x: auto; margin: 1.6rem 0; -webkit-overflow-scrolling: touch;
    border: 1px solid var(--hairline); border-radius: var(--r-md); background: var(--surface);
    scrollbar-width: thin;
}
/* blog.js sets .is-scrollable while there is more table to the right. */
.post-table.is-scrollable {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
}
.post-table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 0.92rem; line-height: 1.45; }
.post-table th {
    font-family: var(--mono); font-size: var(--t-mono); font-weight: 600;
    letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim);
    text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--hairline);
    background: var(--surface); white-space: nowrap;
}
.post-table td { padding: 12px 14px; border-bottom: 1px solid var(--hairline-soft); vertical-align: top; color: var(--text); }
.post-table tr:last-child td { border-bottom: 0; }
.post-table td:first-child { color: var(--ink); font-weight: 600; }
.post-table td.num, .post-table td[data-num] { font-family: var(--mono); font-size: 0.88em; font-variant-numeric: tabular-nums; }
.post-table td.fired { color: var(--ok); font-weight: 600; }
.post-table td.missed { color: var(--danger); font-weight: 600; }
.post-table td.fired::before { content: '\2713\00a0'; }
.post-table td.missed::before { content: '\2013\00a0'; }
.post-table td code { white-space: nowrap; }

/* Callouts */
.callout {
    margin: 1.6rem 0; padding: 16px 20px; border-radius: var(--r-md);
    font-size: 0.97rem; line-height: 1.65;
    border: 1px solid var(--accent-line); border-left-width: 3px; border-left-color: var(--accent);
    background: var(--accent-wash); color: var(--ink);
}
.callout > :last-child { margin-bottom: 0; }
.callout p { margin-bottom: 0.7rem; }
.callout-label {
    display: block; margin-bottom: 6px;
    font-family: var(--mono); font-size: var(--t-mono); font-weight: 600;
    letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-deep);
}
.callout--note { background: var(--accent-wash); border-color: var(--accent-line); border-left-color: var(--accent); }
.callout--warn { background: #fff7ed; border-color: rgba(180, 83, 9, 0.3); border-left-color: var(--warn); }
.callout--warn .callout-label { color: var(--warn); }
.callout--warn code { background: rgba(180, 83, 9, 0.08); border-color: rgba(180, 83, 9, 0.3); color: var(--warn); }
/* An API-output excerpt: the JSON the article is about. Signal spellings in
   it are the real API's (proxied, dch) — never renamed. */
.callout--verdict {
    background: var(--code-bg); color: var(--code-fg); border: 0;
    font-family: var(--mono); font-size: 0.84rem; line-height: 1.6;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.callout--verdict .callout-label { color: var(--accent-peri); }
.callout--verdict pre { margin: 0; font: inherit; white-space: pre; color: inherit; }
.callout--verdict code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.callout--verdict a { color: var(--accent-peri); text-decoration-color: rgba(157, 174, 247, 0.5); }

/* Figures */
.post-figure {
    margin: 1.8rem 0; background: var(--surface); border: 1px solid var(--hairline);
    border-radius: var(--r-md); overflow: hidden; box-shadow: var(--el-1);
}
.post-figure img { display: block; width: 100%; height: auto; }
.post-figure svg { display: block; width: 100%; height: auto; }
.post-figure figcaption {
    padding: 10px 14px; border-top: 1px solid var(--hairline);
    font-family: var(--mono); font-size: var(--t-mono); font-weight: 400; line-height: 1.5; color: var(--text-dim);
}
.post-figure--tight { max-width: 560px; margin-left: auto; margin-right: auto; }

/* Key takeaways — the block snippets and AI overviews lift. */
.post-tldr {
    background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg);
    padding: 22px 24px; margin-bottom: 2.2rem; box-shadow: var(--el-1);
}
.post-tldr ul { list-style: none; padding: 0; margin: 14px 0 0; }
.post-tldr li {
    position: relative; padding-left: 1.2em; margin: 0;
    font-size: 1rem; line-height: 1.55; color: var(--ink);
}
.post-tldr li + li { margin-top: 0.55rem; }
.post-tldr li::before {
    content: ''; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px;
    background: var(--accent);
}

/* Inline CTA — exactly one per post, not a box. */
.post-cta-inline {
    margin: 2.4rem 0; padding: 16px 0;
    border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
    display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap;
}
.post-cta-inline .bl-tag { flex-shrink: 0; }
.post-cta-inline p { flex: 1 1 260px; margin: 0; font-size: 0.97rem; line-height: 1.5; color: var(--text); }
.post-cta-inline .readlink { flex-shrink: 0; }

/* FAQ — always expanded; the answers are the indexable text. */
.post-faq { margin-top: 3rem; }
.post-faq h2 {
    font-family: var(--sans); font-size: 1.5rem; font-weight: 750; line-height: 1.2;
    letter-spacing: -0.025em; color: var(--ink); margin: 14px 0 6px;
}
.post-faq dl { margin: 0; }
.post-faq dt { font-family: var(--sans); font-size: 1.05rem; font-weight: 700; line-height: 1.4; color: var(--ink); padding: 18px 0 6px; }
.post-faq dd {
    font-size: 0.97rem; line-height: 1.7; color: var(--text);
    padding-bottom: 18px; border-bottom: 1px solid var(--hairline-soft); margin: 0;
}
.post-faq dd p { margin-bottom: 0.6rem; }
.post-faq dd p:last-child { margin-bottom: 0; }

/* Author box — one real author, one real box. */
.post-author {
    display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 18px;
    padding: 24px 0; margin-top: 2rem; border-top: 1px solid var(--hairline);
}
.post-author-body { display: flex; flex-direction: column; gap: 6px; }
.post-author-body .bl-tag { margin-bottom: 4px; }
.post-author-name { font-family: var(--sans); font-size: 1.05rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.post-author-name:hover { color: var(--accent-deep); }
.post-author-role { font-size: var(--t-small); color: var(--text-dim); }
.post-author-bio { font-size: 0.95rem; line-height: 1.6; color: var(--text); margin: 4px 0 0; }
.post-author-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 6px; }

/* End CTA — the homepage's close card. */
.post-cta {
    position: relative; overflow: hidden; margin-top: 3rem;
    background: var(--code-bg); border-radius: 22px;
    padding: clamp(36px, 5vw, 56px) 32px; text-align: center; color: #fff;
}
.post-cta::before {
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background: radial-gradient(ellipse at 50% 10%, rgba(39, 51, 217, 0.35), transparent 60%);
}
.post-cta > * { position: relative; z-index: 1; }
.post-cta .bl-tag { justify-content: center; color: rgba(255, 255, 255, 0.55); }
.post-cta .bl-tag::before { border-color: var(--accent-peri); }
.post-cta h2 {
    font-family: var(--sans); font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 780; line-height: 1.1;
    letter-spacing: -0.03em; color: #fff; margin: 16px auto 0; max-width: 22ch; text-wrap: balance;
}
.post-cta h2 em { font-style: normal; color: var(--accent-peri); }
.post-cta p { color: rgba(255, 255, 255, 0.72); font-size: 1rem; line-height: 1.6; max-width: 46ch; margin: 14px auto 0; }
.post-cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

/* Related + pagination + newsletter: full shell width after the layout. */
.post-foot { padding-bottom: 96px; }
.post-related { margin-top: 64px; }
.post-related .pc-grid { margin-top: 18px; }
.post-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.post-pag {
    display: flex; flex-direction: column; gap: 6px; min-width: 0;
    padding: 16px 18px; border: 1px solid var(--hairline); border-radius: var(--r-md);
    background: var(--surface); color: inherit; text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.2s var(--ease);
}
.post-pag:hover { border-color: rgba(22, 28, 21, 0.2); box-shadow: var(--el-1); }
.post-pag--next { text-align: right; align-items: flex-end; }
/* The oldest and newest post in a section have one neighbour; a lone "Next"
   keeps its right-hand column instead of sliding under "Previous". */
.post-pag--next:only-child { grid-column: 2; }
.post-pag-dir { font-family: var(--mono); font-size: var(--t-mono); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.post-pag-title { font-family: var(--sans); font-size: 0.95rem; font-weight: 700; line-height: 1.35; color: var(--ink); overflow-wrap: anywhere; }
.post-pag:hover .post-pag-title { color: var(--accent-deep); }

/* Mobile CTA bar — phones only (≤768). Light, blurred, dismissible; shown by
   blog.js after 35% scroll. Desktop gets no sticky CTA. */
.mob-cta-bar { display: none; }

/* ── 6. Responsive ──────────────────────────────────────────────────────── */

/* ≤1179: TOC leaves the rail, layout single column at --measure. */
@media (max-width: 1179px) {
    .post-head-inner, .post-layout { max-width: calc(var(--measure) + 2 * var(--gutter)); }
    .post-layout { display: block; }
    aside.post-toc { display: none; }
    .post-toc--inline { display: block; }
}

/* ≤1023: hamburger nav, two-column card grid. */
@media (max-width: 1023px) {
    .nav-links, .nav-login, .nav-actions .btn { display: none; }
    #mobile-menu-btn { display: inline-flex; margin-left: auto; }
    #mobile-menu { margin-left: 16px; margin-right: 16px; }
    .pc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ≤980: footer one column, links in two. */
@media (max-width: 980px) {
    .footer-inner { grid-template-columns: 1fr; gap: 36px; }
    .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ≤900: feature one column, cover 16:9. */
@media (max-width: 900px) {
    .bl-feature { grid-template-columns: 1fr; }
    .cover--feature { aspect-ratio: 16 / 9; min-height: 0; height: auto; }
    .bl-feature-body { padding: 24px; }
}

/* ≤880: rail head one column. */
@media (max-width: 880px) {
    .bl-rail-head { grid-template-columns: 1fr; align-items: start; }
    .bl-rail-side { justify-content: flex-start; }
}

/* ≤768: mobile CTA bar available. */
@media (max-width: 768px) {
    .mob-cta-bar {
        display: flex; align-items: center; gap: 10px; justify-content: space-between;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 950;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, 0.96);
        -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
        border-top: 1px solid var(--hairline);
        transform: translateY(110%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .mob-cta-bar.on { transform: none; }
    .mob-cta-txt { font-size: var(--t-small); color: var(--text-dim); line-height: 1.35; min-width: 0; flex: 1 1 auto; }
    .mob-cta-txt strong { color: var(--ink); }
    /* .btn--small is 38px; on the one touch-only surface the button meets the
       44px target — the bar is 65-74px tall, so there is room. */
    .mob-cta-btn { flex: 0 1 auto; min-width: 0; min-height: 44px; box-shadow: 0 4px 14px rgba(39, 51, 217, 0.35); }
    .mob-cta-close {
        flex-shrink: 0; width: 44px; height: 44px; margin-right: -8px;
        display: inline-flex; align-items: center; justify-content: center;
        background: transparent; border: 0; border-radius: 50%; color: var(--text-dim); cursor: pointer;
    }
    .mob-cta-close:hover { color: var(--ink); background: rgba(22, 28, 21, 0.05); }
    /* The bar is fixed and ~56-72px tall. Without this the footer's last row
       can never scroll out from under it. */
    body.mob-cta-on footer.site-footer { padding-bottom: calc(40px + 84px + env(safe-area-inset-bottom)); }
}

/* ≤760: most-read in one column. */
@media (max-width: 760px) {
    .mostread { columns: 1; }
}

/* ≤700: section nav scrolls sideways, bleeding to the screen edge so the row
   is obviously scrollable; the current chip scrolls into view (blog.js). */
@media (max-width: 700px) {
    .section-nav {
        flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity;
        padding: 0 var(--gutter) 6px; margin: 26px calc(-1 * var(--gutter)) 0;
        scrollbar-width: none; -webkit-overflow-scrolling: touch;
        -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
        mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent);
    }
    .section-nav::-webkit-scrollbar { display: none; }
    .section-nav .chip { scroll-snap-align: start; flex-shrink: 0; }
    /* §6.4: every chip is 40px on phones — the post header's section chip is
       the one interactive chip on a post page and measured 36px (review). */
    .section-nav .chip, .post-chips .chip { min-height: 40px; }
    .section-nav::after { content: ''; flex: 0 0 var(--gutter); }   /* room past the last chip */
}

/* ≤640: phone type scale, one-column grids, stacked buttons. */
@media (max-width: 640px) {
    nav.site-nav { top: 10px; margin-top: 10px; padding: 0 12px; }
    #mobile-menu { top: 80px; margin-left: 12px; margin-right: 12px; }

    .bl-mast { padding: 28px 0 20px; }
    /* .bl-tag-meta is nowrap by design; on a phone it drops to its own line
       instead of clipping at the viewport edge — measured at 320 on every hub
       masthead and at 390 on /resources (2026-08-30). Under 480px the meta
       goes full-width and left-aligned (see the ≤480 block). */
    .bl-tag { flex-wrap: wrap; row-gap: 6px; }
    .bl-feature-body { padding: 20px; }
    .pc-grid { grid-template-columns: 1fr; gap: 16px; }
    .bl-rail { margin-top: 44px; }
    .bl-mostread { margin-top: 56px; padding: 44px 0; }
    .nl { padding: 24px 20px; margin-top: 44px; }
    .nl-form .field, .nl-form .bl-search, .nl-form .btn { width: 100%; flex: 1 1 100%; min-width: 0; }

    header.post-head { padding: 24px 0 28px; }
    .cover--strip { aspect-ratio: 4 / 1; max-height: 88px; margin: 14px 0 18px; }
    .cover--strip .cover-id { top: 10px; left: 12px; }
    h1.post-title { font-size: clamp(1.9rem, 9vw, 2.4rem); line-height: 1.08; }
    p.post-dek { font-size: 1.05rem; }
    .post-meta { row-gap: 6px; }
    .post-meta .dot { display: none; }
    .post-layout { padding-top: 32px; }
    .post-body { font-size: 1rem; line-height: 1.7; }
    .post-body h2 { font-size: 1.45rem; margin-top: 2.4rem; }
    .post-body h3 { font-size: 1.15rem; }
    .post-body blockquote { font-size: 1.1rem; padding-left: 16px; }
    .post-tldr { padding: 18px 18px; }
    .post-toc--inline summary { min-height: 32px; }

    .code { border-radius: 12px; }
    .code pre { padding: 14px 14px; font-size: 0.8rem; }
    /* Icon-only copy button: the label is clipped (still read by screen
       readers via aria-label), the glyph shows. */
    .code-copy { width: 32px; min-height: 32px; padding: 0; gap: 0; }
    .code-copy::before { display: block; }
    .code-copy-txt { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
    .callout { padding: 14px 16px; font-size: 0.95rem; }
    .callout--verdict { font-size: 0.8rem; }
    .post-table table { font-size: 0.88rem; }
    .post-table th, .post-table td { padding: 10px 12px; }

    .post-cta { border-radius: 18px; padding: 32px 20px; }
    .post-cta-btns { flex-direction: column; align-items: stretch; }
    .post-cta-btns .btn { width: 100%; white-space: normal; }
    .post-author { grid-template-columns: 48px minmax(0, 1fr); gap: 14px; }
    .post-author .avatar--64 { width: 48px; height: 48px; }
    .post-pagination { grid-template-columns: 1fr; }
    .post-pag--next:only-child { grid-column: auto; }
    .post-pag--next { text-align: left; align-items: flex-start; }
    .post-foot { padding-bottom: 72px; }

    /* Related cards go compact: cover left, title right, no excerpt. */
    .pc--row { flex-direction: row; align-items: center; gap: 14px; padding: 12px; border-radius: var(--r-md); }
    .pc--row .cover { width: 96px; flex: 0 0 96px; aspect-ratio: 4 / 3; border-radius: var(--r-sm); }
    .pc--row .cover-id, .pc--row .cover-corner, .pc--row .chip--on-tile { display: none; }
    .pc--row .pc-body { padding: 0; gap: 6px; }
    .pc--row .pc-title { font-size: 0.95rem; line-height: 1.3; }
    .pc--row .pc-excerpt { display: none; }
    .pc--row .pc-meta { margin-top: 0; padding-top: 0; border-top: 0; }
    .pc--row .pc-meta .avatar, .pc--row .pc-author { display: none; }
    .pc--row .pc-meta time::before { display: none; }
}

/* ≤480: the tag/meta pair stops sharing a line — the meta takes its own
   left-aligned line under the label instead of wrapping into a right-aligned
   orphan beside it (seen on /blog at 320 and /blog/all at 390). */
@media (max-width: 480px) {
    .bl-tag-meta { flex-basis: 100%; margin-left: 0; text-align: left; }
}

/* ≤360: the narrowest phones. */
@media (max-width: 360px) {
    h1.post-title { font-size: 1.9rem; }
    .post-chips { gap: 6px; }
    .mob-cta-btn { white-space: normal; text-align: center; max-width: 58%; padding: 9px 12px; }
    .bl-feature-body { padding: 18px 16px; }
    .pc-body { padding: 18px 18px 16px; }
}

/* ── 7. Reduced motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .pc, .bl-feature, .btn, .readlink::after, .cover > svg, .chip, .post-pag,
    .mob-cta-bar, .post-toc--inline summary::after, .toc a, .skip-link { transition: none; }
    .pc:hover, .btn--primary:hover, .btn--primary:active { transform: none; }
    .pc:hover .cover > svg, .bl-feature:hover .cover > svg { transform: none; opacity: 1; }
    .readlink:hover::after { transform: none; }
}
