/* box/car · shared stylesheet for the spine and all generated pages.
   Tokens are inherited from the original design system (styles.css).
   Two-worlds rule: dark slate = the world where reasoning gets lost;
   paper insets = the governed artifacts that survive. Layer A claims
   live on dark; Layer B/C proof lives on paper. */

:root {
  --slate:        #1A1F26;
  --slate-2:      #131820;
  --slate-3:      #20262F;
  --slate-line:   rgba(229,224,210,0.10);
  --slate-line-2: rgba(229,224,210,0.18);

  --bone:         #E5E0D2;
  --bone-2:       #F2EDDD;
  --bone-soft:    #A8A292;
  --bone-muted:   #807968;

  --paper:        #FBF7EF;
  --paper-2:      #F4EDDF;
  --card:         #FFFFFF;

  --ink:          #1A2336;
  --ink-2:        #2E3A52;
  --ink-soft:     #4F5A72;
  --muted:        #6B7488;
  --line:         rgba(26, 35, 54, 0.10);

  --brass:        #E8B768;
  --brass-deep:   #C9A055;
  --teal:         #146A5E;
  --teal-glow:    #34B5A0;
  --coral:        #D9745A;
  --plum:         #6E5B97;
  --plum-glow:    #C8BBE0;
  --amber:        #D69845;
  --red:          #C84B4B;

  --night:        #0F1422;
  --night-2:      #161D2F;
  --night-line:   rgba(255,255,255,0.08);

  --radius-lg:    22px;
  --radius-md:    14px;
  --radius-sm:    10px;
  --shadow-paper: 0 40px 100px -20px rgba(0,0,0,0.5), 0 0 0 1px rgba(232,183,104,0.15), inset 0 1px 0 rgba(255,255,255,0.4);
  --shadow-md:    0 1px 0 rgba(0,0,0,0.08), 0 18px 40px -18px rgba(0,0,0,0.50);

  --display: "Fraunces", ui-serif, Georgia, serif;
  --sans: "Manrope", ui-sans-serif, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Door accent, overridden per page via body[data-accent].
     --accent-ink is the same hue deepened for small text on paper
     (kickers, eyebrows, labels), where the bright accent washes out. */
  --accent: var(--brass);
  --accent-glow: var(--brass);
  --accent-ink: #A57E33;
}
body[data-accent="teal"]  { --accent: var(--teal);  --accent-glow: var(--teal-glow); --accent-ink: var(--teal); }
body[data-accent="plum"]  { --accent: var(--plum);  --accent-glow: var(--plum-glow); --accent-ink: var(--plum); }
body[data-accent="coral"] { --accent: var(--coral); --accent-glow: #F0A48D; --accent-ink: #B85A40; }
body[data-accent="amber"] { --accent: var(--amber); --accent-glow: #F2C078; --accent-ink: #A56F1E; }
body[data-accent="brass"] { --accent: var(--brass); --accent-glow: #F5D9A6; --accent-ink: #A57E33; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  background: var(--slate);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(ellipse 80% 50% at 70% 0%, rgba(232,183,104,0.06), transparent 60%),
    radial-gradient(ellipse 60% 40% at 0% 30%, rgba(20,106,94,0.04), transparent 60%);
}
a { color: inherit; text-decoration: none; }
p { margin: 0; }
img { max-width: 100%; height: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--paper); color: var(--ink); padding: 10px 16px; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 2px solid var(--accent-glow); outline-offset: 2px; }

/* ── Topbar ─────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 24px;
  padding: 18px clamp(20px, 5vw, 56px);
  background: rgba(26, 31, 38, 0.78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--slate-line);
}
.brand {
  font-family: var(--mono); font-weight: 600; font-size: 26px;
  letter-spacing: 0.01em; color: var(--bone-2);
  filter: drop-shadow(0 4px 14px rgba(0,0,0,0.35));
}
/* box and car are two railcars; the slash is the coupling between them.
   It flexes under the cursor, and a shunt occasionally travels through. */
.brand b, .brand span {
  display: inline-block; font-weight: inherit;
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.brand span {
  color: var(--accent-glow);
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), color .3s ease, text-shadow .3s ease;
}
.brand:hover span { color: var(--brass); text-shadow: 0 0 14px rgba(232, 183, 104, 0.45); }
.brand:hover b:first-of-type { transform: translateX(1px); }
.brand:hover b:last-of-type { transform: translateX(2px); }

/* The jolt enters at "box", crosses the coupling, exits at "car" */
@keyframes brand-jolt {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(2px); }
  70% { transform: translateX(-0.6px); }
}
@keyframes coupling-glint {
  0%, 100% { color: var(--accent-glow); text-shadow: none; }
  45% { color: #F5D9A6; text-shadow: 0 0 12px rgba(232, 183, 104, 0.6); }
}
.brand.shunt b:first-of-type { animation: brand-jolt .55s ease-out; }
.brand.shunt span { animation: brand-jolt .55s ease-out .09s, coupling-glint .75s ease-out .09s; }
.brand.shunt b:last-of-type { animation: brand-jolt .55s ease-out .18s; }
@media (prefers-reduced-motion: reduce) {
  .brand b, .brand span { transition: none; animation: none !important; }
}
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; font-size: 14.5px; }
.nav > a {
  padding: 7px 12px; border-radius: 8px; color: var(--bone-soft);
  cursor: pointer; white-space: nowrap;
}
.nav > a:hover { color: var(--bone-2); background: var(--slate-3); }
.nav > a[aria-current="page"] { color: var(--accent-glow); }
.topbar .btn { margin-left: 8px; }
.topbar-toggle { display: none; }

@media (max-width: 900px) {
  .nav { display: none; }
  .topbar-toggle {
    display: inline-flex; margin-left: auto; background: none; border: 1px solid var(--slate-line-2);
    color: var(--bone); border-radius: 8px; padding: 8px 10px; cursor: pointer;
  }
  .topbar .btn { display: none; }
  .drawer[hidden] { display: none; }
  .drawer {
    position: fixed; inset: 0; z-index: 60; background: rgba(19,24,32,0.97);
    padding: 70px 28px 28px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto;
  }
  .drawer a { padding: 12px 8px; font-size: 18px; border-bottom: 1px solid var(--slate-line); }
  .drawer-close { position: absolute; top: 16px; right: 16px; background: none; border: 1px solid var(--slate-line-2);
    color: var(--bone); border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: 15px; }
}

/* ── Buttons (matched to the About page system) ─────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 999px;
  font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: 0.005em;
  border: 1px solid transparent; white-space: nowrap; cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn-primary {
  background: var(--paper); color: var(--ink);
  box-shadow: 0 12px 28px -10px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.5);
}
.btn-primary:hover { transform: translateY(-1px); background: var(--brass); box-shadow: 0 16px 32px -10px rgba(232,183,104,0.45); }
.btn-secondary { background: transparent; color: var(--bone); border-color: var(--slate-line-2); }
.btn-secondary:hover { border-color: var(--bone); transform: translateY(-1px); }
.on-paper .btn-secondary, .artifact .btn-secondary { color: var(--ink-2); border-color: var(--line); }
.artifact .btn-primary {
  background: var(--ink); color: var(--paper);
  box-shadow: 0 12px 28px -10px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.5);
}
.artifact .btn-primary:hover {
  background: var(--teal); color: var(--paper);
  box-shadow: 0 16px 32px -10px rgba(20,106,94,0.45), inset 0 1px 0 rgba(255,255,255,0.4);
}

/* ── Hero ───────────────────────────────────────────────── */
/* Text-only heroes: keep the top tight; no graphic to make room for. */
.hero { padding: clamp(34px, 5vw, 60px) clamp(18px, 5vw, 60px) clamp(44px, 6vw, 80px); max-width: 1100px; margin: 0 auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-glow); margin-bottom: 22px;
}
/* Pulses a few times when it first scrolls into view (JS adds .go), then rests. */
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-glow); box-shadow: 0 0 0 0 var(--accent-glow); }
.pulse.go { animation: pulse 2.4s ease-out 3; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(0,0,0,0); } }
h1 {
  font-family: var(--display); font-weight: 560; font-size: clamp(34px, 5.4vw, 62px);
  line-height: 1.06; letter-spacing: -0.015em; color: var(--bone-2); margin: 0 0 26px; max-width: 18ch;
}
h1 em, h2 em, h3 em { font-style: italic; color: var(--accent-glow); }
p em, li em, .cell em { font-style: italic; color: var(--accent-glow); }
.artifact p em, .artifact li em { color: var(--accent); }
.lead { max-width: 62ch; display: grid; gap: 16px; color: var(--bone-soft); font-size: clamp(16px, 1.6vw, 18.5px); }
.lead p:first-child { color: var(--bone); }
.proof-line {
  margin: 30px 0 0; padding: 16px 20px; max-width: 640px;
  background: linear-gradient(135deg, var(--paper), var(--paper-2));
  color: var(--ink); border-radius: var(--radius-md); box-shadow: var(--shadow-paper);
  font-size: 15.5px; font-weight: 600; line-height: 1.5;
}
.proof-line::before {
  content: "Proof"; display: block; font-family: var(--mono); font-weight: 500;
  font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 6px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* ── Sections ───────────────────────────────────────────── */
.section { max-width: 1100px; margin: 0 auto; padding: clamp(36px, 6vw, 72px) clamp(18px, 5vw, 60px); }
/* A section that continues the hero's thought: sits close under it. */
.section-tight { padding-top: clamp(4px, 1.5vw, 16px); }
.kicker {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent-glow); margin-bottom: 14px;
}
h2 {
  font-family: var(--display); font-weight: 560; font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.12; letter-spacing: -0.01em; color: var(--bone-2); margin: 0 0 18px; max-width: 24ch;
}
.section .paras { max-width: 62ch; display: grid; gap: 14px; color: var(--bone-soft); }

/* Paper artifact: Layer B/C proof surfaces */
.artifact {
  background: linear-gradient(160deg, var(--paper), var(--paper-2));
  color: var(--ink); border-radius: var(--radius-lg); box-shadow: var(--shadow-paper);
  padding: clamp(24px, 4vw, 44px);
}
.artifact .kicker { color: var(--accent-ink); }
.artifact h1, .artifact h2, .artifact h3 { color: var(--ink); }
.artifact h1 em, .artifact h2 em, .artifact h3 em { color: var(--accent); }
.artifact h1 { font-size: clamp(30px, 4.4vw, 48px); }
.artifact .paras { color: var(--ink-soft); }

/* Objection card */
.objection { margin-top: 8px; }
.objection .obj-q {
  font-family: var(--display); font-style: italic; font-size: clamp(19px, 2.4vw, 24px);
  color: var(--ink); margin-bottom: 12px;
}
.objection .obj-q::before { content: "“"; color: var(--accent); }
.objection .obj-q::after { content: "”"; color: var(--accent); }
.objection .obj-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}
.objection .obj-a { color: var(--ink-soft); max-width: 62ch; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 22px; }
.stat { background: var(--card); border-radius: var(--radius-md); padding: 20px 22px; box-shadow: var(--shadow-md); border-top: 3px solid var(--accent); }
.stat .val { font-family: var(--display); font-size: 28px; font-weight: 600; color: var(--ink); }
.stat .lbl { font-size: 14px; color: var(--ink-soft); margin-top: 6px; line-height: 1.5; }

/* Spotlight cards: a stat that carries a thumbnail and links to the full story */
.spotlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.spot-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  border-top: 3px solid var(--accent); color: inherit;
  transition: transform .25s ease, box-shadow .25s ease;
}
.spot-card:hover { transform: translateY(-3px); }
.spot-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; display: block; background: var(--paper-2); }
.spot-card .spot-body { display: block; padding: 16px 20px 18px; }
.spot-card .val { display: block; font-family: var(--display); font-size: 26px; font-weight: 600; color: var(--ink); }
.spot-card .lbl { display: block; font-size: 13.5px; color: var(--ink-soft); margin-top: 6px; line-height: 1.5; }
.spot-card .spot-more { display: inline-block; margin-top: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; }
.spot-card:hover .spot-more { text-decoration: underline; }

/* ── Hero media: image or before/after pair.
   Sits below the copy on mobile, beside it on desktop. ── */
.hero-figure { margin: 30px 0 0; max-width: 860px; }
.hero-figure img, .hero-pair img {
  width: 100%; display: block; border-radius: var(--radius-md);
  border: 1px solid var(--slate-line-2);
  box-shadow: 0 30px 70px -30px rgba(0,0,0,0.6);
}
.hero-media { margin-top: 30px; }
.hero-media .hero-figure { margin-top: 0; }
.hero-pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.hero-pair figure { margin: 0; }
.hero-pair figcaption {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--bone-muted); text-align: center; margin-top: 10px;
}
.pair-arrow { color: var(--accent-glow); font-size: 20px; font-weight: 700; }
@media (min-width: 1020px) {
  .hero.has-media {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: center;
  }
  .hero.has-media .hero-media { margin-top: 0; }
}

/* ── Home: five-up stats, split copy beside a screenshot, gallery triggers ── */
.stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stats-5 .stat { padding: 18px 18px; }
.stats-5 .stat .val { font-size: clamp(26px, 3vw, 34px); }
@media (max-width: 960px) { .stats-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stats-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.split > * { min-width: 0; }
.split .hero-figure { margin: 0; max-width: none; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

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

/* A screenshot that opens the gallery: an unstyled button around the image. */
.shot-open {
  display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none;
  cursor: zoom-in; border-radius: var(--radius-md); color: inherit; font: inherit;
}
.shot-open:focus-visible { outline: 2px solid var(--accent-glow); outline-offset: 4px; }
.shot-open img { transition: transform .25s ease, box-shadow .25s ease; }
.shot-open:hover img { transform: translateY(-2px); box-shadow: 0 34px 70px -28px rgba(0,0,0,0.7); }
.shot-hint {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--bone-muted); margin: 10px 0 0; text-align: center;
}

/* ── Comparison table: a real <table> on paper, scrolls inside its own box ── */
.compare { margin-top: 22px; padding: clamp(16px, 2.5vw, 26px); background: var(--paper); }
.compare-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap;
  padding-bottom: 8px; border-bottom: 2px solid var(--ink);
}
.compare-head h3 { font-family: var(--sans); font-weight: 800; font-size: 15px; color: var(--ink); margin: 0; }
.compare-note { font-size: 12px; color: var(--muted); }
/* position: relative keeps the absolutely positioned .sr-only cell text inside the
   scroll box; otherwise it escapes the clip and widens the whole document on phones. */
.compare-scroll { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-color: var(--line) transparent; }
.compare-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.compare table { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 0; font-size: 12.5px; line-height: 1.35; color: var(--ink-2); }
.compare th, .compare td { padding: 5px 10px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; font-weight: 500; }
.compare th:first-child, .compare td:first-child {
  text-align: left; position: sticky; left: 0; z-index: 1; background: var(--paper); min-width: 220px;
}
.compare thead th { font-weight: 700; font-size: 11.5px; color: var(--ink); border-bottom: 1px solid var(--ink-2); vertical-align: bottom; padding-bottom: 7px; }
.compare thead th small { display: block; font-weight: 400; font-size: 10px; color: var(--muted); margin-top: 1px; line-height: 1.3; }
.compare .col-boxcar { background: color-mix(in srgb, var(--teal) 8%, var(--paper)); }
.compare thead .col-boxcar { color: var(--teal); }
.compare tr.group th { position: static; text-align: left; padding: 14px 10px 5px; border-bottom: 1px solid var(--ink-2); background: none; }
.compare tr.group .group-label {
  position: sticky; left: 10px; display: inline-block;
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); font-weight: 600;
}
.compare tr.group .group-label span {
  font-family: var(--sans); font-size: 11.5px; letter-spacing: 0; text-transform: none; color: var(--muted); font-weight: 400; margin-left: 8px;
}
.compare .mark { font-size: 13px; line-height: 1; }
.compare .col-short { display: none; }
/* Phones: the whole matrix fits the screen. Short column labels, a fixed
   layout, no sticky column, no sideways scroll. */
@media (max-width: 640px) {
  .compare-matrix { padding: 16px 10px 14px; }
  .compare-matrix .compare-head { padding-left: 4px; padding-right: 4px; }
  .compare-matrix .compare-scroll { overflow: visible; }
  .compare-matrix table { min-width: 0; table-layout: fixed; font-size: 12px; line-height: 1.3; }
  .compare-matrix th, .compare-matrix td { padding: 6px 2px; }
  .compare-matrix th:first-child, .compare-matrix td:first-child { position: static; min-width: 0; width: 46%; padding-left: 4px; padding-right: 6px; }
  .compare-matrix thead th { font-size: 10px; letter-spacing: .02em; line-height: 1.2; padding-bottom: 6px; }
  .compare-matrix .col-long { display: none; }
  /* Column names stand upright, reading bottom to top, so they never collide. */
  .compare-matrix .col-short {
    display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg);
    white-space: nowrap; font-size: 10.5px; letter-spacing: .04em; line-height: 1; padding: 2px 0;
  }
  .compare-matrix tr.group th { padding: 12px 4px 4px; }
  .compare-matrix tr.group .group-label { position: static; }
  .compare-matrix tr.group .group-label span { display: block; margin-left: 0; margin-top: 2px; font-size: 11px; }
  .compare-matrix .mark { font-size: 12px; }
  .compare-matrix .compare-legend, .compare-matrix .compare-more { padding-left: 4px; padding-right: 4px; }
}
.compare .mark.full { color: var(--teal); font-weight: 700; }
.compare .mark.partial { color: var(--brass-deep); font-weight: 700; }
.compare-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.compare-legend .mark { font-size: 12px; }
.compare-assessed { margin-left: auto; }
.compare-more { margin-top: 14px; text-align: right; font-weight: 600; font-size: 15px; color: var(--ink); }
.link-btn {
  background: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--teal);
}
.link-btn:hover { color: var(--teal); }

/* The full capability sheet: the same table treatment inside a dialog that scrolls */
dialog.capsheet {
  width: min(900px, 94vw); max-width: none; max-height: 92vh; padding: 0; margin: auto;
  background: transparent; border: 0; overflow: visible;
}
dialog.capsheet::backdrop { background: rgba(10,13,18,0.85); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
dialog.capsheet[open] { animation: gallery-in .18s ease-out; }
dialog.capsheet .gallery-close { top: -10px; right: -10px; }
/* Title bar stays put; the body scrolls; the column headers stick inside it. */
.capsheet-inner { display: flex; flex-direction: column; max-height: 92vh; margin-top: 0; overflow: hidden; }
.capsheet-inner .compare-head { flex: 0 0 auto; }
.capsheet-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.capsheet-body .compare-scroll { overflow: visible; }
.capsheet-inner table { min-width: 560px; }
.capsheet-inner th:first-child, .capsheet-inner td:first-child { min-width: 200px; }
.capsheet-inner thead th { position: sticky; top: 0; z-index: 2; background: var(--paper); }
.capsheet-inner thead th:first-child { left: auto; z-index: 3; }
.compare tr.divider td {
  text-align: left; padding: 26px 12px 8px; border-bottom: 2px solid var(--ink); font-size: 13px; color: var(--ink-soft);
}
.compare .divider-tag {
  display: inline-block; margin-right: 8px; font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--teal); font-weight: 600;
}
@media (max-width: 640px) {
  /* Fill the visible viewport, not 100vh: iOS Safari's 100vh includes the
     hidden toolbars, which pushed the top of a centered dialog off-screen. */
  dialog.capsheet { inset: 0; margin: 0; width: 100%; height: 100%; max-height: none; }
  dialog.capsheet .gallery-close { top: calc(8px + env(safe-area-inset-top, 0px)); right: 8px; }
  .capsheet-inner { height: 100%; max-height: 100%; border-radius: 0; padding: calc(18px + env(safe-area-inset-top, 0px)) 14px 18px; }
  .capsheet-inner .compare-head { padding-right: 52px; }
  /* Three columns fit a phone: no sticky first column, fixed mark columns. */
  .capsheet-inner table { min-width: 0; font-size: 13px; }
  .capsheet-inner tbody th:first-child, .capsheet-inner td:first-child { position: static; min-width: 0; padding-left: 4px; }
  .capsheet-inner thead th:first-child { min-width: 0; padding-left: 4px; }
  .capsheet-inner thead th:not(:first-child), .capsheet-inner td:not(:first-child) { width: 64px; padding-left: 4px; padding-right: 4px; }
  .capsheet-inner thead th { font-size: 11px; }
}

/* ── The orbit: five stops around three braided strands ── */
.orbit { position: relative; aspect-ratio: 800 / 620; max-width: 820px; margin: clamp(28px, 4vw, 44px) auto 0; }
.orbit svg { position: absolute; inset: 0; width: 100%; height: 100%; color: rgba(229,224,210,0.38); }
.orbit-disc { fill: rgba(229,224,210,0.035); }
.orbit-arrows path { fill: none; stroke: currentColor; stroke-width: 2; }
.orbit-strand {
  fill: none; stroke-width: 8; stroke-linecap: round; stroke-dasharray: 14 9;
  --o: 0px; stroke-dashoffset: var(--o);
  animation: orbit-flow 40s linear infinite;
}
.orbit-strand.s0 { stroke: var(--teal-glow); }
.orbit-strand.s1 { stroke: var(--coral); --o: 8px; }
.orbit-strand.s2 { stroke: var(--brass); --o: 16px; }
@keyframes orbit-flow { from { stroke-dashoffset: var(--o); } to { stroke-dashoffset: calc(var(--o) - 230px); } }
.orbit-stops { list-style: none; margin: 0; padding: 0; }
.orbit-stop {
  position: absolute; transform: translate(-50%, -50%); white-space: nowrap; text-align: center;
  padding: 10px 20px; border-radius: 999px;
  background: var(--slate-2); border: 1px solid var(--slate-line-2);
  box-shadow: 0 18px 40px -18px rgba(0,0,0,0.6);
}
.orbit-stop strong { display: block; font-family: var(--display); font-weight: 560; font-size: clamp(15px, 1.7vw, 18px); color: var(--bone-2); line-height: 1.15; }
.orbit-stop span { display: block; margin-top: 3px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--teal-glow); }
.orbit-legend {
  list-style: none; margin: 0; padding: 0;
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: grid; gap: 8px; font-weight: 700; font-size: clamp(13px, 1.5vw, 16px); color: var(--bone-2);
}
.orbit-legend li { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.orbit-legend .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.orbit-legend .dot.teal { background: var(--teal-glow); }
.orbit-legend .dot.coral { background: var(--coral); }
.orbit-legend .dot.brass { background: var(--brass); }
/* Small screens keep the whole composition (ring, arrows, stations, legend)
   and simply shrink it: the diagram is the meaning. */
@media (max-width: 720px) {
  .orbit { margin-left: -6px; margin-right: -6px; }
  .orbit svg { color: rgba(229,224,210,0.5); }
  .orbit-arrows path { stroke-width: 3; }
  .orbit-strand { stroke-width: 10; stroke-dasharray: 16 10; }
  @keyframes orbit-flow { from { stroke-dashoffset: var(--o); } to { stroke-dashoffset: calc(var(--o) - 260px); } }
  .orbit-stop { padding: 5px 9px; border-radius: 999px; box-shadow: 0 10px 24px -12px rgba(0,0,0,0.7); }
  .orbit-stop strong { font-size: 11px; }
  .orbit-stop span { font-size: 7.5px; letter-spacing: .1em; margin-top: 1px; }
  .orbit-legend { gap: 3px; font-size: 10px; }
  .orbit-legend li { gap: 6px; }
  .orbit-legend .dot { width: 7px; height: 7px; }
}
@media (max-width: 400px) {
  .orbit-stop { padding: 4px 7px; }
  .orbit-stop strong { font-size: 10px; }
  .orbit-stop span { font-size: 7px; }
  .orbit-legend { font-size: 9px; }
}

/* ── Screenshot gallery: one native dialog, one image at a time ── */
dialog.gallery {
  width: min(1200px, 94vw); max-width: none; max-height: 94vh; padding: 0; margin: auto;
  background: var(--slate-2); color: var(--bone); border: 1px solid var(--slate-line-2);
  border-radius: var(--radius-lg); box-shadow: 0 60px 120px -30px rgba(0,0,0,0.8); overflow: visible;
}
dialog.gallery::backdrop { background: rgba(10,13,18,0.85); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
dialog.gallery[open] { animation: gallery-in .18s ease-out; }
@keyframes gallery-in { from { opacity: 0; transform: scale(.985); } }
.gallery-figure { margin: 0; touch-action: pan-y; }
.gallery-figure img {
  display: block; width: 100%; max-height: 72vh; object-fit: contain; background: var(--slate-3);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; cursor: pointer; user-select: none; -webkit-user-drag: none;
}
.gallery-figure figcaption { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 16px 20px 18px; }
.gallery-title { display: block; font-family: var(--display); font-weight: 560; font-size: 20px; color: var(--bone-2); }
.gallery-caption { display: block; margin-top: 4px; font-size: 14.5px; color: var(--bone-soft); max-width: 62ch; }
.gallery-count { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--bone-muted); white-space: nowrap; padding-top: 6px; }
.gallery-close, .gallery-nav {
  position: absolute; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
  background: rgba(19,24,32,0.85); color: var(--bone); border: 1px solid var(--slate-line-2);
  cursor: pointer; font: inherit; font-size: 18px; transition: border-color .15s ease, transform .15s ease;
}
.gallery-close:hover, .gallery-nav:hover { border-color: var(--bone); }
.gallery-close { top: 12px; right: 12px; z-index: 2; }
.gallery-nav { top: 36vh; transform: translateY(-50%); }
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }
body.gallery-open { overflow: hidden; }
@media (max-width: 640px) {
  dialog.gallery { max-height: calc(100% - 24px); }
  .gallery-figure img { max-height: 55vh; }
  .gallery-figure figcaption { flex-direction: column; gap: 8px; padding-bottom: 66px; }
  .gallery-nav { top: auto; bottom: 12px; transform: none; }
}

/* ── Envelope demo host (blocks.envelope): copy beside the tablet ── */
.env-block { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.env-block > * { min-width: 0; }
.env-block .hero-envelope { margin: 0 auto; }
@media (min-width: 1020px) {
  .env-block { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .env-block .hero-envelope { margin-top: 0; max-width: none; }
}

/* ── Logo bands: mono wordmarks on dark; image marks for proof credentials ── */
.logo-band {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 14px 30px; margin-top: 20px;
}
.logo-band .li {
  font-family: var(--mono); font-size: 13.5px; letter-spacing: 0.08em;
  color: var(--bone-muted); transition: color 0.15s ease;
}
.logo-band .li:hover { color: var(--bone); }
.logo-band img {
  height: 30px; width: auto;
  opacity: 0.85; transition: opacity 0.15s ease;
}
.logo-band img:hover { opacity: 1; }
.logo-band img[src$=".jpg"], .logo-band img[src$=".png"] {
  height: 42px; border-radius: 8px;
  box-shadow: 0 6px 18px -6px rgba(0,0,0,0.5);
}

/* ── The method loop: think → build governed → measure → keep the reasoning ── */
.mloop {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 12px; align-items: stretch; margin-top: 24px;
}
.mstop {
  background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 16px 18px;
}
.mstop .mnum {
  display: block; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.16em; color: var(--accent-ink); margin-bottom: 8px;
}
.mstop strong {
  display: block; font-family: var(--display); font-size: 19px; font-weight: 560;
  color: var(--ink); margin-bottom: 5px; line-height: 1.15;
}
.mstop .mdesc { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }
.marr { align-self: center; color: var(--accent); font-weight: 700; font-size: 19px; }
.mloop-return {
  display: flex; align-items: center; gap: 10px; margin-top: 16px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft);
}
.mloop-return::before {
  content: ""; flex: 1; height: 1px;
  background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px);
}
.mret { color: var(--accent); font-size: 15px; }
@media (max-width: 860px) {
  .mloop { grid-template-columns: 1fr; }
  .marr { justify-self: center; transform: rotate(90deg); }
}

/* Steps */
.steps { display: grid; gap: 14px; margin-top: 24px; counter-reset: none; }
.step { display: grid; grid-template-columns: 14px 1fr; gap: 16px; align-items: start; }
.step::before { content: ""; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.step h3 { font-family: var(--sans); font-weight: 800; font-size: 16.5px; color: var(--ink); margin: 0 0 4px; }
.step p { color: var(--ink-soft); max-width: 62ch; }

/* CTA band */
.cta-band { text-align: left; }
.cta-band .hero-actions { margin-top: 22px; }

/* Video slot */
.video-slot {
  border: 1.5px dashed var(--slate-line-2); border-radius: var(--radius-lg);
  padding: clamp(36px, 6vw, 64px); text-align: center; color: var(--bone-muted);
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em;
}
.video-slot .play {
  width: 54px; height: 54px; border-radius: 50%; border: 1.5px solid var(--slate-line-2);
  display: inline-grid; place-items: center; margin-bottom: 14px; color: var(--bone-soft); font-size: 18px;
}

/* Quote slot: renders only when filled */
.quote-slot blockquote {
  margin: 0; font-family: var(--display); font-style: italic;
  font-size: clamp(20px, 2.6vw, 26px); color: var(--ink); line-height: 1.35;
}
.quote-slot cite { display: block; margin-top: 14px; font-family: var(--mono); font-style: normal; font-size: 13px; color: var(--muted); }

/* ── Spine-specific ─────────────────────────────────────── */

/* Form */
.form-grid { display: grid; gap: 14px; margin-top: 24px; max-width: 560px; }
.form-grid label { display: grid; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
.form-grid input, .form-grid textarea {
  font: inherit; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--card); color: var(--ink); width: 100%;
}
.form-grid textarea { min-height: 130px; resize: vertical; }
.hp { position: absolute; left: -9999px; height: 1px; width: 1px; overflow: hidden; }
.form-note { font-size: 13px; color: var(--muted); }
.form-status { font-size: 14.5px; font-weight: 700; margin-top: 6px; }
.form-status.ok { color: var(--teal); }
.form-status.err { color: var(--red); }

/* ── Readiness ──────────────────────────────────────────── */
.rq { margin-top: 18px; }
.rq .rq-q { font-weight: 800; color: var(--ink); margin-bottom: 12px; font-size: 16.5px; }
.rq .rq-opts { display: grid; gap: 8px; }
.rq button {
  text-align: left; font: inherit; font-size: 14.5px; padding: 12px 14px; cursor: pointer;
  background: var(--card); color: var(--ink-soft); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
}
.rq button:hover { border-color: var(--accent); }
.rq button[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--card)); color: var(--ink); font-weight: 700; }

/* Embedded on the spine: questions left, live result card right */
.readiness-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 30px; align-items: start; margin-top: 8px; }
.readiness-qs .rq:first-child { margin-top: 4px; }
.result-card {
  position: sticky; top: 84px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius-md);
  padding: 20px 22px;
}
.result-card .r-level { font-family: var(--display); font-size: 24px; color: var(--ink); margin-top: 2px; }
.result-bar { display: flex; gap: 6px; margin: 12px 0; }
.result-bar .seg { flex: 1; height: 6px; border-radius: 999px; background: var(--line); transition: background .25s ease; }
.result-bar .seg.lit { background: var(--accent); }
.result-card .r-blurb { color: var(--ink-soft); font-size: 14.5px; margin: 0; }
.dim-list { list-style: none; margin: 12px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--line); }
.dim-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13.5px; color: var(--ink-2); padding: 5px 0; }
.dim-list li span:last-child { font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; white-space: nowrap; }
.dim-list li.gap span:last-child { color: var(--red); font-weight: 600; }
.dim-list li.ok span:last-child { color: var(--teal); }
.result-card .r-door { margin-top: 12px; font-size: 14px; }
.result-card .r-door a { color: var(--accent); font-weight: 700; text-decoration: underline; }
.result-card .r-door:empty { display: none; }
.result-actions { margin-top: 16px; }
@media (max-width: 900px) {
  .readiness-grid { grid-template-columns: 1fr; }
  .result-card { position: static; }
}

/* ── Footer (matched to the About page system) ──────────── */
.foot {
  margin-top: clamp(40px, 7vw, 90px);
  background: var(--slate-2);
  color: var(--bone-muted);
  padding: 60px clamp(20px, 5vw, 56px) 32px;
  border-top: 1px solid var(--slate-line);
}
.foot-inner {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2.4fr;
  gap: 60px;
  margin-bottom: 40px;
}
.foot .brand { color: var(--bone-2); font-size: 24px; }
.foot-blurb { font-size: 13px; color: var(--bone-muted); margin-top: 14px; max-width: 28ch; line-height: 1.6; }
.foot-cols {
  display: grid;
  /* Flows 4 columns, or 5 when the Latest posts column is present. */
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 32px;
}
.foot h5 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone-2);
  margin: 0 0 14px;
}
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot ul li { padding: 4px 0; }
.foot ul li a { font-size: 13px; color: var(--bone-muted); transition: color 0.15s ease; }
.foot ul li a:hover { color: var(--brass); }
.foot-meta {
  max-width: 1320px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--slate-line);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--bone-muted);
}
@media (max-width: 900px) {
  .foot-inner { grid-template-columns: 1fr; gap: 40px; }
  .foot-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .foot-cols { grid-template-columns: 1fr 1fr; }
}

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ── Autonomy envelope (blocks.envelope, on /rules/): ported verbatim from the original live site ── */
:root {
  --night-3:    #1F273B;
  --red-bright: #FF8585;
  --card-warm:  #FFFBF3;
  --shadow-lg:  0 40px 100px -30px rgba(0,0,0,0.6), 0 12px 30px -16px rgba(0,0,0,0.4);
}
.hero-envelope {
  max-width: 560px; margin-top: 38px;
  perspective: 1600px; perspective-origin: 50% 60%;
}
.hero-tablet {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.18;          /* slight portrait - reads as a tablet, not a square */
  padding: 26px 22px 36px;          /* bezel thickness; bottom heavier like an iPad */
  border-radius: 30px;
  background:
    linear-gradient(160deg, #1A1F26 0%, #0E1218 70%, #1A1F26 100%);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow:
    0 60px 100px -30px rgba(0,0,0,0.7),
    0 18px 40px -16px rgba(0,0,0,0.5),
    inset 0 1px 0 rgba(255,255,255,0.10),
    inset 0 -1px 0 rgba(0,0,0,0.6),
    inset 0 0 0 1px rgba(255,255,255,0.03);
  color: var(--ink);
  transform-origin: 50% 80%;
  transform: rotateX(8deg) rotateY(-10deg) rotateZ(-1deg);
  transition: transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.55s ease;
  will-change: transform;
}
.hero-tablet:hover {
  transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg) translateZ(28px);
  box-shadow:
    0 90px 160px -30px rgba(0,0,0,0.78),
    0 28px 56px -16px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.16),
    inset 0 -1px 0 rgba(0,0,0,0.6),
    inset 0 0 0 1px rgba(232,183,104,0.22);
}
.hero-tablet-cam {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 6px; height: 6px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, #2a3140 0%, #0a0d12 70%);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.6),
    inset 0 0 0 1px rgba(255,255,255,0.05);
}
.hero-tablet-cam::after {
  content: "";
  position: absolute;
  inset: 1.4px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.18), transparent 60%);
}

.product-shell {
  background: var(--night);
  border-radius: var(--radius-lg);
  border: 1px solid var(--night-line);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(232,183,104,0.10);
  transform-style: preserve-3d;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.45s ease;
  will-change: transform;
}
.product-shell .product-body { transform: translateZ(0); }
.product-shell .env-dot       { transform: translate(-50%, -50%) translateZ(36px); }
.product-shell .envelope-tabs { transform: translateZ(28px); }
.product-shell .env-callout   { transform: translateZ(40px); }
@media (prefers-reduced-motion: reduce) {
  .product-shell { transition: none; }
}
.product-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--night-line);
  background: var(--night-2);
}
.product-topbar .logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.85);
}
.product-topbar .logo i {
  width: 14px; height: 14px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--brass), var(--brass-deep));
}
.product-topbar .tabs {
  display: flex;
  gap: 4px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.product-topbar .tab {
  padding: 6px 10px;
  border-radius: 6px;
  color: rgba(255,255,255,0.5);
}
.product-topbar .tab.active {
  background: rgba(232, 183, 104, 0.16);
  color: var(--brass);
}
.product-topbar .right { display: flex; gap: 6px; }
.product-topbar .pill {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--night-3);
  color: rgba(255,255,255,0.6);
}
.product-body {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  height: 460px;
}
.envelope-canvas {
  position: relative;
  padding: 30px;
  background:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px) 0 0 / 25% 100%,
    var(--night);
}
.envelope-canvas::before, .envelope-canvas::after {
  content: "";
  position: absolute;
  background: rgba(255,255,255,0.1);
}
.envelope-canvas::before { left: 30px; right: 30px; top: 50%; height: 1px; }
.envelope-canvas::after { top: 30px; bottom: 30px; left: 50%; width: 1px; }
.envelope-canvas .label {
  position: absolute;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.envelope-canvas .label.severity { top: 14px; left: 30px; }
.envelope-canvas .label.confidence { bottom: 14px; right: 30px; }
.envelope-tabs {
  position: absolute;
  top: 14px; right: 30px;
  display: flex;
  gap: 4px;
  background: var(--night-2);
  border: 1px solid var(--night-line);
  border-radius: 999px;
  padding: 3px;
}
.envelope-tabs button {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  padding: 5px 10px;
  border-radius: 999px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.5);
}
.envelope-tabs button.active {
  background: rgba(232,183,104,0.16);
  color: var(--brass);
}
.env-dot {
  position: absolute;
  width: 32px; height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  background: var(--night-2);
  border: 1px solid var(--night-line);
  cursor: pointer;
  padding: 0;
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.env-dot svg { width: 14px; height: 14px; stroke-width: 1.5; pointer-events: none; }
.env-dot.red { background: rgba(200,75,75,0.18); border-color: rgba(200,75,75,0.4); color: var(--red-bright); }
.env-dot.amber { background: rgba(214,152,69,0.16); border-color: rgba(214,152,69,0.36); color: #F2B873; }
.env-dot.teal { background: rgba(232,183,104,0.16); border-color: rgba(232,183,104,0.36); color: var(--brass); }
.env-dot:hover, .env-dot:focus-visible {
  transform: translate(-50%, -50%) translateZ(48px) scale(1.18);
  outline: none;
}
.env-dot.red:hover, .env-dot.red:focus-visible    { box-shadow: 0 0 0 6px rgba(200,75,75,0.18), 0 8px 24px rgba(200,75,75,0.35); }
.env-dot.amber:hover, .env-dot.amber:focus-visible { box-shadow: 0 0 0 6px rgba(214,152,69,0.18), 0 8px 24px rgba(214,152,69,0.30); }
.env-dot.teal:hover, .env-dot.teal:focus-visible   { box-shadow: 0 0 0 6px rgba(232,183,104,0.18), 0 8px 24px rgba(232,183,104,0.30); }
.env-dot.selected {
  transform: translate(-50%, -50%) translateZ(54px) scale(1.22);
  outline: none;
}
.env-dot.selected.red    { box-shadow: 0 0 0 7px rgba(200,75,75,0.22), 0 10px 30px rgba(200,75,75,0.45); }
.env-dot.selected.amber  { box-shadow: 0 0 0 7px rgba(214,152,69,0.20), 0 10px 30px rgba(214,152,69,0.36); }
.env-dot.selected.teal   { box-shadow: 0 0 0 7px rgba(232,183,104,0.22), 0 10px 30px rgba(232,183,104,0.36); }
.env-callout {
  position: absolute;
  left: 65%;
  top: 8%;
  background: rgba(200,75,75,0.14);
  border: 1px solid rgba(200,75,75,0.36);
  color: #FF9C9C;
  padding: 8px 12px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  line-height: 1.5;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
.env-callout.callout-red    { background: rgba(200,75,75,0.14); border-color: rgba(200,75,75,0.36); color: #FF9C9C; }
.env-callout.callout-amber  { background: rgba(214,152,69,0.14); border-color: rgba(214,152,69,0.36); color: #F2B873; }
.env-callout.callout-teal   { background: rgba(232,183,104,0.14); border-color: rgba(232,183,104,0.36); color: var(--brass); }
.envelope-side {
  background: var(--night-2);
  border-left: 1px solid var(--night-line);
  padding: 20px;
  overflow-y: auto;
  color: rgba(255,255,255,0.85);
}
.side-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.side-head h4 {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0;
  color: rgba(255,255,255,0.95);
}
.drift-badge {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(214,152,69,0.16);
  color: var(--amber);
}
.tab-toggle {
  display: flex;
  gap: 0;
  background: var(--night-3);
  border-radius: 6px;
  padding: 3px;
  margin-bottom: 16px;
}
.tab-toggle button {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 4px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.5);
  flex: 1;
}
.tab-toggle button.active {
  background: var(--night);
  color: rgba(255,255,255,0.9);
}
.rule-card {
  background: var(--night);
  border: 1px solid var(--night-line);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
}
.rule-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: rgba(255,255,255,0.95);
  margin-bottom: 8px;
}
.rule-name .icon {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 6px;
  background: rgba(200,75,75,0.18);
  color: var(--red-bright);
}
.rule-name .icon svg { width: 12px; height: 12px; stroke-width: 1.5; }
.status-row {
  display: flex; gap: 8px; align-items: center; margin-bottom: 10px;
}
.severity-tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  background: rgba(200,75,75,0.2);
  color: #FF9C9C;
  padding: 3px 7px;
  border-radius: 4px;
}
.severity-tag.tag-red    { background: rgba(200,75,75,0.20); color: #FF9C9C; }
.severity-tag.tag-amber  { background: rgba(214,152,69,0.20); color: #F2B873; }
.severity-tag.tag-teal   { background: rgba(232,183,104,0.20); color: var(--brass); }
.status-text {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
}
.timestamp {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(255,255,255,0.45);
  margin-left: auto;
}
.rule-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
  margin-bottom: 12px;
}
.rule-desc code {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--night-3);
  padding: 1px 5px;
  border-radius: 3px;
  color: rgba(255,255,255,0.85);
}
.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.metric {
  background: var(--night-3);
  border-radius: 6px;
  padding: 8px 10px;
}
.metric label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  display: block;
  margin-bottom: 2px;
}
.metric span {
  font-family: var(--mono);
  font-size: 14px;
  color: rgba(255,255,255,0.95);
}
.metric.small span { font-size: 11px; }
.triggered-card {
  background: rgba(232, 183, 104, 0.06);
  border: 1px solid rgba(232, 183, 104, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.triggered-card h5 {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 6px;
  color: rgba(255,255,255,0.95);
}
.triggered-card .badge {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  border-radius: 4px;
  background: rgba(232,183,104,0.18);
  color: var(--brass);
}
.triggered-card .badge svg { width: 10px; height: 10px; stroke-width: 1.5; }
.triggered-card p {
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
}
.scoring h4 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 10px;
  color: rgba(255,255,255,0.95);
}
.score-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 0;
  border-bottom: 1px solid var(--night-line);
  color: rgba(255,255,255,0.7);
}
.score-row:last-child { border-bottom: none; }
.score-row .val.pos { color: #FF9C9C; }
.score-row .val.neg { color: var(--brass); }
/* The iPad now hosts a .product-shell directly. Make it fill the bezel and
   stack the body so both columns get usable width inside a portrait screen. */
.hero-tablet > .product-shell {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
}
.hero-tablet > .product-shell > .product-body {
  grid-template-columns: 1fr;
  height: auto;
  flex: 1;
  min-height: 0;
}
.hero-tablet > .product-shell .envelope-canvas {
  min-height: 220px;
  aspect-ratio: 1.4 / 1;
}
.hero-tablet > .product-shell .envelope-side {
  border-left: none;
  border-top: 1px solid var(--night-line);
  max-height: 240px;
}
.hero-tablet > .product-shell .product-topbar {
  gap: 8px;
  padding: 10px 14px;
}
/* Tabs sit inline with logo + pills inside the iPad. Two tabs at tighter
   sizing fit comfortably with the BOXCAR mark and the user/PDF pills. */
.hero-tablet > .product-shell .product-topbar .tabs {
  gap: 4px;
}
.hero-tablet > .product-shell .product-topbar .tab {
  font-size: 9px;
  padding: 5px 9px;
}
.hero-tablet > .product-shell .hero-vis-glare {
  z-index: 2;
}
.hero-vis-glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0.05) 28%, rgba(255,255,255,0) 50%);
  mix-blend-mode: screen;
  opacity: 0.7;
  transition: opacity 0.4s ease;
}
.hero-tablet:hover .hero-vis-glare { opacity: 0.25; }

@media (prefers-reduced-motion: reduce) {
  .hero-tablet,
  .hero-tablet:hover { transform: none; transition: none; }
}
@media (max-width: 980px) {
  .hero-tablet,
  .hero-tablet:hover { transform: none; }
  .hero-tablet { aspect-ratio: 1 / 1.05; padding: 22px 18px 28px; }
}
/* ── Cookie notice: small, dismissible, bottom corner ── */
.cookie-note[hidden] { display: none; }
.cookie-note {
  position: fixed; bottom: 16px; left: 16px; z-index: 70;
  display: flex; align-items: center; gap: 12px;
  max-width: 340px; padding: 12px 14px;
  background: var(--slate-2); border: 1px solid var(--slate-line-2);
  border-radius: var(--radius-md); box-shadow: 0 18px 40px -18px rgba(0,0,0,0.6);
  font-size: 13px; line-height: 1.45; color: var(--bone-soft);
}
.cookie-note button {
  font: inherit; font-weight: 700; cursor: pointer;
  padding: 6px 14px; border-radius: 999px;
  background: var(--accent); color: var(--slate-2); border: none;
  flex-shrink: 0;
}
.cookie-note button:hover { filter: brightness(1.08); }
@media (max-width: 560px) { .cookie-note { left: 12px; right: 12px; bottom: 12px; max-width: none; } }

/* ── Blog index rows ── */
.post-row {
  display: block; padding: 16px 4px; border-bottom: 1px dashed var(--line);
  border-radius: 6px; transition: background 0.15s ease;
}
.post-row:last-child { border-bottom: none; }
.post-row:hover { background: var(--paper-2); }
.post-row .post-date {
  display: block; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px;
}
.post-row strong {
  display: block; font-family: var(--display); font-size: 21px; font-weight: 560;
  color: var(--ink); line-height: 1.2; margin-bottom: 4px;
}
.post-row strong em { color: var(--accent); }
.post-row .post-desc { font-size: 14px; color: var(--ink-soft); }
.foot-meta a { color: var(--bone-muted); }
.foot-meta a:hover { color: var(--brass); }
.byline {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.08em;
  color: var(--bone-muted); border-top: 1px dashed var(--slate-line-2);
  padding-top: 18px; max-width: 62ch;
}

/* ── The method: sticky pull beside numbered discipline lines ── */
.method {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(28px, 4vw, 60px); align-items: start;
}
.method-pull { position: sticky; top: 96px; }
.method-lede { margin-top: 18px; font-size: 16.5px; line-height: 1.55; color: var(--bone-soft); max-width: 46ch; }
.method-line {
  display: grid; grid-template-columns: 44px 1fr; gap: 16px;
  padding: 18px 0; border-bottom: 1px dashed var(--slate-line-2);
}
.method-line:last-child { border-bottom: none; }
.method-line .n { font-family: var(--mono); font-size: 13px; color: var(--accent-glow); padding-top: 3px; }
.method-line strong { display: block; color: var(--bone-2); font-size: 16.5px; line-height: 1.35; margin-bottom: 5px; }
.method-line span { color: var(--bone-soft); font-size: 14.5px; line-height: 1.55; }
@media (max-width: 900px) {
  .method { grid-template-columns: 1fr; }
  .method-pull { position: static; }
}
