/* MyPCBench — site stylesheet.
 * The Office (US) palette: white printer paper, heavy black ink, Dunder
 * Mifflin steel-blue accent. Type: Archivo Black for big titles, Archivo
 * for sub-heads and numbers, IBM Plex Sans for body, IBM Plex Mono for
 * metadata. Highlighter yellow shows up only where someone would actually
 * run a highlighter.
 */

:root {
  --paper:        #FFFFFF;
  --paper-2:      #F4F4F2;
  --paper-deep:   #E8E8E5;
  --cream:        #FFFFFF;     /* back-compat alias */
  --cream-2:      #F4F4F2;

  --ink:          #0A0A0C;
  --ink-2:        #1A1A1D;
  --body:         #2A2A2D;
  --muted:        #6B6B68;
  --line:         #D8D6D0;
  --line-dark:    #A6A39B;
  --rule:         #0A0A0C;

  /* Dunder Mifflin steel blue */
  --navy:         #1B4F8B;
  --navy-deep:    #0F3568;
  --navy-soft:    #DEE7F2;

  --mustard:      #FFE16A;     /* highlighter */
  --mustard-deep: #D4B83A;
  --highlight:    #FFE16A;

  --brick:        #802626;

  --pass:         #1F5C2E;
  --pass-soft:    #DCEAD9;
  --fail:         #802626;
  --fail-soft:    #EFD5D5;

  --brand:    "Archivo Black","Helvetica Neue","Arial Black",sans-serif;
  --display:  "Archivo","Helvetica Neue",Arial,sans-serif;
  --sans:     "IBM Plex Sans","Helvetica Neue",Arial,sans-serif;
  --serif:    var(--display);  /* back-compat alias */
  --mono:     "IBM Plex Mono","SFMono-Regular",Menlo,monospace;

  --maxw:     1320px;
  --pad:      56px;
  --shadow-sm: 0 1px 2px rgba(10,10,12,0.08), 0 6px 12px -8px rgba(10,10,12,0.16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { background: var(--paper); color: var(--ink-2); }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--highlight); color: var(--ink); }

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--line-dark); text-underline-offset: 3px; }
a:hover { color: var(--navy); text-decoration-color: var(--navy); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); position: relative; z-index: 2; }

/* ============================================================
 * NAV
 * ============================================================ */
nav.top {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
nav.top .row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
}
nav.top .brand {
  font-family: var(--brand); font-weight: 900;
  font-size: 18px; letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
}
nav.top ul { list-style: none; display: flex; gap: 22px; align-items: center; padding: 0; margin: 0; }
nav.top ul a {
  font-family: var(--sans); font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  padding: 4px 0;
}
nav.top ul a:hover, nav.top ul a[aria-current] { color: var(--ink); }

/* ============================================================
 * HERO
 * ============================================================ */
.hero {
  position: relative;
  padding: 40px 0 0;
  background: var(--paper);
}
.hero .overline {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 16px;
}
.hero .overline b { color: var(--navy); font-weight: 600; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  column-gap: 48px;
  row-gap: 24px;
  align-items: stretch;
  border-top: 2px solid var(--rule);
  padding-top: 28px;
}
.hero-text { min-width: 0; padding-bottom: 30px; }

.hero h1 {
  font-family: var(--brand); font-weight: 900;
  font-size: clamp(44px, 5.4vw, 72px);
  line-height: 0.98; letter-spacing: -0.025em;
  color: var(--ink);
}
.hero .lede {
  margin-top: 20px;
  max-width: 560px;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink-2);
}

.author-block {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  max-width: 540px;
}
.author-block .authors { font-size: 15px; color: var(--ink); font-weight: 500; }
.author-block .authors .au { font-weight: 600; }
.author-block .authors .au + .au::before { content: ", "; color: var(--muted); font-weight: 400; }
.author-block .aff {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-top: 6px;
}

.hero-ctas {
  margin-top: 16px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600;
  background: var(--ink); color: var(--paper);
  border: 1.5px solid var(--ink);
  text-decoration: none;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn .arrow { font-family: var(--display); font-weight: 700; }

/* live figure — the three.js panel */
.hero-fig {
  margin: 0;
  display: flex; flex-direction: column;
  min-height: 440px;
}
.hero-fig .fig-canvas {
  position: relative;
  flex: 1;
  min-height: 380px;
  border: 1.5px solid var(--ink);
  /* graph paper under the drawing */
  background: var(--paper) radial-gradient(circle, #E9E7E1 1px, transparent 1.5px);
  background-size: 22px 22px;
  background-position: center;
  overflow: hidden;
  cursor: grab;
}
.fig-canvas .fig-note {
  position: absolute; z-index: 2;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--muted);
  pointer-events: none;
  background: rgba(255,255,255,0.82);
  padding: 2px 6px;
}
.fig-canvas .fig-note.tr { top: 8px; right: 8px; }
.fig-canvas .fig-note.bl { bottom: 8px; left: 8px; color: var(--navy); }
.fig-canvas.fallback .fig-note { display: none; }
.hero-fig .fig-canvas:active { cursor: grabbing; }
.hero-fig .fig-canvas canvas { display: block; width: 100%; height: 100%; }
.hero-fig .fig-canvas .fig-fallback {
  display: none;
  width: 100%; height: 100%; object-fit: contain;
  background: #fff;
}
.hero-fig .fig-canvas.fallback canvas { display: none; }
.hero-fig .fig-canvas.fallback { cursor: default; }
.hero-fig .fig-canvas.fallback .fig-fallback { display: block; }

.hero-fig figcaption {
  margin-top: 8px;
  font-size: 12.5px; line-height: 1.5;
  color: var(--muted);
  font-family: var(--sans);
}
.hero-fig figcaption .figlab {
  font-family: var(--mono); font-size: 9px;
  font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink);
  margin-right: 8px;
}
.hero-fig .fig-status {
  display: block;
  margin-top: 4px;
  font-family: var(--mono); font-size: 11px;
  line-height: 1.5;
  color: var(--navy);
  /* reserve two lines so hover text never reflows the hero */
  min-height: 33px;
}

/* the numbers line under the hero */
.numbers-line {
  padding: 12px 0;
  border-top: 2px solid var(--rule);
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 6px 0;
}
.numbers-line span { white-space: nowrap; display: inline-flex; align-items: baseline; }
.numbers-line b {
  font-family: var(--brand); font-weight: 900;
  font-size: 19px; letter-spacing: -0.01em;
  color: var(--ink);
  margin-right: 7px;
}
.numbers-line span + span::before {
  content: ""; align-self: center;
  width: 1px; height: 16px; background: var(--line);
  margin: 0 18px;
}

/* ============================================================
 * SECTIONS
 * ============================================================ */
/* Sections separate by whitespace; the only rule is the one under each
 * heading. One line style, one rhythm. */
section.section {
  padding: 34px 0 40px;
  background: var(--paper);
}
/* anchor jumps land below the sticky nav */
section[id], header[id] { scroll-margin-top: 64px; }
.section-head {
  display: flex; flex-direction: column; gap: 5px;
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.section-head h2 {
  font-family: var(--brand); font-weight: 900;
  font-size: clamp(24px, 2.6vw, 31px);
  line-height: 1.1; letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}
.section-head .lede {
  font-size: 15px; line-height: 1.55;
  color: var(--muted);
  max-width: 640px;
  margin: 0;
}

section.section p {
  max-width: 640px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
  margin-bottom: 11px;
}
section.section code { overflow-wrap: anywhere; font-family: var(--mono); font-size: 0.88em; background: var(--paper-2); padding: 1px 4px; }
section.section h3 {
  font-family: var(--display); font-weight: 700;
  font-size: 17.5px; line-height: 1.25;
  color: var(--ink);
  margin: 32px 0 8px;
}
.section-head + * > h3:first-child, .section-head + h3 { margin-top: 0; }
section.section h4 {
  font-family: var(--mono); font-weight: 700; font-size: 10.5px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink);
  margin: 12px 0 3px;
}

.prose { max-width: 680px; }
.prose p {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.prose p:last-child { margin-bottom: 0; }

/* ============================================================
 * PERSONA
 * ============================================================ */
.persona-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
  margin-top: 14px;
  align-items: start;
}
.persona-row .desktop-shot {
  margin: 0;
  border: 1px solid var(--line-dark);
  background: var(--ink-2);
}
.persona-row .desktop-shot img {
  width: 100%; display: block;
  aspect-ratio: 16/10; object-fit: cover; object-position: center;
}
.persona-row .desktop-shot .caption {
  background: var(--ink-2); color: var(--paper);
  padding: 8px 12px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600;
}

.data-strip {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}
.data-strip .cell {
  padding: 8px 14px;
  border-right: 1px dashed var(--line);
}
.data-strip .cell:first-child { padding-left: 0; }
.data-strip .cell:last-child  { padding-right: 0; border-right: none; }
.data-strip .num {
  font-family: var(--brand); font-weight: 900;
  font-size: 20px; line-height: 1; letter-spacing: -0.02em;
  color: var(--ink);
}
.data-strip .lbl {
  margin-top: 5px;
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}

/* ============================================================
 * EXAMPLE TASKS
 * ============================================================ */
.example-tasks {
  margin: 14px 0 18px;
  border: 1px solid var(--line);
  padding: 14px 16px 16px;
}
.example-tasks-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; flex-wrap: wrap;
  border-bottom: 1px dotted var(--line-dark);
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.example-tasks-head .ex-eyebrow {
  font-family: var(--mono); font-weight: 700;
  font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink);
}
.example-tasks-head .ex-hint {
  font-family: var(--mono); font-size: 10px;
  color: var(--muted);
}
.example-tasks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.example-task {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 6px;
  text-align: left;
  padding: 10px 12px 11px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-dark);
  font-family: var(--sans);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
  min-height: 130px;
}
.example-task:hover,
.example-task:focus-visible,
.example-task.is-active {
  border-color: var(--ink);
  border-left-color: var(--navy);
  outline: none;
  transform: translateY(-1px);
}
.example-task .ex-num {
  font-family: var(--mono); font-weight: 700;
  font-size: 10px; letter-spacing: 0.18em;
  color: var(--navy);
}
.example-task .ex-text {
  font-size: 13.5px; line-height: 1.45;
  color: var(--ink-2);
}
.example-task .ex-apps {
  font-family: var(--mono); font-size: 10px; line-height: 1.5;
  color: var(--muted);
  padding-top: 4px; border-top: 1px dotted var(--line);
}
.example-task .ex-apps b { font-weight: 700; color: var(--ink); }

/* ============================================================
 * APPS GRID
 * ============================================================ */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.apps-grid figure {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  transition: border-color 0.18s ease;
}
.apps-grid figure:hover { border-color: var(--line-dark); }
.apps-grid figure img {
  width: 100%; aspect-ratio: 16/10; object-fit: cover; object-position: top center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: relative; z-index: 1;
}
.apps-grid figcaption {
  padding: 7px 10px 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "cat cat"
    "name real";
  align-items: baseline;
  column-gap: 6px;
  row-gap: 1px;
  position: relative; z-index: 1;
}
.apps-grid figcaption .cat {
  grid-area: cat;
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}
.apps-grid figcaption .name {
  grid-area: name;
  font-family: var(--display); font-weight: 700;
  font-size: 14px; line-height: 1.15;
  color: var(--ink);
}
.apps-grid figcaption .real {
  grid-area: real;
  font-family: var(--sans); font-style: italic;
  font-size: 11px; font-weight: 500;
  color: var(--muted);
}
.apps-grid figcaption .real::before { content: "after "; }

.apps-grid.is-spotlight figure {
  opacity: 0.32;
  transition: opacity 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.apps-grid.is-spotlight figure.is-hit {
  opacity: 1;
  border-color: var(--navy);
  box-shadow: 0 0 0 2px var(--navy-soft);
}
.apps-note {
  margin: 6px 0 18px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  line-height: 1.6;
}
.apps-note a { color: var(--ink); }
.apps-note a:hover { color: var(--navy); }
.live-pill { font-family: var(--mono); font-size: 11px; color: var(--navy); margin-left: 4px; }

.apps-grid.live figure { cursor: pointer; }
.apps-grid.live figure a {
  display: block; color: inherit; text-decoration: none;
  position: relative; z-index: 1;
}
.apps-grid.live figure:hover { border-color: var(--ink); }
.apps-grid.live figure a::after {
  content: "↗";
  position: absolute; top: 8px; right: 10px;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--paper);
  font-family: var(--display); font-weight: 700; font-size: 13px;
  opacity: 0; transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
  z-index: 2;
}
.apps-grid.live figure:hover a::after { opacity: 1; transform: translateY(0); }

/* ============================================================
 * TASK-TYPE TABLE
 * ============================================================ */
.task-types {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
  margin-top: 6px;
  border: 1px solid var(--line);
}
.task-types thead { background: var(--paper-2); }
.task-types th {
  text-align: left; padding: 8px 14px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 700; color: var(--muted);
  border-bottom: 1px solid var(--line-dark);
}
.task-types td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 13.5px; line-height: 1.5; }
.task-types tbody tr:last-child td { border-bottom: none; }
.task-types tbody tr:hover { background: var(--paper-2); }
.task-types td.type {
  font-family: var(--display); font-weight: 700; font-size: 13px; white-space: nowrap;
  color: var(--ink);
}
.task-types td.count {
  font-family: var(--mono); font-size: 11px;
  color: var(--ink); font-weight: 700; white-space: nowrap;
}
.task-types td.example { color: var(--ink-2); font-size: 13.5px; max-width: 660px; }

/* ============================================================
 * METHOD / FIGURES
 * ============================================================ */
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }

.figure-block { margin: 18px 0 8px; max-width: 720px; }
.figure-block img {
  border: 1px solid var(--line);
  background: #fff;
  width: 100%; height: auto; display: block;
  cursor: zoom-in;
  transition: border-color 0.15s ease;
}
.figure-block img:hover { border-color: var(--line-dark); }
.figure-block.tall { max-width: 460px; }
.figure-block.wide { max-width: 940px; }
.figure-block.inline { max-width: 100%; margin: 0; }
.figure-block.inline img { max-height: 360px; object-fit: contain; }
.figure-block figcaption {
  margin-top: 8px;
  font-size: 12px; color: var(--muted);
  line-height: 1.5;
  max-width: 720px;
}
.figure-block figcaption .figlab {
  font-weight: 700; color: var(--ink);
  margin-right: 6px;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase; letter-spacing: 0.14em;
}

.results-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  margin-top: 30px;
}
.results-split-text h3 { margin-top: 0; }
.results-split-text p { margin-bottom: 8px; }

/* ============================================================
 * LEADERBOARD — chyron rows
 * ============================================================ */
.leaderboard-wrap { margin-top: 10px; }
.lb-chyrons { display: flex; flex-direction: column; gap: 8px; }
.lb-chyron {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: stretch;
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}
.lb-chyron.rank-1 { border: 1.5px solid var(--ink); }
.lb-chyron .rank {
  background: var(--paper-2); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  padding: 6px 4px;
  font-family: var(--brand); font-weight: 900;
  font-size: 18px; line-height: 1;
  border-right: 1px solid var(--line);
}
.lb-chyron .rank .lbl { display: none; }
.lb-chyron .info {
  padding: 7px 14px 8px;
  display: flex; flex-direction: column; gap: 3px;
  min-width: 0;
}
.lb-chyron .info .top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lb-chyron .info .name {
  font-family: var(--display); font-weight: 700;
  font-size: 15px; color: var(--ink);
}
.lb-chyron .info .vendor {
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-weight: 700;
}
.lb-chyron .info .pill {
  display: inline-block;
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700;
  padding: 2px 8px; border: 1px solid var(--line-dark);
  color: var(--muted); background: transparent;
}
.lb-chyron .info .pill.closed { color: var(--ink); }
/* informational, not celebratory — yellow stays reserved for the winner */
.lb-chyron .info .pill.open {
  color: var(--navy-deep);
  background: var(--navy-soft);
  border-color: var(--navy);
}
.lb-chyron .info .stats {
  display: flex; flex-wrap: wrap; gap: 4px 16px;
  font-family: var(--mono); font-size: 10px;
  color: var(--muted);
}
.lb-chyron .info .stats b {
  font-family: var(--display); font-weight: 700;
  font-feature-settings: "tnum" 1;
  font-size: 13px; color: var(--ink); margin-right: 4px;
}
.lb-chyron .info .stats span { display: inline-flex; align-items: baseline; }
.lb-chyron .perfect {
  background: var(--paper);
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 6px 16px;
  min-width: 80px;
}
.lb-chyron .perfect .num {
  font-family: var(--brand); font-weight: 900;
  font-size: 26px; line-height: 1;
  color: var(--ink);
}
.lb-chyron .perfect .lbl {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; margin-top: 2px;
}
.lb-chyron.rank-1 .perfect { background: var(--highlight); }
table.lb { display: none; }

/* ============================================================
 * HEATMAP
 * ============================================================ */
.heatmap-wrap { margin-top: 14px; overflow-x: auto; padding: 6px 0; }
table.heatmap { border-collapse: collapse; font-family: var(--mono); font-size: 12px; }
table.heatmap th, table.heatmap td {
  padding: 5px 8px;
  border: 1.5px solid var(--paper);
  min-width: 60px; text-align: center;
  font-feature-settings: "tnum" 1;
}
table.heatmap thead th {
  background: var(--ink); color: var(--paper);
  font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 700;
}
table.heatmap th.left, table.heatmap td.left {
  text-align: left;
  font-family: var(--display); font-size: 13px; font-weight: 700;
  background: var(--paper);
  color: var(--ink); padding-right: 14px; white-space: nowrap;
  text-transform: none; letter-spacing: 0;
  border-right: 2px solid var(--ink);
}
table.heatmap thead th.left { font-family: var(--mono); font-size: 10px; background: var(--ink); color: var(--paper); }

/* ============================================================
 * TRAJECTORY GALLERY
 * ============================================================ */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.tcard {
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s ease, transform 0.18s ease;
  padding: 8px 10px 12px;
  position: relative;
}
.tcard:hover { transform: translateY(-2px); border-color: var(--line-dark); }
.tcard .thumb {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--ink-2);
  border: 1px solid var(--line);
}
.tcard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.tcard .corner {
  position: absolute; top: 8px; left: 8px; right: 8px;
  display: flex; gap: 6px; flex-wrap: wrap; z-index: 2;
}
.tcard .play {
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; line-height: 1;
  color: var(--paper);
  opacity: 0;
  transition: opacity 0.18s ease, background 0.18s ease;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.tcard:hover .play { opacity: 1; background: rgba(20, 22, 26, 0.22); }
.tcard .corner .pill {
  font-size: 9.5px; padding: 2px 8px;
  font-family: var(--mono); letter-spacing: 0.18em;
  text-transform: uppercase; font-weight: 700;
  border: 1px solid var(--line-dark);
  background: var(--paper); color: var(--ink);
}
.tcard .corner .pill.success { background: var(--highlight); border-color: var(--mustard-deep); }
.tcard .corner .pill.partial { background: var(--paper); color: var(--ink); }
.tcard .score-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 6px; background: rgba(0,0,0,0.4);
}
.tcard .score-bar > span { display: block; height: 100%; background: var(--highlight); }
.tcard .meta { padding: 10px 4px 0; display: flex; flex-direction: column; flex: 1; }
.tcard .meta .head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.tcard .meta .model {
  font-family: var(--display); font-weight: 700;
  font-size: 15px; color: var(--ink);
}
.tcard .meta .scorenum {
  font-family: var(--brand); font-weight: 900;
  font-size: 20px; color: var(--ink);
}
.tcard .meta .scorenum.perfect { color: var(--pass); }
.tcard .meta .scorenum.zero { color: var(--fail); }
.tcard .meta .cat { font-family: var(--mono); font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.tcard .meta .ins {
  margin-top: 7px;
  font-size: 13.5px; line-height: 1.45; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tcard .meta .apps { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 3px 4px; }
.tcard .meta .appchip {
  font-family: var(--mono); font-size: 9.5px;
  padding: 1px 6px;
  background: var(--paper-2);
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.tcard .meta .appchip.more { background: transparent; color: var(--muted); }
.tcard .meta .foot {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dotted var(--line);
  margin-top: 8px;
  display: flex; gap: 6px; align-items: center;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; color: var(--muted);
  text-transform: uppercase;
}

.kbd-note {
  margin-top: 26px;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em;
  color: var(--muted);
}
.kbd-note b { color: var(--ink); }

/* ============================================================
 * SCRUBBER MODAL
 * ============================================================ */
.modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.88);
  display: none;
  align-items: stretch; justify-content: center;
  padding: 24px;
  overflow: auto;
}
.modal.open { display: flex; }
.modal .panel {
  background: var(--paper); color: var(--ink-2);
  width: 100%; max-width: 1280px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border: 1px solid var(--ink);
  position: relative;
  max-height: calc(100vh - 48px);
}
.modal .head {
  display: grid; grid-template-columns: 1fr auto;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line-dark);
  gap: 16px; align-items: start;
  background: var(--paper-2);
}
.modal .head .breadcrumb {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); font-weight: 700;
}
.modal .head .ins {
  margin-top: 8px;
  font-family: var(--display); font-weight: 600; font-size: 21px; line-height: 1.3;
  color: var(--ink);
}
.modal .head .meta-row {
  margin-top: 8px;
  display: flex; flex-wrap: wrap; gap: 8px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
}
.modal .head .close {
  background: transparent; color: var(--ink);
  border: 1px solid var(--ink);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 8px 14px; font-weight: 700;
}
.modal .head .close:hover { background: var(--ink); color: var(--paper); }

.modal .body { display: grid; grid-template-columns: 1.6fr 1fr; min-height: 0; }
.modal .canvas {
  background: #0B0B0C;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  min-height: 0;
}
.modal .canvas img { max-width: 100%; max-height: 100%; object-fit: contain; background: #0B0B0C; }
.modal .stepLabel {
  position: absolute; left: 14px; top: 14px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  background: rgba(20, 22, 26, 0.85); color: var(--paper);
  padding: 5px 10px;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.18);
}
.modal .actionLabel {
  position: absolute; left: 14px; bottom: 14px; right: 14px;
  background: rgba(10, 11, 14, 0.55);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  backdrop-filter: blur(8px) saturate(140%);
  color: #fff;
  border-left: 2px solid var(--highlight);
  max-height: 28%;
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.modal .actionLabel::-webkit-scrollbar { width: 5px; }
.modal .actionLabel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 3px; }
.modal .actionLabel .row {
  display: grid;
  grid-template-columns: 70px 1fr;
  column-gap: 14px;
  padding: 7px 12px;
  align-items: start;
}
.modal .actionLabel .row + .row { border-top: 1px solid rgba(255,255,255,0.10); }
.modal .actionLabel .row .tag {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.20em; text-transform: uppercase;
  font-weight: 700;
  padding: 3px 0 0;
  white-space: nowrap;
  text-align: right;
}
.modal .actionLabel .row.action .tag { color: var(--highlight); }
.modal .actionLabel .row.thought .tag { color: rgba(255,255,255,0.5); }
.modal .actionLabel .row.action code,
.modal .actionLabel .row.thought span {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255,255,255,0.95);
  word-break: break-word;
  white-space: pre-wrap;
  background: transparent; border: none; padding: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.modal .actionLabel .row.action code { font-weight: 500; }
.modal .actionLabel .row.thought span { font-style: italic; color: rgba(255,255,255,0.78); }
.modal .actionLabel:hover { max-height: 50%; background: rgba(10,11,14,0.78); }
.modal .actionLabel:hover .row.action code,
.modal .actionLabel:hover .row.thought span { -webkit-line-clamp: unset; display: block; }

.modal .rubric-side {
  border-left: 2px solid var(--ink);
  display: flex; flex-direction: column;
  min-height: 0; overflow: hidden;
  background: var(--paper);
}
.modal .score-card {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
.modal .score-card .lbl {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); font-weight: 700;
}
.modal .score-card .num {
  font-family: var(--brand); font-weight: 900;
  font-size: 52px; line-height: 1; margin-top: 6px;
  color: var(--ink);
}
.modal .score-card .num.pass { color: var(--pass); }
.modal .score-card .num.fail { color: var(--fail); }
.modal .score-card .scoreBar {
  margin-top: 12px; height: 5px;
  background: var(--paper-deep); position: relative;
}
.modal .score-card .scoreBar > span {
  display: block; height: 100%; background: var(--ink);
  transition: width 0.18s linear;
}
.modal .score-card .final {
  margin-top: 8px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.10em; text-transform: uppercase; color: var(--muted);
}
.rubric-list { overflow-y: auto; padding: 14px 22px 22px; }
.rubric-list h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--navy); margin-bottom: 14px;
  font-weight: 700;
}
.rubric {
  display: grid; grid-template-columns: 22px 1fr; gap: 12px;
  padding: 12px 0; border-bottom: 1px dashed var(--line);
}
.rubric:last-child { border-bottom: none; }
.rubric .marker {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  background: var(--paper-2); color: var(--muted);
  font-family: var(--mono); font-weight: 700; font-size: 12px;
  border: 1.5px solid var(--line);
}
.rubric.locked-in.pass .marker { background: var(--pass-soft); color: var(--pass); border-color: var(--pass); }
.rubric.locked-in.fail .marker { background: var(--fail-soft); color: var(--fail); border-color: var(--fail); }
.rubric .head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.rubric .id { font-family: var(--mono); font-size: 11px; letter-spacing: 0.10em; color: var(--muted); font-weight: 700; }
.rubric .weight { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.rubric .req { margin-top: 2px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.rubric .reasoning {
  margin-top: 6px; font-size: 12px; line-height: 1.45;
  color: var(--muted); font-style: italic; display: none;
}
.rubric.locked-in .reasoning { display: block; }
.rubric.locked-in.fail .req { text-decoration: line-through; text-decoration-color: var(--fail); }

.modal .controls {
  border-top: 1px solid var(--line-dark);
  padding: 14px 22px;
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  align-items: center; gap: 14px;
  background: var(--paper-2);
}
.modal .controls .btn-ico {
  background: var(--paper); border: 1px solid var(--ink);
  font-family: var(--mono); font-size: 14px; font-weight: 700;
  padding: 6px 12px; line-height: 1; min-width: 40px;
}
.modal .controls .btn-ico:hover { background: var(--ink); color: var(--paper); }
.modal .controls .btn-ico:disabled { opacity: 0.35; cursor: default; }
.modal .controls .timeline {
  -webkit-appearance: none; width: 100%; height: 4px;
  background: var(--paper-deep); border: none; outline: none;
}
.modal .controls .timeline::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; background: var(--ink); cursor: pointer; border: none;
}
.modal .controls .timeline::-moz-range-thumb {
  width: 16px; height: 16px; background: var(--ink); cursor: pointer; border: none;
}
.modal .controls .stepCount {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  white-space: nowrap; font-feature-settings: "tnum" 1;
}
.modal .controls select {
  font-family: var(--mono); font-size: 12px; padding: 6px 10px;
  border: 1px solid var(--ink); background: var(--paper); color: var(--ink);
}

/* ============================================================
 * FAILURE MODES
 * ============================================================ */
.incident {
  margin-top: 6px;
  border: 1px solid var(--line);
}
.incident .row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: stretch;
  border-bottom: 1px dotted var(--ink);
}
.incident .row:last-child { border-bottom: none; }
.incident .row:nth-child(odd) { background: var(--paper-2); }
.incident .num {
  font-family: var(--brand); font-weight: 900;
  font-size: 18px; line-height: 1;
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  padding: 8px;
  border-right: 1px dotted var(--line);
  min-width: 56px;
}
.incident .desc { padding: 7px 14px 8px; }
.incident .desc .name {
  font-family: var(--display); font-weight: 700;
  font-size: 14px; color: var(--ink);
  margin-bottom: 2px;
}
.incident .desc .body { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.incident .signature {
  display: flex; align-items: center; justify-content: center;
  padding: 7px 12px;
  border-left: 1px dotted var(--line);
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  min-width: 90px;
  font-weight: 700;
}

/* ============================================================
 * FOOTER
 * ============================================================ */
footer.foot {
  padding: 36px 0 44px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
}
footer.foot .row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
}
footer.foot a { color: var(--ink); text-decoration: none; }
footer.foot a:hover { color: var(--navy); }
footer.foot .branding {
  font-family: var(--brand); font-weight: 900;
  font-size: 17px; color: var(--ink);
  text-decoration: none;
}
footer.foot .center { text-align: center; }

/* ============================================================
 * FIGURE LIGHTBOX
 * ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center; justify-content: center;
  padding: 32px;
  cursor: zoom-out;
}
.lightbox.open { display: flex; animation: lightbox-fade 0.18s ease; }
@keyframes lightbox-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox img {
  max-width: 95vw; max-height: 90vh;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.6);
  cursor: zoom-out;
}
.lightbox .close {
  position: absolute; top: 18px; right: 18px;
  background: transparent; color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase; font-weight: 700;
  padding: 8px 14px;
}
.lightbox .close:hover { background: #fff; color: var(--ink); }

/* ============================================================
 * RESPONSIVE
 * ============================================================ */
@media (max-width: 1024px) {
  :root { --pad: 32px; }
  .hero-grid { grid-template-columns: 1fr; column-gap: 0; }
  .hero-fig { min-height: 0; }
  .hero-fig .fig-canvas { min-height: 360px; }
  .hero-text { padding-bottom: 4px; }
  .example-tasks-grid { grid-template-columns: repeat(2, 1fr); }
  .data-strip { grid-template-columns: repeat(4, 1fr); }
  .persona-row { grid-template-columns: 1fr; }
  .cols-2 { grid-template-columns: 1fr; }
  .results-split { grid-template-columns: 1fr; gap: 20px; }
  .lb-chyron { grid-template-columns: 44px 1fr; }
  .lb-chyron .perfect { grid-column: 1 / -1; flex-direction: row; gap: 16px; padding: 10px 24px; border-left: none; border-top: 1px solid var(--line); }
  .modal .body { grid-template-columns: 1fr; grid-template-rows: 60vh auto; }
  .modal .rubric-side { border-left: none; border-top: 1.5px solid var(--ink); }
  .incident .row { grid-template-columns: 56px 1fr; }
  .incident .signature { display: none; }
}
@media (max-width: 700px) {
  :root { --pad: 22px; }
  nav.top ul { gap: 14px; }
  nav.top ul li:nth-child(n+3) { display: none; }
  .data-strip { grid-template-columns: repeat(2, 1fr); }
  .example-tasks-grid { grid-template-columns: 1fr; }
  .numbers-line { gap: 8px 22px; }
  .numbers-line span + span::before { content: none; }
  .modal { padding: 0; }
  .modal .panel { max-width: 100%; max-height: 100vh; }
  .lightbox { padding: 12px; }
  .lightbox img { max-width: 100vw; max-height: 88vh; }
  footer.foot .row { grid-template-columns: 1fr; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
