/* EV Haven: "Electric Current" palette
   #0f776d deep teal · #60ccc2 aqua · #ffe18d butter · #ffda1e volt · #eabb37 gold
   Night-teal ground, signage type, LCD-style readouts. */

:root {
    --teal: #0f776d;
    --aqua: #60ccc2;
    --butter: #ffe18d;
    --volt: #ffda1e;
    --gold: #eabb37;

    --ground: #04201d;
    --ground-2: #062a26;
    --panel: #08332f;
    --panel-2: #0b3e39;
    --line: rgba(96, 204, 194, 0.16);
    --line-strong: rgba(96, 204, 194, 0.38);
    --text: #eaf6f3;
    --muted: #93bdb6;
    --ink: #04201d;
    --danger: #ff6a55;
    --danger-bg: rgba(255, 106, 85, 0.12);

    --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
    --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

    --radius: 4px;
    --notch: 14px;
    --wrap: 1180px;
    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background-color: var(--ground);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    width: 100%;
    padding-bottom: 72px;
}

a {
    color: var(--aqua);
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}

a:hover {
    color: var(--butter);
}

:focus-visible {
    outline: 2px solid var(--volt);
    outline-offset: 2px;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: 0.005em;
    margin: 0 0 0.4em;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 3.8rem); text-transform: uppercase; }
h2 { font-size: clamp(1.6rem, 3vw, 2rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: var(--panel-2);
    padding: 0.1em 0.35em;
    border-radius: 3px;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 16px;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.volt { color: var(--volt); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip {
    position: absolute; left: 8px; top: -48px; z-index: 50;
    background: var(--volt); color: var(--ink); padding: 8px 12px; font-weight: 700;
}
.skip:focus { top: 8px; }

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--aqua);
    margin: 0 0 0.6rem;
}

.lede {
    font-size: 1.12rem;
    color: #cfe6e1;
    max-width: 62ch;
}

/* ---------- Buttons, chips, panels ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font: 700 0.95rem/1 var(--font-body);
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.12s ease, background-color 0.12s ease, box-shadow 0.12s ease;
}

.btn-volt {
    background: var(--volt);
    color: var(--ink);
    box-shadow: 0 0 0 0 rgba(255, 218, 30, 0);
}
.btn-volt:hover {
    color: var(--ink);
    background: var(--butter);
    box-shadow: 0 0 24px -4px rgba(255, 218, 30, 0.55);
}
.btn-volt:active { transform: translateY(1px); }

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--aqua); color: var(--aqua); }

.btn-small { min-height: 34px; padding: 0 12px; font-size: 0.85rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: 0.45; pointer-events: none; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.chip {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    color: var(--text);
    text-decoration: none;
}
a.chip:hover { border-color: var(--volt); color: var(--volt); }
.chip-port { border-color: var(--aqua); color: var(--aqua); }
.chip-quiet { color: var(--muted); border-color: var(--line); }
.chip-volt { border-color: var(--gold); color: var(--butter); }

.panel {
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
}

.notice {
    border-left: 3px solid var(--gold);
    background: rgba(234, 187, 55, 0.08);
    padding: 12px 16px;
    border-radius: 0 var(--radius) var(--radius) 0;
    color: #f3e6bf;
}

.empty { text-align: left; }
.empty .big { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; margin-bottom: 0.3em; }

.count {
    display: inline-block;
    min-width: 1.6em;
    padding: 0 6px;
    margin-left: 6px;
    border-radius: 999px;
    background: var(--volt);
    color: var(--ink);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    line-height: 1.6;
    font-family: var(--font-mono);
}

.est-tag {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px dashed rgba(234, 187, 55, 0.6);
    padding: 1px 5px;
    border-radius: 3px;
    vertical-align: middle;
    text-decoration: none;
    white-space: nowrap;
}
a.est-tag:hover { color: var(--butter); border-color: var(--butter); }

.section-title { text-transform: uppercase; letter-spacing: 0.02em; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-head .section-title { margin: 0; }
.more { font-weight: 600; text-decoration: none; white-space: nowrap; }
.go { color: var(--volt); font-weight: 700; }

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(4, 32, 29, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 64px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.55rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text);
    text-decoration: none;
    margin: 0;
}
.brand:hover { color: var(--text); }
.brand-mark { width: 24px; height: 24px; color: var(--volt); filter: drop-shadow(0 0 6px rgba(255, 218, 30, 0.6)); }
.brand-small { font-size: 1.3rem; margin-bottom: 6px; }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav > a, .nav-drop > a { display: block; }
.site-nav a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--radius);
}
.site-nav a:hover { color: var(--text); background: rgba(96, 204, 194, 0.08); }
.site-nav a.active { color: var(--volt); }

/* Learn dropdown: opens on hover and keyboard focus; no JavaScript. */
.nav-drop { position: relative; }
.nav-drop .caret { font-size: 0.7em; margin-left: 2px; display: inline-block; transition: transform 0.15s ease; }
.nav-drop:hover .caret, .nav-drop:focus-within .caret { transform: rotate(180deg); }
.nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 30;
    width: min(340px, calc(100vw - 32px));
    margin: 0;
    padding: 8px;
    list-style: none;
    background: var(--ground-2);
    border: 1px solid var(--line-strong);
    border-top: 2px solid var(--volt);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
}
.nav-drop:hover .nav-menu,
.nav-drop:focus-within .nav-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.site-nav .nav-menu a {
    display: block;
    padding: 9px 10px;
    color: var(--text);
    font-weight: 600;
    line-height: 1.3;
}
.site-nav .nav-menu a:hover, .site-nav .nav-menu a:focus-visible { background: rgba(96, 204, 194, 0.1); color: var(--volt); }
.nav-menu-kicker {
    display: block;
    font: 600 0.62rem/1.4 var(--font-mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--aqua);
}
.nav-menu-all { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.site-nav .nav-menu-all a { color: var(--aqua); font-weight: 600; }

.header-zip {
    margin-left: auto;
    display: flex;
    align-items: center;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: #021613;
    height: 38px;
    overflow: hidden;
}
.header-zip-label {
    font: 600 0.65rem/1 var(--font-mono);
    letter-spacing: 0.14em;
    color: var(--aqua);
    padding: 0 8px 0 10px;
}
.header-zip input {
    width: 7ch;
    background: transparent;
    border: 0;
    color: var(--butter);
    font: 600 1rem/1 var(--font-mono);
    letter-spacing: 0.12em;
    padding: 0;
}
.header-zip input::placeholder { color: rgba(147, 189, 182, 0.35); letter-spacing: 0; }
.header-zip input:focus { outline: none; }
.header-zip:focus-within { border-color: var(--volt); }
.header-zip button {
    height: 100%;
    border: 0;
    border-left: 1px solid var(--line);
    background: transparent;
    color: var(--volt);
    padding: 0 10px;
    cursor: pointer;
    font-size: 1rem;
}

/* ---------- Loading notes ---------- */

.loading-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--muted);
}
.loading-icon {
    flex: none;
    width: 18px;
    height: 18px;
    color: var(--aqua);
    animation: loading-spin 0.9s linear infinite;
}
@keyframes loading-spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--ground-2);
    padding: 32px 0 40px;
}
.footer-inner { display: grid; gap: 20px; grid-template-columns: 1fr; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--text); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--volt); }
.footer-sources { margin: 0; }

/* ---------- Home ---------- */

.hero {
    display: grid;
    gap: 32px;
    padding: 56px 0 48px;
    align-items: end;
}

.hero-title {
    font-size: clamp(3rem, 9vw, 6.2rem);
    line-height: 0.92;
    margin-bottom: 0.3em;
}
.hero-title .volt { text-shadow: 0 0 28px rgba(255, 218, 30, 0.35); }

.hero-panel h2 { font-size: 2.2rem; text-transform: uppercase; }
.scope {
    margin-top: 20px;
    height: 64px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: repeating-linear-gradient(90deg, transparent 0 29px, var(--line) 29px 30px);
}
.scope svg { width: 100%; height: 100%; display: block; }
.scope polyline {
    fill: none;
    stroke: var(--volt);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 900;
    stroke-dashoffset: 900;
    animation: trace 3.2s ease-out forwards;
    filter: drop-shadow(0 0 4px rgba(255, 218, 30, 0.7));
}
@keyframes trace { to { stroke-dashoffset: 0; } }

.popular, .learn-teaser { padding: 16px 0 48px; }

/* Home "New to EVs?": an index list, one article per row. */
.learn-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid var(--line);
}
.learn-list a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 16px;
    align-items: center;
    padding: 18px 4px;
    border-top: 1px solid var(--line);
    color: var(--text);
    text-decoration: none;
    transition: background-color 0.15s ease;
}
.learn-list a:hover { background: rgba(96, 204, 194, 0.06); }
.learn-list a:hover strong, .learn-list a:hover .go { color: var(--volt); }
.learn-list .learn-kicker { grid-column: 1; }
.learn-list strong { grid-column: 1; font: 800 1.35rem/1.1 var(--font-display); text-transform: uppercase; }
.learn-list .muted { grid-column: 1; margin: 0; }
.learn-list .go { grid-column: 2; grid-row: 1 / span 3; color: var(--aqua); font-size: 1.2rem; }
.learn-kicker { color: var(--aqua); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }

/* ---------- ZIP form ---------- */

.zip-form-wrap { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-top: 8px; }
.zip-form { display: grid; gap: 6px; }
.zip-label { font: 600 0.75rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--aqua); }
.zip-row { display: flex; gap: 8px; }
.zip-row input {
    width: 11ch;
    min-height: 48px;
    padding: 0 14px;
    background: #021613;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    color: var(--butter);
    font: 600 1.25rem/1 var(--font-mono);
    letter-spacing: 0.1em;
}
.zip-row input:focus { outline: none; border-color: var(--volt); box-shadow: 0 0 0 3px rgba(255, 218, 30, 0.2); }
.zip-row .btn { min-height: 48px; }
.locate { min-height: 48px; }
.locate-error { color: var(--gold); font-size: 0.85rem; width: 100%; }

/* ---------- Grids & vehicle cards ---------- */

.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
    transition: opacity 0.15s ease;
}
.grid.is-busy { opacity: 0.5; }

.vcard {
    position: relative;
    background: linear-gradient(180deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.vcard:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.vcard.is-selected { border-color: var(--volt); }

.vcard-link {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px 18px 14px;
    color: var(--text);
    text-decoration: none;
    height: 100%;
}
.vcard-link:hover { color: var(--text); }
.vcard-head { display: flex; justify-content: space-between; align-items: center; }
.vcard-year { color: var(--volt); font-size: 0.85rem; letter-spacing: 0.08em; }
.vcard-body { font: 0.7rem/1 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-right: 12px; }
.vcard-title { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; margin: 0; text-transform: uppercase; }
.vcard-title strong { font-weight: 900; display: block; }

.readout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.readout > div { padding: 10px 0; }
.readout > div + div { border-left: 1px solid var(--line); padding-left: 10px; }
.readout dt { font: 0.62rem/1.2 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.readout dd { margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--butter); white-space: nowrap; }
.readout small, .big-readout small, .meter-value small { font-size: 0.6em; color: var(--muted); margin-left: 2px; font-weight: 400; }

.vcard-l1 { margin: 0; font-size: 0.82rem; }
.ok { color: var(--aqua); }
.warn { color: var(--gold); }

.vcard-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 4px; }
.vcard-foot .price { font-size: 0.82rem; color: var(--muted); }

.vcard-compare {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: none;
}
.grid .vcard:has(.vcard-compare) .vcard-foot { padding-right: 96px; }
.grid .vcard-compare {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--muted);
    cursor: pointer;
    background: var(--panel);
    padding: 2px 4px;
}
.grid .vcard-compare input { accent-color: var(--volt); }

/* ---------- Page heads ---------- */

.page-head { padding: 44px 0 28px; }
.page-head-tight { padding-bottom: 16px; }

.mode-switch {
    display: inline-flex;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    padding: 3px;
    gap: 3px;
    margin-top: 8px;
}
.mode-switch button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font: 600 0.9rem/1 var(--font-body);
    padding: 10px 14px;
    border-radius: 3px;
    cursor: pointer;
}
.mode-switch button.on { background: var(--volt); color: var(--ink); }

/* ---------- Forms ---------- */

.field { display: grid; gap: 6px; margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
.field > span, .field > legend {
    font: 600 0.72rem/1.2 var(--font-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0;
}
.field em { font-style: normal; color: var(--aqua); text-transform: none; letter-spacing: 0; margin-left: 4px; }
.field input[type="number"],
.field input:not([type]),
.field input[type="text"],
.field select {
    width: 100%;
    min-height: 42px;
    padding: 0 10px;
    background: #021613;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    color: var(--text);
    font: 500 0.95rem var(--font-body);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--volt); }
.field input[type="number"] { font-family: var(--font-mono); color: var(--butter); }
.field input[type="range"] { width: 100%; height: 42px; margin: 0; accent-color: var(--volt); }
.field-check { display: flex; align-items: center; gap: 10px; }
.field-check input { width: 18px; height: 18px; accent-color: var(--volt); }
.field-check span { font: 500 0.95rem var(--font-body); text-transform: none; letter-spacing: 0; color: var(--text); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label {
    flex: 1 1 auto;
    text-align: center;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.9rem;
}
.seg label.on { background: var(--volt); border-color: var(--volt); color: var(--ink); font-weight: 700; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:focus-visible) { outline: 2px solid var(--volt); outline-offset: 2px; }

/* ---------- Finder ---------- */

.finder { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.filters { padding: 0; }
.filters details { padding: 16px 18px 6px; }
.filters summary {
    cursor: pointer;
    font: 800 1.3rem/1 var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding-bottom: 14px;
    list-style: none;
}
.filters summary::-webkit-details-marker { display: none; }
.filters summary::after { content: "+"; float: right; color: var(--volt); font-family: var(--font-mono); }
.filters details[open] summary::after { content: "–"; }
.filters .btn { margin-bottom: 14px; }

.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.results-bar p { margin: 0; color: var(--muted); }
.sort { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.85rem; }
.sort select {
    background: #021613; color: var(--text); border: 1px solid var(--line-strong);
    border-radius: var(--radius); min-height: 38px; padding: 0 8px; font: inherit;
}

.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 24px; }

.compare-tray {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 760px;
    z-index: 30;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 10px 10px 16px;
    background: #021613;
    border: 1px solid var(--volt);
    border-radius: var(--radius);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.compare-tray ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.85rem; }
.compare-tray button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; }

/* ---------- Quiz ---------- */

.quiz { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.quiz-form .btn { width: 100%; margin-top: 4px; }
.quiz-form .muted { margin: 12px 0 0; }
.ranked { list-style: none; counter-reset: rank; margin: 0; padding: 0; display: grid; gap: 10px; }
.ranked-item {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 14px;
    align-items: start;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
}
.score {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: 2px solid var(--volt);
    border-radius: 50%;
    color: var(--volt);
    font-size: 1.15rem;
    font-weight: 600;
}
.ranked-title { font: 800 1.35rem/1.1 var(--font-display); text-transform: uppercase; color: var(--text); text-decoration: none; }
.ranked-title:hover { color: var(--volt); }
.reasons { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 0.9rem; }

/* ---------- Widgets (calculators) ---------- */

.widget {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(15, 119, 109, 0.22), rgba(15, 119, 109, 0.06)),
        var(--ground-2);
    padding: 20px;
    margin: 28px 0;
}
.widget-head h3 { text-transform: uppercase; margin-bottom: 4px; }
.widget-head p { font-size: 0.88rem; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; margin-top: 12px; align-items: end; }
.field-wide { grid-column: 1 / -1; }

.calc-out {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    margin-top: 6px;
}
.meter { background: #021613; padding: 12px 14px; display: grid; gap: 2px; }
.meter-label { font: 600 0.66rem/1.2 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.meter-value { font-size: 1.7rem; font-weight: 600; color: var(--butter); line-height: 1.15; }
.meter-value.volt { color: var(--volt); text-shadow: 0 0 18px rgba(255, 218, 30, 0.3); }
.meter-sub { font-size: 0.78rem; color: var(--muted); }
.meter-delta.pos .meter-value { color: var(--aqua); }
.meter-delta.neg .meter-value { color: var(--gold); }

.temp-bar { height: 10px; background: #021613; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin: 4px 0 14px; }
.temp-fill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--aqua), var(--volt)); transition: width 0.15s ease; }

/* ---------- Model page ---------- */

.crumbs { padding-top: 24px; font-size: 0.85rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs span[aria-hidden] { margin: 0 6px; opacity: 0.6; }

.model-hero { display: grid; gap: 24px; padding: 20px 0 28px; }
.model-title { font-size: clamp(2.6rem, 7vw, 4.6rem); line-height: 0.95; }
.model-title strong { font-weight: 900; color: var(--text); display: block; }
.model-year { display: block; font-size: 0.32em; font-weight: 600; color: var(--volt); letter-spacing: 0.12em; margin-bottom: 8px; }
.years { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 0; }
.years .muted { margin-right: 4px; }

.big-readout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    margin: 0;
    background: var(--line);
    border: 1px solid var(--line-strong);
    align-self: end;
}
.big-readout > div { background: #021613; padding: 14px 16px; display: grid; gap: 2px; align-content: start; }
.big-readout dt { font: 600 0.68rem/1.4 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.big-readout dd { margin: 0; font-size: 2.2rem; font-weight: 600; color: var(--butter); line-height: 1.1; }
.big-readout dd.volt { color: var(--volt); text-shadow: 0 0 22px rgba(255, 218, 30, 0.3); }

.listings {
    display: grid;
    gap: 16px;
    align-items: center;
    margin-bottom: 32px;
    border-color: rgba(255, 218, 30, 0.35);
}
.listings h2 { font-size: 1.6rem; text-transform: uppercase; margin-bottom: 4px; }
.listings p { margin: 0; }
.listing-buttons { display: flex; flex-wrap: wrap; gap: 10px; }

.model-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
.model-main { min-width: 0; }
.model-side { display: grid; gap: 16px; align-content: start; }
.model-side .widget { margin: 0; }

.block { padding: 24px 0; border-top: 1px solid var(--line); }
.block:first-child { border-top: 0; padding-top: 0; }
.block-title { text-transform: uppercase; display: flex; align-items: center; gap: 10px; font-size: 1.7rem; }

.spec-grid { display: grid; grid-template-columns: 1fr; margin: 0 0 12px; }
.spec-grid > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line);
}
.spec-grid dt { color: var(--muted); }
.spec-grid dd { margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; }

.charge-bars { display: grid; gap: 8px; margin-bottom: 10px; }
.charge-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 12px;
    padding: 12px 14px;
    background: #021613;
    border-left: 3px solid var(--teal);
}
.charge-bar:nth-child(2) { border-left-color: var(--aqua); }
.charge-bar:nth-child(3) { border-left-color: var(--volt); }
.charge-bar .mono { font-size: 1.25rem; font-weight: 600; color: var(--butter); text-align: right; }
.charge-bar .mono.volt { color: var(--volt); }
.charge-kind { font-weight: 600; }
.charge-bar .muted { grid-column: 1 / -1; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font: 600 0.68rem/1.2 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
tbody th { font-weight: 600; }

.net-table td .muted { display: block; margin-top: 2px; }
.access-badge {
    display: inline-block;
    font: 600 0.72rem/1 var(--font-mono);
    letter-spacing: 0.04em;
    padding: 4px 8px;
    border-radius: 3px;
    white-space: nowrap;
}
.access-native .access-badge { background: var(--aqua); color: var(--ink); }
.access-withadapter .access-badge { background: transparent; color: var(--butter); border: 1px solid var(--gold); }
.access-notsupported .access-badge { background: transparent; color: var(--muted); border: 1px solid var(--line-strong); }
.access-notsupported th, .access-notsupported td { color: var(--muted); }

/* CarPlay / Android Auto: wireless reads as best, wired as fine, none as absent. */
.phone-badge {
    display: inline-block;
    font: 600 0.72rem/1 var(--font-mono);
    letter-spacing: 0.04em;
    padding: 4px 8px;
    border-radius: 3px;
    white-space: nowrap;
}
.phone-wireless { background: var(--aqua); color: var(--ink); }
.phone-wired { color: var(--butter); border: 1px solid var(--gold); }
.phone-none { color: var(--muted); border: 1px solid var(--line-strong); }

.recalls { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.recall { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.recall.is-danger { border-color: var(--danger); background: var(--danger-bg); }
.recall summary { cursor: pointer; padding: 12px 14px; display: grid; gap: 4px; list-style: none; }
.recall summary::-webkit-details-marker { display: none; }
.recall details > p { padding: 0 14px; font-size: 0.92rem; }
.recall-component { font-weight: 600; }
.recall-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.recall-flags:empty { display: none; }
.flag { font: 600 0.68rem/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 7px; border-radius: 3px; }
.flag-danger { background: var(--danger); color: #1a0703; }
.flag-ota { background: transparent; color: var(--aqua); border: 1px solid var(--aqua); }
.vin-note { font-size: 0.88rem; color: var(--muted); border-left: 3px solid var(--aqua); padding-left: 12px; }

.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.bar-label { font-size: 0.88rem; }
.bar { grid-column: 1 / -1; grid-row: 2; height: 6px; background: #021613; position: relative; border-radius: 3px; overflow: hidden; }
.bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: linear-gradient(90deg, var(--teal), var(--aqua)); }

.affiliate h3 { text-transform: uppercase; }
.affiliate-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.affiliate-list li { display: grid; }

/* ---------- Chargers ---------- */

.charger-controls { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; align-items: end; margin-bottom: 16px; }
.charger-controls .field { margin-bottom: 12px; }
.charger-controls > .btn, .charger-controls > .locate { margin-bottom: 12px; }
.charger-controls > .locate { grid-column: 1 / -1; justify-self: start; }
.charger-controls .field:not(.field-zip) { grid-column: 1 / -1; }
.field-zip input { font-family: var(--font-mono); color: var(--butter); letter-spacing: 0.1em; }

.charger-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.map {
    height: 360px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--ground-2);
    z-index: 0;
}
.station-list ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.station {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    cursor: pointer;
    transition: border-color 0.15s ease;
}
.station:hover, .station.is-focus { border-color: var(--volt); }
.station.is-off { opacity: 0.45; filter: grayscale(0.8); }
.station h3 { font-size: 1.15rem; margin: 4px 0 2px; }
.station p { margin: 0 0 8px; }
.station-top { display: flex; justify-content: space-between; gap: 8px; font-size: 0.8rem; }
.station-net { color: var(--aqua); font-weight: 600; }
.compat { font-size: 0.82rem; margin: 8px 0 0 !important; }
.source { margin-top: 16px; }

.pin span {
    display: block;
    width: 22px;
    height: 22px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 2px solid var(--ink);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.pin-ok span { background: var(--volt); }
.pin-any span { background: var(--aqua); }
.pin-off span { background: #5b7470; opacity: 0.75; }

.leaflet-container { font-family: var(--font-body); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--ground-2); color: var(--text); }
.leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
.leaflet-control-attribution { background: rgba(4, 32, 29, 0.8) !important; color: var(--muted) !important; }
.leaflet-control-attribution a { color: var(--aqua) !important; }

/* ---------- Compare ---------- */

.compare-picker { display: grid; gap: 0 12px; grid-template-columns: 1fr; align-items: end; margin-bottom: 24px; }
.compare-picker .btn { margin-bottom: 14px; }
.compare-table th[scope="col"] a { font: 800 1.15rem/1.1 var(--font-display); text-transform: uppercase; color: var(--text); text-decoration: none; }
.compare-table th[scope="col"] { min-width: 160px; }
.compare-table tbody th { color: var(--muted); font-weight: 500; white-space: nowrap; }
.compare-table td.best { color: var(--volt); font-weight: 600; }
.compare-table td.best::after { content: " ●"; font-size: 0.6em; vertical-align: middle; }

/* ---------- Learn ---------- */

.learn-index { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
.learn-index a { display: block; height: 100%; color: var(--text); text-decoration: none; position: relative; }
.learn-index a:hover h2 { color: var(--volt); }
.learn-index h2 { font-size: 1.7rem; text-transform: uppercase; margin-top: 8px; }
.learn-index .go { position: absolute; right: 20px; bottom: 18px; }

.article { max-width: 760px; }
.article-head { padding: 24px 0 8px; }
.prose { font-size: 1.05rem; }
.prose h2 { margin-top: 1.6em; text-transform: uppercase; font-size: 1.7rem; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 0.5em; }
.prose li::marker { color: var(--volt); }
.formula {
    background: #021613;
    border-left: 3px solid var(--volt);
    padding: 14px 16px;
    margin: 0 0 1.2em;
    color: var(--butter);
    font-size: 0.95rem;
    overflow-x: auto;
}
.pair { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 0 0 1.2em; }
.pair h3 { text-transform: uppercase; }
.pair p:last-child { margin: 0; }
.plug-grid { display: grid; gap: 12px; grid-template-columns: 1fr; margin: 1.2em 0; }
.plug svg { width: 56px; height: 56px; margin-bottom: 8px; }
.plug svg * { fill: none; stroke: var(--volt); stroke-width: 2.5; }
.plug h3 { text-transform: uppercase; margin-bottom: 2px; }
.plug .mono { color: var(--aqua); }
.plug p:last-child { margin: 0; font-size: 0.95rem; }
.level-table th[scope="row"] { color: var(--volt); font-family: var(--font-display); font-size: 1.15rem; text-transform: uppercase; white-space: nowrap; }

.next-article { display: grid; gap: 4px; margin-top: 40px; color: var(--text); text-decoration: none; position: relative; }
.next-article strong { font: 800 1.5rem/1.1 var(--font-display); text-transform: uppercase; }
.next-article:hover strong { color: var(--volt); }
.next-article .go { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; }

.ad-slot { margin: 32px 0; padding: 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.ad-label { display: block; font: 0.62rem var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }

/* ---------- Blazor error UI ---------- */

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 12px 16px;
    background: var(--danger);
    color: #1a0703;
    font-weight: 600;
}
#blazor-error-ui .reload { color: #1a0703; margin-left: 8px; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 16px; top: 10px; }

/* ---------- Breakpoints ---------- */

@media (max-width: 759px) {
    .header-inner { flex-wrap: wrap; gap: 4px 12px; padding: 10px 16px 8px; }
    .site-nav { order: 3; width: 100%; margin-left: -12px; }
    .header-zip { margin-left: auto; }
    .compare-tray { flex-direction: column; align-items: stretch; }
}

@media (min-width: 640px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
    .calc-out { grid-template-columns: repeat(3, 1fr); }
    .model-side .calc-out { grid-template-columns: 1fr; }
    .big-readout { grid-template-columns: repeat(4, 1fr); }
    .spec-grid { grid-template-columns: 1fr 1fr; column-gap: 32px; }
    .pair, .plug-grid { grid-template-columns: 1fr 1fr; }
    .learn-index { grid-template-columns: 1fr 1fr; }
    .compare-picker { grid-template-columns: repeat(3, 1fr) auto; }
    .charger-controls { grid-template-columns: 140px auto auto repeat(4, minmax(0, 1fr)); }
    .charger-controls .field:not(.field-zip), .charger-controls > .locate { grid-column: auto; }
    .footer-inner { grid-template-columns: 1.2fr 1fr; }
    .footer-sources { grid-column: 1 / -1; }
}

@media (min-width: 900px) {
    .hero { grid-template-columns: 1.5fr 1fr; gap: 48px; padding-top: 80px; }
    .learn-list a { grid-template-columns: 130px minmax(0, 1.1fr) minmax(0, 1.4fr) 24px; gap: 24px; padding: 20px 8px; }
    .learn-list .learn-kicker, .learn-list strong, .learn-list .muted, .learn-list .go { grid-column: auto; grid-row: auto; }
    .learn-list .go { justify-self: end; }
    .grid { grid-template-columns: repeat(3, 1fr); }
    .finder { grid-template-columns: 280px 1fr; align-items: start; }
    .filters { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; clip-path: none; }
    .finder .grid { grid-template-columns: repeat(2, 1fr); }
    .quiz { grid-template-columns: 360px 1fr; align-items: start; }
    .model-hero { grid-template-columns: 1fr 1.15fr; align-items: end; }
    .big-readout { grid-template-columns: 1fr 1fr; }
    .listings { grid-template-columns: 1fr auto; }
    .model-grid { grid-template-columns: minmax(0, 1fr) 360px; }
    .model-side { position: sticky; top: 84px; }
    .charger-layout { grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); }
    .map { height: 640px; position: sticky; top: 84px; }
    .station-list { max-height: 640px; overflow-y: auto; padding-right: 4px; }
}

@media (min-width: 1100px) {
    .finder .grid { grid-template-columns: repeat(3, 1fr); }
    .grid { grid-template-columns: repeat(4, 1fr); }
    .big-readout { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .loading-icon { animation-duration: 2.4s; }
    .scope polyline { animation: none; stroke-dashoffset: 0; }
    .vcard, .btn { transition: none; }
}

/* Blazor's FocusOnNavigate focuses the h1 for screen readers; don't draw a ring for that. */
h1:focus, h1:focus-visible { outline: none; }
.model-hero, .hero, .page-head { min-width: 0; overflow-wrap: anywhere; }
main.wrap { overflow-x: clip; }

/* .wrap's padding shorthand would otherwise wipe out main's bottom spacing. */
main.wrap { padding-bottom: 72px; }
.calc-grid .field-check { min-height: 42px; }

/* ---------- Vehicle photos ---------- */

.vcard-photo {
    margin: -18px -18px 2px;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:
        radial-gradient(120% 90% at 30% 20%, rgba(96, 204, 194, 0.16), transparent 60%),
        #021613;
    border-bottom: 1px solid var(--line);
    display: grid;
    place-items: center;
}
.vcard-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.vcard:hover .vcard-photo img { transform: scale(1.03); }
.vcard-photo-empty { width: 44px; height: 44px; fill: rgba(96, 204, 194, 0.22); }

.model-photo { margin: 0; min-width: 0; }
.model-photo img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: #021613;
}
.model-photo figcaption { margin-top: 6px; font-size: 0.75rem; color: var(--muted); }
.model-photo figcaption a { color: var(--muted); }
.model-photo figcaption a:hover { color: var(--aqua); }

.compare-photo {
    display: block;
    width: 100%;
    max-width: 240px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 10px;
}

@media (min-width: 900px) {
    .model-hero:has(.model-photo) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; }
    .model-hero:has(.model-photo) .big-readout { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .vcard-photo img { transition: none; }
    .vcard:hover .vcard-photo img { transform: none; }
}
