:root {
  --bg: #0b1020;
  --surface: #141a2e;
  --surface-2: #1c2440;
  --text: #eef1f8;
  --muted: #9aa3c0;
  --faint: #6b7497;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.18);
  --accent: #0ea5e9;
  --accent-text: #38bdf8;
  --accent-bg: color-mix(in srgb, var(--accent) 16%, transparent);
  --accent-dim: color-mix(in srgb, var(--accent) 9%, transparent);
  --gas: #f59e0b;          /* gas = amber */
  --gas-bg: color-mix(in srgb, #f59e0b 16%, transparent);
  --ev: #22c55e;           /* ev = green */
  --ev-bg: color-mix(in srgb, #22c55e 16%, transparent);
  --bad: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --maxw: 920px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f7fb; --surface: #ffffff; --surface-2: #eef1f8;
    --text: #16203a; --muted: #5a6488; --faint: #8b93ad;
    --border: rgba(20,30,60,.10); --border-strong: rgba(20,30,60,.18);
    --accent: #0284c7; --accent-text: #0369a1;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; }
svg { width: 1em; height: 1em; }

.site-header { max-width: var(--maxw); margin: 0 auto; padding: 16px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 1.05rem; color: var(--text); }
.brand:hover { text-decoration: none; } .brand-icon { color: var(--accent); font-size: 1.3rem; }
.loc-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 5px 11px; border-radius: 999px; cursor: pointer; }
.loc-pill b { color: var(--accent-text); font-weight: 600; }
.loc-pill:hover { border-color: var(--border-strong); }

#main { max-width: var(--maxw); margin: 0 auto; padding: 4px 18px 40px; }
.intro h1 { font-size: 1.6rem; margin: 8px 0 4px; }
.intro .subtitle { color: var(--muted); margin: 0 0 18px; font-size: .95rem; }

.controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 16px; }
.controls .grouplabel { width: 100%; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); margin: -2px 0 2px; }
.ctl { display: flex; flex-direction: column; gap: 5px; } .ctl.grow { flex: 1; min-width: 200px; }
.ctl label { font-size: .74rem; color: var(--muted); }
input, select { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); padding: 9px 11px; font: inherit; font-size: .88rem; max-width: 100%; }
input:focus, select:focus { outline: none; border-color: var(--accent); }
.with-unit { display: flex; align-items: center; }
.with-unit input { border-top-right-radius: 0; border-bottom-right-radius: 0; width: 110px; }
.with-unit .unit { font-size: .8rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-left: none; border-top-right-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); padding: 9px 11px; white-space: nowrap; }
.hint { font-size: .72rem; color: var(--faint); }

.rangerow { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 220px; }
.rangerow .rl { display: flex; justify-content: space-between; font-size: .74rem; color: var(--muted); }
.rangerow .rl b { color: var(--text); font-weight: 600; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 6px; background: var(--surface-2); border-radius: 999px; padding: 0; border: 1px solid var(--border); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); cursor: pointer; border: none; }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); cursor: pointer; border: none; }

/* verdict banner */
.verdict { border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; border: 1px solid var(--border); display: flex; gap: 14px; align-items: center; }
.verdict.yes { background: linear-gradient(180deg, var(--ev-bg), transparent), var(--surface); }
.verdict.close { background: linear-gradient(180deg, var(--gas-bg), transparent), var(--surface); }
.verdict.no { background: linear-gradient(180deg, color-mix(in srgb, var(--bad) 14%, transparent), transparent), var(--surface); }
.verdict .vicon { font-size: 1.8rem; flex: none; }
.verdict.yes .vicon { color: var(--ev); } .verdict.close .vicon { color: var(--gas); } .verdict.no .vicon { color: var(--bad); }
.verdict .vh { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.verdict .vs { font-size: .88rem; color: var(--muted); margin-top: 2px; }
.verdict .vs b { color: var(--text); }

/* versus cards */
.versus { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.vcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.vcard .vt { display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600; color: var(--muted); }
.vcard.gas .vt svg { color: var(--gas); } .vcard.ev .vt svg { color: var(--ev); }
.vcard .vbig { font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin: 8px 0 2px; }
.vcard.gas .vbig { color: var(--gas); } .vcard.ev .vbig { color: var(--ev); }
.vcard .vsub { font-size: .76rem; color: var(--muted); }
.vcard .vbar { height: 6px; border-radius: 999px; background: var(--surface-2); margin-top: 12px; overflow: hidden; }
.vcard .vbar > span { display: block; height: 100%; border-radius: 999px; }
.vcard.gas .vbar > span { background: var(--gas); } .vcard.ev .vbar > span { background: var(--ev); }
.vcard .vrow { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.vcard .vrow b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* breakeven + context */
.breakeven { background: var(--accent-bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 13px 15px; font-size: .9rem; margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; }
.breakeven svg { color: var(--accent-text); margin-top: 2px; flex: none; } .breakeven b { color: var(--accent-text); }
.context { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 15px; font-size: .85rem; color: var(--muted); margin-bottom: 16px; display: flex; flex-direction: column; gap: 7px; }
.context .row { display: flex; gap: 9px; align-items: flex-start; } .context .row svg { color: var(--accent-text); margin-top: 2px; flex: none; } .context b { color: var(--text); }

.actions { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: .85rem; font-weight: 500; border: 1px solid var(--border-strong); background: transparent; color: var(--text); border-radius: var(--radius-sm); padding: 9px 13px; cursor: pointer; }
.btn:hover { background: var(--surface-2); } .btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent-bg); border-color: transparent; color: var(--accent-text); }

.adv-toggle { background: none; border: none; color: var(--accent-text); font: inherit; font-size: .82rem; cursor: pointer; padding: 4px 0; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.adv-toggle:hover { text-decoration: underline; }

.ad-slot { margin: 24px 0; min-height: 120px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); color: var(--faint); font-size: .78rem; background: var(--surface); }

/* cross-link to the sister site */
.cluster { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin: 22px 0; font-size: .88rem; }
.cluster svg { color: var(--ev); font-size: 1.4rem; flex: none; }
.cluster .ct { color: var(--muted); } .cluster .ct b { color: var(--text); }
.cluster a { white-space: nowrap; font-weight: 500; margin-left: auto; }

.popular { margin: 26px 0 8px; } .popular h2 { font-size: 1rem; margin: 0 0 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: .82rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 7px 13px; }
.chip:hover { border-color: var(--accent); text-decoration: none; color: var(--accent-text); }

.about { margin-top: 26px; } .about h2 { font-size: 1rem; margin: 0 0 8px; } .about p { font-size: .88rem; color: var(--muted); margin: 0 0 10px; }
.faq { margin-top: 22px; } .faq h2 { font-size: 1rem; margin: 0 0 10px; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 14px; margin-bottom: 8px; background: var(--surface); }
.faq summary { cursor: pointer; padding: 12px 0; font-size: .9rem; font-weight: 500; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 1.1rem; }
.faq details[open] summary::after { content: "–"; }
.faq details p { font-size: .86rem; color: var(--muted); margin: 0 0 12px; }

.site-footer { max-width: var(--maxw); margin: 0 auto; padding: 24px 18px 40px; font-size: .76rem; color: var(--faint); text-align: center; }
.site-footer a { color: var(--faint); text-decoration: underline; }
.trio { font-size: .78rem; color: var(--faint); margin-top: 14px; }
.trio b { color: var(--muted); font-weight: 600; } .trio a { color: var(--accent-text); }

/* model detail page */
.crumb { font-size: .78rem; color: var(--faint); margin: 4px 0 10px; } .crumb a { color: var(--muted); }
.specs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.spec { font-size: .78rem; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px; } .spec b { color: var(--text); }
.prose { font-size: .92rem; color: var(--muted); }
.prose h2 { font-size: 1.15rem; color: var(--text); margin: 26px 0 8px; }
.prose p { margin: 0 0 12px; } .prose ul { margin: 0 0 12px; padding-left: 18px; } .prose li { margin-bottom: 6px; }

@media (max-width: 560px) {
  .versus { grid-template-columns: 1fr; }
  .vcard .vbig { font-size: 1.6rem; }
  .cluster { flex-wrap: wrap; } .cluster a { margin-left: 0; }
}
