/* model-scale — hand-written CSS, no framework.
   Colour roles follow the house data-viz palette; light and dark are each
   selected against their own surface rather than flipped. */

:root {
  color-scheme: light;
  --surface: #fcfcfb;
  --plane: #f9f9f7;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, 0.1);
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --accent: #2a78d6;
  --shadow: 0 1px 2px rgba(11, 11, 11, 0.05);
  --radius: 10px;
  --font: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme='light'])) {
    color-scheme: dark;
    --surface: #1a1a19;
    --plane: #0d0d0d;
    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --muted: #898781;
    --grid: #2c2c2a;
    --axis: #383835;
    --border: rgba(255, 255, 255, 0.1);
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --accent: #3987e5;
    --shadow: none;
  }
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --surface: #1a1a19;
  --plane: #0d0d0d;
  --ink: #ffffff;
  --ink-2: #c3c2b7;
  --muted: #898781;
  --grid: #2c2c2a;
  --axis: #383835;
  --border: rgba(255, 255, 255, 0.1);
  --series-1: #3987e5;
  --series-2: #d95926;
  --series-3: #199e70;
  --accent: #3987e5;
  --shadow: none;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

body {
  margin: 0;
  padding: 0 clamp(12px, 3vw, 40px) 64px;
  background: var(--plane);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---- header ------------------------------------------------------------ */

.site-head {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 0 20px;
}

.site-head h1 {
  margin: 0 0 6px;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.head-text p {
  margin: 0;
  max-width: 62ch;
  color: var(--ink-2);
}

.head-actions {
  display: flex;
  gap: 8px;
}

button {
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
}

button:hover {
  border-color: var(--axis);
}

/* ---- layout ------------------------------------------------------------ */

.layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 1080px;
  margin: 0 auto;
  min-width: 0;
}

/* ---- scenario bar ------------------------------------------------------ */

.scenario-bar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  flex-wrap: wrap;
}

.segment {
  flex: 1 1 160px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.segment:hover {
  background: var(--plane);
  border-color: transparent;
  color: var(--ink);
}

.segment-active,
.segment-active:hover {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}

.scenario-params {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
}

/* Must beat the display:flex above, or [hidden] does nothing. */
.scenario-params[hidden],
.inline-num[hidden] {
  display: none;
}

.inline-num {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-2);
}

.inline-num input {
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  width: 9ch;
  padding: 6px 10px;
  text-align: right;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--axis);
  border-radius: 8px;
}

.inline-suffix {
  color: var(--ink-2);
}

.scenario-question {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

/* ---- setup row --------------------------------------------------------- */

.setup-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.setup-row.hardware-setup {
  grid-template-columns: minmax(180px, 3fr) minmax(140px, 1fr);
}

@media (max-width: 950px) {
  .setup-row.hardware-setup {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
}

.setup-note {
  margin: 8px 2px 0;
  font-size: 12.5px;
  color: var(--muted);
}

.setup-note.speculative {
  color: var(--serious);
}

.setup-note:empty {
  display: none;
}

/* ---- advanced disclosures ---------------------------------------------- */

.advanced {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 16px;
}

.advanced > summary {
  cursor: pointer;
  padding: 13px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  list-style-position: inside;
}

.advanced > summary:hover {
  color: var(--ink);
}

.advanced[open] > summary {
  border-bottom: 1px solid var(--grid);
  margin-bottom: 14px;
}

.advanced > .field-grid,
.advanced > .chart-grid,
.advanced > .panel-sub,
.advanced > .aside {
  margin-bottom: 16px;
}

/* ---- fields ------------------------------------------------------------ */

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.field-wide {
  grid-column: 1 / -1;
}

.field-label {
  font-size: 12px;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 5px;
}

.field-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--axis);
  color: var(--muted);
  font-size: 9px;
  cursor: help;
  flex: none;
}

.field-input {
  display: flex;
  align-items: center;
  gap: 6px;
}

.field input[type='number'],
.field select,
.preset select {
  font: inherit;
  font-variant-numeric: tabular-nums;
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  color: var(--ink);
  background: var(--plane);
  border: 1px solid var(--border);
  border-radius: 7px;
}

.field input:focus-visible,
.field select:focus-visible,
.preset select:focus-visible,
.inline-num input:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.field-unit {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  flex: none;
}

.field-check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  grid-column: 1 / -1;
}

.field-check .field-input {
  order: -1;
}

.field-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.preset {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--ink-2);
  min-width: 0;
}

.panel-sub {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12.5px;
  max-width: 70ch;
}

.aside {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
}

/* ---- results ----------------------------------------------------------- */

.headline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 4px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.hero + .hero {
  border-left: 1px solid var(--grid);
  padding-left: 28px;
}

@media (max-width: 700px) {
  .hero + .hero {
    border-left: none;
    padding-left: 0;
    padding-top: 14px;
    border-top: 1px solid var(--grid);
  }
}

.hero-value {
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-sub {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 13px;
}

/* ---- cost table -------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
}

.hardware-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  margin-top: 12px;
}

.hardware-table th,
.hardware-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--grid);
  vertical-align: top;
}

.hardware-table thead th {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}

.hardware-table th[scope='row'] {
  min-width: 190px;
  font-weight: 500;
}

.hardware-table td {
  white-space: nowrap;
}

.hardware-table small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.cost-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.cost-table th,
.cost-table td {
  text-align: right;
  padding: 7px 12px;
  border-bottom: 1px solid var(--grid);
  white-space: nowrap;
}

.cost-table thead th {
  color: var(--muted);
  font-weight: 500;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cost-table th[scope='row'],
.cost-table td:first-child,
.cost-table thead th:first-child {
  text-align: left;
  white-space: normal;
}

.cost-table .row-capex td,
.cost-table .row-opex td {
  color: var(--ink-2);
}

.cost-table .row-subtotal th {
  font-weight: 600;
  color: var(--ink);
  border-top: 1px solid var(--axis);
}

.cost-table .row-total th {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  border-top: 2px solid var(--axis);
  border-bottom: none;
  padding-top: 10px;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.tile {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--plane);
  min-width: 0;
}

.tile-label {
  font-size: 11.5px;
  color: var(--muted);
}

.tile-value {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 2px;
}

.tile-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.4;
}

.apply-btn {
  margin-top: 12px;
  background: var(--accent);
  color: #fff;
  border-color: transparent;
}

.apply-btn:hover {
  border-color: transparent;
  filter: brightness(1.08);
}

/* Applied state: reads as "undo this", not as a second primary action. */
.apply-btn-revert {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--axis);
}

.apply-btn-revert:hover {
  border-color: var(--ink-2);
  filter: none;
}

/* ---- stacked memory bar ------------------------------------------------ */

.stack {
  margin-bottom: 14px;
}

.stack-track {
  display: flex;
  gap: 2px; /* the 2px surface gap between fills */
  height: 26px;
  border-radius: 5px;
  overflow: hidden;
}

.stack-seg {
  min-width: 2px;
  border-radius: 3px;
}

.stack-legend {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.stack-legend li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
}

.swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: none;
}

.legend-name {
  color: var(--ink-2);
}

.legend-value {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ---- notes ------------------------------------------------------------- */

.note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 0 0 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

.note:last-child {
  margin-bottom: 0;
}

.note-icon {
  flex: none;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  margin-top: 1px;
}

.note-good .note-icon {
  background: var(--good);
}
.note-warning .note-icon {
  background: var(--warning);
  color: #0b0b0b;
}
.note-serious .note-icon {
  background: var(--serious);
  color: #0b0b0b;
}
.note-critical .note-icon {
  background: var(--critical);
}

/* ---- sweep ------------------------------------------------------------- */

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 14px;
}

.chart {
  margin: 0;
  min-width: 0;
}

.chart figcaption {
  font-size: 12px;
  color: var(--ink-2);
  margin-bottom: 6px;
}

.chart-plot {
  position: relative;
}

.chart-svg {
  width: 100%;
  height: 200px;
  display: block;
  overflow: visible;
}

.chart-svg .grid {
  stroke: var(--grid);
  stroke-width: 1;
}

.chart-svg .axis {
  stroke: var(--axis);
  stroke-width: 1;
}

.chart-svg .tick {
  fill: var(--muted);
  font-size: 9.5px;
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
}

.chart-svg .tick-y {
  text-anchor: end;
}

.chart-svg .tick-x {
  text-anchor: middle;
}

.chart-svg .series-line {
  fill: none;
  stroke: var(--series-1);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart-svg .series-dot {
  fill: var(--series-1);
  stroke: var(--surface);
  stroke-width: 2;
}

.chart-svg .series-focus {
  fill: var(--series-1);
  stroke: var(--surface);
  stroke-width: 2;
}

.chart-svg .crosshair {
  stroke: var(--axis);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.chart-tip {
  position: absolute;
  transform: translate(-50%, -160%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
  display: flex;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(11, 11, 11, 0.12);
}

/* Must beat the `display: flex` above, or the [hidden] attribute does nothing. */
.chart-tip[hidden] {
  display: none;
}

.chart-tip strong {
  color: var(--muted);
  font-weight: 500;
}

.table-view {
  margin-top: 18px;
  font-size: 12.5px;
}

.table-view summary {
  cursor: pointer;
  color: var(--ink-2);
}

.table-view table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-variant-numeric: tabular-nums;
  display: block;
  overflow-x: auto;
}

.table-view th,
.table-view td {
  text-align: right;
  padding: 5px 10px;
  border-bottom: 1px solid var(--grid);
  white-space: nowrap;
}

.table-view th {
  color: var(--muted);
  font-weight: 500;
}

.table-view th:first-child,
.table-view td:first-child {
  text-align: left;
}

.row-current {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  font-weight: 600;
}

/* ---- footer ------------------------------------------------------------ */

.site-foot {
  max-width: 1080px;
  margin: 28px auto 0;
  color: var(--ink-2);
  font-size: 12.5px;
}

.site-foot summary {
  cursor: pointer;
  padding: 10px 0;
}

.foot-body {
  max-width: 90ch;
  border-left: 2px solid var(--grid);
  padding-left: 16px;
}

.foot-body p {
  margin: 0 0 10px;
  line-height: 1.6;
}

.foot-body code {
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 4px;
}

.foot-warn {
  color: var(--serious);
}

.foot-meta {
  color: var(--muted);
  margin-top: 12px;
}

/* Hardware discovery: inventory → workload → shortlist → tradeoffs. */
.hardware-mode .layout, .hardware-mode .site-head, .hardware-mode .site-foot { max-width: 1180px; }
.hardware-mode .scenario-question { display: none; }
.hardware-mode #setup { padding: 0; }
.hardware-mode .hardware-setup { padding: 18px 22px; }
.hw-workload { display: grid; grid-template-columns: 1fr 1.4fr; align-items: center; gap: 18px 28px; padding: 22px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.hw-eyebrow { display: block; font-size: 10px; font-weight: 650; letter-spacing: .13em; color: var(--accent); margin-bottom: 7px; }
.hw-workload h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.025em; }
.hw-workload-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.hw-context > .field + .field { margin-top: 8px; }
.hw-context-note { margin: 8px 0 0; color: var(--muted); font-size: 10.5px; }
.hw-samples { grid-column: 1 / -1; border-top: 1px solid var(--grid); padding-top: 12px; font-size: 12px; color: var(--ink-2); }
.hw-samples summary, .hw-tradeoffs summary { cursor: pointer; }
.hw-samples[open] summary { margin-bottom: 16px; }
.hw-summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 32px 4px 26px; }
.hw-summary h2 { margin: 0; font-size: clamp(25px, 3vw, 34px); font-weight: 600; letter-spacing: -.035em; }
.hw-summary p { margin: 8px 0 0; color: var(--ink-2); font-size: 12px; }
.hw-capacity { text-align: right; flex: none; }
.hw-capacity strong { display: block; font-size: 24px; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.hw-capacity span { color: var(--muted); font-size: 11px; }
.hw-board { display: grid; grid-template-columns: minmax(280px, .85fr) minmax(0, 1.45fr); gap: 24px; align-items: start; }
.hw-browse { min-width: 0; }
.hw-browse-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; }
.hw-browse-heading h2 { margin: 0; font-size: 17px; font-weight: 600; }
.hw-sort select { font: inherit; font-size: 11px; color: var(--ink-2); border: 0; background: transparent; padding: 5px; }
.hw-search { font: inherit; width: 100%; padding: 11px 13px; color: var(--ink); border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.hw-search:focus-visible, .hw-sort select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hw-filters { display: flex; gap: 8px; margin: 12px 0 16px; }
.hw-filters button { padding: 5px 12px; font-size: 11px; border-radius: 20px; color: var(--ink-2); background: transparent; }
.hw-filters button[aria-pressed='true'] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.hw-model-list { display: grid; gap: 10px; max-height: 800px; overflow-y: auto; padding: 2px; scrollbar-width: thin; }
.hw-model { text-align: left; padding: 17px; border-radius: 10px; background: var(--surface); width: 100%; }
.hw-model:hover { border-color: var(--accent); }
.hw-model[aria-pressed='true'] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); box-shadow: inset 3px 0 var(--accent); }
.hw-model-title { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.hw-model-title strong { font-size: 13px; font-weight: 600; }
.hw-model-title span { color: var(--accent); }
.hw-model-meta { color: var(--muted); font-size: 10.5px; margin-top: 6px; }
.hw-model-metrics { display: flex; justify-content: space-between; gap: 12px; margin-top: 17px; align-items: baseline; font-variant-numeric: tabular-nums; }
.hw-model-metrics strong { font-size: 16px; font-weight: 600; letter-spacing: -.02em; }
.hw-model-metrics span { font-size: 11px; color: var(--ink-2); }
.hw-list-note { color: var(--muted); font-size: 10.5px; margin: 14px 2px; }
.hw-detail { padding: 26px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); min-width: 0; scroll-margin-top: 20px; }
.hw-status { font-size: 9px; font-weight: 650; color: var(--serious); letter-spacing: .1em; margin-bottom: 9px; }
.hw-status-good { color: var(--series-3); }
.hw-detail h2 { font-size: 24px; font-weight: 600; letter-spacing: -.035em; margin: 0 0 6px; }
.hw-architecture { color: var(--muted); font-size: 11px; margin: 0; }
.hw-source { display: inline-block; font-size: 11px; color: var(--accent); text-decoration: none; margin-top: 8px; }
.hw-speed { display: flex; align-items: baseline; gap: 12px; padding-top: 24px; flex-wrap: wrap; }
.hw-speed strong { font-size: clamp(42px, 5vw, 62px); line-height: 1; font-weight: 600; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.hw-speed span { color: var(--ink-2); font-size: 12px; }
.hw-speed-sub { margin: 8px 0 24px; font-size: 11px; color: var(--muted); }
.hw-detail h3 { font-size: 13px; font-weight: 600; margin: 0 0 14px; }
.hw-answer { background: var(--plane); border-radius: 9px; padding: 16px; }
.hw-answer-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.hw-answer-heading strong { font-size: 20px; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.hw-answer-timings { display: flex; justify-content: space-between; gap: 10px; font-size: 10.5px; color: var(--ink-2); margin: 5px 0 8px; }
.hw-answer-timings div::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 5px; background: var(--series-2); }
.hw-answer-timings div + div::before { background: var(--series-1); }
.hw-answer-track { display: flex; gap: 3px; height: 8px; border-radius: 3px; overflow: hidden; }
.hw-wait { background: var(--series-2); min-width: 3px; }
.hw-generate { background: var(--series-1); }
.hw-answer .aside { font-size: 10.5px; margin-top: 11px; }
.hw-memory { padding: 24px 0; }
.hw-memory .stack-track { height: 13px; }
.hw-memory .stack-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hw-memory .stack-legend li, .hw-memory .legend-name, .hw-memory .legend-value { font-size: 10px; }
.hw-memory .legend-value { margin-left: auto; }
.hw-variants { border-top: 1px solid var(--grid); padding: 20px 0; }
.hw-auto { font-size: 11px; width: 100%; text-align: left; padding: 8px 10px; border-style: dashed; color: var(--ink-2); margin-bottom: 10px; background: transparent; }
.hw-auto[aria-pressed='true'] { color: var(--accent); }
.hw-precision-choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hw-precision { display: flex; flex-direction: column; text-align: left; gap: 5px; padding: 11px; }
.hw-precision[aria-pressed='true'] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.hw-precision strong { font-size: 11px; }
.hw-precision span { font-size: 12px; }
.hw-precision small { font-size: 9px; color: var(--muted); }
.hw-variants .aside { font-size: 10.5px; }
.hw-tradeoffs { border-top: 1px solid var(--grid); padding-top: 15px; font-size: 12px; color: var(--ink-2); }
.hw-tradeoffs[open] summary { margin-bottom: 20px; }
.hw-tradeoffs .hardware-table { font-size: 11px; }
.hw-tradeoffs .hardware-table th[scope='row'] { min-width: 0; }
.hw-tradeoffs .hardware-table th, .hw-tradeoffs .hardware-table td { padding: 9px 4px; }
.hw-try { font-size: 10px; padding: 3px 8px; }
.hw-try:disabled { opacity: .5; cursor: default; }
.hw-empty { padding: 18px; border: 1px dashed var(--axis); border-radius: 8px; color: var(--ink-2); font-size: 12px; margin: 20px 0; }
.hw-unavailable { color: var(--muted); }
.hw-methodology { margin-top: 24px; }
@media (max-width: 760px) {
  .hw-workload { grid-template-columns: 1fr; padding: 18px; }
  .hw-board { grid-template-columns: 1fr; }
  .hw-model-list { max-height: 400px; }
  .hw-summary { gap: 16px; padding: 26px 0; }
  .hw-summary h2 { font-size: 25px; }
  .hw-capacity strong { font-size: 19px; }
  .hw-capacity span { display: block; max-width: 100px; }
  .hw-detail { padding: 20px; }
  .hw-memory .stack-legend { grid-template-columns: 1fr; }
  .hw-precision { padding: 9px; }
}
