:root {
  --blue: #0057b8;
  --blue-dark: #003e86;
  --ink: #142033;
  --text: #243044;
  --muted: #5c6b7e;
  --line: #d9e2ec;
  --soft: #f3f7fb;
  --card: #ffffff;
  --ok: #0f6b45;
  --ok-bg: #eef8f2;
  --bad: #9f1239;
  --bad-bg: #fff1f4;
  --radius: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.6;
}

a {
  color: var(--blue);
}

img {
  max-width: 100%;
}

.container {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
}

.narrow {
  width: min(820px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.logo {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--blue);
  text-decoration: none;
  margin-right: auto;
}

.logo span {
  color: var(--ink);
  font-weight: 700;
}

.site-header nav {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.site-header nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.site-header nav a:hover {
  color: var(--blue);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  border: 0;
  border-radius: 6px;
  padding: 0.72rem 1.05rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
}

.btn:hover {
  background: var(--blue-dark);
  color: #fff;
}

.btn-ghost {
  background: #fff;
  color: var(--blue);
  border: 1px solid var(--blue);
}

.btn-ghost:hover {
  background: var(--soft);
  color: var(--blue-dark);
}

.hero {
  padding: 2.8rem 0 0.5rem;
  background:
    radial-gradient(900px 240px at 80% -10%, #e7f1fb 0%, rgba(255, 255, 255, 0) 70%),
    #fff;
}

.kicker {
  margin: 0 0 0.45rem;
  color: var(--blue);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(2rem, 4.4vw, 3rem);
}

.lede {
  margin: 0;
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 42rem;
}

.decoder {
  margin: 1.6rem auto 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(20, 32, 51, 0.06);
  padding: 1.2rem;
}

.decoder h2 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}

.entered-guide {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  text-align: left;
  scroll-margin-top: 88px;
}

.entered-guide[hidden] {
  display: none;
}

.entered-guide h2 {
  font-size: 1.35rem;
}

.vin-chip {
  font-family: ui-monospace, "Cascadia Mono", monospace;
  letter-spacing: 0.04em;
  font-weight: 800;
  color: var(--blue-dark);
}

.decoder .hint {
  margin: 0 0 0.9rem;
  color: var(--muted);
}

.vin-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.vin-row input {
  flex: 1 1 260px;
  min-width: 0;
  border: 1px solid #b7c6d6;
  border-radius: 6px;
  padding: 0.8rem 0.9rem;
  font-size: 1.12rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: ui-monospace, "Cascadia Mono", monospace;
  color: var(--ink);
}

.vin-row input:focus {
  outline: 2px solid #9ec3ee;
  border-color: var(--blue);
}

.slots {
  display: grid;
  grid-template-columns: repeat(17, minmax(0, 1fr));
  gap: 0.28rem;
  margin-top: 0.95rem;
}

.slot {
  text-align: center;
  border-radius: 4px;
  min-height: 2.35rem;
  line-height: 2.35rem;
  font-family: ui-monospace, monospace;
  font-weight: 700;
  background: var(--soft);
  color: var(--ink);
}

.slot.wmi { background: #d9ebff; }
.slot.vds { background: #e7f6ee; }
.slot.check { background: #ffe8cc; }
.slot.year { background: #efe7ff; }
.slot.plant { background: #fde2ea; }
.slot.serial { background: #f4f7fb; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.legend b {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
  margin-right: 0.28rem;
}

.result {
  margin-top: 0.9rem;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  background: var(--soft);
}

.result.ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.result.bad {
  background: var(--bad-bg);
  color: var(--bad);
}

.result p,
.result li {
  margin: 0.3rem 0 0;
}

.result p:first-child,
.result li:first-child {
  margin-top: 0;
}

.result ul {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
}

.section {
  padding: 2.6rem 0;
}

.section h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.section h3 {
  margin: 1.5rem 0 0.35rem;
  font-size: 1.2rem;
}

.section p,
.section li {
  font-size: 1.05rem;
}

.prose p {
  margin: 0.7rem 0 0;
}

.split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.25rem;
  align-items: start;
}

.panel {
  background: var(--soft);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
}

.panel h2,
.panel h3 {
  margin-top: 0;
}

.panel ol,
.panel ul {
  margin: 0.4rem 0 0;
  padding-left: 1.15rem;
}

.panel li + li {
  margin-top: 0.35rem;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

th,
td {
  text-align: left;
  padding: 0.62rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

thead th {
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

tbody tr:nth-child(even) {
  background: #f7fbff;
}

td code,
.mono {
  font-family: ui-monospace, monospace;
  font-weight: 700;
}

.places {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  margin-top: 1rem;
}

.place {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  background: #fff;
}

.place strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.place p {
  margin: 0;
  color: var(--muted);
}

.cta-band {
  background: var(--ink);
  color: #fff;
  border-radius: 14px;
  padding: 1.5rem 1.4rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.cta-band h2 {
  color: #fff;
  margin: 0 0 0.3rem;
  font-size: 1.5rem;
}

.cta-band p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
}

.faq h3 {
  margin-top: 1.35rem;
}

.steps {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.2rem;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1rem 1rem 0.9rem;
  background: #fff;
}

.num {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.step h3 {
  margin: 0.15rem 0 0.3rem;
}

.step p,
.step ul {
  margin: 0;
}

.step ul {
  margin-top: 0.4rem;
  padding-left: 1.1rem;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.3rem 0 2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.footer-links {
  display: flex;
  gap: 0.9rem;
}

.legal {
  padding: 2rem 0 3rem;
}

.legal h1 {
  font-size: 2rem;
}

.legal h2 {
  margin-top: 1.6rem;
  font-size: 1.2rem;
}

@media (max-width: 860px) {
  .site-header nav {
    display: none;
  }

  .split,
  .places {
    grid-template-columns: 1fr;
  }

  .header-inner .btn {
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
  }

  .slot {
    font-size: 0.68rem;
    min-height: 1.7rem;
    line-height: 1.7rem;
  }
}
