/* =====================================================================
   SALIENCE — design system (SPEC §8)
   Black absolute. Bone text. One saturated colour: alert red, reserved
   for the score and attention states. Space Grotesk + Space Mono.
   Monochrome discipline — atmosphere from texture, not colour.
   ===================================================================== */

:root {
  /* palette */
  --bg:        #060607;
  --surface-1: #0d0d0f;
  --surface-2: #16161a;
  --surface-3: #1f1f25;
  --line:      #26262c;
  --line-soft: #1b1b20;
  --bone:      #e9e9ec;
  --muted:     #74747e;
  --muted-dim: #4a4a52;
  --alert:     #ff2b2b;
  --alert-dim: #7a1414;

  /* type */
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Space Mono", ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;

  /* metrics */
  --maxw: 1240px;
  --radius: 4px;
  --radius-lg: 8px;
  --gap: 18px;
  --header-h: 96px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --heat: var(--muted); /* per-item override for score colour */
}

/* ---------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--bone);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input, select, button { font-family: inherit; }
ol, ul { list-style: none; padding: 0; }

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

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

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  background: var(--alert); color: #fff; padding: 8px 14px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; transform: translateY(-160%);
  transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------------------------------------------------------------- atmosphere */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 1; }
.fx-scanlines {
  background-image: repeating-linear-gradient(
    to bottom, rgba(255,255,255,.018) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay; opacity: .5;
}
.fx-grain {
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.fx-vignette {
  background: radial-gradient(120% 90% at 50% -10%, transparent 55%, rgba(0,0,0,.55) 100%);
}

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 14px clamp(16px, 4vw, 40px) 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--bone); }
.brand-mark { color: var(--bone); flex: none; }
.brand-mark-peak { fill: var(--alert); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-weight: 700; font-size: 20px; letter-spacing: .01em;
}
.brand-tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--muted); margin-top: 3px;
}

.header-nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); }
.nav-link {
  font-size: 14px; font-weight: 500; color: var(--muted);
  padding: 6px 2px; border-bottom: 1px solid transparent; transition: color .18s, border-color .18s;
}
.nav-link:hover { color: var(--bone); border-color: var(--alert); }

.lang-toggle { display: inline-flex; align-items: center; gap: 7px; }
.lang-btn {
  font-family: var(--font-mono); font-size: 13px; font-weight: 700; letter-spacing: .05em;
  color: var(--muted-dim); padding: 3px 5px; border-radius: 3px; transition: color .18s;
}
.lang-btn:hover { color: var(--bone); }
.lang-btn[aria-pressed="true"] { color: var(--bone); }
.lang-btn[aria-pressed="true"]::after {
  content: ""; display: block; height: 2px; margin-top: 2px;
  background: var(--alert); border-radius: 2px;
}
.lang-sep { color: var(--muted-dim); font-family: var(--font-mono); }

.hud {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px) 8px;
  display: flex; gap: 18px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .18em;
  color: var(--muted-dim); text-transform: uppercase;
}
.hud-cell { position: relative; }
.hud-cell::before { content: "·"; margin-right: 18px; color: var(--line); }
.hud-cell:first-child::before { content: none; }
.hud-clock { color: var(--muted); }

/* ---------------------------------------------------------------- layout */
main {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 40px) 0;
}

.hero { max-width: 760px; margin-bottom: clamp(30px, 5vw, 52px); }
.hero-kicker {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .28em;
  text-transform: uppercase; color: var(--alert); margin-bottom: 18px;
}
.hero-title {
  font-size: clamp(28px, 5.2vw, 50px); font-weight: 600; line-height: 1.08;
  letter-spacing: -.02em; text-wrap: balance;
}
.hero-sub {
  margin-top: 18px; font-size: clamp(15px, 2vw, 18px); color: var(--muted);
  max-width: 620px;
}
.hero-disclaimer {
  margin-top: 22px; display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 15px;
}
.hero-disclaimer .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--alert); flex: none;
  box-shadow: 0 0 8px var(--alert);
}

/* ---- workbench grid ---- */
.workbench {
  display: grid; grid-template-columns: 1fr; gap: clamp(20px, 3vw, 34px);
  align-items: start; padding-bottom: 80px;
}
@media (min-width: 940px) {
  .workbench { grid-template-columns: 330px 1fr; }
  .controls { position: sticky; top: calc(var(--header-h) + 12px); }
}

/* ---------------------------------------------------------------- panels */
.controls { display: flex; flex-direction: column; gap: 16px; }
.panel {
  background: linear-gradient(180deg, var(--surface-1), var(--surface-1) 60%, #0b0b0d);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: clip;
}
.panel-summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 17px; cursor: pointer; list-style: none; user-select: none;
}
.panel-summary::-webkit-details-marker { display: none; }
.panel-title { font-size: 15px; font-weight: 600; letter-spacing: .01em; }
.panel-title.sm {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted); font-weight: 700;
  padding: 15px 17px 0;
}
.chevron {
  width: 9px; height: 9px; border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted); transform: rotate(45deg);
  transition: transform .25s var(--ease); flex: none; margin-right: 3px;
}
details[open] .chevron { transform: rotate(-135deg); }
.panel-body { padding: 0 17px 18px; }
.panel-hint, .share-hint {
  font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-bottom: 16px;
}
.share-hint { margin: 9px 0 0; font-size: 11.5px; }

/* ---- sliders ---- */
.sliders { display: flex; flex-direction: column; gap: 13px; }
.slider {
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  gap: 4px 10px;
}
.slider-head {
  grid-column: 1 / -1; display: flex; align-items: baseline;
  justify-content: space-between; gap: 8px;
}
.slider-name {
  font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px;
}
.slider-info {
  font-family: var(--font-mono); font-size: 10px; color: var(--muted-dim);
  border: 1px solid var(--line); border-radius: 50%; width: 15px; height: 15px;
  display: inline-grid; place-items: center; cursor: help; flex: none;
}
.slider-info:hover { color: var(--bone); border-color: var(--muted); }
.slider-val {
  font-family: var(--font-mono); font-size: 14px; font-weight: 700;
  min-width: 30px; text-align: right; color: var(--bone);
  font-variant-numeric: tabular-nums;
}
.slider-val.neg { color: var(--alert); }
.slider input[type="range"] {
  grid-column: 1 / -1; -webkit-appearance: none; appearance: none;
  width: 100%; height: 22px; background: transparent; cursor: pointer;
}
.slider input[type="range"]::-webkit-slider-runnable-track {
  height: 3px; border-radius: 3px;
  background: linear-gradient(to right, var(--alert-dim), var(--line) 50%, var(--surface-3));
}
.slider input[type="range"]::-moz-range-track {
  height: 3px; border-radius: 3px; background: var(--surface-3);
}
.slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; margin-top: -7px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bone); border: 3px solid var(--bg);
  box-shadow: 0 0 0 1px var(--line);
  transition: background .15s, box-shadow .15s;
}
.slider input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bone); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--line);
}
.slider input[type="range"]:hover::-webkit-slider-thumb,
.slider input[type="range"]:focus-visible::-webkit-slider-thumb {
  background: var(--alert); box-shadow: 0 0 0 1px var(--alert), 0 0 12px var(--alert-dim);
}
.slider input[type="range"]:hover::-moz-range-thumb { background: var(--alert); }

/* ---- buttons ---- */
.weights-actions { display: flex; gap: 9px; margin-top: 18px; }
.btn {
  font-size: 13px; font-weight: 600; padding: 10px 14px; border-radius: var(--radius);
  border: 1px solid var(--line); transition: all .16s var(--ease); white-space: nowrap;
}
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--bone); border-color: var(--muted); }
.btn-share {
  flex: 1; color: var(--bone); background: var(--surface-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.btn-share:hover { border-color: var(--alert); background: var(--surface-3); }
.btn-share.copied { border-color: var(--alert); color: var(--alert); }

/* ---- threshold ---- */
.threshold-row {
  margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 11px; flex-wrap: wrap;
}
.threshold-count strong {
  font-family: var(--font-mono); font-size: 26px; font-weight: 700; color: var(--alert);
  font-variant-numeric: tabular-nums; line-height: 1;
}
.threshold-label {
  font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px;
}
.threshold-input {
  width: 52px; background: var(--bg); border: 1px solid var(--line);
  color: var(--bone); font-family: var(--font-mono); font-size: 13px;
  padding: 5px 7px; border-radius: var(--radius); text-align: center;
}
.threshold-input:focus-visible { border-color: var(--alert); outline: none; }

/* ---- presets ---- */
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 17px 17px; }
.preset {
  font-size: 12.5px; font-weight: 500; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
  transition: all .15s var(--ease);
}
.preset:hover { color: var(--bone); border-color: var(--muted); }
.preset[aria-pressed="true"] {
  color: var(--bone); border-color: var(--alert);
  background: color-mix(in srgb, var(--alert) 12%, transparent);
}

/* ---- filters ---- */
.filter-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 11px; padding: 13px 17px 18px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted-dim);
}
.select {
  background: var(--bg); border: 1px solid var(--line); color: var(--bone);
  font-size: 13px; padding: 8px 9px; border-radius: var(--radius); width: 100%;
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2374747e' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; padding-right: 26px;
}
.select:focus-visible { border-color: var(--alert); outline: none; }
.select:hover { border-color: var(--muted-dim); }

/* ---------------------------------------------------------------- ranking */
.ranking-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line-soft);
}
.counter { font-size: 14px; color: var(--bone); }
.counter strong { color: var(--bone); font-variant-numeric: tabular-nums; }
.counter .accent { color: var(--alert); font-family: var(--font-mono); font-weight: 700; }
.counter-sub {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted-dim);
}

.ranking { display: flex; flex-direction: column; gap: 9px; }
.case {
  --pad: clamp(14px, 2.4vw, 20px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px; align-items: center;
  background: var(--surface-1); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--pad);
  cursor: pointer; position: relative; overflow: hidden;
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
  text-align: left; width: 100%;
}
.case::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--heat); opacity: .8;
}
.case:hover {
  border-color: color-mix(in srgb, var(--heat) 55%, var(--line));
  background: var(--surface-2); transform: translateY(-1px);
}
.case:focus-visible { outline: 2px solid var(--alert); outline-offset: 2px; }

/* rank + score block (the hero) */
.case-score { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 64px; }
.case-rank {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em;
  color: var(--muted-dim); font-variant-numeric: tabular-nums;
}
.case-score-num {
  font-family: var(--font-mono); font-weight: 700; font-size: clamp(30px, 5vw, 40px);
  line-height: .92; color: var(--heat); font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px color-mix(in srgb, var(--heat) 30%, transparent);
}
.case-heatbar {
  width: 42px; height: 3px; border-radius: 3px; margin-top: 3px;
  background: var(--line);
}
.case-heatbar > i { display: block; height: 100%; border-radius: 3px; background: var(--heat); }

/* main column */
.case-main { min-width: 0; }
.case-code {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted);
  letter-spacing: .02em; margin-bottom: 5px; word-break: break-all;
}
.case-title {
  font-size: 15.5px; font-weight: 500; line-height: 1.32; color: var(--bone);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.case-meta {
  margin-top: 9px; display: flex; flex-wrap: wrap; gap: 7px 14px;
  font-size: 12px; color: var(--muted);
}
.case-meta .m { display: inline-flex; align-items: center; gap: 5px; }
.case-meta .m::before {
  content: ""; width: 3px; height: 3px; border-radius: 50%; background: var(--muted-dim);
}

/* honesty-of-scope note on text-less media cards (SPEC §4 — secondary, inherited tokens, no new palette) */
.case-medianote {
  margin-top: 9px; display: flex; align-items: baseline; gap: 7px;
  font-size: 11.5px; line-height: 1.4; color: var(--muted);
}
.case-medianote::before {
  content: ""; flex: none; width: 5px; height: 5px;
  border: 1px solid var(--muted-dim); border-radius: 1px; transform: translateY(-1px);
}

/* signal sparkline */
.spark { display: flex; align-items: flex-end; gap: 3px; height: 30px; }
.spark-bar {
  width: 5px; background: var(--muted-dim); border-radius: 1.5px;
  min-height: 2px; transition: height .2s var(--ease);
}
.spark-bar.is-explained { background: var(--alert-dim); }
.spark-bar[data-on="3"] { background: var(--muted); }
.spark-bar.is-explained[data-on="3"] { background: var(--alert); }

/* badges */
.case-side { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.badge {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em;
  text-transform: uppercase; padding: 3px 7px; border-radius: 3px;
  border: 1px solid var(--line); color: var(--muted);
}
.badge.type-vid { color: var(--bone); border-color: var(--muted-dim); }
.badge.type-img { color: var(--bone); border-color: var(--muted-dim); }
.badge.redacted { color: var(--alert); border-color: var(--alert-dim); }

.empty-state {
  text-align: center; padding: 60px 20px; color: var(--muted);
  font-size: 15px; border: 1px dashed var(--line); border-radius: var(--radius-lg);
}

/* ---------------------------------------------------------------- modal */
.modal-root, .method-root { position: fixed; inset: 0; z-index: 150; }
.modal-backdrop, .method-backdrop {
  position: absolute; inset: 0; background: rgba(2,2,3,.74);
  backdrop-filter: blur(3px); animation: fade .2s var(--ease);
}
.modal {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: min(560px, 100%); background: var(--surface-1);
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  animation: slideIn .28s var(--ease);
  box-shadow: -30px 0 60px rgba(0,0,0,.5);
}
.modal-scroll, .method-scroll {
  overflow-y: auto; overscroll-behavior: contain; height: 100%;
  padding: clamp(22px, 4vw, 36px);
}
.modal-close {
  position: absolute; top: 14px; right: 16px; z-index: 2;
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  color: var(--muted); font-size: 20px; line-height: 1; display: grid; place-items: center;
  background: var(--surface-1); transition: all .15s;
}
.modal-close:hover { color: var(--bone); border-color: var(--alert); }

.m-head { margin-bottom: 22px; padding-right: 40px; }
.m-code {
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
  word-break: break-all; margin-bottom: 8px;
}
.m-title { font-size: 21px; font-weight: 600; line-height: 1.22; letter-spacing: -.01em; }
.m-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }

.m-scoreline {
  display: flex; align-items: center; gap: 16px; margin: 4px 0 24px;
  padding: 16px 18px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.m-scoreline .big {
  font-family: var(--font-mono); font-weight: 700; font-size: 46px; line-height: 1;
  color: var(--heat); font-variant-numeric: tabular-nums;
  text-shadow: 0 0 22px color-mix(in srgb, var(--heat) 30%, transparent);
}
.m-scoreline .lbl {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--muted);
}
.m-scoreline .rankbig { font-size: 13px; color: var(--muted); }

.m-section { margin: 26px 0; }
.m-section h3 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft);
}

/* breakdown table */
.breakdown { width: 100%; border-collapse: collapse; font-size: 13px; }
.breakdown th {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted-dim); font-weight: 400; text-align: right; padding: 0 0 9px; border-bottom: 1px solid var(--line-soft);
}
.breakdown th:first-child { text-align: left; }
.breakdown td { padding: 9px 0; border-bottom: 1px solid var(--line-soft); text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.breakdown td:first-child { text-align: left; font-family: var(--font-display); color: var(--bone); }
.breakdown .intensity-cell { color: var(--muted); }
.breakdown .contrib.pos { color: var(--bone); }
.breakdown .contrib.neg { color: var(--alert); }
.breakdown .contrib.zero { color: var(--muted-dim); }
.breakdown tfoot td {
  border-bottom: none; border-top: 1px solid var(--line); padding-top: 12px;
  font-weight: 700; font-size: 15px;
}
.breakdown tfoot td.total-val { color: var(--heat); }

.m-desc { font-size: 14.5px; line-height: 1.62; color: #c9c9cf; }
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.m-meta-item { display: flex; flex-direction: column; gap: 3px; }
.m-meta-item .k {
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted-dim);
}
.m-meta-item .v { font-size: 14px; color: var(--bone); }

.m-source {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 4px;
  padding: 11px 16px; border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 13.5px; font-weight: 600; color: var(--bone); transition: all .16s;
}
.m-source:hover { border-color: var(--alert); background: var(--surface-2); }
.m-source .arrow { color: var(--alert); }
.m-note {
  font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 4px;
  padding: 11px 14px; border-left: 2px solid var(--alert-dim); background: var(--bg); border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------------------------------------------------------------- methodology */
.method {
  position: absolute; inset: 0; margin: auto;
  max-width: 860px; max-height: 100%;
  background: var(--surface-1);
  animation: fadeUp .3s var(--ease);
}
@media (min-width: 760px) {
  .method { inset: clamp(20px, 4vh, 50px) auto; left: 50%; transform: translateX(-50%);
    border: 1px solid var(--line); border-radius: var(--radius-lg); width: 90%; }
}
.method-close {
  position: sticky; top: 0; z-index: 2; display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--muted);
  padding: 16px clamp(22px, 4vw, 44px); width: 100%;
  background: color-mix(in srgb, var(--surface-1) 92%, transparent);
  backdrop-filter: blur(6px); border-bottom: 1px solid var(--line-soft);
}
.method-close:hover { color: var(--bone); }
.method-scroll { padding: clamp(8px, 2vw, 20px) clamp(22px, 4vw, 44px) clamp(40px, 6vw, 64px); }

.method h1 {
  font-size: clamp(28px, 5vw, 42px); font-weight: 600; letter-spacing: -.02em; margin: 18px 0 12px;
}
.method .lead { font-size: clamp(15px, 2vw, 18px); color: var(--muted); max-width: 60ch; margin-bottom: 12px; }
.method h2 {
  font-size: 22px; font-weight: 600; margin: 40px 0 16px; letter-spacing: -.01em;
  padding-top: 22px; border-top: 1px solid var(--line-soft);
}
.method p { color: #c4c4cb; line-height: 1.66; margin-bottom: 14px; max-width: 68ch; }
.method p + p { margin-top: -4px; }

.formula {
  font-family: var(--font-mono); font-size: 15px; color: var(--bone);
  background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--alert);
  padding: 16px 20px; border-radius: var(--radius); margin: 18px 0; display: block;
}
.sig-list { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 4px; }
.sig-item { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.sig-item .sig-name { font-weight: 600; font-size: 14px; }
.sig-item .sig-name.is-penalty { color: var(--alert); }
.sig-item .sig-desc { color: var(--muted); font-size: 13.5px; line-height: 1.55; }
@media (max-width: 580px) { .sig-item { grid-template-columns: 1fr; gap: 4px; } }

.scale-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 11px; margin: 16px 0; }
.scale-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--bg); }
.scale-card .num { font-family: var(--font-mono); font-size: 24px; font-weight: 700; color: var(--bone); }
.scale-card .lab { font-weight: 600; font-size: 13.5px; margin-top: 6px; }
.scale-card .dsc { color: var(--muted); font-size: 12.5px; margin-top: 3px; }

/* TODAY / FUTURE ruler */
.ruler { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0; }
@media (max-width: 640px) { .ruler { grid-template-columns: 1fr; } }
.ruler-col { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; background: var(--bg); }
.ruler-col.today { border-color: color-mix(in srgb, var(--alert) 30%, var(--line)); }
.ruler-col h4 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.ruler-col.today h4 { color: var(--bone); }
.ruler-col.future h4 { color: var(--muted); }
.ruler-col h4 .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--alert); box-shadow: 0 0 8px var(--alert); }
.ruler-col li {
  font-size: 13.5px; line-height: 1.5; padding: 9px 0 9px 22px; position: relative;
  border-bottom: 1px solid var(--line-soft); color: #c4c4cb;
}
.ruler-col li:last-child { border-bottom: none; }
.ruler-col.today li::before { content: "✓"; position: absolute; left: 0; color: var(--alert); font-size: 12px; top: 9px; }
.ruler-col.future li { color: var(--muted); }
.ruler-col.future li::before {
  content: ""; position: absolute; left: 0; top: 15px; width: 11px; height: 1px; background: var(--muted-dim);
}
.future-tag {
  display: inline-block; font-family: var(--font-mono); font-size: 9px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted-dim); border: 1px solid var(--line);
  border-radius: 3px; padding: 2px 6px; margin-left: 8px; vertical-align: middle;
}

.callout {
  border: 1px solid var(--line); border-left: 3px solid var(--alert); border-radius: var(--radius);
  padding: 16px 20px; margin: 14px 0; background: var(--bg);
}
.callout li { padding: 7px 0; color: #c4c4cb; font-size: 14px; line-height: 1.55; border-bottom: 1px solid var(--line-soft); }
.callout li:last-child { border-bottom: none; }
.callout li strong { color: var(--bone); }

/* ---------------------------------------------------------------- footer */
.site-footer {
  position: relative; z-index: 2; border-top: 1px solid var(--line-soft);
  max-width: var(--maxw); margin: 0 auto; padding: 36px clamp(16px, 4vw, 40px) 56px;
}
.footer-disclaimer { font-size: 13px; color: var(--muted); max-width: 80ch; line-height: 1.6; }
.footer-prov { font-size: 12px; color: var(--muted-dim); max-width: 80ch; margin-top: 12px; line-height: 1.6; }
.footer-meta {
  margin-top: 18px; display: flex; gap: 18px; flex-wrap: wrap; align-items: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; color: var(--muted-dim);
}
.footer-meta a { color: var(--muted); border-bottom: 1px solid transparent; }
.footer-meta a:hover { color: var(--bone); border-color: var(--alert); }

/* ---------------------------------------------------------------- animations */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { transform: translateX(20px); opacity: .4; } to { transform: translateX(0); opacity: 1; } }
@media (min-width: 760px) {
  @keyframes fadeUp { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
}

.reveal { animation: caseIn .4s var(--ease) both; }
@keyframes caseIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .fx-scanlines { display: none; }
}
