@font-face {
  font-family: "Space Grotesk";
  src: url("./assets/space-grotesk.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #0b1120;
  --panel: #121e32;
  --rule: #30415a;
  --text: #f4f7ff;
  --muted: #b1bed2;
  --cyan: #74def4;
  --gold: #ffd275;
  font-family: "Space Grotesk", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100dvh; color: var(--text);
  display: flex; flex-direction: column;
  background: radial-gradient(ellipse at 20% 0, #162746 0%, var(--bg) 65%);
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.45rem, 5.1vw, 5.3rem); line-height: 1; letter-spacing: -.055em; }
h1 em { font-style: normal; color: var(--cyan); }
h2 { font-size: clamp(1.2rem, 2.25vw, 2.25rem); line-height: 1.04; }
p { color: var(--muted); line-height: 1.45; }
a { color: var(--cyan); text-underline-offset: .17em; }
button, select, input { font: inherit; }
button, select, input[type="number"] {
  color: var(--text); background: #18273e; border: 1px solid #475974;
  border-radius: 6px; padding: .55rem .75rem; min-height: 40px;
}
button, select { cursor: pointer; }
button:hover, select:hover { border-color: var(--cyan); }
button:disabled { opacity: .4; cursor: default; }
button[aria-pressed="true"], #next-slide, #play { color: #101b2b; background: var(--cyan); border-color: var(--cyan); font-weight: 700; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
input { accent-color: var(--cyan); }
.sr-only, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { z-index: 10; position: fixed; top: 1rem; left: 1rem; background: var(--bg); padding: .6rem; }
.masthead {
  display: flex; align-items: center; gap: clamp(.65rem, 2vw, 1.5rem); min-height: 62px;
  padding: .5rem clamp(1rem, 3.5vw, 3.5rem); border-bottom: 1px solid var(--rule); background: #0a1221;
}
.masthead img { width: 102px; height: 32px; object-fit: contain; display: block; }
.masthead span { color: var(--muted); font-size: .86rem; }
.masthead #present { margin-left: auto; }
#deck { flex: 1; width: min(100%, 1760px); align-self: center; padding: clamp(1.1rem, 3vw, 3rem) clamp(1rem, 3.5vw, 3.5rem); }
#deck section > h1 { margin-bottom: clamp(1rem, 2.25vw, 2rem); }
#solvers h1 { font-size: clamp(3.2rem, 7vw, 7.2rem); margin-bottom: clamp(1.3rem, 3vw, 2.75rem); }
.solver-grid, .closing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.8rem, 2.1vw, 1.65rem); }
.solver-grid article, .closing-grid article, .machine-diagram article, .pipeline article {
  padding: clamp(.95rem, 2vw, 1.65rem); background: var(--panel);
  border: 1px solid var(--rule); border-radius: 13px;
}
.solver-grid p, .closing-grid p, .pipeline p { margin-top: .65rem; font-size: clamp(.94rem, 1.46vw, 1.35rem); }
.logo-well {
  min-height: clamp(95px, 9.5vw, 150px); display: grid; place-items: center; margin-bottom: 1.25rem;
  background: #f3f5f9; border-radius: 9px;
}
.logo-well img { width: min(75%, 260px); max-height: 85px; object-fit: contain; }
.solver-grid article:last-child img { width: auto; height: 85px; }
#solvers:not([hidden]) .solver-grid article { animation: reveal .48s both; }
#solvers:not([hidden]) .solver-grid article:nth-child(2) { animation-delay: .1s; }
#solvers:not([hidden]) .solver-grid article:nth-child(3) { animation-delay: .2s; }
@keyframes reveal { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.takeaway { margin: 1rem 0 .6rem; font-size: clamp(.94rem, 1.36vw, 1.22rem); }
.machine-diagram { display: grid; grid-template-columns: 1fr .43fr 1fr 1fr; gap: 1rem; align-items: stretch; }
.machine-diagram svg, .pipeline svg { width: 100%; height: clamp(90px, 13vw, 182px); display: block; color: var(--cyan); }
.machine-diagram .gpu-machine svg, .pipeline article:nth-of-type(2) svg { color: var(--gold); }
.machine-diagram span, .pipeline article span { display: block; margin-bottom: .55rem; font-weight: 700; color: var(--cyan); }
.machine-diagram p { margin-top: .55rem; }
.interconnect { display: grid; align-content: center; justify-items: center; }
.interconnect b { height: 2px; width: 100%; background: repeating-linear-gradient(90deg,var(--cyan) 0 10px, transparent 10px 18px); margin: .6rem 0; }
.interconnect span { margin: 0; text-align: center; font-size: .92rem; }
.fact-row { display: flex; gap: 1rem 2rem; flex-wrap: wrap; margin-top: 1.2rem; color: var(--muted); }
.fact-row b { color: var(--text); }
.geometry-layout, .visual-pair, .panels { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.geometry-layout { grid-template-columns: minmax(0,3.4fr) minmax(190px,1fr); }
.visual-pair article, .specimen, .section-figure { background: var(--panel); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.visual-pair h2 { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .8rem 1rem; }
.visual-pair h2 span { font-size: clamp(.78rem, 1.3vw,1.13rem); color: var(--cyan); text-align: right; }
.visual-pair footer { padding: .65rem 1rem; color: var(--muted); font-size: .92rem; }
.section-figure { display: grid; align-content: center; justify-items: center; text-align: center; padding: 1rem; color: var(--muted); }
.section-figure svg { width: min(93%, 205px); }
.section-figure text { fill: var(--text); font: 12px "Space Grotesk", sans-serif; }
.section-figure strong { color: var(--text); font-size: 1.5rem; margin: 1rem 0 .2rem; }
.viewport {
  background: radial-gradient(ellipse at 45% 30%, #192d47, #09131f 85%); position: relative;
  height: clamp(215px, 28vh, 385px); touch-action: none;
}
.feature-view { height: clamp(245px, 46vh, 600px); }
#geometry-view { border: 1px solid var(--rule); border-radius: 10px; }
.viewport canvas { width: 100%; height: 100%; position: absolute; inset: 0; display: block; }
.view-caption, .notice { position: absolute; z-index: 1; display: block; padding: .32rem .6rem; color: #e4efff; border-radius: 5px; background: #111e32e8; font-size: .83rem; pointer-events: none; }
.view-caption { bottom: 10px; left: 12px; }
.notice { top: 10px; left: 12px; }
.slide-controls, .tools, .timeline, .table-control, .tabs, .downloads, .plot-heading, .curve-legend {
  display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1rem;
}
.slide-controls { margin-top: .85rem; }
.slide-controls label, .tools label, .table-control label { display: inline-flex; align-items: center; gap: .5rem; }
.slide-controls input[type="range"] { width: min(220px, 28vw); }
.slide-controls output, .timeline output { color: var(--gold); font-weight: 700; }
.tools { margin: 0 0 .65rem; }
.axis-note { color: var(--muted); font-size: .88rem; margin: 0 0 .65rem; }
.axis-note b { color: var(--text); }
.checks, .views, .pick-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.checks { gap: 1rem; }
.views { margin-left: auto; }
.panel-head, .panel-foot { display: flex; gap: .6rem; align-items: center; padding: .5rem .7rem; }
.panel-head label { flex: 1; min-width: 0; }
.panel-head select { width: 100%; }
.panel-foot { justify-content: space-between; font-size: .86rem; color: var(--muted); }
.panel-foot strong { color: var(--text); font-variant-numeric: tabular-nums; }
.case-mark { width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #101b2b; }
.case-a { background: var(--gold); }
.case-b { background: var(--cyan); }
.color-and-pick { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin: .75rem 0; }
.legend { max-width: 510px; color: var(--text); }
#colorbar { height: 14px; border-radius: 4px; margin: .26rem 0; }
.legend-ticks { display: flex; justify-content: space-between; color: var(--muted); font-size: .82rem; }
#inspect-readout { display: block; color: var(--muted); margin-top: .28rem; font-size: .86rem; }
#element { width: 115px; }
.timeline label { flex: 1; min-width: 80px; }
.timeline input { width: 100%; }
.surface-note, .note { color: var(--muted); margin-top: .65rem; font-size: .9rem; }
.fallback { padding: .7rem; background: var(--panel); margin-top: .65rem; }
.fallback img { display: block; width: min(100%, 780px); }
.response { display: grid; grid-template-columns: minmax(0,3fr) minmax(190px,1fr); gap: 1rem; margin-top: .65rem; }
.plot-area, .plot-summary { background: var(--panel); border: 1px solid var(--rule); padding: clamp(.75rem,1.8vw,1.5rem); border-radius: 10px; }
.plot-heading { justify-content: space-between; }
.curve-legend { margin-top: .6rem; font-size: .83rem; color: var(--muted); }
.series-key { display: inline-flex; align-items: center; gap: .3rem; }
.series-key svg { width: 20px; height: 10px; }
#plot { display: block; width: 100%; height: clamp(290px, 47vh, 580px); cursor: crosshair; }
#plot text { fill: var(--muted); font: 13px "Space Grotesk",sans-serif; }
#plot .axis-title { fill: var(--text); font-weight: 700; }
.plot-summary .eyebrow { color: var(--cyan); font-weight: 700; }
.plot-summary strong { display: block; color: var(--gold); font-size: clamp(2.45rem,4.5vw,4.45rem); letter-spacing: -.045em; line-height: 1.1; margin: .6rem 0; }
.plot-summary small { font-size: .9rem; letter-spacing: 0; }
.plot-summary p + p { margin-top: .85rem; }
.table-control { margin: .8rem 0; justify-content: space-between; }
.table-scroll { overflow-x: auto; background: var(--panel); border: 1px solid var(--rule); border-radius: 9px; }
table { width: 100%; min-width: 630px; border-collapse: collapse; font-size: clamp(.92rem,1.65vw,1.46rem); font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: clamp(.52rem,1.25vw,1rem); border-bottom: 1px solid var(--rule); white-space: nowrap; }
thead th { color: var(--cyan); font-weight: 700; background: #172641; }
tbody tr:last-child > * { border: 0; }
.time-cell span + span { color: var(--gold); border-left: 1px solid var(--rule); padding-left: .52rem; margin-left: .52rem; font-weight: 700; }
.downloads { margin: .8rem 0; font-size: .93rem; }
.pipeline { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: .75rem; align-items: stretch; }
.pipe-arrow { align-self: center; font-size: clamp(1.75rem,4.3vw,4.3rem); color: var(--cyan); }
.pipeline.flow article { animation: flow .75s both; }
.pipeline.flow article:nth-of-type(2) { animation-delay: .72s; }
.pipeline.flow article:nth-of-type(3) { animation-delay: 1.44s; }
@keyframes flow { 0%,100% { border-color: var(--rule); } 45% { border-color: var(--gold); box-shadow: inset 0 0 28px #ffd27548; } }
.equation { padding: .4rem .65rem; color: var(--gold); font-weight: 700; border: 1px solid var(--rule); border-radius: 6px; }
.gpu-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.gpu-cards article { padding: .85rem 1rem; background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; }
.gpu-cards strong, .closing-grid strong { color: var(--gold); font-size: clamp(2rem,4vw,4.2rem); letter-spacing: -.055em; display: block; line-height: 1; }
.gpu-cards span, .closing-grid h2 { display: block; margin-top: .5rem; }
.credits { color: var(--muted); font-size: .83rem; margin-top: 1.35rem; }
.deck-nav {
  position: sticky; bottom: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: .6rem;
  background: #0a1221f7; padding: .5rem clamp(.75rem,3.5vw,3.5rem); border-top: 1px solid var(--rule);
}
#slide-picker { max-width: 50vw; }
#slide-dots { display: flex; gap: 5px; }
#slide-dots button { min-height: 32px; min-width: 29px; padding: .15rem .4rem; font-size: .8rem; }
.clean .masthead, .clean .deck-nav, .clean .tools, .clean #inspect, .clean .downloads,
.clean .tabs, .clean .table-control, .clean .slide-controls :is(button,label),
.clean .timeline :is(button,label) { display: none; }
.clean .color-and-pick { grid-template-columns: 1fr; }
.clean .specimen .viewport { height: clamp(240px,38vh,460px); }
.clean #deck { padding-block: clamp(1.25rem,4.5vh,3.4rem); }
#restore-clean { display: none; }
.clean #restore-clean { display: block; position: fixed; right: 12px; bottom: 12px; z-index: 4; }
.clean #restore-clean:not(:focus-visible) { clip-path: inset(50%); }
@media (pointer: coarse) {
  .clean #restore-clean:not(:focus-visible) { clip-path: none; }
}

@media (max-width: 800px) {
  #slide-dots { display: none; }
  .machine-diagram { grid-template-columns: 1fr .35fr 1fr; }
  .gpu-machine { grid-column: 1 / -1; }
  .gpu-machine svg { width: 180px; float: left; margin-right: 1rem; }
  .plot-summary strong { font-size: 2.5rem; }
}
@media (max-width: 580px) {
  .masthead span { display: none; }
  .solver-grid, .closing-grid, .visual-pair, .panels, .geometry-layout, .response, .pipeline, .color-and-pick { grid-template-columns: minmax(0,1fr); }
  .solver-grid article { display: grid; grid-template-columns: 95px minmax(0,1fr); align-items: center; gap: .3rem .8rem; }
  .logo-well { margin: 0; grid-row: span 2; min-height: 65px; }
  .solver-grid article:last-child img { height: 45px; }
  .solver-grid p { margin: 0; }
  .pipe-arrow { justify-self: center; transform: rotate(90deg); }
  .feature-view { height: 250px; }
  .views { margin-left: 0; }
  .section-figure svg { max-width: 120px; }
  .panel-foot { font-size: .74rem; }
  .timeline { gap: .5rem; }
  .timeline output { min-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; }
}

.solve-strip, .settings-controls, .settings-filters {
  display: flex;
  align-items: center;
  gap: .55rem 1rem;
  flex-wrap: wrap;
}
.solve-strip { margin: .7rem 0 1.05rem; }
.solve-strip span:not(.solve-arrow) {
  padding: .55rem .8rem;
  border: 1px solid var(--rule);
  background: var(--panel);
  border-radius: 6px;
}
.solve-strip strong, .solve-arrow { color: var(--gold); }
.settings-controls { margin-bottom: .75rem; }
.settings-controls label { display: inline-flex; align-items: center; gap: .4rem; font-size: .94rem; }
.settings-table { min-width: 790px; font-size: clamp(.92rem, 1.18vw, 1.22rem); }
.settings-table :is(th,td) { vertical-align: top; white-space: normal; }
.settings-table tbody th { color: var(--text); width: 15%; }
.settings-table tbody td:nth-child(2) { width: 38%; }
.settings-table tbody td:nth-child(3) { width: 32%; }
.settings-table .memory-value { color: var(--gold); font-weight: 700; white-space: nowrap; }
.settings-table small { display: block; margin-top: .25rem; color: var(--muted); font-weight: 400; }
.clean .settings-controls { display: none; }

.mesh-node-key {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: fit-content;
  margin-top: .7rem;
  padding: .35rem .7rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--panel);
}
.mesh-node-key canvas { width: min(32vw, 174px); height: auto; }
.mesh-node-key :is(strong,span) { display: block; }
.mesh-node-key span { margin-top: .2rem; color: var(--muted); }
.mesh-node-key i {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: .3rem;
}
.corner-marker { background: #f4f7ff; }
.midside-marker { background: #ffb35e; border-radius: 50%; }
