/* =========================================================
   AI Lifter — concept marketing site
   Visual language: clinical white, an anatomy plate for a hero.
   Brand red and the circuit teal come straight from the launcher
   icon; teal marks everything the AI reads or says.
   System fonts only — no web-font fetch, nothing third-party.
   ========================================================= */
:root {
  --white: #ffffff;
  --tint: #f5f7f9;
  --ink: #0f1722;
  --ink-2: #3a4554;
  --muted: #6a7584;
  --hair: #e6eaef;
  --hair-2: #d5dbe2;

  --red: #d90e2b;          /* launcher icon red */
  --red-deep: #9d0420;     /* launcher icon shadow red */
  --red-tint: #fdeef0;
  --teal: #00b0a1;         /* launcher icon circuit teal */
  --teal-ink: #00857a;
  --teal-tint: #e3f6f4;

  /* the §14.4 status ramp, re-tuned for white */
  --st-under: #f0a3ae;
  --st-building: #e6627a;
  --st-in: var(--red);
  --st-over: var(--teal-ink);
  --st-counted: #a3acb7;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --radius: 14px;
  --gutter: max(20px, calc((100% - 1280px) / 2));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.08; }
p { margin: 0; }
b { font-weight: 650; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 6px; }

.spark { color: var(--teal); font-style: normal; }
.red { color: var(--red); }
.fine { font-size: 13px; color: var(--muted); }
.center { text-align: center; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 999px;
  font: 600 15px/1 var(--sans); text-decoration: none; letter-spacing: .01em;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s;
}
.btn .ico { width: 18px; height: 18px; }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 8px 22px -10px rgba(217, 14, 43, .7); }
.btn-red:hover { background: var(--red-deep); transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--hair-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-lg { padding: 17px 30px; font-size: 17px; }

/* ---------------- nav ---------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 12px var(--gutter);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}
.nav.scrolled { border-bottom-color: var(--hair); }
.wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 750; font-size: 18px; letter-spacing: -0.01em; text-decoration: none;
}
.wordmark img { display: block; }
.wordmark.small { font-size: 15px; gap: 8px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { font-size: 14px; color: var(--ink-2); text-decoration: none; }
.nav-links a:hover { color: var(--red); }

/* ---------------- hero ---------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 840px;
  align-items: center;
  gap: 40px;
  padding: 24px var(--gutter) 64px;
  /* faint ECG-paper grid — the hospital half of the brief */
  background-image:
    linear-gradient(rgba(217, 14, 43, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 14, 43, .045) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
}
.hero-copy { container-type: inline-size; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--teal-tint); color: var(--teal-ink);
  font: 600 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
}
.hero h1 { margin-top: 22px; font-size: 44px; font-size: clamp(34px, 11.2cqi, 60px); font-weight: 800; letter-spacing: -0.035em; }
.lede { margin-top: 20px; font-size: 17px; color: var(--ink-2); max-width: 34em; }
.lede b { color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 0; margin: 32px 0 0; padding: 0; list-style: none;
  border-top: 1px solid var(--hair); max-width: 460px;
}
.hero-meta li {
  flex: 1 1 0; padding: 14px 0 0; font-size: 13px; color: var(--muted);
}
.hero-meta li + li { padding-left: 14px; border-left: 1px solid var(--hair); margin-left: 14px; }
.hero-meta b { display: block; font: 700 24px/1.1 var(--mono); color: var(--ink); letter-spacing: -0.03em; }

/* ---------------- the plate (FIG. 01–02) ---------------- */
.plate {
  /* the specimen's height; everything on the plate is sized from it so it fits the fold */
  --H: clamp(400px, calc(100vh - 324px), 540px);
  margin: 0;
  background: #fff;
  border: 1px solid var(--hair);
  border-radius: 20px;
  box-shadow: 0 1px 0 rgba(15, 23, 34, .03), 0 30px 70px -38px rgba(15, 23, 34, .28);
  padding: 10px 18px 14px;
  container-type: inline-size;
}
.plate-head {
  display: flex; align-items: center; gap: 12px;
  padding: 2px 2px 10px; border-bottom: 1px solid var(--hair);
  font: 600 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.fig-no { color: var(--red); }

/* the showcase strip: one pictogram per exercise, the playing one in red with its progress */
.ex-strip { margin-left: auto; display: flex; gap: 2px; }
.ex-btn {
  position: relative; width: 34px; height: 34px; padding: 3px;
  border: 0; border-radius: 8px; background: none; color: #9aa3ae; cursor: pointer;
  transition: color .2s, background-color .2s;
}
/* real <img>, not a CSS mask — mask-image url() is CORS-blocked under file:// */
.ex-ico {
  display: block; width: 100%; height: 100%; object-fit: contain;
  opacity: .5; transition: opacity .2s, filter .2s;
}
.ex-btn:hover { background: var(--tint); }
.ex-btn:hover .ex-ico { opacity: .85; }
.ex-btn[aria-pressed="true"] { background: var(--red-tint); box-shadow: inset 0 0 0 1px rgba(217, 14, 43, .3); }
.ex-btn[aria-pressed="true"] .ex-ico { opacity: 1; }
.ex-prog {
  position: absolute; left: 6px; right: 6px; bottom: 2px; height: 2px; border-radius: 1px;
  background: var(--red); transform-origin: left; transform: scaleX(0); opacity: 0;
}
.ex-btn[aria-pressed="true"] .ex-prog { opacity: 1; }
.plate.is-static .ex-prog { opacity: 0; }
.loop-btn {
  width: 34px; height: 34px; padding: 6px; margin-left: 4px;
  border: 1px solid var(--hair-2); border-radius: 50%; background: #fff; color: var(--ink-2); cursor: pointer;
  transition: border-color .2s, color .2s;
}
.loop-btn:hover { border-color: var(--ink); color: var(--ink); }
.loop-btn svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.loop-btn[data-state="playing"] .i-play,
.loop-btn[data-state="paused"] .i-pause { display: none; }

.plate-body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  margin-top: 6px;
}

/* the specimen holds both views. Each pane shows its figure cropped to x 14–86 % of the
   source, so a frame (the whole 2:3 image) is 1/1.44 of the specimen wide and pokes out
   either side; the outer edges fade so the fingertip data points dissipate */
.specimen {
  position: relative;
  height: var(--H);
  height: min(var(--H), calc((100cqi - 286px) / .96));
  aspect-ratio: 24 / 25;
  overflow: hidden;
  overflow: clip;
  z-index: 1;
}
.frame { position: absolute; top: 0; bottom: 0; width: 69.444%; }
.frame-a {
  left: -9.722%; z-index: 2;
  -webkit-mask-image: linear-gradient(90deg, transparent 13.5%, #000 19%, #000 86.9%, transparent 87%);
  mask-image: linear-gradient(90deg, transparent 13.5%, #000 19%, #000 86.9%, transparent 87%);
}
.frame-p {
  left: 40.278%; z-index: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent 13.9%, #000 14%, #000 81%, transparent 86.5%);
  mask-image: linear-gradient(90deg, transparent 13.9%, #000 14%, #000 81%, transparent 86.5%);
}
.frame picture, .frame img { display: block; width: 100%; height: 100%; }
.frame img { transition: filter .7s ease; }
/* while a set fires, the figures pale a little so the credited muscles carry the colour */
.specimen.is-firing .frame img { filter: saturate(.42) brightness(1.07); }
.heat {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
}
.heat.css-filter { filter: brightness(1.42) saturate(2.1) contrast(1.12); }
.pane-cap {
  position: absolute; top: 0; z-index: 3; pointer-events: none;
  font: 600 10px/1.45 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.pane-cap b { display: block; color: var(--red); font-weight: 700; }
.pane-cap-a { left: 0; }
.pane-cap-p { right: 0; text-align: right; }

/* the stage between the lower legs, where each exercise comes into frame */
.stage {
  --open: 0;
  position: absolute; left: 37%; width: 26%; top: 64%; height: 25%; z-index: 3;
  pointer-events: none;
}
.stage::before {
  content: ""; position: absolute; inset: 0;
  --c: var(--teal); --l: 11px; --t: 1.5px;
  background:
    linear-gradient(var(--c) 0 0) left top / var(--l) var(--t),
    linear-gradient(var(--c) 0 0) left top / var(--t) var(--l),
    linear-gradient(var(--c) 0 0) right top / var(--l) var(--t),
    linear-gradient(var(--c) 0 0) right top / var(--t) var(--l),
    linear-gradient(var(--c) 0 0) left bottom / var(--l) var(--t),
    linear-gradient(var(--c) 0 0) left bottom / var(--t) var(--l),
    linear-gradient(var(--c) 0 0) right bottom / var(--l) var(--t),
    linear-gradient(var(--c) 0 0) right bottom / var(--t) var(--l);
  background-repeat: no-repeat;
  opacity: calc(.35 + .65 * var(--open));
  transform: scale(calc(1.14 - .14 * var(--open)));
}
.picto { position: absolute; inset: 9%; }
/* the pictogram is a real <img> (file:// blocks mask-image url()); linework shows directly.
   top/left + 82% size (not width:100%, which fights the inset and shoves it off-centre). */
img.picto { inset: 9% auto auto 9%; width: 82%; height: 82%; object-fit: contain; }
/* read-in sweep: a soft teal band crosses the stage as the exercise arrives (no mask → file://-safe) */
.picto-scan {
  background: linear-gradient(180deg, transparent 0 40%, rgba(0, 176, 161, .5) 50%, transparent 60% 100%) 0 var(--scan, -120%) / 100% 250% no-repeat;
}

/* label columns — JS sets each label's top from its anchor and relaxes overlaps */
.labels { position: relative; list-style: none; margin: 0; padding: 0; z-index: 2; }
.label { position: absolute; left: 0; right: 0; transform: translateY(-50%); transition: opacity .45s ease; }
.label button {
  display: block; width: 100%;
  background: none; border: 0; padding: 3px 0; cursor: pointer; color: inherit; font: inherit;
}
.labels-left .label button { text-align: right; padding-right: 14px; }
.labels-right .label button { text-align: left; padding-left: 14px; }
/* the reference number hangs in a fixed slot at the leader end; on a hit the weight pill covers it and
   the leader's first pixels, so the value prints where the signal arrives and the name never re-wraps */
.l-latin { position: relative; display: block; font: italic 500 15px/1.2 var(--serif); color: var(--ink); transition: color .3s; hyphens: manual; }
.labels-left .l-latin, .labels-left .l-en { padding-right: 22px; }
.labels-right .l-latin, .labels-right .l-en { padding-left: 22px; }
.l-en {
  display: block; margin-top: 2px;
  font: 600 10px/1.25 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted);
}
.l-no { position: absolute; top: 0; font: 600 10px/18px var(--mono); letter-spacing: .04em; color: var(--teal-ink); transition: opacity .2s; }
.labels-left .l-no { right: 0; }
.labels-right .l-no { left: 0; }
.label.is-hit .l-no { opacity: 0; }
.l-w {
  position: absolute; top: 2px; display: inline-block; box-sizing: border-box; min-width: 31px; padding: 0 4px;
  border-radius: 4px; box-shadow: 0 0 0 2px #fff; text-align: center;
  font: 700 9.5px/14px var(--mono); letter-spacing: .02em;
  background: var(--tint); color: var(--muted);
}
.labels-left .l-w { right: -14px; transform-origin: 100% 50%; }
.labels-right .l-w { left: -14px; transform-origin: 0 50%; }
.l-w:empty { display: none; }
.label[data-role="primary"] .l-w { background: var(--red); color: #fff; }
.label[data-role="synergist"] .l-w { background: var(--red-tint); color: var(--red-deep); }
.label.is-hit .l-w { animation: pop .42s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.label.is-dim { opacity: .34; }
.label.is-hit:not([data-role="stabilizer"]) .l-latin,
.label.is-active .l-latin, .label button:hover .l-latin { color: var(--red); }
.label.is-active { opacity: 1; }

/* leader lines: teal traces ending in round terminals, like the icon */
.leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 3; }
.leaders g { transition: opacity .45s ease; }
.leaders path { fill: none; stroke: var(--teal); stroke-width: 1; opacity: .6; transition: opacity .3s, stroke-width .3s, stroke .3s; }
.leaders .pad { fill: #fff; stroke: var(--teal); stroke-width: 1.3; transition: stroke .3s; }
.leaders .pad-core { fill: var(--teal); transition: fill .3s; }
.leaders .is-dim { opacity: .28; }
.leaders .is-hit:not(.is-stab) path, .leaders .is-active path { stroke: var(--red); opacity: 1; }
.leaders .is-active path { stroke-width: 1.5; }
.leaders .is-hit:not(.is-stab) .pad, .leaders .is-active .pad { stroke: var(--red); }
.leaders .is-hit:not(.is-stab) .pad-core, .leaders .is-active .pad-core { fill: var(--red); }
.leaders .ping { fill: none; stroke: var(--red); stroke-width: 1.2; opacity: 0; }
.leaders .is-active .ping { animation: ping 1.6s ease-out infinite; }
@keyframes ping { 0% { r: 4; opacity: .9; } 100% { r: 18; opacity: 0; } }

/* comets and rings ride above everything; the hit targets stay clickable underneath */
.fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; }

/* invisible hit targets on the figures themselves */
.anchors { position: absolute; inset: 0; z-index: 4; }
.anchor {
  position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px;
  border-radius: 50%; border: 0; background: transparent; cursor: pointer; padding: 0;
}

/* the console under the figures: the playing exercise, or the readout for a muscle you point at.
   Both modes share one grid cell, so swapping them never moves the page */
.console {
  display: grid;
  margin-top: 8px; padding: 12px 4px 0;
  border-top: 1px solid var(--hair);
  min-height: 128px;
}
.cs {
  grid-area: 1 / 1;
  display: grid; grid-template-columns: 104px minmax(0, 1fr); column-gap: 16px; row-gap: 2px;
  align-content: start;
  transition: opacity .3s ease, transform .3s ease, visibility 0s linear 0s;
}
.cs > :not(.cs-tag) { grid-column: 2; }
.console[data-mode="signal"] .cs-readout,
.console[data-mode="readout"] .cs-signal {
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
.cs-tag {
  grid-column: 1; grid-row: 1 / span 4; align-self: start; justify-self: start;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 9px; border-radius: 6px; background: var(--teal-tint); color: var(--teal-ink);
  font: 700 10.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.sg-name { font: 750 19px/1.2 var(--sans); letter-spacing: -0.01em; }
.sg-meta { font: 600 11px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sg-name.is-in, .sg-meta.is-in { animation: sg-in .45s ease both; }
.sg-meta.is-in { animation-delay: .06s; }
@keyframes sg-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.sg-chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 8px 0 0; padding: 0; }
.chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 4px 9px; border-radius: 999px; font-size: 12.5px; line-height: 1.3;
  background: var(--tint); color: var(--muted);
  opacity: 0; transform: scale(.82);
  transition: opacity .25s ease, transform .4s cubic-bezier(.3, 1.6, .5, 1);
}
.chip.on { opacity: 1; transform: none; }
.chip[data-role="stabilizer"] b { color: var(--ink-2); }
.chip[data-role="primary"] { background: var(--red); color: #fff; }
.chip[data-role="synergist"] { background: var(--red-tint); color: var(--red-deep); }
.ro-latin { font: italic 500 21px/1.15 var(--serif); }
.ro-en { font: 600 11px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ro-group { color: var(--teal-ink); }
.ro-group:not(:empty)::before { content: " · "; color: var(--muted); }
.ro-data { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 6px 0 0; }
.ro-data div { display: flex; align-items: baseline; gap: 6px; }
.ro-data dt { order: 2; font-size: 12.5px; color: var(--muted); }
.ro-data dd { order: 1; margin: 0; font: 700 15px/1.2 var(--mono); color: var(--ink); }
.ro-fact { margin-top: 4px; font-size: 14.5px; color: var(--ink-2); max-width: 46em; }

/* ---------------- the turn (manifesto) ---------------- */
/* the one dark beat on an otherwise clinical-white page: AI took everything,
   so point it at the one thing it can't do for you. */
.manifesto {
  position: relative;
  padding: 96px var(--gutter);
  background: var(--ink);
  color: #fff;
  overflow: hidden;
}
/* faint grid echoing the hero's ECG paper, masked to fade toward the edges */
.manifesto::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(130% 120% at 50% 42%, #000 52%, transparent 100%);
  mask-image: radial-gradient(130% 120% at 50% 42%, #000 52%, transparent 100%);
}
/* a warm red stage-light bloom rising from below */
.manifesto::after {
  content: ""; position: absolute; left: 50%; bottom: -42%;
  width: min(760px, 150%); aspect-ratio: 1; transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(circle, rgba(217, 14, 43, .20), transparent 62%);
}
.mf-inner { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; text-align: center; }
.mf-eyebrow { margin-bottom: 26px; }
.mf-took {
  font-weight: 780; letter-spacing: -0.02em; line-height: 1.16;
  font-size: clamp(20px, 4.4vw, 38px);
  color: rgba(255, 255, 255, .66);
}
.mf-took em { font-family: var(--serif); font-style: italic; font-weight: 500; color: #fff; }
.mf-turn {
  margin-top: 18px;
  font-weight: 820; letter-spacing: -0.035em; line-height: 1.03;
  font-size: clamp(40px, 7.2vw, 76px);
}
/* a red highlighter stroke under the pivot word */
.mf-hl {
  white-space: nowrap;
  background: linear-gradient(var(--red), var(--red)) 0 92% / 100% .09em no-repeat;
  padding-bottom: .04em;
}
.mf-resolve {
  margin: 26px auto 0; max-width: 40em;
  font-size: clamp(16px, 1.5vw, 19px); line-height: 1.6;
  color: rgba(255, 255, 255, .74);
}
.mf-resolve b { color: #fff; font-weight: 650; }
.mf-actions { margin-top: 34px; display: flex; justify-content: center; }

/* ---------------- sections ---------------- */
.section { padding: 104px var(--gutter); }
.section-tint { background: var(--tint); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.section-head { max-width: 760px; margin-bottom: 44px; }
.kicker {
  display: flex; align-items: center; gap: 10px;
  font: 600 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.kicker .num { color: var(--red); }
.kicker::after { content: ""; flex: 0 0 48px; height: 1px; background: var(--hair-2); }
.section h2 { margin-top: 16px; font-size: clamp(30px, 3.6vw, 46px); font-weight: 780; }
.sub { margin-top: 16px; font-size: 17px; color: var(--ink-2); }

/* ---------------- how a set is counted ---------------- */
.counts {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  grid-template-areas: "picker picker" "card weights";
  gap: 18px 28px;
}
.lift-picker { grid-area: picker; display: flex; flex-wrap: wrap; gap: 8px; }
.lift-picker button {
  font: 600 14px/1 var(--sans); color: var(--ink-2);
  background: #fff; border: 1px solid var(--hair-2); border-radius: 999px;
  padding: 10px 16px; cursor: pointer; transition: border-color .2s, color .2s, background-color .2s;
}
.lift-picker button:hover { border-color: var(--ink); }
.lift-picker button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.lift-card, .weights {
  background: #fff; border: 1px solid var(--hair); border-radius: var(--radius); padding: 22px 24px;
}
.lift-card { grid-area: card; }
.lift-title { font-weight: 700; font-size: 18px; }
.lift-title small { font-weight: 500; color: var(--muted); font-size: 14px; }
.credits { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 9px; }
.credit {
  display: grid; grid-template-columns: 104px minmax(0, 1fr) 92px; align-items: center; gap: 12px;
  font-size: 14px;
}
.credit-track { height: 10px; border-radius: 5px; background: var(--tint); overflow: hidden; }
.credit-fill { display: block; height: 100%; width: 0; border-radius: 5px; transition: width .7s cubic-bezier(.2, .7, .2, 1); }
.credit[data-role="primary"] .credit-fill { background: var(--red); }
.credit[data-role="synergist"] .credit-fill { background: var(--st-building); }
.credit[data-role="stabilizer"] .credit-fill { background: var(--st-under); }
.role {
  justify-self: start; font: 600 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  padding: 5px 7px; border-radius: 5px; background: var(--tint); color: var(--muted);
}
.credit[data-role="primary"] .role { background: var(--red-tint); color: var(--red-deep); }
.weights { grid-area: weights; }
.weights h3 { font-size: 15px; font-weight: 700; letter-spacing: 0; }
.weights table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 14px; }
.weights th, .weights td { padding: 8px 6px; border-bottom: 1px solid var(--hair); text-align: right; }
.weights th:first-child { text-align: left; }
.weights thead th { font: 600 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.weights td { font-family: var(--mono); }
.weights p { margin-top: 14px; font-size: 13px; color: var(--muted); }

/* ---------------- a week, read back ---------------- */
.week { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.chart, .log { background: #fff; border: 1px solid var(--hair); border-radius: var(--radius); padding: 24px; }
.chart { position: relative; }
.chart-scale {
  position: relative; height: 16px; margin-left: 116px; margin-right: 64px;
  font: 600 11px/1 var(--mono); color: var(--muted);
}
.chart-scale span { position: absolute; left: var(--at); transform: translateX(-50%); }
.bars { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: 104px minmax(0, 1fr) 52px; align-items: center; gap: 12px; font-size: 14px; }
.bar-track {
  position: relative; height: 14px; border-radius: 4px; background: var(--tint);
  /* the 4 / 10 / 20 lines at 16 % / 40 % / 80 % (sets/25) */
  background-image:
    linear-gradient(90deg, transparent calc(16% - .5px), var(--hair-2) calc(16% - .5px), var(--hair-2) calc(16% + .5px), transparent calc(16% + .5px)),
    linear-gradient(90deg, transparent calc(40% - .5px), var(--hair-2) calc(40% - .5px), var(--hair-2) calc(40% + .5px), transparent calc(40% + .5px)),
    linear-gradient(90deg, transparent calc(80% - .5px), var(--hair-2) calc(80% - .5px), var(--hair-2) calc(80% + .5px), transparent calc(80% + .5px));
}
.bar-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 4px; transition: width 1s cubic-bezier(.2, .7, .2, 1); }
.bar-val { font: 700 14px/1 var(--mono); display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; }
.st { font-style: normal; font-size: 11px; }
.st-under { color: #c64257; }
.st-building { color: var(--st-building); }
.st-in { color: var(--st-in); }
.st-over { color: var(--st-over); }
.bar[data-st="under"] .bar-fill { background: var(--st-under); }
.bar[data-st="building"] .bar-fill { background: var(--st-building); }
.bar[data-st="in"] .bar-fill { background: var(--st-in); }
.bar[data-st="over"] .bar-fill { background: var(--st-over); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; margin: 18px 0 0; padding: 14px 0 0; border-top: 1px solid var(--hair); font-size: 13px; color: var(--ink-2); }
.counted { margin-top: 22px; }
.counted-title { font-weight: 700; font-size: 14px; }
.counted-title small { font-weight: 500; color: var(--muted); }
.counted-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 10px 0 12px; padding: 0; }
.counted-list li {
  font-size: 13px; padding: 5px 10px; border-radius: 999px; background: var(--tint); color: var(--ink-2);
}
.counted-list b { font-family: var(--mono); margin-left: 4px; color: var(--ink); }
.log-title { font-weight: 700; font-size: 14px; }
.log-days { list-style: none; margin: 12px 0 14px; padding: 0; display: grid; gap: 14px; }
.log-day h3 { font: 700 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.log-day ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
.log-day li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--hair); padding-bottom: 4px; }
.log-day li b { font-family: var(--mono); font-weight: 600; color: var(--ink); }

/* ---------------- gym bro ---------------- */
.coach {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  grid-template-areas: "chat modes" "setup setup" "fine fine";
  gap: 24px 28px;
}
.chat {
  grid-area: chat; display: flex; flex-direction: column; gap: 10px;
  background: var(--tint); border: 1px solid var(--hair); border-radius: 20px; padding: 20px;
}
.chat-head { font-weight: 700; display: flex; align-items: center; gap: 8px; padding-bottom: 6px; }
.chat-head small { font: 600 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-left: auto; }
.bubble { max-width: 86%; padding: 11px 14px; border-radius: 16px; font-size: 15px; }
.bubble.in { align-self: flex-start; background: #fff; border: 1px solid var(--hair); border-left: 3px solid var(--teal); border-top-left-radius: 6px; }
.bubble.out { align-self: flex-end; background: var(--ink); color: #fff; border-top-right-radius: 6px; }
.modes { grid-area: modes; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
.mode { background: #fff; border: 1px solid var(--hair); border-radius: var(--radius); padding: 16px 18px; }
.mode h3 { font-size: 17px; margin-top: 8px; }
.mode p:last-child { margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.mode-tier {
  display: inline-block; font: 700 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 7px; border-radius: 5px; background: var(--teal-tint); color: var(--teal-ink);
}
.mode-tier.deep { background: var(--ink); color: #fff; }
.helpers { grid-column: 1 / -1; font-size: 14px; color: var(--ink-2); padding: 4px 2px 0; }
.setup {
  grid-area: setup; list-style: none; counter-reset: step; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  border: 1px solid var(--hair); border-radius: var(--radius); overflow: hidden;
}
.setup li { counter-increment: step; padding: 16px 18px; background: #fff; display: grid; gap: 4px; }
.setup li + li { border-left: 1px solid var(--hair); }
.setup li::before { content: "0" counter(step); font: 700 11px/1 var(--mono); color: var(--teal-ink); letter-spacing: .1em; }
.setup b { font-size: 15px; }
.setup span { font-size: 13px; color: var(--muted); }
.coach-fine { grid-area: fine; }

/* ---------------- science ---------------- */
.sci-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.sci { position: relative; background: #fff; border: 1px solid var(--hair); border-radius: var(--radius); padding: 22px; }
/* marks a card the AI coach delivers (§9.6.2) — same teal ✦ language as the console tags */
.ai-tag {
  position: absolute; top: 18px; right: 18px; display: inline-flex; align-items: center; gap: 4px;
  font: 700 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  padding: 4px 7px; border-radius: 5px; background: var(--teal-tint); color: var(--teal-ink);
}
.ai-tag .spark { font-size: 11px; }
.sci-no { font: 700 11px/1 var(--mono); color: var(--red); letter-spacing: .1em; }
.sci h3 { font-size: 18px; margin-top: 12px; }
.sci p:last-child { margin-top: 8px; font-size: 14.5px; color: var(--ink-2); }

/* ---------------- ethos / download / footer ---------------- */
.ethos { padding: 112px var(--gutter); text-align: center; }
.ethos h2 { font-size: clamp(34px, 4.6vw, 60px); font-weight: 800; letter-spacing: -0.035em; }
.trust {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  list-style: none; margin: 44px auto 0; padding: 0; max-width: 960px;
  border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
}
.trust li { padding: 20px 12px; font-size: 14px; color: var(--muted); }
.trust li + li { border-left: 1px solid var(--hair); }
.trust b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 2px; }
.download { padding: 40px var(--gutter) 120px; text-align: center; }
.download h2 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 780; }
.download .sub { margin-bottom: 28px; }
.foot {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 26px var(--gutter); border-top: 1px solid var(--hair);
  font-size: 13px; color: var(--muted);
}
.foot .wordmark { color: var(--ink); }

/* ---------------- reveal ---------------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------------- responsive ---------------- */
/* under 1240 the plate needs the full width: it stacks under the copy */
@media (max-width: 1239px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero-copy { max-width: 720px; }
  .plate { --H: 540px; justify-self: center; width: min(100%, 860px); }
}
@media (max-width: 1180px) {
  .sci-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .counts { grid-template-columns: 1fr; grid-template-areas: "picker" "card" "weights"; }
  .week { grid-template-columns: 1fr; }
  .coach { grid-template-columns: 1fr; grid-template-areas: "chat" "modes" "setup" "fine"; }
  .setup { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup li:nth-child(3) { border-left: 0; }
  .setup li:nth-child(n + 3) { border-top: 1px solid var(--hair); }
  .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust li:nth-child(3) { border-left: 0; }
  .trust li:nth-child(n + 3) { border-top: 1px solid var(--hair); }
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
}
/* compact plate: no side columns — dots on the figures, the labels in two scrolling rows below */
@media (max-width: 860px) {
  .plate { padding: 10px 12px 14px; border-radius: 16px; }
  .plate-head { flex-wrap: wrap; row-gap: 8px; }
  .fig-title { margin-right: auto; }
  .ex-strip { order: 3; flex: 1 0 100%; margin-left: 0; justify-content: space-between; }
  .plate-body { grid-template-columns: minmax(0, 1fr); }
  .specimen { height: auto; width: 100%; }
  .labels-left { order: 1; margin-top: 10px; }
  .labels-right { order: 2; margin-top: 6px; }
  .labels {
    display: flex; gap: 6px; padding: 1px 0;
    overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
  }
  .labels::-webkit-scrollbar { display: none; }
  .label { position: static; transform: none; flex: none; scroll-snap-align: start; }
  .label button, .labels-left .label button, .labels-right .label button {
    text-align: left; padding: 6px 11px; white-space: nowrap;
    border: 1px solid var(--hair); border-radius: 999px; background: #fff;
  }
  .label .l-latin, .labels-left .l-latin, .labels-right .l-latin { display: inline; padding: 0; font-size: 13.5px; }
  .label .l-en, .label .l-no { display: none; }
  .label .l-w { position: static; margin-left: 6px; vertical-align: 1px; box-shadow: none; }
  .label.is-hit:not([data-role="stabilizer"]) button { border-color: rgba(217, 14, 43, .35); }
  .label.is-active button { border-color: var(--red); }
  .leaders { display: none; }
  .anchor::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px;
    border-radius: 50%; background: #fff; border: 1.5px solid var(--teal); box-shadow: 0 1px 3px rgba(15, 23, 34, .25);
    transition: background-color .3s, border-color .3s, transform .3s;
  }
  .anchor.is-hit:not(.is-stab)::after { border-color: var(--red); }
  .anchor.is-dim::after { opacity: .5; }
  .anchor.is-active::after { background: var(--red); border-color: #fff; transform: scale(1.35); }
  .pane-cap { font-size: 9px; }
  .cs { grid-template-columns: minmax(0, 1fr); }
  .cs > :not(.cs-tag) { grid-column: 1; }
  .cs-tag { grid-row: auto; margin-bottom: 8px; }
  .sg-name { font-size: 17px; }
  .ro-latin { font-size: 19px; }
  .ro-fact { font-size: 14px; }
}
@media (max-width: 760px) {
  .hero { padding: 16px var(--gutter) 48px; gap: 28px; }
  .lede { font-size: 16px; }
  .hero-meta li + li { padding-left: 10px; margin-left: 10px; }
  .hero-meta b { font-size: 22px; }
  .section { padding: 72px var(--gutter); }
  .manifesto { padding: 72px var(--gutter); }
  .credit { grid-template-columns: 84px minmax(0, 1fr) auto; }
  .bar { grid-template-columns: 84px minmax(0, 1fr) 48px; gap: 10px; }
  .chart-scale { margin-left: 94px; margin-right: 58px; }
  .chart, .log { padding: 18px; }
  .modes { grid-template-columns: 1fr; }
  .sci-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Model capability lab (models.html)
   Same tokens as the marketing page; teal = "what the AI reads".
   Quality ramp is a diverging red→amber→teal scale (q0 worst … q4 best).
   ========================================================= */
.nav-links a[aria-current="page"] { color: var(--red); }

/* prominent cross-link to the capability lab, in the AI Coach section (index.html) */
.coach-lab {
  display: flex; align-items: center; gap: 18px;
  margin-top: 32px; padding: 20px 24px;
  border: 1px solid var(--teal); border-radius: var(--radius);
  background: var(--teal-tint); color: var(--ink); text-decoration: none;
  transition: box-shadow .2s, transform .2s, background-color .2s;
}
.coach-lab:hover { background: #d7f1ee; transform: translateY(-1px); box-shadow: 0 18px 40px -26px rgba(0, 133, 122, .6); }
.coach-lab-ic { flex: none; font-size: 24px; color: var(--teal-ink); }
.coach-lab-txt { flex: 1 1 auto; font-size: 15px; color: var(--ink-2); }
.coach-lab-txt b { font-weight: 650; color: var(--ink); }
.coach-lab-txt b:first-child { display: block; font-size: 18px; margin-bottom: 3px; letter-spacing: -0.01em; }
.coach-lab-name { color: var(--teal-ink); }
.coach-lab-go { flex: none; font: 650 15px/1 var(--sans); color: #fff; background: var(--teal-ink); padding: 11px 18px; border-radius: 999px; white-space: nowrap; }
.coach-lab:hover .coach-lab-go { background: var(--teal); }
@media (max-width: 560px) {
  .coach-lab { flex-wrap: wrap; gap: 12px; }
  .coach-lab-go { margin-left: 40px; }
}

.mdl-hero {
  padding: 40px var(--gutter) 22px;
  /* faint teal grid — the lab half of the brief */
  background-image:
    linear-gradient(rgba(0, 176, 161, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 176, 161, .05) 1px, transparent 1px);
  background-size: 24px 24px; background-position: -1px -1px;
}
.mdl-hero-copy { max-width: 820px; }
.mdl-hero h1 { margin-top: 20px; font-size: clamp(32px, 6.4vw, 52px); font-weight: 800; letter-spacing: -0.035em; }
.mdl-hero .lede { margin-top: 18px; }
.mdl-neutral {
  margin-top: 16px; display: flex; gap: 8px; align-items: flex-start;
  padding: 12px 16px; border-radius: 12px; background: var(--teal-tint); color: var(--teal-ink);
  font-size: 14px; max-width: 66ch;
}
.mdl-meta {
  display: flex; flex-wrap: wrap; gap: 0; margin: 28px 0 0; padding: 0; list-style: none;
  border-top: 1px solid var(--hair); max-width: 640px;
}
.mdl-meta li { flex: 1 1 0; min-width: 120px; padding: 14px 0 0; font-size: 13px; color: var(--muted); }
.mdl-meta li + li { padding-left: 14px; border-left: 1px solid var(--hair); margin-left: 14px; }
.mdl-meta b { display: block; font: 700 19px/1.2 var(--mono); color: var(--ink); letter-spacing: -0.02em; word-break: break-word; }

.mdl-wrap { padding: 0 var(--gutter); }
.mdl-banner { max-width: 1000px; margin: 20px auto 0; padding: 14px 18px; border-radius: 12px; font-size: 14.5px; line-height: 1.55; }
.mdl-banner code { font: 500 12.5px/1 var(--mono); background: rgba(15, 23, 34, .07); padding: 2px 5px; border-radius: 5px; }
.mdl-banner-sample { background: #fff8e6; border: 1px solid #f0d492; color: #6a5410; }
.mdl-banner-empty { background: var(--red-tint); border: 1px solid #f3b6bf; color: var(--red-deep); }

/* ---- judge switcher + matrix metric toggle (pills) ---- */
.mdl-judgebar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; }
.mdl-ctl-label { font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.mdl-pills, .mdl-metric { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.mdl-metric { margin-top: 16px; }
.mdl-pill {
  font: 600 13px/1 var(--mono); color: var(--ink-2); background: #fff;
  border: 1px solid var(--hair-2); border-radius: 999px; padding: 8px 14px; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.mdl-pill:hover { border-color: var(--teal); }
.mdl-pill.on { background: var(--teal-ink); border-color: var(--teal-ink); color: #fff; }
.mdl-pill[disabled] { opacity: .45; cursor: not-allowed; }
.mdl-pill[disabled]:hover { border-color: var(--hair-2); }

/* ---- recommendation ---- */
.mdl-rec {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 36px;
  padding: 28px 32px; border-radius: 18px;
  background: linear-gradient(135deg, #0f1722, #1b2a3d); color: #fff;
  box-shadow: 0 30px 60px -34px rgba(15, 23, 34, .5);
}
.mdl-rec-label { flex: 1 0 100%; font: 600 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--teal); }
.mdl-rec-model { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: clamp(21px, 3vw, 31px); font-weight: 760; letter-spacing: -0.02em; }
.mdl-rec-q { display: flex; align-items: baseline; gap: 8px; margin-left: auto; }
.mdl-rec-q b { font: 800 44px/1 var(--mono); color: var(--teal); letter-spacing: -0.03em; }
.mdl-rec-q span { font-size: 12px; color: #aab4c0; text-transform: uppercase; letter-spacing: .1em; }
.mdl-rec-why { flex: 1 0 100%; margin-top: 4px; color: #cdd5de; font-size: 15px; max-width: 74ch; }
.mdl-rec .fine { flex: 1 0 100%; color: #8793a1; }

/* ---- provider chips ---- */
.mdl-prov { display: inline-block; font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; padding: 4px 8px; border-radius: 999px; vertical-align: middle; }
.prov-deepseek { background: #e7edff; color: #2743b0; }
.prov-gemini { background: #e3f0ff; color: #1766c3; }
.prov-openrouter { background: #efe9fb; color: #6a3fb0; }

/* ---- leaderboard ---- */
.mdl-board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mdl-row { display: flex; align-items: center; gap: 18px; padding: 16px 20px; background: #fff; border: 1px solid var(--hair); border-radius: 14px; }
.mdl-row:first-child { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal), 0 18px 44px -30px rgba(0, 133, 122, .55); }
.mdl-rank { flex: none; width: 28px; text-align: center; font: 800 22px/1 var(--mono); color: var(--muted); }
.mdl-row:first-child .mdl-rank { color: var(--teal-ink); }
.mdl-row-main { flex: 1 1 auto; min-width: 0; }
.mdl-model { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 650; font-size: 15px; word-break: break-word; }
.mdl-bar { margin-top: 10px; height: 8px; border-radius: 999px; background: var(--hair); overflow: hidden; }
.mdl-bar-fill { display: block; height: 100%; border-radius: 999px; }
.mdl-bar-fill.q-none { background: var(--hair-2); }
.mdl-row-stats { flex: none; min-width: 158px; text-align: right; }
.mdl-q { font: 800 26px/1 var(--mono); letter-spacing: -0.03em; }
.mdl-stat-line { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: flex-end; }
.mdl-stat { font: 500 12.5px/1.3 var(--mono); color: var(--muted); }
.mdl-stat-err { color: var(--red); }
.mdl-flag { font: 600 12px/1.3 var(--mono); color: #fff; background: var(--red); padding: 2px 7px; border-radius: 999px; }

/* ---- scenario × model matrix ---- */
.mdl-matrix-wrap { overflow-x: auto; border: 1px solid var(--hair); border-radius: 14px; background: #fff; }
.mdl-matrix { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.mdl-matrix th, .mdl-matrix td { border-bottom: 1px solid var(--hair); border-right: 1px solid var(--hair); }
.mdl-matrix tr > *:last-child { border-right: 0; }
.mdl-matrix tbody tr:last-child > * { border-bottom: 0; }
.mdl-corner { position: sticky; left: 0; z-index: 2; background: var(--tint); text-align: left; padding: 12px 14px; font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.mdl-mhead { padding: 10px 12px; background: var(--tint); vertical-align: bottom; text-align: center; min-width: 118px; }
.mdl-mhead-id { display: block; margin-top: 6px; font: 600 12px/1.3 var(--sans); color: var(--ink-2); word-break: break-word; }
.mdl-mode-row td { background: #fbfcfd; padding: 10px 14px 5px; font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--teal-ink); }
.mdl-srow { position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; padding: 10px 14px; font-weight: 600; white-space: nowrap; }
.mdl-cell { position: relative; text-align: center; padding: 11px 12px; font: 700 14px/1 var(--mono); }
.mdl-cell-blank { background: #fff; color: var(--hair-2); font-weight: 400; }
.mdl-cell-err { background: var(--red-tint); color: var(--red); font: 600 11px/1 var(--mono); }
.mdl-win { outline: 2px solid rgba(255, 255, 255, .65); outline-offset: -4px; }
.mdl-win-star { position: absolute; top: 3px; right: 4px; font-size: 9px; opacity: .9; }

/* ---- shared quality ramp (bars, cells, legend swatches) ---- */
.q0 { background: #d90e2b; color: #fff; }
.q1 { background: #e8663f; color: #fff; }
.q2 { background: #e5a927; color: #3a2c02; }
.q3 { background: #3fae97; color: #06302a; }
.q4 { background: #00857a; color: #fff; }
.mdl-ramp { list-style: none; display: flex; flex-wrap: wrap; gap: 14px; margin: 16px 0 0; padding: 0; font: 500 12px/1 var(--mono); color: var(--muted); }
.mdl-ramp li { display: flex; align-items: center; gap: 6px; }
.mdl-ramp .q { width: 16px; height: 16px; border-radius: 4px; display: inline-block; }

/* ---- methodology ---- */
.mdl-method { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.mdl-formula, .mdl-dims { background: #fff; border: 1px solid var(--hair); border-radius: 14px; padding: 24px 26px; }
.mdl-formula-line { font: 600 16px/1.5 var(--mono); color: var(--ink); background: var(--tint); border-radius: 10px; padding: 12px 14px; }
.mdl-formula ul { margin: 16px 0 0; padding-left: 18px; }
.mdl-formula li { margin-top: 8px; font-size: 14.5px; color: var(--ink-2); }
.mdl-formula .fine { margin-top: 14px; }
.mdl-dims h3 { font-size: 16px; margin-bottom: 12px; }
.mdl-dims dl { display: grid; gap: 10px; margin: 0; }
.mdl-dims dt { font: 600 13px/1 var(--mono); color: var(--teal-ink); }
.mdl-dims dd { margin: 3px 0 0; font-size: 14px; color: var(--ink-2); }
.mdl-dims .fine { margin-top: 16px; }
.mdl-provenance { margin-top: 20px; font-family: var(--mono); font-size: 12px; }

@media (max-width: 760px) {
  .mdl-hero { padding: 24px var(--gutter) 16px; }
  .mdl-meta li + li { padding-left: 10px; margin-left: 10px; }
  .mdl-method { grid-template-columns: 1fr; }
  .mdl-rec { padding: 22px 20px; }
  .mdl-rec-q { margin-left: 0; }
  .mdl-row { flex-wrap: wrap; gap: 10px 18px; }
  .mdl-row-stats { min-width: 0; width: 100%; text-align: left; }
  .mdl-stat-line { justify-content: flex-start; }
}
