*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --paper: #F6F5F0; --card: #FFFFFF; --ink: #1B2420; --soft: #5C6660; --line: #DDDCD3;
  --green: #1E5C43; --green-dark: #143F2E; --spark: #FFD84D;
  --result-bg: #10241B; --result-ink: #E9F5EE; --result-soft: #A9C9B8;
  --warn-bg: #FFF4D6; --warn-line: #E8C766;
}
body { font-family: 'Archivo', sans-serif; background: var(--paper); color: var(--ink); line-height: 1.55; }
.num { font-variant-numeric: tabular-nums; }
main { max-width: 1040px; margin: 0 auto; padding: 2.2rem 1.25rem 4rem; }
h1 { font-weight: 900; font-stretch: 112%; letter-spacing: -0.025em; line-height: 1.05; font-size: clamp(1.9rem, 4.5vw, 3rem); max-width: 21ch; }
.sub { color: var(--soft); margin-top: 0.7rem; max-width: 60ch; }

.notice { display: none; margin-top: 1.5rem; background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 8px; padding: 1rem 1.2rem; font-size: 0.92rem; }
.notice.show { display: block; }
.notice code { background: #fff; border: 1px solid var(--warn-line); border-radius: 4px; padding: 0.05rem 0.35rem; font-size: 0.85em; }

.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 2rem; }
@media (max-width: 800px) { .calc-grid { grid-template-columns: 1fr; } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.4rem; }
.panel h2, .result h2 { font-size: 0.95rem; font-weight: 800; margin-bottom: 1rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.3rem; }
.hint { font-weight: 400; color: var(--soft); }
.field select, .field input { width: 100%; font: inherit; padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: 6px; background: #FDFDFB; color: var(--ink); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }
select:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.source-line { font-size: 0.72rem; color: var(--soft); margin-top: 0.25rem; }
fieldset.ev-pick { border: none; }
fieldset.ev-pick legend { font-size: 0.8rem; font-weight: 600; margin-bottom: 0.3rem; }
.ev-row { display: grid; grid-template-columns: 1fr 2fr; gap: 0.6rem; margin-bottom: 0.5rem; }
label.mini { font-size: 0.72rem; font-weight: 500; color: var(--soft); margin-bottom: 0.15rem; }
.vehicle-note { font-size: 0.75rem; color: #7A5A00; background: var(--warn-bg); border-radius: 4px; padding: 0.35rem 0.5rem; margin-top: 0.4rem; display: none; }

.result { background: var(--result-bg); color: var(--result-ink); border-radius: 10px; padding: 1.4rem; display: flex; flex-direction: column; }
.result h2 { color: var(--result-soft); margin-bottom: 0.4rem; }
.big { font-weight: 900; font-size: clamp(2.6rem, 7vw, 4rem); line-height: 1; letter-spacing: -0.03em; }
.big small { font-size: 0.32em; font-weight: 600; letter-spacing: 0; color: var(--result-soft); }
.per { margin-top: 0.4rem; color: var(--result-soft); font-size: 0.9rem; }
.compare { margin-top: auto; padding-top: 1.2rem; border-top: 1px solid #2B4638; }
.row { display: flex; justify-content: space-between; font-size: 0.92rem; padding: 0.28rem 0; }
.row b { font-weight: 700; }
.save { margin-top: 0.6rem; background: var(--spark); color: var(--ink); font-weight: 800; border-radius: 6px; padding: 0.55rem 0.8rem; }
.method { font-size: 0.74rem; color: var(--result-soft); margin-top: 0.9rem; }

section.sources { margin-top: 3rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.4rem; }
section.sources h2 { font-weight: 900; font-size: 1.2rem; letter-spacing: -0.02em; margin-bottom: 0.8rem; }
.src-list { list-style: none; font-size: 0.88rem; }
.src-list li { padding: 0.55rem 0; border-top: 1px solid var(--line); }
.src-list li:first-child { border-top: none; }
.src-list a { color: var(--green); }
.src-list .when { color: var(--soft); font-size: 0.8rem; }

/* ---- shared site chrome ---- */
header.site { background: var(--card); border-bottom: 1px solid var(--line); }
.site-inner { max-width: 1040px; margin: 0 auto; padding: 0.9rem 1.25rem; display: flex; align-items: baseline; gap: 1rem; }
.brand { font-weight: 900; font-size: 1.35rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand span { color: var(--green); }
.tag { font-size: 0.72rem; color: var(--soft); }
@media (max-width: 620px) { .tag { display: none; } }
a.skip { position: absolute; left: -9999px; }
a.skip:focus { left: 1rem; top: 0.5rem; background: var(--card); padding: 0.5rem 0.9rem; border-radius: 6px; z-index: 10; }
.site-inner { flex-wrap: wrap; justify-content: space-between; }
.brand-wrap { display: flex; align-items: baseline; gap: 0.6rem; }
nav.site-nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
nav.site-nav a { font-size: 0.85rem; font-weight: 600; color: var(--ink); text-decoration: none; padding: 0.2rem 0; border-bottom: 2px solid transparent; }
nav.site-nav a:hover { border-bottom-color: var(--green); }
nav.site-nav a[aria-current="page"] { border-bottom-color: var(--green); }

.disclosure-bar { max-width: 1040px; margin: 0 auto; padding: 0.7rem 1.25rem 0; }
.disclosure-bar p { font-size: 0.75rem; color: var(--soft); border: 1px solid var(--line); background: var(--card); border-radius: 6px; padding: 0.5rem 0.8rem; }
.disclosure-bar a { color: var(--green); }

/* ---- article pages ---- */
.article { max-width: 700px; }
.article h1 { margin-bottom: 0.6rem; }
.article h2 { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.015em; margin: 2rem 0 0.5rem; }
.article p, .article li { font-size: 1rem; }
.article p { margin-bottom: 0.9rem; }
.article ul { margin: 0 0 1rem 1.1rem; }
.article li { margin-bottom: 0.4rem; }
.article a { color: var(--green); }
.lede { font-size: 1.1rem; color: var(--soft); }
.callout { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 8px; padding: 0.9rem 1.1rem; font-size: 0.92rem; margin: 1.2rem 0; }
.formula { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: 6px; padding: 0.9rem 1.1rem; font-weight: 600; }
.data-status { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 0.7rem 1rem; font-size: 0.9rem; margin-bottom: 1rem; }

/* ---- affiliate product block ---- */
.block { margin-top: 3.2rem; }
.block > h2 { font-weight: 900; letter-spacing: -0.02em; font-size: 1.45rem; margin-bottom: 0.3rem; }
.block > .why { font-size: 0.88rem; color: var(--soft); max-width: 62ch; margin-bottom: 1rem; }
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 800px) { .products { grid-template-columns: 1fr; } }
.product { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1.2rem; display: flex; flex-direction: column; position: relative; }
.product.pick { border: 2px solid var(--green); }
.pick-flag { position: absolute; top: -0.7rem; left: 1rem; background: var(--green); color: #fff; font-size: 0.68rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 999px; }
.product h3 { font-size: 1rem; font-weight: 800; }
.product .fit { color: var(--soft); font-size: 0.85rem; margin: 0.45rem 0 0.8rem; }
.spec-list { list-style: none; font-size: 0.82rem; margin-bottom: 1rem; }
.spec-list li { padding: 0.22rem 0; border-bottom: 1px dashed var(--line); display: flex; justify-content: space-between; gap: 0.6rem; }
.spec-list li:last-child { border-bottom: none; }
.spec-list .v { font-weight: 600; }
.buy-row { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.price { font-weight: 900; font-size: 1.15rem; }
.price small { display: block; font-size: 0.62rem; font-weight: 500; color: var(--soft); }
.btn { font: inherit; font-weight: 700; font-size: 0.85rem; text-decoration: none; border-radius: 6px; padding: 0.55rem 1rem; display: inline-block; background: var(--green); color: #fff; }
.btn:hover { background: var(--green-dark); }
.aff-mark { font-size: 0.62rem; color: var(--soft); margin-top: 0.4rem; }
.todo { background: var(--warn-bg); border: 1px dashed var(--warn-line); border-radius: 8px; padding: 0.8rem 1rem; font-size: 0.85rem; margin-bottom: 1rem; }

/* ---- finder ---- */
.weights-intro { font-size: 0.82rem; color: var(--soft); margin-bottom: 0.8rem; }
.weight-row { margin-bottom: 0.7rem; }
.weight-row label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.15rem; }
.weight-row .hint { font-weight: 400; color: var(--soft); font-size: 0.76rem; }
.weight-ctl { display: flex; align-items: center; gap: 0.7rem; }
.weight-ctl input[type=range] { flex: 1; accent-color: var(--green); }
.weight-ctl output { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.85rem; min-width: 3ch; text-align: right; }
.weights-total { font-size: 0.85rem; color: var(--soft); display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 0.7rem; }
.btn-reset { font: inherit; font-size: 0.78rem; font-weight: 600; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 0.3rem 0.7rem; cursor: pointer; color: var(--ink); }
.btn-reset:hover { border-color: var(--ink); }
.result-light { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.result-light h2 { color: var(--ink); }
.match { display: flex; gap: 0.9rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.match:last-of-type { border-bottom: none; }
.match-rank { font-weight: 900; font-size: 1.6rem; color: var(--green); line-height: 1; min-width: 1.4rem; }
.match-body h3 { font-size: 1.05rem; font-weight: 800; }
.match-score { font-size: 0.8rem; font-weight: 700; color: var(--green); margin: 0.15rem 0 0.5rem; }
.match-specs { list-style: none; font-size: 0.84rem; }
.match-specs li { padding: 0.1rem 0; color: var(--soft); }
.match-why { font-size: 0.8rem; margin-top: 0.5rem; font-weight: 600; }
.match-src { font-size: 0.74rem; color: var(--soft); margin-top: 0.2rem; }
.match-src a, .src-list a { color: var(--green); }
.match-foot { margin-top: 0.8rem; }
.muted { color: var(--soft); font-size: 0.88rem; }

.unchecked { color: #8A6D1F; font-style: italic; }
.field label.check { display: flex; align-items: flex-start; justify-content: flex-start; gap: 0.5rem; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.3rem; }
.field label.check input { width: auto; flex: 0 0 auto; margin-top: 0.15rem; accent-color: var(--green); }
.panel .callout { margin-top: 0; }

/* ---- footer ---- */
footer.site { border-top: 1px solid var(--line); margin-top: 4rem; background: var(--card); }
.foot-inner { max-width: 1040px; margin: 0 auto; padding: 1.6rem 1.25rem; font-size: 0.78rem; color: var(--soft); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.foot-inner a { color: var(--soft); text-decoration: none; margin-right: 0.9rem; }
.foot-inner a:hover { color: var(--ink); text-decoration: underline; }


/* ════════════════════════════════════════════════════════════════
   Light theme with nexusEVnews header (Oct 1, 2026)
   Light page for readability and trust; dark header and footer and
   cyan accent tie it to nexusEVnews. Overrides everything above.
   ════════════════════════════════════════════════════════════════ */
:root {
  color-scheme: light;
  --night: #0a0b0f;  --night2: #1a1d24;          /* nexusEVnews header */
  --accent: #00d4ff;                               /* nexusEVnews cyan: buttons and accents */
  --link: #00739e;                                 /* darker cyan, readable as text on white */
  --paper: #f6f5f1; --card: #ffffff; --ink: #15181d; --soft: #555d69; --line: #e2e1da;
  --green: var(--link); --green-dark: #005a7c; --spark: #f59e0b;
  --result-bg: #111318; --result-ink: #e8eaf0; --result-soft: #a7aebb;
  --warn-bg: #fff4d6; --warn-line: #e8c766;
}
body { font-family: 'DM Sans', sans-serif; background: var(--paper); color: var(--ink); }

/* type */
h1, .article h1 { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-stretch: normal; letter-spacing: 0.02em; line-height: 1.02; font-size: clamp(2.6rem, 6vw, 4rem); max-width: 20ch; }
.article h2, section.sources h2, .block > h2 { font-family: 'Bebas Neue', sans-serif; font-weight: 400; letter-spacing: 0.03em; font-size: 1.6rem; }
.big, .match-rank { font-family: 'Bebas Neue', sans-serif; font-weight: 400; letter-spacing: 0.01em; }
.big { font-size: clamp(3rem, 8vw, 4.8rem); }
.big small { font-family: 'DM Sans', sans-serif; }
.match-rank { font-size: 2.1rem; color: var(--link); }
.source-line, .method, .match-src, .src-list .when { font-family: 'DM Mono', monospace; font-size: 0.68rem; letter-spacing: 0.02em; }
.sub { font-size: 1.08rem; margin-top: 0.6rem; }
main { max-width: 1100px; }

/* the source line under each tool's headline */
.data-line { margin-top: 0.9rem; font-size: 0.86rem; color: var(--soft); max-width: 70ch; padding-left: 0.8rem; border-left: 3px solid var(--accent); }
.data-line strong { color: var(--ink); font-weight: 600; }
.data-line a { color: var(--link); }
.calc-grid { margin-top: 1.6rem; }

/* dark header, matching nexusEVnews */
header.site { position: sticky; top: 0; z-index: 100; background: rgba(10,11,15,0.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid #1f2330; }
.site-inner { max-width: 1100px; min-height: 62px; align-items: center; padding: 0.6rem 1.5rem; }
.brand-wrap { flex-direction: column; align-items: flex-start; gap: 0.15rem; }
.brand { font-family: 'Bebas Neue', sans-serif; font-weight: 400; font-size: 1.85rem; letter-spacing: 0.06em; line-height: 1; color: #e8eaf0; }
.brand span { color: var(--accent); }
.tag { font-family: 'DM Mono', monospace; font-size: 0.52rem; letter-spacing: 0.14em; text-transform: uppercase; color: #8b929e; }
nav.site-nav { gap: 0.2rem; align-items: center; }
nav.site-nav a { font-size: 0.76rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: #9aa1ad; padding: 0.35rem 0.7rem; border-radius: 4px; border-bottom: none; transition: color 0.2s, background 0.2s; }
nav.site-nav a:hover { color: #fff; background: var(--night2); }
nav.site-nav a[aria-current="page"] { color: var(--accent); background: rgba(0,212,255,0.1); }
header.site a:focus-visible { outline-color: var(--accent); }

/* controls */
.field select, .field input { background: #fff; color: var(--ink); border-color: #d3d2ca; }
.btn, .pick-flag { background: var(--accent); color: #000; }
.btn:hover { background: #00b8de; }
.save { color: #000; }
.weight-ctl input[type=range], .field label.check input { accent-color: var(--link); }
.result a { color: var(--accent); }
.result { border: none; }
.compare { border-top-color: #2a2f3b; }
.vehicle-note { color: #7a5a00; }
.unchecked { color: #8a6d1f; }

/* dark footer bookends the page, like the header */
footer.site { background: var(--night); border-top: 1px solid #1f2330; margin-top: 4rem; }
.foot-inner { max-width: 1100px; font-family: 'DM Mono', monospace; font-size: 0.64rem; letter-spacing: 0.06em; line-height: 1.8; color: #8b929e; }
.foot-inner a { color: var(--accent); }
.foot-inner a:hover { color: var(--accent); }
.foot-note { flex-basis: 100%; }

@media (max-width: 700px) { nav.site-nav a { padding: 0.3rem 0.45rem; font-size: 0.7rem; } }
@media (prefers-reduced-motion: reduce) { nav.site-nav a { transition: none; } }
.result-light a, .result-light .match-src a { color: var(--link); }
