:root {
  --bg: #f6f8fb; --card: #fff; --fg: #15202b; --muted: #5b6875; --line: #dde3ea;
  --accent: #1f4e79; --accent-ink: #163a5c; --link: #1d5fa3; --soft: #e8eef6;
  --danger: #b42318; --danger-bg: #fdecea; --warn: #8a5a00; --warn-bg: #fff4dc; --ok: #1e6b3a; --ok-bg: #e5f4ea;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f151c; --card: #17202a; --fg: #e6edf3; --muted: #9aa7b4; --line: #2a3644;
          --accent: #4f8fd1; --accent-ink: #7fb0e6; --link: #7fb0e6; --soft: #1c2a3a;
          --danger: #ff9b8f; --danger-bg: #3a1714; --warn: #f5c76b; --warn-bg: #33270e; --ok: #8fd6a6; --ok-bg: #12301d; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--link); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }
.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; align-items: center; padding-top: .8rem; padding-bottom: .8rem; }
.brand { display: flex; gap: .5rem; align-items: center; font-weight: 800; font-size: 1.2rem; color: var(--fg); text-decoration: none; }
.wordmark span { color: var(--accent); }
.top nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.top nav a:hover, .top nav a[aria-current] { color: var(--accent); }
main.wrap { flex: 1; padding-top: 2.25rem; padding-bottom: 3rem; }
h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); line-height: 1.15; margin: 0 0 .75rem; letter-spacing: -.01em; }
h2 { line-height: 1.25; margin-top: 2rem; }
.lede, .tool-intro { color: var(--muted); font-size: 1.08rem; max-width: 720px; }
.small { font-size: .92rem; color: var(--muted); }
.muted { color: var(--muted); margin: .25rem 0 0; }
.hero { max-width: 720px; margin-bottom: 1rem; }
.hero h1 { font-size: clamp(2.1rem, 6.5vw, 3.2rem); }
.vin-form { display: flex; gap: .5rem; flex-wrap: wrap; max-width: none; margin: 1.25rem 0 .5rem; }
.vin-form input { flex: 1 1 260px; font-size: 1.1rem; letter-spacing: .04em; text-transform: uppercase; }
.button, .tool-form button { display: inline-block; background: var(--accent); color: #fff; border: 0; padding: .7rem 1.4rem; border-radius: 8px;
          text-decoration: none; cursor: pointer; font: inherit; font-weight: 600; justify-self: start; }
.button:hover, .tool-form button:hover { background: var(--accent-ink); color: #fff; }
form { display: grid; gap: 1rem; max-width: 560px; }
.tool-form { grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); max-width: none;
             background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem; }
.tool-form label:only-of-type { grid-column: 1 / -1; }
.tool-form button { grid-column: 1 / -1; }
label { display: grid; align-content: start; gap: .3rem; font-size: .95rem; font-weight: 500; }
input, textarea, select { font: inherit; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.tool-form small { color: var(--muted); font-weight: 400; }
input[name="vin"] { text-transform: uppercase; letter-spacing: .04em; }
input[name="vin"]::placeholder { text-transform: none; letter-spacing: normal; }
.tool-result { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1.25rem 1.4rem; margin: 1.5rem 0; }
.tool-value { font-size: clamp(1.4rem, 4vw, 1.9rem); font-weight: 750; margin: 0 0 .5rem; color: var(--accent-ink); }
.tool-result dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.5rem; margin: 1rem 0; }
.tool-result dt { color: var(--muted); }
.tool-result dd { margin: 0; font-weight: 600; word-break: break-word; }
.tool-error { background: var(--danger-bg); color: var(--danger); padding: .8rem 1rem; border-radius: 8px; }
.sub { font-size: 1.25rem; margin-top: 1.5rem; }
.vin-echo code { font-size: 1.05rem; letter-spacing: .06em; }
.notes { color: var(--muted); font-size: .93rem; padding-left: 1.2rem; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; padding: .05rem .5rem; border-radius: 999px; background: var(--soft); color: var(--accent-ink); margin-left: .35rem; vertical-align: 1px; }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.alert { border-radius: 10px; padding: .85rem 1rem; margin: 1rem 0; border-left: 5px solid; }
.alert.danger { background: var(--danger-bg); color: var(--danger); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.check-vin { background: var(--soft); border-radius: 10px; padding: .1rem 1rem; margin: 1rem 0; }
.recalls { list-style: none; padding: 0; margin: 1.5rem 0; display: grid; gap: 1rem; }
.recall { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.25rem; }
.recall h3 { margin: 0; font-size: 1.1rem; }
.recall .meta, .meta { color: var(--muted); font-size: .88rem; margin: .2rem 0 .6rem; }
.recall p { margin: .5rem 0; }
.mini-recalls { padding-left: 1.2rem; }
.complaints { margin-top: 2rem; }
table { border-collapse: collapse; width: 100%; }
.bars td, .bars th, .chart td, .chart th { padding: .45rem .5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.bars th, .chart thead th { color: var(--muted); font-weight: 600; font-size: .9rem; }
.bars td:last-child { width: 45%; white-space: nowrap; }
.bar { display: inline-block; height: .7rem; width: calc(var(--w) * .8); background: var(--accent); border-radius: 3px; margin-right: .5rem; vertical-align: middle; opacity: .75; }
.chart { max-width: 560px; }
.chart th[scope="row"] { white-space: nowrap; color: var(--muted); width: 5rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
.chips a { background: var(--soft); border-radius: 999px; padding: .15rem .7rem; text-decoration: none; font-size: .92rem; }
.chips.big a { font-size: 1rem; padding: .3rem .9rem; }
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 1rem; margin-top: 1.5rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; }
.card h2 { font-size: 1.1rem; margin: 0 0 .25rem; }
.card h2 a { color: var(--fg); text-decoration: none; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: .75rem; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 0 2rem; }
.faq { margin-top: 2.5rem; max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: .8rem 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.tool-api { margin-top: 2rem; color: var(--muted); }
.page { max-width: 760px; }
.notice { background: var(--soft); padding: 1rem; border-radius: 8px; }
.ad { max-width: 960px; margin: 1rem auto; padding: 0 1rem; min-height: 90px; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; background: var(--card); }
.foot { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; padding-top: 1.5rem; padding-bottom: 1.5rem; }
.foot p { margin: .25rem 0 0; max-width: 520px; }
.foot nav { display: flex; gap: 1rem; }
@media (max-width: 560px) {
  .tool-result dl { grid-template-columns: 1fr; gap: 0; }
  .tool-result dd { margin-bottom: .5rem; }
  .bars td:last-child { width: auto; }
}
