/* Test Drive Valet — shared styles */
:root {
  --bg: #0a0c10;
  --bg-2: #0f1218;
  --surface: #151922;
  --surface-2: #1b2029;
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.14);
  --text: #f3f5f8;
  --muted: #98a2b3;
  --muted-2: #667085;
  --accent: #f2b53a;
  --accent-2: #ffd166;
  --accent-ink: #1a1200;
  --green: #4ade80;
  --red: #f87171;
  /* Accent used as TEXT/icon colour (the fill colour is --accent) */
  --accent-text: #f2b53a;
  /* Status text colours */
  --ok-text: #86efac;
  --bad-text: #fca5a5;
  --info-text: #93c5fd;
  --shadow: rgba(0, 0, 0, 0.8);
  --overlay: rgba(0, 0, 0, 0.6);
  --radius: 14px;
  --radius-sm: 9px;
  --font-head: "Sora", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --max: 1160px;
}

/* ---- Light theme. The runtime sets data-theme to "light" or "dark";
        "system" is resolved to one of those before paint. ---- */
:root[data-theme="light"] {
  --bg: #f4f6f8;
  --bg-2: #eceff4;
  --surface: #ffffff;
  --surface-2: #e6eaf1;
  --border: rgba(16, 24, 40, 0.10);
  --border-2: rgba(16, 24, 40, 0.17);
  --text: #0f172a;
  --muted: #52607a;
  --muted-2: #7b8699;
  --accent: #f0ad20;
  --accent-2: #d9990f;
  --accent-ink: #1a1200;
  --accent-text: #8a5a00;
  --green: #15803d;
  --red: #b91c1c;
  --ok-text: #15803d;
  --bad-text: #b91c1c;
  --info-text: #1d4ed8;
  --shadow: rgba(16, 24, 40, 0.18);
  --overlay: rgba(16, 24, 40, 0.45);
  color-scheme: light;
}
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); letter-spacing: -0.02em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-text);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--accent-text); border-radius: 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, background .15s ease, border-color .15s ease;
  font-family: var(--font-body); line-height: 1.2; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn-ghost:hover { border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.03); }
.btn-lg { padding: 15px 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center; font-weight: 800; font-size: 14px; letter-spacing: -0.04em;
}
.brand-mark svg { width: 20px; height: 20px; }
.nav-links { display: flex; gap: 28px; font-size: 14.5px; color: var(--muted); }
.nav-links a:hover { color: var(--text); }
.nav-login-m { display: none; }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.nav-cta .btn { padding: 9px 16px; font-size: 14px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--border-2); color: var(--text); width: 40px; height: 40px; border-radius: 9px; cursor: pointer; }

/* Sections */
section { padding: 96px 0; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { margin: 14px 0 14px; }
.section-head p { font-size: 17px; color: var(--muted); }

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--border-2); }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.icon {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(242, 181, 58, 0.1); color: var(--accent); margin-bottom: 18px;
}
.icon svg { width: 22px; height: 22px; }

/* Forms */
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border-2); color: var(--text);
  border-radius: var(--radius-sm); padding: 12px 14px; font: inherit; font-size: 15px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(242,181,58,.15); }
/* A checkbox is not a text field. The rule above is a bare `input` selector
   written for one, so it also stretches every checkbox and radio to the full
   width of its container and pads it out — which renders as a wide empty box
   with the label shoved off the edge, and on a narrow modal pushes the text
   out of sight entirely. Every checkbox in the portal had been working around
   this one at a time (an inline `width:auto` on vehicles.html, a `.src-opt
   input` rule in settings.html, or a flex label that happened to constrain
   it); dealers.html uses `.src-opt` without ever defining it and two new
   controls forgot the same line, which is what broke the Add dealership
   modal. Exempt them here once, rather than remembering every time. */
input[type="checkbox"], input[type="radio"] { width: auto; padding: 0; }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
.field { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.note { font-size: 13px; color: var(--muted-2); }
.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; border: 1px solid; }
.alert-error { background: rgba(248,113,113,.10); border-color: rgba(248,113,113,.35); color: var(--bad-text); }
.alert-ok { background: rgba(74,222,128,.10); border-color: rgba(74,222,128,.35); color: var(--ok-text); }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 40px 0; color: var(--muted); font-size: 14px; }
.foot-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 22px; }
.foot-links a:hover { color: var(--text); }

/* Utilities */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; border: 1px solid var(--border-2); color: var(--muted);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(74,222,128,.18); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  section { padding: 64px 0; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .nav-cta .btn-ghost { display: none; }
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav-inner { gap: 10px; }
  .brand { font-size: 15px; gap: 8px; }
  .brand-mark { width: 28px; height: 28px; }
  .nav-cta { gap: 6px; }
  .nav-cta .btn { padding: 8px 11px; font-size: 13px; }
  .nav-toggle { width: 36px; height: 36px; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; gap: 4px; position: absolute; left: 0; right: 0; top: 68px;
    background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 12px 20px 16px;
  }
  .nav.open .nav-links a { padding: 10px 0; font-size: 16px; }
  .nav.open .nav-links .nav-login-m { display: block; color: var(--text); font-weight: 600; border-top: 1px solid var(--border); margin-top: 6px; padding-top: 14px; }
}

/* Add-ons under the plans (2026-10-12): a premium frame — an amber gradient
   hairline with a soft glow, the kicker in amber small caps. */
.addons { position: relative; margin-top: 28px; padding: 22px 26px; border-radius: 16px; background: var(--surface); display: grid; grid-template-columns: auto 1fr; gap: 6px 36px; align-items: center;
  box-shadow: 0 0 0 1px rgba(242,181,58,.35), 0 18px 48px -28px rgba(242,181,58,.55), inset 0 1px 0 rgba(255,255,255,.04); }
.addons::before { content: ""; position: absolute; inset: 0; border-radius: 16px; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(242,181,58,.95), rgba(242,181,58,.15) 45%, rgba(242,181,58,.6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.addons-head { display: flex; flex-direction: column; gap: 2px; }
.addons-kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.addons-head b { font-size: 15px; font-weight: 700; }
.addons-list { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 28px; }
@media (max-width: 720px) { .addons { grid-template-columns: 1fr; gap: 12px; } .addons-list { grid-template-columns: 1fr; } }
