/* Guide pages. Same palette and type as the app (site/app/app.css)
   so the two read as one site. One self-hosted font file (below), preloaded
   by site/template.html. */

/* Inter, self-hosted (site/fonts, OFL). Was a render-blocking Google Fonts
   stylesheet; swapping it in over system fonts shifted text (Lighthouse CLS up
   to 0.2 on long guides). The two fallback faces are Arial / Roboto scaled to
   Inter's metrics (scripts: size-adjust from letter-weighted average width,
   overrides from Inter's hhea) so the swap barely moves anything. */
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Arimo"), local("Helvetica");
  size-adjust: 107.48%;
  ascent-override: 90.14%;
  descent-override: 22.44%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Inter Fallback Roboto";
  src: local("Roboto"), local("Roboto-Regular");
  size-adjust: 106.91%;
  ascent-override: 90.62%;
  descent-override: 22.56%;
  line-gap-override: 0%;
}

:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #0f172a;
  --text-soft: #475569;
  --text-faint: #5b6577; /* 4.5:1+ on --bg (WCAG AA) */
  --rule: #cbd0cb;
  --accent: #c2410c;
  --accent-tint: #fff1e8;
  --steel: #c2410c;
  --night: #0b1220;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --surface: #111a2b;
    --text: #e8ecf3;
    --text-soft: #b4bdcc;
    --text-faint: #94a0b4;
    --rule: #31405b;
    --accent: #fb923c;
    --accent-tint: #2a1a10;
    --steel: #fb923c;
    --night: #060b15;
  }
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Inter Fallback", "Inter Fallback Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 20px 96px;
}

.crumbs { margin: 0 0 16px; font-size: 14px; color: var(--text-faint); line-height: 1.4; }
.crumbs a { color: var(--accent); display: inline-block; padding: 12px 0; }
.crumbs [aria-current] { color: var(--text-soft); }

h1, h2, h3 {
  letter-spacing: -.015em;
  font-weight: 700;
  text-wrap: balance;
  line-height: 1.25;
}
h1 { font-size: 34px; margin: 0 0 8px; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
h2 { font-size: 21px; margin: 44px 0 14px; padding-top: 18px; border-top: 1px solid var(--rule); }
h2:first-of-type, hr + h2 { border-top: none; padding-top: 0; margin-top: 0; }
h3 { font-size: 16.5px; margin: 26px 0 10px; color: var(--text); }

p, li { font-size: 16px; }
p { margin: 0 0 14px; max-width: 68ch; }
ul, ol { max-width: 68ch; padding-left: 22px; }
li { margin-bottom: 6px; }

a { color: var(--steel); text-decoration-color: color-mix(in srgb, var(--steel) 45%, transparent); }
a:hover { text-decoration-thickness: 2px; }

strong { font-weight: 700; }

code {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 0.88em;
  background: var(--accent-tint);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-variant-numeric: tabular-nums;
}

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 40px 0;
}

blockquote {
  margin: 0 0 14px;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  color: var(--text-soft);
}

.table-wrap { overflow-x: auto; margin: 0 0 20px; }
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  font-family: ui-sans-serif, "Helvetica Neue", Arial, sans-serif;
}
th, td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
th {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 700;
}
/* Row labels in tables like "| | CarMax | Carvana |": read as text, not as column caps. */
th[scope="row"] {
  font-size: inherit;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text);
  font-weight: 600;
}
td:has(code), td code { font-variant-numeric: tabular-nums; }

@media (max-width: 480px) {
  .page { padding: 32px 16px 72px; }
  h1 { font-size: 25px; }
  h2 { font-size: 19px; }
}

.cta { margin: 36px 0 8px; }
.cta-btn { display: inline-block; background: var(--steel); color: var(--surface); font-weight: 650; text-decoration: none; padding: 14px 22px; border-radius: 14px; }
@media (prefers-color-scheme: dark) { .cta-btn { color: #0b1220; } }

/* Footer links on content pages, and the /opt-out/ form. */
.site-foot { margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--text-faint); }
.site-foot a { color: var(--accent); }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 4px 24px; }
.foot-grid a { display: block; padding: 7px 0; line-height: 1.35; }
.foot-h { margin: 14px 0 2px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-soft); }
.foot-end { margin: 18px 0 0; }
.foot-end a { display: inline-block; padding: 8px 0; }
.guide-list { list-style: none; padding: 0; margin: 0 0 8px; }
.guide-list li { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.guide-list li:last-child { border-bottom: 0; }
.guide-list a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
.guide-list span { display: block; color: var(--text-soft); font-size: 15px; line-height: 1.45; margin-top: 2px; }
.oo { margin: 24px 0 8px; display: grid; gap: 6px; }
.oo label { font-weight: 600; font-size: 15px; margin-top: 8px; }
.oo input { font: inherit; font-size: 17px; padding: 12px 14px; min-height: 48px; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); color: var(--text); width: 100%; }
.oo input:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.oo button { border: 0; font: inherit; font-weight: 650; cursor: pointer; margin-top: 10px; min-height: 48px; justify-self: start; }
.oo button:disabled { opacity: .6; cursor: default; }
.oo-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.oo-msg { min-height: 1.4em; margin: 4px 0 0; color: var(--text-soft); }
.oo-done { background: var(--accent-tint); padding: 14px 16px; border-radius: 12px; margin: 0; }
.oo-fine { font-size: 14px; color: var(--text-soft); }
.oo + h2 { margin-top: 40px; }
.nw { white-space: nowrap; }

/* GarageAnswers site header: same bar as the main site so /value reads as one site. */
.site-head { position: sticky; top: 0; z-index: 20; background: var(--night); color: #fff; border-bottom: 1px solid rgba(255,255,255,.1); }
.site-head-in { max-width: 1120px; margin: 0 auto; height: 60px; padding: 0 16px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: #ea580c; box-shadow: 0 0 0 3px rgba(234,88,12,.25); }
.brand-mark svg { width: 20px; height: 20px; }
.brand-o { color: #fb923c; }
.site-nav { display: none; margin-left: 20px; gap: 2px; flex: 1; }
.site-nav a { color: #cbd5e1; text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 6px; }
.site-nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.site-nav a[aria-current] { background: rgba(255,255,255,.1); color: #fff; }
.head-link { margin-left: auto; color: #cbd5e1; text-decoration: none; font-size: 14px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.15); border-radius: 8px; background: rgba(255,255,255,.05); white-space: nowrap; }
.head-link:hover { border-color: rgba(255,255,255,.3); color: #fff; }
.site-head a:focus-visible { outline: 2px solid #fb923c; outline-offset: 2px; }
@media (min-width: 1000px) { .site-nav { display: flex; } }
