:root {
  --bg: #f6f7f4;
  --surface: #ffffff;
  --text: #17201b;
  --muted: #5b665f;
  --line: #dde2dc;
  --accent: #0b7a53;
  --accent-ink: #ffffff;
  --accent-soft: #e3f3ec;
  --warn: #8a5a00;
  --warn-soft: #fdf1d6;
  --bad: #a3271f;
  --bad-soft: #fbe6e3;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101512;
    --surface: #18201c;
    --text: #e9efea;
    --muted: #9eaaa2;
    --line: #2b3630;
    --accent: #4fd3a0;
    --accent-ink: #06291c;
    --accent-soft: #17382c;
    --warn: #f0c36a;
    --warn-soft: #3a2f14;
    --bad: #ff9a8f;
    --bad-soft: #3d1c19;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); letter-spacing: -.02em; }
h2 { font-size: 1.35rem; margin-top: 2.2em; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
header.site { border-bottom: 1px solid var(--line); background: var(--surface); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; }
.brand { font-weight: 700; text-decoration: none; color: var(--text); letter-spacing: -.01em; }
.brand span { color: var(--accent); }
nav a { margin-left: 16px; text-decoration: none; font-weight: 500; }
nav a[aria-current="page"] { color: var(--text); }
main { padding: 32px 0 56px; }
footer.site { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: .875rem; }

.lead { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 16px 0; }

label { display: block; font-weight: 600; margin-bottom: 6px; }
.hint { font-weight: 400; color: var(--muted); font-size: .875rem; display: block; margin-top: 2px; }
input[type="text"], input[type="number"], input[type="date"] {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
}
input:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
#vin { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1.2rem; letter-spacing: .08em; text-transform: uppercase; }
.row { display: flex; gap: 10px; align-items: stretch; }
.row input { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } .row { flex-direction: column; } }

button, .btn {
  font: inherit; font-weight: 600; cursor: pointer; border-radius: 10px; padding: 12px 20px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); text-decoration: none; display: inline-block;
}
button.ghost, .btn.ghost { background: transparent; color: var(--accent); }
button.chip { padding: 5px 11px; font-size: .85rem; font-weight: 500; background: transparent; color: var(--text); border-color: var(--line); border-radius: 999px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }

details.more { margin-top: 16px; }
details.more > summary { cursor: pointer; font-weight: 600; color: var(--accent); }
details.more .grid2 { margin-top: 14px; }

.status { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; letter-spacing: .02em; }
.status.ok { background: var(--accent-soft); color: var(--accent); }
.status.warn { background: var(--warn-soft); color: var(--warn); }
.status.bad { background: var(--bad-soft); color: var(--bad); }
#result h2 { margin-top: .5em; }
.cand { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }
.cand:first-of-type { border-top: 0; padding-top: 0; }
.big { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.big small { font-size: 1rem; font-weight: 500; color: var(--muted); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 12px 0 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
.note { border-radius: 10px; padding: 12px 14px; margin-top: 14px; }
.note.warn { background: var(--warn-soft); color: var(--warn); }
.note.info { background: var(--accent-soft); }
.note.bad { background: var(--bad-soft); color: var(--bad); }
.note strong { display: block; margin-bottom: 2px; }
.note p:last-child { margin-bottom: 0; }

ul.plain { list-style: none; padding: 0; margin: 0; }
.models { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; padding-left: 40px; position: relative; margin-bottom: 14px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; display: grid; place-items: center; }

/* Guide */
.progress { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 10px 0; border-bottom: 1px solid var(--line); }
.progress .bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.progress .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.progress .top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .9rem; }
.progress button { padding: 4px 10px; font-size: .8rem; }
.stage h2 { margin-bottom: 0; }
.stage .where { color: var(--muted); margin-bottom: 8px; }
.item { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.item input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); }
.item label { margin: 0; cursor: pointer; }
.item .detail { margin: 4px 0; }
.item .why { color: var(--muted); font-size: .9rem; margin: 0; }
.item.done label { text-decoration: line-through; color: var(--muted); }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); margin-left: 6px; vertical-align: middle; text-decoration: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .two { grid-template-columns: 1fr; } }
.two .card { margin: 0; }
.two ul { margin: 0; padding-left: 20px; }
.card.stop { border-color: var(--bad); }
.card.stop h3 { color: var(--bad); }

@media print {
  header.site, footer.site, .progress button, .noprint { display: none !important; }
  body { background: #fff; color: #000; }
  .progress { position: static; }
  .card { break-inside: avoid; }
  .item { break-inside: avoid; }
}
