/* ==========================================================================
   INTEL — intel.innerpulse.net
   A reading-first knowledge base, drawn like an atlas.

   One stylesheet. Order of business:
     1. Fonts and tokens          5. Browsing: home, shelves, lists, library
     2. Themes (twelve)           6. The atlas: maps, plates, marks
     3. Base and chrome           7. Article: reading column, figures, charts
     4. Controls and furniture    8. States, footer, responsive, print

   Every color is a theme token, every size is a scale step, and every
   generative SVG on the site takes its strokes from the --atlas-* tokens
   below, so the twelve themes keep working without a rule apiece.
   ========================================================================== */

/* XCharter (Bitstream Charter), self-hosted and subsetted — see
   assets/fonts/LICENSE.charter. True italics, same face on every OS. */
@font-face { font-family: "XCharter"; src: url("fonts/charter-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "XCharter"; src: url("fonts/charter-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "XCharter"; src: url("fonts/charter-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "XCharter"; src: url("fonts/charter-bold-italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

/* Inter (variable, latin) for the interface, labels and metadata: chosen over the brand's
   Instrument Sans for legibility at 12–15px. JetBrains Mono stays for code. Both self-hosted;
   see assets/fonts/LICENSE.inter. XCharter stays intel's reading and headline face. */
@font-face { font-family: "Inter"; src: url("fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/jetbrains-mono-latin.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
    --sans:  "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --serif: "XCharter", "Iowan Old Style", Charter, "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
    --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

    /* Labels, dates and counts: set in the interface sans, not mono. Small
       monospace caps were the hardest text on the page to read; --mono is kept
       for code, keys and IDs. Point this back at --mono to restore the old look. */
    --meta:  var(--sans);

    /* Type scale, in rem so reader font-size settings scale the whole site.
       Nothing a reader needs is set below 11px; metadata sits at 12–13px. */
    --fs-micro: 0.6875rem;
    --fs-label: 0.75rem;
    --fs-xs:    0.8125rem;
    --fs-sm:    0.875rem;
    --fs-base:  0.9375rem;
    --fs-md:    1rem;
    --fs-lg:    1.0625rem;
    --fs-xl:    1.125rem;
    --fs-2xl:   1.1875rem;
    --fs-3xl:   1.375rem;
    --fs-4xl:   1.5rem;
    --fs-5xl:   1.75rem;
    --fs-6xl:   2rem;
    --fs-hero:  2.5rem;
    --fs-display: clamp(2.25rem, 4.2vw, 3.6rem);

    --leading-title:   1.12;
    --leading-heading: 1.3;
    --leading-ui:      1.55;
    --leading-body:    1.7;

    --track-micro:    0.07em;
    --track-label:    0.05em;
    --track-tight:   -0.015em;
    --track-tighter: -0.028em;

    --fw-medium:   500;
    --fw-semibold: 600;
    --fw-bold:     700;

    --page:     1160px;
    --column:   700px;    /* the shared article column: prose, tables, charts */
    --measure:  100%;
    --radius:   12px;
    --radius-s: 8px;
    --radius-xs: 4px;

    /* Article rhythm in multiples of one body line (18px × 1.7). */
    --space-1: 0.475rem;
    --space-2: 0.95rem;
    --space-3: 1.425rem;
    --space-4: 1.9rem;
    --space-5: 2.85rem;
    --space-6: 3.8rem;

    --gap: clamp(20px, 2.6vw, 36px);

    --ease:     140ms ease;
    --ease-out: 200ms cubic-bezier(.16, 1, .3, 1);
    --focus:    0 0 0 3px color-mix(in srgb, var(--accent) 24%, transparent);

    /* innerpulse mark: one solid ember, the deep #cf2a1c without glow on light grounds; dark themes
       switch it to the bright #f43a2a (innerpulse-brand, 2026-10-25: no gradient on the mark). */
    --ip-mark: #cf2a1c;
    --ip-mark-glow: transparent;
    --innerpulse-ring: rgba(11,14,20,.12);

    /* Back-compat aliases used by admin templates. */
    --border: var(--rule);
    --border-2: var(--rule-2);
}

/* --------------------------------------------------------------------------
   2. Themes — four light, eight dark. Keys are stored in localStorage, so
      they never change; palettes may.
   -------------------------------------------------------------------------- */

:root,
:root[data-theme="canvas"] {
    --paper: #f6f8fa; --surface: #ffffff; --surface-2: #eff2f5;
    --rule: #d8dee4; --rule-2: #b9c0ca;
    --ink: #11151a; --text: #2b3138; --text-dim: #59616b; --text-mute: #656c74;
    --accent: #0863cd; --accent-2: #0550ae; --accent-bg: #ddf0ff; --on-accent: #ffffff;
    --amber: #916100; --amber-bg: #fff3cd; --danger: #cf222e; --ok: #1a7f37;
    --shadow: 0 1px 2px rgba(31,35,40,.04), 0 6px 20px -10px rgba(31,35,40,.10);
    --shadow-lg: 0 2px 6px rgba(31,35,40,.05), 0 16px 40px -16px rgba(31,35,40,.15);
    --shadow-sm: 0 1px 2px rgba(31,35,40,.04);
    --c1: #0863cd; --c2: #bc4c00; --c3: #8250df; --c4: #1a7f37; --c5: #bf3989; --c6: #0a7ea4;
    color-scheme: light;
}
:root[data-theme="paper"] {
    --paper: #f4efe6; --surface: #fbf8f2; --surface-2: #efe9dc;
    --rule: #ddd2bf; --rule-2: #c4b59a;
    --ink: #1c1610; --text: #3a3228; --text-dim: #6b5f50; --text-mute: #6e655b;
    --accent: #8a4b1f; --accent-2: #6e3a16; --accent-bg: #f0e2d0; --on-accent: #ffffff;
    --amber: #88580e; --amber-bg: #f3e6cb; --danger: #a63a2e; --ok: #3d6b3a;
    --shadow: 0 1px 2px rgba(28,22,16,.05), 0 6px 20px -10px rgba(28,22,16,.12);
    --shadow-lg: 0 2px 6px rgba(28,22,16,.06), 0 16px 40px -16px rgba(28,22,16,.16);
    --shadow-sm: 0 1px 2px rgba(28,22,16,.05);
    --c1: #8a4b1f; --c2: #1f6b5e; --c3: #5a4a8a; --c4: #8a6a1a; --c5: #8a3a5a; --c6: #3f6a40;
    color-scheme: light;
}
:root[data-theme="solar"] {
    --paper: #fdf6e3; --surface: #fffcf0; --surface-2: #f2ead2;
    --rule: #e6dec6; --rule-2: #c6bc9e;
    --ink: #073642; --text: #3f545b; --text-dim: #54666d; --text-mute: #606868;
    --accent: #1c669a; --accent-2: #1a6daa; --accent-bg: #e3e9d3; --on-accent: #ffffff;
    --amber: #7d5f00; --amber-bg: #f2e8c6; --danger: #cf2f2c; --ok: #647800;
    --shadow: 0 1px 2px rgba(7,54,66,.05), 0 6px 20px -10px rgba(7,54,66,.12);
    --shadow-lg: 0 2px 6px rgba(7,54,66,.06), 0 16px 40px -16px rgba(7,54,66,.16);
    --shadow-sm: 0 1px 2px rgba(7,54,66,.05);
    --c1: #268bd2; --c2: #cb4b16; --c3: #859900; --c4: #6c71c4; --c5: #d33682; --c6: #2aa198;
    color-scheme: light;
}
:root[data-theme="dawn"] {
    --paper: #faf4ed; --surface: #fffaf3; --surface-2: #f2e9e1;
    --rule: #e6dcd2; --rule-2: #c9bcb0;
    --ink: #393552; --text: #575279; --text-dim: #65617a; --text-mute: #686672;
    --accent: #286983; --accent-2: #1d5269; --accent-bg: #e4ece7; --on-accent: #ffffff;
    --amber: #8d5708; --amber-bg: #f6e5c8; --danger: #9f576c; --ok: #497656;
    --shadow: 0 1px 2px rgba(57,53,82,.05), 0 6px 20px -10px rgba(57,53,82,.12);
    --shadow-lg: 0 2px 6px rgba(57,53,82,.06), 0 16px 40px -16px rgba(57,53,82,.16);
    --shadow-sm: 0 1px 2px rgba(57,53,82,.05);
    --c1: #286983; --c2: #b4637a; --c3: #c98a2e; --c4: #907aa9; --c5: #56949f; --c6: #d7827e;
    color-scheme: light;
}
:root[data-theme="ip-light"] {
    /* innerpulse brand, paper set (references/themes.md §3): paper ground and surfaces, the
       paper text steps, hairlines, and the AI & agents family accent (coral) at its paper step.
       Every value here is the brand table's; the tints (-bg) are mixed from them. */
    --ip-mark: #cf2a1c;
    --paper: #f4f1ec; --surface: #efebe4; --surface-2: #e9e4db;
    --rule: rgba(20,23,28,.11); --rule-2: rgba(20,23,28,.2);
    --ink: #14171c; --text: #14171c; --text-dim: #454b56; --text-mute: #575e6b;
    --accent: #c0421c; --accent-2: #9e3416; --accent-bg: #f3dccf; --on-accent: #ffffff;
    --amber: #93560a; --amber-bg: #f1e2c8; --danger: #a3221a; --ok: #0e7843;
    --shadow: 0 1px 2px rgba(20,23,28,.05), 0 6px 20px -10px rgba(20,23,28,.12);
    --shadow-lg: 0 2px 6px rgba(20,23,28,.06), 0 16px 40px -16px rgba(20,23,28,.16);
    --shadow-sm: 0 1px 2px rgba(20,23,28,.05);
    /* Categorical: the family accents' paper steps, then one extra hue for a sixth series. */
    --c1: #c0421c; --c2: #0a7690; --c3: #6a3fd0; --c4: #93560a; --c5: #0e7843; --c6: #9a2f6a;
    color-scheme: light;
}
:root[data-theme="night"],
:root[data-theme="dark"],
:root[data-theme="sky"],
:root[data-theme="iris"],
:root[data-theme="blossom"],
:root[data-theme="ember"],
:root[data-theme="fern"],
:root[data-theme="abyss"],
:root[data-theme="plum"],
:root[data-theme="ip-dark"] {
    --ip-mark: #f43a2a; --ip-mark-glow: transparent; --innerpulse-ring: rgba(227,230,233,.14);
    /* Carbon ink (innerpulse-brand, 2026-11-05): the KDE theme's neutral cool-gray ground that the studio's pages
       wear, with steel text and hairlines drawn from it, so the steel wordmark and the ember sit on one material.
       (The warm #0a0908 set is now the kit's opt-in alternate.) */
    --paper: #0b0d10; --surface: #171a1f; --surface-2: #1f2329;
    --rule: #2b3037; --rule-2: #434950;
    --ink: #e3e6e9; --text: #cfd3d8; --text-dim: #b9bdc3; --text-mute: #8f949b;
    --amber: #e0a84a; --amber-bg: #2a2010; --danger: #e89292; --ok: #6fc492;
    --shadow: 0 1px 2px rgba(0,0,0,.45), 0 8px 24px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.5), 0 18px 40px -16px rgba(0,0,0,.7);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
}
:root[data-theme="night"], :root[data-theme="dark"] {
    --accent: #3dd6d0; --accent-2: #7ae8e3; --accent-bg: #0a2e2c; --on-accent: #04201e;
    --c1: #3dd6d0; --c2: #e0a057; --c3: #8fa2e8; --c4: #c9b661; --c5: #d492b5; --c6: #7fc396;
}
:root[data-theme="sky"] {
    --accent: #58a6ff; --accent-2: #79b8ff; --accent-bg: #0a2440; --on-accent: #041626;
    --c1: #58a6ff; --c2: #7fc396; --c3: #a78bfa; --c4: #e0a057; --c5: #d492b5; --c6: #3dd6d0;
}
:root[data-theme="iris"] {
    --accent: #a78bfa; --accent-2: #c3adfc; --accent-bg: #1a1440; --on-accent: #0e0a26;
    --c1: #a78bfa; --c2: #58a6ff; --c3: #d492b5; --c4: #7fc396; --c5: #e0a057; --c6: #3dd6d0;
}
:root[data-theme="blossom"] {
    --accent: #f0609e; --accent-2: #f987bb; --accent-bg: #301023; --on-accent: #250617;
    --c1: #f0609e; --c2: #a78bfa; --c3: #58a6ff; --c4: #7fc396; --c5: #e0a057; --c6: #3dd6d0;
}
:root[data-theme="ember"] {
    /* One warm color on carbon: the accent is the mark's own red, lifted for text (7.1:1 on the ground), as
       Light and Paper take the mark's red at their paper step. Charts keep orange as their first hue. */
    --accent: #ff6a4d; --accent-2: #ff8f78; --accent-bg: #3a1611; --on-accent: #2a0805;
    --c1: #ff8a3d; --c2: #e6b054; --c3: #f45d4c; --c4: #7cc486; --c5: #c98fc9; --c6: #5fb2b8;
}
:root[data-theme="fern"] {
    --rule: #243129; --rule-2: #3a4b3f;
    --accent: #2fdd8f; --accent-2: #5ce8ab; --accent-bg: #0d2b1d; --on-accent: #06281a;
    --c1: #2fdd8f; --c2: #8fd460; --c3: #3fa8a0; --c4: #e0b054; --c5: #d4869f; --c6: #7fa8d9;
}
:root[data-theme="abyss"] {
    --rule: #2e2f26; --rule-2: #4a4833;
    --accent: #f7c948; --accent-2: #fbd570; --accent-bg: #33290c; --on-accent: #2b2000;
    --c1: #f7c948; --c2: #4ade80; --c3: #58a6ff; --c4: #f07a7a; --c5: #c084fc; --c6: #3dd6d0;
}
:root[data-theme="plum"] {
    --rule: #2e2a36; --rule-2: #4a4158;
    --accent: #cf6cff; --accent-2: #dd8fff; --accent-bg: #2e1545; --on-accent: #240937;
    --c1: #cf6cff; --c2: #4ade80; --c3: #f7c948; --c4: #58a6ff; --c5: #f07a8f; --c6: #3dd6d0;
}

:root[data-theme="ip-dark"] {
    /* innerpulse brand, ink set (references/themes.md §3): ink ground and surfaces, the ink text
       steps, hairlines, the phosphor accents and coral (AI & agents) as the family accent. Ember
       is not a chart color — it is reserved for the mark and small signals. */
    /* Read for long stretches, so: the ground lifted off pure black, body text a step
       below the headings' white (less halation), and the secondary steps brighter. */
    --paper: #0f1114; --surface: #15181c; --surface-2: #1b1f24;
    --rule: rgba(227,230,233,.10); --rule-2: rgba(227,230,233,.18);
    --ink: #f0f2f5; --text: #d3d7dc; --text-dim: #bfc3c9; --text-mute: #a5aab1;
    --accent: #ff7a59; --accent-2: #ff9c80; --accent-bg: #2b140d; --on-accent: #1a0802;
    --amber: #ffb347; --amber-bg: #2a1d0a; --danger: #ff9a8f; --ok: #7dffb0;
    --c1: #ff7a59; --c2: #52e3ff; --c3: #b38cff; --c4: #ffb347; --c5: #7dffb0; --c6: #8fb4ff;
}

/* The filled button is the brand's action color on both innerpulse grounds and Ember — never the
   bright ember, which is 3.8:1 under white text. */
:root[data-theme="ip-light"] .btn-primary, :root[data-theme="ip-dark"] .btn-primary, :root[data-theme="ember"] .btn-primary {
    background: #d12c1e; border-color: #d12c1e; color: #fff;
}
:root[data-theme="ip-light"] .btn-primary:hover, :root[data-theme="ip-dark"] .btn-primary:hover, :root[data-theme="ember"] .btn-primary:hover {
    background: #bd2417; border-color: #bd2417; color: #fff; box-shadow: none;
}

/* Derived tokens — the atlas palette, mixed from whichever theme is active. */
:root {
    --innerpulse-pulse: var(--ip-mark);
    --innerpulse-pulse-glow: var(--ip-mark-glow);
    --hair:        color-mix(in srgb, var(--rule) 75%, transparent);
    --wash:        color-mix(in srgb, var(--accent) 7%, var(--surface));
    --wash-2:      color-mix(in srgb, var(--accent) 13%, var(--surface));
    --edge:        color-mix(in srgb, var(--accent) 30%, var(--rule));
    --atlas-line:  color-mix(in srgb, var(--ink) 30%, var(--paper));
    --atlas-line-2: color-mix(in srgb, var(--ink) 50%, var(--paper));
    --atlas-grid:  color-mix(in srgb, var(--rule) 55%, transparent);
    --atlas-plate: color-mix(in srgb, var(--surface) 80%, var(--paper));
    --atlas-plate-edge: var(--rule);
    --atlas-land:  color-mix(in srgb, var(--accent) 7%, var(--surface));
}

/* --------------------------------------------------------------------------
   3. Base
   -------------------------------------------------------------------------- */

* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "cv05" 1;  /* cv05: Inter's tailed l, so Il1 differ */
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--text);
    font-family: var(--sans);
    font-size: var(--fs-lg);
    line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
main:focus { outline: none; }

::selection { background: var(--accent-bg); color: var(--ink); }

svg { overflow: visible; }
.glyph { display: inline-block; vertical-align: -0.15em; flex: none; }

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    background: var(--surface); color: var(--ink);
    border: 1px solid var(--rule-2); border-radius: var(--radius-s);
    padding: 10px 16px; font-size: var(--fs-base); font-weight: var(--fw-medium);
    box-shadow: var(--shadow); transition: top var(--ease);
}
.skip-link:focus { top: 12px; text-decoration: none; }

.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 32px; }

/* Reading progress, only on articles. */
#progress {
    position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 60;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 90ms linear;
}

/* Typographic defaults: lining figures in every serif setting (this is a
   publication of dates, scores and version numbers), balanced headlines. */
.page-head h1, .shelf-head h2, .lead-title, .doc-title, .article-head h1,
.article-standfirst, .article-body, .section-label h2 {
    font-variant-numeric: lining-nums proportional-nums;
}
.article-body th, .article-body td { font-variant-numeric: lining-nums tabular-nums; }
.page-head h1, .shelf-head h2, .lead-title, .doc-title, .topic-card h3,
.article-head h1, .article-body h2, .article-body h3, .article-body h4, .tl-title { text-wrap: balance; }
.lead-summary, .doc-summary, .article-standfirst, .page-head p, .article-body p, .article-body li { text-wrap: pretty; }

/* --------------------------------------------------------------------------
   3b. Masthead
   -------------------------------------------------------------------------- */

.masthead {
    position: sticky; top: 0; z-index: 40;
    background: color-mix(in srgb, var(--paper) 82%, transparent);
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    border-bottom: 1px solid var(--hair);
}
.masthead .wrap { display: flex; align-items: center; gap: 24px; min-height: 62px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand:hover { text-decoration: none; }
.brand-emblem { display: inline-flex; line-height: 0; }
.brand-emblem-svg { width: 30px; height: 30px; overflow: visible; }
/* innerpulse glyph — never rotated or stretched; hover only lifts the phosphor glow */
.ip-glyph rect { fill: var(--ip-mark); }
.ip-glyph path { fill: none; stroke: var(--ip-mark); }
.brand-wordmark-svg { display: block; height: 21px; width: auto; color: var(--ink); transition: color var(--ease); }
.brand:hover .brand-wordmark-svg { color: var(--accent); }
.brand-wordmark {
    font-family: var(--sans); font-size: var(--fs-2xl); font-weight: 800;
    letter-spacing: -0.02em; line-height: 1; color: var(--ink); text-transform: lowercase;
}
.brand:hover .brand-wordmark { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.nav-links { display: flex; align-items: center; gap: 2px; min-width: 0; overflow-x: auto; flex: 1 1 auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
    flex: none; position: relative;
    color: var(--text-dim); font-size: var(--fs-base); font-weight: var(--fw-medium);
    padding: 7px 12px; border-radius: 999px; text-decoration: none;
    transition: background var(--ease), color var(--ease);
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.nav-links a.is-active { color: var(--accent); background: var(--accent-bg); }

.nav-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }

.searchbar { position: relative; display: flex; align-items: center; }
.searchbar input[type="search"] {
    padding: 7px 30px 7px 34px; width: 190px;
    background: var(--surface-2); border-color: transparent; border-radius: 999px;
    transition: width 180ms ease, border-color var(--ease), box-shadow var(--ease), background var(--ease);
}
.searchbar input[type="search"]:focus { width: 250px; background: var(--surface); }
.searchbar::before {
    content: ""; position: absolute; left: 12px; top: 50%; width: 13px; height: 13px;
    transform: translateY(-50%); opacity: .5; pointer-events: none; background: currentColor; color: var(--text-mute);
    -webkit-mask: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
            mask: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
}
.search-kbd {
    position: absolute; right: 10px; pointer-events: none;
    font-family: var(--mono); font-size: var(--fs-micro); font-weight: var(--fw-semibold);
    color: var(--text-mute); background: var(--surface); border: 1px solid var(--rule);
    border-radius: var(--radius-xs); padding: 1px 5px; line-height: 1.2;
    transition: opacity var(--ease), transform var(--ease);
}
.searchbar input:focus ~ .search-kbd, .searchbar input:not(:placeholder-shown) ~ .search-kbd { opacity: 0; transform: scale(.85); }

.nav-auth {
    color: var(--text-dim); font-size: var(--fs-sm); font-weight: var(--fw-medium);
    padding: 6px 13px; border-radius: 999px; border: 1px solid var(--rule); white-space: nowrap;
}
.nav-auth:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.nav-account { font-size: var(--fs-xs); color: var(--text-mute); max-width: 22ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-signout { margin: 0; }
.nav-signout button { background: none; border: 0; padding: 6px 8px; font: inherit; font-size: var(--fs-xs); color: var(--text-mute); cursor: pointer; border-radius: 999px; white-space: nowrap; }
.nav-signout button:hover { color: var(--ink); background: var(--surface-2); }

/* Theme picker */
.theme-picker { position: relative; flex: none; }
.theme-toggle {
    width: 34px; height: 34px; border-radius: 999px;
    border: 1px solid transparent; background: transparent; color: var(--text-dim);
    display: grid; place-items: center; cursor: pointer; padding: 0;
    transition: border-color var(--ease), color var(--ease), background var(--ease);
}
.theme-toggle:hover, .theme-picker.is-open .theme-toggle { color: var(--ink); border-color: var(--rule); background: var(--surface-2); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-menu {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 50;
    min-width: 200px; padding: 8px; display: none;
    background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.theme-picker.is-open .theme-menu { display: grid; gap: 2px; }
.theme-option {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px;
    border: 0; border-radius: var(--radius-s); background: transparent; color: var(--text);
    font: inherit; font-size: var(--fs-sm); cursor: pointer; text-align: left;
}
.theme-option:hover, .theme-option:focus-visible { background: var(--surface-2); color: var(--ink); }
.theme-option.is-active { background: var(--accent-bg); color: var(--accent); font-weight: var(--fw-medium); }
.theme-swatch {
    width: 22px; height: 22px; border-radius: 999px; flex: none;
    border: 1px solid color-mix(in srgb, var(--rule-2) 70%, transparent);
    background: linear-gradient(135deg, var(--sw-paper) 50%, var(--sw-surface) 50%), var(--sw-accent);
    box-shadow: inset -6px -6px 0 0 var(--sw-accent);
}
.theme-option[data-theme="ip-light"] { --sw-paper: #f4f1ec; --sw-surface: #e9e4db; --sw-accent: #d12c1e; }
.theme-option[data-theme="ip-dark"]  { --sw-paper: #0b0d10; --sw-surface: #1f2329; --sw-accent: #f43a2a; }
.theme-option[data-theme="canvas"]  { --sw-paper: #f6f8fa; --sw-surface: #fff;    --sw-accent: #0863cd; }
.theme-option[data-theme="paper"]   { --sw-paper: #f4efe6; --sw-surface: #fbf8f2; --sw-accent: #8a4b1f; }
.theme-option[data-theme="solar"]   { --sw-paper: #fdf6e3; --sw-surface: #fffcf0; --sw-accent: #1c669a; }
.theme-option[data-theme="dawn"]    { --sw-paper: #faf4ed; --sw-surface: #fffaf3; --sw-accent: #286983; }
.theme-option[data-theme="night"]   { --sw-paper: #0b0d10; --sw-surface: #1f2329; --sw-accent: #3dd6d0; }
.theme-option[data-theme="sky"]     { --sw-paper: #0b0d10; --sw-surface: #1f2329; --sw-accent: #58a6ff; }
.theme-option[data-theme="iris"]    { --sw-paper: #0b0d10; --sw-surface: #1f2329; --sw-accent: #a78bfa; }
.theme-option[data-theme="blossom"] { --sw-paper: #0b0d10; --sw-surface: #1f2329; --sw-accent: #f0609e; }
.theme-option[data-theme="ember"]   { --sw-paper: #0b0d10; --sw-surface: #1f2329; --sw-accent: #ff6a4d; }
.theme-option[data-theme="fern"]    { --sw-paper: #0b0d10; --sw-surface: #1f2329; --sw-accent: #2fdd8f; }
.theme-option[data-theme="abyss"]   { --sw-paper: #0b0d10; --sw-surface: #1f2329; --sw-accent: #f7c948; }
.theme-option[data-theme="plum"]    { --sw-paper: #0b0d10; --sw-surface: #1f2329; --sw-accent: #cf6cff; }
.theme-menu-label {
    font-family: var(--meta); font-size: var(--fs-micro); letter-spacing: var(--track-micro); text-transform: uppercase;
    color: var(--text-mute); padding: 6px 10px 4px; margin: 0;
}
.theme-menu-label:not(:first-child) { margin-top: 4px; border-top: 1px solid var(--rule); padding-top: 10px; }

/* --------------------------------------------------------------------------
   4. Controls and furniture
   -------------------------------------------------------------------------- */

input[type="text"], input[type="search"], input[type="number"], input[type="url"], input[type="email"], input[type="password"], textarea, select {
    background: var(--surface); border: 1px solid var(--rule); color: var(--text);
    padding: 8px 12px; border-radius: var(--radius-s); font-family: inherit; font-size: var(--fs-base);
    outline: none; transition: border-color var(--ease), box-shadow var(--ease);
}
input:focus, textarea:focus, select:focus { border-color: color-mix(in srgb, var(--accent) 55%, var(--rule)); box-shadow: var(--focus); }
input::placeholder, textarea::placeholder { color: var(--text-mute); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--surface); border: 1px solid var(--rule-2); color: var(--text);
    padding: 9px 16px; border-radius: 999px; font-size: var(--fs-base); font-family: inherit; font-weight: var(--fw-medium);
    cursor: pointer; text-decoration: none; line-height: 1.3;
    transition: background var(--ease), border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}
.btn:hover { background: var(--surface-2); border-color: var(--text-mute); text-decoration: none; color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--on-accent); box-shadow: 0 8px 20px -12px color-mix(in srgb, var(--accent) 90%, transparent); }
.btn-ghost { background: transparent; border-color: var(--rule); }
.btn-sm { padding: 5px 12px; font-size: var(--fs-sm); }
.btn .glyph { width: 14px; height: 14px; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: var(--gap) 56px; padding: 28px 0 80px; align-items: start; }

/* Page head: eyebrow, headline, standfirst, and optionally an atlas field
   drawn behind the right-hand side so every index page opens on a plate. */
.page-head { position: relative; padding: clamp(34px, 5vw, 60px) 0 14px; }
.page-head h1 {
    margin: 0 0 10px; font-family: var(--serif); font-size: clamp(2rem, 3.4vw, 2.9rem);
    line-height: var(--leading-title); letter-spacing: var(--track-tighter); font-weight: var(--fw-semibold); color: var(--ink);
    max-width: 24ch; position: relative;
}
.page-head p { margin: 0; color: var(--text-dim); font-size: var(--fs-md); line-height: var(--leading-ui); max-width: 62ch; position: relative; }
.page-head .eyebrow { position: relative; }
.page-head.has-field { padding-right: min(38%, 420px); min-height: 200px; }
.page-head-art {
    position: absolute; right: -8px; top: 0; bottom: 0; width: min(46%, 520px);
    pointer-events: none; z-index: 0;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 32%, #000 92%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 32%, #000 92%, transparent);
}
.page-head-art .atlas-field { width: 100%; height: 100%; display: block; }
.page-head-mark { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.page-head-mark .section-mark { width: 44px; height: 44px; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-family: var(--meta); font-size: var(--fs-label); letter-spacing: var(--track-label);
    text-transform: uppercase; color: var(--accent); margin: 0 0 10px; font-weight: var(--fw-medium);
}
.eyebrow a { color: inherit; }
.eyebrow .format-badge, .eyebrow .live-badge, .eyebrow .kind-badge, .eyebrow .access-badge { margin-left: 2px; vertical-align: 1px; }

.section-label {
    display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
    border-bottom: 1px solid var(--rule-2); padding-bottom: 10px; margin-bottom: 20px;
}
.section-label h2 {
    margin: 0; font-family: var(--meta); font-size: var(--fs-label); letter-spacing: var(--track-label);
    text-transform: uppercase; color: var(--ink); font-weight: var(--fw-semibold);
}
.section-label span { font-size: var(--fs-xs); color: var(--text-mute); text-align: right; }
.section-label h2 a { color: inherit; }
.section-label h2 a:hover { color: var(--accent); text-decoration: none; }

/* Tags and badges */
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag {
    display: inline-flex; align-items: center; font-size: var(--fs-xs); color: var(--text-dim);
    background: var(--surface-2); border: 1px solid var(--hair); border-radius: 999px;
    padding: 3px 11px; text-decoration: none; transition: color var(--ease), background var(--ease), border-color var(--ease);
}
a.tag:hover { color: var(--on-accent); background: var(--accent); border-color: var(--accent); text-decoration: none; }
.tag .count { color: var(--text-mute); margin-left: 6px; font-family: var(--meta); font-size: var(--fs-label); }
a.tag:hover .count { color: inherit; opacity: .8; }
a.tag.topic-pill { color: var(--accent); background: transparent; border-color: color-mix(in srgb, var(--accent) 32%, transparent); font-weight: var(--fw-medium); }
a.tag.topic-pill:hover { color: var(--on-accent); background: var(--accent); }

.format-badge, .kind-badge, .access-badge, .live-badge {
    display: inline-flex; align-items: center; gap: 5px; vertical-align: 2px; margin-left: 6px;
    font-family: var(--meta); font-size: var(--fs-micro); font-weight: var(--fw-medium);
    letter-spacing: var(--track-micro); text-transform: uppercase; white-space: nowrap;
    border-radius: 999px; padding: 1px 8px; line-height: 1.6;
}
.format-badge.format-brief { color: var(--accent); background: color-mix(in srgb, var(--accent-bg) 70%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); }
.format-badge.format-deep  { color: var(--amber);  background: color-mix(in srgb, var(--amber-bg) 70%, var(--surface));  border: 1px solid color-mix(in srgb, var(--amber) 28%, transparent); }
.kind-badge { color: var(--text-dim); background: var(--surface-2); border: 1px solid var(--rule); }
.kind-guide { color: var(--accent); background: color-mix(in srgb, var(--accent-bg) 70%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 28%, transparent); }
.kind-note  { color: var(--amber);  background: color-mix(in srgb, var(--amber-bg) 70%, var(--surface));  border-color: color-mix(in srgb, var(--amber) 28%, transparent); }
.access-badge { color: var(--text-dim); border: 1px dashed var(--rule-2); background: transparent; }
.access-badge .glyph { width: 11px; height: 11px; }
.live-badge { color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent-bg) 50%, transparent); }
.live-badge::before {
    content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none;
    animation: live-pulse 2s infinite ease-in-out;
}
@keyframes live-pulse {
    0%   { transform: scale(.95); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); }
    70%  { transform: scale(1);   box-shadow: 0 0 0 4px transparent; }
    100% { transform: scale(.95); box-shadow: 0 0 0 0 transparent; }
}

/* Reading-depth gauge beside a title. */
.depth { display: inline-block; vertical-align: -1px; margin-right: 2px; flex: none; }

/* Sidebar */
.sidebar { font-size: var(--fs-base); }
.side-block { margin-bottom: 28px; }
.side-block h3 {
    font-family: var(--meta); font-size: var(--fs-label); letter-spacing: var(--track-label); text-transform: uppercase;
    color: var(--ink); margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); font-weight: var(--fw-semibold);
}
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 8px; margin: 0 -8px; border-radius: var(--radius-s); transition: background var(--ease); }
.side-list li:hover { background: var(--surface-2); }
.side-list a { color: var(--text-dim); text-decoration: none; }
.side-list a:hover { color: var(--accent); }
.side-list .count { color: var(--text-mute); font-family: var(--meta); font-size: var(--fs-label); }
.side-empty { color: var(--text-mute); font-size: var(--fs-sm); margin: 0; }
.side-topics li { align-items: baseline; }
.side-topics .t-desc { display: block; font-size: var(--fs-xs); color: var(--text-mute); line-height: var(--leading-ui); margin-top: 2px; }

/* --------------------------------------------------------------------------
   5. Browsing surfaces
   -------------------------------------------------------------------------- */

/* Lead story ---------------------------------------------------------- */
.spread { padding: clamp(30px, 4.5vw, 56px) 0 8px; }
.lead { position: relative; padding-bottom: 28px; border-bottom: 1px solid var(--hair); }
.lead .eyebrow { margin-bottom: 14px; }
.lead .eyebrow .glyph { width: 12px; height: 12px; color: var(--accent); }
.lead-title {
    margin: 0 0 16px; font-family: var(--serif); font-size: var(--fs-display);
    line-height: var(--leading-title); letter-spacing: var(--track-tighter); font-weight: var(--fw-semibold); max-width: 26ch;
}
.lead-title a { color: var(--ink); text-decoration: none; transition: color var(--ease); }
.lead-title a:hover { color: var(--accent); text-decoration: none; }
.lead-summary { margin: 0 0 20px; font-family: var(--serif); font-size: var(--fs-2xl); color: var(--text-dim); line-height: 1.55; max-width: 62ch; }
.lead-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; font-size: var(--fs-sm); color: var(--text-mute); font-family: var(--meta); }
.lead-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--rule-2); }
.lead-meta .tag-row { margin-left: 4px; }
.lead-figures { margin: 6px 0 22px; }
.lead-figures .figures { margin: 0; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.lead-figures .figure { padding: 12px 16px; }
.lead-figures .figure-value { font-size: 1.5rem; }
.lead-figures .figure-label { font-size: var(--fs-xs); margin-top: 4px; }
.lead-figures .figure-foot { margin-top: 5px; }
.lead-figures .figure-delta, .lead-figures .figure-note { font-size: var(--fs-micro); }
.section-band .lead, .layout .lead { padding: 4px 0 24px; }
.section-band .lead-title, .layout .lead-title { font-size: var(--fs-4xl); max-width: 40ch; }
.section-band .lead-summary, .layout .lead-summary { font-size: var(--fs-lg); margin-bottom: 14px; }
.section-band .lead + .year-group, .layout .lead + .year-group { padding-top: 22px; }

/* Wire and Latest: two compact strips under the lead ------------------ */
.wire, .latest { padding: 20px 0 0; }
.wire-label, .latest-label {
    display: flex; align-items: center; gap: 10px; margin: 0 0 12px;
    font-family: var(--meta); font-size: var(--fs-label); letter-spacing: var(--track-label);
    text-transform: uppercase; color: var(--accent); font-weight: var(--fw-medium);
}
.wire-label::after, .latest-label::after { content: ""; flex: 1; height: 1px; background: var(--hair); }
.wire-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 28px; }
.wire-item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; padding: 9px 0; align-items: baseline; border-bottom: 1px solid var(--hair); }
.wire-date, .latest-date { font-family: var(--meta); font-size: var(--fs-label); color: var(--text-mute); white-space: nowrap; }
.wire-body { min-width: 0; }
.wire-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--serif); font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--ink); line-height: var(--leading-heading); }
.wire-title:hover { color: var(--accent); text-decoration: none; }
.wire-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 2px; font-family: var(--meta); font-size: var(--fs-label); color: var(--text-mute); }
.wire-meta a { color: var(--text-dim); }
.wire-meta a:hover { color: var(--accent); }
.wire-meta .live-badge { margin-left: 0; }
.latest-list { list-style: none; margin: 0; padding: 0; }
.latest-item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 8px 14px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--hair); transition: background var(--ease); }
.latest-title { font-family: var(--serif); font-size: var(--fs-lg); font-weight: var(--fw-semibold); color: var(--ink); line-height: var(--leading-heading); }
.latest-title:hover { color: var(--accent); text-decoration: none; }
.latest-meta { font-family: var(--meta); font-size: var(--fs-label); color: var(--text-mute); white-space: nowrap; }
.wire-item:hover .wire-date, .latest-item:hover .latest-date { color: var(--accent); }

/* Shelves: one per section on the home page -------------------------- */
.home .shelves { padding: clamp(34px, 4.5vw, 56px) 0 8px; }
.home .shelves + .shelves { border-top: 1px solid var(--hair); }
.shelf-head { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "mark title" "mark dek" "mark chips"; column-gap: 18px; row-gap: 6px; margin-bottom: 18px; align-items: start; }
.shelf-mark { grid-area: mark; display: inline-flex; flex-direction: column; align-items: center; gap: 6px; }
.shelf-mark .section-mark { width: 48px; height: 48px; }
.shelf-index { font-family: var(--meta); font-size: var(--fs-micro); letter-spacing: var(--track-micro); color: var(--text-mute); }
.shelf-head h2 { grid-area: title; margin: 0; font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: var(--fw-semibold); letter-spacing: var(--track-tight); line-height: 1.15; }
.shelf-head h2 a { color: var(--ink); text-decoration: none; }
.shelf-head h2 a:hover { color: var(--accent); }
.shelf-dek { grid-area: dek; margin: 0; color: var(--text-dim); font-size: var(--fs-md); line-height: var(--leading-ui); max-width: 64ch; }
.topic-chips { grid-area: chips; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.shelf-docs { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0 var(--gap); align-items: start; }
.shelf-item { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--hair); grid-column: 2; }
.shelf-item:last-of-type { border-bottom: 0; }
.shelf-body { min-width: 0; }
.shelf-item.is-feature {
    grid-column: 1; grid-row: 1 / span 4; display: block; padding: 22px 24px 20px;
    background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
    transition: border-color var(--ease), box-shadow var(--ease-out), transform var(--ease-out);
}
.shelf-item.is-feature::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); opacity: 0; transition: opacity var(--ease); }
.shelf-item.is-feature:hover { border-color: var(--edge); box-shadow: var(--shadow); transform: translateY(-1px); }
.shelf-item.is-feature:hover::before { opacity: 1; }
.shelf-item .doc-title a { color: var(--ink); text-decoration: none; }
.shelf-item .doc-title a:hover { color: var(--accent); }
.shelf-item.is-feature .doc-kicker { margin-bottom: 8px; }
.shelf-item.is-feature .doc-title { font-family: var(--serif); font-size: var(--fs-3xl); line-height: var(--leading-heading); margin-bottom: 10px; }
.shelf-item.is-feature .doc-summary { max-width: 58ch; margin-bottom: 10px; font-size: var(--fs-md); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.shelf-item:not(.is-feature) .doc-title { font-family: var(--serif); font-size: var(--fs-lg); font-weight: var(--fw-semibold); margin: 0; line-height: var(--leading-heading); }
.shelf-end { font-family: var(--meta); font-size: var(--fs-label); color: var(--text-mute); flex: none; }
.shelf-docs .topic-more { grid-column: 2; }
.topic-more {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 12px;
    font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--accent); text-decoration: none;
    transition: gap var(--ease), color var(--ease);
}
.topic-more:hover { gap: 10px; color: var(--accent-2); text-decoration: none; }
.doc-kicker { margin: 0 0 3px; font-family: var(--meta); font-size: var(--fs-micro); letter-spacing: var(--track-micro); text-transform: uppercase; color: var(--accent); }

/* Explore bar at the foot of the home page */
.explore-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; margin-top: 36px; padding: 24px 0 36px; border-top: 1px solid var(--hair); }
.explore-label { font-family: var(--meta); font-size: var(--fs-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-mute); margin-right: 4px; }
.explore-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.explore-indexes { display: flex; gap: 16px; flex: none; font-size: var(--fs-sm); }
.explore-indexes a { color: var(--text-dim); }
.explore-indexes a:hover { color: var(--accent); }

/* Section page band -------------------------------------------------- */
.band { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; align-items: start; }
.section-band { padding: 8px 0 80px; }
.band-side h3 { font-family: var(--meta); font-size: var(--fs-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink); margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); font-weight: var(--fw-semibold); }
.shelf-figures { margin: 20px 0 4px; max-width: 46rem; position: relative; }
.shelf-figures .figures { margin: 0; }
.shelf-figures .figure { padding: 11px 15px; }
.shelf-figures .figure-value { font-size: var(--fs-xl); }
.shelf-figures .figure-label { font-size: var(--fs-label); margin-top: 3px; }

/* Document lists (library, archive, section, topic, tag, search) ------ */
.year-group { margin-bottom: 32px; }
.year-label { font-family: var(--meta); font-size: var(--fs-label); letter-spacing: var(--track-label); color: var(--text-mute); padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--rule); display: flex; align-items: center; gap: 10px; }
.year-label::before { content: ""; width: 8px; height: 8px; border: 1.5px solid var(--accent); border-radius: 50%; }
.doc-item {
    display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 4px 18px;
    padding: 16px 12px; margin: 0 -12px; border-bottom: 1px solid var(--hair); border-radius: var(--radius-s);
    transition: background var(--ease), box-shadow var(--ease);
}
.doc-item:last-child { border-bottom: 0; }
.doc-item:hover { background: color-mix(in srgb, var(--accent) 5%, transparent); box-shadow: inset 2px 0 0 0 var(--accent); }
.doc-item:hover .doc-date { color: var(--accent); }
.doc-date { font-family: var(--meta); font-size: var(--fs-label); color: var(--text-mute); padding-top: 4px; white-space: nowrap; display: flex; flex-direction: column; gap: 6px; }
.doc-title { margin: 0 0 5px; font-family: var(--serif); font-size: var(--fs-xl); line-height: var(--leading-heading); font-weight: var(--fw-semibold); }
.doc-title a { color: var(--ink); text-decoration: none; }
.doc-title a:hover { color: var(--accent); }
.doc-summary { margin: 0 0 8px; color: var(--text-dim); font-size: var(--fs-base); line-height: var(--leading-ui); max-width: 66ch; }
.doc-meta { margin: 0; font-family: var(--meta); font-size: var(--fs-label); color: var(--text-mute); }
.doc-meta + .tag-row { margin-top: 8px; }
.doc-item.format-brief { padding-top: 12px; padding-bottom: 12px; }
.doc-item.format-brief .doc-title { font-size: var(--fs-lg); margin-bottom: 3px; }
.doc-item.format-brief .doc-summary-brief { font-size: var(--fs-sm); margin-bottom: 4px; color: var(--text-mute); }
.doc-item.format-deep .doc-summary { max-width: 70ch; }
.band-docs .doc-item:first-child { padding-top: 12px; }
.band-docs .topic-more { margin-top: 12px; }

/* Topic cards (topics index) ----------------------------------------- */
.shelves { padding: 36px 0 4px; }
.topics-index { padding-bottom: 80px; }
.topics-index .section-label { align-items: center; gap: 14px; }
.topics-index .section-label h2 { display: inline-flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: var(--fs-3xl); letter-spacing: var(--track-tight); text-transform: none; }
.topics-index .section-label .section-mark { width: 34px; height: 34px; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; }
.topic-card {
    background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 20px 16px;
    display: flex; flex-direction: column; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
    transition: border-color var(--ease), box-shadow var(--ease-out), transform var(--ease-out);
}
.topic-card:hover { border-color: var(--edge); box-shadow: var(--shadow); transform: translateY(-2px); }
.topic-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.monogram { width: 30px; height: 30px; border-radius: 999px; flex: none; display: grid; place-items: center; font-family: var(--meta); font-weight: var(--fw-bold); font-size: var(--fs-sm); background: var(--accent-bg); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.topic-card h3 { margin: 0; font-size: var(--fs-md); font-weight: var(--fw-semibold); letter-spacing: var(--track-tight); }
.topic-card h3 a { color: var(--ink); text-decoration: none; }
.topic-card h3 a:hover { color: var(--accent); }
.topic-desc { margin: -2px 0 12px; font-size: var(--fs-sm); color: var(--text-mute); line-height: var(--leading-ui); }
.topic-links { list-style: none; margin: 0 0 12px; padding: 0; flex: 1; }
.topic-links li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 6px 0; border-top: 1px solid var(--hair); }
.topic-links li:first-child { border-top: 0; padding-top: 0; }
.topic-links a { color: var(--text-dim); text-decoration: none; font-size: var(--fs-sm); line-height: var(--leading-ui); }
.topic-links a:hover { color: var(--accent); }
.topic-links .when { font-family: var(--meta); font-size: var(--fs-label); color: var(--text-mute); flex: none; }
.topic-card .topic-more { margin-top: auto; }

/* Tag index */
.tag-index { padding-top: 8px; }
.tag-index .tag-row { gap: 10px; }
.tag-index .tag { font-size: var(--fs-sm); padding: 6px 14px; }

/* Library filter ----------------------------------------------------- */
.lib-filter { margin: 18px 0 8px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.lib-filter-cap { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.lib-field { display: grid; gap: 6px; flex: 1 1 150px; min-width: 0; }
.lib-search { flex: 2 1 240px; }
.lib-label { font-family: var(--meta); font-size: var(--fs-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-mute); }
.lib-field input, .lib-field select { width: 100%; }
.lib-filters-toggle { flex: none; display: none; align-items: center; gap: 7px; min-height: 38px; }
.lib-filters-toggle[aria-expanded="true"] { color: var(--accent); border-color: var(--edge); background: var(--wash); }
.lib-toggle-count { font-family: var(--meta); font-size: var(--fs-xs); }
.lib-filter-full { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--hair); }
.lib-filter-full > summary { display: none; }
.lib-filter-full[hidden] { display: none !important; }
.lib-filter-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.lib-apply { flex: none; }
.lib-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.lib-count { font-family: var(--meta); font-size: var(--fs-xs); color: var(--text-mute); margin-right: 4px; }
.lib-chip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--accent); background: var(--wash); border: 1px solid var(--edge); border-radius: 999px; padding: 3px 10px; text-decoration: none; }
.lib-chip:hover { color: var(--on-accent); background: var(--accent); text-decoration: none; }
.lib-clear { font-size: var(--fs-xs); color: var(--text-mute); }
.search-page { display: flex; gap: 8px; align-items: stretch; max-width: 36rem; margin: 18px 0 10px; position: relative; }
.search-page input[type="search"] { flex: 1; min-width: 0; padding: 11px 16px; border-radius: 999px; font-size: var(--fs-md); }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: var(--fs-sm); }
.pager a { font-weight: var(--fw-medium); }
.pager .is-off { color: var(--text-mute); opacity: .5; }
.pager-at { font-family: var(--meta); font-size: var(--fs-xs); color: var(--text-mute); }

/* --------------------------------------------------------------------------
   6. The atlas — plates, fields and the map
   -------------------------------------------------------------------------- */

.section-mark { display: inline-block; vertical-align: middle; flex: none; }

/* Index plate on the home page: the map beside the section/topic list. */
.atlas-index {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--gap);
    align-items: center; margin: clamp(30px, 4.5vw, 56px) 0 0; padding: clamp(22px, 3vw, 36px);
    background: linear-gradient(150deg, var(--wash), transparent 60%), var(--atlas-plate);
    border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.atlas-index-copy h2 { margin: 0 0 8px; font-family: var(--serif); font-size: clamp(1.4rem, 2.2vw, 1.85rem); letter-spacing: var(--track-tight); color: var(--ink); }
.atlas-index-dek { margin: 0 0 18px; color: var(--text-dim); font-size: var(--fs-md); line-height: var(--leading-ui); max-width: 46ch; }
.atlas-index-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 22px; }
.atlas-sec { display: flex; align-items: center; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--hair); }
.atlas-sec .section-mark { width: 24px; height: 24px; }
.atlas-sec-name { flex: 1; font-weight: var(--fw-semibold); font-size: var(--fs-md); color: var(--ink); text-decoration: none; }
.atlas-sec-name:hover { color: var(--accent); text-decoration: none; }
.atlas-sec-count, .atlas-topic-count { font-family: var(--meta); font-size: var(--fs-xs); color: var(--text-mute); }
.atlas-topic-list { list-style: none; margin: 8px 0 0; padding: 0; }
.atlas-topic-list a { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; font-size: var(--fs-sm); color: var(--text-dim); text-decoration: none; }
.atlas-topic-list a:hover { color: var(--accent); }
.atlas-index-foot { margin-top: 18px; }
.atlas-graph { display: flex; align-items: center; justify-content: center; min-width: 0; }
.atlas-graph svg, .atlas-plate svg { width: 100%; height: auto; display: block; }

/* The full plate on the topics index. */
.atlas-plate {
    margin: 22px 0 8px; padding: clamp(8px, 1.5vw, 16px);
    background: var(--atlas-plate); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-sm);
    position: relative;
}
.atlas-plate-caption { display: flex; justify-content: space-between; gap: 12px; padding: 8px 8px 2px; font-family: var(--meta); font-size: var(--fs-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-mute); }

/* Map internals. Text sizes are set here rather than in the SVG so the theme
   fonts apply; the compact map scales them down. */
.atlas-map { font-family: var(--sans); overflow: visible; }
.atlas-map a { text-decoration: none; }
.atlas-island-name { fill: var(--ink); font-size: 14px; font-weight: var(--fw-semibold); letter-spacing: -0.01em; }
.atlas-island-count { fill: var(--text-mute); font-family: var(--meta); font-size: 10.5px; }
.atlas-topic-name { fill: var(--text-dim); font-size: 11px; font-weight: var(--fw-medium); paint-order: stroke; stroke: var(--atlas-plate); stroke-width: 3px; stroke-linejoin: round; }
.atlas-compass-n { fill: var(--text-mute); font-family: var(--meta); font-size: 10px; letter-spacing: .1em; }
.atlas-scale-t { fill: var(--text-mute); font-family: var(--meta); font-size: 9.5px; }
.atlas-island-rings path { transition: stroke var(--ease), fill var(--ease); }
.atlas-island:hover .atlas-island-rings path, .atlas-island:focus-visible .atlas-island-rings path { stroke: var(--accent); }
.atlas-island:hover .atlas-island-rings path:first-child { fill: var(--wash-2); }
.atlas-island:hover .atlas-island-name { fill: var(--accent); }
.atlas-topic:hover .atlas-topic-halo, .atlas-topic:focus-visible .atlas-topic-halo { opacity: .16; }
.atlas-topic:hover .atlas-topic-name { fill: var(--accent); }
.atlas-topic:hover circle:not(.atlas-topic-halo) { fill: var(--accent); }
.atlas-map-compact .atlas-island-name { font-size: 13px; }
.atlas-map-compact .atlas-island-count { font-size: 10px; }
.atlas-map a:focus-visible { outline: none; }

/* Fields behind page heads draw their strokes a shade lighter. */
.atlas-field { --atlas-line: color-mix(in srgb, var(--ink) 22%, var(--paper)); }

/* Empty, locked, lost: a plate with an illustration on it. */
.empty, .empty-page {
    display: grid; justify-items: center; gap: 6px; padding: clamp(28px, 4vw, 48px) 24px;
    text-align: center; color: var(--text-mute); background: var(--surface); border: 1px solid var(--rule);
    border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.empty strong, .empty-page strong { display: block; color: var(--ink); font-family: var(--serif); font-size: var(--fs-2xl); font-weight: var(--fw-semibold); margin-top: 8px; }
.empty .state-art, .empty-page .state-art { width: min(320px, 100%); height: auto; margin-bottom: 6px; }
.empty-page { margin-bottom: 120px; }
.signin-prompt { display: grid; justify-items: start; gap: 16px; padding: 8px 0 80px; }
.signin-prompt p { margin: 0; }
.page-pad { height: 120px; }

/* --------------------------------------------------------------------------
   7. Article
   -------------------------------------------------------------------------- */

.article-layout {
    display: grid; grid-template-columns: 212px minmax(0, var(--column)); gap: 56px;
    padding: 0 0 80px; justify-content: center; align-items: start;
}
.article { min-width: 0; }
.article-head { padding: clamp(28px, 4vw, 44px) 0 26px; margin-bottom: 30px; border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, var(--rule)); }
.crumbs { font-size: var(--fs-sm); color: var(--text-mute); margin: 0 0 14px; }
.crumbs a { color: var(--text-mute); }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current="page"] { color: var(--text-dim); }
.crumb-edit { margin-left: 8px; font-family: var(--meta); font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: var(--track-micro); }
.article-head h1 {
    margin: 0 0 14px; font-family: var(--serif); font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: var(--leading-title);
    letter-spacing: var(--track-tighter); color: var(--ink); font-weight: var(--fw-semibold);
}
.article-standfirst { margin: 0 0 18px; font-family: var(--serif); font-size: var(--fs-2xl); line-height: 1.55; color: var(--text-dim); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; font-family: var(--meta); font-size: var(--fs-sm); color: var(--text-mute); }
.article-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--rule-2); }

/* 19px: at 18px the 700px column ran ~85 characters a line; this brings it to ~78. */
.article-body { font-family: var(--serif); font-size: var(--fs-2xl); line-height: 1.65; color: var(--text); }
.article-body > p, .article-body > ul, .article-body > ol, .article-body > blockquote,
.article-body > h1, .article-body > h2, .article-body > h3, .article-body > h4, .article-body > hr, .article-body > .figure-img { max-width: var(--measure); }
.article-body h1, .article-body h2 {
    margin: var(--space-5) 0 var(--space-2); font-size: var(--fs-4xl); line-height: var(--leading-heading); letter-spacing: var(--track-tight);
    color: var(--ink); font-weight: var(--fw-semibold); padding-top: var(--space-2); border-top: 1px solid var(--rule); position: relative;
}
.article-body h2::before { content: ""; position: absolute; top: -1px; left: 0; width: 36px; height: 2px; background: var(--accent); }
.article-body > h1:first-child, .article-body > h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.article-body > h2:first-child::before { display: none; }
.article-body h3 { margin: var(--space-4) 0 var(--space-1); font-size: var(--fs-3xl); line-height: var(--leading-heading); color: var(--ink); font-weight: var(--fw-semibold); letter-spacing: var(--track-tight); }
.article-body h4 { margin: var(--space-3) 0 var(--space-1); font-family: var(--sans); font-size: var(--fs-base); font-weight: var(--fw-semibold); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-dim); }
.article-body img, .article-body svg { max-width: 100%; height: auto; }
.figure-img { margin: 0 0 var(--space-4); }
.figure-img img { max-width: 100%; height: auto; border-radius: var(--radius-s); display: block; }
.figure-img figcaption { font: var(--fs-sm) var(--sans); color: var(--text-dim); margin-top: var(--space-1); }
.article-body p { margin: 0 0 var(--space-3); }
.article-body ul, .article-body ol { margin: 0 0 var(--space-3); padding-left: 1.4em; }
.article-body li { margin-bottom: var(--space-1); }
.article-body li::marker { color: var(--text-mute); }
.article-body li > ul, .article-body li > ol { margin: var(--space-1) 0 2px; }
.article-body li > p { margin-bottom: var(--space-1); }
.article-body strong { color: var(--ink); font-weight: var(--fw-semibold); }
.article-body a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px; }
.article-body a:hover { text-decoration-color: var(--accent); }
.article-body blockquote {
    margin: 0 0 var(--space-4); padding: 14px 20px; border-left: 3px solid var(--accent);
    background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); border-radius: 0 var(--radius-s) var(--radius-s) 0;
    color: var(--text-dim); font-style: italic;
}
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body code { font-family: var(--mono); font-size: .875em; background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--radius-xs); padding: 1px 5px; color: var(--ink); overflow-wrap: break-word; }
/* The block sets the code's size and leading itself: left to the reading
   column's 18px/1.7, every line box would keep that taller strut however small
   the code inside it, and a listing would print a third wider apart than set. */
.article-body pre { background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px 20px; overflow-x: auto; margin: 0 0 var(--space-4); font-family: var(--mono); font-size: var(--fs-base); line-height: 1.6; }
.article-body pre code { background: none; border: 0; padding: 0; font-size: inherit; line-height: inherit; }
.article-body pre[data-lang] { position: relative; padding-top: 34px; }
.article-body pre[data-lang]::before {
    content: attr(data-lang); position: absolute; top: 0; left: 0; right: 0; padding: 6px 16px;
    font-family: var(--meta); font-size: var(--fs-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-mute);
    background: var(--surface); border-bottom: 1px solid var(--rule); border-radius: var(--radius) var(--radius) 0 0;
}
.article-body hr { border: 0; border-top: 1px solid var(--rule); margin: var(--space-5) 0; }

/* Tables */
.table-wrap { margin: 0 0 var(--space-4); border: 1px solid var(--rule); border-radius: var(--radius); overflow-x: auto; background: var(--surface); box-shadow: var(--shadow-sm); }
.article-body table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: var(--fs-base); line-height: var(--leading-ui); min-width: 480px; }
.article-body thead th {
    position: sticky; top: 0; z-index: 1; text-align: left; font-size: var(--fs-label); letter-spacing: var(--track-label); text-transform: uppercase;
    color: var(--text-dim); font-weight: var(--fw-semibold); white-space: nowrap; padding: 12px 16px;
    background: color-mix(in srgb, var(--surface-2) 85%, var(--surface)); border-bottom: 1px solid var(--rule-2);
}
.article-body tbody td { padding: 12px 16px; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--text); }
.article-body tbody tr:last-child td { border-bottom: 0; }
.article-body tbody tr:hover { background: var(--accent-bg); }
.article-body td strong { color: var(--ink); font-weight: var(--fw-semibold); }
.article-body td .arrow { color: var(--accent); font-weight: var(--fw-bold); padding: 0 2px; }
.article-body td .delta { font-family: var(--sans); font-weight: var(--fw-semibold); }
.article-body td .delta.up { color: var(--ok); }
.article-body td .delta.down { color: var(--danger); }
.article-body tr.is-total td { background: var(--surface-2); font-weight: var(--fw-semibold); color: var(--ink); border-top: 1px solid var(--rule-2); }

/* Key figures */
figure.chart { display: block; margin-inline: 0; }
.figures {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(120px, 100%), 1fr)); gap: 1px; margin: 0 0 var(--space-4);
    background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
}
.figures-n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.figures-n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.figures-n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.figures-n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.article-body .figures-n5 .figure { padding: 16px 12px; }
.figure { background: var(--surface); padding: 18px 20px; position: relative; transition: background var(--ease); }
.figure:hover { background: var(--wash); }
.figure-value { font-family: var(--sans); font-size: 1.625rem; font-weight: var(--fw-semibold); color: var(--ink); letter-spacing: var(--track-tight); line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.figure-label { font-family: var(--sans); font-size: var(--fs-xs); color: var(--text-mute); margin-top: 6px; }
.figure-delta { display: inline-block; margin-top: 8px; font-family: var(--meta); font-size: var(--fs-label); padding: 2px 8px; border-radius: 999px; }
.figure-delta.up   { color: var(--ok);     background: color-mix(in srgb, var(--ok) 12%, transparent); }
.figure-delta.down { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }
.figure-delta.flat { color: var(--text-mute); background: var(--surface-2); }
.figure-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.figure-note { font-family: var(--sans); font-size: var(--fs-label); color: var(--text-mute); line-height: var(--leading-ui); }
.figure-foot .figure-delta { margin-top: 0; }
.sparkline { width: 80px; height: 24px; flex: none; overflow: visible; }

/* Charts */
.chart { margin: 0 0 var(--space-4); padding: 20px 20px 14px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; max-width: 100%; }
.chart-title { font-family: var(--sans); font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ink); margin-bottom: 14px; letter-spacing: -0.01em; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chart-key { display: inline-flex; align-items: center; gap: 7px; font-family: var(--sans); font-size: var(--fs-xs); color: var(--text-dim); background: var(--paper); border: 1px solid var(--rule); border-radius: 999px; padding: 3px 10px 3px 8px; }
.chart-key i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.chart-svg { width: 100%; height: auto; display: block; overflow: hidden; max-width: 100%; vertical-align: top; }
.chart-donut { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; justify-content: center; gap: 20px 36px; }
.chart-svg.chart-svg-donut { width: 240px; height: 240px; max-width: min(240px, 100%); min-width: 160px; min-height: 160px; aspect-ratio: 1 / 1; overflow: visible; }
.chart-donut-key { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; min-width: 0; max-width: 28rem; }
.chart-donut-key li { display: flex; align-items: flex-start; gap: 10px; font-family: var(--sans); font-size: var(--fs-sm); color: var(--text-dim); line-height: var(--leading-ui); }
.chart-donut-key i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; margin-top: .35em; }
.chart-svg .axis, .chart-svg .value { font-variant-numeric: tabular-nums; }
.chart-svg .grid      { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 2 4; opacity: .7; }
.chart-svg .axis-line { stroke: var(--rule-2); stroke-width: 1.5; }
.chart-svg .axis      { fill: var(--text-mute); font-family: var(--sans); font-size: var(--fs-label); }
.chart-svg .row-label { fill: var(--text-dim); font-size: var(--fs-xs); font-weight: var(--fw-medium); }
.chart-svg .value     { fill: var(--ink); font-family: var(--sans); font-size: var(--fs-label); font-weight: var(--fw-semibold); }
.chart-svg .bar-track { fill: var(--rule); opacity: .35; }
.chart-svg .bar, .chart-svg .slice { transition: opacity 140ms ease, filter 140ms ease; }
.chart-svg .bar:hover, .chart-svg .slice:hover { opacity: .85; filter: brightness(1.08); }
.chart-svg .dot { transition: r 140ms ease; }
.chart-svg .dot:hover { r: 6; }
.chart-svg .line { filter: drop-shadow(0 1px 2px rgba(0,0,0,.10)); }
@media (prefers-reduced-motion: no-preference) {
    .chart-svg .bar { transform-box: fill-box; transform-origin: bottom; animation: chart-rise 520ms cubic-bezier(.22, 1, .36, 1) backwards; }
    .chart-svg .line { stroke-dasharray: 1200; animation: chart-draw 900ms cubic-bezier(.65, 0, .35, 1) backwards; }
    .chart-svg .area, .chart-svg .dot { animation: chart-fade 700ms ease-out backwards; animation-delay: 260ms; }
}
@keyframes chart-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes chart-draw { from { stroke-dashoffset: 1200; } to { stroke-dashoffset: 0; } }
@keyframes chart-fade { from { opacity: 0; } to { opacity: 1; } }
.chart-note { font-family: var(--sans); font-size: var(--fs-xs); color: var(--text-mute); margin: 12px 0 4px; line-height: var(--leading-ui); }
.chart-svg .donut-total { fill: var(--ink); font-family: var(--sans); font-size: 28px; font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; }
.chart-svg .donut-label { fill: var(--text-mute); font-family: var(--sans); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }

/* Head-to-head */
.versus { margin: 0 0 var(--space-4); border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); overflow: hidden; font-family: var(--sans); box-shadow: var(--shadow-sm); }
.versus-head, .versus-row { display: grid; grid-template-columns: minmax(120px, 1.1fr) 1fr 42px 1fr; align-items: center; gap: 12px; padding: 12px 20px; }
.versus-head { background: var(--surface-2); border-bottom: 1px solid var(--rule-2); font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ink); }
.versus-head .versus-side { font-size: var(--fs-md); }
.versus-row { border-bottom: 1px solid var(--rule); font-size: var(--fs-md); }
.versus-row:last-child { border-bottom: 0; }
.versus-label { font-size: var(--fs-sm); color: var(--text-mute); }
.versus-value { color: var(--text); font-variant-numeric: tabular-nums; }
.versus-head .versus-side, .versus-row .versus-value { text-align: center; }
.versus-vs { text-align: center; font-size: var(--fs-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-mute); }
.versus .chart-note { padding: 0 20px 14px; margin: 0; }

/* Disclosure, callouts, timeline, citations */
details.disclosure { margin: 0 0 var(--space-4); border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
details.disclosure > summary { cursor: pointer; padding: 13px 20px; font-family: var(--sans); font-size: var(--fs-base); font-weight: var(--fw-semibold); color: var(--ink); list-style: none; display: flex; align-items: center; gap: 10px; transition: background var(--ease); }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::before { content: "›"; font-size: var(--fs-xl); color: var(--text-mute); line-height: 1; transition: transform 140ms ease; }
details.disclosure[open] > summary::before { transform: rotate(90deg); }
details.disclosure > summary:hover { background: var(--surface-2); }
.disclosure-body { padding: 4px 20px 8px; border-top: 1px solid var(--rule); }
.disclosure-body > *:first-child { margin-top: 16px; }

.callout { margin: 0 0 var(--space-4); padding: 16px 20px; border-radius: var(--radius); border: 1px solid var(--rule); border-left: 3px solid var(--text-mute); background: var(--surface); max-width: var(--measure); }
.callout .callout-label { font-family: var(--sans); font-size: var(--fs-label); font-weight: var(--fw-bold); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-mute); margin: 0 0 8px; }
.callout p:last-child, .callout ul:last-child, .callout ol:last-child { margin-bottom: 0; }
.callout-key { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent-bg) 70%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 18%, var(--rule)); }
.callout-key .callout-label { color: var(--accent); }
.callout-warning { border-left-color: var(--amber); background: color-mix(in srgb, var(--amber-bg) 75%, var(--surface)); border-color: color-mix(in srgb, var(--amber) 18%, var(--rule)); }
.callout-warning .callout-label { color: var(--amber); }
.callout-tip { border-left-color: var(--ok); border-color: color-mix(in srgb, var(--ok) 18%, var(--rule)); background: color-mix(in srgb, var(--ok) 6%, var(--surface)); }
.callout-tip .callout-label { color: var(--ok); }
.article-layout > .callout, main > .callout { max-width: var(--column); margin: 24px auto 0; }

ol.timeline { list-style: none; margin: 0 0 var(--space-4); padding: 0 0 0 4px; max-width: var(--measure); position: relative; }
ol.timeline::before { content: ""; position: absolute; left: 104px; top: 8px; bottom: 8px; width: 1px; background: var(--rule); }
ol.timeline li { display: grid; grid-template-columns: 92px 1fr; gap: 28px; position: relative; padding: 0 0 20px; margin: 0; }
ol.timeline li::before { content: ""; position: absolute; left: 100px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--rule-2); border: 2px solid var(--paper); }
ol.timeline li.is-highlight::before { background: var(--accent); }
.tl-date { font-family: var(--meta); font-size: var(--fs-label); color: var(--text-mute); text-align: right; padding-top: 3px; line-height: var(--leading-ui); }
.tl-body { display: block; }
.tl-title { display: block; font-weight: var(--fw-semibold); color: var(--ink); }
.tl-text { display: block; color: var(--text-dim); margin-top: 3px; }

a.cite { display: inline-block; font-family: var(--sans); font-size: var(--fs-label); font-weight: var(--fw-bold); vertical-align: super; line-height: 1; color: var(--accent); background: var(--accent-bg); border-radius: var(--radius-xs); padding: 1px 4px; margin: 0 1px 0 2px; font-variant-numeric: tabular-nums; text-decoration: none; transition: background var(--ease), color var(--ease); }
a.cite:hover { background: var(--accent); color: var(--on-accent); text-decoration: none; }

/* Contents rail */
.toc { position: sticky; top: 84px; align-self: start; padding-top: clamp(28px, 4vw, 44px); font-size: var(--fs-sm); max-height: calc(100vh - 100px); overflow: auto; }
.toc-label { font-family: var(--meta); font-size: var(--fs-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-mute); margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); font-weight: var(--fw-semibold); }
.toc ul, .toc-mobile ul { list-style: none; margin: 0; padding: 0; }
.toc li a, .toc-mobile li a { display: block; padding: 5px 0 5px 14px; color: var(--text-mute); text-decoration: none; border-left: 2px solid var(--rule); line-height: var(--leading-ui); transition: color var(--ease), border-color var(--ease); }
.toc li a:hover, .toc-mobile li a:hover { color: var(--accent); border-left-color: var(--edge); }
.toc li a.is-current, .toc-mobile li a.is-current { color: var(--accent); border-left-color: var(--accent); font-weight: var(--fw-medium); }
.toc li.level-3 a, .toc-mobile li.level-3 a { padding-left: 26px; font-size: var(--fs-xs); }
.toc-mobile { display: none; margin: 0 0 var(--space-4); }
.toc-mobile > summary { font-weight: var(--fw-semibold); }

/* Attachments (imported HTML, PDF, images) */
.attachments { margin-top: var(--space-6); }
.attachments h2, .sources h2 {
    margin: 0 0 16px; font-family: var(--meta); font-size: var(--fs-label); letter-spacing: var(--track-label); text-transform: uppercase;
    color: var(--ink); font-weight: var(--fw-semibold); padding-bottom: 12px; border-bottom: 1px solid var(--rule-2);
    display: flex; align-items: center; gap: 10px;
}
.attachment-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.attachment { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.attachment-name { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 16px; font-family: var(--sans); font-size: var(--fs-base); font-weight: var(--fw-semibold); color: var(--ink); border-bottom: 1px solid var(--hair); background: var(--atlas-plate); overflow-wrap: anywhere; }
.attachment-name .glyph { color: var(--accent); width: 16px; height: 16px; }
.attachment-size { margin-left: auto; font-family: var(--meta); font-size: var(--fs-xs); color: var(--text-mute); font-weight: 400; flex: none; }
.attachment-frame { display: block; width: 100%; border: 0; background: #fff; }
.attachment-frame-html { height: clamp(520px, calc(100vh - 160px), 1100px); }
.attachment-img { display: block; max-width: 100%; height: auto; margin: 0 auto; background: var(--atlas-plate); }
.attachment .hint, .attachment-actions { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 0; padding: 10px 16px; font-family: var(--sans); font-size: var(--fs-sm); color: var(--text-mute); border-top: 1px solid var(--hair); }
.attachment-file { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-family: var(--sans); font-size: var(--fs-base); }
.attachment-file .glyph { color: var(--accent); }
.attachment-file .attachment-size { margin-left: auto; }

/* Sources */
.sources { margin-top: var(--space-6); }
.source-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 1px solid var(--hair); }
.source-card { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; align-items: baseline; gap: 0 12px; padding: 11px 4px; border-bottom: 1px solid var(--hair); text-decoration: none; font-family: var(--sans); transition: background var(--ease); }
.source-card:hover { background: var(--wash); text-decoration: none; }
.source-num { font-family: var(--meta); font-size: var(--fs-xs); color: var(--accent); font-variant-numeric: tabular-nums; }
.source-title { color: var(--text); font-size: var(--fs-base); line-height: var(--leading-ui); }
.source-card:hover .source-title { color: var(--accent); }
.source-site { font-family: var(--meta); font-size: var(--fs-xs); color: var(--text-mute); white-space: nowrap; }

/* Article footer */
.article-foot { margin-top: var(--space-6); padding-top: var(--space-3); border-top: 1px solid var(--rule); }
.export-pdf { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0 0 32px; }
.export-pdf .btn .glyph { color: var(--accent); }
.export-pdf-note { flex: 1 1 260px; margin: 0; font-family: var(--sans); font-size: var(--fs-sm); line-height: var(--leading-ui); color: var(--text-mute); }
.export-pdf-note a { color: var(--text-dim); white-space: nowrap; text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 3px; }
.export-pdf-note a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.related-label { margin: 0 0 12px; font-family: var(--meta); font-size: var(--fs-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink); font-weight: var(--fw-semibold); }
ul.related { list-style: none; margin: 0 0 32px; padding: 0; }
ul.related li { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--hair); }
ul.related a { color: var(--text-dim); text-decoration: none; font-family: var(--serif); }
ul.related a:hover { color: var(--accent); }
ul.related .when { font-family: var(--meta); font-size: var(--fs-label); color: var(--text-mute); flex: none; }
.back-home { margin: 0; font-family: var(--sans); font-size: var(--fs-sm); }
.provenance { display: block; margin-top: 16px; font-family: var(--sans); font-size: var(--fs-sm); color: var(--text-mute); background: var(--surface-2); border-radius: var(--radius-s); padding: 10px 14px; }

/* Revisions */
.revision-diff { margin: 8px 0 48px; }
.diff-caption { margin: 0 0 16px; color: var(--text-mute); font-size: var(--fs-base); }
.diff-stat { font-family: var(--meta); font-size: var(--fs-xs); }
.diff-stat .up { color: var(--ok); }
.diff-stat .down { color: var(--danger); margin-left: 8px; }
.diff { border: 1px solid var(--rule); border-radius: var(--radius-s); background: var(--surface); overflow-x: auto; margin-bottom: 20px; }
.diff-line { display: grid; grid-template-columns: 26px minmax(0, 1fr); font-family: var(--mono); font-size: var(--fs-sm); line-height: 1.65; padding: 2px 12px 2px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.diff-mark { text-align: center; color: var(--text-mute); user-select: none; }
.diff-line.eq { color: var(--text-dim); }
.diff-line.del { background: color-mix(in srgb, var(--danger) 9%, transparent); }
.diff-line.add { background: color-mix(in srgb, var(--ok) 10%, transparent); }
.diff-line.del .diff-mark { color: var(--danger); }
.diff-line.add .diff-mark { color: var(--ok); }
.diff mark { background: transparent; color: inherit; border-radius: 2px; padding: 0 1px; }
.diff mark.w-del { background: color-mix(in srgb, var(--danger) 26%, transparent); text-decoration: line-through; }
.diff mark.w-add { background: color-mix(in srgb, var(--ok) 26%, transparent); }
.diff-skip { font-family: var(--meta); font-size: var(--fs-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-mute); padding: 6px 12px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--surface-2); }
.diff-skip:first-child { border-top: 0; }
.diff-empty { color: var(--text-mute); font-size: var(--fs-base); margin: 0; }
.revision-list { list-style: none; margin: 0; padding: 0; }
.revision-list li { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; padding: 11px 0; border-bottom: 1px solid var(--rule); }
.revision-list li.is-current a { color: var(--accent); font-weight: var(--fw-semibold); }
.revision-list .kind { font-family: var(--meta); font-size: var(--fs-label); color: var(--text-mute); }
.revision-list .was { font-size: var(--fs-sm); color: var(--text-mute); }

/* --------------------------------------------------------------------------
   8. Notices, footer, motion, responsive, print
   -------------------------------------------------------------------------- */

.notice { border: 1px solid var(--rule); border-left: 3px solid var(--text-mute); background: var(--surface); border-radius: var(--radius-s); padding: 12px 16px; margin-bottom: 24px; font-size: var(--fs-base); }
.notice.error { border-left-color: var(--danger); color: var(--danger); }
.notice.ok { border-left-color: var(--ok); }

.footer { border-top: 1px solid var(--rule); padding: 28px 0 52px; color: var(--text-mute); font-size: var(--fs-sm); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-brand .brand-emblem-svg { width: 22px; height: 22px; }

/* innerpulse credit: a quiet signature at the end of the footer links */
.footer .ip-credit { display: inline-flex; align-items: center; gap: 6px; font-family: var(--meta); font-size: 11px; letter-spacing: .02em; color: var(--text-mute); }
.footer .ip-credit .ip-credit-glyph { width: 14px; height: 14px; }
.footer .ip-credit .ip-glyph { filter: none; }
.footer .ip-credit:hover { color: var(--ink); }
.footer a { color: var(--text-mute); text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-account { color: var(--text-mute); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .btn:active, .topic-card:hover, .shelf-item.is-feature:hover { transform: none; }
    .live-badge::before { animation: none; }
}

@media (max-width: 1100px) {
    /* The rail folds away but the column keeps its measure, centered. */
    .article-layout { grid-template-columns: minmax(0, var(--column)); gap: 0; justify-content: center; }
    .toc { display: none; }
    .toc-mobile { display: block; }
}
@media (max-width: 1100px) and (min-width: 721px) {
    .masthead .wrap { gap: 16px; }
    .nav-links a { padding: 7px 10px; }
    .searchbar input[type="search"] { width: 150px; }
    .searchbar input[type="search"]:focus { width: 200px; }
}
@media (max-width: 960px) {
    .layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .band { grid-template-columns: minmax(0, 1fr); gap: 28px; }
    .band-side { border-top: 1px solid var(--rule); padding-top: 20px; }
    .shelf-docs { grid-template-columns: minmax(0, 1fr); }
    .shelf-item, .shelf-docs .topic-more { grid-column: 1; }
    .shelf-item.is-feature { grid-row: auto; margin-bottom: 8px; }
    .atlas-index { grid-template-columns: minmax(0, 1fr); }
    .page-head.has-field { padding-right: 0; min-height: 0; }
    .page-head-art { opacity: .55; width: 60%; }
    .lib-filters-toggle { display: inline-flex; }
    .lib-filter-full > summary { display: none; }
    .lib-filter-full:not([open]) { display: none; }
}
@media (max-width: 720px) {
    .wrap { padding: 0 18px; }
    .masthead .wrap { flex-wrap: wrap; gap: 8px 12px; min-height: 56px; padding-top: 8px; padding-bottom: 8px; }
    .nav { flex-wrap: wrap; width: 100%; }
    .nav-links { order: 1; flex: 1 1 100%; }
    .nav-links a { min-height: 40px; display: inline-flex; align-items: center; }
    .nav-tools { order: 2; flex: 1 1 100%; justify-content: flex-start; }
    .searchbar { flex: 1 1 auto; min-width: 0; }
    .searchbar input[type="search"], .searchbar input[type="search"]:focus { width: 100%; }
    .page-head { padding-top: 28px; }
    .page-head h1 { font-size: var(--fs-4xl); }
    .page-head-art { display: none; }
    .spread { padding-top: 26px; }
    .lead-title { font-size: var(--fs-5xl); max-width: none; }
    .lead-summary { font-size: var(--fs-lg); }
    .lead-figures .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wire-item { grid-template-columns: 50px minmax(0, 1fr); }
    .latest-item { grid-template-columns: 50px minmax(0, 1fr); gap: 2px 10px; align-items: start; }
    .latest-meta { grid-column: 2; }
    .shelf-head { grid-template-columns: minmax(0, 1fr); grid-template-areas: "mark" "title" "dek" "chips"; }
    .shelf-mark { flex-direction: row; align-items: center; }
    .shelf-mark .section-mark { width: 36px; height: 36px; }
    .shelf-item.is-feature { padding: 16px 16px 14px; }
    .shelf-item.is-feature .doc-title { font-size: var(--fs-xl); }
    .shelf-item:not(.is-feature) { flex-wrap: wrap; gap: 4px 12px; }
    .doc-item { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 14px 0; margin: 0; }
    .doc-item:hover { box-shadow: none; background: none; }
    .doc-date { flex-direction: row; align-items: center; padding-top: 0; }
    .doc-title { font-size: var(--fs-lg); }
    .topic-grid, .source-grid { grid-template-columns: minmax(0, 1fr); }
    .explore-bar { flex-direction: column; align-items: flex-start; gap: 16px; }
    .search-page { flex-direction: column; }
    .search-page .btn { align-self: flex-start; }
    .article-head { padding: 24px 0 18px; }
    .article-head h1 { font-size: var(--fs-4xl); }
    .article-standfirst { font-size: var(--fs-xl); }
    .article-body { font-size: var(--fs-lg); }
    .article-body h2 { font-size: var(--fs-3xl); margin-top: var(--space-4); }
    .chart { padding: 16px 12px 10px; }
    .chart-svg .axis, .chart-svg .value, .chart-svg .row-label { font-size: 15px; }
    .chart-donut { grid-template-columns: 1fr; justify-items: center; gap: 16px; }
    .chart-svg.chart-svg-donut { width: min(220px, 72vw); height: min(220px, 72vw); min-width: 140px; min-height: 140px; }
    .versus-head, .versus-row { grid-template-columns: minmax(90px, 1fr) 1fr 32px 1fr; gap: 8px; padding: 10px 14px; }
    .figures-n5 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .figures-n5 .figure { grid-column: span 2; }
    .figures-n5 .figure:nth-child(4), .figures-n5 .figure:nth-child(5) { grid-column: span 3; }
    .atlas-index { padding: 18px 16px; }
    .atlas-island-name { font-size: 18px; }
    .atlas-island-count { font-size: 13px; }
    .atlas-topic-name { font-size: 14px; }
    .lib-field { flex: 1 1 100%; }
    .btn { min-height: 42px; }
}

@media print {
    .masthead, .toc, .toc-mobile, .footer, #progress, .article-foot, .page-head-art { display: none; }
    body { background: #fff; color: #000; }
    .article-layout { display: block; }
    .chart, .table-wrap, .figures, .versus, .callout, details.disclosure { box-shadow: none; break-inside: avoid; }
}

/* ==========================================================================
   Home hero — the library as a reading
   Motion is CSS-on-load and always ends in the drawn state; nothing here
   waits on script or scrolling to become visible.
   ========================================================================== */

.hero {
    position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 28px clamp(28px, 4.5vw, 64px); align-items: center; padding: clamp(28px, 4.5vw, 56px) 0 8px;
}
.hero-eyebrow {
    display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-family: var(--meta); font-size: var(--fs-label);
    letter-spacing: var(--track-micro); text-transform: uppercase; color: var(--text-mute);
}
.hero-live { width: 8px; height: 8px; border-radius: 50%; background: var(--ip-mark); flex: none; position: relative; }
.hero-live::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--ip-mark); opacity: 0; animation: hero-ping 2.4s ease-out infinite; }
@keyframes hero-ping { 0% { transform: scale(.4); opacity: .9; } 80%, 100% { transform: scale(1.8); opacity: 0; } }
.hero-title {
    margin: 0; font-family: var(--serif); font-weight: 700; color: var(--ink);
    font-size: clamp(2.1rem, 3.7vw, 3.3rem); line-height: 1.04; letter-spacing: -0.03em; max-width: 17ch;
    animation: hero-rise .9s cubic-bezier(.16, 1, .3, 1) both;
}
.hero-title span { display: block; color: var(--text-mute); font-weight: 400; font-style: italic; }
.hero-dek { margin: 14px 0 0; max-width: 54ch; color: var(--text-dim); font-size: var(--fs-lg); line-height: 1.55; animation: hero-rise .9s cubic-bezier(.16, 1, .3, 1) .08s both; }
@keyframes hero-rise { from { opacity: 0; transform: translateY(10px); } }

.hero-search {
    position: relative; display: flex; align-items: center; gap: 8px; margin-top: 20px; max-width: 560px; padding: 4px 4px 4px 16px;
    background: var(--surface); border: 1px solid var(--rule-2); border-radius: 999px; box-shadow: var(--shadow);
    transition: border-color var(--ease), box-shadow var(--ease); animation: hero-rise .9s cubic-bezier(.16, 1, .3, 1) .16s both;
}
.hero-search:focus-within { border-color: var(--ip-mark); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ip-mark) 14%, transparent), var(--shadow); }
.hero-search svg { color: var(--text-mute); flex: none; }
.hero-search input { flex: 1 1 auto; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; font-size: var(--fs-md); padding: 7px 4px; outline: none; }
.hero-search button {
    flex: none; border: 0; border-radius: 999px; padding: 10px 20px; cursor: pointer; font: inherit; font-weight: 600; font-size: var(--fs-base);
    background: var(--accent); color: var(--on-accent); transition: background var(--ease);
}
:root[data-theme="ip-light"] .hero-search button, :root[data-theme="ip-dark"] .hero-search button { background: #d12c1e; color: #fff; }
.hero-search button:hover { filter: brightness(.94); }

/* The library's totals: one row under the search, not a card of their own. */
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 22px 0 0; max-width: 560px; }
.hero-stats div { display: flex; flex-direction: column; justify-content: space-between; padding: 2px 14px 0; border-left: 1px solid var(--rule); }
.hero-stats div:first-child { padding-left: 0; border-left: 0; }
.hero-stats dt { font-family: var(--meta); font-size: var(--fs-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text-mute); }
.hero-stats dd { margin: 4px 0 0; font-family: var(--sans); font-size: clamp(1.35rem, 2.1vw, 1.8rem); font-weight: 650; letter-spacing: -0.035em; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1; }

.signal { margin: 0; min-width: 0; }
.signal-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 20px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.signal-k { font-family: var(--meta); font-size: var(--fs-label); letter-spacing: var(--track-micro); text-transform: uppercase; color: var(--ink); }
.signal-note { font-family: var(--meta); font-size: var(--fs-label); color: var(--text-mute); }
.signal-plot { position: relative; }
.signal-svg { display: block; width: 100%; height: auto; overflow: visible; }

.sig-month { font-family: var(--meta); font-size: 10.5px; fill: var(--text-mute); letter-spacing: .06em; text-transform: uppercase; }
/* The activity matrix: a square per day, shaded by reading time in four steps. */
/* Mixed into the paper rather than see-through, so the hero's dial does not show through the squares. */
.sig-empty { fill: color-mix(in srgb, var(--ink) 7%, var(--paper)); }
.sig-before { fill: color-mix(in srgb, var(--ink) 3%, var(--paper)); }
.sig-doc { cursor: pointer; transition: opacity .25s ease; }
.sig-doc:focus { outline: none; }
.sig-fill { transform-box: fill-box; transform-origin: center; animation: sig-pop .6s cubic-bezier(.16, 1, .3, 1) var(--dl) both; }
.sig-l1 .sig-fill { opacity: .42; }
.sig-l2 .sig-fill { opacity: .6; }
.sig-l3 .sig-fill { opacity: .8; }
.sig-l4 .sig-fill { opacity: 1; }
@keyframes sig-pop { from { transform: scale(.35); opacity: 0; } }
.sig-ring { fill: none; stroke: transparent; stroke-width: 2; transition: stroke .15s ease; }
.sig-doc:hover .sig-ring, .sig-doc:focus-visible .sig-ring { stroke: var(--ink); }
.sig-today, .sig-doc .sig-ring.sig-today { stroke: var(--ip-mark); stroke-width: 2.5; animation: sig-today 2.4s ease-in-out 1.4s infinite; }
@keyframes sig-today { 0%, 100% { stroke-opacity: 1; } 50% { stroke-opacity: .35; } }
.signal.is-focus .sig-doc { opacity: .14; }
.signal.is-focus .sig-doc.is-on { opacity: 1; }

.signal-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px 20px; flex-wrap: wrap; margin-top: 6px; font-family: var(--meta); font-size: var(--fs-micro); letter-spacing: .06em; text-transform: uppercase; color: var(--text-mute); }
.signal-scale { display: inline-flex; align-items: center; gap: 4px; }
.signal-scale i { width: 10px; height: 10px; border-radius: 2px; background: var(--text-mute); }
.signal-scale i:first-child { margin-left: 4px; }
.signal-scale i:last-child { margin-right: 4px; }
.signal-scale .sig-l1 { opacity: .42; }
.signal-scale .sig-l2 { opacity: .6; }
.signal-scale .sig-l3 { opacity: .8; }

.signal-card {
    position: absolute; z-index: 4; pointer-events: none; width: max-content; max-width: 320px; padding: 10px 12px 11px;
    background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow-lg);
    transform: translate(-50%, calc(-100% - 12px)); display: flex; flex-direction: column; gap: 3px;
}
.signal-card[hidden] { display: none; }
.signal-card.is-below { transform: translate(-50%, 12px); }
.signal-card .sc-meta { font-family: var(--meta); font-size: var(--fs-micro); letter-spacing: .06em; text-transform: uppercase; color: var(--text-mute); }
.signal-card .sc-title { font-family: var(--serif); font-size: var(--fs-md); line-height: 1.3; color: var(--ink); }

.signal-legend { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.signal-legend button {
    display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 10px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--rule); background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-sm);
    transition: border-color var(--ease), background var(--ease);
}
.signal-legend button:hover, .signal-legend button[aria-pressed="true"] { border-color: var(--sc); background: color-mix(in srgb, var(--sc) 8%, var(--surface)); }
.sl-dot { width: 4px; height: 14px; border-radius: 2px; background: var(--sc); }
.sl-n { font-family: var(--meta); font-size: var(--fs-micro); color: var(--text-mute); }

/* Section orbits on the shelves. */
.orbit { overflow: visible; }
.orb-track { fill: none; stroke: var(--rule); stroke-width: 1; }
.orb-arc { fill: none; stroke: var(--oc); stroke-width: 2.4; stroke-linecap: round; transform-origin: 32px 32px; transform: rotate(var(--rot)); animation: orb-spin var(--spin) linear infinite; }
.orb-arc:nth-of-type(4n+2) { animation-direction: reverse; }
.orb-core { fill: var(--oc); }
@keyframes orb-spin { from { transform: rotate(var(--rot)); } to { transform: rotate(calc(var(--rot) + 360deg)); } }
.shelf-mark .orbit { display: block; }

@media (max-width: 900px) {
    .hero { grid-template-columns: minmax(0, 1fr); align-items: start; }
    .signal { max-width: 720px; }
}
@media (max-width: 640px) {
    .hero-stats div { padding: 2px 8px 0; }
    .hero-dek { font-size: var(--fs-base); }
    .signal-plot { overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
    .signal-svg { min-width: 520px; }
    .hero-search button { padding: 10px 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-title, .hero-dek, .hero-search, .sig-fill { animation: none !important; }
    .sig-today, .hero-live::after, .orb-arc { animation: none !important; }
}

/* Latest: each entry carries its own small reading, matching the hero. */
.latest-date { display: inline-flex; align-items: center; gap: 8px; }
.latest-bar { width: 3px; height: 22px; border-radius: 2px; background: var(--sc); transform: scaleY(var(--lh)); transform-origin: center; flex: none; transition: transform .25s ease; }
.latest-item:hover .latest-bar { transform: scaleY(1); }
.home .latest-item { grid-template-columns: 62px minmax(0, 1fr) auto; }
@media (max-width: 720px) { .home .latest-item { grid-template-columns: 58px minmax(0, 1fr); } }

/* ==========================================================================
   Richer reading: sortable tables, in-cell bars, the changes block, paired
   charts, inline sparklines, glossary terms and the shared popover.
   ========================================================================== */

/* Sortable headers (buttons added by assets/doc.js). */
.article-body thead th:has(.th-sort) { padding: 0; }
.th-sort {
    display: flex; align-items: center; gap: 6px; width: 100%; padding: 12px 16px; border: 0; background: none; cursor: pointer;
    font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; text-align: inherit; justify-content: inherit;
}
th[style*="right"] .th-sort { justify-content: flex-end; }
th[style*="center"] .th-sort { justify-content: center; }
.th-sort:hover { color: var(--ink); }
.th-sort:focus-visible { outline-offset: -3px; }
.sort-ind { width: 8px; height: 10px; flex: none; opacity: .3; background:
    linear-gradient(135deg, transparent 50%, currentColor 50%) top / 6px 4px no-repeat,
    linear-gradient(-45deg, transparent 50%, currentColor 50%) bottom / 6px 4px no-repeat; }
th.is-sorted .th-sort { color: var(--ink); }
th.is-sorted .sort-ind { opacity: 1; color: var(--accent); }
th[aria-sort="ascending"] .sort-ind { background: linear-gradient(135deg, transparent 50%, currentColor 50%) center / 6px 4px no-repeat; }
th[aria-sort="descending"] .sort-ind { background: linear-gradient(-45deg, transparent 50%, currentColor 50%) center / 6px 4px no-repeat; }

/* Numeric columns read like the chart they nearly are. */
.article-body td.num-bar {
    background-image: linear-gradient(90deg, color-mix(in srgb, var(--accent) 13%, transparent) calc(var(--bar) * 100%), transparent 0);
    background-repeat: no-repeat; background-size: 100% 6px; background-position: 0 calc(100% - 5px);
}
.article-body td.num-bar.is-neg { background-image: linear-gradient(90deg, color-mix(in srgb, var(--danger) 16%, transparent) calc(var(--bar) * 100%), transparent 0); }
.article-body tbody tr:hover td.num-bar { background-color: transparent; }

/* Long tables: their own scroll, the header pinned, and a filter above. */
.table-wrap.is-long { max-height: min(72vh, 760px); overflow: auto; overscroll-behavior: contain; }
.table-tools { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; }
.table-filter { flex: 0 1 280px; border-radius: 999px; font-size: var(--fs-sm); padding: 6px 14px; }
.table-count { font-family: var(--meta); font-size: var(--fs-label); color: var(--text-mute); }
.article-body tbody tr[hidden] { display: none; }

/* The changes block: a summary meter, then one table per group. */
.changes { margin: 0 0 var(--space-4); }
.changes-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-bottom: 10px; }
.changes-title { margin: 0; font-family: var(--sans); font-weight: var(--fw-semibold); color: var(--ink); font-size: var(--fs-md); }
.changes-summary { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--meta); font-size: var(--fs-label); letter-spacing: .04em; color: var(--text-mute); }
.chg-count b { font-family: var(--sans); font-size: var(--fs-md); margin-right: 3px; }
.chg-count.is-buff b { color: var(--ok); }
.chg-count.is-nerf b { color: var(--danger); }
.chg-count.is-new b { color: var(--accent); }
.changes-meter { flex: 1 0 100%; display: flex; gap: 2px; height: 6px; border-radius: 3px; overflow: hidden; }
.changes-meter span { display: block; min-width: 4px; animation: meter-in .8s cubic-bezier(.16, 1, .3, 1) both; }
.changes-meter .is-buff { background: var(--ok); }
.changes-meter .is-nerf { background: var(--danger); }
.changes-meter .is-change { background: var(--text-mute); opacity: .5; }
.changes-meter .is-new { background: var(--accent); }
.changes-meter .is-removed { background: var(--ink); opacity: .6; }
@keyframes meter-in { from { flex-grow: 0; } }
.changes-group { margin: 16px 0 6px; font-family: var(--meta); font-size: var(--fs-label); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--ink); }
.changes-group span { color: var(--text-mute); margin-left: 4px; }
.changes .table-wrap { margin-bottom: 8px; }
.article-body .changes-table tbody tr { box-shadow: inset 3px 0 0 transparent; }
.article-body .changes-table tr.is-buff { box-shadow: inset 3px 0 0 var(--ok); }
.article-body .changes-table tr.is-nerf { box-shadow: inset 3px 0 0 var(--danger); }
.article-body .changes-table tr.is-new { box-shadow: inset 3px 0 0 var(--accent); }
.chg-item { color: var(--ink) !important; font-weight: var(--fw-semibold); }
.chg-note { display: block; font-weight: 400; font-size: var(--fs-xs); color: var(--text-mute); margin-top: 2px; }
.chg-stat { color: var(--text-dim) !important; }
.chg-from { color: var(--text-mute) !important; text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-mute) 50%, transparent); }
.chg-to { color: var(--ink) !important; font-weight: var(--fw-semibold); }
.chg-delta { white-space: nowrap; }
.chg-verdict {
    display: inline-block; min-width: 54px; text-align: center; padding: 1px 8px; border-radius: 999px; margin-right: 10px;
    font-family: var(--meta); font-size: var(--fs-micro); letter-spacing: .08em; text-transform: uppercase; vertical-align: 1px;
    background: var(--surface-2); color: var(--text-dim);
}
.chg-verdict.is-buff { background: color-mix(in srgb, var(--ok) 14%, var(--surface)); color: var(--ok); }
.chg-verdict.is-nerf { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }
.chg-verdict.is-new { background: var(--accent-bg); color: var(--accent); }
.chg-bar { display: inline-block; width: 64px; height: 6px; border-radius: 3px; background: var(--surface-2); vertical-align: 1px; margin-right: 8px; position: relative; overflow: hidden; }
.chg-bar i { position: absolute; top: 0; bottom: 0; left: 50%; width: calc(var(--f) * 50%); border-radius: 3px; background: var(--text-mute); animation: bar-in .7s cubic-bezier(.16, 1, .3, 1) both; }
.chg-bar.is-negv i { left: auto; right: 50%; }
tr.is-buff .chg-bar i { background: var(--ok); }
tr.is-nerf .chg-bar i { background: var(--danger); }
.chg-bar::after { content: ""; position: absolute; left: 50%; top: -1px; bottom: -1px; width: 1px; background: var(--rule-2); }
.chg-pct { font-family: var(--meta); font-size: var(--fs-xs); color: var(--text-dim); }
@keyframes bar-in { from { width: 0; } }

/* Paired charts: dumbbell and slope. */
.pair-dot { width: 10px !important; height: 10px !important; border-radius: 50%; }
.pair-dot.is-from { background: var(--surface) !important; border: 2px solid var(--text-mute); }
.pair-dot.is-to { background: var(--ok) !important; }
.pair-hint { background: transparent; border-style: dashed; color: var(--text-mute); }
.chart-svg .pair-line, .chart-svg .slope-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: pair-draw .8s cubic-bezier(.16, 1, .3, 1) forwards; }
.chart-svg .pair-to { animation: chart-fade .4s ease both; animation-delay: inherit; }
.chart-svg .slope-head { font-weight: 600; fill: var(--ink); letter-spacing: .06em; text-transform: uppercase; }
.chart-svg .slope-val { fill: var(--ink); font-weight: 600; }
.chart-svg .pair-value { font-weight: 600; }
.chart-svg .slope-line:hover { stroke-width: 4; }
@keyframes pair-draw { to { stroke-dashoffset: 0; } }

/* Inline sparkline. */
.spark-inline { display: inline-flex; align-items: center; vertical-align: -3px; margin: 0 2px; color: var(--accent); }
.spark-inline.is-up { color: var(--ok); }
.spark-inline.is-down { color: var(--danger); }
.spark-inline polyline { stroke: currentColor; }
.spark-inline circle { fill: currentColor; }
.spark-alt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Glossary terms and the list at the foot. */
abbr.term {
    text-decoration: underline dotted color-mix(in srgb, var(--accent) 60%, transparent); text-underline-offset: 3px;
    text-decoration-thickness: 1.5px; cursor: help; border-radius: 2px;
}
abbr.term:hover, abbr.term:focus-visible { background: var(--accent-bg); }
.glossary-list { list-style: none; padding: 0; margin: 0; columns: 2 260px; column-gap: 32px; }
.glossary-list li { break-inside: avoid; margin: 0 0 10px; font-size: var(--fs-md); line-height: 1.5; }
.glossary-list strong { color: var(--ink); }

/* The popover shared by citations and terms. */
.pop {
    position: absolute; z-index: 90; width: max-content; max-width: min(340px, calc(100vw - 20px)); padding: 12px 14px;
    background: var(--surface); color: var(--text); border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--shadow-lg);
    font-family: var(--sans); font-size: var(--fs-sm); line-height: 1.45;
    opacity: 0; transform: translateY(4px); transition: opacity .14s ease, transform .14s ease;
}
.pop.is-in { opacity: 1; transform: none; }
.pop::after {
    content: ""; position: absolute; left: var(--arrow, 50%); bottom: -6px; width: 10px; height: 10px; margin-left: -5px;
    background: var(--surface); border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); transform: rotate(45deg);
}
.pop.is-below::after { bottom: auto; top: -6px; transform: rotate(225deg); }
.pop-k { display: flex; align-items: center; gap: 8px; font-family: var(--meta); font-size: var(--fs-label); letter-spacing: .06em; text-transform: uppercase; color: var(--text-mute); }
.pop-num { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 5px; background: var(--accent); color: var(--on-accent); font-weight: 700; letter-spacing: 0; }
.pop-title { margin: 6px 0 10px; font-family: var(--serif); font-size: var(--fs-md); color: var(--ink); font-weight: var(--fw-semibold); line-height: 1.3; }
.pop-def { margin: 6px 0 0; color: var(--text); }
.pop-actions { display: flex; gap: 14px; }
.pop-link { font-size: var(--fs-xs); font-weight: 600; color: var(--accent); }
.pop-link.is-quiet { color: var(--text-mute); font-weight: 400; }

@media print {
    .table-wrap.is-long { max-height: none; overflow: visible; }
    .table-tools, .pop { display: none !important; }
    .sort-ind { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .chart-svg .pair-line, .chart-svg .slope-line { animation: none; stroke-dashoffset: 0; }
    .changes-meter span, .chg-bar i, .chart-svg .pair-to { animation: none; }
    .pop { transition: none; }
}
.article-body td.num-bar[style*="right"] {
    background-image: linear-gradient(270deg, color-mix(in srgb, var(--accent) 13%, transparent) calc(var(--bar) * 100%), transparent 0);
}
.article-body td.num-bar.is-neg[style*="right"] {
    background-image: linear-gradient(270deg, color-mix(in srgb, var(--danger) 16%, transparent) calc(var(--bar) * 100%), transparent 0);
}
.th-sort { line-height: inherit; }
.chg-count.is-new b { color: var(--c2); }
.changes-meter .is-new { background: var(--c2); }
.chg-verdict.is-new { background: color-mix(in srgb, var(--c2) 13%, var(--surface)); color: var(--c2); }
.article-body .changes-table tr.is-new { box-shadow: inset 3px 0 0 var(--c2); }
.changes-summary { gap: 6px 8px; } .pair-hint i { display: none; }

/* "System" in the theme menu: half innerpulse light, half innerpulse dark. */
.theme-option[data-theme="system"] { --sw-accent: #f43a2a; }
.theme-option[data-theme="system"] .theme-swatch { background: linear-gradient(135deg, #f4f1ec 0 50%, #0b0d10 50% 100%); }

/* ==========================================================================
   Atmosphere (innerpulse-brand: references/atmosphere.md, assets/brand/innerpulse-atmosphere.css)
   Grain, vignette, fog and the dial; page heads sit in front of their own reading.
   ========================================================================== */
:root {
    --innerpulse-ground: var(--paper);
    --innerpulse-text: var(--ink);
    --innerpulse-line-2: var(--rule-2);
    --innerpulse-mono: var(--mono);
    --ip-atmos-accent: color-mix(in srgb, var(--accent) 11%, transparent);
}
body { overflow-x: clip; }
.ip-vignette { z-index: -1; }

/* Intel's light themes (the kit's own selectors key on data-theme="light"). */
:root[data-theme="ip-light"] .ip-grain, :root[data-theme="canvas"] .ip-grain, :root[data-theme="paper"] .ip-grain,
:root[data-theme="solar"] .ip-grain, :root[data-theme="dawn"] .ip-grain { mix-blend-mode: multiply; opacity: .04; filter: invert(1); }
:root[data-theme="ip-light"] .ip-vignette, :root[data-theme="canvas"] .ip-vignette, :root[data-theme="paper"] .ip-vignette,
:root[data-theme="solar"] .ip-vignette, :root[data-theme="dawn"] .ip-vignette { display: none; }
:root[data-theme="ip-light"] .ip-atmos-dial, :root[data-theme="canvas"] .ip-atmos-dial, :root[data-theme="paper"] .ip-atmos-dial,
:root[data-theme="solar"] .ip-atmos-dial, :root[data-theme="dawn"] .ip-atmos-dial { opacity: .085; }

/* The backdrop reading. */
.bd-reading { width: 100%; height: 100%; display: block; }
.bd-axis { stroke: var(--ink); stroke-width: 1; opacity: .08; vector-effect: non-scaling-stroke; }
.bd-bar { stroke: var(--ink); stroke-width: 6; stroke-linecap: round; opacity: .16; vector-effect: non-scaling-stroke; }
.bd-bar.is-here { stroke: var(--accent); opacity: .7; stroke-width: 8; }
.ip-backdrop { opacity: .9; }

/* Page heads now carry the atmosphere instead of the contour field. */
.page-head.ip-atmos { padding-bottom: clamp(30px, 4vw, 48px); margin-bottom: 8px; min-height: 220px; }
.page-head.ip-atmos .ip-atmos-dial { width: min(46vw, 560px); right: -4vw; }
.page-head.ip-atmos h1 { text-shadow: 0 6px 32px color-mix(in srgb, var(--paper) 70%, transparent); }

/* The home hero: the dial rides behind the title and stats, above the signal. */
.hero.ip-atmos .ip-atmos-dial { top: 30%; right: -10vw; width: min(60vw, 760px); opacity: .085; }
.signal { position: relative; z-index: 1; }

/* The article head: its topic's reading, this document lit, kept to the column. */
.ip-atmos-local .ip-atmos-bg { inset: -24px -60px 0 -40px; }
.ip-atmos-local .ip-fog.f1, .ip-atmos-local .ip-fog.f2 { display: none; }

@media (max-width: 720px) {
    .page-head.ip-atmos .ip-atmos-dial, .hero.ip-atmos .ip-atmos-dial { width: 92vw; right: -40vw; opacity: .07; }
}
.ip-atmos-local .ip-atmos-bg {
    -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,.2), #000 45%, #000 70%, transparent), linear-gradient(0deg, transparent, #000 45%);
    mask-image: linear-gradient(90deg, rgba(0,0,0,.2), #000 45%, #000 70%, transparent), linear-gradient(0deg, transparent, #000 45%);
}
.ip-atmos-local .bd-bar { opacity: .15; }
.ip-atmos-local .bd-bar.is-here { opacity: .5; }
.page-head-mark .orbit { display: block; }

/* ==========================================================================
   Readability
   These pages are compiled documents read end to end, so legibility wins
   over atmosphere wherever the two meet.
   ========================================================================== */

/* Grain sits behind the content and holds still: animated noise laid over
   text made every glyph shimmer. */
.ip-grain { z-index: -1; animation: none; }

/* The article head's reading: the lit bar ran straight through the headline. */
.ip-atmos-local .bd-bar { opacity: .07; }
.ip-atmos-local .bd-bar.is-here { opacity: .2; }

/* Dates, counts and read times line up now they are no longer monospaced. */
.wire-date, .latest-date, .doc-date, .tl-date, .latest-meta, .shelf-end, .doc-meta, .lead-meta,
.article-meta, .wire-meta, .count, .hero-stats dt, .topic-links .when, ul.related .when,
.source-num, .lib-count, .pager-at, .figure-delta, .table-count, .chg-pct, .sl-n {
    font-variant-numeric: tabular-nums;
}

/* Uppercase labels in a proportional face want weight, not tracking. */
.eyebrow, .doc-kicker, .wire-label, .latest-label, .section-label h2, .toc-label, .related-label,
.hero-eyebrow, .hero-stats dt, .side-block h3, .band-side h3, .lib-label, .explore-label,
.format-badge, .kind-badge, .access-badge, .live-badge { font-weight: var(--fw-semibold); }

/* Secondary text a reader actually reads (summaries, the contents rail, list
   meta) moves up one step from the faintest gray. */
.toc li a, .toc-mobile li a { color: var(--text-dim); }
.doc-meta, .wire-meta, .latest-meta, .shelf-end, .lead-meta, .article-meta, .tl-date { color: var(--text-dim); }
.figure-label, .chart-note, .figure-note { color: var(--text-dim); }
.doc-summary, .shelf-dek, .page-head p { line-height: 1.6; }

