/* Instrument: an evaluation console. Fonts are local, SIL OFL 1.1 (see assets/fonts). */
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/InstrumentSans-var.ttf") format("truetype");
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("fonts/MartianMono-var.ttf") format("truetype");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
}

:root {
  --bg: #090a0d;
  --bg-2: #0e1014;
  --bg-3: #14171d;
  --line: #20242d;
  --line-2: #343a48;
  --dim: #7b8595;
  --mut: #98a1b0;
  --text: #eceef2;
  --sig: #ff5a1f;
  --sig-2: #ff7c4d;
  --ice: #7fd8f7;
  --lime: #c8ee6b;
  /* One accent per theme. --theme is set by [data-theme] in v2.css. */
  --t-evals: var(--sig);
  --t-triathlon: var(--ice);
  --t-healthcare: var(--lime);
  --theme: var(--sig);
  --sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gut: 40px;
  --max: 1440px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, dl, dd, figure, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
code, .mono { font-family: var(--mono); font-stretch: 87.5%; }
code { font-size: .86em; }
::selection { background: var(--sig); color: #0a0a0a; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--sig); color: #0a0a0a; padding: 10px 14px;
  font: 500 12px/1 var(--mono); font-stretch: 87.5%;
}
.skip:focus { top: 12px; }

.label {
  font: 400 10.5px/1.4 var(--mono);
  font-stretch: 87.5%;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 40;
  height: 52px;
  display: flex; align-items: center; gap: 28px;
  padding: 0 var(--gut);
  background: rgba(9, 10, 13, .82);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.brand svg { display: block; }
.bar nav { display: flex; gap: 4px; margin-left: auto; }
.bar nav a, .bar-mail {
  font: 400 11px/1 var(--mono); font-stretch: 87.5%;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--mut); padding: 9px 10px; border-radius: 2px;
  transition: color .15s, background .15s;
}
.bar nav a:hover { color: var(--text); background: var(--bg-3); }
.bar-mail { text-transform: none; letter-spacing: 0; color: var(--text); border: 1px solid var(--line-2); padding: 8px 12px; }
.bar-mail:hover { border-color: var(--sig); color: var(--sig-2); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 43fr) minmax(0, 57fr);
  min-height: calc(100vh - 52px);
  min-height: min(calc(100svh - 52px), 1000px);
  border-bottom: 1px solid var(--line);
}
.hero-copy {
  position: relative;
  padding: 40px 28px 36px var(--gut);
  display: flex; flex-direction: column; justify-content: center;
}
.kicker { display: flex; align-items: center; gap: 12px; color: var(--mut); margin-bottom: 26px; }
.kicker i { display: inline-block; width: 28px; height: 1px; background: var(--sig); }
h1 {
  font-size: clamp(64px, 10.2vw, 168px);
  font-weight: 600;
  font-stretch: 86%;
  line-height: .84;
  letter-spacing: -.05em;
  margin-left: -.05em;
  white-space: nowrap;
}
h1 span { display: block; }
.lede {
  margin-top: 32px;
  max-width: 20em;
  font-size: clamp(21px, 1.86vw, 30px);
  line-height: 1.2;
  letter-spacing: -.02em;
  font-weight: 500;
}
.lede em { font-style: normal; color: var(--sig-2); }
.hero-body { margin-top: 16px; max-width: 35em; color: var(--mut); font-size: 15.5px; line-height: 1.5; }
.facts {
  margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px 30px;
}
.facts dt { margin-bottom: 4px; }
.facts dd { font: 400 11.5px/1.4 var(--mono); font-stretch: 87.5%; color: var(--text); }
.reach { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.reach a {
  display: block; padding: 10px 14px 10px; border: 1px solid var(--line-2); border-radius: 2px;
  font: 400 12px/1.3 var(--mono); font-stretch: 87.5%; color: var(--text);
  transition: border-color .15s, color .15s, background .15s;
}
.reach a .label { display: block; margin-bottom: 3px; }
.reach a:hover { border-color: var(--sig); color: var(--sig-2); background: rgba(255, 90, 31, .06); }

/* the instrument: scene, reading, settling chart, controls */
.inst { display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--line); background: var(--bg-2); }
.inst-head { display: flex; align-items: center; gap: 14px; padding: 10px var(--gut) 10px 20px; border-bottom: 1px solid var(--line); }
.tag {
  flex: none;
  font: 500 10px/1 var(--mono); font-stretch: 87.5%; letter-spacing: .12em; text-transform: uppercase;
  color: var(--sig-2); border: 1px solid var(--sig); padding: 5px 7px 4px;
  display: inline-flex; align-items: center; gap: 7px;
}
.tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--sig); animation: pulse 1.6s ease-in-out infinite; }
.is-paused .tag i { animation: none; opacity: .35; }
@keyframes pulse { 50% { opacity: .25; } }
.deck-note { font: 400 10.5px/1.45 var(--mono); font-stretch: 87.5%; color: var(--mut); }

.stage { position: relative; flex: 1; min-height: 300px; background: var(--bg); overflow: hidden; }
.stage::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(420px 300px at 30% 50%, rgba(255, 90, 31, .1), transparent 70%),
    linear-gradient(rgba(32, 36, 45, .6) 1px, transparent 1px) 0 -1px / 40px 40px,
    linear-gradient(90deg, rgba(32, 36, 45, .6) 1px, transparent 1px) -1px 0 / 40px 40px;
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-key {
  position: absolute; right: 16px; bottom: 12px; z-index: 2;
  display: flex; gap: 16px; align-items: center;
  background: rgba(9, 10, 13, .8); padding: 6px 10px; border: 1px solid var(--line);
}
.stage-key span { display: inline-flex; align-items: center; gap: 6px; color: var(--mut); }
.sw { display: inline-block; width: 8px; height: 8px; background: var(--ice); }
.sw.fail { background: var(--sig); }
.sw.miss { width: 5px; height: 5px; background: var(--text); }

.inst-read { display: grid; grid-template-columns: 258px minmax(0, 1fr); border-top: 1px solid var(--line); }
.inst-read > * { padding: 14px 20px 14px; min-width: 0; }
.inst-read .read { border-right: 1px solid var(--line); }
.inst-read .chart-cell { padding-right: var(--gut); }
.read-val {
  font: 500 72px/1 var(--mono); font-stretch: 80%; letter-spacing: -.04em;
  color: var(--text); margin: 8px 0 8px -3px;
  font-variant-numeric: tabular-nums;
}
.read-line { font: 400 11px/1.5 var(--mono); font-stretch: 87.5%; color: var(--mut); font-variant-numeric: tabular-nums; }
.read-line b { font-weight: 500; color: var(--text); }
.read-2 { margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line-2); display: flex; align-items: baseline; gap: 10px; }
.read-2 b { font: 500 17px/1 var(--mono); font-stretch: 80%; color: var(--ice); font-variant-numeric: tabular-nums; }

.chart-cell { display: flex; flex-direction: column; }
.chart-wrap { position: relative; flex: 1; min-height: 120px; margin-top: 6px; }
.chart-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.chart-cap { display: flex; justify-content: space-between; gap: 4px 16px; flex-wrap: wrap; }
.chart-cap .label:last-child { color: var(--mut); text-transform: none; letter-spacing: 0; }

.ctl {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 10px 26px; align-items: start;
  padding: 14px var(--gut) 14px 20px; border-top: 1px solid var(--line);
}
.ctl-row { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; align-items: baseline; }
.ctl-row label { font: 500 11.5px/1.3 var(--mono); font-stretch: 87.5%; color: var(--text); }
.ctl-row output { font: 500 12px/1 var(--mono); font-stretch: 87.5%; color: var(--sig-2); text-align: right; font-variant-numeric: tabular-nums; }
.ctl-row input { grid-column: 1 / -1; }
.ctl-row small { grid-column: 1 / -1; font: 400 10px/1.3 var(--mono); font-stretch: 87.5%; color: var(--mut); }
.ctl-try { grid-column: 1 / -1; font-size: 13.5px; line-height: 1.4; color: var(--mut); }
.ctl-try b { color: var(--text); font-weight: 600; }
input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 24px; background: transparent; margin: 0; cursor: pointer;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(90deg, var(--sig) var(--fill, 50%), var(--line-2) var(--fill, 50%));
}
input[type=range]::-moz-range-track { height: 2px; background: var(--line-2); }
input[type=range]::-moz-range-progress { height: 2px; background: var(--sig); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 18px; margin-top: -8px;
  background: var(--text); border: 0; border-radius: 1px;
  box-shadow: 0 0 0 3px var(--bg-2);
  transition: background .12s, transform .12s;
}
input[type=range]::-moz-range-thumb { width: 12px; height: 18px; background: var(--text); border: 0; border-radius: 1px; }
input[type=range]:hover::-webkit-slider-thumb, input[type=range]:focus-visible::-webkit-slider-thumb { background: var(--sig); transform: scaleY(1.12); }
input[type=range]:focus-visible { outline: 2px solid var(--ice); outline-offset: 2px; }
.ctl-btns { display: flex; gap: 8px; align-self: center; }
.btn {
  font: 500 10.5px/1 var(--mono); font-stretch: 87.5%; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text); background: transparent; border: 1px solid var(--line-2);
  padding: 10px 12px 9px; cursor: pointer; border-radius: 1px;
  transition: border-color .12s, color .12s, background .12s;
}
.btn:hover { border-color: var(--sig); color: var(--sig-2); }
.btn[aria-pressed=true] { background: var(--sig); border-color: var(--sig); color: #0a0a0a; }

/* ---------- sections ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.sec { padding-top: 104px; }
.sec-head {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: end;
  padding-bottom: 28px; margin-bottom: 16px; border-bottom: 1px solid var(--line);
}
.sec-head h2 {
  font-size: clamp(44px, 6vw, 88px); font-weight: 600; font-stretch: 86%;
  letter-spacing: -.045em; line-height: .9;
  display: flex; align-items: baseline; gap: 18px;
}
.sec-head h2 .idx { font: 400 11px/1 var(--mono); font-stretch: 87.5%; letter-spacing: .09em; color: var(--sig-2); transform: translateY(-.4em); }
.sec-head p { color: var(--mut); max-width: 38em; font-size: 16px; }

/* ---------- panels ---------- */
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.panel {
  grid-column: span 12;
  position: relative;
  display: flex; flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  transition: border-color .2s;
}
.panel:hover, .panel:focus-within { border-color: var(--line-2); }
.s7 { grid-column: span 7; }
.s5 { grid-column: span 5; }
.p-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 20px 10px; border-bottom: 1px solid var(--line);
  font: 400 10.5px/1.3 var(--mono); font-stretch: 87.5%; letter-spacing: .06em; color: var(--dim);
}
.p-bar .n { color: var(--sig-2); }
.p-bar .repo { color: var(--text); letter-spacing: 0; font-size: 11.5px; }
.p-bar .theme { margin-left: auto; text-transform: uppercase; text-align: right; }
.p-body { padding: 26px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.panel.wide .p-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px 44px; }
.p-name { font: 400 11px/1.3 var(--mono); font-stretch: 87.5%; letter-spacing: .09em; text-transform: uppercase; color: var(--mut); margin-bottom: 12px; }
.p-q {
  font-size: clamp(27px, 2.7vw, 40px); font-weight: 600; font-stretch: 88%;
  line-height: 1.02; letter-spacing: -.032em; max-width: 14em;
}
.p-q a { background: linear-gradient(var(--sig), var(--sig)) 0 100% / 0 2px no-repeat; transition: background-size .25s; padding-bottom: 2px; }
.p-q a:hover, .p-q a:focus-visible { background-size: 100% 2px; }
.p-what { margin-top: 14px; color: var(--mut); font-size: 15.5px; max-width: 40em; }
.p-more {
  margin-top: 18px; display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  font: 400 11.5px/1.4 var(--mono); font-stretch: 87.5%; color: var(--text);
  border-bottom: 1px solid var(--line-2); padding-bottom: 4px;
  transition: border-color .15s, color .15s;
}
.p-more svg { flex: none; transition: transform .2s; }
.p-more:hover { color: var(--sig-2); border-color: var(--sig); }
.p-more:hover svg { transform: translateX(4px); }

.fig { margin-top: 28px; padding-top: 22px; border-top: 1px dashed var(--line-2); display: flex; flex-direction: column; flex: 1; }
.panel.wide .fig { margin-top: 0; padding-top: 0; border-top: 0; }
.fig, .p-text { container-type: inline-size; }
.fig-n {
  font: 500 64px/.9 var(--mono); font-stretch: 78%; letter-spacing: -.055em;
  font-size: clamp(46px, 14.5cqw, 96px);
  color: var(--sig); font-variant-numeric: tabular-nums; margin-left: -.03em; white-space: nowrap;
}
.fig-n small { font-size: .36em; letter-spacing: 0; color: var(--mut); font-weight: 400; margin: 0 .5em 0 .55em; }
.fig-l { margin-top: 12px; font-size: 17px; line-height: 1.3; font-weight: 500; letter-spacing: -.01em; max-width: 30em; }
.fig-g { margin: 24px 0 0; }
figcaption { margin-top: 18px; color: var(--mut); font-size: 13.5px; line-height: 1.5; max-width: 62em; }
.fig .p-more { margin-top: auto; }
.fig figcaption + .spacer { flex: 1; min-height: 18px; }

.key { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font: 400 10.5px/1.4 var(--mono); font-stretch: 87.5%; color: var(--mut); }
.key span { display: inline-flex; align-items: center; gap: 7px; }
.key i { display: inline-block; width: 9px; height: 9px; flex: none; }
.k-sig { background: var(--sig); }
.k-ice { background: var(--ice); }
.k-off { box-shadow: inset 0 0 0 1px var(--line-2); }
.k-bad { box-shadow: inset 0 0 0 2px var(--sig); }
.k-todo { background: repeating-linear-gradient(135deg, var(--line-2) 0 1px, transparent 1px 4px); }
.k-noise { background: repeating-linear-gradient(90deg, rgba(255, 90, 31, .75) 0 3px, rgba(255, 90, 31, .25) 3px 6px); }

/* interval plot (judge calibration) */
.ivl-plot { position: relative; padding: 22px 0 26px; }
.ivl-row { position: relative; }
.ivl-row + .ivl-row { margin-top: 14px; }
.ivl-row p { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font: 400 11.5px/1.3 var(--mono); font-stretch: 87.5%; color: var(--text); }
.ivl-row p code { font-size: 11.5px; }
.ivl-row p b { font-weight: 400; color: var(--mut); font-variant-numeric: tabular-nums; }
.ivl-row p > * { position: relative; z-index: 1; background: var(--bg-2); }
.ivl-row p > :first-child { padding-right: 6px; }
.ivl-row p > :last-child { padding-left: 6px; }
.ivl-track { position: relative; height: 30px; margin-top: 4px; border-bottom: 1px solid var(--line-2); background: repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 10%); border-right: 1px solid var(--line-2); }
.ivl-track .band { position: absolute; top: 9px; height: 12px; transform-origin: 50% 50%; transition: transform .9s cubic-bezier(.2, .7, .1, 1) .15s; }
.ivl-track .band::before, .ivl-track .band::after { content: ""; position: absolute; top: -5px; bottom: -5px; width: 2px; background: currentColor; }
.ivl-track .band::before { left: 0; } .ivl-track .band::after { right: 0; }
.ivl-track .band.sig { background: rgba(255, 90, 31, .32); color: var(--sig); }
.ivl-track .band.ice { background: rgba(127, 216, 247, .26); color: var(--ice); }
.ivl-track .pt { position: absolute; top: 15px; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; border: 2px solid var(--bg-2); transition: opacity .4s .7s; }
.ivl-track .pt.sig { background: var(--sig); box-shadow: 0 0 0 1.5px var(--sig); }
.ivl-track .pt.ice { background: var(--ice); box-shadow: 0 0 0 1.5px var(--ice); }
.ivl-over { position: absolute; top: 12px; bottom: 20px; border-left: 1px dashed var(--mut); border-right: 1px dashed var(--mut); background: rgba(236, 238, 242, .045); pointer-events: none; }
.ivl-over em { position: absolute; left: 50%; top: -12px; transform: translateX(-50%); font: 400 9.5px/1 var(--mono); font-stretch: 87.5%; font-style: normal; letter-spacing: .09em; text-transform: uppercase; color: var(--mut); background: var(--bg-2); padding: 0 6px; white-space: nowrap; }
.ivl-axis { position: absolute; left: 0; right: 0; bottom: 0; height: 12px; font: 400 10px/1 var(--mono); font-stretch: 87.5%; color: var(--dim); }
.ivl-axis span { position: absolute; top: 0; transform: translateX(-50%); }
.ivl-axis span:first-child { transform: none; } .ivl-axis span:last-child { transform: translateX(-100%); }
.js [data-reveal]:not(.in) .ivl-track .band { transform: scaleX(0); }
.js [data-reveal]:not(.in) .ivl-track .pt { opacity: 0; }

/* meters (verdict aggregation) */
.meters { display: grid; gap: 14px; }
.meter-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font: 400 11px/1.3 var(--mono); font-stretch: 87.5%; color: var(--mut); }
.meter-top b { font: 500 20px/1 var(--mono); font-stretch: 80%; color: var(--text); font-variant-numeric: tabular-nums; }
.meter-track {
  position: relative; height: 12px; margin-top: 7px;
  background: repeating-linear-gradient(90deg, var(--line-2) 0 1px, transparent 1px 10%) 0 0 / 100% 100%;
  border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2);
}
.meter-fill { position: absolute; left: 0; top: 0; bottom: 3px; width: calc(var(--v) * 1%); background: var(--ice); transition: width 1s cubic-bezier(.2, .7, .1, 1) .2s; }
.meter-fill.sig { background: var(--sig); }
.js [data-reveal]:not(.in) .meter-fill { width: 0; }
.va { display: grid; grid-template-columns: minmax(0, 272px) minmax(0, 1fr); gap: 32px; align-items: start; }
.va canvas { display: block; width: 100%; aspect-ratio: 41 / 37; }

/* slope chart (deep evaluator) */
.fig-cap { margin-bottom: 20px; color: var(--mut); }
.slope-plot { position: relative; height: 232px; margin: 14px 0 0; }
.slope-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; clip-path: inset(-10px 0 -10px 0); transition: clip-path 1.2s cubic-bezier(.3, .6, .2, 1) .2s; }
.js [data-reveal]:not(.in) .slope-plot svg { clip-path: inset(-10px 84% -10px 0); }
.slope-plot polyline { fill: none; stroke-width: 2.25; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.slope-plot polyline.a { stroke: var(--sig); } .slope-plot polyline.b { stroke: var(--ice); }
.slope-plot .gl { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--line); }
.slope-plot .gl em { position: absolute; left: 0; top: -14px; font: 400 9.5px/1 var(--mono); font-stretch: 87.5%; font-style: normal; color: var(--dim); }
.slope-plot .col { position: absolute; top: -8px; bottom: -8px; width: 0; border-left: 1px dashed var(--line-2); }
.slope-plot .dot { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: var(--bg-2); border: 2.25px solid var(--sig); transition: opacity .3s .5s; }
.slope-plot .dot.b { border-color: var(--ice); }
.slope-plot .val { position: absolute; font: 500 12px/1 var(--mono); font-stretch: 87.5%; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--sig-2); background: var(--bg-2); padding: 2px 3px; }
.slope-plot .val.b { color: var(--ice); }
.slope-plot .val.l { transform: translate(calc(-100% - 12px), -50%); }
.slope-plot .val.l.up { transform: translate(calc(-100% - 12px), calc(-50% - 9px)); }
.slope-plot .val.l.dn { transform: translate(calc(-100% - 12px), calc(-50% + 9px)); }
.slope-plot .val.r { transform: translate(12px, -50%); }
.slope-plot .val.t { transform: translate(-50%, calc(-100% - 10px)); }
.slope-plot .val.a.t { transform: translate(10px, calc(-100% - 8px)); }
.js [data-reveal]:not(.in) .slope-plot .dot, .js [data-reveal]:not(.in) .slope-plot .val { opacity: 0; }
.slope-plot .val { transition: opacity .3s .9s; }
.slope-cols { display: grid; grid-template-columns: 33% 34% 33%; margin-top: 18px; }
.slope-cols span { text-align: center; font: 400 10.5px/1.35 var(--mono); font-stretch: 87.5%; color: var(--text); padding: 0 4px; }
.pairs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 18px; }
.pairs svg { display: block; width: 20px; height: 20px; border: 1px solid var(--line); transition: opacity .3s calc(var(--i) * 40ms); }
.pairs .x { stroke: var(--sig); border-color: rgba(255, 90, 31, .45); }
.pairs .p { stroke: var(--dim); }
.js [data-reveal]:not(.in) .pairs svg { opacity: .15; }
.panel.wide .p-text { display: flex; flex-direction: column; align-items: flex-start; }
.panel.wide .p-text .fig-n { margin-top: 34px; }
.panel.wide .p-text .p-more { margin-top: auto; }
.panel.wide .p-text .pairs + .p-more, .panel.wide .p-text .p-what + .p-more { padding-top: 0; }
.panel.wide .p-text .pairs { margin-bottom: 28px; }
.panel.wide .p-text .p-what { margin-bottom: 0; }
.panel.wide .p-text .p-what + .p-more { margin-top: 28px; }

/* unit cells (harbor, few-shot) */
.units { display: grid; grid-template-columns: repeat(var(--cols, 10), minmax(0, 1fr)); gap: 4px; max-width: var(--uw, none); }
.units i {
  display: block; aspect-ratio: 1 / 1; min-width: 0;
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background .25s calc(var(--i) * 16ms), box-shadow .25s calc(var(--i) * 16ms);
}
.units i.on { background: var(--sig); box-shadow: none; }
.units i.ok { background: var(--ice); box-shadow: none; }
.units i.bad { box-shadow: inset 0 0 0 2px var(--sig); }
.units i.todo { box-shadow: none; background: repeating-linear-gradient(135deg, var(--line-2) 0 1px, transparent 1px 4px); }
.js [data-reveal]:not(.in) .units i.on, .js [data-reveal]:not(.in) .units i.ok { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.u-row + .u-row { margin-top: 20px; }
.u-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; font: 400 11px/1.3 var(--mono); font-stretch: 87.5%; color: var(--mut); }
.u-head b { font-weight: 500; color: var(--text); }
.units.sm { gap: 3px; }
.lanes .units { gap: 3px; }
.lanes .u-head { justify-content: flex-start; gap: 14px; }
.lane-set { position: relative; padding-bottom: 22px; }
.lane-set .bar-mark { position: absolute; top: 18px; bottom: 0; left: calc(22 / 24 * 100% - 2.5px); width: 0; border-left: 2px solid var(--text); pointer-events: none; }
.lane-set .bar-mark em { position: absolute; right: 8px; bottom: 0; white-space: nowrap; font: 400 10px/1 var(--mono); font-stretch: 87.5%; font-style: normal; letter-spacing: .08em; text-transform: uppercase; color: var(--text); }

/* commit matrix (eval pipeline) */
.pf { width: 100%; border-collapse: separate; border-spacing: 0 3px; font: 400 11px/1.3 var(--mono); font-stretch: 87.5%; }
.pf th { font-weight: 400; text-align: left; color: var(--mut); padding: 0 12px 0 0; }
.pf thead th { color: var(--text); padding: 0 0 20px; position: relative; text-align: center; font-size: 11px; }
.pf thead th:first-child { text-align: left; color: var(--dim); text-transform: uppercase; letter-spacing: .09em; font-size: 10px; }
.pf thead th.c::before { content: ""; position: absolute; left: -2px; right: -2px; bottom: 9px; height: 1px; background: var(--line-2); }
.pf thead th.c::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: var(--bg-2); border: 1.5px solid var(--mut); }
.pf thead th.flag { color: var(--sig-2); }
.pf thead th.flag::after { background: var(--sig); border-color: var(--sig); box-shadow: 0 0 0 4px rgba(255, 90, 31, .22); }
.pf thead th.flag em { position: absolute; left: 0; right: 0; top: -17px; font-style: normal; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--sig-2); }
.pf td { padding: 0 2px; width: 17.5%; }
.pf td span {
  display: block; height: 22px; line-height: 22px; text-align: center; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase;
  transition: opacity .4s calc(var(--c) * 140ms);
}
.js [data-reveal]:not(.in) .pf td span { opacity: 0; }
.pf td.p span { background: rgba(127, 216, 247, .12); color: rgba(127, 216, 247, .72); }
.pf td.f span { background: rgba(255, 90, 31, .13); color: rgba(255, 124, 77, .85); }
.pf td.p.ch span { background: var(--ice); color: #06222c; font-weight: 600; }
.pf td.f.ch span { background: var(--sig); color: #1c0700; font-weight: 600; }
.pf tfoot th, .pf tfoot td { padding-top: 10px; color: var(--text); text-align: center; font-variant-numeric: tabular-nums; }
.pf tfoot th { text-align: left; color: var(--mut); }
.key .kp { background: var(--ice); } .key .kf { background: var(--sig); }
.key .kpd { background: rgba(127, 216, 247, .16); } .key .kfd { background: rgba(255, 90, 31, .18); }
.key .duo { gap: 3px; } .key .duo em { font-style: normal; margin-left: 4px; }

/* ---------- research, experience, contact ---------- */
.rows { border-top: 0; }
.pub { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; padding: 30px 0; border-bottom: 1px solid var(--line); align-items: start; }
.pub-meta { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.chip { font: 400 10.5px/1 var(--mono); font-stretch: 87.5%; letter-spacing: .08em; text-transform: uppercase; color: var(--text); border: 1px solid var(--line-2); padding: 7px 9px 6px; }
.chip.hot { border-color: var(--sig); color: var(--sig-2); }
.pub h3 { font-size: clamp(24px, 2.5vw, 36px); font-weight: 600; font-stretch: 88%; letter-spacing: -.03em; line-height: 1.05; max-width: 20em; }
.pub p { margin-top: 12px; color: var(--mut); max-width: 44em; }
.pub p a, .foot a { color: var(--text); border-bottom: 1px solid var(--sig); }
.pub p a:hover { color: var(--sig-2); }
.scale { margin-top: 20px; max-width: 560px; display: grid; gap: 8px; }
.scale div { display: grid; grid-template-columns: 1fr; gap: 5px; }
.scale span { font: 400 10.5px/1.3 var(--mono); font-stretch: 87.5%; color: var(--mut); }
.scale span b { color: var(--text); font-weight: 500; }
.scale i { display: block; height: 8px; width: calc(var(--w) * 1%); min-width: 3px; background: var(--line-2); transition: width 1s cubic-bezier(.2, .7, .1, 1) .2s; }
.scale i.hot { background: var(--sig); }
.js [data-reveal]:not(.in) .scale i { width: 0; min-width: 0; }

.tl { position: relative; margin: 8px 0 26px; padding: 0 0 26px; }
.tl-lane { position: relative; height: 16px; margin-bottom: 5px; background: linear-gradient(var(--line), var(--line)) 0 50% / 100% 1px no-repeat; }
.tl-lane i { position: absolute; top: 2px; bottom: 2px; left: calc(var(--a) * 1%); width: calc(var(--b) * 1% - var(--a) * 1%); background: var(--line-2); transform-origin: 0 50%; transition: transform .9s cubic-bezier(.2, .7, .1, 1) calc(var(--d) * 120ms); }
.tl-lane i.edu { background: repeating-linear-gradient(135deg, var(--dim) 0 1px, transparent 1px 5px); box-shadow: inset 0 0 0 1px var(--dim); }
.tl-lane i.job { background: var(--ice); }
.tl-lane i.now { background: linear-gradient(90deg, var(--sig) 55%, rgba(255, 90, 31, 0)); }
.js [data-reveal]:not(.in) .tl-lane i { transform: scaleX(0); }
.tl-axis { position: absolute; left: 0; right: 0; bottom: 0; height: 18px; border-top: 1px solid var(--line-2); }
.tl-axis span { position: absolute; top: 0; left: calc(var(--a) * 1%); padding: 7px 0 0 6px; border-left: 1px solid var(--line-2); height: 18px; font: 400 10px/1 var(--mono); font-stretch: 87.5%; color: var(--mut); white-space: nowrap; }
.tl-axis span:last-child { left: auto; right: 0; border-left: 0; padding-left: 0; color: var(--sig-2); }
.exp-when i.edu { border-style: dashed; border-color: var(--mut); border-radius: 0; }
.exp-when i.job { background: var(--ice); border-color: var(--ice); border-radius: 0; }
.exp { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0 16px; }
.exp-row { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: baseline; position: relative; }
.exp-when { font: 400 12px/1.4 var(--mono); font-stretch: 87.5%; color: var(--mut); display: flex; align-items: center; gap: 12px; }
.exp-when i { width: 9px; height: 9px; border: 1.5px solid var(--line-2); flex: none; }
.exp-row.now .exp-when { color: var(--text); }
.exp-row.now .exp-when i { background: var(--sig); border-color: var(--sig); border-radius: 0; box-shadow: 0 0 0 4px rgba(255, 90, 31, .2); }
.exp-what b { display: block; font-size: 21px; font-weight: 600; font-stretch: 90%; letter-spacing: -.02em; line-height: 1.2; }
.exp-what span { display: block; margin-top: 4px; color: var(--mut); font-size: 15px; }

.contact { padding-top: 104px; }
.contact-box { border: 1px solid var(--line); background: var(--bg-2); border-radius: 3px; overflow: hidden; }
.mail {
  display: block; padding: 46px 28px 40px;
  font-size: clamp(26px, 6.2vw, 92px); font-weight: 600; font-stretch: 84%; letter-spacing: -.05em; line-height: 1;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, var(--sig), var(--sig)) 0 100% / 0 3px no-repeat;
  transition: background-size .45s cubic-bezier(.2, .7, .1, 1), color .2s;
  overflow-wrap: anywhere;
}
.mail:hover, .mail:focus-visible { background-size: 100% 3px; color: var(--sig-2); }
.mail .label { display: block; margin-bottom: 16px; letter-spacing: .09em; }
.c-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.c-grid > div { padding: 20px 28px 22px; border-right: 1px solid var(--line); }
.c-grid > div:last-child { border-right: 0; }
.c-grid dd { margin-top: 6px; font: 400 13px/1.4 var(--mono); font-stretch: 87.5%; }
.c-grid a { border-bottom: 1px solid var(--line-2); }
.c-grid a:hover { color: var(--sig-2); border-color: var(--sig); }

.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 40px; margin-top: 64px; border-top: 1px solid var(--line); font: 400 11px/1.5 var(--mono); font-stretch: 87.5%; color: var(--dim); }
.foot span:first-child { color: var(--mut); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .s7, .s5 { grid-column: span 12; }
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-copy { padding: 44px var(--gut) 36px; }
  h1 { font-size: clamp(60px, 19.5vw, 150px); }
  .inst { border-left: 0; border-top: 1px solid var(--line); }
  .inst-head { padding-left: var(--gut); }
  .stage { flex: none; height: 400px; }
  .inst-read > .read, .ctl { padding-left: var(--gut); }
}
@media (max-width: 900px) {
  :root { --gut: 20px; }
  .bar { gap: 12px; }
  .bar-mail { display: none; }
  .bar nav { gap: 0; }
  .bar nav a { padding: 9px 7px; font-size: 10px; letter-spacing: .04em; }
  .hero-copy { padding: 36px var(--gut) 28px; }
  .kicker { margin-bottom: 20px; }
  .lede { margin-top: 24px; font-size: 21px; }
  .inst-head { flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 12px; padding-bottom: 12px; }
  .stage { height: 320px; }
  .stage-key { right: 10px; bottom: 8px; gap: 10px; padding: 5px 8px; }
  .inst-read { grid-template-columns: minmax(0, 1fr); }
  .inst-read .read { border-right: 0; border-bottom: 1px solid var(--line); }
  .inst-read > * { padding: 16px var(--gut); }
  .chart-wrap { min-height: 0; flex: none; height: 150px; }
  .read-val { font-size: 80px; }
  .ctl { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px var(--gut) 18px; }
  .ctl-btns { align-self: start; }
  .sec { padding-top: 72px; }
  .sec-head, .pub, .panel.wide .p-body { grid-template-columns: minmax(0, 1fr); }
  .panel.wide .fig { margin-top: 12px; padding-top: 22px; border-top: 1px dashed var(--line-2); }
  .sec-head { gap: 14px; align-items: start; }
  .p-bar { padding: 10px 16px 9px; flex-wrap: wrap; gap: 4px 10px; }
  .p-bar .theme { margin-left: 0; flex-basis: 100%; text-align: left; }
  .p-body { padding: 22px 16px 20px; }
  .fig-l { font-size: 16px; }
  .va { grid-template-columns: minmax(0, 1fr); }
  .exp { grid-template-columns: minmax(0, 1fr); }
  .exp-row { display: block; padding: 18px 0; }
  .exp-what { margin-top: 8px; padding-left: 20px; }
  .contact { padding-top: 72px; }
  .mail { padding: 28px 16px 26px; }
  .c-grid { grid-template-columns: minmax(0, 1fr); }
  .c-grid > div { border-right: 0; border-bottom: 1px solid var(--line); padding: 16px; }
  .c-grid > div:last-child { border-bottom: 0; }
  .pf td span { font-size: 0; height: 20px; }
  .pf th { font-size: 10.5px; }
  .pf thead th { font-size: 9.5px; }
  .pf thead th.flag em { font-size: 8.5px; letter-spacing: .04em; }
  .slope-plot .gl em { display: none; }
  .slope-plot { height: 210px; }
  .panel.wide .p-text .p-more { margin-top: 24px; }
  .panel.wide .p-text .pairs { margin-bottom: 0; }
}
@media (max-width: 420px) {
  .brand span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation: none !important; }
}
