/* MyAutoRecalls — production site styles.
   Cream body, espresso ink, vermilion reserved for alerts + primary actions.
   IBM Plex Sans for display, Plex Mono for micro-labels. No dark mode. */

:root {
  --cream: #FFF8F0;
  --espresso: #221A12;
  --vermilion: #F04A1D;
  --hairline: #E4DACA;
  --muted: #6E5F4C;
  --card: #FFFDF9;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--cream);
  color: var(--espresso);
  font-family: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color-scheme: light;
}

.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- brand block: logo directly on cream, no header bar ---------- */
.brand-block { padding: 36px 24px 0; max-width: 1080px; margin: 0 auto; }
.brand-logo { display: block; width: 220px; height: auto; }

/* ---------- hero ---------- */
.hero { padding: 56px 0 8px; }

.hero-title {
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.t-espresso { color: var(--espresso); }
.t-vermilion { color: var(--vermilion); }

.hero-sub { margin-top: 14px; font-size: 1.15rem; color: var(--muted); }

/* ---------- VIN plate instrument ---------- */
.hero-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  align-items: center;
  margin-top: 36px;
}
.hero-art { margin: 0; }
.hero-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(34,26,18,0.16);
}
@media (max-width: 880px) {
  .hero-split { grid-template-columns: 1fr; gap: 28px; }
  .hero-art { max-width: 520px; }
}
.plate-zone { max-width: 640px; }

.plate {
  position: relative;
  border-radius: 12px;
  padding: 22px 20px;
  background:
    repeating-linear-gradient(93deg, rgba(255,255,255,0.05) 0 2px, rgba(0,0,0,0.035) 2px 4px),
    linear-gradient(180deg, #EDE8DB 0%, #D9D2C0 48%, #E3DCCB 100%);
  border: 1px solid #B9B09A;
  box-shadow: 0 2px 0 #B9B09A, 0 10px 24px rgba(34,26,18,0.14), inset 0 1px 0 rgba(255,255,255,0.7);
  cursor: text;
}
.plate:focus { outline: 3px solid rgba(240,74,29,0.45); outline-offset: 2px; }

.rivet {
  position: absolute; width: 11px; height: 11px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #F4F0E4, #8A8474 70%);
  box-shadow: inset 0 -1px 2px rgba(0,0,0,0.35), 0 1px 1px rgba(255,255,255,0.5);
}
.r-tl { top: 8px; left: 8px; } .r-tr { top: 8px; right: 8px; }
.r-bl { bottom: 8px; left: 8px; } .r-br { bottom: 8px; right: 8px; }

.slots {
  display: grid;
  grid-template-columns: repeat(17, 1fr);
  gap: 4px;
  position: relative;
  z-index: 1;
}
.slot {
  aspect-ratio: 0.68;
  display: flex; align-items: center; justify-content: center;
  background: #2B241A;
  border-radius: 4px;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.55), inset 0 -1px 0 rgba(255,255,255,0.08);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: clamp(0.85rem, 3.4vw, 1.35rem);
  color: var(--cream);
  min-width: 0;
  overflow: hidden;
}
.slot.filled { color: #fff; }
.slot.next { box-shadow: inset 0 2px 5px rgba(0,0,0,0.55), 0 0 0 2px rgba(240,74,29,0.65); }

.vin-ghost {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%;
  opacity: 0; border: 0; background: transparent;
  font-size: 16px; /* stops iOS zoom */
  caret-color: transparent;
  cursor: text;
}

.plate-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 10px;
  font-family: "IBM Plex Mono", monospace; font-size: 0.85rem;
}
.counter { font-weight: 600; }
.counter.ready { color: var(--vermilion); }
.plate-hint { color: var(--muted); }

.check-row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 14px;
}
.check-status { font-size: 1.05rem; }
.check-status.ready { font-weight: 600; }

.btn-check {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1.05rem; font-weight: 600;
  color: #fff; background: var(--vermilion);
  border: none; border-radius: 8px;
  padding: 14px 30px;
  cursor: pointer;
  box-shadow: 0 3px 0 #B93A14;
  transition: transform 0.06s ease, box-shadow 0.06s ease, opacity 0.15s ease;
  white-space: nowrap;
}
.btn-check:hover:not(:disabled) { transform: translateY(-1px); }
.btn-check:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #B93A14; }
.btn-check:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }

.btn-ghost {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 1rem; font-weight: 600;
  color: var(--espresso); background: transparent;
  border: 2px solid var(--espresso); border-radius: 8px;
  padding: 12px 24px; cursor: pointer;
  margin-top: 28px;
}
.btn-ghost:hover { background: var(--espresso); color: var(--cream); }

.vin-help { margin-top: 18px; font-size: 0.98rem; }
.vin-help summary { cursor: pointer; font-weight: 600; list-style: none; }
.vin-help summary::-webkit-details-marker { display: none; }
.vin-help .plus { color: var(--vermilion); font-weight: 700; margin-right: 4px; }
.vin-help ul { margin: 10px 0 0 22px; color: var(--muted); }
.vin-help li { margin-bottom: 6px; }

/* ---------- trust row ---------- */
.trust-row {
  display: grid; grid-template-columns: 1fr;
  margin: 72px 0 0;
  border-top: 1px solid var(--hairline);
}
.trust-col { padding: 28px 0; border-bottom: 1px solid var(--hairline); }
.trust-col h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 8px; }
.trust-col p { color: var(--muted); font-size: 1rem; }
@media (min-width: 720px) {
  .trust-row { grid-template-columns: 1fr 1fr 1fr; }
  .trust-col { padding: 28px 32px; border-bottom: none; }
  .trust-col + .trust-col { border-left: 1px solid var(--hairline); }
  .trust-col:first-child { padding-left: 0; }
}

/* ---------- stats band ---------- */
.stats-band {
  margin: 64px 0 0; padding: 22px 0;
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  display: flex; flex-wrap: wrap; gap: 10px 14px; justify-content: center;
  font-family: "IBM Plex Mono", monospace; font-size: 0.92rem;
  text-align: center;
}
.stats-band strong { font-weight: 600; }
.stats-band .dot { color: var(--vermilion); }

/* ---------- latest recalls ---------- */
.latest-recalls { padding: 64px 0 80px; }
.latest-recalls h2 { font-size: 2rem; font-weight: 700; letter-spacing: -0.01em; }
.section-sub { color: var(--muted); margin: 6px 0 24px; }

.recall-list { list-style: none; border-top: 1px solid var(--hairline); }
.recall-list li { border-bottom: 1px solid var(--hairline); }
.recall-list a {
  display: flex; gap: 18px; align-items: baseline;
  padding: 16px 4px;
  text-decoration: none; color: var(--espresso);
}
.recall-list a:hover .rl-title { color: var(--vermilion); }
.rl-date { font-family: "IBM Plex Mono", monospace; font-size: 0.82rem; color: var(--muted); white-space: nowrap; min-width: 96px; }
.rl-title { font-weight: 600; font-size: 1.05rem; flex: 1; }
.rl-arrow { color: var(--vermilion); font-weight: 700; }

/* ---------- footer ---------- */
.site-footer { background: var(--vermilion); color: var(--cream); }
.footer-inner { padding: 44px 24px 36px; }
.footer-logo { display: block; width: 170px; height: auto; }
.footer-tag { margin-top: 14px; font-size: 1.05rem; font-weight: 500; }
.footer-fine { margin-top: 8px; font-family: "IBM Plex Mono", monospace; font-size: 0.78rem; opacity: 0.85; }

/* ---------- results view ---------- */
.loading-state, .error-state { padding: 80px 0; text-align: center; }
.spinner {
  width: 44px; height: 44px; margin: 0 auto 20px;
  border: 4px solid var(--hairline); border-top-color: var(--vermilion);
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-title { font-size: 1.8rem; margin-bottom: 10px; }
.error-msg { color: var(--muted); margin-bottom: 22px; max-width: 520px; margin-left: auto; margin-right: auto; }

.verdict-stamp {
  display: inline-block;
  margin: 56px 0 8px; padding: 18px 30px;
  border: 4px solid var(--espresso); border-radius: 6px;
  transform: rotate(-2deg);
  font-size: clamp(1.6rem, 5vw, 2.6rem); font-weight: 700; letter-spacing: -0.01em;
  background: var(--card);
  box-shadow: 4px 4px 0 rgba(34,26,18,0.15);
}
.verdict-stamp.alert { border-color: var(--vermilion); color: var(--vermilion); }
.verdict-stamp.clear { border-color: var(--espresso); }

.vehicle-line { font-size: 1.5rem; font-weight: 600; margin-top: 20px; }
.checked-line { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }

.recall-card {
  margin-top: 36px; padding: 30px;
  background: var(--card);
  border: 1px solid var(--hairline); border-radius: 10px;
}
.card-alert {
  background: var(--vermilion); color: #fff;
  font-weight: 700; font-size: 1.05rem;
  margin: -30px -30px 24px; padding: 14px 30px;
  border-radius: 10px 10px 0 0;
}
.recall-card h3 { font-size: 1.6rem; letter-spacing: -0.01em; line-height: 1.2; margin-bottom: 6px; }
.card-camp { font-family: "IBM Plex Mono", monospace; font-size: 0.82rem; color: var(--muted); margin-bottom: 20px; }

.fact-block { margin-bottom: 18px; }
.fact-label { font-family: "IBM Plex Mono", monospace; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 4px; }
.fact-block p { font-size: 1.05rem; }

.fact-action {
  background: var(--espresso); color: var(--cream);
  margin: 22px -30px -30px; padding: 22px 30px;
  border-radius: 0 0 10px 10px;
}
.fact-action .fact-label { color: var(--vermilion); }
.fact-action p { font-size: 1.12rem; }

.changed-block { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--hairline); }
.changed-block h4 { font-size: 1.1rem; margin-bottom: 4px; }
.changed-sub { font-size: 0.9rem; color: var(--muted); margin-bottom: 12px; }
.changed-list { list-style: none; }
.changed-list li {
  display: flex; gap: 14px; align-items: baseline;
  padding: 8px 0; border-bottom: 1px dotted var(--hairline);
  font-size: 0.98rem;
}
.changed-list time { font-family: "IBM Plex Mono", monospace; font-size: 0.78rem; color: var(--vermilion); font-weight: 600; white-space: nowrap; min-width: 92px; }
.changed-count { font-family: "IBM Plex Mono", monospace; font-size: 0.78rem; color: var(--muted); margin-top: 10px; }

.card-link { display: inline-block; margin-top: 18px; font-weight: 600; color: var(--vermilion); text-decoration: none; }
.card-link:hover { text-decoration: underline; }

.all-clear-box {
  margin-top: 36px; padding: 34px 30px;
  background: var(--card); border: 1px solid var(--hairline); border-radius: 10px;
}
.all-clear-box h3 { font-size: 1.5rem; margin-bottom: 8px; }
.all-clear-box p { color: var(--muted); }

.watch-teaser {
  margin: 56px 0 8px; padding: 30px;
  border: 2px dashed var(--hairline); border-radius: 10px;
}
.watch-teaser h2 { font-size: 1.4rem; margin-bottom: 8px; }
.watch-teaser p { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
