/* UKCarCheck theme. Tokens on :root, dark mode by system preference, mobile first (390 px), no web fonts. */
:root {
  --bg: #f6f7f5; --surface: #ffffff; --ink: #17201f; --muted: #55625f; --line: #d9dfdc;
  --brand: #0e6b62; --brand-ink: #ffffff; --brand-soft: #e3f1ee; --link: #0b5c54;
  --ok: #1d7a3e; --ok-soft: #e4f4e9; --warn: #8a5a00; --warn-soft: #fdf2d8; --bad: #b3261e; --bad-soft: #fbe7e5;
  --info-soft: #eaf0fb; --plate: #ffd200; --plate-ink: #111; --plate-band: #1d3f94;
  --radius: 12px; --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --plate-font: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1413; --surface: #171e1d; --ink: #e7eceb; --muted: #a2b0ad; --line: #2b3533;
    --brand: #2aa596; --brand-ink: #071311; --brand-soft: #16302c; --link: #6fd3c4;
    --ok: #5fcf85; --ok-soft: #14301f; --warn: #f0c05a; --warn-soft: #33290f; --bad: #ff8a80; --bad-soft: #3a1714;
    --info-soft: #18233a; --shadow: none;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--font); }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
[tabindex="-1"]:focus { outline: none; box-shadow: none; }
:focus-visible { outline: 3px solid var(--plate); outline-offset: 2px; box-shadow: 0 0 0 5px var(--ink); border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 1.8rem; margin: .4em 0 .5em; }
h2 { font-size: 1.3rem; margin: 1.6em 0 .5em; }
h3 { font-size: 1.08rem; margin: 1.2em 0 .4em; }
img, svg { max-width: 100%; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.small, .muted { color: var(--muted); font-size: .9rem; }

/* header */
header.site { background: var(--surface); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
nav.main { display: flex; gap: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
nav.main a { padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .95rem; white-space: nowrap; }
nav.main a:hover { background: var(--brand-soft); }
nav.main a[aria-current="page"] { background: var(--brand-soft); font-weight: 650; }
@media (max-width: 560px) { .bar { padding: 8px 0; } nav.main { width: 100%; } nav.main a:first-child { padding-left: 0; } nav.main a[aria-current="page"]:first-child { padding-left: 10px; } }

main { padding: 8px 0 40px; min-height: 60vh; }

/* hero + plate form */
.hero { padding: 18px 0 8px; }
.hero h1 { font-size: 2rem; margin-top: .3em; }
.hero p.lead { font-size: 1.08rem; color: var(--muted); max-width: 40em; }
.lookup { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); max-width: 560px; }
.lookup label { display: block; font-weight: 650; margin-bottom: 6px; }
.plate-row { display: flex; gap: 10px; flex-wrap: wrap; }
.plate { display: flex; flex: 1 1 240px; min-width: 0; border: 2px solid #111; border-radius: 8px; overflow: hidden; background: var(--plate); }
.plate .band { background: var(--plate-band); color: #fff; font: 700 .8rem/1 var(--font); display: flex; align-items: flex-end; justify-content: center; padding: 0 7px 8px; min-width: 38px; }
.plate input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--plate-ink); font: 800 1.7rem/1 var(--plate-font); letter-spacing: .06em; text-transform: uppercase; padding: 10px 10px; }
.plate input::placeholder { color: rgba(0,0,0,.38); }
.plate input:focus { outline: none; }
.plate:focus-within { outline: 3px solid var(--brand); outline-offset: 2px; }
.btn { appearance: none; border: 0; border-radius: 8px; background: var(--brand); color: var(--brand-ink); font: 700 1.05rem/1 var(--font); padding: 0 20px; min-height: 52px; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: .6; cursor: progress; }
.field-error { color: var(--bad); font-weight: 600; margin: 8px 0 0; }
.hint { color: var(--muted); font-size: .9rem; margin: 8px 0 0; }

/* cards */
.cards { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .cards { grid-template-columns: 1fr 1fr; } }
.cards a { display: block; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; color: var(--ink); text-decoration: none; }
.cards a:hover { border-color: var(--brand); }
.cards strong { display: block; color: var(--link); margin-bottom: 4px; }
.cards span { color: var(--muted); font-size: .95rem; }
.features { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 20px 0; padding: 0; list-style: none; }
@media (min-width: 700px) { .features { grid-template-columns: repeat(3, 1fr); } }
.features li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.features b { display: block; margin-bottom: 4px; }

/* prose */
.prose { max-width: 720px; }
.prose li { margin: .3em 0; }
.pill { display: inline-block; background: var(--brand-soft); color: var(--ink); font-size: .85rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; margin: 0 0 8px; }
.crumbs { font-size: .9rem; color: var(--muted); margin-top: 12px; }
.note { background: var(--info-soft); border-left: 4px solid var(--brand); padding: 12px 14px; border-radius: 0 8px 8px 0; margin: 16px 0; }
.note > :first-child { margin-top: 0; } .note > :last-child { margin-bottom: 0; }
.sources { margin-top: 32px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .95rem; }
.sources h2 { font-size: 1.05rem; }
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 650; }

/* results */
.result { margin-top: 18px; }
.status-msg { padding: 14px 16px; border-radius: var(--radius); margin: 16px 0; }
.status-msg.loading { background: var(--surface); border: 1px dashed var(--line); }
.status-msg.error { background: var(--bad-soft); border: 1px solid var(--bad); }
.vehicle-head { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.vehicle-head .reg { display: inline-block; background: var(--plate); color: var(--plate-ink); font: 800 1.25rem/1 var(--plate-font); letter-spacing: .06em; padding: 6px 10px; border: 2px solid #111; border-radius: 6px; }
.vehicle-head h2 { margin: 10px 0 4px; font-size: 1.45rem; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 16px; margin: 12px 0 0; }
@media (min-width: 700px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.facts div { min-width: 0; }
.facts dt { color: var(--muted); font-size: .82rem; }
.facts dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 16px 0; }
.panel > h2:first-child, .panel > h3:first-child { margin-top: 0; }
.countdown { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.countdown .big { font-size: 2.6rem; font-weight: 800; line-height: 1; }
.badge { display: inline-block; font-weight: 700; font-size: .85rem; padding: 3px 9px; border-radius: 99px; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.info { background: var(--info-soft); color: var(--ink); }
.tone-ok { border-left: 5px solid var(--ok); }
.tone-warn { border-left: 5px solid var(--warn); }
.tone-bad { border-left: 5px solid var(--bad); }
.tone-info { border-left: 5px solid var(--brand); }
.tests { list-style: none; padding: 0; margin: 0; }
.tests > li { border-top: 1px solid var(--line); padding: 12px 0; }
.tests > li:first-child { border-top: 0; }
.test-head { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: baseline; }
.test-head .date { font-weight: 700; }
.defects { margin: 8px 0 0; padding: 0; list-style: none; }
.defects li { margin: 4px 0; padding-left: 12px; border-left: 3px solid var(--line); font-size: .95rem; }
.defects li.dangerous, .defects li.major { border-color: var(--bad); }
.defects li.minor, .defects li.prs { border-color: var(--warn); }
.defects .k { font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; margin-right: 6px; }
details summary { cursor: pointer; font-weight: 650; color: var(--link); }
.chart { width: 100%; height: auto; display: block; margin-top: 8px; }
.chart .axis { stroke: var(--line); }
.chart .lbl { fill: var(--muted); font: 12px var(--font); }
.chart .line { stroke: var(--brand); stroke-width: 2.5; fill: none; }
.chart .dot { fill: var(--surface); stroke: var(--brand); stroke-width: 2.5; }
.chart .dot.drop { stroke: var(--bad); fill: var(--bad); }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding: 10px 0; border-top: 1px solid var(--line); }
.checks li:first-child { border-top: 0; }
.verdicts { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .verdicts { grid-template-columns: 1fr 1fr; } }
.verdicts > div { border-radius: 10px; padding: 12px 14px; background: var(--bg); }
.attrib { font-size: .85rem; color: var(--muted); }
.ad-slot { display: none; } /* reserved for AdSense later: no ad code is loaded */

footer.site { border-top: 1px solid var(--line); background: var(--surface); padding: 20px 0 28px; font-size: .92rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px; }
.disclaimer { color: var(--muted); max-width: 60em; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
