:root {
  --ink: #12110f;
  --paper: #f3eee4;
  --panel: #fffaf1;
  --line: rgba(18, 17, 15, 0.16);
  --muted: #6e695f;
  --accent: #d84d31;
  --accent-dark: #9b2d1c;
  --success: #2f6f4e;
  --shadow: 0 24px 70px rgba(30, 24, 17, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 8%, rgba(216, 77, 49, 0.12), transparent 30rem),
    linear-gradient(180deg, #f9f5ed 0%, var(--paper) 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.02em;
}

button, input { font: inherit; letter-spacing: 0.02em; }
a { color: inherit; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-mark {
  width: 44px;
  height: 44px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: 0.03em;
  box-shadow: inset 0 0 0 5px var(--paper);
  background: var(--ink);
  color: var(--paper);
}
.brand-name { font-weight: 900; letter-spacing: 0.14em; font-size: 0.95rem; }
.site-nav { display: flex; gap: 24px; align-items: center; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 700; }
.site-nav a:hover { color: var(--ink); }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 58px 0 80px; }
.hero, .model-hero { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 54px; align-items: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.45);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
h1 {
  margin: 24px 0;
  max-width: 780px;
  font-size: clamp(3rem, 7vw, 6.5rem);
  line-height: 0.94;
  letter-spacing: 0.02em;
}
h2, h3 { letter-spacing: 0.02em; }
.hero-copy { color: var(--muted); font-size: 1.08rem; line-height: 1.75; max-width: 650px; }
.hero-copy strong { color: var(--ink); }
.text-link { display: inline-block; margin-top: 8px; color: var(--accent-dark); font-weight: 900; text-decoration-thickness: 2px; text-underline-offset: 5px; }

.decoder-shell {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border-radius: 30px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow);
}
.decoder-shell::before {
  content: "";
  position: absolute;
  inset: -120px -120px auto auto;
  width: 280px;
  height: 280px;
  border: 50px solid rgba(255, 255, 255, 0.04);
  border-radius: 50%;
}
.decoder-title { position: relative; display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 26px; }
.decoder-title h2 { margin: 3px 0 0; font-size: 1.35rem; }
.decoder-title > span, .decoder-overline { color: rgba(244, 239, 229, 0.62); text-transform: uppercase; letter-spacing: 0.11em; font-size: 0.7rem; }
.vin-form { position: relative; }
.vin-label { display: block; margin-bottom: 9px; color: rgba(244, 239, 229, 0.72); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; }
.input-row { display: flex; gap: 10px; }
.vin-input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 17px 18px;
  outline: none;
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-size: 1.18rem;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
}
.vin-input:focus { border-color: rgba(255, 255, 255, 0.65); box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.07); }
.decode-button {
  border: 0;
  border-radius: 14px;
  padding: 0 22px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, opacity 0.16s ease;
}
.decode-button:hover { transform: translateY(-2px); background: #ed5b3d; }
.decode-button:disabled { opacity: 0.62; cursor: wait; transform: none; }
.form-help { margin: 11px 0 0; color: rgba(244, 239, 229, 0.58); font-size: 0.8rem; line-height: 1.55; }
.example-list { margin-top: 21px; display: flex; flex-wrap: wrap; gap: 8px; }
.example-button { border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 999px; padding: 7px 10px; background: transparent; color: rgba(244, 239, 229, 0.8); cursor: pointer; font-size: 0.75rem; }
.example-button:hover { border-color: rgba(255, 255, 255, 0.45); color: #fff; }

.result-wrap { margin-top: 44px; scroll-margin-top: 24px; }
.result-card { overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: var(--panel); box-shadow: var(--shadow); }
.result-hero { padding: 32px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.result-kicker { margin-bottom: 9px; color: var(--success); text-transform: uppercase; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.12em; }
.result-model { margin: 0; font-size: clamp(2rem, 5vw, 4.2rem); line-height: 1; letter-spacing: 0.02em; }
.result-vin, .vehicle-vin { margin: 13px 0 0; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }
.result-actions { display: grid; gap: 10px; justify-items: end; }
.confidence-badge, .vehicle-status > span { border: 1px solid rgba(47, 111, 78, 0.28); border-radius: 999px; padding: 9px 12px; background: rgba(47, 111, 78, 0.08); color: var(--success); font-size: 0.76rem; font-weight: 900; white-space: nowrap; }
.permalink-button, .primary-link { display: inline-flex; justify-content: center; border-radius: 12px; padding: 10px 13px; background: var(--ink); color: #fff; font-size: 0.78rem; font-weight: 900; text-decoration: none; }
.result-grid, .vehicle-detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.data-cell { min-height: 112px; padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.data-cell:nth-child(4n) { border-right: 0; }
.data-label { margin-bottom: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.68rem; font-weight: 900; }
.data-value { font-size: 1.02rem; font-weight: 800; line-height: 1.4; overflow-wrap: anywhere; }
.result-note { padding: 22px 28px; color: var(--muted); line-height: 1.65; font-size: 0.92rem; }
.no-result { padding: 32px; border: 1px solid rgba(216, 77, 49, 0.25); border-radius: 24px; background: #fff8f1; }
.no-result h3 { margin-top: 0; }
.hidden { display: none !important; }

.feature-grid, .model-cards { margin-top: 64px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-card, .model-cards article { min-height: 260px; padding: 28px; border: 1px solid var(--line); border-radius: 22px; background: rgba(255, 250, 241, 0.72); }
.feature-card h2, .model-cards h3 { margin: 13px 0; font-size: 1.75rem; line-height: 1.15; }
.feature-card p, .model-cards p { color: var(--muted); line-height: 1.7; }
.featured-model-card { background: var(--ink); color: var(--paper); }
.featured-model-card p { color: rgba(244, 239, 229, 0.7); }
.featured-model-card .text-link { color: #ff8b72; }
.card-label { color: var(--accent); text-transform: uppercase; letter-spacing: 0.11em; font-size: 0.69rem; font-weight: 900; }

.roadmap { margin-top: 72px; display: grid; grid-template-columns: 0.72fr 1.28fr; gap: 42px; align-items: start; }
.roadmap h2, .content-section h2 { margin: 18px 0 0; font-size: clamp(2rem, 4vw, 3.8rem); line-height: 1.08; letter-spacing: 0.02em; }
.roadmap-list { display: grid; gap: 12px; }
.roadmap-item { display: grid; grid-template-columns: 44px 1fr; gap: 15px; padding: 18px; border-top: 1px solid var(--line); }
.roadmap-number { color: var(--accent); font-weight: 900; }
.roadmap-item strong { display: block; margin-bottom: 4px; }
.roadmap-item span { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

.coverage-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.coverage-strip span { padding: 8px 11px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 0.78rem; font-weight: 800; }
.content-section { margin-top: 72px; padding-top: 48px; border-top: 1px solid var(--line); }
.two-column-content { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; }
.prose { color: var(--muted); font-size: 1rem; line-height: 1.8; }
.prose p:first-child { margin-top: 0; }

.vehicle-page-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; padding-bottom: 36px; }
.vehicle-page-hero h1 { margin-bottom: 8px; }
.vehicle-status { display: grid; justify-items: end; gap: 8px; padding-top: 12px; }
.vehicle-status small { color: var(--muted); }
.vehicle-detail-grid { overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--panel); box-shadow: var(--shadow); }
.vehicle-notes { margin-top: 44px; display: grid; grid-template-columns: 0.65fr 1.35fr; gap: 42px; padding: 32px; border-top: 1px solid var(--line); }
.vehicle-notes h2 { margin: 10px 0 0; }
.empty-page { min-height: 55vh; display: grid; align-content: center; justify-items: start; }
.empty-page h1 { font-size: clamp(2.8rem, 7vw, 5.4rem); }
.empty-page p { color: var(--muted); }

.site-footer { margin-top: 78px; padding: 24px 0 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 24px; color: var(--muted); font-size: 0.78rem; line-height: 1.55; }

@media (max-width: 940px) {
  .hero, .model-hero, .roadmap, .two-column-content, .vehicle-notes { grid-template-columns: 1fr; }
  .hero, .model-hero { gap: 36px; }
  .result-grid, .vehicle-detail-grid { grid-template-columns: repeat(2, 1fr); }
  .data-cell:nth-child(4n) { border-right: 1px solid var(--line); }
  .data-cell:nth-child(2n) { border-right: 0; }
  .feature-grid, .model-cards { grid-template-columns: 1fr; }
  .feature-card, .model-cards article { min-height: auto; }
}

@media (max-width: 620px) {
  .site-header { width: min(100% - 24px, 1180px); padding-top: 18px; }
  .site-nav { gap: 12px; }
  .site-nav a:first-child { display: none; }
  main { width: min(100% - 24px, 1180px); padding-top: 34px; }
  h1 { font-size: clamp(2.7rem, 15vw, 4.5rem); }
  .decoder-shell { border-radius: 22px; padding: 22px; }
  .decoder-title { align-items: flex-start; }
  .decoder-title > span { display: none; }
  .input-row { flex-direction: column; }
  .decode-button { padding: 15px 20px; }
  .result-hero, .vehicle-page-hero { flex-direction: column; padding: 24px; }
  .result-actions, .vehicle-status { justify-items: start; }
  .result-grid, .vehicle-detail-grid { grid-template-columns: 1fr; }
  .data-cell, .data-cell:nth-child(2n), .data-cell:nth-child(4n) { border-right: 0; }
  .vehicle-page-hero { padding-left: 0; padding-right: 0; }
  .vehicle-notes { padding: 24px 0; }
  .site-footer { flex-direction: column; }
}
