/* TrueDNA Vehicle Truth Layer. Brand matches gettruedna.com: Inter, white, blue #1E90FF, navy #1A2E4A. */
:root {
  --blue: #1E90FF;
  --blue-ink: #1668C7;
  --blue-ink-dark: #0F4F99;
  --navy: #1A2E4A;
  --text: #2C3E50;
  --muted: #5B6B80;
  --line: #E3E8EF;
  --line-soft: #F1F4F8;
  --panel: #F5F8FC;
  --red: #A61B1B;   --red-bg: #FDE8E8;   --red-dot: #C62828;
  --orange: #9A4A07; --orange-bg: #FFF4E5; --orange-dot: #D97706;
  --green: #166534; --green-bg: #E7F6EC; --green-dot: #16A34A;
  --gray-bg: #EEF2F7; --gray-dot: #64748B;
}
* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--text); font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.45; }
a { color: var(--blue-ink); text-decoration: none; }
a:hover { color: var(--blue-ink-dark); }
img { max-width: 100%; display: block; }
h1, h2, h3 { color: var(--navy); margin: 0; line-height: 1.2; }
h1 { font-size: 34px; font-weight: 800; }
h2 { font-size: 20px; font-weight: 700; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 20px; }
.row > * { flex: 1 1 460px; min-width: 0; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.strong { font-weight: 700; color: var(--navy); }

/* Header */
.topbar { border-bottom: 1px solid var(--line); background: #fff; }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 16px; color: inherit; }
.brand img { height: 52px; width: auto; }
.brand .doc { border-left: 1px solid var(--line); padding-left: 16px; }
.brand .doc b { display: block; color: var(--navy); font-size: 17px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 600; font-size: 14px; border: 1px solid #C9D3E0; color: var(--navy); background: #fff; cursor: pointer; font-family: inherit; }
.btn:hover { border-color: var(--blue-ink); color: var(--blue-ink); }
.btn.primary { background: var(--blue-ink); border-color: var(--blue-ink); color: #fff; }
.btn.primary:hover { background: var(--blue-ink-dark); color: #fff; }
.btn svg { width: 16px; height: 16px; }

main.wrap { padding-top: 28px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 28px; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 1px 3px rgba(15, 23, 42, .05); padding: 22px; }
.lbl { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.tone-red { background: var(--red-bg); color: var(--red); }
.tone-orange { background: var(--orange-bg); color: var(--orange); }
.tone-green { background: var(--green-bg); color: var(--green); }
.tone-blue { background: #E6F1FD; color: var(--blue-ink-dark); }
.tone-gray, .tone-info { background: var(--gray-bg); color: #3E4C5E; }
.txt-red { color: var(--red); } .txt-orange { color: var(--orange); } .txt-green { color: var(--green); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }

/* Hero */
.hero { display: flex; flex-wrap: wrap; gap: 28px; align-items: stretch; }
.hero-photo { flex: 1 1 340px; border-radius: 10px; overflow: hidden; background: var(--panel); min-height: 230px; position: relative; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo .count { position: absolute; right: 10px; bottom: 10px; background: rgba(15, 23, 42, .75); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.hero-info { flex: 2 1 420px; display: flex; flex-direction: column; gap: 14px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 24px; font-size: 14px; }
.facts .v { font-weight: 600; color: var(--navy); margin-top: 4px; }
.score { flex: 1 1 220px; border-radius: 12px; background: var(--panel); padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.tile { padding: 16px; }
.tile .n { font-size: 26px; font-weight: 800; color: var(--navy); margin-top: 6px; }
.tile.red { border-color: #F3C3C3; } .tile.red .lbl, .tile.red .n { color: var(--red); }
.tile.orange { border-color: #F5D7B5; } .tile.orange .lbl, .tile.orange .n { color: var(--orange); }
.tile.green .n { color: var(--green); }

.kv3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; font-size: 14px; }
.kv2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; font-size: 14px; }
.kv3 .v, .kv2 .v { font-weight: 700; color: var(--navy); margin-top: 4px; }
.chart { width: 100%; height: auto; background: #FBFCFE; border: 1px solid #EEF2F7; border-radius: 8px; }

.alert { border-radius: 10px; background: #FFF8EF; border: 1px solid #F5D7B5; padding: 16px; display: flex; gap: 14px; align-items: flex-start; font-size: 14px; }
.alert svg { flex: none; margin-top: 2px; }
.ok { display: flex; align-items: center; gap: 10px; font-size: 14px; background: #F1FAF4; border-radius: 10px; padding: 12px 14px; }
.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.mini { border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.mini .s { font-weight: 700; margin-top: 6px; }

.bar { height: 8px; background: #EEF2F7; border-radius: 99px; margin-top: 6px; }
.bar > div { height: 8px; background: var(--blue); border-radius: 99px; }

.list { display: flex; flex-direction: column; font-size: 14px; }
.list > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #EEF2F7; }
.list > div:last-child { border-bottom: 0; }

.timeline { display: flex; flex-direction: column; }
.tl { display: grid; grid-template-columns: 120px 20px minmax(0, 1fr) auto; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; align-items: start; }
.dot { width: 12px; height: 12px; border-radius: 99px; margin-top: 4px; }
.dot.red { background: var(--red-dot); } .dot.orange { background: var(--orange-dot); } .dot.green { background: var(--green-dot); } .dot.blue { background: var(--blue); } .dot.gray { background: var(--gray-dot); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gallery a { display: block; border-radius: 8px; overflow: hidden; background: var(--panel); position: relative; aspect-ratio: 4 / 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.gallery a:hover img { transform: scale(1.04); }
.gallery span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px; font-size: 11px; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(15, 23, 42, .8)); }

table.data { width: 100%; border-collapse: collapse; min-width: 620px; }
table.data th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.data td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); font-size: 14px; vertical-align: top; }
.scroll-x { overflow-x: auto; }
.marker { display: inline-flex; width: 24px; height: 24px; border-radius: 99px; color: #fff; font-weight: 700; font-size: 12px; align-items: center; justify-content: center; }
.marker.red { background: var(--red-dot); } .marker.orange { background: var(--orange-dot); } .marker.gray { background: var(--gray-dot); }

.grade { flex: 0 0 auto; width: 150px; height: 150px; border-radius: 16px; background: var(--navy); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.grade .g { font-size: 52px; font-weight: 800; line-height: 1; }
.subgrades { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; flex: 1 1 260px; }
.subgrades div { background: var(--panel); border-radius: 10px; padding: 12px; }
.subgrades b { display: block; font-size: 20px; color: var(--navy); margin-top: 4px; }

/* Landing */
.landing { text-align: center; padding: 56px 0 24px; }
.landing h1 { font-size: 44px; }
.lookup { margin: 28px auto 0; max-width: 640px; display: flex; gap: 10px; flex-wrap: wrap; }
.lookup input { flex: 1 1 320px; min-height: 52px; border: 1px solid #C9D3E0; border-radius: 999px; padding: 0 22px; font-size: 16px; font-family: inherit; color: var(--navy); }
.lookup input:focus { outline: 3px solid rgba(30, 144, 255, .3); border-color: var(--blue-ink); }
.lookup .btn { min-height: 52px; padding: 0 28px; font-size: 16px; }
.error { color: var(--red); font-weight: 600; margin-top: 12px; }
.demo-cars { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.demo-car { display: flex; flex-direction: column; overflow: hidden; padding: 0; color: inherit; }
.demo-car img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.demo-car .b { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.demo-car.soon .ph { aspect-ratio: 16 / 9; background: var(--panel); display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; }

/* Sticker */
.sticker { width: 560px; max-width: 100%; margin: 32px auto; padding: 36px; border: 2px solid var(--navy); border-radius: 24px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; background: #fff; }
.sticker .badge { background: var(--blue-ink); color: #fff; border-radius: 999px; padding: 8px 22px; font-size: 14px; font-weight: 700; letter-spacing: .12em; }
.sticker .qr { width: 240px; height: 240px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.sticker .stats { display: flex; gap: 10px; width: 100%; }
.sticker .stats div { flex: 1; background: var(--panel); border-radius: 12px; padding: 12px 8px; }
.sticker .stats b { display: block; font-size: 22px; color: var(--navy); }

footer.site { border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--muted); }

/* Lightbox (CSS :target, no JS) */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(10, 18, 32, .9); z-index: 50; align-items: center; justify-content: center; flex-direction: column; gap: 12px; padding: 24px; }
.lightbox:target { display: flex; }
.lightbox img { max-height: 82vh; border-radius: 8px; }
.lightbox p { color: #fff; margin: 0; font-weight: 600; }
.lightbox .close { position: absolute; top: 16px; right: 20px; color: #fff; font-size: 15px; font-weight: 600; min-height: 44px; display: flex; align-items: center; }

/* Share box */
.share { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.share input { flex: 1 1 320px; min-height: 44px; border: 1px solid #C9D3E0; border-radius: 10px; padding: 0 14px; font-family: inherit; font-size: 14px; color: var(--navy); background: var(--panel); }

@media (max-width: 720px) {
  h1 { font-size: 26px; }
  .landing h1 { font-size: 32px; }
  .facts, .kv3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl { grid-template-columns: 90px 14px minmax(0, 1fr); }
  .tl .src { display: none; }
  .sticker .stats { flex-wrap: wrap; }
  .sticker .stats div { flex: 1 1 40%; }
}

@media print {
  .no-print, .actions, .lightbox { display: none !important; }
  body { font-size: 12px; }
  .card { box-shadow: none; break-inside: avoid; }
  main.wrap { padding-top: 12px; gap: 16px; }
  a { color: inherit; }
  .gallery { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
