/* Early Car Test — platform demo · shared styles */
:root {
  --ink: #0f172a;
  --ink-2: #334155;
  --mute: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;
  --bg: #f7f9fc;
  --card: #ffffff;
  --sky: #1e9bd7;
  --sky-2: #0b7fc0;
  --sky-soft: #e3f3fc;
  --green: #16a34a;
  --green-soft: #dcfce7;
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --violet: #7c3aed;
  --violet-soft: #ede9fe;
  --phone: #f07a2a;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15,23,42,.05), 0 8px 24px rgba(15,23,42,.06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); }
img, video { max-width: 100%; display: block; }
a { color: var(--sky-2); text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 .5em; }

/* demo ribbon */
.ribbon { background: var(--ink); color: #cbd5e1; font-size: 12.5px; padding: 7px 16px; text-align: center; }
.ribbon b { color: #fff; font-weight: 600; }
.ribbon a { color: #7dd3fc; }

/* top nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.nav__in { max-width: 1240px; margin: 0 auto; padding: 0 20px; height: 60px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); font-family: var(--display); font-size: 16px; white-space: nowrap; }
.brand__mark { width: 34px; height: 34px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(15,23,42,.12); display: grid; place-items: center; font-size: 18px; }
.brand small { font: 500 11px var(--font); color: var(--mute); display: block; letter-spacing: 0; }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a { color: var(--ink-2); font-weight: 500; font-size: 14px; padding: 8px 12px; border-radius: 9px; }
.nav__links a:hover { background: var(--sky-soft); color: var(--sky-2); }
.nav__links a[aria-current="page"] { background: var(--ink); color: #fff; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 11px; padding: 11px 18px; font-weight: 600; font-size: 14.5px; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn--sky { background: linear-gradient(180deg, #34aee6, var(--sky-2)); color: #fff; box-shadow: 0 6px 16px rgba(11,127,192,.28); }
.btn--sky:hover { box-shadow: 0 8px 22px rgba(11,127,192,.36); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ghost { background: #fff; color: var(--ink); border: 1px solid var(--line-2); }
.btn--ghost:hover { border-color: var(--sky); color: var(--sky-2); }
.btn--sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* pills & chips */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #f1f5f9; color: var(--ink-2); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.pill--plain::before { display: none; }
.pill--green { background: var(--green-soft); color: #15803d; }
.pill--amber { background: var(--amber-soft); color: #b45309; }
.pill--red { background: var(--red-soft); color: #b91c1c; }
.pill--sky { background: var(--sky-soft); color: var(--sky-2); }
.pill--violet { background: var(--violet-soft); color: #6d28d9; }
.pill--grey { background: #f1f5f9; color: var(--mute); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sky-2); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--mute); }
.ref { font-size: 11.5px; font-weight: 600; color: var(--violet); background: var(--violet-soft); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }

/* switch */
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 99px; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--sky); outline-offset: 2px; }

/* toast */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: grid; gap: 8px; max-width: min(360px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: #fff; padding: 11px 14px; border-radius: 12px; font-size: 13.5px; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: toastIn .35s cubic-bezier(.2,.8,.2,1); }
.toast b { color: #7dd3fc; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }

@media (max-width: 760px) {
  .nav__in { gap: 10px; padding: 0 16px; }
  .brand small { display: none; }
  .nav__links a { padding: 7px 8px; font-size: 13px; }
  .nav__links .hide-s { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
.nav__links a { white-space: nowrap; }
@media (max-width: 440px) { .nav .brand > span:last-child { display: none; } .nav__links { margin-left: auto; } }
