/* Shared by both sites (Honda Dash, CarDash). Brand colours come from the
   --brand-* variables set in each page's <head>. */

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #eef1f4;
  --text: #14181d;
  --muted: #56616d;
  --line: #dde2e8;
  --code: #eef2f6;
  --warn-bg: #fff4e5;
  --warn-line: #efc27c;
  --frame: #0c0f13;
  --shadow: 0 1px 2px rgba(16, 24, 32, .06), 0 8px 24px rgba(16, 24, 32, .08);
  --shadow-lg: 0 18px 50px rgba(16, 24, 32, .22);
  --accent: var(--brand-accent);
  --accent-ink: #ffffff;
  --accent-soft: var(--brand-soft);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0e12;
    --surface: #141920;
    --surface-2: #1b2129;
    --text: #e8edf2;
    --muted: #9ba7b3;
    --line: #262e38;
    --code: #1c232c;
    --warn-bg: #2a2010;
    --warn-line: #6b5020;
    --frame: #000000;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, .6);
    --accent: var(--brand-accent-dark);
    --accent-ink: var(--brand-ink-dark);
    --accent-soft: var(--brand-soft-dark);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b0e12;
  --surface: #141920;
  --surface-2: #1b2129;
  --text: #e8edf2;
  --muted: #9ba7b3;
  --line: #262e38;
  --code: #1c232c;
  --warn-bg: #2a2010;
  --warn-line: #6b5020;
  --frame: #000000;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, .6);
  --accent: var(--brand-accent-dark);
  --accent-ink: var(--brand-ink-dark);
  --accent-soft: var(--brand-soft-dark);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0 0 14px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { color: var(--muted); font-size: .9rem; }
.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------------------------------------------------------- top bar */

.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.brandmark { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.brandmark img { width: 32px; height: 32px; }
.topbar nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.topbar nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 10px; border-radius: 10px; }
.topbar nav a:hover { color: var(--text); background: var(--surface-2); }
.topbar nav a.btn-sm { color: var(--accent-ink); background: var(--accent); padding: 7px 14px; }
.topbar nav a.btn-sm:hover { filter: brightness(1.08); background: var(--accent); color: var(--accent-ink); }
@media (max-width: 480px) { .topbar nav a.hide-sm { display: none; } }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: var(--accent-ink);
  text-decoration: none; font-weight: 700; font-size: 1.05rem;
  padding: 14px 22px; border-radius: 14px;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 35%, transparent);
}
.btn:hover { filter: brightness(1.07); }
.btn .icon { width: 20px; height: 20px; stroke-width: 2.4; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text); font-weight: 600; text-decoration: none;
  padding: 14px 6px;
}
.btn-ghost:hover { color: var(--accent); }
.btn-ghost .icon { width: 18px; height: 18px; }

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

.hero { position: relative; padding: 40px 0 24px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto auto; width: 70%; height: 120%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand-grad-a) 22%, transparent), transparent);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; gap: 36px; align-items: center; }
.hero .wrap > *, .two > * { min-width: 0; }
.hero-logo { width: 72px; height: 72px; margin-bottom: 18px; filter: drop-shadow(0 6px 14px color-mix(in srgb, var(--brand-grad-b) 40%, transparent)); }
.hero h1 { font-size: clamp(2rem, 5.4vw, 3.3rem); margin: 0 0 14px; }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; margin-bottom: 24px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.cta-note { margin-top: 12px; font-size: .9rem; color: var(--muted); }

.devices { position: relative; padding-bottom: 24%; }
.display {
  margin: 0 0 0 auto; width: 90%;
  background: var(--frame); padding: 2.2% 2.2% 2.6%; border-radius: 22px;
  box-shadow: var(--shadow-lg);
}
.display img { width: 100%; height: auto; border-radius: 6px; }
.phone {
  /* Bottom-left, over the Google Maps card, so the dashboard itself stays visible. */
  margin: 0; position: absolute; left: 0; bottom: 0; width: 25%;
  background: var(--frame); padding: 1.1%; border-radius: 13% / 6.2%;
  box-shadow: var(--shadow-lg);
}
.phone img { width: 100%; height: auto; border-radius: 11% / 5.2%; }

@media (min-width: 900px) {
  .hero { padding: 64px 0 40px; }
  .hero .wrap { grid-template-columns: 5fr 7fr; gap: 48px; }
}

/* ---------------------------------------------------------------- sections */

.section { padding: 56px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { color: var(--accent); font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 8px; }
.section h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); margin: 0 0 12px; }
.section .intro { color: var(--muted); font-size: 1.08rem; max-width: 40em; margin-bottom: 28px; }

/* Annotated car screen */
.annotated { position: relative; }
.annotated .display { width: 100%; }
.pin {
  position: absolute; transform: translate(-50%, -50%);
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: .9rem;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent), 0 4px 10px rgba(0,0,0,.35);
}
@media (max-width: 600px) { .pin { width: 22px; height: 22px; font-size: .75rem; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); } }
.callouts { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
@media (min-width: 700px) { .callouts { grid-template-columns: 1fr 1fr; gap: 16px 28px; } }
.callouts li { display: flex; gap: 12px; align-items: flex-start; }
.callouts .num {
  flex: none; width: 28px; height: 28px; border-radius: 50%; margin-top: 1px;
  display: grid; place-items: center; font-weight: 800; font-size: .85rem;
  background: var(--accent-soft); color: var(--accent);
}
.callouts strong { display: block; }
.callouts span.t { color: var(--muted); }

/* Feature grid */
.group-title { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; margin: 36px 0 16px; }
.group-title:first-of-type { margin-top: 8px; }
.group-title .icon { color: var(--accent); }
.features { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .features { grid-template-columns: 1fr 1fr 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px 18px 14px; box-shadow: var(--shadow);
}
.section.alt .card { background: var(--bg); box-shadow: none; }
.card .chip {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 12px;
}
.card h3 { font-size: 1.05rem; margin: 0 0 6px; }
.card p { color: var(--muted); font-size: .97rem; margin: 0 0 4px; }
@media (max-width: 639px) {
  /* Compact rows on phones: icon on the left, so 18 cards don't make an endless scroll. */
  .card { display: grid; grid-template-columns: 42px 1fr; column-gap: 14px; padding: 14px 16px; }
  .card .chip { grid-row: span 2; margin: 2px 0 0; }
  .card h3 { margin-bottom: 2px; }
}

/* Screenshot strips */
.strip {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 6px 16px 18px; margin: 0 -16px;
  scrollbar-width: thin;
}
.strip figure { margin: 0; scroll-snap-align: start; flex: none; }
.strip figcaption { margin-top: 10px; font-weight: 600; font-size: .95rem; }
.strip figcaption span { display: block; font-weight: 400; color: var(--muted); font-size: .88rem; }
.strip.phones figure { width: min(58vw, 232px); }
@media (min-width: 1000px) {
  .strip.phones { overflow: visible; margin: 0; padding: 6px 0 18px; }
  .strip.phones figure { flex: 1 1 0; width: auto; min-width: 0; }
}
.strip.phones .frame { background: var(--frame); padding: 6px; border-radius: 30px; box-shadow: var(--shadow); }
.strip.phones .frame img { border-radius: 24px; width: 100%; height: auto; }
.strip.cars figure { width: min(86vw, 620px); }
.strip.cars .frame { background: var(--frame); padding: 10px; border-radius: 16px; box-shadow: var(--shadow); }
.strip.cars .frame img { border-radius: 5px; width: 100%; height: auto; }
.strip-label { font-size: 1.1rem; margin: 32px 0 12px; }
.strip-label:first-of-type { margin-top: 0; }

/* Privacy */
.trio { display: grid; gap: 14px; }
@media (min-width: 760px) { .trio { grid-template-columns: repeat(3, 1fr); } }

/* Needs + FAQ */
.two { display: grid; gap: 32px; }
@media (min-width: 900px) { .two { grid-template-columns: 2fr 3fr; gap: 48px; } }
.needs { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.needs li { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.section.alt .needs li { background: var(--bg); }
.needs .icon { color: var(--accent); margin-top: 2px; }
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary {
  cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font-weight: 650; position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); transition: transform .15s;
}
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details .answer { color: var(--muted); padding: 0 0 12px; }

/* Final CTA + footer */
.final { text-align: center; }
.final img { width: 64px; height: 64px; margin: 0 auto 14px; }
.final h2 { margin-bottom: 8px; }
.final .cta { justify-content: center; margin-top: 18px; }
footer.site { color: var(--muted); font-size: .9rem; text-align: center; padding: 32px 0 48px; border-top: 1px solid var(--line); }
footer.site p { margin: 0 0 6px; }

/* ---------------------------------------------------------------- install guide */

.guide { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; }
.guide header { padding: 16px 0 4px; }
.guide h1 { font-size: clamp(1.7rem, 5vw, 2.2rem); margin: 0 0 12px; }
.guide .lead { font-size: 1.08rem; color: var(--muted); }
.guide section {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 20px 20px 8px; margin-top: 18px; box-shadow: var(--shadow);
}
.guide h2 { font-size: 1.3rem; margin: 0 0 12px; display: flex; align-items: center; }
.guide ul, .guide ol { padding-left: 1.3em; margin: 0 0 14px; }
.guide li { margin: 6px 0; }
.guide a { overflow-wrap: anywhere; }
.guide code { background: var(--code); padding: 1px 6px; border-radius: 6px; font-size: .92em; overflow-wrap: anywhere; }
.guide .btn { margin: 4px 0 6px; }
.note { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 10px; padding: 10px 14px; font-size: .95rem; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%; margin-right: 10px;
  background: var(--accent-soft); color: var(--accent); font-size: .95rem; font-weight: 800;
}
.table-wrap { overflow-x: auto; margin: 0 0 14px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }
td:first-child { font-weight: 600; width: 38%; }
@media (max-width: 520px) {
  .guide section { padding: 16px 16px 4px; }
  td:first-child { width: auto; }
}

/* Placeholder used only by `build.py --draft` while screenshots are missing */
.missing {
  display: grid; place-items: center; width: 100%; color: #8a96a3; font: 600 .9rem/1.3 system-ui, sans-serif;
  background: repeating-linear-gradient(45deg, #1d242c, #1d242c 10px, #222a33 10px, #222a33 20px);
  text-align: center; padding: 8px;
}
