/* Harness Benchmark — FZR-V4 identity: near-black / warm-paper ground, FARISZR gold
   reserved for highlights, Geist for text, Departure Mono for data and labels,
   ordered dithering as the one texture. */

@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Departure Mono";
  src: url("../fonts/DepartureMono-Regular.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0b0b0a;
  --bg-1: #0f0f0e;
  --bg-2: #141412;
  --bg-3: #1b1b18;
  --line: #22211e;
  --line-2: #32312c;
  --ink: #edeae3;
  --ink-2: #c0bcb2;
  --muted: #938f85;
  --gold-hi: #ffe067;
  --gold: #f0c03a;
  --gold-lo: #e2a21b;
  --gold-text: #f3ca52;
  --gold-wash: #29210e;
  --gold-border: rgba(240, 192, 58, .48);
  --danger: #f0645a;
  --h-claude-code: #d97757;
  --h-codex: #e4e2dc;
  --h-opencode-v2: #2f86ff;
  --h-pi: #f48fc8;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  --r: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Departure Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --on-ink: #0b0b0a;
  --logo-mono: #eeeeee;
  --hover: rgba(237, 234, 227, .04);
  --tip-bg: rgba(18, 18, 16, .97);
  --tip-shadow: 0 12px 32px rgba(0, 0, 0, .55);
  --flaky: #1d1a12;
  --range-fill: rgba(237, 234, 227, .09);
  --range-stroke: rgba(237, 234, 227, .24);
  --dither-ink: rgba(192, 188, 178, .28);
  --foot-line: #d9d4c7;
  --mark-filter: none;
  --series-line: .62;
  /* Tool-mix palette (disjoint from harness colors & Pareto gold) */
  --mix-shell: #2ea89d;
  --mix-read: #a4bd47;
  --mix-edit: #8478e0;
  --mix-search: #4db874;
  --mix-code: #9e8868;
  --mix-sub: #c94a5a;
  --mix-other: #575c66;
}

/* Light: warm paper ground. Gold text deepens to >=5.5:1 contrast; gold marks keep brand hue;
   Codex bars soften from pure black so Codex does not visually dominate the other harnesses. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f1eb;
  --bg-1: #fbfaf6;
  --bg-2: #efede6;
  --bg-3: #e6e3d9;
  --line: #dfdcd1;
  --line-2: #cac6b9;
  --ink: #16150f;
  --ink-2: #43413a;
  --muted: #5d5a52;
  --gold-hi: #805600;
  --gold: #c28700;
  --gold-lo: #a67200;
  --gold-text: #7d5400;
  --gold-wash: #f6eccf;
  --gold-border: rgba(154, 108, 0, .48);
  --danger: #c42b23;
  --h-claude-code: #c45d39;
  --h-codex: #4a4944;
  --h-opencode-v2: #1d6ad6;
  --h-pi: #c94c91;
  --on-ink: #fbfaf6;
  --logo-mono: #262522;
  --hover: rgba(22, 21, 15, .045);
  --tip-bg: rgba(251, 250, 246, .98);
  --tip-shadow: 0 12px 32px rgba(40, 36, 20, .14);
  --flaky: #f3ead2;
  --range-fill: rgba(22, 21, 15, .07);
  --range-stroke: rgba(22, 21, 15, .24);
  --dither-ink: rgba(70, 66, 56, .22);
  --foot-line: #46443d;
  --mark-filter: brightness(.74) saturate(1.25);
  --series-line: .82;
  --mix-shell: #14a396;
  --mix-read: #84ad18;
  --mix-edit: #6c5ce7;
  --mix-search: #22a858;
  --mix-code: #a3875c;
  --mix-sub: #d1344b;
  --mix-other: #949aa6;
}

* { box-sizing: border-box; }
html {
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  transition: background-color .25s var(--ease);
  scrollbar-color: var(--line-2) var(--bg);
  scrollbar-width: thin;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  font: 400 15px/1.55 var(--sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  caret-color: var(--gold);
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

img, svg, canvas { display: block; }
[hidden] { display: none !important; }
section, .fig, .model-panel, .model-anchor { scroll-margin-top: 76px; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3, h4, p, dl, dd, ol, ul { margin: 0; }
button { font: inherit; color: inherit; }
::selection { background: var(--gold); color: #0b0b0a; }

.mono {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: .01em;
  text-transform: uppercase;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 120;
  background: var(--gold); color: #0b0b0a; padding: 10px 14px; border-radius: var(--r);
  text-decoration: none; font-weight: 500;
}
.skip:focus-visible { top: 12px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; gap: 24px; height: 52px; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-height: 44px; flex: none; }
.brand a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: inherit; transition: opacity .15s var(--ease); }
.brand a:hover { opacity: .82; }
.noscript-banner { max-width: var(--max); margin: 16px auto; padding: 12px 16px; border: 1px solid var(--gold-border); border-radius: var(--r); background: var(--bg-1); font-size: 13.5px; color: var(--ink-2); }
.noscript-banner a { color: var(--gold-text); }
.brand-mark {
  width: 82px; height: 11px;
  background: url("../img/fariszr-gold.png") center / contain no-repeat;
  filter: var(--mark-filter);
}
.brand-sep { color: var(--line-2); }
.brand-name { font-size: 14px; font-weight: 500; letter-spacing: -.01em; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  position: relative;
  font-size: 13px; color: var(--ink-2); text-decoration: none;
  padding: 12px 10px; min-height: 44px; display: inline-flex; align-items: center;
  transition: color .2s var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 9px; height: 1.5px;
  background: var(--gold); transform: scaleX(0); transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--ink); }
.nav-links a:hover::after, .nav-links a[aria-current="true"]::after { transform: scaleX(1); }
.run-tag {
  display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2);
  border: 1px solid var(--line-2); border-radius: var(--r); padding: 4px 9px; flex: none;
}
.pix { width: 6px; height: 6px; background: var(--gold); }

/* Mobile sticky chip nav (visible <=760px) */
.mob-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.mob-nav-inner {
  display: flex; gap: 6px; padding: 6px var(--gutter);
  overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.mob-nav-inner::-webkit-scrollbar { display: none; }
.mob-nav a {
  flex: none;
  font-family: var(--mono); font-size: 11px; text-transform: uppercase;
  text-decoration: none; color: var(--ink-2);
  padding: 6px 10px; min-height: 32px; display: inline-flex; align-items: center;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-1);
  transition: color .15s var(--ease), border-color .15s var(--ease), background-color .15s var(--ease);
}
.mob-nav a[aria-current="true"] {
  color: var(--on-ink); background: var(--ink); border-color: var(--ink);
}

.theme-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; margin-right: -8px;
  background: transparent; border: 0; border-radius: var(--r); color: var(--ink-2); cursor: pointer;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.theme-btn:hover { color: var(--ink); background: var(--bg-3); }
.theme-btn svg { width: 17px; height: 17px; }
.theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: block; }
:root[data-theme="light"] .theme-btn .i-moon { display: none; }

/* ---------- hero (title + intro + 3 takeaways + Fig. 01) ---------- */
.hero { position: relative; isolation: isolate; padding-bottom: 96px; }
.dither-field {
  position: absolute; z-index: -1; inset: 0 0 auto 0;
  width: 100%; height: min(560px, 84vh);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 44%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 44%, transparent 96%);
}
.hero-top {
  padding: clamp(20px, 2.8vh, 30px) 0 14px;
}
.hero h1 {
  font-weight: 500;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.05;
  letter-spacing: -.032em;
  max-width: 28ch;
  text-wrap: balance;
}
.hero .lede {
  margin-top: 10px;
  font-size: 15.5px;
  line-height: 1.5;
  max-width: 66ch;
  color: var(--ink-2);
  text-wrap: pretty;
}
.hero .lede strong { color: var(--ink); font-weight: 500; }

/* ---------- figures ---------- */
.fig {
  margin: 0; background: var(--bg-1); border: 1px solid var(--line); border-radius: 6px;
  min-width: 0;
}
.fig-lead {
  background: color-mix(in oklab, var(--bg-1) 90%, transparent);
  backdrop-filter: blur(6px);
}
.fig-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.fig-head-lead { padding: 11px 16px 8px; border-bottom: 0; }
.fig-title { display: flex; align-items: baseline; gap: 11px; min-width: 0; }
.fig-no {
  color: var(--gold-text); flex: none;
  background: transparent; border: 0; padding: 2px 4px; margin: -2px -4px;
  border-radius: 3px; cursor: pointer;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.fig-no:hover { background: var(--gold-wash); color: var(--gold-hi); }
.fig-h { font-size: 15px; font-weight: 500; letter-spacing: -.01em; line-height: 1.3; }
.fig-head-lead .fig-h { font-size: 16px; }
.fig-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.fig-modes { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.lead-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding: 0 16px 6px;
  border-bottom: 1px solid var(--line);
}
.gold-key {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--ink-2);
}
.gold-key-inline { flex-basis: 100%; color: var(--ink); }
.gold-key-inline[hidden] { display: none; }
.gold-key-sub { color: var(--muted); }
.gold-swatch {
  display: inline-block; width: 12px; height: 12px; border-radius: 2px;
  border: 1.75px solid var(--gold); background: var(--gold-wash); flex: none;
}

.fig-body { position: relative; padding: 10px 14px 4px; min-height: 96px; }
.fig-body-table { padding: 0; min-height: 0; }
.fig-body svg { width: 100%; height: auto; overflow: visible; }

.fig-foot {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 20px;
  padding: 8px 16px 11px;
  border-top: 1px solid color-mix(in oklab, var(--line) 65%, transparent);
}
.fig-note {
  color: var(--muted); font-size: 12.5px; line-height: 1.48; max-width: 82ch;
}
.fig-src {
  color: var(--muted); font-size: 10px; white-space: nowrap; flex: none;
}

/* Uniform legend chips across all figures */
.legend { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 9px; border-radius: var(--r);
  background: transparent; border: 1px solid var(--line); color: var(--ink-2);
  font-size: 12px; cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease), transform .14s var(--ease);
}
.chip:hover { background: var(--bg-3); border-color: var(--line-2); color: var(--ink); transform: translateY(-1px); }
.chip:active { transform: translateY(0); }
.chip[aria-pressed="true"] { border-color: var(--ink-2); color: var(--ink); background: var(--bg-3); }
.chip svg.logo { width: 13px; height: 13px; flex: none; }
.chip-best { border-color: var(--line-2); font-size: 11.5px; }
.chip-best[aria-pressed="true"] { border-color: var(--gold); color: var(--gold-text); background: var(--gold-wash); }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r); padding: 4px; gap: 3px; }
.seg-b {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font-family: var(--mono); font-size: 11px; text-transform: uppercase;
  height: 26px; padding: 4px 10px; border-radius: 2px; display: inline-flex; align-items: center;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.seg-b:hover { color: var(--ink); background: var(--bg-3); }
.seg-b[aria-pressed="true"], .seg-b[aria-selected="true"] { color: var(--on-ink); background: var(--ink); }
.seg-single {
  border: 1px solid var(--line-2); border-radius: var(--r); height: 30px; padding: 0 10px;
}

.fig + .fig { margin-top: 18px; }
.sub-chart + .sub-chart { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.sub-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.sub-pair > .sub-chart + .sub-chart { margin-top: 0; padding-top: 0; border-top: 0; }

/* svg chart typography */
.ax { font-family: var(--mono); font-size: 11px; fill: var(--muted); }
.ax-gold { font-family: var(--mono); font-size: 10.5px; fill: var(--gold-text); }
.ax-red { font-family: var(--mono); font-size: 10.5px; fill: var(--danger); font-weight: 600; }
.ax-ink { font-family: var(--sans); font-size: 12.5px; fill: var(--ink); font-weight: 500; }
.ax-ink-2 { font-family: var(--sans); font-size: 12.5px; fill: var(--ink-2); }
.ax-link { cursor: pointer; }
.ax-link:hover { fill: var(--gold-text); text-decoration: underline; }
.lbl { font-family: var(--mono); font-size: 10.5px; fill: var(--ink-2); }
.lbl-ink { font-family: var(--mono); font-size: 11px; fill: var(--ink); }
.lbl-dark { font-family: var(--mono); font-size: 10.5px; fill: #0b0b0a; }
.lbl-light { font-family: var(--mono); font-size: 10.5px; fill: #fbfaf6; }
.grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.axis { stroke: var(--line-2); stroke-width: 1; shape-rendering: crispEdges; }

/* harness focus across all figures */
[data-h] { transition: opacity .22s var(--ease); }
body[data-focus] [data-h]:not([data-h-active]) { opacity: .14; }
.col-hit { fill: transparent; cursor: crosshair; }
.col-hit:hover, .col-hit:focus-visible, .col-hit.on { fill: var(--hover); }
.col-hit:focus-visible { outline: none; stroke: var(--gold); stroke-width: 1; }

/* ---------- sections ---------- */
.sec { padding: clamp(56px, 8.5vh, 96px) 0 0; }
.sec-head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 12px clamp(24px, 5vw, 72px);
  align-items: end; margin-bottom: 24px;
}
.sec-head h2 {
  font-size: clamp(26px, 2.9vw, 38px); font-weight: 500; letter-spacing: -.028em; line-height: 1.08;
  text-wrap: balance; display: flex; align-items: baseline; gap: 12px;
}
.sec-idx { color: var(--gold-text); font-size: 13px; flex: none; }
.sec-lede { color: var(--ink-2); max-width: 62ch; text-wrap: pretty; }

/* ---------- glanceable key takeaways (directly under hero intro) ---------- */
.takeaways {
  list-style: none; padding: 0; margin: 0 0 14px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.takeaways li {
  background: color-mix(in oklab, var(--bg-1) 90%, transparent);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 14px;
}
.tk-title {
  font-size: 13.5px; font-weight: 500; color: var(--ink);
  letter-spacing: -.01em; line-height: 1.3; margin-bottom: 3px;
}
.tk-body {
  font-size: 12.5px; line-height: 1.4; color: var(--ink-2);
}
.tk-body strong { color: var(--ink); font-weight: 500; }
.tk-red { color: var(--danger); font-family: var(--mono); font-size: 11.5px; }
.tk-gold { color: var(--gold-text); font-family: var(--mono); font-size: 11.5px; }

/* ---------- tool-mix legend ---------- */
.mix-legend {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  padding: 2px 2px 10px; font-size: 11.5px; color: var(--ink-2);
}
.mix-key { display: inline-flex; align-items: center; gap: 6px; }
.mix-key i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }

/* ---------- data tables ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.dtable th, .dtable td {
  padding: 9px 11px; text-align: right; border-bottom: 1px solid var(--line);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.dtable th:first-child, .dtable td:first-child { text-align: left; }
.dtable thead th {
  font-family: var(--mono); font-size: 10.5px; font-weight: 400; text-transform: uppercase;
  color: var(--muted);
}
.dtable td { color: var(--ink-2); }
.dtable td.strong, .dtable th[scope="row"] { color: var(--ink); font-weight: 500; }
.dtable tbody tr { transition: background-color .15s var(--ease); }
.dtable tbody tr:hover { background: var(--bg-2); }
.dtable-tight th, .dtable-tight td { padding: 7px 8px; font-size: 12.5px; }
/* Compact explorer table so all columns fit cleanly inside 1440px without horizontal clipping */
.dtable-explorer th, .dtable-explorer td { padding: 9px 8px; font-size: 12.5px; }
.dtable-explorer thead th { font-size: 10px; white-space: normal; line-height: 1.3; vertical-align: bottom; }

.hname { display: inline-flex; align-items: center; gap: 7px; }
.hname svg.logo { width: 14px; height: 14px; flex: none; }
.num { font-family: var(--mono); font-size: 11.5px; text-transform: none; font-variant-numeric: tabular-nums; }
.pips + .num { margin-left: 6px; }
tr.in-band .pass-n { color: var(--gold-text); }
.dtable td.place { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--muted); text-align: left; width: 1%; }
tr.in-band td.place { color: var(--ink); }
tr.in-band:first-child td.place { color: var(--gold-text); }
.best-badge {
  display: inline-block; margin-left: 5px; padding: 1px 5px; border-radius: 2px;
  font-family: var(--mono); font-size: 9.5px; text-transform: uppercase;
  color: var(--gold-text); background: var(--gold-wash); border: 1px solid var(--gold-border);
}

/* ---------- model explorer ---------- */
.model-anchors { position: relative; height: 0; }
.model-anchor { position: absolute; top: 0; left: 0; width: 1px; height: 1px; }
.model-tabs {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0;
  border: 1px solid var(--line); border-radius: 6px 6px 0 0; overflow: hidden;
}
.mtab {
  position: relative; text-align: left; cursor: pointer;
  background: var(--bg-1); border: 0; border-right: 1px solid var(--line);
  padding: 12px 14px 14px; min-height: 68px;
  transition: background-color .18s var(--ease);
}
.mtab:last-child { border-right: 0; }
.mtab:hover { background: var(--bg-2); }
.mtab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.mtab[aria-selected="true"] { background: var(--bg-2); }
.mtab[aria-selected="true"]::after { transform: scaleX(1); }
.mtab-name { display: block; font-size: 13.5px; font-weight: 500; color: var(--ink); letter-spacing: -.01em; }
.mtab-sub { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.mtab[aria-selected="true"] .mtab-sub { color: var(--gold-text); }

.model-panel { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 6px 6px; background: var(--bg-1); }
.mp-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: end;
  padding: 22px 20px 18px; border-bottom: 1px solid var(--line);
}
.mp-meta { color: var(--muted); margin-bottom: 6px; }
.mp-name { font-size: clamp(24px, 2.7vw, 34px); font-weight: 500; letter-spacing: -.028em; line-height: 1.08; }
.mp-facts { display: flex; flex-wrap: wrap; gap: 14px clamp(16px, 2.6vw, 32px); }
.mp-facts div { display: grid; gap: 3px; }
.mp-facts dt { color: var(--muted); font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; }
.mp-facts dd { font-family: var(--mono); font-size: 18px; line-height: 1.2; text-transform: none; }
.mp-facts dd .fact-sub { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }

.mp-insights {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px;
  padding: 13px 20px; background: var(--bg-2); border-bottom: 1px solid var(--line);
  font-size: 13px; line-height: 1.48; color: var(--ink-2);
}
.mp-insights strong { color: var(--ink); font-weight: 500; }
.mp-ins-label {
  display: block; font-family: var(--mono); font-size: 10px; text-transform: uppercase;
  color: var(--gold-text); margin-bottom: 3px;
}

.mp-block { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.mp-block:last-child { border-bottom: 0; }
.mp-h { color: var(--ink-2); font-weight: 400; margin-bottom: 12px; }
.mp-hint { color: var(--muted); text-transform: none; font-family: var(--sans); font-size: 12px; margin-left: 6px; }
.mp-h-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.mp-h-row .mp-h { margin: 0; }
.mp-block .fig-body { padding: 0; min-height: 0; }
.mp-block .fig-note { padding: 10px 0 0; }

.pips { display: inline-flex; gap: 2px; vertical-align: middle; }
.pips i { width: 7px; height: 11px; border-radius: 1px; background: var(--line-2); }
.pips i.p { background: var(--gold); }
.pips i.near { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='2' height='2' fill='%23bcb8ae'/%3E%3Crect x='2' y='2' width='2' height='2' fill='%23bcb8ae'/%3E%3C/svg%3E"); opacity: .65; }

/* Task x Harness matrix with inline side-by-side detail strip */
.matrix { display: grid; gap: 2px; font-family: var(--mono); font-size: 11px; }
.mx-row { display: grid; grid-template-columns: minmax(150px, 1.2fr) repeat(4, minmax(0, 1fr)); gap: 2px; }
.mx-row.head > div { color: var(--muted); text-transform: uppercase; padding: 0 10px 6px; display: flex; align-items: center; gap: 7px; }
.mx-row.head svg.logo { width: 14px; height: 14px; flex: none; }
.mx-task {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 10px; color: var(--ink); background: var(--bg-2); min-height: 44px;
  border: 1px solid transparent; border-radius: 2px; cursor: pointer; text-align: left; width: 100%;
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
}
.mx-task:hover { background: var(--bg-3); border-color: var(--line-2); }
.mx-task[aria-expanded="true"] { background: var(--bg-3); border-color: var(--gold-border); color: var(--gold-text); }
.mx-task .rate { color: var(--muted); font-size: 10.5px; }
.mx-divider { grid-column: 1 / -1; height: 1px; background: var(--line-2); margin: 6px 0; position: relative; }
.mx-divider span { position: absolute; right: 0; top: -7px; background: var(--bg-1); padding-left: 8px; color: var(--muted); font-size: 10.5px; text-transform: uppercase; }
.mx-cell {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  min-height: 44px; padding: 0 10px; background-color: var(--bg-2); color: var(--ink-2);
  border: 1px solid transparent; border-radius: 2px;
  cursor: pointer; outline-offset: -2px;
  transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.mx-cell:hover { border-color: var(--line-2); }
.mx-cell.pass {
  background-color: var(--gold-wash); color: var(--gold-text);
  border-color: var(--gold-border);
}
.mx-cell .tag { color: var(--muted); text-transform: uppercase; font-size: 10px; }
.mx-cell:not(.pass) > span:not(.runs) { background: var(--bg-2); padding: 1px 4px; margin: 0 -4px; border-radius: 2px; }
.mx-cell .runs { display: inline-flex; gap: 3px; }
.mx-cell .runs i { width: 7px; height: 7px; border: 1px solid var(--muted); }
.mx-cell .runs i.p { background: var(--gold); border-color: var(--gold); }
.mx-cell.flaky { background-color: var(--flaky); border-color: color-mix(in oklab, var(--gold-border) 50%, var(--line)); }

.mx-detail {
  grid-column: 1 / -1;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 4px;
  padding: 12px 14px; margin: 2px 0 6px;
  font-family: var(--sans); font-size: 12.5px; color: var(--ink-2);
}
.mx-detail-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px;
  padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid var(--line);
}
.mx-detail-head strong { color: var(--ink); font-size: 13.5px; font-weight: 500; }
.mx-detail-close {
  background: transparent; border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 3px 8px; font-family: var(--mono); font-size: 10.5px; cursor: pointer; color: var(--ink-2);
}
.mx-detail-close:hover { background: var(--bg-3); color: var(--ink); }
.mx-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mx-dcol {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 4px; padding: 10px;
}
.mx-dcol-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.mx-dcol-status { font-family: var(--mono); font-size: 10.5px; }
.mx-dcol-status.pass { color: var(--gold-text); }
.mx-dcol-runs { display: grid; gap: 5px; font-family: var(--mono); font-size: 10.5px; }
.mx-drun {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 8px;
  padding-top: 5px; border-top: 1px solid var(--line); color: var(--ink-2);
}
.mx-drun:first-child { border-top: 0; padding-top: 0; }
.mx-drun b { font-weight: 400; color: var(--ink); }
.mx-drun-res { white-space: nowrap; }
.mx-drun-meta { white-space: nowrap; color: var(--muted); }

/* ---------- methodology / setup ---------- */
.setup-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.setup-col { background: var(--bg-1); border: 1px solid var(--line); border-radius: 6px; padding: 16px; min-width: 0; }
.setup-sub { margin-top: 20px; }
.task-list { list-style: none; padding: 0; display: grid; gap: 0; }
.task-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.task-list li:last-child { border-bottom: 0; }
.task-list .num { color: var(--muted); }

.notes { margin-top: 16px; background: var(--bg-1); border: 1px solid var(--line); border-radius: 6px; padding: 16px 20px; }
.meth-list { list-style: none; padding: 0; display: grid; gap: 10px; font-size: 13.5px; line-height: 1.52; color: var(--ink-2); }
.meth-list li { padding-left: 14px; position: relative; }
.meth-list li::before { content: ""; position: absolute; left: 0; top: .58em; width: 5px; height: 5px; background: var(--gold); }
.meth-list strong { color: var(--ink); font-weight: 500; }
.meth-list a { color: var(--ink); text-decoration-color: var(--gold); }

/* ---------- footer ---------- */
.foot { position: relative; margin-top: clamp(72px, 11vh, 128px); border-top: 1px solid var(--line); overflow: hidden; }
.foot-lines { width: 100%; height: 200px; }
.foot-lines path { stroke: var(--foot-line); }
.foot-stripe {
  position: absolute; left: 0; right: 0; top: 78px; height: 42px;
  background: linear-gradient(90deg, var(--gold-hi), var(--gold) 45%, var(--gold-lo));
  display: grid; place-items: center;
}
.foot-word {
  width: 204px; height: 26px; background: #0b0b0a;
  -webkit-mask: url("../img/fariszr-gold.png") center / contain no-repeat;
  mask: url("../img/fariszr-gold.png") center / contain no-repeat;
}
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-top: 18px; padding-bottom: 24px; color: var(--muted); }
.foot-credit { font-size: 12.5px; }
.foot-top { color: var(--ink-2); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.foot-top:hover { color: var(--gold-text); }

/* ---------- tooltip ---------- */
.tip {
  position: fixed; z-index: 90; left: 0; top: 0; pointer-events: none;
  min-width: 240px; max-width: 380px; padding: 11px 12px 10px;
  background: var(--tip-bg); border: 1px solid var(--line-2); border-radius: var(--r);
  box-shadow: var(--tip-shadow);
  font-size: 12.5px; color: var(--ink-2);
  opacity: 0; transform: translateY(4px); transition: opacity .12s var(--ease), transform .12s var(--ease);
}
.tip.on { opacity: 1; transform: none; }
.tip-title { font-weight: 500; color: var(--ink); font-size: 13px; }
.tip-sub { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.tip-note { font-size: 12px; line-height: 1.45; color: var(--ink-2); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.tip-val { font-family: var(--mono); font-size: 20px; color: var(--ink); line-height: 1.15; margin: 7px 0 4px; }
.tip-rows { display: grid; gap: 5px; margin-top: 8px; }
.tip-row { display: grid; grid-template-columns: 14px minmax(88px, 1fr) auto auto; gap: 8px; align-items: center; }
.tip-row span { white-space: nowrap; }
.tip-row b { font-family: var(--mono); font-weight: 400; color: var(--ink); font-size: 11.5px; text-align: right; white-space: nowrap; }
.tip-row em { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--muted); text-align: right; min-width: 52px; white-space: nowrap; }
.tip-row svg.logo { width: 13px; height: 13px; }
.tip-kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin-top: 6px; align-items: baseline; }
.tip-kv span:nth-child(odd) { white-space: nowrap; }
.tip-kv span:nth-child(even) { font-family: var(--mono); font-size: 11.5px; color: var(--ink); text-align: right; }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .nav-links a { padding: 12px 7px; }
  .nav-links a::after { left: 7px; right: 7px; }
  .model-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mtab:nth-child(3) { border-right: 0; }
  .mtab:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .setup-grid { grid-template-columns: 1fr 1fr; }
  .setup-col:last-child { grid-column: 1 / -1; }
  .mx-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .run-tag { display: none; }
  .sec-head { grid-template-columns: 1fr; }
  .takeaways { grid-template-columns: 1fr; gap: 14px; }
  .std-grid { grid-template-columns: 1fr; }
  .sub-pair { grid-template-columns: 1fr; gap: 0; }
  .sub-pair > .sub-chart + .sub-chart { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
  .mp-head { grid-template-columns: 1fr; }
  .mp-insights { grid-template-columns: 1fr; gap: 10px; }
  .foot-row { flex-direction: column; align-items: flex-start; gap: 6px; }
}
@media (max-width: 760px) {
  section, .fig, .model-panel, .model-anchor { scroll-margin-top: 108px; }
  .nav-links { display: none; }
  .mob-nav { display: block; }
  .brand-name { font-size: 13px; }
  .scope-inline { display: block; margin-left: 0; margin-top: 4px; }
  .model-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mtab:nth-child(3) { border-right: 1px solid var(--line); }
  .mtab:nth-child(2n) { border-right: 0; }
  .mtab:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  .mx-row { grid-template-columns: minmax(96px, 1fr) repeat(4, minmax(0, 1fr)); }
  .mx-cell { padding: 0 6px; justify-content: center; }
  .mx-cell .tag-long { display: none; }
  .mx-row.head .tag-long { display: none; }
  .mx-row.head > div { justify-content: center; }
  .mx-row.head > div:first-child { justify-content: flex-start; }
  .mx-detail-grid { grid-template-columns: 1fr; }
  .setup-grid { grid-template-columns: 1fr; }
  .notes-grid { grid-template-columns: 1fr; }
  .notes { padding: 14px 14px 4px; }
  .fig-head { padding: 10px 12px; gap: 8px 10px; }
  .lead-bar { padding: 0 12px 6px; }
  .gold-key-sub { display: none; }
  .fig-body { padding: 8px 10px 4px; }
  .fig-foot { padding: 8px 12px 10px; }
  .mp-head, .mp-insights, .mp-block { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 480px) {
  .mx-row { grid-template-columns: 78px repeat(4, minmax(0, 1fr)); }
  .mx-task { padding: 0 6px; font-size: 10px; }
  .mx-task .rate { display: none; }
}

/* ---------- Fig. 02 score & cost heatmap matrix ---------- */
.fig-matrix { margin-top: 24px; }
.hm-key { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); }
.hm-ramp { display: inline-flex; gap: 2px; align-items: center; }
.hm-ramp i { width: 11px; height: 10px; border-radius: 2px; display: inline-block; border: 1px solid var(--line); }
.hm-ramp i:nth-child(1) { background: rgba(56, 178, 108, .04); }
.hm-ramp i:nth-child(2) { background: rgba(56, 178, 108, .10); }
.hm-ramp i:nth-child(3) { background: rgba(56, 178, 108, .17); }
.hm-ramp i:nth-child(4) { background: rgba(56, 178, 108, .24); }
.hm-ramp i:nth-child(5) { background: rgba(56, 178, 108, .30); }
:root[data-theme="light"] .hm-ramp i:nth-child(1) { background: rgba(26, 138, 78, .04); }
:root[data-theme="light"] .hm-ramp i:nth-child(2) { background: rgba(26, 138, 78, .09); }
:root[data-theme="light"] .hm-ramp i:nth-child(3) { background: rgba(26, 138, 78, .15); }
:root[data-theme="light"] .hm-ramp i:nth-child(4) { background: rgba(26, 138, 78, .21); }
:root[data-theme="light"] .hm-ramp i:nth-child(5) { background: rgba(26, 138, 78, .26); }

.hm-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hm-table {
  width: 100%; min-width: 640px; border-collapse: separate; border-spacing: 7px;
  margin: 0;
}
.hm-table th {
  font-family: var(--mono); font-size: 10.5px; font-weight: 400; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; padding: 4px 8px 6px; text-align: center;
}
.hm-table th.hm-col-model { text-align: left; width: 204px; padding-left: 4px; }
.hm-hhead {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink); font-family: var(--sans); font-size: 13px; font-weight: 500;
  text-transform: none; letter-spacing: -.01em;
}
.hm-hhead svg.logo { width: 14px; height: 14px; }
.hm-mcell { padding: 4px 8px 4px 2px; vertical-align: middle; text-align: left; }
.hm-mbtn {
  background: transparent; border: 0; padding: 4px 2px; text-align: left; cursor: pointer;
  display: block; width: 100%; border-radius: var(--r);
}
.hm-mbtn:hover .hm-mname { color: var(--gold-text); }
.hm-mname { font-family: var(--sans); font-size: 13.5px; font-weight: 500; color: var(--ink); text-transform: none; letter-spacing: -.01em; display: block; transition: color .15s var(--ease); }
.hm-mtag { font-family: var(--mono); font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-top: 2px; display: block; }

.hm-cell {
  border-radius: 6px; padding: 11px 13px; text-align: left;
  border: 1px solid var(--line); vertical-align: middle; cursor: default;
  transition: opacity .15s var(--ease), border-color .15s var(--ease);
}
.hm-mob-h { display: none; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; color: var(--ink-2); margin-bottom: 4px; }
.hm-mob-h svg.logo { width: 12px; height: 12px; flex: none; }
.hm-cell.pareto { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.hm-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.hm-score { font-family: var(--mono); font-size: 18px; font-weight: 500; color: var(--ink); letter-spacing: -.02em; }
.hm-score.top-score { color: #56c986; }
:root[data-theme="light"] .hm-score.top-score { color: #167a44; }
.hm-score small { font-size: 11px; color: var(--muted); }
.hm-badge {
  font-family: var(--mono); font-size: 9px; letter-spacing: .05em; text-transform: uppercase;
  padding: 2px 5px; border-radius: 3px;
  color: var(--gold-text); border: 1px solid var(--gold-border); background: var(--gold-wash);
}
.hm-sub {
  margin-top: 5px; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  font-family: var(--mono); font-size: 11px; color: var(--ink-2);
}
.hm-rel { color: var(--muted); }
.hm-rel.cheap { color: var(--gold-text); }
.hm-rel.red { color: var(--danger); font-weight: 600; }
.hm-delta {
  font-family: var(--mono); font-size: 11px; padding: 2px 6px; border-radius: 3px;
  border: 1px solid var(--line);
}
.hm-delta.good { color: #56c986; border-color: rgba(86, 201, 134, .35); background: rgba(56, 178, 108, .12); }
.hm-delta.bad { color: var(--danger); border-color: rgba(240, 100, 90, .4); background: rgba(240, 100, 90, .12); }
.hm-delta.flat { color: var(--muted); }
.hm-dir.good { color: #56c986; }
.hm-dir.bad { color: var(--danger); }
.hm-dir.flat { color: var(--ink-2); }
:root[data-theme="light"] .hm-delta.good, :root[data-theme="light"] .hm-dir.good { color: #167a44; }
:root[data-theme="light"] .hm-delta.bad, :root[data-theme="light"] .hm-dir.bad { color: #b92c22; }

body[data-focus] .hm-cell:not([data-h-active]),
body[data-focus] .hm-table thead th[data-h]:not([data-h-active]) { opacity: .24; }

@media (max-width: 720px) {
  .hm-scroll { overflow-x: visible; }
  .hm-table, .hm-table tbody { display: block; width: 100%; min-width: 0; }
  .hm-table thead { display: none; }
  .hm-table tbody tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px;
    padding: 10px 0 12px; border-top: 1px solid var(--line);
  }
  .hm-table tbody tr:first-child { border-top: 0; padding-top: 2px; }
  .hm-mcell { grid-column: 1 / -1; padding: 0 2px 2px; }
  .hm-mbtn { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0; }
  .hm-mtag { margin-top: 0; }
  .hm-cell { display: block; padding: 9px 10px; }
  .hm-mob-h { display: flex; }
  .hm-score { font-size: 16px; }
  .hm-sub { font-size: 10px; margin-top: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}
@media (forced-colors: active) {
  .mx-cell.pass, .pix { border-color: Highlight; }
}
