/* Hallmark · checked: 2026-11-14 · genre: editorial (inferred) · scope: all 27 pages of landpage/, style.css and home.css (static tier; with --render the home and vendors pages pass, and 44b, 25 and 39b stay open on the reading pages)
 * floor: 0 FAIL · fixed: 20 (11, 19, 20, 24b, 25, 26b, 34, 38i, 41, 48, 50, 54, 62, 63, 64, 67, 73, F1, F20, F26) · structural: 3 printed (58, 59, 77)
 * built: the project · redesign: polish · v2.0.0 */
/* Hallmark · dismissed 46a · "20% less" is the owner's own rate for returning clients, decided on 2026-11-13, a price term and not a measured result */
/* Hallmark · waive 38iii · one accented phrase, the whole second sentence of the h1, in the hero · the headline is two sentences, the money the operation loses and then what I do about it, and the accent marks the turn */
/* Hallmark · waive 49b · two links, each a real phrase, on two lines at most at 320px · a field note's title and the closing call are set at display size, so on a phone they break once and no further */
/* Hallmark · answered F8 · the tape under the header is the page's measuring device, and the lines that light up and the blocks that arrive are one entrance; all three stop under reduced motion */
/* Hallmark · answered F19 · one variable face, Archivo, set by width as much as by weight; the type system is the project's own and a polish keeps it */
/* Hallmark · finish-review: subagent · 5 findings · 4 resolved, 1 left to the owner (the source label over the marketplace figure is copy) · gap: none */

/* The whole site. Dark only, on purpose: there is no light theme. One accent, sharp corners, two
   typefaces served by the site itself, no script. What moves does so with CSS and stops for
   whoever asks. The home page adds home.css on top of this file.
   Every colour is a token in :root; labels are the body face in sentence case, and the mono face
   is kept for figures. Layers: page 0, the stacked panels of the home page 1, header 20, skip link 30. */

@font-face {
  font-family: "Archivo";
  src: url("files/fonts/archivo-latin-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("files/fonts/jetbrains-mono-latin-variable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #101217;
  --ground-deep: #0b0d11;
  --panel: #151821;
  --panel-up: #1b1f2a;
  --tint: #231f20; /* the ground with a ninth of the accent in it */
  --ink: #eee9de;
  --ink-2: #c8c3b7;
  --muted: #9a958a;
  --rule: rgba(238, 233, 222, .13);
  --rule-strong: rgba(238, 233, 222, .3);
  --accent: #e3a27e;
  --accent-up: #efb696;
  --accent-ink: #101217;
  --accent-soft: rgba(227, 162, 126, .16);
  --panel-glow: rgba(227, 162, 126, .08);
  --selection: rgba(227, 162, 126, .35); /* the accent, thinned, behind selected text */
  --shadow-card: rgba(0, 0, 0, .42);
  --shadow-book: rgba(0, 0, 0, .64);
  --gutter: rgba(0, 0, 0, .38);
  --gutter-mid: rgba(0, 0, 0, .14);
  --gutter-light: rgba(255, 255, 255, .14);
  --paper-edge: #d8d4ca;
  --paper-line: #b4afa3;
  --veil-1: rgba(16, 18, 23, .12); /* the ground laid over a picture, from a trace to almost solid */
  --veil-2: rgba(16, 18, 23, .62);
  --veil-3: rgba(16, 18, 23, .78);
  --veil-4: rgba(16, 18, 23, .95);
  --bar-rest: #4d4b47; /* the part of the claims bar that has no clear cause */
  --mask: #000; /* in a mask only the alpha counts: this is the part that shows */
  --sans: "Archivo", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --nav: 4rem;
}

*, *::before, *::after { box-sizing: border-box; }
/* overflow-x is clip, never hidden: hidden would make a scroll box and the sticky parts would stop sticking. */
html { overflow-x: clip; background: var(--ground); -webkit-text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
strong { font-weight: 640; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
:disabled, [aria-disabled="true"] { opacity: .48; cursor: not-allowed; }
::selection { background: var(--selection); color: var(--ink); }

.wrap { width: min(100% - 2.5rem, 84rem); margin-inline: auto; }
/* The skip link waits above the page, not far to its left, so it never adds width to a narrow screen. */
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 30; padding: .6rem .9rem; background: var(--accent); color: var(--accent-ink); font-weight: 620; }
.skip:focus { top: 1rem; }

h1 { font-weight: 660; font-stretch: 72%; font-size: clamp(2.1rem, 1.2rem + 3.4vw, 3.6rem); line-height: 1.04; letter-spacing: -.012em; text-wrap: balance; }
h2 { font-weight: 640; font-stretch: 78%; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.75rem); line-height: 1.12; letter-spacing: -.008em; text-wrap: balance; }
h3 { font-weight: 640; font-stretch: 80%; font-size: 1.25rem; line-height: 1.15; }
h1, h2, h3 { overflow-wrap: break-word; min-width: 0; } /* a long word in a head breaks before it widens the page */

/* ---------------------------------------------------------------- header and footer */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--ground); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--nav); }
.site-header .name, .site-footer .name { font-weight: 660; font-stretch: 76%; font-size: 1.125rem; letter-spacing: .005em; white-space: nowrap; }
.site-header ul { display: flex; gap: clamp(.85rem, 2.4vw, 2.1rem); }
.site-header nav a { display: block; padding-block: .8rem; font-size: .9375rem; font-stretch: 88%; color: var(--ink-2); white-space: nowrap; transition: color .2s; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -1px 0 var(--accent); }
@media (max-width: 26rem) {
  .site-header .name { font-size: 1rem; font-stretch: 68%; }
  .site-header ul { gap: .7rem; }
  .site-header nav a { font-size: .875rem; font-stretch: 72%; }
}
@media (max-width: 22.5rem) {
  .wrap { width: min(100% - 1.75rem, 84rem); }
  .site-header .name { font-size: .9375rem; font-stretch: 62%; }
  .site-header ul { gap: .55rem; }
  .site-header nav a { font-size: .8125rem; font-stretch: 62%; }
}
/* The tape under the header measures how far down the page the reader is. */
.tape {
  position: relative;
  height: 7px;
  border-bottom: 1px solid var(--rule);
  background:
    linear-gradient(90deg, var(--rule-strong) 1px, transparent 1px) 0 100% / 60px 7px repeat-x,
    linear-gradient(90deg, var(--rule) 1px, transparent 1px) 0 100% / 12px 4px repeat-x;
}
.tape span { position: absolute; left: 0; bottom: -1px; width: 100%; height: 2px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

.site-footer { border-top: 1px solid var(--rule); font-size: .9375rem; line-height: 1.5; color: var(--ink-2); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 4rem; padding-block: 2.5rem 3rem; }
.site-footer .name { display: inline-block; margin-bottom: .4rem; color: var(--ink); }
.site-footer li + li { margin-top: .3rem; }
.site-footer a { transition: color .2s; }
.site-footer a:hover { color: var(--accent); }

/* ---------------------------------------------------------------- buttons */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 1.25rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.4rem;
  border: 1px solid transparent;
  font-weight: 620;
  font-stretch: 90%;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  transition: transform .2s var(--ease), background-color .2s, border-color .2s, color .2s;
}
.btn:active { transform: translateY(1px); }
.btn-contact { background: var(--accent); color: var(--accent-ink); }
.btn-contact:hover { background: var(--accent-up); }
.btn-ghost { border-color: var(--rule-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
@media (min-width: 30rem) { .btn { white-space: nowrap; } }

/* ---------------------------------------------------------------- reading pages: every page but the home page */
main.wrap { padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(4rem, 8vw, 6rem); }
main.wrap > article, main.wrap > h1, main.wrap > p { max-width: 44rem; }
:where(main.wrap) h1 { margin-bottom: 1rem; }
hgroup > h1 { margin-bottom: .5rem; } /* the line that names the section sits close under its headline */
:where(main.wrap) h2 { margin: 2.75rem 0 .75rem; }
:where(main.wrap) p { margin-bottom: 1.15rem; }
:where(main.wrap) :is(ul, ol) { margin-bottom: 1.15rem; padding-left: 1.25rem; list-style: revert; }
:where(main.wrap) li { margin-bottom: .5rem; }
:where(main.wrap) li::marker { color: var(--accent); }
:where(main.wrap) a { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .22em; transition: color .2s; }
:where(main.wrap) a:hover { color: var(--accent); }

.kicker { margin-bottom: 1rem; font-weight: 500; font-stretch: 88%; font-size: .875rem; line-height: 1.3; color: var(--muted); }
.lede { max-width: 38rem; margin-bottom: 1.75rem; font-size: 1.1875rem; line-height: 1.5; color: var(--ink-2); }
.byline { margin-bottom: 1.75rem; font-size: .875rem; color: var(--muted); }
.answer { margin-bottom: 2rem; padding-left: 1.1rem; border-left: 2px solid var(--accent); font-size: 1.3125rem; line-height: 1.45; }
.scene { margin-bottom: 2rem; font-size: 1.3125rem; line-height: 1.45; }
.sources, .origin, .cta, .next { font-size: .9375rem; line-height: 1.55; color: var(--ink-2); }
.sources { overflow-wrap: anywhere; }
.origin, .next { margin-top: 2.25rem; padding-top: 1.1rem; border-top: 1px solid var(--rule); }
.cta a { font-weight: 640; }
.price { margin-bottom: .9rem; font: 500 .875rem/1.4 var(--mono); color: var(--accent); }
.btn-contact, .btn-contact:hover { text-decoration: none; color: var(--accent-ink); }
.btn-ghost, .btn-ghost:hover { text-decoration: none; }

details { margin: 2.25rem 0; padding-block: .85rem; border-block: 1px solid var(--rule); }
summary { cursor: pointer; font-weight: 620; font-stretch: 88%; }
details[open] summary { margin-bottom: .75rem; }
details ul { margin-bottom: 0; }

.compare { width: 100%; margin: 1.25rem 0 1.5rem; border-collapse: collapse; font-size: .9375rem; line-height: 1.5; color: var(--ink-2); }
.compare th, .compare td { padding: .85rem 1rem .85rem 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.compare th { font-weight: 500; font-stretch: 88%; font-size: .8125rem; line-height: 1.3; color: var(--muted); }
.compare td:first-child { width: 24%; font-weight: 620; font-stretch: 84%; font-size: 1.0625rem; line-height: 1.3; color: var(--ink); }
.compare tbody tr:last-child td { border-bottom-color: var(--accent); background: var(--tint); }
.compare tbody tr:last-child td:first-child { color: var(--accent); padding-left: .75rem; border-left: 2px solid var(--accent); }
@media (max-width: 36rem) {
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare td { display: block; }
  .compare tr { padding: .85rem 0; border-bottom: 1px solid var(--rule); }
  .compare tbody tr:last-child { border-bottom-color: var(--accent); }
  .compare td { padding: .15rem 0; border: 0; }
  .compare td:first-child { width: auto; }
  .compare td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
}

/* ---------------------------------------------------------------- collapsing engagement cards & rich page canvas */
main.wrap > article.page:has(.eng-deck, .risk-map),
main.wrap > article.book-page:has(.book-reader) { max-width: none; }
main.wrap > article.page:has(.eng-deck, .risk-map) > :not(.eng-deck, .risk-map, .card-demo, .band, .rate-strip, .plate-card, .fit-band, .proof-strip, .writing-grid),
main.wrap > article.book-page:has(.book-reader) > :not(.book-reader) { max-width: 44rem; }

.eng-deck { position: relative; width: 100%; max-width: 74rem; margin: 1.75rem 0 2.75rem; }
.eng-pick { position: absolute; opacity: 0; pointer-events: none; }
.eng-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.eng-cards { display: flex; flex-direction: column; gap: .625rem; }
.eng-card {
  position: relative;
  border: 1px solid var(--rule);
  background: var(--panel);
  color: var(--ink);
  overflow: hidden;
  transition: flex .7s var(--ease), border-color .3s ease, box-shadow .3s ease;
}

/* The picture behind a card sits still: the card answers by widening, and the picture only lightens. */
.eng-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  filter: grayscale(50%) brightness(.34);
  transition: filter .7s var(--ease);
}
.eng-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--veil-2) 0%, var(--veil-3) 45%, var(--veil-4) 100%);
}
.eng-card[data-card="1"] .eng-art {
  background-image:
    radial-gradient(circle at 85% 20%, var(--selection) 0%, transparent 55%),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: auto, 3.5rem 100%;
}
.eng-card[data-card="2"] .eng-art {
  background-image:
    radial-gradient(circle at 80% 30%, var(--selection) 0%, transparent 52%),
    repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px 14px);
}
.eng-card[data-card="3"] .eng-art {
  background-image:
    radial-gradient(circle at 85% 25%, var(--selection) 0%, transparent 55%),
    linear-gradient(180deg, var(--rule) 1px, transparent 1px);
  background-size: auto, 100% 3rem;
}
.eng-card[data-card="4"] .eng-art {
  background-image:
    radial-gradient(circle at 82% 24%, var(--selection) 0%, transparent 50%),
    linear-gradient(90deg, var(--rule-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: auto, 60px 10px, 12px 5px;
  background-repeat: no-repeat, repeat-x, repeat-x;
}

.eng-hit { position: absolute; inset: 0; z-index: 3; cursor: pointer; }
.eng-num { font: 500 .75rem/1 var(--mono); color: var(--accent); }
.eng-rail {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: .75rem;
  padding: 1rem 1.15rem;
}
.eng-rail-copy { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .75rem; flex: 1; min-width: 0; }
.eng-rail-title { font-weight: 620; font-stretch: 84%; font-size: 1.0625rem; line-height: 1.25; color: var(--ink); }
.eng-rail-price { font: 500 .75rem/1.3 var(--mono); color: var(--accent); }
.eng-rail::after { content: "+"; font: 500 1rem/1 var(--mono); color: var(--accent); margin-left: auto; }

.eng-body {
  display: none;
  position: relative;
  z-index: 2;
  flex-direction: column;
  padding: 1.35rem 1.15rem 1.5rem;
}
.eng-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .35rem 1rem; margin-bottom: .6rem; }
.eng-idx { font-weight: 500; font-stretch: 88%; font-size: .8125rem; line-height: 1.3; color: var(--muted); }
.eng-price { font: 500 .875rem/1.3 var(--mono); color: var(--accent); }
.eng-body h2 { margin: 0 0 .65rem; font-size: clamp(1.35rem, 1.1rem + .8vw, 1.75rem); }
.eng-body p { margin-bottom: .75rem; color: var(--ink-2); }
.eng-body p:first-of-type { color: var(--ink); }
.eng-body ul { margin-bottom: .75rem; color: var(--ink-2); }
.eng-body li { margin-bottom: .4rem; }
.eng-foot { margin: 0; margin-top: auto; padding-top: .5rem; }
.eng-cta {
  position: relative;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  font-weight: 620;
  font-stretch: 88%;
  font-size: .9375rem;
  line-height: 1.2;
  color: var(--ink);
  text-decoration: none;
  box-shadow: inset 0 -1px 0 var(--accent);
  padding-bottom: .2rem;
  transition: color .2s;
}
.eng-cta:hover { color: var(--accent); }

:where(#eng-1:checked) ~ .eng-cards .eng-card[data-card="1"],
:where(#eng-2:checked) ~ .eng-cards .eng-card[data-card="2"],
:where(#eng-3:checked) ~ .eng-cards .eng-card[data-card="3"],
:where(#eng-4:checked) ~ .eng-cards .eng-card[data-card="4"] {
  border-color: var(--rule-strong);
  box-shadow: inset 0 2px 0 var(--accent);
}
:where(#eng-1:checked) ~ .eng-cards .eng-card[data-card="1"] .eng-art,
:where(#eng-2:checked) ~ .eng-cards .eng-card[data-card="2"] .eng-art,
:where(#eng-3:checked) ~ .eng-cards .eng-card[data-card="3"] .eng-art,
:where(#eng-4:checked) ~ .eng-cards .eng-card[data-card="4"] .eng-art {
  filter: grayscale(10%) brightness(.58);
}
:where(#eng-1:checked) ~ .eng-cards .eng-card[data-card="1"] .eng-hit,
:where(#eng-2:checked) ~ .eng-cards .eng-card[data-card="2"] .eng-hit,
:where(#eng-3:checked) ~ .eng-cards .eng-card[data-card="3"] .eng-hit,
:where(#eng-4:checked) ~ .eng-cards .eng-card[data-card="4"] .eng-hit {
  pointer-events: none;
}
:where(#eng-1:checked) ~ .eng-cards .eng-card[data-card="1"] .eng-rail,
:where(#eng-2:checked) ~ .eng-cards .eng-card[data-card="2"] .eng-rail,
:where(#eng-3:checked) ~ .eng-cards .eng-card[data-card="3"] .eng-rail,
:where(#eng-4:checked) ~ .eng-cards .eng-card[data-card="4"] .eng-rail {
  display: none;
}
:where(#eng-1:checked) ~ .eng-cards .eng-card[data-card="1"] .eng-body,
:where(#eng-2:checked) ~ .eng-cards .eng-card[data-card="2"] .eng-body,
:where(#eng-3:checked) ~ .eng-cards .eng-card[data-card="3"] .eng-body,
:where(#eng-4:checked) ~ .eng-cards .eng-card[data-card="4"] .eng-body {
  display: flex;
}

#eng-1:focus-visible ~ .eng-cards .eng-card[data-card="1"],
#eng-2:focus-visible ~ .eng-cards .eng-card[data-card="2"],
#eng-3:focus-visible ~ .eng-cards .eng-card[data-card="3"],
#eng-4:focus-visible ~ .eng-cards .eng-card[data-card="4"] {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (min-width: 64rem) {
  .eng-cards { flex-direction: row; height: 31.5rem; align-items: stretch; }
  .eng-card { flex: .42; min-width: 5.25rem; }
  .eng-rail {
    position: absolute;
    inset: 1.5rem .75rem;
    padding: 0;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1.5rem;
    transition: opacity .25s ease;
  }
  .eng-rail::after { display: none; }
  .eng-rail-copy {
    flex: 0 0 auto;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    display: block;
  }
  .eng-rail-title { display: block; font-size: .9375rem; line-height: 1.2; white-space: nowrap; }
  .eng-rail-price { display: block; margin-block-start: .2rem; font-size: .6875rem; line-height: 1.2; white-space: nowrap; }

  /* A panel shows unless another card is picked: the rule that hides it names that pick, so the
     page never depends on anything but the radio buttons to be read. */
  .eng-body {
    display: flex;
    position: absolute;
    inset: 0;
    width: max(100%, 36rem);
    padding: 1.4rem 1.85rem;
    overflow-y: auto;
    transition: opacity .35s ease .15s, transform .5s var(--ease) .15s;
  }
  .eng-body p, .eng-body ul { max-width: 48rem; }
  :where(#eng-1:checked) ~ .eng-cards .eng-card:not([data-card="1"]) .eng-body,
  :where(#eng-2:checked) ~ .eng-cards .eng-card:not([data-card="2"]) .eng-body,
  :where(#eng-3:checked) ~ .eng-cards .eng-card:not([data-card="3"]) .eng-body,
  :where(#eng-4:checked) ~ .eng-cards .eng-card:not([data-card="4"]) .eng-body {
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity .3s ease, transform .45s var(--ease);
  }

  :where(#eng-1:checked) ~ .eng-cards .eng-card[data-card="1"],
  :where(#eng-2:checked) ~ .eng-cards .eng-card[data-card="2"],
  :where(#eng-3:checked) ~ .eng-cards .eng-card[data-card="3"],
  :where(#eng-4:checked) ~ .eng-cards .eng-card[data-card="4"] {
    flex: 4.2;
  }
  :where(#eng-1:checked) ~ .eng-cards .eng-card[data-card="1"] .eng-rail,
  :where(#eng-2:checked) ~ .eng-cards .eng-card[data-card="2"] .eng-rail,
  :where(#eng-3:checked) ~ .eng-cards .eng-card[data-card="3"] .eng-rail,
  :where(#eng-4:checked) ~ .eng-cards .eng-card[data-card="4"] .eng-rail {
    display: flex;
    opacity: 0;
    pointer-events: none;
  }
}

@media (hover: hover) and (min-width: 64rem) {
  .eng-cards:hover .eng-card:not(:hover) {
    flex: .42;
    border-color: var(--rule);
    box-shadow: none;
  }
  .eng-cards:hover .eng-card:not(:hover) .eng-art {
    filter: grayscale(50%) brightness(.34);
  }
  .eng-cards:hover .eng-card:not(:hover) .eng-rail {
    opacity: 1;
  }
  .eng-cards:hover .eng-card:not(:hover) .eng-body {
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition-delay: 0s;
  }

  .eng-cards:hover .eng-card:hover {
    flex: 4.2;
    border-color: var(--rule-strong);
    box-shadow: inset 0 2px 0 var(--accent);
  }
  .eng-cards:hover .eng-card:hover .eng-art {
    filter: grayscale(10%) brightness(.56);
  }
  .eng-cards:hover .eng-card:hover .eng-rail {
    opacity: 0;
    pointer-events: none;
  }
  .eng-cards:hover .eng-card:hover .eng-body {
    opacity: 1;
    pointer-events: auto;
    transform: none;
    transition: opacity .35s ease .15s, transform .5s var(--ease) .15s;
  }
}

/* ---------------------------------------------------------------- motion */
@keyframes measure { to { transform: scaleX(1); } }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .tape span { animation: measure linear both; animation-timeline: scroll(root block); }
  }
}
/* A source line under a figure taken from a study or a filing. */
.src { margin-top: -.35rem; font: 500 .75rem/1.55 var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.src a { color: inherit; text-decoration: underline; text-underline-offset: .2em; }
/* The five steps of a deployment: the list numbers them, the text does not. */
.steps ol { display: grid; gap: 1.15rem; margin: 1.25rem 0 1.5rem; }
.steps li { padding-left: .35rem; }
.steps em { display: block; margin-top: .3rem; font: 500 .8125rem/1.5 var(--mono); color: var(--muted); }
/* The rule the systems are built to: four boxes in a horizontal pipeline on wide screens, with CSS step numbers. */
.flow {
  counter-reset: flow-step;
  display: grid;
  gap: 1.5rem;
  max-width: none;
  margin: 1.5rem 0 2.25rem;
  padding-left: 0;
  list-style: none;
}
.flow li {
  counter-increment: flow-step;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  margin: 0;
  padding: 1.15rem 1.2rem 1.25rem;
  border: 1px solid var(--rule-strong);
  border-top: 2px solid var(--accent);
  background: var(--panel);
  box-shadow: 0 10px 26px var(--shadow-card);
  font-size: .9375rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.flow li::before {
  content: "0" counter(flow-step);
  font: 600 .75rem/1 var(--mono);
  color: var(--accent);
  margin-bottom: .15rem;
}
.flow li strong { color: var(--ink); font-size: 1rem; line-height: 1.25; }
.flow-stop { display: block; margin-top: auto; padding: .55rem .7rem; border-left: 2px solid var(--accent); background: var(--tint); color: var(--ink); font-size: .875rem; }
@media (min-width: 58rem) {
  .flow { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
}
/* A sample decision card on the proof page. Three radio buttons pick a play and a checkbox takes the lead
   time away; the selectors below do the rest, with no script. Every play stays readable whatever is picked. */
.card-demo { position: relative; max-width: none; margin: 1.75rem 0 2rem; border: 1px solid var(--rule-strong); border-top: 2px solid var(--accent); background: var(--panel); color: var(--ink-2); box-shadow: 0 14px 36px var(--shadow-card); }
.card-demo-pick { position: absolute; opacity: 0; pointer-events: none; }
.card-demo-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .35rem 1rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--rule); }
.card-demo-title { font-weight: 620; font-stretch: 88%; color: var(--ink); }
.card-demo-state { padding: .2rem .55rem; border: 1px solid var(--accent); font: 500 .8125rem/1.3 var(--mono); color: var(--accent); }
.card-demo-note { padding: .75rem 1.1rem; border-bottom: 1px solid var(--rule); font-size: .875rem; line-height: 1.55; color: var(--muted); }
.card-demo-note strong { color: var(--ink-2); }
.card-demo-step { padding: 1.1rem; border-bottom: 1px solid var(--rule); font-size: .9375rem; line-height: 1.55; color: var(--ink-2); }
.card-demo-step:last-child { border-bottom: 0; }
.card-demo-step h3 { margin-bottom: .6rem; font-size: 1.0625rem; color: var(--ink); }
.card-demo-step > p + p, .card-demo-step > ul + p { margin-top: .75rem; }
.card-demo-probes, .card-demo-record { display: grid; gap: .45rem; margin: .6rem 0 0; padding-left: 1.1rem; }
.card-demo-pass { padding-left: .75rem; border-left: 2px solid var(--accent); }
.card-demo-plays { display: grid; gap: .625rem; margin-top: .9rem; }
.card-demo-play { display: flex; flex-direction: column; gap: .35rem; padding: .85rem .9rem; border: 1px solid var(--rule); background: var(--ground); color: var(--ink-2); cursor: pointer; transition: border-color .2s; }
.card-demo-play:hover { border-color: var(--rule-strong); }
.card-demo-name { font-weight: 620; font-stretch: 88%; color: var(--ink); }
.card-demo-what { margin-bottom: .2rem; font-size: .875rem; color: var(--muted); }
.card-demo-row { display: grid; gap: .1rem; padding-top: .35rem; border-top: 1px solid var(--rule); }
.card-demo-k { font-size: .875rem; }
.card-demo-v { font: 500 .875rem/1.55 var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.card-demo-rank { margin-top: auto; padding-top: .45rem; font: 500 .8125rem/1.45 var(--mono); color: var(--muted); }
.card-demo-lead { display: inline-block; margin-top: .9rem; padding: .45rem .8rem; border: 1px solid var(--rule-strong); font-size: .875rem; color: var(--ink); cursor: pointer; transition: border-color .2s, color .2s; }
.card-demo-lead:hover { border-color: var(--accent); color: var(--accent); }
.card-demo-gap { margin-top: .75rem; padding-left: .75rem; border-left: 2px solid var(--accent); }
.card-demo-unmeasured, .card-demo-if { display: none; }

#card-play-a:checked ~ .card-demo-step .card-demo-play[data-play="a"],
#card-play-b:checked ~ .card-demo-step .card-demo-play[data-play="b"],
#card-play-c:checked ~ .card-demo-step .card-demo-play[data-play="c"] {
  border-color: var(--accent);
  box-shadow: inset 0 2px 0 var(--accent);
}
#card-play-a:checked ~ .card-demo-step .card-demo-if[data-play="a"],
#card-play-b:checked ~ .card-demo-step .card-demo-if[data-play="b"],
#card-play-c:checked ~ .card-demo-step .card-demo-if[data-play="c"] {
  display: block;
  margin-bottom: .75rem;
  color: var(--ink);
}
#card-no-lead:checked ~ .card-demo-step .card-demo-measured { display: none; }
#card-no-lead:checked ~ .card-demo-step .card-demo-unmeasured { display: revert; }
#card-no-lead:checked ~ .card-demo-step .card-demo-v .card-demo-unmeasured { color: var(--accent); }
#card-play-a:focus-visible ~ .card-demo-step .card-demo-play[data-play="a"],
#card-play-b:focus-visible ~ .card-demo-step .card-demo-play[data-play="b"],
#card-play-c:focus-visible ~ .card-demo-step .card-demo-play[data-play="c"],
#card-no-lead:focus-visible ~ .card-demo-step .card-demo-lead {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (min-width: 44rem) {
  .card-demo-plays { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* The evidence plates (risks.py): what a rollout role takes on beside my cutover engagement, and how far
   each risk is backed. Every mark takes its colour here, never from the markup. */
.risk-map { max-width: 60rem; margin: 1.75rem 0 2.25rem; }
.risk-lead { margin: 0 0 1rem; font-weight: 620; font-stretch: 88%; font-size: 1.125rem; line-height: 1.35; color: var(--ink); }
.risk-table { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.45; color: var(--ink-2); }
.risk-table th, .risk-table td { padding: .7rem .9rem .7rem 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.risk-table thead th { font-weight: 500; font-stretch: 88%; font-size: .8125rem; line-height: 1.3; color: var(--muted); }
.risk-table tbody th { width: 28%; font-weight: 620; font-stretch: 88%; color: var(--ink); }
.risk-level { display: inline-flex; align-items: flex-start; gap: .5rem; }
.risk-level-mark { flex: none; width: 1.75rem; height: .5rem; margin-top: .45em; }
.risk-level-on { fill: var(--accent); }
.risk-level-off { fill: none; stroke: var(--muted); stroke-width: 1; }
.risk-level-word { color: var(--ink-2); }
.risk-key, .risk-limit { font-size: .875rem; line-height: 1.55; color: var(--muted); }
.risk-key { margin: 0 0 .75rem; }
.risk-limit { margin: .9rem 0 0; }
.risk-rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.risk-row { margin: 0; padding-block: 0; border-block: 0; border-bottom: 1px solid var(--rule); }
.risk-row summary { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1rem; padding: .75rem 0; list-style: none; }
.risk-row summary::-webkit-details-marker { display: none; }
.risk-row summary::after { content: "+"; margin-left: auto; color: var(--muted); font-weight: 500; }
.risk-row[open] summary::after { content: "\2212"; }
.risk-row[open] summary { margin-bottom: 0; }
.risk-row summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.risk-name { flex: 1 1 16rem; color: var(--ink); }
.risk-pays { flex: none; font-size: .8125rem; font-weight: 500; color: var(--muted); }
.risk-track { flex: none; width: 7rem; height: 1.125rem; }
.risk-track-line { stroke: var(--rule-strong); stroke-width: 1; }
.risk-track-tick { fill: var(--muted); }
.risk-track-check { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.risk-track-reached { fill: var(--accent); }
.risk-evidence { padding: 0 0 .9rem; font-size: .9375rem; line-height: 1.55; color: var(--ink-2); }
.risk-evidence p { margin: .35rem 0; }
.risk-grade { color: var(--muted); }

@media (max-width: 36rem) {
  .risk-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .risk-table, .risk-table tbody, .risk-table tbody tr, .risk-table tbody th, .risk-table td { display: block; }
  .risk-table tr { padding: .7rem 0; border-bottom: 1px solid var(--rule); }
  .risk-table th, .risk-table td { padding: .2rem 0; border: 0; }
  .risk-table tbody th { width: auto; }
  .risk-table td[data-label]::before { content: attr(data-label); display: block; font-size: .8125rem; color: var(--muted); }
}

/* ---------------------------------------------------------------- elevated bands & grids (engagements + proof) */
.band, .rate-strip, .plate-card, .fit-band, .proof-strip, .writing-grid { max-width: 74rem; }

.rate-strip {
  display: grid;
  gap: 1rem 2.5rem;
  align-items: center;
  margin: 0 0 2.75rem;
  padding: 1.35rem 1.75rem;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  background: var(--panel);
  box-shadow: 0 10px 28px var(--shadow-card);
}
.rate-strip-head h2 { margin: 0 0 .35rem; font-size: 1.35rem; }
.rate-strip-head .price { margin: 0; font-size: .9375rem; }
.rate-strip-copy p { margin: 0; font-size: .9375rem; color: var(--ink-2); }
@media (min-width: 52rem) {
  .rate-strip { grid-template-columns: minmax(15rem, 4fr) minmax(0, 8fr); }
}

.band {
  margin: 2.75rem 0;
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
  border: 1px solid var(--rule);
}
.band > h2:first-child { margin-top: 0; }
.band-deep {
  background:
    radial-gradient(circle at 92% 10%, var(--panel-glow) 0%, transparent 45%),
    var(--ground-deep);
}
.band-panel { background: var(--panel); box-shadow: 0 12px 32px var(--shadow-card); }
.band > p:not(.track-note) { max-width: 52rem; color: var(--ink-2); }

.promise-grid {
  display: grid;
  gap: 1px;
  margin-top: 1.5rem;
  border: 1px solid var(--rule);
  background: var(--rule);
}
.promise-card {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding: clamp(1.35rem, 2.5vw, 1.85rem);
  background: var(--ground);
}
.promise-accent { background: var(--tint); box-shadow: inset 0 2px 0 var(--accent); }
.promise-num {
  font-weight: 660;
  font-stretch: 68%;
  font-size: clamp(2.1rem, 3.2vw, 3rem);
  line-height: .95;
  letter-spacing: -.02em;
  color: var(--accent);
  font-variant-numeric: lining-nums tabular-nums;
}
.promise-card p { margin: 0; font-size: .9375rem; line-height: 1.55; color: var(--ink-2); }
.promise-card strong { color: var(--ink); }
@media (min-width: 52rem) {
  .promise-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.plate-card {
  margin: 2.75rem 0;
  padding: clamp(1.75rem, 3.5vw, 2.65rem);
  border: 1px solid var(--rule-strong);
  border-top: 2px solid var(--accent);
  background:
    radial-gradient(circle at 88% 8%, var(--panel-glow) 0%, transparent 46%),
    var(--panel);
  box-shadow: 0 16px 40px var(--shadow-card);
}
.plate-card > h2:first-child { margin-top: 0; margin-bottom: 1.25rem; }
.plate-card .risk-map { max-width: none; margin: 0; }
.radar-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-top: 1.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--rule);
}
.radar-bar p { margin: 0; max-width: 38rem; font-size: .9375rem; color: var(--ink-2); }

.fit-band {
  display: grid;
  gap: 1.5rem 2.5rem;
  align-items: start;
  margin: 2.75rem 0 1.5rem;
}
.fit-copy h2 { margin-top: 0; }
.fit-copy p { margin-bottom: 0; color: var(--ink-2); }
.roles-drawer {
  margin: 0;
  padding: 1.15rem 1.4rem;
  border: 1px solid var(--rule-strong);
  background: var(--panel);
  box-shadow: 0 10px 26px var(--shadow-card);
}
.roles-drawer summary { display: flex; align-items: center; justify-content: space-between; list-style: none; color: var(--ink); }
.roles-drawer summary::-webkit-details-marker { display: none; }
.roles-drawer summary::after { content: "+"; font: 500 1.1rem/1 var(--mono); color: var(--accent); }
.roles-drawer[open] summary::after { content: "\2212"; }
.roles-drawer ul { margin-top: .85rem; padding-left: 1.15rem; font-size: .9375rem; color: var(--ink-2); }
.roles-drawer li strong { color: var(--ink); }
@media (min-width: 56rem) {
  .fit-band { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

/* ---------------------------------------------------------------- proof gallery blocks */
.proof-strip {
  display: grid;
  gap: 1px;
  margin: 1.75rem 0 2.5rem;
  border: 1px solid var(--rule-strong);
  background: var(--rule);
  box-shadow: 0 14px 34px var(--shadow-card);
}
.proof-kpi {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.35rem 1.4rem;
  background: var(--panel);
}
.proof-kpi-lead { background: var(--tint); box-shadow: inset 0 2px 0 var(--accent); }
.proof-kpi-n {
  font-weight: 660;
  font-stretch: 66%;
  font-size: clamp(2.15rem, 3.6vw, 3.1rem);
  line-height: .94;
  letter-spacing: -.02em;
  color: var(--ink);
  font-variant-numeric: lining-nums tabular-nums;
}
.proof-kpi-lead .proof-kpi-n { color: var(--accent); }
.proof-kpi-t { font-size: .875rem; line-height: 1.45; color: var(--ink-2); }
@media (min-width: 44rem) { .proof-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .proof-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.track-grid ul, .sys-grid ul {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
  padding-left: 0;
  list-style: none;
}
.track-grid li, .sys-grid li {
  margin: 0;
  padding: 1.35rem 1.45rem;
  border: 1px solid var(--rule);
  background: var(--panel);
  font-size: .9375rem;
  line-height: 1.55;
  color: var(--ink-2);
  box-shadow: 0 8px 22px var(--shadow-card);
  transition: border-color .2s;
}
.track-grid li:hover, .sys-grid li:hover { border-color: var(--rule-strong); }
.track-grid li:first-child {
  border-color: var(--rule-strong);
  border-top: 2px solid var(--accent);
  background: var(--tint);
}
.track-grid li strong, .sys-grid li strong {
  display: block;
  margin-bottom: .45rem;
  font-stretch: 86%;
  font-size: 1.0625rem;
  line-height: 1.25;
  color: var(--ink);
}
.track-note { margin: 1rem 0 0; max-width: 54rem; font-size: .875rem; color: var(--muted); }
@media (min-width: 52rem) {
  .track-grid ul, .sys-grid ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .track-grid li:first-child { grid-column: 1 / -1; }
}

.audit-spotlight {
  display: grid;
  gap: 1.75rem 2.75rem;
  align-items: center;
  margin-top: 1.25rem;
}
.audit-visual {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: 1.5rem;
  border: 1px solid var(--rule);
  background: var(--ground-deep);
}
.audit-big {
  font-weight: 660;
  font-stretch: 66%;
  font-size: clamp(3rem, 6vw, 4.75rem);
  line-height: .9;
  letter-spacing: -.02em;
  color: var(--accent);
  font-variant-numeric: lining-nums tabular-nums;
}
.audit-sub { font-size: .9375rem; line-height: 1.45; color: var(--ink-2); }
.audit-bar { margin-top: .5rem; }
.audit-bar svg { display: block; width: 100%; height: .875rem; }
.audit-bar rect { stroke: var(--ground-deep); stroke-width: 2; vector-effect: non-scaling-stroke; }
.seg-late { fill: var(--accent); }
.seg-flag { fill: var(--ink); }
.seg-open { fill: var(--bar-rest); }
.audit-legend { display: flex; flex-wrap: wrap; gap: .35rem 1.15rem; margin-top: .65rem; font-size: .8125rem; color: var(--ink-2); font-variant-numeric: lining-nums tabular-nums; }
.audit-leg::before { content: ""; display: inline-block; width: .55rem; height: .55rem; margin-right: .4rem; vertical-align: -.02rem; }
.audit-leg-late::before { background: var(--accent); }
.audit-leg-flag::before { background: var(--ink); }
.audit-leg-open::before { background: var(--bar-rest); }
.audit-copy p { margin-bottom: 1.25rem; color: var(--ink-2); }
.audit-copy strong { color: var(--ink); }
@media (min-width: 52rem) {
  .audit-spotlight { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
}

.writing-grid {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}
.writing-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.15rem;
  padding: 1.5rem 1.65rem;
  border: 1px solid var(--rule);
  background: var(--panel);
  color: var(--ink-2);
}
.writing-card p { margin: 0; }
.writing-card .btn { align-self: flex-start; }
.writing-book { border-color: var(--rule-strong); border-top: 2px solid var(--accent); background: var(--tint); }
@media (min-width: 52rem) {
  .writing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------- interactive zero-JS book sample reader */
.book-page { max-width: 44rem; }
.book-reader { position: relative; max-width: 74rem; margin: 1.75rem 0 2.5rem; }
.book-pick { position: absolute; top: 50%; left: 0; opacity: 0; pointer-events: none; }
.book-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.book-stage {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule-strong);
  background:
    radial-gradient(ellipse at 50% 42%, var(--panel-glow) 0%, transparent 65%),
    var(--ground-deep);
  box-shadow: 0 20px 48px var(--shadow-book);
}
.book-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.25rem;
  padding: .85rem 1.25rem;
  border-bottom: 1px solid var(--rule);
  background: var(--panel);
}
.book-bar-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem .9rem; }
.book-bar-title { font-weight: 620; font-stretch: 86%; font-size: .9375rem; color: var(--ink); }
.book-status-desk, .book-status-mob { font: 500 .8125rem/1.3 var(--mono); color: var(--accent); }
.book-status-desk { display: none; }
.book-stat, .book-stat-m { display: none; }
.book-bar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.book-pdf, .book-fs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0 .85rem;
  border: 1px solid var(--rule-strong);
  background: var(--ground);
  color: var(--ink);
  font-weight: 600;
  font-stretch: 88%;
  font-size: .875rem;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color .2s, color .2s, background-color .2s;
}
.book-pdf, .book-pdf:hover { text-decoration: none; }
.book-pdf:hover, .book-fs-btn:hover { border-color: var(--accent); color: var(--accent); }
.book-fs-btn { border-color: var(--accent); color: var(--accent); }
.book-fs-btn:hover { background: var(--accent); color: var(--accent-ink); }
.book-fs-exit { display: none; }

.book-viewport {
  display: grid;
  place-items: center;
  padding: clamp(1rem, 2.2vw, 1.75rem) clamp(.75rem, 2.5vw, 2rem);
  min-height: 20rem;
  perspective: 1800px;
}
.book-spread { display: none; position: relative; max-width: 100%; }
.book-spread-cover { justify-content: center; }
.book-spread-open { justify-content: center; align-items: stretch; }
.book-leaf {
  position: relative;
  display: none;
  overflow: hidden;
  background: var(--paper-edge);
  box-shadow: 0 18px 40px var(--shadow-book);
}
.book-leaf img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(58vh, 33rem);
  height: auto;
  object-fit: contain;
}
.book-leaf-cover {
  box-shadow:
    3px 0 0 var(--paper-edge),
    5px 1px 0 var(--paper-line),
    7px 2px 0 var(--paper-edge),
    0 22px 48px var(--shadow-book);
}
.book-leaf-left {
  box-shadow:
    -3px 0 0 var(--paper-edge),
    -5px 1px 0 var(--paper-line),
    -12px 18px 36px var(--shadow-book);
}
.book-leaf-right {
  box-shadow:
    3px 0 0 var(--paper-edge),
    5px 1px 0 var(--paper-line),
    12px 18px 36px var(--shadow-book);
}
.book-gutter { position: absolute; top: 0; bottom: 0; width: 12%; pointer-events: none; z-index: 2; }
.book-gutter-left { right: 0; background: linear-gradient(90deg, transparent 0%, var(--gutter-mid) 58%, var(--gutter) 100%); }
.book-gutter-right { left: 0; background: linear-gradient(90deg, var(--gutter) 0%, var(--gutter-mid) 36%, var(--gutter-light) 56%, transparent 100%); }
.book-leaf-hit { position: absolute; inset: 0; z-index: 3; cursor: pointer; }
.book-hit-prev { cursor: w-resize; }
.book-hit-next { cursor: e-resize; }

.book-nav {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding: .9rem 1.25rem 1.05rem;
  border-top: 1px solid var(--rule);
  background: var(--panel);
}
.book-nav-desk { display: none; align-items: center; justify-content: space-between; gap: .75rem; }
.book-nav-mob { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.book-steps { display: inline-flex; }
.book-step, .book-step-m {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0 .95rem;
  border: 1px solid var(--rule-strong);
  background: var(--ground);
  color: var(--ink);
  font-weight: 600;
  font-stretch: 88%;
  font-size: .875rem;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.book-step:hover, .book-step-m:hover { border-color: var(--accent); color: var(--accent); }
.book-step-off { opacity: .42; cursor: not-allowed; pointer-events: none; }
.book-pills { display: inline-flex; flex-wrap: wrap; gap: .35rem; justify-content: center; }
.book-pill, .book-pill-m {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.35rem;
  min-height: 2.35rem;
  padding: 0 .7rem;
  border: 1px solid var(--rule);
  background: var(--ground);
  color: var(--ink-2);
  font: 500 .8125rem/1 var(--mono);
  cursor: pointer;
  transition: border-color .2s, color .2s, background-color .2s;
}
.book-pill:hover, .book-pill-m:hover { border-color: var(--rule-strong); color: var(--ink); }
.book-hint { margin: 0; font-size: .8125rem; color: var(--muted); text-align: center; }

/* Mobile single-page state wiring (pages 1..7) */
#book-p1:checked ~ .book-stage [data-spread="0"],
#book-p2:checked ~ .book-stage [data-spread="1"],
#book-p3:checked ~ .book-stage [data-spread="1"],
#book-p4:checked ~ .book-stage [data-spread="2"],
#book-p5:checked ~ .book-stage [data-spread="2"],
#book-p6:checked ~ .book-stage [data-spread="3"],
#book-p7:checked ~ .book-stage [data-spread="3"] { display: flex; }

#book-p1:checked ~ .book-stage .book-leaf[data-page="1"],
#book-p2:checked ~ .book-stage .book-leaf[data-page="2"],
#book-p3:checked ~ .book-stage .book-leaf[data-page="3"],
#book-p4:checked ~ .book-stage .book-leaf[data-page="4"],
#book-p5:checked ~ .book-stage .book-leaf[data-page="5"],
#book-p6:checked ~ .book-stage .book-leaf[data-page="6"],
#book-p7:checked ~ .book-stage .book-leaf[data-page="7"] { display: block; }

#book-p1:checked ~ .book-stage .book-stat-m[data-p="1"],
#book-p2:checked ~ .book-stage .book-stat-m[data-p="2"],
#book-p3:checked ~ .book-stage .book-stat-m[data-p="3"],
#book-p4:checked ~ .book-stage .book-stat-m[data-p="4"],
#book-p5:checked ~ .book-stage .book-stat-m[data-p="5"],
#book-p6:checked ~ .book-stage .book-stat-m[data-p="6"],
#book-p7:checked ~ .book-stage .book-stat-m[data-p="7"] { display: inline; }

#book-p1:checked ~ .book-stage .book-step-m[data-p="1"],
#book-p2:checked ~ .book-stage .book-step-m[data-p="2"],
#book-p3:checked ~ .book-stage .book-step-m[data-p="3"],
#book-p4:checked ~ .book-stage .book-step-m[data-p="4"],
#book-p5:checked ~ .book-stage .book-step-m[data-p="5"],
#book-p6:checked ~ .book-stage .book-step-m[data-p="6"],
#book-p7:checked ~ .book-stage .book-step-m[data-p="7"] { display: inline-flex; }

#book-p1:checked ~ .book-stage .book-pill-m[data-p="1"],
#book-p2:checked ~ .book-stage .book-pill-m[data-p="2"],
#book-p3:checked ~ .book-stage .book-pill-m[data-p="3"],
#book-p4:checked ~ .book-stage .book-pill-m[data-p="4"],
#book-p5:checked ~ .book-stage .book-pill-m[data-p="5"],
#book-p6:checked ~ .book-stage .book-pill-m[data-p="6"],
#book-p7:checked ~ .book-stage .book-pill-m[data-p="7"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* Desktop two-page open book spreads (>= 48rem) */
@media (min-width: 48rem) {
  .book-status-desk { display: inline; }
  .book-status-mob { display: none; }
  .book-nav-desk { display: flex; }
  .book-nav-mob { display: none; }
  .book-spread-open .book-leaf { display: block; max-width: 50%; }

  #book-p1:checked ~ .book-stage .book-stat[data-s="0"],
  #book-p2:checked ~ .book-stage .book-stat[data-s="1"],
  #book-p3:checked ~ .book-stage .book-stat[data-s="1"],
  #book-p4:checked ~ .book-stage .book-stat[data-s="2"],
  #book-p5:checked ~ .book-stage .book-stat[data-s="2"],
  #book-p6:checked ~ .book-stage .book-stat[data-s="3"],
  #book-p7:checked ~ .book-stage .book-stat[data-s="3"] { display: inline; }

  #book-p1:checked ~ .book-stage .book-step[data-s="0"],
  #book-p2:checked ~ .book-stage .book-step[data-s="1"],
  #book-p3:checked ~ .book-stage .book-step[data-s="1"],
  #book-p4:checked ~ .book-stage .book-step[data-s="2"],
  #book-p5:checked ~ .book-stage .book-step[data-s="2"],
  #book-p6:checked ~ .book-stage .book-step[data-s="3"],
  #book-p7:checked ~ .book-stage .book-step[data-s="3"] { display: inline-flex; }

  #book-p1:checked ~ .book-stage .book-pill[data-s="0"],
  #book-p2:checked ~ .book-stage .book-pill[data-s="1"],
  #book-p3:checked ~ .book-stage .book-pill[data-s="1"],
  #book-p4:checked ~ .book-stage .book-pill[data-s="2"],
  #book-p5:checked ~ .book-stage .book-pill[data-s="2"],
  #book-p6:checked ~ .book-stage .book-pill[data-s="3"],
  #book-p7:checked ~ .book-stage .book-pill[data-s="3"] {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
  }
}

/* Full-screen reading mode */
#book-fs:checked ~ .book-stage {
  position: fixed;
  inset: 0;
  z-index: 60;
  width: 100vw;
  height: 100dvh;
  margin: 0;
  border: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
#book-fs:checked ~ .book-stage .book-fs-enter { display: none; }
#book-fs:checked ~ .book-stage .book-fs-exit { display: inline; }
#book-fs:checked ~ .book-stage .book-fs-btn { background: var(--accent); color: var(--accent-ink); }
#book-fs:checked ~ .book-stage .book-viewport { min-height: 0; height: 100%; padding: 1rem 1.5rem; overflow: auto; }
#book-fs:checked ~ .book-stage .book-leaf img { max-height: calc(100dvh - 10.5rem); }
#book-fs:focus-visible ~ .book-stage .book-fs-btn { outline: 2px solid var(--accent); outline-offset: 2px; }

@keyframes book-turn {
  from { opacity: 0; transform: rotateY(-5deg) scale(.985); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .book-spread { animation: book-turn .38s var(--ease) both; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
