/* ============================================================
   RAM for Local AI — page styles
   Loads after tokens.css, ui.css, nav.css and index-components.css
   (for the as-of badge). The hero, the inputs-beside-results
   layout, sliders, segmented choice, cards, buttons, the verdict
   card, the phone result bar and the toast come from
   /shared/css/ui.css.
   Two font families only: no var(--mono) or var(--body) here.
   ============================================================ */

:root {
  /* The two speeds keep one colour each everywhere on this page.
     Pair validated for colour-blind separation and 3:1 on white. */
  --read: #1A6FE0;
  --write: #C9661A;
  --fit: var(--green);
  --tight: var(--amber-text);
}

/* Sections switched off by the script stay off, whatever their display rule */
[hidden] { display: none !important; }

.hero-badge { margin-top: 18px; display: flex; }
.hero-desc { max-width: 640px; }

/* ───────────── Inputs: the two questions ───────────── */
.choice-set { border: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.choice-set legend { padding: 0; margin-bottom: 8px; font-size: 15px; color: var(--ink); }
.choice-list { display: flex; flex-direction: column; gap: 8px; }
.choice {
  position: relative;
  display: block;
  padding: 11px 14px 11px 44px;
  min-height: var(--tap);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--card);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.choice:hover { border-color: var(--accent); }
.choice input { position: absolute; left: 14px; top: 14px; width: 18px; height: 18px; accent-color: var(--accent); }
.choice-name { display: block; font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.choice-desc { display: block; margin-top: 2px; font-size: 14px; color: var(--dim); line-height: 1.4; }
.choice:has(input:checked) { border-color: var(--accent); background: #F1F7FF; box-shadow: inset 0 0 0 1px var(--accent); }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.assume { border-top: 1px solid var(--hairline); padding-top: 6px; }
.assume > summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between;
  min-height: var(--tap); cursor: pointer; font-size: 15px; font-weight: 600; color: var(--accent-text);
}
.assume > summary::-webkit-details-marker { display: none; }
.assume > summary::after { content: '+'; font-size: 20px; font-weight: 400; color: var(--dim); }
.assume[open] > summary::after { content: '–'; }
.assume-body { display: flex; flex-direction: column; gap: 18px; padding: 6px 0 4px; }

/* ───────────── Verdict ───────────── */
.verdict-text .hl { color: var(--accent-text); }
.verdict-foot { margin-top: 12px; max-width: 620px; font-size: 15px; line-height: 1.55; color: var(--dim); }
.verdict-foot:empty { display: none; }
.sticky-amount { font-size: 22px; }

/* ───────────── Card heads ───────────── */
.ladder-card, .fits-card, .speed-card, .cloud-card, .honest-card { padding: 22px 24px; }
.card-head { margin-bottom: 14px; }
.card-head h2, .honest-card h2 { font-family: var(--display); font-weight: 400; font-size: 28px; line-height: 1.15; }
.card-sub { margin-top: 6px; max-width: 640px; font-size: 16px; line-height: 1.55; color: var(--dim); }
.card-sub b { color: var(--ink); font-weight: 600; }
.step-tag {
  display: inline-block; margin-bottom: 6px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text);
}

/* ───────────── The memory ladder ───────────── */
.ladder { display: flex; flex-direction: column; }
.rung {
  display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  width: 100%; min-height: 60px; padding: 10px 12px;
  border: 0; border-top: 1px solid var(--hairline); border-radius: 0;
  background: none; text-align: left; cursor: pointer; color: inherit; font: inherit;
  transition: background 0.15s;
}
.rung:first-child { border-top: 0; }
.rung:hover { background: var(--surface); }
.rung-size { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.rung-size small { font-size: 14px; font-weight: 600; color: var(--dim); letter-spacing: 0; }
.rung-runs { min-width: 0; font-size: 16px; line-height: 1.4; color: var(--ink); }
.rung-runs span { display: block; font-size: 14px; color: var(--dim); }
.rung-tag {
  padding: 4px 10px; border-radius: 99px; white-space: nowrap;
  font-size: 13px; font-weight: 600; color: var(--dim); background: var(--surface);
}
.rung.is-short .rung-size, .rung.is-short .rung-runs { color: var(--muted); }
.rung.is-pick .rung-tag { color: #fff; background: var(--accent); }
.rung.is-selected { background: #F1F7FF; box-shadow: inset 3px 0 0 var(--accent); }
.rung.is-selected:hover { background: #F1F7FF; }

/* ───────────── What runs on this size ───────────── */
.model {
  display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 6px 20px; align-items: start;
  padding: 16px 0; border-top: 1px solid var(--hairline);
}
.model:first-child { border-top: 0; padding-top: 4px; }
.model-name { font-size: 18px; font-weight: 700; line-height: 1.3; }
.model-name a { color: var(--ink); text-decoration: none; }
.model-name a:hover { color: var(--accent-text); text-decoration: underline; }
.model-meta { margin-top: 2px; font-size: 14px; color: var(--muted); }
.model-good, .model-bad { margin-top: 8px; font-size: 16px; line-height: 1.5; color: var(--dim); }
.model-good b, .model-bad b { color: var(--ink); font-weight: 600; }
.model-bad { margin-top: 4px; }
.model-need { font-size: 14px; color: var(--dim); }
.model-need strong { display: block; font-size: 17px; font-weight: 700; color: var(--ink); }
.meter { margin: 8px 0 6px; height: 8px; border-radius: 4px; background: var(--ring-bg); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 4px 0 0 4px; background: var(--fit); }
.model.is-tight .meter i { background: var(--gold); }
.fit-word { font-size: 14px; font-weight: 600; color: var(--fit); }
.model.is-tight .fit-word { color: var(--tight); }
.pick-chip {
  display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 99px; vertical-align: 2px;
  font-size: 13px; font-weight: 600; color: var(--accent-text); background: #E6F0FE;
}
.nofit { margin-top: 6px; border-top: 1px solid var(--hairline); }
.nofit > summary { min-height: var(--tap); display: flex; align-items: center; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--accent-text); }
#alsofitList .model:first-child { border-top: 1px solid var(--hairline); padding-top: 16px; }
.nofit-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--hairline); font-size: 15px; color: var(--dim); }
.nofit-row b { color: var(--ink); font-weight: 600; }
.nofit-row span:last-child { white-space: nowrap; }
.empty-note { padding: 14px 16px; border-radius: 12px; background: var(--surface); font-size: 16px; line-height: 1.55; color: var(--dim); }

/* ───────────── Step 2: waiting time ───────────── */
.seg-3 { margin-top: 2px; }
.seg-3 .seg-btn { font-size: 15px; line-height: 1.2; padding: 6px 8px; }
.wait-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 18px 0 10px; font-size: 14px; color: var(--dim); }
.sw { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
.sw-read { background: var(--read); }
.sw-write { background: var(--write); }
.wait-row { padding: 12px 0; border-top: 1px solid var(--hairline); }
.wait-row:first-child { border-top: 0; }
.wait-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.wait-name { font-size: 16px; font-weight: 600; min-width: 0; }
.wait-name small { display: block; font-size: 14px; font-weight: 400; color: var(--muted); }
.wait-total { font-size: 18px; font-weight: 700; white-space: nowrap; }
.wait-bar { display: flex; gap: 2px; height: 18px; margin: 8px 0 6px; }
.wait-bar i { display: block; height: 100%; min-width: 3px; }
.wait-bar .b-read { background: var(--read); border-radius: 0; }
.wait-bar .b-write { background: var(--write); border-radius: 0 4px 4px 0; }
.wait-bar .b-read:only-child { border-radius: 0 4px 4px 0; }
.wait-split { font-size: 14px; color: var(--dim); }
.wait-split a { color: var(--dim); }
.wait-none { margin-top: 6px; font-size: 15px; color: var(--muted); }
.chart-note { margin-top: 12px; font-size: 14px; line-height: 1.6; color: var(--muted); }
.chart-note:empty { display: none; }

.timed-field { margin-top: 16px; }
.sub-h { margin: 24px 0 12px; font-size: 17px; font-weight: 700; }
.outlook-list a { color: var(--accent-text); }
.machines { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.machine { padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.machine-brand { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.machine-name { margin-top: 4px; font-size: 17px; font-weight: 700; line-height: 1.3; }
.machine-price { margin-top: 2px; font-size: 16px; color: var(--ink); }
.machine-price a { color: var(--muted); font-size: 14px; }
.machine ul { list-style: none; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.machine li { position: relative; padding-left: 14px; font-size: 15px; line-height: 1.45; color: var(--dim); }
.machine li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }

/* ───────────── Or don't buy one ───────────── */
.stat-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-top: 1px solid var(--hairline); font-size: 16px; }
.stat-row:first-child { border-top: 0; }
.stat-row .label { color: var(--dim); }
.stat-row .value { font-weight: 700; text-align: right; white-space: nowrap; }
.cloud-line { margin-top: 14px; font-size: 17px; line-height: 1.55; text-wrap: pretty; }

/* ───────────── Honesty list ───────────── */
.honest-card h2 { margin-bottom: 12px; }
.outlook-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.outlook-list li { position: relative; padding-left: 18px; font-size: 16px; line-height: 1.6; color: var(--dim); }
.outlook-list li::before { content: ''; position: absolute; left: 0; top: 0.65em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.outlook-list b { color: var(--ink); font-weight: 600; }
.outlook-src { margin-top: 14px; font-size: 14px; line-height: 1.6; color: var(--muted); }

@media (max-width: 640px) {
  .ladder-card, .fits-card, .speed-card, .cloud-card, .honest-card { padding: 20px; }
  .card-head h2, .honest-card h2 { font-size: 25px; }
  .rung { grid-template-columns: 68px minmax(0, 1fr); gap: 4px 10px; padding: 12px 8px; }
  .rung-size { font-size: 20px; }
  .rung-tag { grid-column: 2; justify-self: start; }
  .model { grid-template-columns: minmax(0, 1fr); }
  .model-need { margin-top: 6px; }
  .seg-3 { grid-auto-flow: row; }
}
