/* RoadCost — Automotive Mission Control themes (TZ-THEME-01). Dark = TZ §2.1 exact. */
html[data-theme=dark]{color-scheme:dark;
--t-base:#0B0F14;--t-surface:#151D27;--t-elevated:#1E2935;--t-text:#F7F9FC;--t-text2:#B6C6D3;--t-action:#90D7FF;--t-on-action:#0B0F14;--t-warm:#F3C46C;--t-error:#FF9696;--t-border:#344454;
--t-action-soft:#14283A;--t-header:#0B0F14E6;--t-glow:#90D7FF22;--t-warm-icon:#F3C46C;--t-warn-bg:#2A2416;--t-grid:#B6C6D355}
html[data-theme=light]{color-scheme:light;
--t-base:#EEF2F6;--t-surface:#FFFFFF;--t-elevated:#F7F9FB;--t-text:#0E141B;--t-text2:#43505C;--t-action:#00628F;--t-on-action:#FFFFFF;--t-warm:#7A5200;--t-error:#B3261E;--t-border:#C3CED8;
--t-action-soft:#E1F3FD;--t-header:#FFFFFFE6;--t-glow:#00628F18;--t-warm-icon:#E0A93A;--t-warn-bg:#FFF4DA;--t-grid:#43505C33}
html[data-theme]{--bg:var(--t-base);--surface:var(--t-surface);--raised:var(--t-elevated);--line:var(--t-border);--ink:var(--t-text);--muted:var(--t-text2);--dim:var(--t-text2);--accent:var(--t-action);--accent-dark:var(--t-on-action);--gold:var(--t-warm);--danger:var(--t-error)}
html[data-theme] body{background:var(--t-base);color:var(--t-text)}
html[data-theme] body:before{background:radial-gradient(ellipse at 75% 13%,var(--t-glow),transparent 48%)}
html[data-theme] .topbar{background:var(--t-header);border-bottom-color:var(--t-border)}
html[data-theme] .brand,html[data-theme] .navlinks a[aria-current=page],html[data-theme] .navlinks a:hover{color:var(--t-text)}
html[data-theme] .mark{color:var(--t-action);border-color:var(--t-border)}
html[data-theme] .navlinks a,html[data-theme] .hero-flags,html[data-theme] .field>label,html[data-theme] .choice,html[data-theme] .fineprint,html[data-theme] .result .caption,html[data-theme] .metric small,html[data-theme] .route-overlay small,html[data-theme] .route-bottom small,html[data-theme] .section-lead,html[data-theme] .feature p,html[data-theme] .faq p,html[data-theme] .footer a,html[data-theme] .footer p,html[data-theme] .footnote,html[data-theme] .subhead,html[data-theme] .article p,html[data-theme] .article li,html[data-theme] .breadcrumb,html[data-theme] .page-header p{color:var(--t-text2)}
html[data-theme] .hero h1 em,html[data-theme] .eyebrow,html[data-theme] a,html[data-theme] .fineprint a,html[data-theme] .feature .ficon,html[data-theme] .pill{color:var(--t-action)}
html[data-theme] .nav-cta{border-color:var(--t-border);color:var(--t-text)}
html[data-theme] .hero-flags span:before{color:var(--t-action)}
html[data-theme] .panel{background:var(--t-surface);border-color:var(--t-border);box-shadow:0 20px 50px #0000001f}
html[data-theme] .field input,html[data-theme] .field select,html[data-theme] .field textarea{background:var(--t-elevated);color:var(--t-text);border-color:var(--t-border)}
html[data-theme] .field input::placeholder{color:var(--t-text2)}
html[data-theme] .choice input{accent-color:var(--t-action)}
html[data-theme] .btn{background:var(--t-action);border-color:var(--t-action);color:var(--t-on-action)}
html[data-theme] .btn:hover{filter:brightness(1.08)}
html[data-theme] .btn.ghost{background:var(--t-elevated);color:var(--t-text);border-color:var(--t-border)}
html[data-theme] .result{background:var(--t-action-soft);border-color:var(--t-border)}
html[data-theme] .result .big,html[data-theme] .result .summary,html[data-theme] .metric strong,html[data-theme] .route-overlay strong,html[data-theme] .route-bottom strong{color:var(--t-text)}
html[data-theme] .metric{border-top-color:var(--t-border)}
html[data-theme] .status{background:var(--t-warn-bg);color:var(--t-text);border-left-color:var(--t-warm)}
html[data-theme] .pill{background:var(--t-action-soft);border-color:var(--t-border)}
html[data-theme] .route-viz{background:radial-gradient(circle at 65% 28%,var(--t-glow),transparent 40%),var(--t-elevated)}
html[data-theme] .route-viz:after{background-image:linear-gradient(var(--t-grid) 1px,transparent 1px),linear-gradient(90deg,var(--t-grid) 1px,transparent 1px)}
html[data-theme] .route-bottom>div{background:var(--t-surface);border-color:var(--t-border)}
html[data-theme] .feature{background:var(--t-surface);border-color:var(--t-border)}
html[data-theme] .feature:hover{border-color:var(--t-action)}
html[data-theme] .feature .ficon{background:var(--t-action-soft)}
html[data-theme] .example{background:var(--t-elevated);border-color:var(--t-border);color:var(--t-text)}
html[data-theme] .faq details{border-bottom-color:var(--t-border)}
html[data-theme] .footer{background:var(--t-surface);border-top-color:var(--t-border)}
html[data-theme] .footnote{border-top-color:var(--t-border)}
html[data-theme] .skip{background:var(--t-surface);color:var(--t-text)}
@media(max-width:700px){html[data-theme] .navlinks{background:var(--t-surface)}}
/* ---- Theme toggle (TZ-THEME-01) ---- */
.theme-toggle{order:3;margin-left:auto;display:inline-flex;align-items:center;gap:8px;min-height:44px;min-width:88px;padding:0 14px;border-radius:999px;border:1px solid var(--t-border);background:var(--t-surface);color:var(--t-text);font-size:14px;font-weight:700;line-height:1;letter-spacing:.02em;cursor:pointer;flex:0 0 auto}
.theme-toggle:hover{border-color:var(--t-action)}
.theme-toggle:focus-visible{outline:3px solid var(--t-action);outline-offset:2px}
.theme-toggle__icon{width:18px;height:18px;border-radius:50%;flex:0 0 18px;transition:transform .22s ease,box-shadow .22s ease,background .22s ease}
html[data-theme=dark] .theme-toggle__icon{background:transparent;box-shadow:inset -6px -3px 0 0 var(--t-action);transform:rotate(-20deg)}
html[data-theme=light] .theme-toggle__icon{background:var(--t-warm-icon);box-shadow:0 0 0 3px color-mix(in srgb,var(--t-warm-icon) 30%,transparent)}
.nav .navlinks{order:2}.nav .menu-toggle{order:4}.nav .brand{order:1}
.nav{gap:12px}
@media(min-width:701px){.nav .navlinks{margin-left:auto}.theme-toggle{margin-left:8px}}
.menu-toggle{min-height:44px;color:var(--t-text)!important;background:var(--t-surface)!important;border-color:var(--t-border)!important}
html.theme-anim,html.theme-anim *{transition:background-color .22s ease,color .22s ease,border-color .22s ease!important}
@media(prefers-reduced-motion:reduce){html.theme-anim,html.theme-anim *,.theme-toggle__icon{transition:none!important}}
@media(max-width:360px){.theme-toggle{padding:0 10px;min-width:80px;gap:6px}.nav .menu-toggle{padding:8px 10px}.nav{gap:8px}.wrap.nav{padding:0 14px}.brand{gap:8px;letter-spacing:.08em}}
@media(max-width:700px){.nav .menu-toggle{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;min-height:44px;padding:0 12px;line-height:1}}
@media(max-width:360px){.theme-toggle{padding:0 9px;min-width:0;min-width:72px}.nav .menu-toggle{padding:0 9px;min-width:44px}.wrap.nav{padding:0 12px;gap:6px}.brand{gap:6px;font-size:14px}.brand .mark{width:32px;height:32px;flex:0 0 32px}}
