/* ============================================================================
 EcuTunerx — per-vehicle tune pages (/tunes/*.html) and their hub.

 Generated by tools/build_seo.py. Everything else comes from site.css; this
 file only adds the pieces these pages have and the homepage does not: the
 breadcrumb, the spec strip, the power bars, the gains table, the always-open
 FAQ and the car tiles. No .reveal here — these pages must read with JS off.
 ========================================================================= */

.tunes-page { overflow-wrap: anywhere; }

/* ---------- breadcrumb ---------- */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.3rem 0; margin: 0 0 1.4rem; padding: 0; }
.crumbs li {
  font-size: 0.70rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint);
}
.crumbs li + li::before { content: "›"; margin: 0 0.6rem; color: var(--rule); }
.crumbs a { color: var(--ink-soft); border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.crumbs a:hover { color: var(--burgundy); border-bottom-color: currentColor; }
.crumbs [aria-current] { color: var(--ink); }

/* ---------- hero ---------- */
.car-hero { padding-block: clamp(1.6rem, 4vw, 3rem) clamp(2rem, 4vw, 3rem); }
.car-hero h1 {
  font-size: clamp(1.9rem, 4.4vw, 3.3rem); line-height: 1.06; letter-spacing: -0.02em;
  margin: 1rem 0 0; max-width: 24ch; text-wrap: balance;
}
.car-hero h1 .accent-text { display: block; }
.car-hero .lead { max-width: 68ch; }

.spec {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0;
  margin: clamp(1.4rem, 3vw, 2rem) 0 0; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule);
}
@media (min-width: 720px) { .spec { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.spec > div { padding: 0.85rem 0.9rem 0.9rem 0; border-bottom: 1px solid var(--rule-soft); }
@media (min-width: 720px) {
  .spec > div { border-bottom: 0; padding-left: 0.9rem; border-left: 1px solid var(--rule-soft); }
  .spec > div:first-child { padding-left: 0; border-left: 0; }
}
.spec dt { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); }
.spec dd { margin: 0.3rem 0 0; font-family: var(--serif); font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.spec > div:last-child dd { color: var(--green); }

.car-note {
  margin: 1.4rem 0 0; max-width: 72ch; padding: 0.85rem 1rem; font-size: 0.94rem; color: var(--ink-soft);
  border-left: 3px solid var(--navy); background: rgba(39, 78, 104, 0.06);
}
.car-note b { color: var(--navy); }
.car-ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: clamp(1.4rem, 3vw, 2rem); }
@media (max-width: 480px) { .car-ctas .btn { width: 100%; white-space: normal; } }

/* ---------- section titles run long here (they carry the car name) ---------- */
.tunes-page .sect-title { font-size: clamp(1.6rem, 3.6vw, 2.5rem); max-width: 28ch; text-wrap: balance; }

/* ---------- power bars ---------- */
.bars { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; gap: 0.7rem; max-width: 860px; }
.bars li { display: grid; grid-template-columns: 4.6rem minmax(0, 1fr); grid-template-areas: "l v" "t t"; gap: 0.3rem 0.8rem; align-items: center; }
@media (min-width: 640px) { .bars li { grid-template-columns: 5rem minmax(0, 1fr) 9.5rem; grid-template-areas: "l t v"; } }
.bar-l { grid-area: l; font-size: 0.70rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.bar-v { grid-area: v; font-family: var(--mono); font-size: 0.82rem; color: var(--ink); text-align: right; }
.bar-t { grid-area: t; position: relative; display: block; height: 12px; background: var(--paper-2); border: 1px solid var(--rule-soft); }
.bar-t::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--lo); background: var(--ink); }
.bar-t i { position: absolute; top: 0; bottom: 0; left: var(--lo); width: calc(var(--hi) - var(--lo)); background: var(--burgundy); opacity: 0.55; }
.bars li:first-child .bar-t::before { background: var(--ink-faint); }

/* ---------- gains table (scrolls inside its box on phones) ---------- */
.table-scroll { margin-top: 1.8rem; overflow-x: auto; -webkit-overflow-scrolling: touch; border-top: 2px solid var(--ink); max-width: 100%; }
.table-scroll:focus-visible { outline-offset: 2px; }
table.gains { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 0.92rem; }
.gains th, .gains td { text-align: left; padding: 0.75rem 0.9rem 0.75rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.gains thead th { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); }
.gains tbody th { font-family: var(--serif); font-weight: 600; font-size: 1rem; white-space: nowrap; }
.gains td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.gains small { color: var(--ink-faint); font-size: 0.82em; }
.gains tbody tr:first-child { color: var(--ink-soft); }
.caveat { margin: 1rem 0 0; font-family: var(--serif); font-style: italic; font-size: 0.88rem; color: var(--ink-soft); max-width: 72ch; }

/* ---------- stage cards (built on site.css .tri-card) ---------- */
.stage-card--cyan::before { background: var(--navy); }
.stage-card--amber::before { background: var(--ink); }
.stage-card--hot::before { background: var(--burgundy); }
.stage-card .tri-sub { min-height: 0; }
.stage-card .btn { white-space: normal; text-align: center; }

/* ---------- what you need / four steps ---------- */
.needs { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; gap: 0; max-width: 860px; border-top: 2px solid var(--ink); }
.needs li { padding: 1rem 0 1rem 1.6rem; border-bottom: 1px solid var(--rule); position: relative; color: var(--ink-soft); }
.needs li::before { content: "✓"; position: absolute; left: 0.1rem; top: 1rem; color: var(--green); font-weight: 700; }
.needs b { color: var(--ink); }
.needs a, .qa a, .text-link { color: var(--burgundy); font-weight: 600; border-bottom: 1px solid rgba(122, 31, 43, 0.35); }
.needs a:hover, .text-link:hover { border-bottom-color: var(--burgundy); }

.steps4 { list-style: none; counter-reset: st; margin: 1.8rem 0 0; padding: 0; display: grid; gap: 1.2rem; }
@media (min-width: 760px) { .steps4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 2.2rem; } }
@media (min-width: 1100px) { .steps4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.steps4 li { counter-increment: st; padding-top: 0.9rem; border-top: 2px solid var(--ink); color: var(--ink-soft); font-size: 0.95rem; }
.steps4 li::before {
  content: counter(st, decimal-leading-zero); display: block; margin-bottom: 0.4rem;
  font-family: var(--serif); font-weight: 600; font-size: 2rem; line-height: 1; color: var(--burgundy);
}
.steps4 b { display: block; color: var(--ink); font-family: var(--serif); font-size: 1.08rem; margin-bottom: 0.25rem; }

/* ---------- FAQ: always open, so every answer is on the page ---------- */
.qa-list { margin-top: 1.8rem; display: grid; grid-template-columns: 1fr; gap: 0 2.6rem; max-width: 1040px; }
@media (min-width: 820px) { .qa-list { grid-template-columns: 1fr 1fr; } }
.qa { border-top: 1px solid var(--rule); padding: 1.1rem 0 1.2rem; min-width: 0; }
.qa h3 { font-size: 1.08rem; font-weight: 600; line-height: 1.3; }
.qa p { margin: 0.5rem 0 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- car tiles (related + hub) ---------- */
.car-grid { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 0.9rem; }
@media (min-width: 640px) { .car-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .car-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.car-tile {
  display: flex; flex-direction: column; gap: 0.35rem; height: 100%;
  padding: 1rem 1.1rem 1.05rem; background: var(--paper-hi); border: 1px solid var(--rule); border-top: 3px solid var(--ink);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.car-tile:hover { transform: translateY(-3px); border-color: var(--ink); border-top-color: var(--burgundy); box-shadow: 0 18px 32px -26px rgba(27, 23, 18, 0.55); }
.car-tile:hover .ct-name { color: var(--burgundy); }
.ct-name { font-family: var(--serif); font-weight: 700; font-size: 1.12rem; line-height: 1.2; transition: color 0.2s; }
.ct-meta { font-size: 0.82rem; color: var(--ink-faint); }
.ct-stats { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.3rem 1rem; margin-top: auto; padding-top: 0.55rem; border-top: 1px dotted var(--rule); font-family: var(--mono); font-size: 0.78rem; color: var(--ink-soft); }
.ct-gain { color: var(--green); font-weight: 600; }
.more { margin: 1.4rem 0 0; }

/* ---------- hub ---------- */
.hub { padding-bottom: clamp(1rem, 3vw, 2rem); }
.hub-group { padding-top: clamp(1.8rem, 4vw, 2.6rem); border-top: 1px solid var(--rule); margin-top: clamp(1.8rem, 4vw, 2.6rem); }
.hub-group:first-child { margin-top: 0; }
.hub-group h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.hub-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: clamp(2.2rem, 5vw, 3.2rem); padding: 1.3rem 0 0; border-top: 2px solid var(--ink);
}
.hub-foot p { margin: 0; max-width: 60ch; color: var(--ink-soft); }
.hub-foot b { color: var(--ink); }
@media (max-width: 480px) { .hub-foot .btn { width: 100%; white-space: normal; } }

/* Long car names must never push the masthead wider than a phone. */
@media (max-width: 400px) { .nav-links a.cta { padding: 0.5rem 0.75rem; font-size: 0.66rem; } }

/* ---------- HP Tuners support tables (family pages + brand hubs) ---------- */
table.support { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 0.9rem; }
.support th, .support td { text-align: left; padding: 0.7rem 0.9rem 0.7rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.support thead th { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-faint); white-space: nowrap; }
.support td { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.support td.wide { white-space: normal; min-width: 16rem; color: var(--ink); }
.support small { color: var(--ink-faint); }
.brand-table tbody th { font-family: var(--serif); font-weight: 600; font-size: 1rem; white-space: nowrap; }
.brand-table tbody th .text-link { font-weight: 600; }
.brand-table td.wide { font-size: 0.86rem; line-height: 1.5; }

/* ---------- brand grid on the hub ---------- */
.brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
@media (min-width: 760px) { .brand-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .brand-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.brand-tile { padding: 0.85rem 0.9rem 0.9rem; }
.brand-tile .ct-name { font-size: 1.05rem; }
.brand-tile .ct-stats { font-size: 0.72rem; }
.hub-group h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); margin-top: 1.8rem; }

/* ---------- phones: long model names stay within three lines ---------- */
.spec > .spec-wide { grid-column: 1 / -1; }
@media (min-width: 720px) { .spec > .spec-wide { padding-left: 0; border-left: 0; border-bottom: 1px solid var(--rule-soft); } }
@media (max-width: 420px) {
  .car-hero h1 { font-size: 1.62rem; letter-spacing: -0.015em; }
  .tunes-page .sect-title { font-size: 1.42rem; }
}
