:root {
  color-scheme: light;
  --bg: #f7faff;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --ink: #071832;
  --muted: #617088;
  --line: #d8e0ec;
  --line-strong: #c7d2e3;
  --blue: #0f55d9;
  --blue-dark: #082f73;
  --blue-ink: #04214f;
  --green: #13a05f;
  --green-soft: #eaf8f0;
  --orange: #f08a14;
  --orange-soft: #fff3df;
  --red: #df3438;
  --red-soft: #fff0ef;
  --purple: #8658ff;
  --shadow: 0 14px 42px rgba(12, 33, 70, 0.08);
  --shadow-strong: 0 22px 56px rgba(7, 24, 50, 0.18);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 70% 0%, rgba(15, 85, 217, 0.08), transparent 30%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

svg {
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.noscript-seo {
  margin-top: 24px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.noscript-seo h2 {
  margin-bottom: 10px;
  font-size: 24px;
}

.noscript-seo p,
.noscript-seo li {
  color: #33425a;
  font-size: 15px;
}

.noscript-seo ul {
  display: grid;
  gap: 5px;
  padding-left: 20px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 80px;
  padding: 0 max(28px, calc((100vw - var(--max)) / 2));
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(7, 24, 50, 0.02);
  backdrop-filter: blur(16px);
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.brand span span,
.footer-brand span {
  font-size: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--blue-dark);
}

.brand-mark svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.main-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 9px;
  color: #1d2d47;
  font-size: 13px;
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}

.main-nav a::after {
  position: absolute;
  right: 10px;
  bottom: 0;
  left: 10px;
  height: 3px;
  content: "";
  background: var(--blue);
  border-radius: 999px 999px 0 0;
  opacity: 0;
  transform: scaleX(0.4);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.active {
  color: var(--blue);
  outline: none;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after,
.main-nav a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-cta,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  color: white;
  background: linear-gradient(180deg, #145ee8 0%, #0b45bd 100%);
  border: 0;
  border-radius: 7px;
  box-shadow: 0 10px 20px rgba(15, 85, 217, 0.22);
  cursor: pointer;
  font-size: 14px;
  font-weight: 840;
  text-decoration: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.header-cta:hover,
.header-cta:focus-visible,
.primary-button:hover,
.primary-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(15, 85, 217, 0.28);
  outline: none;
}

.page-shell {
  width: min(100% - 64px, var(--max));
  margin: 0 auto;
}

section {
  scroll-margin-top: 94px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(330px, 1.18fr) 350px 350px;
  gap: 18px;
  align-items: stretch;
  padding: 44px 0 28px;
}

.hero-copy {
  min-width: 0;
  padding: 8px 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 520px;
  margin-bottom: 22px;
  font-size: clamp(40px, 4.2vw, 54px);
  line-height: 1.02;
  letter-spacing: 0;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}

.status-label {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 18px;
  color: #34435a;
  background: #f6f8fb;
  border: 1px solid #e4e9f1;
  border-radius: 7px;
  font-size: 17px;
  font-weight: 760;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  color: #e05e0f;
  background: linear-gradient(90deg, #fff7ee, #ffe3c4);
  border: 1px solid #ffd3a0;
  border-radius: 7px;
  cursor: pointer;
  font-family: inherit;
  font-size: 23px;
  font-weight: 900;
  line-height: 1;
  text-align: left;
}

.status-badge:hover,
.status-badge:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(240, 120, 20, 0.16);
}

.status-badge svg {
  width: 26px;
  height: 26px;
  fill: #f07814;
  stroke: white;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
}

.hero-summary {
  max-width: 560px;
  margin-bottom: 22px;
  color: #0f213c;
  font-size: 19px;
}

.availability-note {
  display: inline-flex;
  margin-top: 10px;
  padding: 8px 11px;
  color: #7a4c00;
  background: #fff7df;
  border: 1px solid #f1dca9;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 760;
}

.data-stamp,
.section-updated,
.fine-print {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.info-dot {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  padding: 0;
  color: #6c7890;
  background: transparent;
  border: 1px solid #aab5c5;
  border-radius: 50%;
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  vertical-align: middle;
}

.info-dot:hover,
.info-dot:focus-visible {
  color: var(--blue);
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 85, 217, 0.13);
}

.tip-popover {
  position: fixed;
  z-index: 80;
  max-width: min(300px, calc(100vw - 24px));
  padding: 12px 13px;
  color: white;
  background: #06214b;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  box-shadow: 0 18px 42px rgba(7, 24, 50, 0.24);
  font-size: 13px;
  line-height: 1.45;
}

.risk-card {
  position: relative;
  min-height: 292px;
  padding: 34px 28px 26px;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 20% 30%, rgba(41, 137, 255, 0.26), transparent 28%),
    linear-gradient(145deg, #03265a, #06214b 56%, #03152e);
  border-radius: var(--radius);
  box-shadow: var(--shadow-strong);
}

.risk-card::before {
  position: absolute;
  inset: -80px -80px auto auto;
  width: 180px;
  height: 180px;
  content: "";
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  filter: blur(1px);
}

.risk-card-title {
  display: flex;
  justify-content: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 20px;
  font-weight: 820;
}

.risk-card .info-dot {
  color: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 0.45);
}

.risk-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin: 12px 0 22px;
  font-weight: 900;
}

.risk-value .count-up {
  min-width: 134px;
  font-size: 96px;
  line-height: 0.9;
  letter-spacing: 0;
  text-align: right;
}

.risk-value span:last-child {
  margin-left: 12px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 40px;
}

.risk-gauge {
  position: relative;
  height: 50px;
}

.risk-gradient {
  position: absolute;
  top: 8px;
  right: 8px;
  left: 8px;
  height: 12px;
  overflow: hidden;
  background: linear-gradient(90deg, #28cb41 0%, #ffe12a 43%, #ff8a1b 68%, #ec2424 100%);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  transform-origin: left;
  animation: meterLoad 950ms 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.needle {
  position: absolute;
  top: -2px;
  left: calc(62% - 3px);
  width: 5px;
  height: 30px;
  background: white;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.32);
  animation: needleDrop 700ms 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.tick {
  position: absolute;
  bottom: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  font-weight: 720;
  transform: translateX(-50%);
}

.t0 {
  left: 0;
  transform: none;
}

.t25 {
  left: 25%;
}

.t50 {
  left: 50%;
}

.t75 {
  left: 75%;
}

.t100 {
  right: 0;
  transform: none;
}

.risk-caption {
  display: block;
  margin-top: 8px;
  color: #ffbd25;
  font-size: 19px;
  text-align: center;
}

.metric-stack {
  display: grid;
  gap: 13px;
}

.signal-card {
  display: grid;
  grid-template-columns: 58px 1fr 106px;
  gap: 14px;
  align-items: center;
  min-height: 88px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.signal-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  color: white;
  background: linear-gradient(145deg, #1266ec, #063caa);
  border-radius: 50%;
}

.signal-icon svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
}

.signal-icon.text-icon {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.fallback-signal-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.signal-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.signal-card strong {
  display: block;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.signal-card small {
  color: var(--muted);
  font-size: 12px;
}

.up {
  color: var(--red);
  font-weight: 820;
}

.down {
  color: var(--green);
  font-weight: 820;
}

.mini-spark svg {
  width: 100%;
  height: 46px;
}

.mini-spark path,
.chart-svg path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  stroke-dasharray: 420;
  stroke-dashoffset: 420;
  animation: drawLine 1200ms 600ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.section-block {
  padding: 26px 0 0;
  border-top: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin-bottom: 3px;
  font-size: clamp(26px, 3vw, 33px);
  line-height: 1.1;
  letter-spacing: 0;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 840;
  text-decoration: none;
  white-space: nowrap;
}

.section-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.section-caption {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  color: var(--muted);
  background: #f4f7fb;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 820;
  white-space: nowrap;
}

.grade-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.grade-card,
.chart-card,
.checker-card,
.compat-card,
.faq-card,
.vehicle-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(7, 24, 50, 0.05);
}

.grade-card {
  min-height: 190px;
  padding: 20px;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.grade-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.grade-card.high {
  border-color: #f2c4c8;
}

.grade-card.medium {
  border-color: #efd48c;
}

.grade-card.low {
  border-color: #b9dec8;
}

.grade-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.grade-top h3 {
  margin-bottom: 0;
  color: #516078;
  font-size: 20px;
  font-weight: 820;
}

.risk-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
}

.risk-icon-button {
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.risk-icon-button:hover,
.risk-icon-button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(15, 85, 217, 0.12);
}

.risk-icon svg {
  width: 28px;
  height: 28px;
}

.grade-card.high .risk-icon {
  color: var(--red);
}

.grade-card.medium .risk-icon {
  color: #d69600;
}

.grade-card.low .risk-icon {
  color: var(--green);
}

.grade-risk {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 850;
}

.grade-card.high .grade-risk,
.grade-card.high .risk-score {
  color: var(--red);
}

.grade-card.medium .grade-risk,
.grade-card.medium .risk-score {
  color: #d69600;
}

.grade-card.low .grade-risk,
.grade-card.low .risk-score {
  color: var(--green);
}

.grade-card p {
  min-height: 46px;
  margin-bottom: 18px;
  color: #4b586c;
  font-size: 14px;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  background: #e8edf5;
  border-radius: 999px;
}

.progress-track span {
  display: block;
  width: var(--value);
  height: 100%;
  background: currentColor;
  border-radius: inherit;
  transform-origin: left;
  animation: meterLoad 900ms 500ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.risk-score-line {
  margin-top: 12px;
  color: #5a6678;
  font-size: 13px;
}

.risk-score-line strong {
  color: inherit;
}

.table-card {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 18px;
  border-bottom: 1px solid #e6ebf2;
  text-align: left;
  vertical-align: middle;
}

th {
  color: #33425a;
  background: #fbfcff;
  font-size: 13px;
  font-weight: 850;
}

td {
  color: #25354f;
  font-size: 14px;
}

tbody tr {
  opacity: 0;
  transform: translateY(8px);
  animation: rowIn 420ms ease forwards;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.retailer-logo {
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}

.retailer-logo.walmart {
  color: #0071ce;
}

.retailer-logo.autozone {
  color: #e11b22;
  font-style: italic;
}

.retailer-logo.amazon {
  color: #111;
}

.retailer-logo.advance {
  color: #d21e2b;
  font-style: italic;
}

.retailer-logo.oreilly {
  color: #168640;
}

.retailer-logo.costco {
  color: #e31837;
  text-decoration: underline;
  text-decoration-color: #1665bd;
  text-decoration-thickness: 3px;
}

.state-limited,
.state-up {
  color: var(--orange);
  font-weight: 820;
}

.state-stock,
.state-down {
  color: var(--green);
  font-weight: 820;
}

.state-price {
  color: var(--red);
  font-weight: 870;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.chart-card {
  padding: 18px;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.chart-head h3 {
  margin-bottom: 2px;
  font-size: 15px;
}

.chart-head p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 12px;
}

.chart-main-value {
  color: var(--ink);
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  text-align: right;
}

.chart-main-value span {
  display: block;
  margin-top: 5px;
  font-size: 13px;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: #44526a;
  font-size: 12px;
}

.legend-line {
  width: 18px;
  height: 3px;
  background: currentColor;
  border-radius: 999px;
}

.chart-svg {
  width: 100%;
  height: 132px;
  background-image: linear-gradient(#e8edf5 1px, transparent 1px);
  background-size: 100% 32px;
}

.substitute-grid {
  display: grid;
  grid-template-columns: 430px minmax(0, 1fr);
  gap: 28px;
}

.checker-card {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.checker-card h3 {
  margin-bottom: 2px;
  font-size: 16px;
}

.checker-card label {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 16px;
  align-items: center;
  color: #41506a;
  font-size: 14px;
  font-weight: 720;
}

.checker-card select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  color: var(--ink);
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.checker-card select:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(15, 85, 217, 0.16);
}

.compat-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(250px, 0.9fr);
  gap: 20px;
  padding: 26px;
  background:
    linear-gradient(90deg, #fffdf8, #fff7e9 44%, #fffdf8),
    var(--surface);
  border-color: #f2c980;
}

.compat-primary {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 18px;
  align-items: center;
  min-height: 145px;
  padding: 22px;
  background: linear-gradient(90deg, #fff4dd, #fff9ee);
  border-radius: var(--radius);
}

.shield-icon {
  display: grid;
  place-items: center;
  width: 70px;
  height: 84px;
  padding: 0;
  color: var(--orange);
  background: transparent;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
}

.shield-icon:hover,
.shield-icon:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(240, 120, 20, 0.16);
}

.shield-icon svg {
  width: 70px;
  height: 84px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.compat-primary p {
  margin-bottom: 8px;
  color: #33425a;
  font-size: 15px;
  font-weight: 800;
}

.compat-primary strong {
  display: block;
  margin-bottom: 12px;
  color: #e76309;
  font-size: 27px;
  line-height: 1.1;
}

.compat-primary small {
  color: #41506a;
}

.compat-risk {
  padding: 22px;
  border: 1px solid #f2c980;
  border-radius: var(--radius);
}

.compat-risk h3 {
  color: #e76309;
  font-size: 22px;
}

.result-refresh {
  animation: resultRefresh 360ms ease both;
}

.compat-risk ul {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  margin: 0 0 16px;
  color: #4a5870;
  font-size: 14px;
}

.catalog-count {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  color: var(--blue);
  background: #eef5ff;
  border: 1px solid #cfe0fb;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 840;
}

.lookup-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
}

.vehicle-search-card,
.vehicle-result-primary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(7, 24, 50, 0.05);
}

.vehicle-search-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 20px;
}

.vehicle-search-card label {
  display: grid;
  gap: 8px;
  color: #41506a;
  font-size: 13px;
  font-weight: 820;
}

.vehicle-search-card input,
.vehicle-search-card select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: #fbfdff;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-weight: 740;
}

.vehicle-search-card input:focus,
.vehicle-search-card select:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(15, 85, 217, 0.16);
}

.vehicle-search-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.vehicle-results {
  display: grid;
  gap: 12px;
}

.vehicle-result-primary {
  min-height: 236px;
  padding: 22px;
}

.lookup-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.lookup-title-row h3 {
  margin: 6px 0 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.05;
}

.lookup-rank {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.lookup-pill {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.lookup-pill.high {
  color: #a31920;
  background: var(--red-soft);
}

.lookup-pill.medium {
  color: #a16600;
  background: var(--orange-soft);
}

.lookup-pill.low {
  color: #05733e;
  background: var(--green-soft);
}

.lookup-pill.warning {
  color: #6b4b00;
  background: #fff8db;
}

.lookup-pill.neutral {
  color: #43516a;
  background: #eef2f8;
}

.lookup-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.lookup-facts div {
  padding: 12px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.lookup-facts span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.lookup-facts strong {
  color: var(--ink);
  font-size: 15px;
}

.vehicle-result-primary p {
  color: #34435a;
}

.truth-note {
  padding: 14px;
  color: #465671;
  background: #fffdf6;
  border: 1px solid #f1dca9;
  border-radius: 7px;
  font-size: 13px;
}

.variant-warning {
  background: #fff5f5;
  border-color: #f2b7b7;
}

.vehicle-result-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.vehicle-match {
  display: grid;
  gap: 4px;
  min-height: 86px;
  padding: 12px;
  color: #24344e;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
}

.vehicle-match:hover,
.vehicle-match:focus-visible,
.vehicle-match.selected {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 85, 217, 0.12);
}

.vehicle-match span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.vehicle-match strong {
  font-size: 14px;
  line-height: 1.2;
}

.vehicle-match small {
  color: var(--muted);
}

.vehicle-grid,
.faq-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.vehicle-card,
.faq-card {
  min-height: 132px;
  padding: 18px;
  color: #22324b;
  text-decoration: none;
}

.vehicle-card h3,
.faq-card h3 {
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.22;
}

.vehicle-card p,
.faq-card p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.faq-icon {
  width: 36px;
  height: 36px;
  margin-bottom: 10px;
  color: var(--blue-dark);
}

.faq-icon svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.read-more {
  display: inline-flex;
  align-items: center;
  color: var(--blue);
  font-size: 12px;
  font-weight: 860;
}

.faq-answer-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.faq-answer-list details {
  min-height: 74px;
  padding: 15px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(7, 24, 50, 0.04);
}

.faq-answer-list summary {
  color: #172842;
  cursor: pointer;
  font-size: 15px;
  font-weight: 860;
}

.faq-answer-list details[open] {
  border-color: #c3d4ef;
  box-shadow: var(--shadow);
}

.faq-answer-list p {
  margin: 10px 0 0;
  color: #4b586c;
  font-size: 14px;
}

.site-footer {
  margin-top: 36px;
  padding: 30px max(28px, calc((100vw - var(--max)) / 2)) 26px;
  color: #d7e4f6;
  background:
    radial-gradient(circle at 10% 20%, rgba(35, 119, 255, 0.18), transparent 28%),
    linear-gradient(145deg, #02182f, #052c55 64%, #031326);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 0.7fr 0.7fr 1.2fr;
  gap: 54px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.footer-brand {
  margin-bottom: 12px;
  color: white;
  font-size: 20px;
}

.footer-brand .brand-mark {
  color: white;
}

.site-footer p,
.site-footer a {
  color: #d7e4f6;
  font-size: 13px;
}

.site-footer h3 {
  margin-bottom: 12px;
  color: white;
  font-size: 14px;
}

.site-footer a {
  display: block;
  margin-bottom: 8px;
  text-decoration: none;
}

.source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.source-links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

.reading-note {
  margin-top: 12px;
}

.reading-note summary {
  color: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
}

.reading-note p {
  margin: 8px 0 0;
  color: rgba(215, 228, 246, 0.84);
}

.footer-note {
  margin: 18px 0 0;
  color: rgba(215, 228, 246, 0.78);
  font-size: 12px;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
}

body.is-loaded .reveal {
  animation: fadeUp 560ms ease forwards;
}

body.is-loaded .reveal:nth-of-type(2) {
  animation-delay: 120ms;
}

body.is-loaded .reveal:nth-of-type(3) {
  animation-delay: 180ms;
}

body.is-loaded .reveal:nth-of-type(4) {
  animation-delay: 240ms;
}

body.is-loaded .reveal:nth-of-type(5) {
  animation-delay: 300ms;
}

.booting .count-up {
  filter: blur(1px);
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes meterLoad {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes needleDrop {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes rowIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes resultRefresh {
  from {
    opacity: 0.58;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 12px 28px;
  }

  .main-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    order: 3;
  }

  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }

  .metric-stack {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grade-grid,
  .vehicle-grid,
  .faq-grid,
  .faq-answer-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .page-shell {
    width: min(100% - 32px, var(--max));
  }

  .hero-grid,
  .substitute-grid,
  .compat-card,
  .chart-grid,
  .metric-stack,
  .lookup-layout {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .grade-grid,
  .vehicle-grid,
  .faq-grid,
  .faq-answer-list,
  .vehicle-result-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 560px) {
  .topbar {
    grid-template-columns: 1fr;
    width: min(100vw, 390px);
    max-width: min(100vw, 390px);
    padding: 12px 16px;
  }

  .brand {
    font-size: 20px;
  }

  .header-cta {
    width: 100%;
  }

  .page-shell {
    width: min(calc(100vw - 64px), 342px);
    max-width: 342px;
    margin-right: auto;
    margin-left: 24px;
  }

  .risk-card,
  .signal-card,
  .grade-card,
  .chart-card,
  .checker-card,
  .compat-card,
  .vehicle-card,
  .faq-card,
  .table-card {
    max-width: 342px;
  }

  .hero-grid {
    padding-top: 28px;
  }

  h1 {
    font-size: 36px;
  }

  .status-badge {
    font-size: 20px;
  }

  .status-row {
    align-items: stretch;
    flex-direction: column;
  }

  .status-label,
  .status-badge {
    width: 100%;
  }

  .risk-value .count-up {
    min-width: 108px;
    font-size: 78px;
  }

  .risk-value span:last-child {
    font-size: 32px;
  }

  .signal-card {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .mini-spark {
    grid-column: 1 / -1;
  }

  .grade-grid,
  .vehicle-grid,
  .faq-grid,
  .faq-answer-list,
  .vehicle-result-list,
  .lookup-facts {
    grid-template-columns: 1fr;
  }

  .lookup-title-row {
    flex-direction: column;
  }

  .checker-card label {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .compat-primary {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
