/* WhatFitsMyCar — one stylesheet, no framework.
   Palette: graphite + a single signal orange. Deliberately restrained: this is a page
   people land on mid-purchase, so the only loud thing should be the buy button. */

:root {
  --ink: #14181d;
  --ink-2: #4a545f;
  --ink-3: #7a8792;
  --line: #e3e7eb;
  --bg: #ffffff;
  --bg-2: #f6f8fa;
  --acc: #f4633a;
  --acc-dark: #d84d26;
  --ok: #0f7a52;
  --ok-bg: #e8f5ef;
  --warn: #a35a00;
  --warn-bg: #fdf1e0;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 24, 29, .06), 0 8px 24px rgba(20, 24, 29, .06);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

h1, h2, h3, h4 {
  font-family: "Bricolage Grotesque", Figtree, sans-serif;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 700; }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); font-weight: 600; margin-top: 2.2rem; }
h3 { font-size: 1.15rem; font-weight: 600; }

p { margin: 0 0 1rem; }

a { color: var(--acc-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; font-size: .9em; }

pre {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  overflow-x: auto;
}

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

/* ---------------------------------------------------------------- header */

.site-head {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 64px;
}

.logo {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: -.03em;
  color: var(--ink);
}
.logo:hover { text-decoration: none; }
.logo .acc { color: var(--acc); }
.logo .dot { color: var(--acc); }

.site-nav { display: flex; gap: 1.4rem; font-size: .95rem; font-weight: 500; }
.site-nav a { color: var(--ink-2); }

/* ------------------------------------------------------------------ hero */

.hero {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-bottom: 1px solid var(--line);
  padding: 3.5rem 0 3rem;
}

.hero h1 { max-width: 16ch; }

.hero .sub {
  font-size: 1.15rem;
  color: var(--ink-2);
  max-width: 62ch;
  margin-bottom: 2.2rem;
}

/* ---------------------------------------------------------------- finder */

.finder {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tabs { display: flex; border-bottom: 1px solid var(--line); background: var(--bg-2); }

.tab {
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .9rem 1.25rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink-3);
  cursor: pointer;
}
.tab svg { opacity: .7; }
.tab.is-on { color: var(--ink); background: var(--bg); border-bottom-color: var(--acc); }
.tab.is-on svg { opacity: 1; color: var(--acc); }

.panel { display: none; padding: 1.5rem; }
.panel.is-on { display: block; }

.fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink-2);
}

label.wide { grid-column: 1 / -1; }

label .opt { font-weight: 400; color: var(--ink-3); }

input[type=text], input[type=number] {
  font: inherit;
  font-size: 1rem;
  padding: .7rem .85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
}
input:focus { outline: 2px solid var(--acc); outline-offset: 1px; border-color: transparent; }

.go {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 1.4rem;
  border: 0;
  border-radius: 10px;
  background: var(--acc);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.go:hover { background: var(--acc-dark); text-decoration: none; color: #fff; }
.go.small { padding: .45rem .85rem; font-size: .875rem; white-space: nowrap; }
.go.inline { display: inline-flex; }

.fineprint { margin: .9rem 0 0; font-size: .85rem; color: var(--ink-3); }

/* ------------------------------------------------------------------ bands */

.band { padding: 3rem 0; }
.band > h2:first-child { margin-top: 0; }

.lead { font-size: 1.08rem; color: var(--ink-2); max-width: 70ch; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  background: var(--bg);
}
.card h3 { display: flex; align-items: center; gap: .55rem; }
.card h3 svg { color: var(--acc); }
.card p { margin: 0; color: var(--ink-2); font-size: .96rem; }

.compare-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.compare-form label { flex: 1 1 220px; }
.compare-form .vs { padding-bottom: .8rem; color: var(--ink-3); font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.chip {
  padding: .4rem .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--bg);
}
.chip:hover { border-color: var(--acc); color: var(--acc-dark); text-decoration: none; }

/* ----------------------------------------------------------------- result */

.result { padding: 2.5rem 0 4rem; }
.result.prose { max-width: 760px; }
.result.prose h2 { margin-top: 2rem; }

.verdict {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}
.verdict.ok { background: var(--ok-bg); color: var(--ok); }
.verdict.warn { background: var(--warn-bg); color: var(--warn); }

.notice {
  display: flex;
  gap: .8rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice p { margin: .3rem 0 0; color: inherit; }

.specs {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .1rem 1.5rem;
  margin: 1.5rem 0;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.specs dt { font-weight: 600; color: var(--ink-2); font-size: .93rem; padding: .3rem 0; }
.specs dd { margin: 0; padding: .3rem 0; font-variant-numeric: tabular-nums; }

.fitment {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  margin: 1.25rem 0;
}
.fitment header { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.fitment header h2 { margin: 0; font-size: 1.5rem; }
.fitment .meta { margin: .5rem 0 0; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .22rem .6rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .01em;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }

.meta { font-size: .9rem; color: var(--ink-3); }

table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: .95rem; }
th, td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 700; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Tables are the widest thing on the page — let them scroll rather than the body. */
.offers, .alts { display: block; overflow-x: auto; white-space: nowrap; }
.offers tbody, .alts tbody, .offers thead, .alts thead { display: table; width: 100%; }

.shops { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.shop {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--bg);
  transition: border-color .15s, box-shadow .15s;
}
.shop:hover { border-color: var(--acc); box-shadow: var(--shadow); text-decoration: none; }
.shop strong { flex: 0 0 auto; }
.shop .meta { flex: 1 1 auto; }
.shop svg { color: var(--acc); }

.warnings { padding-left: 1.2rem; color: var(--ink-2); }
.warnings li { margin-bottom: .5rem; }

.disclaimer {
  display: flex;
  gap: .6rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: .9rem;
  color: var(--ink-3);
}
.disclaimer svg { flex: 0 0 auto; margin-top: .2rem; }

.kpis { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.5rem 0; }
.kpi {
  display: flex;
  flex-direction: column;
  padding: 1.1rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.kpi .n { font-family: "Bricolage Grotesque", sans-serif; font-size: 2rem; font-weight: 700; line-height: 1; }
.kpi .l { font-size: .85rem; color: var(--ink-3); margin-top: .3rem; }

/* ---------------------------------------------------------------- footer */

.site-foot {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}
.site-foot .cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}
.site-foot h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: .4rem; }
.site-foot a { color: var(--ink-2); font-size: .95rem; }
.site-foot .tagline { color: var(--ink-3); font-size: .92rem; max-width: 42ch; margin-top: .75rem; }
.site-foot .legal {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.5rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: .82rem;
  color: var(--ink-3);
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .site-nav { display: none; }
  .site-foot .cols { grid-template-columns: 1fr; }
  .compare-form .vs { display: none; }
  .specs { grid-template-columns: 1fr; }
  .specs dt { padding-bottom: 0; }
  .specs dd { padding-top: 0; border-bottom: 1px solid var(--line); padding-bottom: .5rem; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef1f4;
    --ink-2: #b4bec8;
    --ink-3: #8592a0;
    --line: #2a3138;
    --bg: #14181d;
    --bg-2: #1b2127;
    --ok: #4ecf9c;
    --ok-bg: #123528;
    --warn: #f0b45e;
    --warn-bg: #3a2a12;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  }
  .site-head { background: rgba(20, 24, 29, .92); }
  a { color: #ff8a63; }
}
