/* MyAutoRecalls — self-hosted fonts (no Google Fonts request).
   IBM Plex Sans ships as ONE variable font (wght 100–700); Plex Mono as
   three static weights. Latin subsets only. The generator hash-renames
   these files; the /assets/fonts/ URLs below are rewritten at build time. */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-var.e2291e842cf5.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-400.08949f728dc5.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-500.01d285447409.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-600.0d1f0b8d0722.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* 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;
  /* Darker vermilion, same hue — AA contrast (5.03:1 on cream, 5.30:1 white-on-it).
     Used for normal-sized text + button backgrounds. Bright #F04A1D stays
     for large elements (headlines, banners). */
  --vermilion-deep: #C43A10;
  --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; }

/* Visually hidden but announced by screen readers (live-region target). */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.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: full-bleed photo, content overlaid left ---------- */
.hero-bg {
  position: relative;
  background: var(--cream) url("/assets/hero-rav4-red-driveway.jpg") center / cover no-repeat;
  /* Modern formats first, JPEG fallback last. image-set is the CSS
     equivalent of <picture> for a background image — no markup change,
     no risk to the VIN form layered over it. */
  background-image: image-set(
    url("/assets/hero-rav4-red-driveway.avif") type("image/avif"),
    url("/assets/hero-rav4-red-driveway.webp") type("image/webp"),
    url("/assets/hero-rav4-red-driveway.jpg") type("image/jpeg"));
  overflow: hidden;
}
/* Subtle cream wash from the left for text legibility; the photo's left side is already hazy. */
.hero-bg::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,248,240,0.72) 0%, rgba(255,248,240,0.35) 40%, rgba(255,248,240,0) 65%);
  pointer-events: none;
}
.hero-bg > * { position: relative; z-index: 1; }

.hero { padding: 44px 0 64px; }

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

.hero-sub { margin-top: 14px; font-size: 1.15rem; color: #3D3428; max-width: 620px; }

@media (max-width: 720px) {
  /* Smaller hero file on small screens — same image, 800w. */
  .hero-bg {
    background-image: image-set(
      url("/assets/hero-rav4-red-driveway-800.avif") type("image/avif"),
      url("/assets/hero-rav4-red-driveway-800.webp") type("image/webp"),
      url("/assets/hero-rav4-red-driveway-800.jpg") type("image/jpeg"));
  }
  /* Stronger wash on small screens so text stays readable over the photo. */
  .hero-bg::before {
    background: linear-gradient(90deg, rgba(255,248,240,0.88) 0%, rgba(255,248,240,0.60) 55%, rgba(255,248,240,0.25) 100%);
  }
  .hero { padding: 32px 0 48px; }
}

/* ---------- VIN plate instrument (dark plate per mock) ---------- */
.plate-zone { max-width: 640px; }

.plate-label-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin: 36px 0 10px;
  font-family: "IBM Plex Mono", monospace; font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.12em; color: var(--espresso);
}
.plate-label-row .counter { font-size: 0.85rem; letter-spacing: 0.05em; }

.plate {
  position: relative;
  border-radius: 12px;
  padding: 22px 20px;
  background:
    repeating-linear-gradient(93deg, rgba(255,255,255,0.03) 0 2px, rgba(0,0,0,0.25) 2px 4px),
    linear-gradient(180deg, #262019 0%, #171310 55%, #211B14 100%);
  border: 1px solid #3A3128;
  box-shadow: 0 2px 0 #0B0908, 0 14px 30px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.12);
  cursor: text;
}
.plate:focus-within { 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%, #6E675C, #241F19 70%);
  box-shadow: inset 0 -1px 2px rgba(0,0,0,0.6), 0 1px 1px rgba(255,255,255,0.25);
}
.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 {
  position: relative;
  aspect-ratio: 0.68;
  display: flex; align-items: center; justify-content: center;
  background: #0E0B08;
  border-radius: 4px;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.7), inset 0 -1px 0 rgba(255,255,255,0.06);
  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.7), 0 0 0 2px rgba(240,74,29,0.8); }
/* Visible caret: the real input is transparent, so the caret is rendered as a
   blinking bar inside the slot where typing will land. */
.slot.has-caret::after {
  content: "";
  position: absolute;
  width: 2px; height: 62%;
  background: var(--cream);
  animation: caret-blink 1.1s steps(1) infinite;
}
@keyframes caret-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
/* Visible selection: slots inside the input's selected range invert. */
.slot.selected { background: var(--cream); color: var(--espresso); }

.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;
}

.counter { font-weight: 600; }
.counter.ready { color: var(--vermilion-deep); }

/* Invalid-character notice (I / O / Q typed): visible + announced. */
.vin-notice {
  margin-top: 10px;
  font-size: 0.92rem; color: var(--vermilion-deep); font-weight: 600;
}

/* No-JS fallback: shown only when JavaScript is unavailable. */
.noscript-note {
  margin: 28px 0 0; padding: 14px 18px;
  background: var(--card); border: 1px solid var(--hairline); border-radius: 8px;
  font-size: 1rem; max-width: 640px;
}
.noscript-note a { color: var(--vermilion-deep); font-weight: 600; }

.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-deep);
  border: none; border-radius: 8px;
  padding: 14px 30px;
  cursor: pointer;
  box-shadow: 0 3px 0 #8F2A0C;
  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 #8F2A0C; }
.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 { padding: 24px 0; border-bottom: 1px solid var(--hairline); 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-deep); font-weight: 700; margin-right: 4px; }
.vin-help ul { margin: 10px 0 0 22px; color: var(--muted); }
.vin-help li { margin-bottom: 6px; }
/* In-form variant: sits inside the VIN form, tighter spacing, no border. */
.vin-help-inline { padding: 12px 0 0; border-bottom: none; font-size: 0.92rem; }

/* ---------- trust row ---------- */
.trust-row {
  display: grid; grid-template-columns: 1fr;
  margin: 0;
}
.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-deep); }

/* ---------- 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-deep); }
.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-deep); font-weight: 700; }
.browse-all { margin-top: 18px; }
.browse-all a { font-weight: 600; font-size: 1.05rem; color: var(--vermilion-deep); }

/* ---------- footer ---------- */
.site-footer { background: var(--vermilion-deep); 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; }
.footer-nav { margin-top: 20px; font-family: "IBM Plex Mono", monospace; font-size: 0.85rem; }
.footer-nav a { color: var(--cream); text-decoration: none; border-bottom: 1px solid rgba(255,248,240,0.45); }
.footer-nav a:hover { border-bottom-color: var(--cream); }
.footer-nav .footer-sep { margin: 0 10px; }

/* ---------- 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; }
.error-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.error-actions .btn-ghost { margin-top: 0; text-decoration: none; }

.applicability-note {
  margin: 48px 0 0; padding: 12px 16px;
  background: var(--card); border: 1px solid var(--hairline); border-radius: 8px;
  font-size: 0.95rem; color: var(--muted); max-width: 720px;
}
.applicability-note strong { color: var(--espresso); }
/* When the note shows above the stamp, tighten the stamp's top margin. */
.applicability-note:not([hidden]) + .verdict-stamp { margin-top: 20px; }

.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); }
/* Model-level match: same stamp, dashed border — provisional, not confirmed. (F-01) */
.verdict-stamp.model { border-style: dashed; }

.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-deep); }
.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-deep); 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-deep); 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-card {
  margin: 56px 0 32px; padding: 30px;
  background: var(--card); border: 1px solid var(--hairline); border-radius: 10px;
}
#btn-again { margin-bottom: 56px; }
.watch-card h2 { font-size: 1.4rem; margin-bottom: 8px; }
.watch-sub { color: var(--muted); margin-bottom: 0; }
.watch-form { margin-top: 18px; }
.watch-form label[for="watch-email"] {
  display: block; font-family: "IBM Plex Mono", monospace; font-size: 0.75rem;
  font-weight: 600; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 6px;
}
.watch-form input[type="email"] {
  width: 100%; max-width: 420px; padding: 12px 14px; font: inherit;
  border: 1px solid var(--hairline); border-radius: 0; background: #fff; color: var(--espresso);
}
.watch-prefs {
  border: 0; margin: 16px 0 0; padding: 0;
}
.watch-prefs legend {
  font-family: "IBM Plex Mono", monospace; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.08em; color: var(--muted); margin-bottom: 8px; padding: 0;
}
.watch-check {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.98rem; margin-bottom: 8px; cursor: pointer;
}
.watch-check input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--vermilion-deep); flex-shrink: 0;
}
.watch-form .btn-check { margin-top: 14px; }
.watch-status { margin-top: 14px; font-size: 0.98rem; }
.watch-status.error { color: var(--vermilion-deep); font-weight: 600; }
.watch-status.success { font-weight: 600; }
.watch-reassurance { margin-top: 14px; font-size: 0.88rem; color: var(--muted); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

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

/* ---------- homepage: site nav + Recall News section ---------- */
.brand-block { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.site-nav { display: flex; gap: 22px; font-family: "IBM Plex Mono", monospace; font-size: 0.85rem; }
.site-nav a { color: var(--espresso); text-decoration: none; font-weight: 600; }
.site-nav a:hover { color: var(--vermilion-deep); }
.news-home { border-top: 1px solid var(--hairline); }


/* ============ JP handback 2026-10-18 — homepage fixes ============ */
/* Tested in headless Chromium (local rebuild, throttled assets): CLS 0.71–1.08 -> 0.000 at 375/768/1280/1650px. */

/* Reserve space for the inline notice so the Check button never jumps. */
.vin-notice { min-height: 1.55em; }
.vin-notice[hidden] { display: block; visibility: hidden; }

/* Footer nav had no line-break opportunities -> page scrolled sideways at <=400px.
   (Same markup is in every template, so this fixes all pages.) */
.footer-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; }

/* Hero photo: anchored right, capped width, faded left + bottom, top wash for the nav. */
.hero-bg { background: var(--cream) !important; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0 0 0 auto; width: min(100%, 1600px); z-index: 0;
  background: image-set(
    url("/assets/hero-rav4-red-driveway.avif") type("image/avif"),
    url("/assets/hero-rav4-red-driveway.webp") type("image/webp"),
    url("/assets/hero-rav4-red-driveway.jpg") type("image/jpeg")) right center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 35%), linear-gradient(180deg, #000 75%, transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect;
          mask-image: linear-gradient(90deg, transparent 0, #000 35%), linear-gradient(180deg, #000 75%, transparent);
}
.hero-bg::before {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(255,248,240,.75), rgba(255,248,240,0) 120px),
    linear-gradient(90deg, rgba(255,248,240,.72) 0%, rgba(255,248,240,.35) 40%, rgba(255,248,240,0) 65%);
}
.hero-bg > * { z-index: 2; }
@media (max-width: 720px) {
  .hero-bg::after {
    background-image: image-set(
      url("/assets/hero-rav4-red-driveway-800.avif") type("image/avif"),
      url("/assets/hero-rav4-red-driveway-800.webp") type("image/webp"),
      url("/assets/hero-rav4-red-driveway-800.jpg") type("image/jpeg"));
  }
  .hero-bg::before {
    background: linear-gradient(90deg, rgba(255,248,240,.88) 0%, rgba(255,248,240,.60) 55%, rgba(255,248,240,.25) 100%);
  }
}
