/* =========================================================================
   Spooky, but True — design tokens follow the Pawp design system
   (Aeonik Pro; Digital purple ramp; radius-sm 14 / radius-lg 24).
   Deliberately single-theme: an observatory at night.
   ========================================================================= */

:root {
  color-scheme: dark;

  /* grounds */
  --ink: #0E0C2C;
  --bg: #161345;            /* Digital 00 — background-inverse */
  --bg-deep: #141424;       /* Pawp Black */
  --amethyst: #13133D;
  --surface: #1E1B45;       /* card on dark */
  --surface-2: #252159;
  --surface-3: #2E2A6B;
  --line: #2C2863;
  --line-soft: #211E48;

  /* text */
  --text: #FFFFFF;
  --text-2: #D8D8FF;        /* Digital 05 */
  --text-3: #B9B8FC;        /* Digital 04 */
  --muted: #8E8CCB;
  --faint: #5D5A9A;

  /* accents (Digital ramp) */
  --d01: #352F87;
  --d02: #6057C7;
  --d03: #8786EE;
  --d04: #B9B8FC;
  --d05: #D8D8FF;
  --accent: #8786EE;

  /* semantic */
  --good: #04C790;
  --good-ink: #7BF0CB;
  --warn: #FBA82D;
  --warn-ink: #FFD08A;
  --bad: #E72323;
  --bad-ink: #FF9C9C;

  /* chapter identities (Pawp accent palettes) */
  --ch-quantum: #8786EE;
  --ch-matter: #F8AA34;
  --ch-time: #5296E8;
  --ch-cosmos: #FF68A0;
  --ch-life: #65AA3A;
  --ch-mind: #FF7763;
  --ch-myths: #E72323;
  --ch-watch: #FBA82D;

  --r-sm: 14px;
  --r-lg: 24px;
  --gutter: 16px;
  --maxw: 1224px;

  --font: "Aeonik Pro", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html { scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 22px;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--d04); text-decoration-color: color-mix(in srgb, var(--d04) 45%, transparent); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--d04); outline-offset: 3px; border-radius: 6px; }
button { font: inherit; color: inherit; }
img, canvas, svg { max-width: 100%; }
h1, h2, h3, h4 { text-wrap: balance; margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }

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

/* ============================ controls ============================ */

.viz { display: grid; gap: 16px; min-width: 0; }
.viz-stage {
  position: relative;
  border-radius: var(--r-sm);
  background: var(--ink);
  border: 1px solid var(--line-soft);
  overflow: hidden;
  touch-action: pan-y;
}
.viz-stage > canvas { display: block; width: 100%; height: 100%; }
.viz-stage.is-grab { cursor: grab; }
.viz-controls { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: flex-end; }
.viz-readouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.viz-note { font-size: 13px; line-height: 18px; color: var(--muted); letter-spacing: 0; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; line-height: 18px; color: var(--text-3); letter-spacing: 0; }
.viz-legend .lg { display: inline-flex; align-items: center; gap: 7px; }
.viz-legend .lg-swatch { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.viz-legend .lg-swatch.is-line { width: 16px; height: 2px; border-radius: 2px; }

.ctl { min-width: 0; }
.ctl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.ctl-head label, .ctl-label { font-size: 13px; line-height: 18px; color: var(--text-3); letter-spacing: 0; }
.ctl-val { font-size: 14px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: 0; white-space: nowrap; }
.ctl-hint { font-size: 12px; line-height: 16px; color: var(--muted); margin-top: 6px; letter-spacing: 0; }
.ctl-slider { flex: 1 1 220px; }

input[type="range"] {
  --p: 50%;
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 6px;
  background: linear-gradient(to right, var(--d03) 0 var(--p), var(--surface-3) var(--p) 100%);
}
input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: var(--surface-3); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--d03); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; margin-top: -8px; border-radius: 50%;
  background: var(--text); border: 4px solid var(--d02);
  box-shadow: 0 0 0 4px rgba(135, 134, 238, .18);
  transition: transform .15s var(--ease);
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--text); border: 4px solid var(--d02);
}
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--d04); }

.ctl-switch {
  display: inline-flex; align-items: center; gap: 10px;
  background: none; border: 0; padding: 6px 0; cursor: pointer;
  font-size: 14px; color: var(--text-2); letter-spacing: 0;
}
.ctl-switch .sw {
  width: 40px; height: 24px; border-radius: 999px; background: var(--surface-3);
  position: relative; transition: background .2s var(--ease); flex: none;
}
.ctl-switch .sw::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--text-3); transition: transform .2s var(--ease), background .2s;
}
.ctl-switch[aria-checked="true"] .sw { background: var(--d02); }
.ctl-switch[aria-checked="true"] .sw::after { transform: translateX(16px); background: var(--text); }

.seg {
  display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
}
.seg button {
  border: 0; background: transparent; color: var(--text-3); cursor: pointer;
  font-size: 14px; line-height: 18px; letter-spacing: 0; padding: 7px 14px; border-radius: 999px;
  transition: background .18s var(--ease), color .18s;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--amethyst); font-weight: 500; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 9px 18px; border-radius: var(--r-sm);
  font-size: 15px; line-height: 20px; font-weight: 500; letter-spacing: .01em;
  cursor: pointer; border: 1px solid transparent; text-decoration: none; white-space: nowrap;
  transition: background .18s var(--ease), border-color .18s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn-primary { background: var(--d01); color: #fff; border-color: #463FA8; }
.btn-primary:hover { background: var(--d02); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--d03); color: var(--text); }
.btn-quiet { background: var(--surface-2); color: var(--text-2); }
.btn-quiet:hover { background: var(--surface-3); color: var(--text); }
.btn-inverse { background: #fff; color: var(--amethyst); }
.btn-inverse:hover { background: var(--d05); color: var(--amethyst); }

.readout {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 10px 12px; min-width: 0;
}
.ro-label { font-size: 12px; line-height: 16px; color: var(--muted); letter-spacing: 0; }
.ro-value { font-size: 20px; line-height: 26px; font-weight: 500; color: var(--text); letter-spacing: 0; margin-top: 2px; overflow-wrap: anywhere; }
.ro-sub { font-size: 12px; line-height: 16px; color: var(--text-3); letter-spacing: 0; margin-top: 2px; }
.ro-sub:empty { display: none; }
.readout.tone-good { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
.readout.tone-good .ro-value { color: var(--good-ink); }
.readout.tone-warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.readout.tone-warn .ro-value { color: var(--warn-ink); }
.readout.tone-bad { border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); }
.readout.tone-bad .ro-value { color: var(--bad-ink); }
.readout.tone-accent .ro-value { color: var(--d04); }

/* ============================ error bars ============================ */

.eb { margin: 0; display: grid; gap: 6px; }
.eb-head { position: relative; height: 18px; }
.eb-reflabel {
  position: absolute; top: 0; transform: translateX(6px); white-space: nowrap;
  font-size: 12px; line-height: 16px; color: var(--text-3); letter-spacing: 0;
}
.eb-reflabel.is-left { transform: translateX(calc(-100% - 6px)); }
.eb-plot { position: relative; display: grid; gap: 4px; padding: 4px 0; }
.eb-ref { position: absolute; top: -24px; bottom: 0; width: 0; border-left: 1px dashed var(--faint); }
.eb-ref.tone-good { border-left: 1px solid color-mix(in srgb, var(--good) 70%, transparent); }
.eb-ref.tone-warn { border-left: 1px solid color-mix(in srgb, var(--warn) 70%, transparent); }
.eb-ref.tone-accent { border-left: 1px solid var(--d03); }
.eb-band { position: absolute; top: 0; bottom: 0; background: rgba(135, 134, 238, .08); border-radius: 4px; }
.eb-band.tone-bad { background: rgba(231, 35, 35, .10); }
.eb-band.tone-good { background: rgba(4, 199, 144, .09); }
.eb-band.tone-warn { background: rgba(251, 168, 45, .09); }
.eb-band span { position: absolute; bottom: 4px; left: 8px; font-size: 11px; line-height: 13px; color: var(--muted); letter-spacing: 0; }
.eb-row { position: relative; display: grid; gap: 4px; }
.eb-label { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; line-height: 18px; color: var(--text-3); letter-spacing: 0; position: relative; z-index: 1; }
.eb-label b { font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.eb-track { position: relative; height: 16px; }
.eb-track::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--line-soft); border-radius: 2px; }
.eb-whisker { position: absolute; top: 5px; height: 6px; border-radius: 3px; background: var(--d03); opacity: .9; }
.eb-whisker.is-total { top: 7px; height: 2px; background: var(--d04); opacity: .55; }
.eb-dot { position: absolute; top: 2px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 2px var(--ink); }
.eb-row.tone-good .eb-whisker { background: var(--good); }
.eb-row.tone-warn .eb-whisker { background: var(--warn); }
.eb-row.tone-bad .eb-whisker { background: var(--bad); }
.eb-row.tone-muted .eb-whisker { background: var(--faint); }
.eb-axis { position: relative; height: 18px; border-top: 1px solid var(--line); }
.eb-axis span { position: absolute; top: 4px; transform: translateX(-50%); font-size: 11px; line-height: 13px; color: var(--muted); letter-spacing: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.eb-axis span:first-child { transform: none; }
.eb-axis span:last-child { transform: translateX(-100%); }
.eb-unit { font-size: 12px; line-height: 16px; color: var(--muted); letter-spacing: 0; text-align: right; }

/* ============================ sigma meter ============================ */

.sg { display: grid; gap: 6px; }
.sg-head { display: flex; justify-content: space-between; font-size: 13px; line-height: 18px; color: var(--text-3); letter-spacing: 0; }
.sg-head b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.sg-track { position: relative; height: 8px; border-radius: 8px; background: var(--surface-3); }
.sg-fill, .sg-range { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 8px; background: var(--d03); }
.sg-fill.tone-good, .sg-range.tone-good { background: var(--good); }
.sg-fill.tone-warn, .sg-range.tone-warn { background: var(--warn); }
.sg-range { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.18) 0 3px, transparent 3px 7px); }
.sg-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--text-3); border-radius: 2px; }
.sg-mark.is-5 { background: var(--text); }
.sg-scale { position: relative; height: 14px; }
.sg-scale span { position: absolute; transform: translateX(-50%); font-size: 11px; line-height: 13px; color: var(--muted); white-space: nowrap; letter-spacing: 0; }

/* =========================================================================
   Page layout
   ========================================================================= */

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: 24px; }
@media (max-width: 640px) { .wrap { padding-inline: var(--gutter); } }

.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: #fff; color: var(--amethyst); padding: 10px 14px; border-radius: 10px; font-weight: 500; text-decoration: none; }
.skip:focus { top: 12px; }

.overline {
  font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--d04);
}
.mono { font-family: var(--mono); letter-spacing: 0; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(14, 12, 44, .78);
  -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid rgba(44, 40, 99, .7);
}
.topbar-in { max-width: var(--maxw); margin: 0 auto; padding-inline: 24px; min-height: 60px; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 500; font-size: 17px; white-space: nowrap; }
.brand svg { width: 24px; height: 24px; flex: none; }
.chapnav { flex: 1; min-width: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 92%, transparent); mask-image: linear-gradient(to right, #000 92%, transparent); }
.chapnav::-webkit-scrollbar { display: none; }
.chapnav a {
  flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 999px;
  font-size: 14px; line-height: 18px; color: var(--text-3); text-decoration: none; letter-spacing: 0;
  transition: background .2s, color .2s;
}
.chapnav a i { width: 7px; height: 7px; border-radius: 50%; background: var(--hue, var(--d03)); }
.chapnav a:hover, .chapnav a.is-active { color: #fff; background: var(--surface-2); }
.search-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 8px 7px 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text-3); font-size: 14px; line-height: 18px; cursor: pointer; letter-spacing: 0;
}
.search-btn:hover { border-color: var(--d02); color: #fff; }
.search-btn svg { width: 16px; height: 16px; }
.search-btn kbd { font-family: var(--mono); font-size: 12px; line-height: 16px; padding: 1px 6px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); }
.progress { height: 2px; }
.progress i { display: block; height: 100%; width: 0; background: var(--prog, var(--d03)); transition: background-color .4s; }
@media (max-width: 900px) {
  .topbar-in { flex-wrap: wrap; row-gap: 0; padding-inline: 16px; }
  .brand { flex: 1; min-height: 52px; }
  .chapnav { order: 3; flex-basis: 100%; padding-bottom: 8px; }
  .search-btn kbd { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: calc(128px + env(safe-area-inset-top, 0px)) 0 56px;
  background: radial-gradient(80% 70% at 78% 30%, rgba(96, 87, 199, .22), transparent 70%), var(--ink);
  border-bottom: 1px solid var(--line-soft);
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background: linear-gradient(90deg, rgba(14,12,44,.96) 0%, rgba(14,12,44,.86) 34%, rgba(14,12,44,.15) 62%, rgba(14,12,44,0) 100%);
}
.hero-in { position: relative; z-index: 2; display: grid; gap: 28px; }
.hero-copy { max-width: 600px; display: grid; gap: 20px; }
.hero h1 { font-size: 52px; line-height: 56px; font-weight: 700; letter-spacing: 0; }
.hero h1 em { font-style: italic; font-weight: 400; color: var(--d04); }
.hero-dek { font-size: 18px; line-height: 165%; color: var(--text-2); letter-spacing: 0; max-width: 34em; }
.hero-dek strong { color: #fff; font-weight: 500; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.screen-tag {
  position: absolute; z-index: 2; right: 24px; top: calc(96px + env(safe-area-inset-top, 0px));
  display: grid; gap: 2px; text-align: right; font-size: 12px; line-height: 16px; color: var(--muted); letter-spacing: 0;
}
.screen-tag b { font-family: var(--mono); font-weight: 500; color: var(--text-2); font-size: 13px; }

.live { display: grid; gap: 12px; margin-top: 8px; }
.live-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.live-head p { font-size: 13px; line-height: 18px; color: var(--muted); letter-spacing: 0; }
.live-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.live-tile {
  display: grid; gap: 4px; align-content: start; padding: 14px 16px; border-radius: var(--r-sm);
  background: rgba(30, 27, 69, .72); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: inherit; text-decoration: none; transition: border-color .2s, transform .2s var(--ease);
}
.live-tile:hover { border-color: var(--d02); transform: translateY(-2px); color: inherit; }
.live-k { font-size: 12px; line-height: 16px; color: var(--text-3); letter-spacing: 0; display: flex; align-items: center; gap: 8px; }
.live-k i { width: 8px; height: 8px; border-radius: 50%; background: var(--hue); flex: none; }
.live-v { font-size: 24px; line-height: 32px; font-weight: 500; color: #fff; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-s { font-size: 12px; line-height: 16px; color: var(--muted); letter-spacing: 0; }
.live-tile.flash { animation: tileflash 1.2s var(--ease); }
@keyframes tileflash { 0% { border-color: #fff; box-shadow: 0 0 0 4px rgba(248,170,52,.35), 0 0 40px rgba(248,170,52,.35); } 100% { border-color: var(--line); box-shadow: none; } }
@media (max-width: 980px) { .live-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .hero { padding-top: calc(132px + env(safe-area-inset-top, 0px)); }
  .hero h1 { font-size: 34px; line-height: 40px; }
  .hero-dek { font-size: 16px; }
  .hero::before { background: linear-gradient(180deg, rgba(14,12,44,.55) 0%, rgba(14,12,44,.9) 45%, rgba(14,12,44,.96) 100%); }
  .screen-tag { display: none; }
  .live-v { font-size: 18px; line-height: 24px; }
  .live-tile { padding: 12px; }
}

/* ---------- intro strip: how to read + fresh ---------- */
.intro { padding-block: 56px 24px; display: grid; gap: 40px; }
.howto { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.howto-item { display: grid; gap: 10px; align-content: start; padding: 20px; border-radius: var(--r-lg); border: 1px solid var(--line); }
.howto-item h3 { font-size: 17px; line-height: 22px; font-weight: 700; }
.howto-item p { font-size: 15px; line-height: 155%; color: var(--text-3); letter-spacing: 0; }
.howto-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.layers-demo { display: grid; gap: 8px; counter-reset: layer; }
.layers-demo > span { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: baseline; font-size: 14px; line-height: 20px; color: var(--text-2); letter-spacing: 0; }
.layers-demo > span b { font-family: var(--mono); font-weight: 500; font-size: 12px; color: var(--muted); }
@media (max-width: 900px) { .howto { grid-template-columns: 1fr; } }

.fresh { display: grid; gap: 14px; }
.fresh-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.fresh-head h2 { font-size: 22px; line-height: 28px; font-weight: 500; letter-spacing: .01em; }
.fresh-head p { font-size: 14px; color: var(--muted); letter-spacing: 0; }
.fresh-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.fresh-chip {
  flex: none; scroll-snap-align: start; display: grid; gap: 4px; min-width: 200px; max-width: 240px; padding: 14px 16px;
  border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; cursor: pointer; text-align: left;
  transition: border-color .2s, transform .2s var(--ease);
}
.fresh-chip:hover { border-color: var(--hue); transform: translateY(-2px); color: inherit; }
.fresh-chip small { display: flex; align-items: center; gap: 7px; font-size: 12px; line-height: 16px; color: var(--muted); letter-spacing: 0; }
.fresh-chip small i { width: 7px; height: 7px; border-radius: 50%; background: var(--hue); }
.fresh-chip span { font-size: 15px; line-height: 20px; color: var(--text); letter-spacing: 0; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border-radius: 999px;
  font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: var(--surface-2); color: var(--text-2); white-space: nowrap;
}
.badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--d03); flex: none; }
.badge.st-checked i { background: var(--good); }
.badge.st-corrected i, .badge.st-framing i { background: var(--warn); }
.badge.st-literature i { background: var(--d03); }
.ref { font-family: var(--mono); font-size: 12px; line-height: 16px; color: var(--muted); letter-spacing: 0; }

/* ---------- chapters ---------- */
.chapter { position: relative; padding-block: 88px 24px; }
.chapter::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 520px; pointer-events: none; z-index: -1;
  background: radial-gradient(50% 60% at 12% 0%, color-mix(in srgb, var(--hue) 16%, transparent), transparent 70%);
}
.ch-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px 48px; align-items: start; margin-bottom: 40px; }
.ch-title { position: sticky; top: 100px; }
.ch-over { display: flex; align-items: center; gap: 10px; }
.ch-over i { width: 10px; height: 10px; border-radius: 50%; background: var(--hue); box-shadow: 0 0 16px var(--hue); }
.ch-title { display: grid; gap: 14px; }
.ch-head h2 { font-size: 44px; line-height: 50px; font-weight: 700; letter-spacing: 0; }
.ch-dek { font-size: 18px; line-height: 165%; color: var(--text-2); letter-spacing: 0; max-width: 36em; }
.ch-index { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-top: 1px solid var(--line); }
.ch-index li { border-bottom: 1px solid var(--line-soft); }
.ch-index a { display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; align-items: baseline; padding: 7px 2px; font-size: 14px; line-height: 20px; color: var(--text-3); text-decoration: none; letter-spacing: 0; }
.ch-index a:hover { color: #fff; }
.ch-index .ref { font-size: 11px; }
.ch-index .ix-play { font-size: 11px; line-height: 16px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.ch-index .ix-play svg { width: 10px; height: 10px; }
@media (max-width: 900px) {
  .ch-head { grid-template-columns: 1fr; }
  .ch-head h2 { font-size: 28px; line-height: 34px; }
  .ch-dek { font-size: 16px; }
  .ch-index { display: none; }
  .chapter { padding-top: 64px; }
}

.ch-body { display: grid; gap: 20px; }
.run { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.run > .card { grid-column: span 2; }
.run > .card.s3 { grid-column: span 3; }
.run > .card.s6 { grid-column: span 6; }
@media (max-width: 1080px) {
  .run > .card, .run > .card.s3 { grid-column: span 3; }
  .run > .card.odd-last { grid-column: span 6; }
}
@media (max-width: 700px) { .run { grid-template-columns: 1fr; } .run > .card, .run > .card.s3, .run > .card.s6 { grid-column: auto; } }

/* ---------- experiment panel ---------- */
.exp {
  --hue: var(--d03);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 36px;
  padding: 28px; border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(37, 33, 89, .55), rgba(30, 27, 69, .9) 40%), var(--surface);
  border: 1px solid var(--line);
  scroll-margin-top: 96px;
}
.exp.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.exp.flip > .exp-copy { order: 2; }
.exp-copy { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.exp-stage { min-width: 0; min-height: 380px; }
.exp-stage.is-loading { display: grid; place-items: center; border-radius: var(--r-sm); background: var(--ink); color: var(--muted); font-size: 13px; }
.meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.exp-title { font-size: 28px; line-height: 34px; font-weight: 500; letter-spacing: .01em; }
.exp-hook { font-size: 18px; line-height: 165%; color: var(--text-2); letter-spacing: 0; }
.fig { display: grid; gap: 2px; padding-block: 4px; }
.fig-value { font-size: 34px; line-height: 41px; font-weight: 500; letter-spacing: .01em; color: #fff; }
.fig-label { font-size: 13px; line-height: 18px; color: var(--muted); letter-spacing: 0; max-width: 30em; }
.exp-body { font-size: 15px; line-height: 155%; color: var(--text-3); letter-spacing: 0; }
.callout { display: grid; grid-template-columns: 20px 1fr; gap: 2px 10px; align-items: start; }
.callout svg { width: 18px; height: 18px; margin-top: 1px; }
.callout-k { font-size: 11px; line-height: 16px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bad-ink); }
.callout p { grid-column: 2; font-size: 14px; line-height: 150%; color: var(--text-2); letter-spacing: 0; }
.callout.is-fix .callout-k { color: var(--warn-ink); }
.callout.is-argued .callout-k { color: var(--d04); }
.more {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: auto;
  padding: 9px 14px; border-radius: var(--r-sm); border: 1px solid var(--line); background: transparent;
  color: var(--text); font-size: 14px; line-height: 18px; letter-spacing: 0; cursor: pointer; transition: border-color .2s, background .2s;
}
.more:hover { border-color: var(--d03); background: var(--surface-2); }
.more svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.more:hover svg { transform: translateX(3px); }
@media (max-width: 1000px) {
  .exp, .exp.flip { grid-template-columns: 1fr; gap: 24px; }
  .exp.flip > .exp-copy { order: 0; }
  .exp-stage { min-height: 300px; }
}
@media (max-width: 640px) {
  .exp { padding: 18px 16px; margin-inline: -4px; }
  .exp-title { font-size: 22px; line-height: 28px; }
  .exp-hook { font-size: 16px; }
  .fig-value { font-size: 28px; line-height: 34px; }
}

/* ---------- compact card ---------- */
.card {
  position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0;
  padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  transition: border-color .2s, transform .25s var(--ease), background .2s;
  scroll-margin-top: 96px;
}
.card:hover { border-color: color-mix(in srgb, var(--hue) 55%, var(--line)); transform: translateY(-3px); }
.card h3 { font-size: 20px; line-height: 26px; font-weight: 700; letter-spacing: 0; }
.card .hook { font-size: 15px; line-height: 155%; color: var(--text-2); letter-spacing: 0; }
.card .fig-value { font-size: 28px; line-height: 34px; }
.card .chart { margin-top: 4px; }
.card-not { font-size: 13px; line-height: 18px; color: var(--muted); letter-spacing: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-not b { color: var(--bad-ink); font-weight: 700; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; margin-right: 4px; }
.card-foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-open {
  background: none; border: 0; padding: 0; cursor: pointer; color: var(--d04); font-size: 14px; line-height: 18px; letter-spacing: 0;
  display: inline-flex; align-items: center; gap: 6px;
}
.card-open::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-lg); }
.card-open svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.card:hover .card-open svg { transform: translateX(3px); }
.card:focus-within { border-color: var(--d03); }
.card.s6 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 40px; }
.card.s6 > * { grid-column: 1; }
.card.s6 > .chart, .card.s6 > .fig { grid-column: 2; }
.card.s6 > .fig { grid-row: 1 / span 3; align-self: start; }
.card.s6 > .chart { grid-row: 4 / span 3; }
@media (max-width: 700px) { .card.s6 { display: flex; } .card { padding: 18px; } }

.flash-target { animation: flashtarget 1.8s var(--ease); }
@keyframes flashtarget { 0%, 30% { box-shadow: 0 0 0 3px var(--d04), 0 0 60px rgba(135,134,238,.4); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* mini charts in cards */
.split { display: grid; gap: 8px; }
.split-bar { display: flex; gap: 2px; height: 14px; }
.split-bar i { display: block; height: 100%; border-radius: 4px; }
.split-bar i.tone-accent { background: var(--d03); min-width: 6px; }
.split-bar i.tone-muted { background: var(--surface-3); }
.split-legend { display: grid; gap: 4px; font-size: 12px; line-height: 16px; color: var(--text-3); letter-spacing: 0; }
.split-legend span { display: flex; align-items: center; gap: 8px; }
.split-legend i { width: 9px; height: 9px; border-radius: 3px; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; gap: 5px; }
.bar-row .bl { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; line-height: 16px; color: var(--text-3); letter-spacing: 0; }
.bar-row .bl b { color: #fff; font-weight: 500; font-variant-numeric: tabular-nums; }
.bar-row .bt { height: 10px; border-radius: 0 4px 4px 0; background: var(--d03); }
.bar-row .bt.tone-muted { background: var(--faint); }
.spectrum { display: grid; gap: 6px; }
.spectrum-strip { height: 16px; border-radius: 6px; background: linear-gradient(90deg, #6a00c8, #2600ff 12%, #0090ff 26%, #00e0c0 38%, #19e000 48%, #d8ef00 60%, #ffb000 70%, #ff4a00 82%, #d00000 100%); }
.spectrum-row { display: flex; align-items: center; gap: 10px; font-size: 12px; line-height: 16px; color: var(--text-3); letter-spacing: 0; }
.spectrum-row i { width: 28px; height: 16px; border-radius: 5px; background: #ff00ff; flex: none; }

/* ---------- drawer ---------- */
dialog { color: var(--text); }
.drawer {
  margin: 0 0 0 auto; padding: 0; border: 0; width: min(660px, 100vw); height: 100dvh; max-height: 100dvh; max-width: 100vw;
  background: var(--bg); border-left: 1px solid var(--line); overflow: hidden;
}
.drawer::backdrop { background: rgba(8, 6, 30, .62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.drawer[open] { animation: drawerin .32s var(--ease); display: flex; flex-direction: column; }
@keyframes drawerin { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 20px 14px; border-bottom: 1px solid var(--line-soft); flex: none;
}
.drawer-top .meta { gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-2); cursor: pointer; flex: none;
}
.icon-btn:hover { color: #fff; border-color: var(--d02); }
.icon-btn svg { width: 16px; height: 16px; }
.drawer-body { overflow-y: auto; padding: 24px 28px calc(28px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 22px; align-content: start; flex: 1; overscroll-behavior: contain; }
.drawer-body h2 { font-size: 28px; line-height: 34px; font-weight: 500; letter-spacing: .01em; }
.drawer-body .hook { font-size: 18px; line-height: 165%; color: var(--text-2); letter-spacing: 0; }
.dsec { display: grid; gap: 8px; }
.dsec h4 { font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dsec p, .dsec li { font-size: 15px; line-height: 155%; color: var(--text-2); letter-spacing: 0; }
.dsec ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.dsec li::marker { color: var(--d03); }
.dsec.is-not h4 { color: var(--bad-ink); }
.dsec.is-fix h4 { color: var(--warn-ink); }
.dsec.is-argued h4 { color: var(--d04); }
.dsec.boxed { padding: 16px 18px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.src-list { list-style: none; padding: 0 !important; }
.src-list li { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px !important; line-height: 20px !important; }
.src-list li:last-child { border-bottom: 0; }
.src-list a { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.drawer-nav { display: flex; justify-content: space-between; gap: 12px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line-soft); flex: none; }
.drawer-nav button { max-width: 48%; }
.drawer-nav button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer-jump { font-size: 14px; }
@media (max-width: 640px) { .drawer-body { padding: 20px 16px 28px; } .drawer-body h2 { font-size: 22px; line-height: 28px; } }

/* ---------- search ---------- */
.search {
  margin: calc(72px + env(safe-area-inset-top, 0px)) auto auto; padding: 0; border: 1px solid var(--line); border-radius: var(--r-lg);
  width: min(640px, calc(100vw - 32px)); max-height: min(70vh, 640px); background: var(--bg); overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.search[open] { display: flex; flex-direction: column; animation: drawerin2 .2s var(--ease); }
@keyframes drawerin2 { from { transform: translateY(-8px); opacity: 0; } }
.search::backdrop { background: rgba(8, 6, 30, .6); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.search-field { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.search-field svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.search-field input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: #fff; font: inherit; font-size: 17px; }
.search-field input::placeholder { color: var(--faint); }
.search-results { list-style: none; margin: 0; padding: 8px; overflow-y: auto; display: grid; gap: 2px; }
.search-results button {
  width: 100%; text-align: left; display: grid; grid-template-columns: 10px 1fr auto; gap: 4px 12px; align-items: baseline;
  padding: 10px 12px; border-radius: 12px; border: 0; background: transparent; cursor: pointer;
}
.search-results button i { width: 8px; height: 8px; border-radius: 50%; background: var(--hue); align-self: center; }
.search-results button b { font-weight: 500; font-size: 15px; line-height: 20px; color: #fff; letter-spacing: 0; }
.search-results button span { grid-column: 2 / -1; font-size: 13px; line-height: 18px; color: var(--muted); letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-results button .ref { grid-column: 3; grid-row: 1; }
.search-results button[aria-selected="true"], .search-results button:hover { background: var(--surface-2); }
.search-empty { padding: 20px; color: var(--muted); font-size: 14px; }

/* ---------- sigma wall ---------- */
.band { padding-block: 96px; }
.band-head { display: grid; gap: 14px; max-width: 760px; margin-bottom: 36px; }
.band-head h2 { font-size: 44px; line-height: 50px; font-weight: 700; letter-spacing: 0; }
.band-head p { font-size: 18px; line-height: 165%; color: var(--text-2); letter-spacing: 0; }
@media (max-width: 900px) { .band { padding-block: 72px; } .band-head h2 { font-size: 28px; line-height: 34px; } .band-head p { font-size: 16px; } }

.sigwall { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 28px; display: grid; gap: 4px; }
.sw-grid { display: grid; grid-template-columns: minmax(180px, 300px) minmax(0, 1fr) 64px; column-gap: 20px; }
.sw-zones { grid-column: 2; position: relative; height: 26px; }
.sw-zones span { position: absolute; top: 0; font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.sw-grid > .sw-name, .sw-grid > .sw-track, .sw-grid > .sw-val { padding-block: 9px; border-top: 1px solid var(--line-soft); }
.sw-name { background: none; border: 0; text-align: left; cursor: pointer; padding-inline: 0; display: grid; gap: 1px; min-width: 0; }
.sw-name b { font-weight: 500; font-size: 14px; line-height: 19px; color: #fff; letter-spacing: 0; }
.sw-name span { font-size: 12px; line-height: 16px; color: var(--muted); letter-spacing: 0; }
.sw-name:hover b { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--d03); }
.sw-track { position: relative; }
.sw-track .z { position: absolute; top: 0; bottom: 0; }
.sw-track .z1 { background: rgba(251, 168, 45, .05); }
.sw-track .z2 { background: rgba(135, 134, 238, .07); }
.sw-track .z3 { background: rgba(4, 199, 144, .06); }
.sw-track .ln { position: absolute; top: 50%; left: 0; height: 2px; margin-top: -1px; border-radius: 2px; background: var(--surface-3); }
.sw-track .dt { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--hue); box-shadow: 0 0 0 2px var(--surface), 0 0 18px color-mix(in srgb, var(--hue) 60%, transparent); }
.sw-track .rg { position: absolute; top: 50%; height: 10px; margin-top: -5px; border-radius: 6px; background: var(--hue); opacity: .85; background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.25) 0 3px, transparent 3px 7px); }
.sw-track .thr { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.sw-val { font-size: 14px; line-height: 19px; font-weight: 500; color: #fff; text-align: right; font-variant-numeric: tabular-nums; align-self: center; letter-spacing: 0; }
.sw-axis { grid-column: 2; position: relative; height: 22px; border-top: 1px solid var(--line); }
.sw-axis span { position: absolute; top: 5px; transform: translateX(-50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sw-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 14px; }
@media (max-width: 760px) {
  .sigwall { padding: 18px 16px; }
  .sw-grid { grid-template-columns: minmax(0, 1fr) 52px; }
  .sw-zones, .sw-axis { grid-column: 1; }
  .sw-grid > .sw-track, .sw-grid > .sw-val { border-top: 0; padding-block: 0; }
  .sw-pad { display: none; }
  .sw-name { grid-column: 1 / -1; padding-top: 12px !important; border-top: 1px solid var(--line-soft) !important; }
  .sw-track { grid-column: 1; height: 26px; }
  .sw-val { grid-column: 2; }
}

/* ---------- myths + quiz ---------- */
.myths { background: var(--bg-deep); border-block: 1px solid var(--line-soft); }
.quiz {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 0; margin-bottom: 56px;
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface);
}
.quiz-main { padding: 32px; display: grid; gap: 22px; align-content: start; min-height: 300px; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 13px; color: var(--muted); letter-spacing: 0; }
.quiz-dots { display: flex; gap: 4px; flex-wrap: wrap; }
.quiz-dots i { width: 8px; height: 8px; border-radius: 3px; background: var(--surface-3); }
.quiz-dots i.ok { background: var(--good); }
.quiz-dots i.no { background: var(--bad); }
.quiz-dots i.cur { background: #fff; }
.quiz-q { font-size: 28px; line-height: 34px; font-weight: 500; letter-spacing: .01em; text-wrap: pretty; }
.quiz-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.quiz-actions .btn { min-width: 132px; min-height: 48px; font-size: 16px; }
.quiz-reveal { display: grid; gap: 10px; padding: 18px 20px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); }
.quiz-reveal h4 { font-size: 17px; line-height: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.quiz-reveal h4 svg { width: 20px; height: 20px; }
.quiz-reveal p { font-size: 15px; line-height: 155%; color: var(--text-2); letter-spacing: 0; }
.quiz-reveal .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.quiz-side { padding: 32px; background: linear-gradient(160deg, var(--d01), #221E63 60%); display: grid; gap: 14px; align-content: center; }
.quiz-score { font-size: 52px; line-height: 56px; font-weight: 700; }
.quiz-side p { font-size: 15px; line-height: 155%; color: var(--text-2); letter-spacing: 0; }
@media (max-width: 900px) {
  .quiz { grid-template-columns: 1fr; }
  .quiz-main, .quiz-side { padding: 22px 18px; }
  .quiz-q { font-size: 22px; line-height: 28px; }
  .quiz-main { min-height: 0; }
  .quiz-score { font-size: 40px; line-height: 44px; }
}

.myth-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.myth {
  display: grid; gap: 10px; align-content: start; padding: 20px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: rgba(30, 27, 69, .5);
}
.myth-k { display: flex; align-items: center; gap: 8px; font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--bad-ink); }
.myth-k svg { width: 14px; height: 14px; }
.myth s { font-size: 17px; line-height: 22px; color: var(--text-3); text-decoration-color: rgba(231, 35, 35, .8); text-decoration-thickness: 2px; }
.myth-r { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 11px; line-height: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--good-ink); }
.myth-r svg { width: 14px; height: 14px; }
.myth p { font-size: 15px; line-height: 155%; color: var(--text); letter-spacing: 0; }
.myth small { font-size: 12px; line-height: 16px; color: var(--muted); letter-spacing: 0; }
.myth .card-open { font-size: 13px; position: static; }
.myth .card-open::after { display: none; }

/* ---------- watchlist ---------- */
.watch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.watch-card { display: grid; gap: 14px; align-content: start; padding: 24px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); scroll-margin-top: 96px; }
.watch-card h3 { font-size: 22px; line-height: 28px; font-weight: 500; letter-spacing: .01em; }
.watch-card p { font-size: 15px; line-height: 155%; color: var(--text-3); letter-spacing: 0; }
.pill { justify-self: start; display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px; font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--d03); }
.pill.tone-warn i { background: var(--warn); }
.pill.tone-good i { background: var(--good); }
.pill.tone-bad i { background: var(--bad); }
@media (max-width: 900px) { .watch-grid { grid-template-columns: 1fr; } .watch-card { padding: 20px 18px; } }

/* ---------- corrections ---------- */
.fixes { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 0 32px; border-top: 1px solid var(--line); }
.fixrow { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.fixrow s { font-size: 14px; line-height: 20px; color: var(--muted); text-decoration-color: rgba(251,168,45,.7); letter-spacing: 0; }
.fixrow a { font-size: 15px; line-height: 21px; color: #fff; text-decoration: none; letter-spacing: 0; display: inline-flex; gap: 8px; align-items: baseline; }
.fixrow a::before { content: "→"; color: var(--warn); }
.fixrow a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 480px) { .fixes { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.foot { padding-block: 48px calc(48px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line-soft); background: var(--ink); }
.foot-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; }
.foot p { font-size: 13px; line-height: 18px; color: var(--muted); letter-spacing: 0; max-width: 60em; }
.foot .brand { font-size: 15px; }
@media (max-width: 700px) { .foot-in { grid-template-columns: 1fr; } }

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