/* Vitrel site. Static, no build step. See site/CLAUDE.md. */

/* ==========================================================================
   Tokens. The one place that mirrors DESIGN.md. When DESIGN.md changes,
   change it here; the demo window and palette code read these variables.
   ========================================================================== */
:root {
  /* Brand (DESIGN.md §4) */
  --ink: #141414;
  --ground: #f2f1ee;
  --paper: #f7f6f3;
  --white: #ffffff;
  --menu-border: #dcd9d2;
  --separator: #ece9e4;
  --focus: #3a6ff2;
  --ink-2: #57554f;          /* secondary text on Ground, 6.6:1 */
  --ink-3: #75726b;          /* tertiary text on Ground, 4.6:1 */
  --rule: rgba(20, 20, 20, 0.12);

  /* Window anatomy (DESIGN.md §2): 7 + 30 + 6 + 32 + 7 = 82 pt of chrome */
  --vw-pad-top: 7px;         /* above the tab pills */
  --vw-tab-h: 30px;          /* tab pill height */
  --vw-gap: 6px;             /* pill bottom to address bar top */
  --vw-bar-h: 32px;          /* address bar row content */
  --vw-pad-bottom: 7px;      /* below the address bar */
  --vw-chrome-h: calc(var(--vw-pad-top) + var(--vw-tab-h) + var(--vw-gap) + var(--vw-bar-h) + var(--vw-pad-bottom));
  --vw-lights-inset: 16px;   /* traffic lights from the left edge */
  --vw-lights-gap: 20px;     /* traffic lights to the first tab */
  --vw-row2-pad-x: 10px;
  --vw-radius: 12px;         /* window corner */

  /* Tabs (DESIGN.md §6.1) */
  --tab-radius: 8px;
  --tab-gap: 4px;
  --tab-max: 232px;
  --tab-min: 120px;
  --newtab-size: 28px;
  --tab-font: 12px;

  /* Toolbar (DESIGN.md §6.2, §6.3) */
  --btn: 30px;
  --btn-radius: 7px;
  --glyph: 16px;
  --bar-radius: 9px;
  --bar-margin: 8px;
  --bar-pad: 12px;
  --bar-font: 13px;

  /* Palette mixes (DESIGN.md §3.3): percent of fg mixed into the page color */
  --mix-pill-light: 7;  --mix-pill-dark: 9;
  --mix-field-light: 5; --mix-field-dark: 7;
  --mix-hover-light: 9; --mix-hover-dark: 11;
  --mix-press-light: 12; --mix-press-dark: 14;

  /* Motion (DESIGN.md §8) */
  --t-hover: 100ms;
  --t-tab: 150ms;
  --t-menu: 120ms;
  --t-tint: 260ms;           /* smooth color change between pages and while scrolling */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-inout: cubic-bezier(0.45, 0, 0.2, 1);

  /* Site type */
  --font-display: "Instrument Sans", "Instrument Fallback", system-ui, sans-serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-serif: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
  --page-x: clamp(20px, 5vw, 72px);
  --win-h: min(680px, 78vh);
}

@font-face {
  font-family: "Instrument Sans";
  src: url("/assets/fonts/instrument-sans-var.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* Metric-matched fallback so the swap to Instrument Sans doesn't move anything. */
@font-face {
  font-family: "Instrument Fallback";
  src: local("Arial");
  size-adjust: 104.3%;
  ascent-override: 93%;
  descent-override: 24%;
  line-gap-override: 0%;
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--ground);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font: 400 17px/1.55 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg, canvas { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--white);
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.display {
  font-family: var(--font-display);
  font-weight: 620;
  font-size: clamp(44px, 6.2vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.display-2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.eyebrow, .kicker {
  font-size: 13px;
  font-weight: 560;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

/* ==========================================================================
   Nav
   ========================================================================== */
.nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px var(--page-x);
}
.nav-mark img { height: 30px; width: auto; }
.nav-status {
  font-size: 13px;
  color: var(--ink-2);
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: max(640px, 100svh);
  display: grid;
  align-items: center;
  padding: 120px var(--page-x) 80px;
  overflow: hidden;
  isolation: isolate;
}

.hero-gl {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;       /* sized and placed by hero.js; zero until then so nothing shifts */
  height: 0;
  z-index: -1;
  pointer-events: none;
}

.hero-fallback {
  position: absolute;
  z-index: -1;
  width: min(34vw, 420px);
  height: auto;
  right: 12%;
  top: 50%;
  transform: translateY(-46%);
  filter: drop-shadow(0 40px 40px rgba(20, 20, 20, 0.18));
}
.has-gl .hero-fallback { display: none; }

.hero-copy {
  max-width: min(640px, 45vw); /* the orb starts at 53% of the width; keep the copy clear of it */
  display: grid;
  gap: 22px;
}
.display .line { display: block; }
.lede {
  font-size: clamp(18px, 1.35vw, 21px);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 31em;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 6px;
}
.button {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
  font-weight: 540;
  font-size: 16px;
  text-decoration: none;
  transition: transform 160ms var(--ease-out), background-color 160ms;
}
.button:hover { background: #2b2b2b; }
.button:active { transform: scale(0.98); }
.status { font-size: 15px; color: var(--ink-2); }

/* ==========================================================================
   Demo: a pinned Vitrel window with chapters scrolling beside it
   ========================================================================== */
.demo {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  column-gap: clamp(32px, 5vw, 80px);
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 var(--page-x);
}

.demo-stage {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  top: calc((100vh - var(--win-h)) / 2);
  height: var(--win-h);
  align-self: start;
  z-index: 2;
}
.vwin-slot { height: 100%; }
.noscript { padding: 40px; color: var(--ink-2); }

.chapters {
  grid-column: 1;
  grid-row: 1;
  padding: 24vh 0 36vh;
}
.chapter {
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.chapter p:not(.kicker) { color: var(--ink-2); max-width: 26em; text-wrap: pretty; }
.chapter .hint { font-size: 14px; color: var(--ink-3); }
.js .chapter { opacity: 0.28; transition: opacity 500ms var(--ease-out); }
.js .chapter.is-active { opacity: 1; }

/* ==========================================================================
   The Vitrel window (shared by the demo)
   ========================================================================== */
.vwin {
  --chrome: #ffffff;
  --fg: #1d1d1f;
  --fg2: #6b6962;
  --fg3: #b3b0a8;
  --pill: #f0f0f0;
  --field: #f4f4f4;
  --hover: #e9e9e9;
  --pressed: #e2e2e2;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-radius: var(--vw-radius);
  overflow: hidden;
  background: var(--chrome);
  color: var(--fg);
  font-family: var(--font-ui);
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.22),
    0 1px 1px rgba(0, 0, 0, 0.04),
    0 22px 48px -18px rgba(20, 20, 20, 0.34),
    0 60px 120px -40px rgba(20, 20, 20, 0.30);
  transition: background-color var(--t-tint) var(--ease-inout), color var(--t-tint) var(--ease-inout);
  user-select: none;
  -webkit-user-select: none;
  contain: layout paint;
}

.vwin-chrome {
  flex: none;
  height: var(--vw-chrome-h);
  padding-top: var(--vw-pad-top);
  padding-bottom: var(--vw-pad-bottom);
  display: grid;
  grid-template-rows: var(--vw-tab-h) var(--vw-bar-h);
  row-gap: var(--vw-gap);
}

.vwin-row1 {
  display: flex;
  align-items: center;
  min-width: 0;
  padding-right: 12px;
}
.lights {
  flex: none;
  display: inline-flex;
  gap: 8px;
  padding-left: var(--vw-lights-inset);
  margin-right: var(--vw-lights-gap);
}
.lights i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.14);
}
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }

.tabs {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--tab-gap);
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: var(--vw-tab-h);
  padding: 0 8px 0 12px;
  border: 0;
  border-radius: var(--tab-radius);
  background: transparent;
  color: var(--fg2);
  font-size: var(--tab-font);
  line-height: 1;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  width: var(--tab-w, var(--tab-max));
  transition:
    background-color var(--t-hover) var(--ease-out),
    color var(--t-tint) var(--ease-inout);
}
.tab:hover { background: var(--hover); }
.tab.is-active {
  background: var(--pill);
  color: var(--fg);
  cursor: default;
  transition:
    background-color var(--t-tint) var(--ease-inout),
    color var(--t-tint) var(--ease-inout);
}
.tab-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent);
  mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent);
}
.tab-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  color: var(--fg2);
  opacity: 0;
  transition: opacity var(--t-hover), color var(--t-tint) var(--ease-inout);
}
.tab-close svg { width: 9px; height: 9px; }
.tab.is-active .tab-close { opacity: 1; }

.newtab {
  flex: none;
  display: grid;
  place-items: center;
  width: var(--newtab-size);
  height: var(--newtab-size);
  margin-left: var(--tab-gap);
  color: var(--fg2);
  transition: color var(--t-tint) var(--ease-inout);
}
.newtab svg { width: 14px; height: 14px; }

.fav {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  overflow: hidden;
}
.fav svg { width: 16px; height: 16px; }

.vwin-row2 {
  display: flex;
  align-items: center;
  padding: 0 var(--vw-row2-pad-x);
  min-width: 0;
}
.tbtn {
  flex: none;
  display: grid;
  place-items: center;
  width: var(--btn);
  height: var(--btn);
  border-radius: var(--btn-radius);
  color: var(--fg);
  transition: color var(--t-tint) var(--ease-inout);
}
.tbtn svg { width: var(--glyph); height: var(--glyph); }
.tbtn.is-disabled { color: var(--fg3); }

.field {
  position: relative;
  flex: 1;
  min-width: 0;
  height: var(--vw-bar-h);
  margin: 0 var(--bar-margin);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 var(--bar-pad);
  border-radius: var(--bar-radius);
  background: var(--field);
  font-size: var(--bar-font);
  transition: background-color var(--t-tint) var(--ease-inout);
}
.field-icon { flex: none; width: 13px; height: 13px; color: var(--fg2); transition: color var(--t-tint) var(--ease-inout); }
.field-text {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.field-host { color: var(--fg); transition: color var(--t-tint) var(--ease-inout); }
.field-path { color: var(--fg2); transition: color var(--t-tint) var(--ease-inout); }

.vwin-page {
  position: relative;
  flex: 1;
  min-height: 0;
  background: var(--chrome);
}
.page {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  user-select: text;
  -webkit-user-select: text;
}
.page::-webkit-scrollbar { display: none; }
.page[hidden] { display: none; }

/* New tab page (DESIGN.md §6.7) */

/* ==========================================================================
   Sections: shared head and method notes
   ========================================================================== */
.why, .blocking, .tint {
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(96px, 14vh, 150px) var(--page-x) 0;
}
.section-head { display: grid; gap: 14px; max-width: 40em; }
.section-head > p:not(.kicker):not(.method) { color: var(--ink-2); text-wrap: pretty; }

/* Where a number came from: machine, test, date. Always next to the number. */
.method {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-3);
  max-width: 48em;
  text-wrap: pretty;
}

/* ==========================================================================
   Why it's efficient: four reasons, each with its status and its number
   ========================================================================== */
.reasons {
  list-style: none;
  margin: clamp(36px, 6vh, 60px) 0 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.reason {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) minmax(220px, 300px);
  grid-template-areas: "status body fig";
  gap: 14px 40px;
  align-items: start;
  padding: 34px 0 38px;
  border-bottom: 1px solid var(--rule);
}
.reason-status {
  grid-area: status;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-top: 6px;
  font-size: 13px;
  font-weight: 560;
  color: var(--ink-2);
}
.reason-n { font-family: var(--font-mono); font-weight: 400; color: var(--ink-3); }
.reason-body { grid-area: body; display: grid; gap: 12px; max-width: 34em; }
.reason h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(23px, 2vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.reason-body > p:not(.method) { color: var(--ink-2); text-wrap: pretty; }
.reason-fig {
  grid-area: fig;
  display: grid;
  justify-items: end;
  gap: 8px;
  text-align: right;
}
.reason-fig strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(44px, 4.6vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.reason-fig span { font-size: 14px; color: var(--ink-2); }
.reason-fig.is-coming strong { color: var(--ink-3); }

/* ==========================================================================
   Blocking, measured: Spike B page loads (docs/spikes/B-filterkit.md)
   ========================================================================== */
.blocking { --dot-off: #86827b; --x-max: 6400; --db-host: 104px; --db-val: 116px; --db-pad: 10px; --db-gap: 14px; }

.blocking-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px 64px;
}
.bk-stat { display: grid; justify-items: end; gap: 6px; text-align: right; }
.bk-stat-label { font-size: 13px; font-weight: 560; color: var(--ink-2); }
.bk-stat-fig {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(56px, 6vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.bk-stat-from { font-size: 15px; color: var(--ink-2); }

.bk-card {
  margin-top: clamp(32px, 5vh, 48px);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 0 0 1px var(--rule), 0 24px 48px -32px rgba(20, 20, 20, 0.22);
}
.bk-times, .bk-reqs { padding: 26px clamp(18px, 2.2vw, 30px) 24px; min-width: 0; }
.bk-reqs { border-left: 1px solid var(--separator); }

.bk-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 16px;
}
.bk-panel-title { font-size: 15px; font-weight: 600; white-space: nowrap; }
.bk-legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); }
.bk-legend span { display: inline-flex; align-items: center; gap: 7px; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.key-on, .key-loaded { background: var(--ink); }
.key-off { background: var(--dot-off); }
.key-blocked { box-shadow: inset 0 0 0 1.5px var(--ink-3); }

/* Dumbbell: one row per site, load time with the blocker off (grey) and on (ink). Positions
   come straight from the numbers in the markup, so the chart draws without JavaScript. */
.db { list-style: none; margin: 0; padding: 0; }
.db-row {
  --row-bg: var(--white);
  width: 100%;
  height: 40px;
  display: grid;
  grid-template-columns: var(--db-host) minmax(0, 1fr) var(--db-val);
  grid-template-areas: "host track val";
  align-items: center;
  gap: var(--db-gap);
  padding: 0 var(--db-pad);
  border: 0;
  border-radius: 9px;
  background: var(--row-bg);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background-color var(--t-hover) var(--ease-out);
}
.db-row:hover { --row-bg: #f7f6f3; }
.db-row[aria-pressed="true"] { --row-bg: var(--ground); cursor: default; }
.db-row[aria-pressed="true"] .db-host { font-weight: 600; }
.db-host { grid-area: host; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-val {
  grid-area: val;
  text-align: right;
  white-space: nowrap;
  font-size: 13px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.db-track {
  --grid: #e7e5e0;
  grid-area: track;
  position: relative;
  align-self: stretch;
  background:
    linear-gradient(var(--grid), var(--grid)) 0 0 / 1px 100% no-repeat,
    linear-gradient(var(--grid), var(--grid)) 31.25% 0 / 1px 100% no-repeat,
    linear-gradient(var(--grid), var(--grid)) 62.5% 0 / 1px 100% no-repeat,
    linear-gradient(var(--grid), var(--grid)) 93.75% 0 / 1px 100% no-repeat;
}
.db-line {
  position: absolute;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  left: calc(min(var(--off), var(--on)) / var(--x-max) * 100%);
  width: calc((max(var(--off), var(--on)) - min(var(--off), var(--on))) / var(--x-max) * 100%);
  background: rgba(20, 20, 20, 0.2);
  border-radius: 1px;
}
.db-dot {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--row-bg);
  transition: box-shadow var(--t-hover) var(--ease-out);
}
.db-off { left: calc(var(--off) / var(--x-max) * 100%); background: var(--dot-off); }
.db-on { left: calc(var(--on) / var(--x-max) * 100%); background: var(--ink); }
.db-axis {
  position: relative;
  height: 18px;
  margin: 8px calc(var(--db-pad) + var(--db-gap) + var(--db-val)) 0 calc(var(--db-pad) + var(--db-gap) + var(--db-host));
  font-size: 12px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.db-axis span { position: absolute; left: calc(var(--at) / var(--x-max) * 100%); transform: translateX(-50%); white-space: nowrap; }
.db-axis span:first-child { transform: none; }

/* Waffle: one dot per request for the chosen site, drawn by blocking.js into a fixed grid. */
.waffle { display: block; width: 100%; height: auto; aspect-ratio: 24 / 16; overflow: visible; }
.waffle circle {
  fill: var(--ink);
  stroke: rgba(117, 114, 107, 0);
  stroke-width: 1.4px;
  vector-effect: non-scaling-stroke;
  opacity: 0;
  transition: fill 240ms var(--ease-out), stroke 240ms var(--ease-out), opacity 240ms var(--ease-out);
}
.waffle .l { opacity: 1; }
.waffle .b { opacity: 1; fill: rgba(20, 20, 20, 0); stroke: var(--ink-3); }
.no-waffle .waffle { display: none; }

.bk-reqs-sum { margin-top: 16px; min-height: 3em; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.bk-reqs-sum strong { color: var(--ink); font-weight: 600; }
.bk-method { margin-top: 20px; }

.bk-table { margin-top: 14px; font-size: 14px; }
.bk-table summary { width: fit-content; cursor: pointer; color: var(--ink-2); font-weight: 540; }
.bk-table summary:hover { color: var(--ink); }
.bk-table-scroll { overflow-x: auto; margin-top: 12px; }
.bk-table table { border-collapse: collapse; min-width: 560px; font-variant-numeric: tabular-nums; }
.bk-table th, .bk-table td {
  padding: 8px 16px;
  border-bottom: 1px solid var(--rule);
  text-align: right;
  font-weight: 400;
  white-space: nowrap;
}
.bk-table thead th { font-size: 13px; font-weight: 560; color: var(--ink-2); }
.bk-table th:first-child { padding-left: 0; text-align: left; }
.bk-table tfoot th, .bk-table tfoot td { font-weight: 600; border-bottom: 0; }
.muted { color: var(--ink-3); }

/* ==========================================================================
   Tint: a secondary section ahead of the pinned demo window
   ========================================================================== */
.tint { padding-bottom: 0; }
.tint + .demo .chapters { padding-top: 14vh; }

/* ==========================================================================
   Closing, footer
   ========================================================================== */
.closing {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
  padding: clamp(120px, 22vh, 220px) var(--page-x) clamp(100px, 18vh, 180px);
}
.closing-mark { width: 64px; height: 64px; margin-bottom: 10px; }
.closing p { color: var(--ink-2); }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 28px var(--page-x) 36px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--ink-3);
}
.foot-note { flex: 1 1 18em; text-align: center; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }

/* Reveal on scroll: CSS scroll-driven where supported, IntersectionObserver otherwise. */
@supports (animation-timeline: view()) {
  .reveal {
    animation: reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 28%;
  }
}
@supports not (animation-timeline: view()) {
  .js .reveal { opacity: 0; transform: translateY(14px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
  .js .reveal.in { opacity: 1; transform: none; }
}
@keyframes reveal {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   Small screens
   ========================================================================== */
@media (max-width: 900px) {
  :root { --win-h: min(520px, 54svh); }
  .hero { min-height: 0; align-items: end; padding-top: calc(80px + min(78vw, 390px)); padding-bottom: 72px; }
  .hero-fallback { right: 50%; top: 23svh; width: min(52vw, 260px); transform: translate(50%, -50%); }
  .hero-copy { max-width: 640px; }
  .demo { grid-template-columns: minmax(0, 1fr); padding: 0 16px; }
  /* The window pins to the top; chapters scroll up from below and pass behind it. */
  .demo-stage {
    grid-column: 1;
    top: 0;
    height: calc(var(--win-h) + 40px);
    padding: 10px 0 30px;
    background: linear-gradient(var(--ground) calc(100% - 30px), rgba(242, 241, 238, 0));
  }
  .chapters { grid-column: 1; grid-row: 2; padding: 4vh 4px 30svh; }
  .tint + .demo .chapters { padding-top: 4vh; }
  .chapter { min-height: 64svh; justify-content: flex-start; padding-top: 8px; }
  .tint { padding-bottom: 36px; }

  .reason {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "status fig" "body body";
    gap: 18px 20px;
    padding: 28px 0 32px;
  }
  .reason-fig strong { font-size: clamp(38px, 10vw, 56px); }
  .reason-fig span { font-size: 13px; }

  .blocking-head { grid-template-columns: minmax(0, 1fr); }
  .bk-stat { justify-items: start; text-align: left; }
  .bk-card { grid-template-columns: minmax(0, 1fr); }
  .bk-reqs { border-left: 0; border-top: 1px solid var(--separator); }
}

@media (max-width: 560px) {
  .blocking { --db-pad: 8px; }
  .db-row {
    height: 58px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "host val" "track track";
    grid-template-rows: 20px 18px;
    align-content: center;
    row-gap: 4px;
  }
  .db-axis { margin: 6px var(--db-pad) 0; }
  .bk-table { font-size: 13px; }
  .bk-table table { min-width: 0; width: 100%; }
  .bk-table th, .bk-table td { padding: 8px 0 8px 10px; }
  .bk-table th, .bk-table td { white-space: normal; }
  .bk-table td { white-space: nowrap; }
  .bk-table thead th { font-size: 12px; line-height: 1.3; }
  .foot-note { order: 3; flex-basis: 100%; text-align: left; }
}

@media (max-width: 560px) {
  .nav { padding-top: 18px; }
  .nav-mark img { height: 26px; }
  .lights { padding-left: 12px; margin-right: 12px; gap: 6px; }
  .lights i { width: 10px; height: 10px; }
  .tbtn.is-optional { display: none; }
}

/* ==========================================================================
   Reduced motion: calm and static
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  .reveal { animation: none !important; opacity: 1 !important; transform: none !important; }
}
