:root {
  --page: #151719;
  --surface: #202326;
  --surface-raised: #292d31;
  --line: #3b4147;
  --line-strong: #59626b;
  --text: #f3f4ef;
  --muted: #bcc2c7;
  --quiet: #929aa1;
  --selection: #d6dadd;
  --accent: #9cbfff;
  --selected-bg: #303438;
  --selected-border: #7a838a;
  --selected-mark: #d6dadd;
  --fit: #8fd6a8;
  --caution: #e8bd72;
}

body {
  font-size: 16px;
  background-color: var(--page);
  background-image: radial-gradient(ellipse at 50% -8%, rgba(156, 191, 255, .06), transparent 42%);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.app-shell {
  width: min(100%, 900px);
}

.hero {
  padding-top: 32px;
  padding-bottom: 22px;
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(2.25rem, 5vw, 2.75rem);
  line-height: 1.04;
}

.hero > p {
  max-width: 720px;
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 6px;
}

.journey-nav {
  margin-top: 2px;
}

.journey-option,
.device-choices label > span,
.task-choices label > span,
.memory-choices label > span,
.priority-step,
.advanced > summary,
.secondary-button,
.text-control,
.device-input > select,
.device-input > input,
.field input,
.field select,
.gpu-entry select,
.gpu-search input {
  min-height: 44px;
}

/* One selected-state language across every choice control. Blue is reserved for focus/links. */
.journey-option[aria-pressed="true"],
.priority-step[aria-pressed="true"],
.device-choices input:checked + span,
.task-choices input:checked + span,
.memory-choices input:checked + span {
  color: var(--text);
  border-color: var(--selected-border);
  background: var(--selected-bg);
  box-shadow: inset 0 -2px 0 var(--selected-mark), inset 0 0 0 1px rgba(255,255,255,.035);
  font-weight: 620;
}

.journey-option[aria-pressed="true"]::after,
.priority-step[aria-pressed="true"]::after {
  display: none;
}

.device-choices label:hover > span,
.task-choices label:hover > span,
.memory-choices label:hover > span,
.priority-step:hover,
.journey-option:hover {
  border-color: #7d8994;
  background-color: var(--surface-raised);
}

.device-choices input:focus-visible + span,
.task-choices input:focus-visible + span,
.memory-choices input:focus-visible + span {
  outline-color: var(--accent);
}

.stage-section {
  margin: 12px 0;
  padding: 20px 20px 22px;
  border-color: var(--line);
  border-radius: 10px;
  background: rgba(32, 35, 38, .82);
}

.stage-index {
  border-color: var(--line-strong);
  background: var(--surface-raised);
  color: var(--text) !important;
}

.priority-steps {
  border-color: var(--line-strong);
  background: var(--surface);
}

.priority-step {
  border-right-color: var(--line-strong);
  color: var(--muted);
}

.results-heading h2,
.content-section h2 {
  font-size: clamp(1.35rem, 3vw, 1.65rem);
}

.model-row > summary {
  min-height: 88px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.model-row > summary:hover {
  background: var(--surface);
}

.model-title small,
.results-heading p,
.field-help,
.journey-caveat {
  color: var(--muted);
}

.metric strong,
.detail-grid strong,
.delta-strip strong,
.milestone-meta strong,
.decision-card dd,
.results-note,
.why-top-match {
  font-variant-numeric: tabular-nums;
}

.metric > span,
.detail-label,
.decision-card dt {
  color: #aeb5bb;
}

.match-list > .model-row.top-choice {
  border-color: #626a71;
  background: rgba(36, 40, 44, .9);
  box-shadow: inset 3px 0 0 #8b9399;
}

.top-choice-badge {
  max-width: 100%;
  border-color: #727a81;
  background: #34383c;
  color: var(--text);
  letter-spacing: .02em;
  text-transform: none;
}

.why-top-match {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: -2px 5px 1px 0;
  padding: 8px 10px;
  border: 1px solid #454c52;
  border-radius: 7px;
  background: rgba(27, 30, 33, .72);
  color: var(--muted);
  font-size: .77rem;
  line-height: 1.45;
}

.why-top-match strong {
  flex: none;
  color: #dde0dc;
  font-size: .72rem;
  font-weight: 620;
  letter-spacing: .01em;
}

.model-details {
  color: #d0d5d8;
}

.estimate-context {
  margin-top: -6px !important;
  padding: 9px 11px;
  border-left: 2px solid #6f777e;
  border-radius: 0 6px 6px 0;
  background: rgba(255, 255, 255, .025);
  color: var(--muted);
  font-size: .8rem;
}

.model-details .ram-warning,
.decision-warning {
  color: var(--caution);
}

.model-links a,
.content-section a,
.homepage-trust a,
.doc-content a {
  color: var(--accent);
}

.decision-card,
.upgrade-milestone,
.decision-summary {
  border-color: var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.decision-card,
.upgrade-milestone {
  padding: 20px;
}

.upgrade-milestone .milestone-meta,
.delta-strip {
  font-variant-numeric: tabular-nums;
}

.content-section {
  padding: 22px;
  border-color: var(--line);
  border-radius: 10px;
  background: rgba(32, 35, 38, .72);
}

@media (min-width: 960px) {
  .hero {
    padding-top: 28px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 16px;
  }

  .app-shell {
    padding-inline: 16px;
  }

  .hero {
    padding-top: 26px;
  }

  .stage-section,
  .content-section {
    padding: 16px;
  }

  .priority-step {
    min-height: 46px;
    font-size: .68rem;
  }

  .why-top-match {
    display: block;
    margin-right: 0;
  }

  .why-top-match strong {
    display: block;
    margin-bottom: 3px;
  }
}

/* Product cleanup: hierarchy comes from alignment and content, not nested shells. */
body { background-image: none; overflow-x: visible; }
.hero { padding: 26px 0 18px; border: 0; }
.hero h1 { font-size: clamp(30px, 3.2vw, 40px); line-height: 1.12; letter-spacing: -.035em; }
.hero > p { margin-top: 12px !important; }
.journey-nav { padding-top: 12px; }
.journey-option { border-radius: 6px; }
.stage-section, .stage-section.control-section { margin: 0; padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.stage-index { border: 0; background: transparent; border-radius: 0; width: 14px; justify-content: start; color: var(--muted) !important; }
.stage-section .section-heading { margin-bottom: 12px; }
.field-help, .metric > span, .model-title small, .detail-label, .journey-caveat, .decision-card dt { font-size: .875rem; }
.priority-step { font-size: .8rem; }
.tier-start { display: none; }
.results-tools { display: flex; flex-direction: column; align-items: end; gap: 4px; }
.result-actions { min-height: 44px; border: 0; flex-wrap: wrap; justify-content: end; }
.results-heading { align-items: start; }
.speed-availability { color: var(--muted); font-size: .875rem; margin: 12px 0; }
.model-row.speed-unavailable > summary { grid-template-columns: minmax(0,1fr) 112px 17px; }
.model-title strong { overflow-wrap: anywhere; }
.match-list > .model-row.top-choice { border-radius: 0; border: 0; border-left: 3px solid var(--selected-mark); background: var(--surface); box-shadow: none; }
.top-choice-badge { border: 0; padding: 0; border-radius: 0; background: none; color: var(--text); font-size: .75rem; }
.why-top-match { padding: 0; border: 0; border-radius: 0; background: none; font-size: .875rem; }
.why-top-match strong { font-size: .875rem; }
.estimate-context { padding: 0; background: none; border: 0; font-size: .875rem; }
.detail-grid { grid-template-columns: 1fr; padding: 8px 0; border: 0; }
.catalog { background: transparent; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; }
.catalog > summary { padding-inline: 0; min-height: 44px; }
.catalog-body { padding-inline: 0; }
.catalog-body input { min-height: 44px; }
.decision-summary, .decision-summary.decision-positive, .decision-summary.decision-warning { border: 0; border-radius: 0; background: transparent; padding: 0 0 16px; }
.decision-summary h3 { font-size: 1.2rem; }
.delta-strip { gap: 20px; }
.delta-strip span { background: none; border: 0; padding: 0; font-size: .875rem; }
.decision-card { padding: 16px; border-radius: 6px; }
.decision-label { font-size: .875rem; letter-spacing: 0; text-transform: none; color: var(--muted); }
.upgrade-list { gap: 0; }
.upgrade-milestone { border: 0; border-top: 1px solid var(--line); background: transparent; border-radius: 0; padding: 18px 0; }
.content-section { padding: 24px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; margin-top: 32px; }
.knowledge-availability { color: var(--muted); font-size: .875rem; line-height: 1.6; margin: 24px 0 0; }
.knowledge-availability a, .try-setup { color: var(--accent); text-underline-offset: 3px; }
.example-table-wrap { overflow-x: auto; margin: 16px 0 8px; }
.example-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; font-variant-numeric: tabular-nums; }
.example-table caption { text-align: left; color: var(--muted); padding-bottom: 12px; }
.example-table td, .example-table th { border-bottom: 1px solid var(--line); padding: 12px 10px 12px 0; vertical-align: top; }
.example-table thead th { color: var(--muted); font-weight: 500; }
.example-table th[scope=row] { max-width: 280px; overflow-wrap: anywhere; font-weight: 600; }
.try-setup { display: inline-flex; align-items: center; min-height: 44px; }
.doc-hero { padding: 30px 0 24px; }
.doc-hero h1 { font-size: clamp(28px, 3vw, 36px); line-height: 1.15; letter-spacing: -.035em; }
.doc-hero > .eyebrow { display: none; }
.doc-chip { border: 0; border-radius: 0; background: none; padding: 0; color: var(--muted); font-size: .875rem; }
.doc-meta, .doc-summary-card p, .preview-card p { font-size: .875rem; }
.doc-summary-grid { gap: 20px; }
.doc-summary-card { padding: 0; border: 0; background: transparent; }
.doc-summary-card small { text-transform: none; letter-spacing: 0; font-size: .875rem; }
.doc-callout { padding: 16px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; }
.preview-grid { display: block; }
.preview-card { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 16px 0; background: none; }
.preview-card .upcoming-label { display: block; border: 0; border-radius: 0; padding: 0; background: none; color: var(--muted); font-size: .875rem; }
.preview-card small { text-transform: none; letter-spacing: 0; font-size: .875rem; }
.site-nav a[aria-current=page] { text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--accent); }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; }
/* Preserve all navigation destinations at narrow widths. */
@media (max-width: 700px) {
 .site-nav a:not([aria-current=page]):not(.knowledge-nav) { display: inline-flex; }
 .site-topbar { flex-wrap: wrap; gap: 0; padding-block: 10px; }
 .site-nav { flex-wrap: wrap; gap: 16px; }
 .model-row > summary, .model-row.speed-unavailable > summary { grid-template-columns: minmax(0,1fr) minmax(90px,110px) 14px; gap: 10px; }
 .model-row .metric.speed { display: block; grid-column: 2; grid-row: 2; }
 .model-row .chevron { grid-column: 3; grid-row: 1; }
 .why-top-match { grid-column: 1 / -1; }
 .results-heading { flex-wrap: wrap; gap: 8px; }
 .results-tools { align-items: start; }
 .results-note { max-width: none; text-align: left; }
 .result-actions { justify-content: start; }
 .journey-options { grid-template-columns: repeat(3,minmax(0,1fr)); }
 .journey-option { display: block; padding: 10px 8px; }
 .journey-option small { font-size: .75rem; margin-top: 4px; }
 .stage-section, .content-section { padding-inline: 0; }
 .doc-hero h1 { font-size: 28px; }
 .example-table { min-width: 600px; }
 .doc-summary-grid { grid-template-columns: 1fr; }
}
.journey-option[aria-pressed="true"]:hover,
.priority-step[aria-pressed="true"]:hover,
.device-choices label:hover > input:checked + span,
.task-choices label:hover > input:checked + span,
.memory-choices label:hover > input:checked + span { background: var(--selected-bg); }
@media (max-width: 700px) {
.site-nav a[aria-current="page"] { display: inline-flex; }
}

/* Square panels and choice groups; only small action/input controls retain 2px. */
.journey-option,
.device-choices,
.memory-choices label > span,
.task-choices label > span,
.priority-steps,
.speed-choices,
.speed-choice,
.stage-section,
.decision-card,
.decision-summary,
.upgrade-milestone,
.model-row,
.estimate-context,
.catalog,
.content-section,
.resource-card,
.info-grid article,
.disclaimer-panel,
.doc-summary-card,
.doc-callout,
.preview-card,
.form-error { border-radius: 0; }

.secondary-button,
.text-control,
.device-input > select,
.device-input > input,
.field input,
.field select,
.gpu-entry select,
.gpu-search input,
.current-model-control input,
.current-model-control select,
.catalog-body input,
.doc-button,
.doc-section code { border-radius: 2px; }

/* Section rhythm: compact controls, a larger break into results, quieter support. */
:root { --section-space: 24px; --control-space: 20px; }
.journey-nav { margin-bottom: 0; }
.stage-section, .stage-section.control-section { padding-block: var(--control-space); }
.advanced-fields { padding-bottom: var(--control-space); }
.results, .results.journey-results { padding-top: 32px; }
.knowledge-availability { margin-top: var(--section-space); }
.homepage-trust { margin-top: var(--section-space); padding-top: 16px; }
.site-footer, .doc-footer { margin-top: var(--section-space); padding-top: 16px; }
.doc-body { padding-top: 0; }
.doc-section, .preview-section { padding-block: var(--section-space); }
@media (max-width: 700px) {
  :root { --control-space: 16px; }
  .results, .results.journey-results { padding-top: var(--section-space); }
}
