/* ============================================================================
   SERRAS — DECK.CSS  ·  A+ coffee-table 16:9 edition
   The `bb-` slide layer. Slide authors consume ONLY these classes + theme tokens.

   This is the gallery-grade deck contract. Firstlight pacing: the book is
   DARK-NATIVE — light emerging from darkness. Veil plates open the hero +
   the 13 section dividers; every interior slide stands on the flat void.
   The deck IS the proof of the system: every slide obeys the canon it expresses.

   LOAD ORDER (matters — fonts → theme tokens → deck layer):
     <link rel="stylesheet" href="./assets/fonts.generated.css" />
     <link rel="stylesheet" href="./assets/tokens.css" />     (@imports tokens.generated.css)
     <link rel="stylesheet" href="./assets/deck.css" />       (THIS FILE)

   GOVERNING LAW (serras CANON.md · Firstlight, FINAL decided 2026-07-02):
   - SOFT corners (radius 6/10/16 + pill CTAs). PAINTERLY depth (soft diffuse
     elevation via theme --shadow-*; dark hairline ring tuned ~3:1). Gradients
     banned EXCEPT the static veil scrim. CINEMATIC motion only (expo-out;
     never bouncy) — and none of it celebratory.
   - Type: Fraunces TAMED (--font-display, 'SOFT' 0 'WONK' 0, opsz 60/48/40,
     wght 600 — never 900) / Instrument Sans (--font-body) / JetBrains Mono
     (--font-mono, tabular-nums, the evidence register). Saira = WORDMARK ONLY
     (never in the ramp). One serif statement per view.
   - Amber #FFB627 = the reserved SIGNAL: exactly ONE emphatic CTA or emphasis
     word per view via --cta-bg/--cta-fg, <10% coverage, DARK ink label, never
     the wordmark, never decoration. The cool core (--accent teal-soft /
     --accent-strong cyan) carries all other interaction. See §7 SIGNAL.
   - IDENTITY = the produced SVG lockups (mark / wordmark / horizontal lockup),
     PLACED (mask-tinted), never typeset — except the single Saira construction
     teaching slide (wght 560 · wdth 88 · +0.14em · uppercase). See §5.
   - WCAG 2.2 AA floor; CYAN focus ring (--border-focus); color never the sole
     carrier. Copy lives in the calm dark zone — never over the veil's light.
   - NO stock/lifestyle photography. The Iridescent Veil is the ONLY imagery
     system: plates on the hero + section openers ONLY; interiors stay void.

   This file DOES NOT redefine theme tokens. It CONSUMES var(--bg-canvas),
   var(--fg-primary), var(--accent), var(--on-accent), var(--font-display) etc.,
   and only defines --bb-* deck-layout primitives. A handful of explicit STEEL
   tones reference REAL primitive ramp tokens (--serras-abyss-800 etc.)
   from tokens.generated.css — those are sanctioned, not invented.
   ============================================================================ */

/* ───────────────────────────────────────────────────────────────────────────
   0. DECK PRIMITIVES — the 16:9 canvas, the SAFE-ZONE bands, the 8px rhythm.
   Authors author at a LOGICAL 1280×720 canvas. Figma Slides target 1920×1080
   (exact 1.5× of 1280×720). Print maps each slide to one landscape page.
   ─────────────────────────────────────────────────────────────────────────── */
.serras {
  /* 16:9 logical canvas */
  --bb-slide-w: 1280px;
  --bb-slide-h: 720px;

  /* Overscan margin — the breathing frame. Content lives inside on all sides. */
  --bb-slide-margin: 72px;

  /* 8px baseline rhythm. EVERY vertical measure is a multiple of this. */
  --bb-baseline: 8px;

  /* ── Spacing scale — pure 8px (12px step dropped; it broke the rhythm) ── */
  --bb-space-1: 4px;
  --bb-space-2: 8px;
  --bb-space-3: 16px;   /* was 12 */
  --bb-space-4: 24px;   /* was 16 */
  --bb-space-5: 32px;   /* was 24 */
  --bb-space-6: 32px;
  --bb-space-7: 48px;
  --bb-space-8: 64px;
  --bb-space-9: 96px;
  --bb-space-10: 128px;

  /* ── THE SAFE-ZONE BANDS (§1) — collision + overflow made impossible ──
     head band + content band + foot band tile the canvas; they share edges
     and can never overlap. Authors fit the DERIVED content envelope below. */
  --bb-band-head: 40px;   /* head row: one kicker / breadcrumb line */
  --bb-band-foot: 44px;   /* foot row: mark + breadcrumb-echo + folio */
  --bb-gap-head:  24px;   /* head → content moat */
  --bb-gap-foot:  28px;   /* content → foot moat (the no-collision gap) */
  /* DERIVED — the author-visible envelope. Authors must fit THIS. */
  --bb-content-top:    calc(var(--bb-slide-margin) + var(--bb-band-head) + var(--bb-gap-head)); /* 136px */
  --bb-content-bottom: calc(var(--bb-slide-margin) + var(--bb-band-foot) + var(--bb-gap-foot)); /* 144px */
  --bb-content-h:      calc(var(--bb-slide-h) - var(--bb-content-top) - var(--bb-content-bottom)); /* 440px */
  --bb-content-w:      calc(var(--bb-slide-w) - 2 * var(--bb-slide-margin)); /* 1136px */

  /* layout constants */
  --bb-grid-cols: 12;
  --bb-gutter: var(--bb-space-6);   /* 32px column gutter */
  --bb-rule: 1px;                   /* every hairline is 1px — flat regime */
  --bb-measure: 62ch;               /* body prose column cap */
  --bb-measure-lead: 48ch;          /* lead / standfirst cap */
  --bb-measure-quote: 22ch;         /* pull-quote cap */

  /* The accent section rule — the rationed signature device. Thin, short. */
  --bb-rule-amber-h: 3px;
  --bb-rule-amber-w: 96px;

  /* Firstlight radii (6/10/16 + pill) — the SOFT regime */
  --bb-radius-sm: 6px;
  --bb-radius:    10px;
  --bb-radius-lg: 16px;

  /* Abyss stage tones for fields & documentary blocks (REAL primitive ramp
     tokens; names kept from the base for section compatibility) */
  --bb-steel-deep: var(--serras-abyss-900);   /* #04080b — ink, deepest well  */
  --bb-steel-mid:  var(--serras-abyss-50);    /* #2b4e59 — lineStrong; the field ground (step-shifted: only abyss step at field luminance) */
  --bb-steel-doc:  var(--serras-abyss-300);   /* #17323b — documentary block above surface */
  --bb-field-steel: var(--bb-steel-mid);
}

/* ───────────────────────────────────────────────────────────────────────────
   1. RESET + REGIME GUARANTEES (soft / painterly / cinematic-restraint)
   ─────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body.serras {
  margin: 0;
  background: var(--serras-abyss-900);   /* the ink gutter between slides on screen */
  color: var(--fg-primary);
  font-family: var(--font-body);
  font-synthesis-weight: none;
  font-optical-sizing: none;   /* TAMED recipe: pin opsz — never auto-track rendered size */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

/* SOFT: Firstlight radii. Cards & wells round softly; chips/CTAs are pills;
   the slide canvas itself stays square (a full-bleed page, not a card). */
.serras :where(.bb-card, .bb-swatch, .bb-doc, .bb-figure, .bb-ramp-cell,
  .bb-diagram-cell) { border-radius: var(--bb-radius); }
.serras :where(.bb-btn) { border-radius: var(--bb-radius-sm); }
.serras :where(.bb-chip) { border-radius: 999px; }
.serras :where(.bb-slide, .bb-rule, .bb-bar, .bb-table, .bb-ramp, .bb-tick,
  .bb-diagram) { border-radius: 0; }

/* PAINTERLY: raised wells carry the theme's soft diffuse elevation (twin
   diffuse layers + the ~3:1-tuned hairline ring, from tokens.generated.css).
   The slide itself stays flat — the void is the stage, not a card. Gradients
   remain banned everywhere EXCEPT the static veil scrim (.bb-scrim). */
.serras :where(.bb-card, .bb-doc, .bb-figure) { box-shadow: var(--shadow-sm); }
.serras :where(.bb-slide, .bb-table, .bb-swatch, .bb-btn, .bb-diagram, .bb-ramp)
  { box-shadow: none; }
.serras .bb-slide:not(.bb-slide--veil) { background-image: none; }

/* CYAN focus ring on every interactive element (Firstlight: --border-focus =
   accent-strong #87D8FF, 2px, offset). */
.serras :is(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 3px;
}

/* Precise motion only — no celebratory animation anywhere. */
@media (prefers-reduced-motion: reduce) {
  .serras *, .serras *::before, .serras *::after {
    transition: none !important; animation: none !important;
  }
}

/* ───────────────────────────────────────────────────────────────────────────
   2. THE STAGE — screen preview + print pagination
   A vertical run of fixed 1280×720 slides; on screen they scale to fit; in
   print each becomes one landscape page.
   ─────────────────────────────────────────────────────────────────────────── */
.bb-deck {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--bb-space-8);
  padding-block: var(--bb-space-8);
}

/* Each slide: the fixed 16:9 logical canvas. overflow:hidden = full-bleed safe
   AND the structural backstop (over-budget content clips at the band edge, a
   visible author error — never an overlap). */
.bb-slide {
  position: relative;
  width: var(--bb-slide-w);
  height: var(--bb-slide-h);
  overflow: hidden;
  padding: 0;
  background: var(--bg-canvas);   /* dark-native: the body scope is data-theme="dark" (void #060B10) */
  color: var(--fg-primary);
  flex: 0 0 auto;
  border: var(--bb-rule) solid var(--serras-abyss-200); /* screen-only seam (line #1C3A44); hidden in print */
}

/* SCREEN scaling: fit 1280px-wide slides into narrow viewports without JS.
   Apply .bb-deck--fit to the deck wrapper for reviewer/preview mode. */
@media (max-width: 1360px) {
  .bb-deck--fit .bb-slide {
    transform: scale(calc((100vw - 32px) / 1280));
    transform-origin: top center;
    margin-bottom: calc((720px * (100vw - 32px) / 1280) - 720px); /* reclaim scaled height */
  }
}

/* PRINT / PDF: one slide per LANDSCAPE page, edge to edge, no seams. */
@page { size: 1280px 720px; margin: 0; }
@media print {
  body.serras { background: #fff; }
  .bb-deck { display: block; gap: 0; padding: 0; }
  .bb-slide {
    width: 1280px; height: 720px;
    border: 0; transform: none; margin: 0;
    break-after: page; break-inside: avoid;
  }
  .bb-slide:last-child { break-after: auto; }
  /* iOS QuickLook (Quartz) renders Chrome's blurred-shadow soft masks as SOLID
     rectangles — glows must not ship in the PDF. The colored EDGES carry the
     state story in print; the HTML deck keeps the true glows. */
  .serras .bb-slide * { box-shadow: none !important; }
  .serras .bb-card-fl--hover { border-color: rgba(135, 216, 255, 0.6) !important; }
  .serras .bb-card-fl--selected { border-color: rgba(255, 182, 39, 0.65) !important; }
  .serras .bb-state-success { border-color: rgba(91, 208, 140, 0.65) !important; }
  .serras .bb-state-danger { border-color: rgba(242, 107, 84, 0.7) !important; }
  /* Force backgrounds + masks to print (Chrome: also enable "Background graphics"). */
  .serras, .bb-slide, .bb-slide--field, .bb-slide--field-steel,
  .bb-slide--field-amber, .bb-slide--dark, .bb-dark, .bb-slide--steel,
  .bb-doc, .bb-mark, .bb-wordmark-svg, .bb-logo, .bb-swatch, .bb-ramp-cell, .bb-bar {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
}

/* ───────────────────────────────────────────────────────────────────────────
   3. THE LUMINANCE DEVICE — light (default) vs dark (the signature pacing)
   DARK  = <section class="bb-slide bb-dark serras" data-theme="dark"> …
   LIGHT = <section class="bb-slide bb-light"> …
   The token FLIP is driven SOLELY by `.serras[data-theme="dark"]`
   (tokens.generated.css). A dark slide MUST carry BOTH `serras` AND
   `data-theme="dark"` or tokens won't re-resolve locally.
   ─────────────────────────────────────────────────────────────────────────── */
.bb-dark,
.bb-slide--dark { background: var(--bg-canvas); color: var(--fg-primary); }  /* neutral-900 / neutral-50 */
.bb-light       { background: var(--bg-canvas); color: var(--fg-primary); }  /* neutral-50 / neutral-900 */

/* Deepest-steel hero flavor — the B&O "pure black breather" equivalent. */
.bb-slide--steel { background: var(--bb-steel-deep); } /* primary-900 #141c22 */

/* ───────────────────────────────────────────────────────────────────────────
   4. THE SAFE-ZONE ARCHITECTURE (§1 of the spec)
   Three bands tile the canvas inside the 72px margin:
     HEAD  y[72,112]   head furniture (kicker / breadcrumb)
     CONTENT y[136,576] the ONLY authoring zone — 1136×440 (55 baselines)
     FOOT  y[604,648]  foot furniture (mark · breadcrumb-echo · folio)
   .bb-slide-inner's bottom pins ABOVE the foot band → boxes share an edge at
   y576 and can NEVER overlap. Over-budget content clips loudly at y576.
   ─────────────────────────────────────────────────────────────────────────── */

/* HEAD BAND — reserved; content can't enter. */
.bb-slide-head {
  position: absolute;
  top: var(--bb-slide-margin);
  left: var(--bb-slide-margin); right: var(--bb-slide-margin);
  height: var(--bb-band-head);
  display: flex; align-items: center; gap: var(--bb-space-4);
}

/* CONTENT BAND — the only authoring zone. */
.bb-slide-inner {
  position: absolute;
  top:    var(--bb-content-top);      /* 136 */
  right:  var(--bb-slide-margin);     /* 72  */
  bottom: var(--bb-content-bottom);   /* 144 — pins the box ABOVE the foot band */
  left:   var(--bb-slide-margin);     /* 72  */
  display: flex; flex-direction: column;
  min-height: 0;                       /* let the clamp bite */
  overflow: hidden;                    /* over-budget clips at 576 — visible author error, never overlap */
}

/* FOOT BAND — reserved; tiles the content box edge at y576. */
.bb-slide-foot {
  position: absolute;
  top: auto;
  bottom: 40px;            /* anchored near the page bottom, not at the content-zone edge */
  left: var(--bb-slide-margin); right: var(--bb-slide-margin);
  height: var(--bb-band-foot);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  column-gap: var(--bb-space-6);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em;
  color: var(--fg-muted); text-transform: uppercase;
}
.bb-slide-foot .bb-foot-crumb { justify-self: start; color: var(--fg-secondary); }
.bb-slide-foot .bb-folio      { justify-self: end; }

/* BREATHERS reclaim the head band (no breadcrumb) but KEEP the foot reservation.
   Content envelope becomes 504px tall. */
.bb-slide--cover .bb-slide-inner,
.bb-slide--hero-dark .bb-slide-inner, .bb-slide--hero-light .bb-slide-inner,
.bb-slide--field .bb-slide-inner, .bb-slide--quote .bb-slide-inner,
.bb-slide--divider .bb-slide-inner, .bb-slide--closing .bb-slide-inner,
.bb-slide--specimen .bb-slide-inner,
.bb-slide--spec .bb-slide-inner,
.bb-slide--contents .bb-slide-inner { top: var(--bb-slide-margin); }   /* 72 → +64px breath (eyebrow now lives only in the footer) */

/* FULL-BLEED recipes (split, doc-figure) opt out of .bb-slide-inner entirely;
   their furniture re-enters via safe insets on the SAME tokens. */

/* ───────────────────────────────────────────────────────────────────────────
   5. TYPE SCALE — modular, baseline-snapped (8px). LH is in baselines.
   Faces: Fraunces TAMED --font-display / Instrument Sans --font-body /
   JetBrains Mono --font-mono (+ Saira, wordmark construction ONLY).
   THE TAMED RECIPE (FINAL 2026-07-02): font-optical-sizing:none everywhere
   (pins opsz) + 'SOFT' 0 'WONK' 0 on every display setting — requires the
   4-axis -full- Fraunces files (the 2-axis file bakes WONK on). opsz 60
   hero / 48 marquee / 40 small display. Weight 600, never 900.
   NO inline font-size / line-height / letter-spacing anywhere —
   authors use ONLY these named tokens.
   Hierarchy law: a content slide uses at most kicker → title → lead → body →
   caption. Hero/divider/quote/field strip to ONE display step + kicker. Never
   two display steps on one slide.
   ─────────────────────────────────────────────────────────────────────────── */

/* Cover / closing hero — one statement (160 / 20bl). */
.bb-display-xl {
  font-family: var(--font-display);
  font-size: 160px; line-height: 160px;
  font-variation-settings: 'opsz' 60, 'wght' 600, 'SOFT' 0, 'WONK' 0;
  letter-spacing: -0.015em; margin: 0; text-wrap: balance;
}
/* Field headline / multi-line hero (104 / 13bl). */
.bb-display-lg {
  font-family: var(--font-display);
  font-size: 104px; line-height: 104px;
  font-variation-settings: 'opsz' 60, 'wght' 600, 'SOFT' 0, 'WONK' 0;
  letter-spacing: -0.01em; margin: 0; text-wrap: balance;
}
/* Divider / color-field title (72 / 80 = 10bl). */
.bb-display-md {
  font-family: var(--font-display);
  font-size: 72px; line-height: 80px;
  font-variation-settings: 'opsz' 48, 'wght' 600, 'SOFT' 0, 'WONK' 0;
  letter-spacing: -0.008em; margin: 0; text-wrap: balance;
}
/* Slide title (40 / 48 = 6bl). */
.bb-title {
  font-family: var(--font-display);
  font-size: 40px; line-height: 48px;
  font-variation-settings: 'opsz' 40, 'wght' 600, 'SOFT' 0, 'WONK' 0;
  letter-spacing: -0.005em; margin: 0; text-wrap: balance;
}
/* Secondary heading (28 / 32 = 4bl). */
.bb-subtitle {
  font-family: var(--font-display);
  font-size: 28px; line-height: 32px;
  font-variation-settings: 'opsz' 40, 'wght' 600, 'SOFT' 0, 'WONK' 0;
  letter-spacing: -0.003em; margin: 0; text-wrap: balance;
}
/* Voice pull-quote — lighter serif = gravitas (56 / 64 = 8bl). */
.bb-pullquote {
  font-family: var(--font-display);
  font-weight: 400; font-size: 56px; line-height: 64px;
  font-variation-settings: 'opsz' 60, 'wght' 400, 'SOFT' 0, 'WONK' 0;
  letter-spacing: -0.005em; margin: 0; text-wrap: balance;
  max-width: var(--bb-measure-quote);
}
.bb-pullquote-cite {
  font-family: var(--font-mono); font-size: 14px; line-height: 20px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-secondary);
}
/* Editorial standfirst — lighter serif voice (24 / 32 = 4bl). */
.bb-lead {
  font-family: var(--font-display);
  font-weight: 400; font-size: 24px; line-height: 32px;
  font-variation-settings: 'opsz' 40, 'wght' 400, 'SOFT' 0, 'WONK' 0;
  letter-spacing: 0; color: var(--fg-secondary); margin: 0;
  max-width: var(--bb-measure-lead); text-wrap: pretty;
}
/* Body (18 / 28 = 3.5bl). */
.bb-body {
  font-family: var(--font-body);
  font-size: 18px; line-height: 28px;
  font-variation-settings: 'opsz' 14; letter-spacing: 0;
  margin: 0; max-width: var(--bb-measure); text-wrap: pretty;
}
.bb-body--sm { font-size: 16px; line-height: 24px; }   /* dense body (3bl) */
/* Caption / metadata (14 / 20 = 2.5bl). */
.bb-caption {
  font-family: var(--font-body);
  font-size: 14px; line-height: 20px;
  font-variation-settings: 'opsz' 12; color: var(--fg-secondary); margin: 0;
}
/* Kicker / breadcrumb eyebrow — machine-precision mono (13 / 16 = 2bl). */
.bb-kicker {
  font-family: var(--font-mono);
  font-size: 13px; font-weight: 500; line-height: 16px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--fg-secondary); margin: 0;
}
/* Data / spec values / audit (14 / 20 = 2.5bl). */
.bb-mono {
  font-family: var(--font-mono);
  font-size: 14px; line-height: 20px; letter-spacing: 0.02em;
}
.bb-mono--num { font-variant-numeric: tabular-nums; }
/* Running folio coordinate (13 / 16 = 2bl). */
.bb-folio {
  font-family: var(--font-mono);
  font-size: 13px; line-height: 16px; letter-spacing: 0.1em; color: var(--fg-muted);
}

/* ───────────────────────────────────────────────────────────────────────────
   6. THE IDENTITY SYSTEM — REAL SVG MARKS, PLACED (never typeset).
   mark.svg 553×484 · wordmark.svg 2279×355 · logo-stacked.svg 553×654 are
   single-path currentColor → tinted via CSS mask so background:var(--fg-primary)
   IS the ink, which flips to light on dark slides for FREE. NEVER amber.
   favicon.svg 500×500 has a BAKED dark <rect> — NOT mask-tintable; use ONLY as
   <link> favicon and a literal <img> proof. Size by ONE axis; aspect-ratio
   derives the other. Never stretch.
   ─────────────────────────────────────────────────────────────────────────── */
.bb-mark, .bb-wordmark-svg, .bb-logo {
  display: inline-block;
  background: var(--fg-primary);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain;   mask-size: contain;
}
.bb-mark {
  -webkit-mask-image: url(./logos/mark.svg); mask-image: url(./logos/mark.svg);
  aspect-ratio: 42 / 41;
}
.bb-wordmark-svg {
  -webkit-mask-image: url(./logos/wordmark.svg); mask-image: url(./logos/wordmark.svg);
  aspect-ratio: 121 / 25;
}
.bb-logo {
  -webkit-mask-image: url(./logos/logo-stacked.svg); mask-image: url(./logos/logo-stacked.svg);
  aspect-ratio: 178 / 41;
}
/* Sizes — set ONE axis only. */
.bb-slide-foot .bb-mark {                                         /* running furniture = SERRAS wordmark, not the icon */
  -webkit-mask-image: url(./logos/wordmark.svg); mask-image: url(./logos/wordmark.svg);
  aspect-ratio: 121 / 25; height: 14px;
}
.bb-logo--hero             { height: clamp(64px, 10vh, 76px); }   /* cover/close hero — WIDE lockup: height×4.34 = width */
.bb-mark--hero             { height: clamp(140px, 20vh, 180px); }
.bb-wordmark-svg--identity { width: 520px; }                      /* identity/system slides */
.bb-mark--identity         { height: 180px; }
.bb-logo--identity         { height: 84px; }

/* Identity clearspace zones (dashed; the construction lesson). */
.bb-clearspace {
  border: 1px dashed var(--border-strong);
  padding: var(--bb-space-6);
  display: inline-flex; align-items: center; justify-content: center;
}

/* The ONE place identity is typeset — the Saira construction teaching slide:
   SERRAS · Saira · wght 560 · wdth 88 · +0.14em tracking · uppercase ·
   all-white on dark. NEVER amber, NEVER Fraunces, never a colored final S. */
.bb-wordmark {
  font-family: 'Saira', var(--font-body);
  font-weight: 560;
  font-variation-settings: 'wght' 560, 'wdth' 88;
  letter-spacing: 0.14em; line-height: 1;
  text-transform: uppercase;
  white-space: nowrap; color: var(--fg-primary);
}
.bb-wm-a { font-weight: 560; }   /* construction annotation spans (single-word */
.bb-wm-b { font-weight: 560; }   /* wordmark — spans kept for slide structure) */
.bb-wordmark--art { font-size: 120px; }

/* ───────────────────────────────────────────────────────────────────────────
   7. SIGNAL + ACCENT DEVICES — the cool core rations structure; amber is
   RESERVED. The teal/cyan accent (--accent / --accent-strong) carries rules,
   ticks, and folios. Amber #FFB627 enters ONLY through --cta-bg/--cta-fg
   (the cta-solid binding): exactly ONE emphatic chip/CTA per view, <10%
   coverage, DARK ink label. Mark, wordmark, headings, body — NEVER amber.
   ─────────────────────────────────────────────────────────────────────────── */
.bb-rule {                              /* the thin AMBER section rule — the divider's one deliberate
                                           signal strike (operator direction 2026-07-03). Tiny coverage,
                                           one per view: inside the amber fence. */
  display: block;
  width: var(--bb-rule-amber-w); height: var(--bb-rule-amber-h);
  background: var(--cta-bg, var(--accent)); border: 0;
}
.bb-chip {                              /* the ONE emphatic action chip — signal amber, ink label, pill */
  display: inline-block;
  background: var(--cta-bg, var(--accent)); color: var(--cta-fg, var(--on-accent));
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 8px;
  white-space: nowrap;   /* the chip never wraps (operator, p16) */
}
.bb-tick { color: var(--accent); }      /* ~12px² cool lead glyph before a kicker */

/* AMBER FLOURISHES (operator direction 2026-07-03): TOC column heads, the
   brand name in pull-quote cites, DO leads, and ALL table headers carry the
   signal amber as the deck's structural highlight. */
.serras .bb-kicker--amber { color: var(--cta-bg); }
.serras .bb-cite-brand { color: var(--cta-bg); }
.serras .bb-do { color: var(--cta-bg); font-weight: 700; }
.serras .bb-table thead th { color: var(--cta-bg); }
/* the themes-table LIGHT island: darker amber for legibility on its light ground */
.serras .bb-table--themes thead th:nth-child(2) { color: var(--serras-signal-600); }

/* ───────────────────────────────────────────────────────────────────────────
   7C. CARD STATE GRAMMAR — the Firstlight card language (from the client
   gallery, light-motion-experiments/index.html). Default: surface + line
   edge. Hover: -4px lift + cyan edge + teal glow. Focus: 2px cyan ring.
   SELECTED: amber edge + warm glow + flag — selection is the amber
   commitment. Disabled: dimmed. Score bars carry GRADIENT fills.
   ─────────────────────────────────────────────────────────────────────────── */
.serras .bb-card-fl {
  background: var(--bg-surface);
  border: 1px solid var(--serras-abyss-200);
  border-radius: 14px;
  padding: var(--bb-space-5);
  position: relative;
  display: flex; flex-direction: column; gap: var(--bb-space-3);
}
.serras .bb-card-fl--hover {
  transform: translateY(-4px);
  border-color: rgba(135, 216, 255, 0.4);
  box-shadow: 0 18px 44px -18px rgba(63, 138, 155, 0.45);
}
.serras .bb-card-fl--focus { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.serras .bb-card-fl--selected {
  border-color: rgba(255, 182, 39, 0.42);
  box-shadow: 0 24px 60px -30px rgba(200, 122, 60, 0.55);
}
.serras .bb-card-fl--disabled { opacity: 0.45; filter: saturate(0.6); }
.serras .bb-flag {
  position: absolute; top: 12px; right: 12px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--serras-abyss-900); background: var(--cta-bg);
  border-radius: 4px; padding: 4px 8px;
}
.serras .bb-card-fl .bb-card-kicker {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-secondary);
}
.serras .bb-card-fl h4 { margin: 0; font-family: var(--font-body); font-size: 17px; font-weight: 600; color: var(--fg-primary); }
.serras .bb-card-fl .bb-card-desc { font-size: 13px; line-height: 1.5; color: var(--fg-secondary); margin: 0; }
.serras .bb-scores { display: flex; gap: var(--bb-space-5); padding-top: var(--bb-space-3); border-top: 1px solid rgba(110, 166, 179, 0.14); }
.serras .bb-score { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.serras .bb-score .bb-score-k { font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: 0.2em; color: var(--fg-muted); }
.serras .bb-score .bb-score-v { font-size: 13px; font-weight: 650; color: var(--fg-primary); font-variant-numeric: tabular-nums; }
.serras .bb-scorebar { height: 3px; border-radius: 2px; background: rgba(110, 166, 179, 0.16); overflow: hidden; }
.serras .bb-scorebar > span { display: block; height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--serras-accent-500), var(--serras-accent-200)); }
.serras .bb-scorebar--signal > span { background: linear-gradient(90deg, var(--serras-signal-500), var(--serras-signal-200)); }
.serras .bb-scorebar--jade > span { background: linear-gradient(90deg, var(--serras-accent-500), var(--serras-success-300)); }

/* STATUS-KEYED CARD TREATMENTS (operator p50/54/79): outcome cards carry
   their status on the EDGE — outline + glow, the selected-card grammar
   keyed to success/danger. Neutral stays quiet. */
.serras .bb-state-success {
  border-color: rgba(91, 208, 140, 0.45) !important;
  box-shadow: 0 24px 60px -30px rgba(91, 208, 140, 0.45);
}
.serras .bb-state-danger {
  border-color: rgba(242, 107, 84, 0.5) !important;
  box-shadow: 0 24px 60px -30px rgba(242, 107, 84, 0.5);
}

/* Larger demo CTA chip (operator p82/83) */
.serras .bb-chip--lg { font-size: 13px; padding: 10px 18px; letter-spacing: 0.08em; }

/* Five-duties swatch row (operator p19): taller boxes, role reserves two
   lines so names/hexes align horizontally across all five cards. */
.serras .bb-duties .bb-swatch { min-height: 200px; }
.serras .bb-duties .bb-swatch-role { min-height: 40px; }

/* Bare figure (operator p26): no outer chrome around composed demos. */
.serras .bb-figure--bare { border: 0; background: transparent; box-shadow: none; }
.serras .bb-figure--bare figcaption { border: 0; background: transparent; padding-left: 0; }

/* THE one emphatic action — cta-solid rendered as a real button: signal amber,
   ink label, pill. Exactly one per view (the amber fence). */
.bb-btn-cta {
  display: inline-block;
  background: var(--cta-bg); color: var(--cta-fg);
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
  letter-spacing: 0.01em; line-height: 1;
  padding: 14px 28px; border-radius: 999px;
  text-decoration: none;
}

/* ───────────────────────────────────────────────────────────────────────────
   7B. THE VEIL — the operator's Iridescent Veil plates. Hero + section openers
   ONLY (Q17: veil = hero surfaces; interiors stay flat void). Landscape plates:
   warm-gold core center-left, near-void right third = the copy zone. A STATIC
   side-weighted scrim guarantees legibility — it NEVER animates.
   Usage: <section class="bb-slide bb-slide--divider bb-slide--veil …"
            style="--bb-plate: url('./assets/plates/serras-veil-land-NN.jpg')">
   ─────────────────────────────────────────────────────────────────────────── */
.serras .bb-slide--veil {
  background-size: cover;
  background-position: center;
}
.serras .bb-plate-land-01 { background-image: url('./plates/serras-veil-land-01.jpg'); }
.serras .bb-plate-land-02 { background-image: url('./plates/serras-veil-land-02.jpg'); }
.serras .bb-plate-land-03 { background-image: url('./plates/serras-veil-land-03.jpg'); }
.serras .bb-plate-land-04 { background-image: url('./plates/serras-veil-land-04.jpg'); }
.serras .bb-plate-land-05 { background-image: url('./plates/serras-veil-land-05.jpg'); }
.serras .bb-plate-land-06 { background-image: url('./plates/serras-veil-land-06.jpg'); }
.serras .bb-plate-land-07 { background-image: url('./plates/serras-veil-land-07.jpg'); }
.serras .bb-plate-land-08 { background-image: url('./plates/serras-veil-land-08.jpg'); }
.serras .bb-plate-land-09 { background-image: url('./plates/serras-veil-land-09.jpg'); }
.serras .bb-plate-land-10 { background-image: url('./plates/serras-veil-land-10.jpg'); }
.serras .bb-plate-land-11 { background-image: url('./plates/serras-veil-land-11.jpg'); }
.serras .bb-plate-land-12 { background-image: url('./plates/serras-veil-land-12.jpg'); }
.serras .bb-plate-land-13 { background-image: url('./plates/serras-veil-land-13.jpg'); }
.serras .bb-plate-port-01 { background-image: url('./plates/serras-veil-port-01.jpg'); }
.serras .bb-plate-port-02 { background-image: url('./plates/serras-veil-port-02.jpg'); }
.serras .bb-plate-port-03 { background-image: url('./plates/serras-veil-port-03.jpg'); }
.serras .bb-plate-port-04 { background-image: url('./plates/serras-veil-port-04.jpg'); }
.serras .bb-plate-port-05 { background-image: url('./plates/serras-veil-port-05.jpg'); }
.serras .bb-plate-port-06 { background-image: url('./plates/serras-veil-port-06.jpg'); }
.serras .bb-plate-port-07 { background-image: url('./plates/serras-veil-port-07.jpg'); }
.serras .bb-plate-port-08 { background-image: url('./plates/serras-veil-port-08.jpg'); }
.serras .bb-plate-port-09 { background-image: url('./plates/serras-veil-port-09.jpg'); }
.serras .bb-plate-port-10 { background-image: url('./plates/serras-veil-port-10.jpg'); }
.serras .bb-plate-port-11 { background-image: url('./plates/serras-veil-port-11.jpg'); }
.serras .bb-plate-port-12 { background-image: url('./plates/serras-veil-port-12.jpg'); }
.serras .bb-plate-port-13 { background-image: url('./plates/serras-veil-port-13.jpg'); }
.bb-slide--veil::before {                /* the static scrim — a LIGHT insurance
                                            gradient only; the plates' own right
                                            third is already near-void. Never
                                            crush the veil: it must be SEEN. */
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(3, 9, 11, 0.05) 0%,  rgba(3, 9, 11, 0.10) 45%,
    rgba(3, 9, 11, 0.38) 70%, rgba(3, 9, 11, 0.55) 100%);
  pointer-events: none;
}
/* The inner/foot bands are position:absolute (they already paint above the
   ::before scrim). Only static children need lifting — never touch the bands'
   positioning. */
/* colophon is position:absolute already — positioned boxes paint above the ::before scrim */
/* Divider on a plate: copy moves to the calm dark right third (Firstlight law). */
.bb-slide--veil.bb-slide--divider .bb-slide-inner { align-items: flex-end; text-align: right; }
/* Closing composition (operator 2026-07-03): logo dead-center of the page,
   words/CTA group spaced below — inner top-aligns so margins compose. */
.serras .bb-slide--closing.bb-slide--veil .bb-slide-inner {
  justify-content: flex-start;
  align-items: center;
}

/* Cover / closing on a plate: centered content under a gentle vignette. */
.bb-slide--veil.bb-slide--cover::before,
.bb-slide--veil.bb-slide--closing::before {
  background: linear-gradient(180deg,
    rgba(3, 9, 11, 0.28) 0%, rgba(3, 9, 11, 0.10) 45%, rgba(3, 9, 11, 0.45) 100%);
}

/* ───────────────────────────────────────────────────────────────────────────
   8. THE 12-COLUMN GRID + canonical span patterns
   The grid lives inside the content band: 12 cols, 32px gutter, 1136px wide.
   Use the canonical span patterns — don't improvise.
   ─────────────────────────────────────────────────────────────────────────── */
.bb-grid {
  display: grid;
  grid-template-columns: repeat(var(--bb-grid-cols), 1fr);
  gap: var(--bb-gutter);
}
.bb-col-12 { grid-column: span 12; }
.bb-col-8  { grid-column: span 8; }    /* Spec 8+4 */
.bb-col-7  { grid-column: span 7; }    /* Editorial 7+5 */
.bb-col-6  { grid-column: span 6; }    /* Even / Index 6+6 */
.bb-col-5  { grid-column: span 5; }
.bb-col-4  { grid-column: span 4; }    /* Gallery 4+4+4 */
.bb-col-3  { grid-column: span 3; }

/* Stacks + rows — all gaps draw from the spacing scale. */
.bb-stack-2 { display: flex; flex-direction: column; gap: var(--bb-space-2); }
.bb-stack-3 { display: flex; flex-direction: column; gap: var(--bb-space-3); }
.bb-stack-4 { display: flex; flex-direction: column; gap: var(--bb-space-4); }
.bb-stack-5 { display: flex; flex-direction: column; gap: var(--bb-space-5); }
.bb-stack-7 { display: flex; flex-direction: column; gap: var(--bb-space-7); }
.bb-row     { display: flex; gap: var(--bb-space-6); }
.bb-fill    { flex: 1 1 auto; }                 /* push content apart in a column */
.bb-bleed   { position: absolute; inset: 0; }   /* full-bleed escape from the safe frame */

/* ───────────────────────────────────────────────────────────────────────────
   9. SLIDE ARCHETYPES — the visual recipe per kind. Each is a layout skin over
   .bb-slide. Compose: <section class="bb-slide bb-slide--ARCHETYPE …">.
   ─────────────────────────────────────────────────────────────────────────── */

/* 9.1 COVER — stacked logo hero, centered, monochrome, NO amber. */
.bb-slide--cover .bb-slide-inner { align-items: center; justify-content: center; text-align: center; }
.bb-slide--cover .bb-kicker { color: var(--fg-secondary); }

/* 9.2 HERO — one giant line + one short rationale; left-aligned; oceans of air. */
.bb-slide--hero-dark .bb-slide-inner,
.bb-slide--hero-light .bb-slide-inner { justify-content: center; align-items: flex-start; }

/* 9.3 PARADIGM / COLOR-FIELD — the slide IS a color, one line bottom-anchored.
   --field-steel = unlimited (steel is structure). --field-amber = RAREST. */
.bb-slide--field .bb-slide-inner { justify-content: center; }
.bb-slide--field-steel { background: var(--bb-field-steel); color: var(--serras-steel-50); }
.bb-slide--field-steel .bb-kicker,
.bb-slide--field-steel .bb-caption,
.bb-slide--field-steel .bb-slide-foot { color: var(--serras-steel-200); }
.bb-slide--field-steel .bb-mark { background: var(--serras-steel-50); }
.bb-slide--field-amber { background: var(--accent); color: var(--on-accent); }
.bb-slide--field-amber .bb-kicker,
.bb-slide--field-amber .bb-caption,
.bb-slide--field-amber .bb-folio,
.bb-slide--field-amber .bb-slide-foot { color: var(--on-accent); }
.bb-slide--field-amber .bb-mark { background: var(--on-accent); }

/* 9.4 DIVIDER — section opener: folio (amber-tinted) + title + amber rule,
   vertically centered, on dark. The first deliberate amber strike. */
.bb-slide--divider .bb-slide-inner { justify-content: center; align-items: flex-start; }
.bb-slide--divider .bb-divider-folio {
  font-family: var(--font-mono); font-size: 18px; line-height: 24px;
  letter-spacing: 0.1em; color: var(--accent); margin-bottom: var(--bb-space-5);
}
.bb-slide--divider .bb-rule { margin-top: var(--bb-space-6); }

/* 9.5 SPLIT — dark | light tension. 6/6 by default; each pane re-asserts its
   luminance. Both panes can be .bb-diagram-cell so they align. */
.bb-slide--split { display: grid; grid-template-columns: 1fr 1fr; }
.bb-slide--split > .bb-split-pane {
  position: relative; padding: var(--bb-slide-margin);
  display: flex; flex-direction: column; justify-content: center;
  background: var(--bg-canvas); color: var(--fg-primary);   /* re-assert locally-resolved luminance */
  overflow: hidden;
}

/* 9.6 SPECIMEN — the mark/wordmark/type at scale, centered; quiet anatomy
   callouts beneath in mono. */
.bb-slide--specimen .bb-slide-inner { justify-content: center; align-items: center; text-align: center; }
.bb-spec-anatomy {
  margin-top: var(--bb-space-7); display: flex; gap: var(--bb-space-8);
  justify-content: center;
}

/* 9.7 SPEC — art-directed table content (light). Spec 8+4. */
.bb-slide--spec .bb-slide-inner { gap: var(--bb-space-5); }

/* 9.8 COMPONENT-SHOWCASE — real UI staged on a calm mount; the UI is the hero. */
.bb-slide--showcase .bb-slide-inner { justify-content: center; align-items: center; }

/* 9.9 QUOTE — giant pull-quote; generous air; left-aligned. */
.bb-slide--quote .bb-slide-inner { justify-content: center; align-items: flex-start; }
.bb-slide--quote .bb-pullquote-cite { margin-top: var(--bb-space-6); display: block; }

/* 9.10 DOC-FIGURE — documentary placeholder, full-bleed steel, thirds crosshairs. */
.bb-slide--doc-figure { padding: 0; }

/* 9.11 DATA-SPREAD — editorial chart/data (light). */
.bb-slide--data .bb-slide-inner { gap: var(--bb-space-5); }

/* 9.12 CONTENTS — the elegant TOC. Index 6+6. */
.bb-slide--contents .bb-slide-inner { justify-content: flex-start; }

/* 9.13 CLOSING — the dark bookend; mirrors the cover. */
.bb-slide--closing .bb-slide-inner { align-items: center; justify-content: center; text-align: center; }

/* COLOPHON — provenance line, usable on cover/closing. Sits in the foot band. */
.bb-colophon {
  position: absolute; left: var(--bb-slide-margin); right: var(--bb-slide-margin);
  bottom: calc(var(--bb-slide-margin) + var(--bb-band-foot) - 16px);
  font-family: var(--font-mono); font-size: 12px; line-height: 20px;
  letter-spacing: 0.08em; color: var(--fg-muted); text-transform: uppercase;
  text-align: center;
}

/* ───────────────────────────────────────────────────────────────────────────
   10. REFINED GRAPHIC PRIMITIVES (§3 of the spec) — gallery-grade, ratio-built,
   hairline-ruled. All consume real tokens. No vertical rules, no zebra, no
   shadow, no radius.
   ─────────────────────────────────────────────────────────────────────────── */

/* 10.1 SWATCH — 4:3, painted in its own ramp color, values bottom-anchored.
   Author sets data-ink="light|dark" to choose ink that matches the fill. */
.bb-swatch {
  aspect-ratio: 4 / 3; min-height: 144px;
  border: var(--bb-rule) solid var(--border-subtle);
  padding: var(--bb-space-4);
  display: flex; flex-direction: column; justify-content: flex-end;
  position: relative;
}
.bb-swatch[data-ink="light"] { color: var(--serras-steel-50); }
.bb-swatch[data-ink="dark"]  { color: var(--serras-steel-900); }
.bb-swatch .bb-swatch-name {
  font-family: var(--font-mono); font-size: 13px; line-height: 16px;
  letter-spacing: 0.06em; text-transform: uppercase; color: inherit;
}
.bb-swatch .bb-swatch-hex {
  font-family: var(--font-mono); font-size: 14px; line-height: 20px; color: inherit;
}
.bb-swatch .bb-swatch-role {
  font-family: var(--font-body); font-size: 14px; line-height: 20px; color: inherit; opacity: 0.85;
}
.bb-swatch .bb-swatch-contrast {        /* optional top-right contrast proof chip */
  position: absolute; top: var(--bb-space-4); right: var(--bb-space-4);
  font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: inherit;
}

/* 10.2 RAMP — one row of 10 cells (50…900), step index in mono below, amber
   tick beneath the 500 anchor. */
.bb-ramp { display: flex; flex-direction: column; gap: var(--bb-space-2); }
.bb-ramp-name {
  font-family: var(--font-mono); font-size: 12px; line-height: 16px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-secondary);
}
.bb-ramp-cells { display: grid; grid-template-columns: repeat(10, 1fr); }
.bb-ramp-cell {
  height: 48px;
  border-right: var(--bb-rule) solid var(--border-subtle);
}
.bb-ramp-cell:last-child { border-right: 0; }
.bb-ramp-steps { display: grid; grid-template-columns: repeat(10, 1fr); }
.bb-ramp-step {
  font-family: var(--font-mono); font-size: 12px; line-height: 16px;
  text-align: center; color: var(--fg-muted); position: relative; padding-top: var(--bb-space-2);
}
.bb-ramp-step--anchor::before {        /* 2px amber tick under the 500 anchor */
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 16px; height: 2px; background: var(--accent);
}

/* 10.3 SPEC TABLE — de-cramped: 48px rows, fixed columns, hairline rules only.
   Cap: 8 cols / 7 body rows per slide → else split. */
.bb-table {
  width: 100%; border-collapse: collapse; table-layout: fixed;
  font-family: var(--font-body);
}
.bb-table caption {
  text-align: left; margin-bottom: var(--bb-space-3);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--fg-secondary);
}
.bb-table th, .bb-table td {
  text-align: left; height: 48px; padding: 12px 24px; vertical-align: middle;
  border-bottom: var(--bb-rule) solid var(--border-subtle);
  font-size: 16px; line-height: 24px;
}
.bb-table thead th {
  font-family: var(--font-mono); font-size: 12px; line-height: 16px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-secondary);
  border-bottom: 2px solid var(--border-strong);
}
.bb-table .bb-col-token {
  width: 22ch; padding-right: 12px;
  font-family: var(--font-mono); font-size: 13px;
}
/* Value cells that pair a primitive ramp name with an inline swatch (accent-500,
   primary-500, success-900 …). At 16px the longer names wrapped to two lines inside
   the fixed table columns; drop to 13px and keep them on one line so the ramp name
   sits cleanly beside its chip — matching the alias column's smaller token scale. */
.bb-table td:has(.bb-swatch-inline) { font-size: 13px; white-space: nowrap; }
.bb-table .bb-num {
  font-family: var(--font-mono); text-align: right; font-variant-numeric: tabular-nums;
}
/* Glyph checkpoint table (icon · name · event-name): larger functional glyphs,
   a narrow fixed name column, and the event tokens pulled left + left-justified
   so the longer ones (contradiction.flagged) no longer run to the table edge. */
.bb-glyph-table svg { width: 32px; height: 32px; }
.bb-glyph-table td:first-child { width: 64px; text-align: center; padding-left: 8px; padding-right: 8px; }
.bb-glyph-table td:nth-child(2) { width: 240px; }
.bb-glyph-table .bb-col-token { width: auto; text-align: left; }

/* THEME-PREVIEW TABLE — a 3-col [alias · light · dark] table tagged
   .bb-table--themes renders each value column on its OWN theme ground, so a
   token's swatch + label read as they truly would in that theme (light-theme
   dark inks like --on-accent / --success-fg stop vanishing on a dark slide).
   Per-column custom-property re-declaration makes a light / dark island that the
   swatch border, row rules, and label ink all inherit. Applies in BOTH formats. */
.bb-table--themes thead th:nth-child(2),
.bb-table--themes td:nth-child(2) {
  --bg-canvas: var(--serras-steel-50);
  --fg-primary: var(--serras-steel-900);
  --fg-secondary: var(--serras-steel-600);
  --border-strong: var(--serras-steel-400);
  --border-subtle: var(--serras-steel-200);
  background: var(--serras-steel-50);
}
.bb-table--themes td:nth-child(2) { color: var(--serras-steel-900); }
.bb-table--themes thead th:nth-child(3),
.bb-table--themes td:nth-child(3) {
  --bg-canvas: var(--serras-abyss-700);
  --fg-primary: var(--serras-steel-200);
  --fg-secondary: var(--serras-steel-300);
  --border-strong: var(--serras-abyss-50);
  --border-subtle: var(--serras-abyss-200);
  background: var(--serras-abyss-700);   /* surface #0A141A — a true Serras dark ground, one step above the void slide */
}
.bb-table--themes td:nth-child(3) { color: var(--serras-steel-200); }

/* CHART GALLERY (section 08 expansion) — a 3×2 grid of mini-chart specimens.
   Each cell is a hairline-framed mount holding one inline SVG (chart tokens,
   true-zero, flat — no shadow/gradient) plus a mono type label and a short
   caption. Light ground sustained across the reference run for legibility. */
.bb-gchart-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: max-content; align-content: start; column-gap: var(--bb-space-4); row-gap: var(--bb-space-2); margin-top: var(--bb-space-2); }
.bb-gchart { margin: 0; min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--border-subtle); background: var(--bg-surface); padding: var(--bb-space-2) var(--bb-space-3); }
.bb-gchart svg { width: 100%; height: auto; max-height: 134px; display: block; }
.bb-gchart-name { margin-top: var(--bb-space-2); font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-secondary); }

/* 10.4 DIAGRAM — formal 2/3-cell flow; equal cells, hairline frame, caret
   connector built from borders (never amber, never image). */
.bb-diagram { display: grid; gap: 0; align-items: stretch; }
.bb-diagram--2 { grid-template-columns: 1fr auto 1fr; }
.bb-diagram--3 { grid-template-columns: 1fr auto 1fr auto 1fr; }
.bb-diagram-cell {
  border: var(--bb-rule) solid var(--border-subtle);
  padding: var(--bb-space-6);
  display: flex; flex-direction: column; gap: var(--bb-space-3);
}
.bb-diagram-cell .bb-diagram-tier {
  font-family: var(--font-mono); font-size: 12px; line-height: 16px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-secondary);
}
.bb-diagram-cell .bb-diagram-code {
  margin-top: auto; padding-top: var(--bb-space-3);
  border-top: var(--bb-rule) solid var(--border-subtle);
  font-family: var(--font-mono); font-size: 13px; line-height: 20px; color: var(--fg-secondary);
}
/* 3-up token-architecture diagram: the code wells wrap to differing line counts
   (1 vs 2 lines), which knocks their top rules out of alignment. Pin every code
   well to a uniform 2-line height so all three rules — and the code beneath them —
   land on one horizontal line across the spread. Scoped to --3 so the 2-up
   color diagram is untouched. (border-box: 1px rule + 16px pad + 40px = 2 lines.) */
.bb-diagram--3 .bb-diagram-code { min-height: 57px; }
/* Swatches shown beside a called-out color token/value. Sharp, hairline-framed.
   .bb-color-dot = large 48px chip for 2-up callouts; .bb-swatch-inline = row-sized for tables. */
.bb-color-dot {
  display: inline-block; width: 48px; height: 48px;
  margin-right: var(--bb-space-3); vertical-align: middle;
  border: var(--bb-rule) solid var(--border-strong);
}
.bb-swatch-inline {
  display: inline-block; width: 20px; height: 20px;
  margin-right: var(--bb-space-2); vertical-align: -5px;
  border: var(--bb-rule) solid var(--border-strong);
}
.bb-diagram-arrow {
  align-self: center; display: flex; align-items: center; justify-content: center;
  width: 48px; color: var(--border-strong);
}
.bb-diagram-arrow::before {            /* a single caret, built from borders */
  content: ""; width: 10px; height: 10px;
  border-top: 2px solid currentColor; border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

/* 10.5 DOC-FIGURE — full-bleed steel, thirds crosshairs, corner caption. */
.bb-doc {
  position: absolute; inset: 0;
  background: var(--bb-steel-doc); border: 0; overflow: hidden;
}
.bb-doc--guides::before, .bb-doc--guides::after,
.bb-doc--guides > .bb-doc-thirds-v, .bb-doc--guides > .bb-doc-thirds-h {
  content: ""; position: absolute; background: var(--serras-abyss-700);
}
/* crosshairs at the THIRDS (registration target, not center) */
.bb-doc--guides::before { top: 33.333%; left: 0; right: 0; height: 1px; }
.bb-doc--guides::after  { top: 66.666%; left: 0; right: 0; height: 1px; }
.bb-doc--guides > .bb-doc-thirds-v { top: 0; bottom: 0; left: 33.333%; width: 1px; }
.bb-doc--guides > .bb-doc-thirds-h { top: 0; bottom: 0; left: 66.666%; width: 1px; }
.bb-doc-caption {
  position: absolute; left: var(--bb-slide-margin); bottom: var(--bb-slide-margin);
  display: flex; align-items: center; gap: var(--bb-space-3);
  font-family: var(--font-mono); font-size: 13px; line-height: 20px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--serras-steel-200);
}

/* 10.6 DATA-VIZ — label / track / value rows; bar width AND printed value
   both present (color never sole carrier). Axis hairlines + 0/100 ticks. */
.bb-data { display: flex; flex-direction: column; gap: var(--bb-space-2); }
.bb-data-row {
  display: grid; grid-template-columns: 16ch 1fr 6ch; align-items: center;
  gap: var(--bb-space-4); height: 40px;
}
.bb-data-row .bb-data-label {
  font-family: var(--font-body); font-size: 14px; line-height: 20px; color: var(--fg-secondary);
}
.bb-data-track {
  position: relative; height: 100%;
  display: flex; align-items: center;
  border-bottom: var(--bb-rule) solid var(--border-subtle);
}
.bb-bar { height: 14px; background: var(--chart-1); }
.bb-bar--2 { background: var(--chart-2); }   /* amber series — counts toward amber budget */
.bb-bar--3 { background: var(--chart-3); }
.bb-bar--4 { background: var(--chart-4); }
.bb-data-row .bb-data-value {
  font-family: var(--font-mono); font-size: 14px; line-height: 20px;
  text-align: right; font-variant-numeric: tabular-nums;
}
/* wider value column for word-valued bars (e.g. "last resort") that wrap at 6ch */
.bb-data--wide-value .bb-data-row,
.bb-data--wide-value .bb-data-axis { grid-template-columns: 16ch 1fr 12ch; }
.bb-data-axis {
  display: grid; grid-template-columns: 16ch 1fr 6ch; gap: var(--bb-space-4);
}
.bb-data-axis .bb-data-axis-track {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--fg-muted);
}

/* 10.7 COMPONENT FIGURE — hairline-framed mount; the UI is the hero. */
.bb-figure {
  border: var(--bb-rule) solid var(--border-strong);
  background: var(--bg-surface); max-width: 100%; margin: 0;
}
.bb-figure-body { padding: var(--bb-space-6); }
.bb-figure figcaption {
  font-family: var(--font-mono); font-size: 12px; line-height: 16px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-secondary);
  padding: 12px 24px; border-top: var(--bb-rule) solid var(--border-subtle);
}

/* ───────────────────────────────────────────────────────────────────────────
   11. SHARED UTILITIES — minimal; prefer the archetype skins above.
   ─────────────────────────────────────────────────────────────────────────── */
.bb-link {
  color: var(--accent); text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.bb-toc { list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: 1fr 1fr; column-gap: var(--bb-space-9); }
.bb-toc li {
  display: flex; align-items: baseline; gap: var(--bb-space-4);
  padding: var(--bb-space-4) 0; border-bottom: var(--bb-rule) solid var(--border-subtle);
  break-inside: avoid;
}
.bb-toc .bb-folio { flex: 0 0 auto; }
.bb-toc-title {
  font-family: var(--font-display); font-size: 20px; line-height: 24px;
  font-variation-settings: 'opsz' 18, 'wght' 600, 'SOFT' 0, 'WONK' 0; color: var(--fg-primary);
}
/* visually-hidden but exposed to assistive tech. */
.bb-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
