@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --ink: #101715;
  --muted: #5e6b67;
  --line: #d8e1dd;
  --panel: #ffffff;
  --soft: #f4f7f5;
  --pale-blue: #eaf5ff;
  --pale-green: #edf8f2;
  --pale-amber: #fff5df;
  --accent: #0d6b72;
  --accent-dark: #103d43;
  --fast: #0f766e;
  --warning: #bb6b00;
  font-family: Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 70px;
  padding: 14px max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-size: 13px;
}

.nav {
  display: flex;
  gap: 18px;
  align-items: center;
  font-weight: 700;
  color: #53605b;
}

.nav a {
  text-decoration: none;
}

.hero {
  position: relative;
  min-height: 320px;
  display: grid;
  align-items: end;
  overflow: hidden;
  background: #101715;
  color: white;
}

.hero::before,
.hero::after {
  position: absolute;
  inset: 0;
  content: "";
}

.hero::before {
  background-image: url("./assets/speedometer-hero.jpg");
  background-position: center;
  background-size: cover;
  filter: grayscale(1) saturate(0) contrast(1.42) brightness(.52);
  opacity: .9;
  transform: scale(1.025);
}

.hero::after {
  background-image:
    linear-gradient(90deg, rgba(9, 12, 12, .93), rgba(11, 15, 15, .72), rgba(12, 15, 15, .42)),
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, .14), transparent 28%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .055) 0 1px, transparent 1px 5px);
  mix-blend-mode: normal;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 58px 0 48px;
}

.eyebrow {
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 13px;
  font-weight: 800;
  color: #c6fff4;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  font-weight: 800;
  line-height: .98;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 640px;
  margin: 18px 0 0;
  font-size: clamp(17px, 2.2vw, 21px);
  color: rgba(255, 255, 255, .86);
}

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.tool-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 24px 0 42px;
}

.tool-shell > section {
  min-width: 0;
}

.filter-panel,
.compare-panel,
.note-panel,
.guide-card,
.legal-page {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.filter-panel {
  position: sticky;
  top: 90px;
  padding: 18px;
}

.filter-panel h2,
.compare-panel h2,
.note-panel h2,
.guide-card h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

label {
  color: #3e4b47;
  font-weight: 800;
  font-size: 13px;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfdad6;
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 10px 12px;
  font-weight: 700;
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 16px;
}

.chip,
.ghost-button,
.primary-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 800;
}

.chip {
  background: #f7faf8;
}

.chip.is-active {
  border-color: var(--accent);
  background: #dff5f0;
  color: var(--accent-dark);
}

.primary-button {
  width: 100%;
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

.ghost-button {
  width: 100%;
  background: white;
  color: var(--ink);
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--panel);
}

.metric:nth-child(1) {
  background: var(--pale-blue);
}

.metric:nth-child(2) {
  background: var(--pale-green);
}

.metric:nth-child(3) {
  background: var(--pale-amber);
}

.metric span {
  display: block;
  color: #52615c;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.compare-panel {
  padding: 18px;
  margin-bottom: 16px;
}

.bars {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(140px, 2fr) 70px;
  gap: 12px;
  align-items: center;
  font-weight: 800;
}

.bar-track {
  height: 14px;
  border-radius: 999px;
  background: #e9eeeb;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d6b72, #74b7a6);
}

.table-card {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.table-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.table-top h2 {
  margin: 0;
  font-size: 22px;
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #edf1ef;
  vertical-align: middle;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #52615c;
  background: #fbfcfb;
}

td {
  font-weight: 700;
}

.vehicle-cell strong {
  display: block;
  font-size: 16px;
}

.vehicle-cell span {
  display: block;
  color: var(--muted);
  font-weight: 650;
}

.time-pill {
  display: inline-flex;
  min-width: 70px;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 10px;
  background: #dff5f0;
  color: var(--accent-dark);
  font-weight: 800;
}

.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  background: #f8faf9;
  font-size: 13px;
}

.source-link {
  color: var(--accent-dark);
  font-weight: 700;
}

.compare-check {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.note-panel {
  margin: 18px 0;
  padding: 20px;
  background: #fffdf8;
}

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

.guide-card {
  padding: 20px;
  text-decoration: none;
}

.guide-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.content-page,
.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 34px auto 52px;
  padding: 28px;
}

.content-page h1,
.legal-page h1 {
  color: var(--ink);
  font-size: clamp(36px, 5vw, 58px);
}

.content-page h2,
.legal-page h2 {
  margin-top: 28px;
}

.content-page p,
.legal-page p,
.content-page li {
  color: #33423d;
}

.top-list {
  display: grid;
  gap: 10px;
  padding: 0;
  list-style: none;
}

.top-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px max(20px, calc((100vw - 1180px) / 2));
  border-top: 1px solid var(--line);
  color: #586661;
  background: white;
}

.footer-links {
  display: flex;
  gap: 16px;
}

@media (max-width: 920px) {
  .tool-shell {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
  }

  .summary-row,
  .guide-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav,
  .footer-links {
    flex-wrap: wrap;
  }

  .hero {
    min-height: 420px;
  }

  .summary-row,
  .guide-grid {
    grid-template-columns: 1fr;
  }

  .table-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .bar-row {
    grid-template-columns: 1fr;
  }
}
