:root {
  --bg: #0f1115; --panel: #171a21; --panel2: #1e2230; --line: #2a2f3d;
  --text: #e7e9ee; --muted: #9aa3b2; --accent: #34d399; --warn: #fbbf24; --bad: #f87171; --info: #60a5fa;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; }
main { max-width: 760px; margin: 0 auto; padding: 0 14px 40px; }
h2 { font-size: 20px; margin: 18px 0 10px; }
h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; }
code { background: var(--panel2); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

.top { position: sticky; top: 0; z-index: 10; background: rgba(15,17,21,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; padding: 12px 14px 4px; letter-spacing: .01em; }
.mark { width: 14px; height: 14px; border-radius: 4px; background: var(--accent); display: inline-block; }
.tabs { display: flex; gap: 4px; padding: 6px 10px 8px; max-width: 760px; margin: 0 auto; }
.tab { flex: 1; background: transparent; color: var(--muted); border: 1px solid transparent; padding: 10px 6px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer; }
.tab.active { background: var(--panel2); color: var(--text); border-color: var(--line); }

.verdict { display: flex; gap: 12px; align-items: stretch; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 14px 0 6px; }
.v-main { flex: 1; }
.v-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.v-price { font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin-top: 2px; }
.v-side { font-size: 13px; color: var(--text); display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 150px; }
.v-side .k { color: var(--muted); display: inline-block; width: 62px; }
.muted { color: var(--muted); }
.conf { font-size: 11px; padding: 1px 6px; border-radius: 99px; background: var(--panel2); color: var(--muted); }
.conf.good { color: var(--accent); } .conf.thin, .conf.modeled { color: var(--warn); } .conf.anecdotal { color: var(--bad); }
.verdict.fair .v-price { color: var(--accent); } .verdict.below .v-price { color: var(--accent); }
.verdict.over .v-price { color: var(--warn); } .verdict.walk .v-price { color: var(--bad); }

.view { display: none; } .view.active { display: block; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin: 10px 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
@media (max-width: 480px) { .grid2 { grid-template-columns: 1fr; } .v-side { display: none; } }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
label.check { flex-direction: row; align-items: center; gap: 8px; align-self: end; padding-bottom: 8px; }
.hint { font-weight: 400; font-size: 12px; color: #6f7888; }
input, select, textarea { width: 100%; background: var(--panel2); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px 11px; font-size: 16px; font-family: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
input[type=checkbox] { width: 18px; height: 18px; }
textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; resize: vertical; }
.row { display: flex; gap: 8px; }
.btn { background: var(--accent); color: #062a1c; border: 0; border-radius: 8px; padding: 0 16px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn:disabled { opacity: .5; }
.vin-out { margin-top: 10px; font-size: 14px; padding: 10px; background: var(--panel2); border-radius: 8px; }
.vin-out .big { font-size: 16px; font-weight: 700; }
.notes { margin-top: 8px; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.notes .n { padding-left: 10px; border-left: 2px solid var(--line); }
.notes .n.warn { border-color: var(--warn); color: #e8d7a3; }
.notes .n.bad { border-color: var(--bad); color: #f3b4b4; }
.explain { margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.5; }
table.bo { width: 100%; border-collapse: collapse; font-size: 14px; }
table.bo td { padding: 6px 0; border-bottom: 1px solid var(--line); }
table.bo td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
table.bo tr.total td { font-weight: 800; border-bottom: 0; font-size: 15px; }
table.bo tr.sub td { color: var(--muted); font-size: 13px; }
table.bo td .bar { display: inline-block; height: 6px; background: var(--info); border-radius: 3px; margin-right: 8px; vertical-align: middle; }
canvas { width: 100%; display: block; }
footer { color: #6f7888; font-size: 12px; margin-top: 24px; text-align: center; }
footer a { color: var(--muted); }
#disc { text-align: left; line-height: 1.5; }
.err { color: var(--bad); }

.afford { margin-top: 10px; }
.afford-head { font-size: 14px; margin-bottom: 8px; }
.risk { display: inline-block; padding: 2px 9px; border-radius: 99px; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; background: var(--panel2); }
.risk.comfortable { color: var(--accent); } .risk.moderate { color: var(--info); } .risk.stretch { color: var(--warn); } .risk.overextended { color: var(--bad); }
.checks { list-style: none; padding: 0; margin: 0 0 8px; font-size: 13px; }
.checks li { padding: 4px 0 4px 22px; position: relative; color: var(--muted); }
.checks li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.checks li.fail::before { content: '✕'; color: var(--bad); }
.checks li.fail { color: var(--text); }
