/* Keep handwritten digits close to the model's MNIST input proportions. */
.drawing-wrap canvas { width: 280px; }

/* style.css styles the section intro line through `.section-heading > p:last-child`.
   Adding the availability note below it stole that match, so restore the intro
   explicitly instead of depending on which paragraph happens to be last. */
.section-heading > p:not(.kicker) { color: var(--muted); font-size: 14px; margin: 12px 0 0; }

/* Where the board physically is, and when it is reachable. */
.section-heading > p.lab-availability {
  border-left: 2px solid var(--accent);
  color: var(--muted);
  font: 400 12.5px/1.65 Manrope, Arial, sans-serif;
  margin: 16px 0 32px;
  max-width: 780px;
  padding: 2px 0 2px 13px;
}
.lab-availability b { color: #cfe6e0; font-weight: 600; }

/* Two columns: copy, then the in-memory-computing figure. style.css collapses
   the hero to one column at its own breakpoint, so no grid override here. */
.hero { min-height: 430px; padding: 84px 0 66px; }
.hero-copy { max-width: 720px; }
.lede--tight { margin-top: -12px; }

/* Headline numbers, scannable rather than buried in the prose. */
.hero-metrics {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 18px 26px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 26px 0;
  max-width: 590px;
  padding: 20px 0;
}
.hero-metrics b {
  color: var(--accent);
  display: block;
  font: 600 25px Manrope, Arial, sans-serif;
  letter-spacing: -.03em;
}
.hero-metrics span {
  color: var(--muted);
  display: block;
  font: 400 11.5px/1.5 Manrope, Arial, sans-serif;
  margin-top: 5px;
}
/* The cost figure comes from the whitepaper's cost model rather than the
   hardware comparison, so it spans the row and sits last, visibly apart. */
.hero-metrics__wide { border-top: 1px solid var(--line); grid-column: 1 / -1; padding-top: 17px; }
@media (max-width: 520px) { .hero-metrics { grid-template-columns: 1fr; gap: 15px; } }

.hero-system { align-items: center; display: flex; justify-content: center; }
.imc-figure { height: auto; max-width: 470px; width: 100%; }
.imc-figure text { font-family: "DM Mono", ui-monospace, monospace; }
.imc-cap { fill: var(--muted); font-size: 9.5px; letter-spacing: .12em; }
.imc-cap--accent { fill: var(--accent); }
.imc-box { fill: var(--panel-soft); stroke: var(--line); stroke-width: 1; }
.imc-box--accent { fill: rgba(128, 240, 200, .07); stroke: rgba(128, 240, 200, .55); }
.imc-label { fill: #b9d2cc; font-size: 11px; letter-spacing: .1em; text-anchor: middle; }
.imc-label--accent { fill: var(--accent); font-size: 13px; }
.imc-flow { fill: none; stroke: #46606a; stroke-width: 1.4; }
.imc-flow--back { stroke-dasharray: 4 3; }
.imc-flow--out { stroke: var(--accent); stroke-width: 1.6; }
.imc-tip { fill: #46606a; }
.imc-tip--out { fill: var(--accent); }
.imc-mid { fill: var(--muted); font-size: 10px; text-anchor: middle; }
.imc-mid--accent { fill: var(--accent); }
.imc-warn { fill: var(--warn); font-size: 10px; text-anchor: middle; }
.imc-rule { stroke: var(--line); stroke-width: 1; }
.imc-side { fill: var(--muted); font-size: 8.5px; letter-spacing: .1em; text-anchor: middle; }
.imc-side--accent { fill: var(--accent); }
.imc-side--start { text-anchor: start; }
.imc-side--end { text-anchor: end; }
/* Rows carry the shared activation; columns accumulate delay into their own TDC. */
.imc-rows path { fill: none; stroke: rgba(120, 223, 255, .5); stroke-width: 1.2; }
.imc-cols path { fill: none; stroke: rgba(128, 240, 200, .5); stroke-width: 1.4; }
.imc-cols--out path { stroke: var(--accent); }
.imc-cells rect { fill: rgba(120, 223, 255, .07); stroke: rgba(120, 223, 255, .45); stroke-width: 1; }
.imc-w text { fill: var(--cyan); font-size: 10px; text-anchor: middle; }
.imc-tdc-label text { fill: var(--accent); font-size: 10px; letter-spacing: .06em; text-anchor: middle; }

.digit-guide {
  color: rgba(128, 240, 200, .09);
  font: 500 190px/.8 Manrope, Arial, sans-serif;
  left: 50%;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -45%);
  z-index: 2;
}

/* The result panel's defaults are very small; scale the numbers a reader
   actually looks at (confidence, per-class percentages) up to legible sizes. */
.prediction-block > span, .prob-head { font-size: 10.5px !important; }
.prediction-block p { font-size: 14px !important; }
.probability { gap: 10px; grid-template-columns: 16px 1fr 50px; }
.probability > span { font-size: 13px !important; }
.probability strong { color: #cfe6e0 !important; font-size: 12px !important; }
.probability i { height: 7px; }
.result-meta .chip { font-size: 10.5px !important; padding: 7px 9px; }
.notes { font-size: 11px !important; line-height: 1.6 !important; }

/* Inference stage sequence, shown while a request is in flight. */
.progress { display: grid; gap: 10px; list-style: none; margin: 26px 0; padding: 0; }
.progress li {
  align-items: center;
  color: var(--muted);
  display: grid;
  font: 400 9px "DM Mono", monospace;
  gap: 10px;
  grid-template-columns: 14px 1fr;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: color .2s ease;
}
.progress li::before {
  border: 1px solid #2b4048;
  border-radius: 50%;
  content: "";
  height: 8px;
  margin-left: 3px;
  width: 8px;
}
.progress--active { color: var(--accent); }
.progress--active::before { background: var(--accent); border-color: var(--accent); animation: progress-pulse 1s ease-in-out infinite; }
.progress--done { color: #6d8892; }
.progress--done::before { background: #395258; border-color: #395258; }
@keyframes progress-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* Backend stage log. Content comes from the server's real per-inference trace. */
.terminal { border: 1px solid var(--line); border-radius: 3px; margin-top: 18px; overflow: hidden; }
.terminal-head { align-items: center; background: #071017; border-bottom: 1px solid var(--line); display: flex; gap: 9px; padding: 7px 10px; }
/* Toggle switch controlling backend-log visibility. */
.switch { cursor: pointer; display: inline-flex; margin-left: auto; }
.switch input { height: 0; opacity: 0; position: absolute; width: 0; }
.switch-track { background: #24373e; border-radius: 999px; display: block; height: 13px; position: relative; transition: background .18s ease; width: 26px; }
.switch-track::after { background: #6c8890; border-radius: 50%; content: ""; height: 9px; left: 2px; position: absolute; top: 2px; transition: transform .18s ease, background .18s ease; width: 9px; }
.switch input:checked + .switch-track { background: rgba(128, 240, 200, .3); }
.switch input:checked + .switch-track::after { background: var(--accent); transform: translateX(13px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.terminal-head small { color: var(--muted); font: 400 8px "DM Mono", monospace; letter-spacing: .09em; }
.terminal-head small span { color: var(--accent); }
.terminal-dots { display: flex; gap: 4px; }
.terminal-dots i { background: #2b4048; border-radius: 50%; height: 6px; width: 6px; }
.terminal-body {
  background: #04090d;
  color: #9fc4bd;
  font: 400 9.5px/1.75 "DM Mono", ui-monospace, monospace;
  margin: 0;
  max-height: 240px;
  overflow: auto;
  padding: 10px;
  white-space: pre;
}

.benchmark-callout { color: var(--accent); font: 500 12px/1.5 Manrope, Arial, sans-serif; margin: 13px 0 0; }
.benchmark-row > span em { color: var(--muted); display: block; font: 400 10px "DM Mono", monospace; font-style: normal; }

.benchmark { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 18px; }
.benchmark-head { align-items: baseline; display: flex; flex-wrap: wrap; gap: 3px 10px; justify-content: space-between; }
.benchmark-head small { color: #cfe6e0; font: 500 16px/1.25 "DM Mono", monospace; letter-spacing: .08em; }
/* nowrap so that when the panel is too narrow to fit both, this drops to its own
   line intact instead of collapsing into a one-letter-per-line column. */
.benchmark-head span { color: var(--accent); font: 400 11px "DM Mono", monospace; letter-spacing: .07em; white-space: nowrap; }
/* The asterisk methodology note stays small; everything above it scales up. */
.benchmark-note { color: var(--muted); font: 400 9px/1.65 "DM Mono", monospace; letter-spacing: .02em; }
.benchmark-group { margin-top: 26px; }
.bm-title { color: #cfe6e0; font: 500 14.5px Manrope, Arial, sans-serif; letter-spacing: .01em; margin: 0; }
.bm-sub { color: var(--muted); font: 400 12px/1.5 Manrope, Arial, sans-serif; margin: 4px 0 13px; }
.benchmark-row { align-items: center; display: grid; gap: 10px; grid-template-columns: 124px 1fr 88px; margin-top: 9px; }
.benchmark-row > span { color: #b9d2cc; font: 500 12px Manrope, Arial, sans-serif; }
.benchmark-row > strong { color: #cfe6e0; font: 500 11.5px "DM Mono", monospace; text-align: right; }
.benchmark-row--limit > span, .benchmark-row--limit > strong { color: var(--muted); }
.benchmark-row--limit > i > b { background: #46606a; }
.bm-note-line { color: var(--muted); font: 400 11.5px/1.6 Manrope, Arial, sans-serif; margin: 11px 0 0; }
.bm-note-line span { color: var(--accent); font-weight: 600; }
.bm-asterisk { color: var(--accent); }
/* Node and projection status sit inside the heading, smaller so the line still fits. */
.bm-node { color: var(--muted); font-size: 10px; letter-spacing: .02em; text-transform: none; }
/* Methodology note sits below the backend log, referenced by the asterisk. */
.benchmark-note--footer { border-top: 1px solid var(--line); display: block; margin-top: 16px; padding-top: 14px; }
.benchmark-row > i { background: #071017; display: block; height: 6px; overflow: hidden; }
.benchmark-row > i > b { background: #587681; display: block; height: 100%; transition: width .45s ease; width: 0; }
.benchmark-row--stellar > span, .benchmark-row--stellar > strong { color: var(--accent); }
.benchmark-row--stellar > i > b { background: linear-gradient(90deg, var(--cyan), var(--accent)); }
.benchmark-note { display: block; line-height: 1.5; margin-top: 14px; }

/* The status text can be long ("HARDWARE-EMULATED SOFTWARE MODE"); keep it on one
   line so it does not grow the nav bar's height. */
.badge { white-space: nowrap; }

@media (max-width: 900px) {
  .nav-links { display: flex; gap: 15px; }
}

@media (max-width: 620px) {
  .nav { gap: 12px; }
  .nav-links { gap: 11px; margin-left: auto; }
  .nav-links a { font-size: 8px; }
  .badge { display: none; }
}
