/* ============================================================
   DrivingTests.online — shared design system (app.css)
   One source of truth for the whole site: landing + funnel
   (start, onboarding, payment, dashboard) all pull this in so
   they share the same look. Page-specific layout stays in each
   page's own <style> block.
   ============================================================ */

:root {
    --ink:      #0d1526;
    --muted:    #566072;
    --faint:    #8b94a3;
    --line:     #e7ebf1;
    --bg:       #ffffff;
    --tint:     #f4f6fb;
    --accent:   #1d70b8;
    --accent-d: #155a95;
    --accent-t: #eaf3fb;
    --ok:       #1a8f5a;
    --danger:   #d4351c;
    --star:     #f5a623;
    --radius-sm:9px;
    --radius:   14px;
    --radius-lg:22px;
    --shadow-sm: 0 1px 2px rgba(16,32,64,.06);
    --shadow:    0 8px 30px rgba(16,32,64,.08);
    --shadow-lg: 0 20px 60px rgba(16,32,64,.13);
    --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font); color: var(--ink); background: var(--bg);
    line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── 90% frame ── */
.frame { width: 90%; max-width: 1200px; margin: 0 auto; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--font); font-weight: 700; font-size: .95rem;
    padding: 13px 22px; border-radius: 10px; border: 1px solid transparent;
    cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
    text-align: center;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(29,112,184,.28); }
.btn-primary:hover { background: var(--accent-d); transform: translateY(-1px); box-shadow: 0 10px 26px rgba(29,112,184,.34); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: #cfd6e0; background: var(--tint); }
.btn-lg { padding: 16px 30px; font-size: 1.02rem; }
.btn-sm { padding: 9px 15px; font-size: .85rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { background: #b9c2cf; box-shadow: none; cursor: not-allowed; transform: none; }

/* ── Nav ── */
header.nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.05rem; letter-spacing: -.01em; color: var(--ink); }
.brand .mark { width: 28px; height: 28px; border-radius: 8px; flex: none; background: linear-gradient(135deg, var(--accent), #2b8fe0); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(29,112,184,.35); }
.mark-l { color: #fff; font-weight: 800; font-size: 16px; line-height: 1; letter-spacing: -.03em; }
.brand .tld { color: var(--faint); font-weight: 600; }
.nav-link { font-size: .88rem; color: var(--muted); font-weight: 600; }
.nav-link:hover { color: var(--ink); }

/* ── Badge / live dot ── */
.badge {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .78rem; font-weight: 700; color: var(--accent-d);
    background: var(--accent-t); border: 1px solid rgba(29,112,184,.16);
    padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.badge .dot, .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(26,143,90,.18); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ── Form primitives (shared by the funnel) ── */
.field { margin-bottom: 18px; }
.label { display: block; font-size: .88rem; font-weight: 700; color: var(--ink); margin-bottom: 7px; }
.hint { font-size: .8rem; color: var(--faint); margin-top: 6px; }
.input, .select {
    width: 100%; font-family: var(--font); font-size: 1rem; color: var(--ink);
    background: #fff; border: 1.5px solid var(--line); border-radius: 10px;
    padding: 13px 15px; transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29,112,184,.14); }
.input::placeholder { color: #aeb6c2; }
.input.error, .select.error { border-color: var(--danger); }
.err-msg { font-size: .8rem; color: var(--danger); margin-top: 6px; display: none; }
.err-msg.show { display: block; }

/* Selectable option cards (quiz / choices) */
.option {
    display: flex; align-items: center; gap: 13px; width: 100%;
    border: 1.5px solid var(--line); border-radius: 12px; padding: 16px 18px;
    background: #fff; cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; text-align: left;
}
.option:hover { border-color: #c4d3e4; background: var(--tint); }
.option.selected { border-color: var(--accent); background: var(--accent-t); box-shadow: 0 0 0 3px rgba(29,112,184,.1); }
.option .o-title { font-weight: 700; font-size: .96rem; }
.option .o-desc { font-size: .84rem; color: var(--muted); }

/* Generic content card + progress */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 36px; }
@media (max-width: 600px) { .panel { padding: 24px 20px; } }
.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s ease; }

/* ── Footer ── */
footer { padding: 40px 0 46px; border-top: 1px solid var(--line); margin-top: 8px; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; margin-bottom: 14px; }
.foot-links a { font-size: .82rem; color: var(--muted); font-weight: 500; }
.foot-links a:hover { color: var(--ink); }
.foot-dis { font-size: .75rem; color: var(--faint); line-height: 1.6; text-align: center; max-width: 640px; margin: 0 auto; }
.foot-copy { font-size: .75rem; color: var(--faint); text-align: center; margin-top: 12px; }
