/* ════════════════════════════════════════════════════════════════
   Battery Atlas — design system
   Concept: "technical datasheet". Navy + energy green from the logo,
   fine rules, blueprint grid, numbers set in Space Grotesk.
   Tokens → components → pages. No framework, no build step.
   ════════════════════════════════════════════════════════════════ */

@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Space Grotesk"; src: url("/assets/fonts/space-grotesk-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF; }
@font-face { font-family: "Space Grotesk"; src: url("/assets/fonts/space-grotesk-latin-ext.woff2") format("woff2"); font-weight: 300 700; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113; }

:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --surface-3: #e3e9f1;
  --line: #d7dfea;
  --line-strong: #b9c6d8;
  --text: #0d1a2c;
  --text-2: #33445c;
  --muted: #5a6a80;
  --brand: #0b3f7f;
  --brand-strong: #072f61;
  --brand-soft: #e6eef9;
  --accent: #1d7d24;          /* text-safe green (≥4.5:1 on white) */
  --accent-fill: #2ba82b;     /* logo green for fills/indicators */
  --accent-soft: #e5f4e5;
  --warn: #8a5a00;
  --warn-soft: #fff4dc;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --demo: #9a3412;
  --demo-soft: #fff1e8;
  --focus: #2563eb;
  --grid: rgba(11, 63, 127, .055);
  --shadow-1: 0 1px 2px rgba(13, 26, 44, .06), 0 1px 1px rgba(13, 26, 44, .04);
  --shadow-2: 0 10px 30px -12px rgba(13, 26, 44, .22);
  --radius: 10px;
  --radius-lg: 16px;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #09111f; --surface: #0f1a2d; --surface-2: #14223a; --surface-3: #1a2b48; --line: #22355a; --line-strong: #31497a;
    --text: #e7eef8; --text-2: #c3d0e3; --muted: #93a6c2; --brand: #7fb2ff; --brand-strong: #a9cbff; --brand-soft: #132a4c;
    --accent: #6fd776; --accent-fill: #3cbf43; --accent-soft: #10321a; --warn: #f5c56b; --warn-soft: #2e2410; --danger: #ff8a80; --danger-soft: #3a1513;
    --demo: #ffad80; --demo-soft: #3a1d10; --focus: #7fb2ff; --grid: rgba(127, 178, 255, .06);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 14px 34px -12px rgba(0, 0, 0, .6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #09111f; --surface: #0f1a2d; --surface-2: #14223a; --surface-3: #1a2b48; --line: #22355a; --line-strong: #31497a;
  --text: #e7eef8; --text-2: #c3d0e3; --muted: #93a6c2; --brand: #7fb2ff; --brand-strong: #a9cbff; --brand-soft: #132a4c;
  --accent: #6fd776; --accent-fill: #3cbf43; --accent-soft: #10321a; --warn: #f5c56b; --warn-soft: #2e2410; --danger: #ff8a80; --danger-soft: #3a1513;
  --demo: #ffad80; --demo-soft: #3a1d10; --focus: #7fb2ff; --grid: rgba(127, 178, 255, .06);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4); --shadow-2: 0 14px 34px -12px rgba(0, 0, 0, .6); color-scheme: dark;
}

/* ── Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--font-body); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-strong); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; color: var(--text); font-weight: 600; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
small { font-size: .8em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-soft); }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-size: .95em; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.section { padding-block: clamp(32px, 5vw, 64px); }
.h-sub { font-size: .8rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-family: var(--font-body); font-weight: 600; margin: 28px 0 12px; }
.lead { font-size: clamp(1.02rem, .98rem + .3vw, 1.18rem); color: var(--text-2); max-width: 68ch; }
.eyebrow { font: 600 .74rem/1.2 var(--font-body); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 10px; display: inline-flex; align-items: center; gap: 6px; }
.eyebrow-accent { color: var(--accent); }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.ico { width: 20px; height: 20px; flex: none; }
.ico-sm { width: 16px; height: 16px; }
.ico-lg { width: 28px; height: 28px; }

/* ── Buttons & controls ───────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; font: 600 .95rem/1 var(--font-body); cursor: pointer; text-decoration: none; transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease); white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
:root[data-theme="dark"] .btn-primary { color: #071528; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #071528; } }
.btn-primary:hover:not([disabled]) { background: var(--brand-strong); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { min-height: 38px; padding: 8px 12px; font-size: .88rem; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.icon-btn, .tool-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; font: 600 .85rem var(--font-body); }
.tool-btn:hover, .icon-btn:hover { background: var(--surface-2); color: var(--text); }

label, .field-label { display: block; font-weight: 600; font-size: .88rem; color: var(--text-2); margin-bottom: 6px; }
.field { min-width: 0; }
input[type=text], input[type=search], input[type=email], input[type=number], input[type=password], input[type=url], input[type=date], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font: 400 1rem/1.4 var(--font-body); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); appearance: none; -webkit-appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235a6a80' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 38px; }
select:disabled, input:disabled { background-color: var(--surface-2); color: var(--muted); cursor: not-allowed; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
textarea { min-height: 120px; resize: vertical; }
.has-error input, .has-error select, .has-error textarea, input[aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .85rem; margin: 6px 0 0; min-height: 0; }
.field-error:empty { display: none; }
.hint { font-size: .85rem; color: var(--muted); margin: 6px 0 0; }
.opt { font-weight: 400; color: var(--muted); }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
.field-grid-4 { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.field-wide { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); }
.input-icon { position: relative; flex: 1; }
.input-icon > .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon input { padding-left: 44px; }
.input-unit { display: flex; }
.input-unit input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-unit .unit, .input-unit .unit-select { flex: none; width: auto; min-width: 64px; border: 1px solid var(--line-strong); border-left: 0; border-radius: 0 10px 10px 0; background-color: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; padding-inline: 12px; color: var(--text-2); font-weight: 600; font-size: .9rem; }
.input-unit .unit-select { padding-right: 32px; background-position: right 6px center; }

/* ── Header ───────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand img { width: 40px; height: auto; }
.brand-word { font: 700 1.25rem/1 var(--font-display); letter-spacing: -.03em; }
.bw-a { color: var(--brand); }
.bw-b { color: var(--accent-fill); }
.main-nav { margin-left: auto; }
.main-nav > ul { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.main-nav a, .menu-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--text-2); text-decoration: none; font: 500 .93rem var(--font-body); background: none; border: 0; cursor: pointer; }
.main-nav a:hover, .menu-btn:hover { color: var(--text); background: var(--surface-2); }
.main-nav a[aria-current="page"] { color: var(--brand); box-shadow: inset 0 -2px 0 var(--accent-fill); border-radius: 8px 8px 0 0; }
.has-menu { position: relative; }
.mega { position: absolute; top: calc(100% + 8px); left: -40px; width: 520px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); }
.mega[hidden] { display: none; }
.mega a { min-height: 48px; gap: 10px; }
.mega a .ico { color: var(--brand); }
.header-tools { display: flex; align-items: center; gap: 2px; }
.lang-switch { position: relative; }
.pop { position: absolute; right: 0; top: calc(100% + 6px); min-width: 160px; list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-2); }
.pop a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--text); }
.pop a:hover, .pop a[aria-current] { background: var(--surface-2); }
.ico-sun { display: none; }
:root[data-theme="dark"] .ico-sun { display: block; } :root[data-theme="dark"] .ico-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ico-sun { display: block; } :root:not([data-theme="light"]) .ico-moon { display: none; } }
.nav-toggle { display: none; }

@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .header-tools { margin-left: auto; }
  .main-nav { position: fixed; inset: 68px 0 auto 0; max-height: calc(100dvh - 68px); overflow: auto; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-2); padding: 12px var(--gutter) 20px; margin: 0; display: none; }
  .main-nav.is-open { display: block; }
  .main-nav > ul { flex-direction: column; align-items: stretch; }
  .main-nav a, .menu-btn { width: 100%; justify-content: space-between; min-height: 48px; }
  .mega { position: static; width: auto; grid-template-columns: 1fr; box-shadow: none; border: 0; padding: 0 0 0 8px; }
}

/* ── Breadcrumbs ──────────────────────────────────── */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 16px 0 0; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 4px; color: var(--line-strong); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }

/* ── Hero ─────────────────────────────────────────── */
.hero { position: relative; padding-block: clamp(32px, 6vw, 72px) clamp(28px, 5vw, 56px); border-bottom: 1px solid var(--line);
  background-color: var(--surface);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px; background-position: -1px -1px; }
.hero-sub { padding-block: clamp(24px, 4vw, 48px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.hero-copy h1 { max-width: 16ch; }
.hero-sub .hero-copy h1 { max-width: 22ch; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); }
.hero-points { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; color: var(--text-2); }
.hero-points li { display: flex; gap: 10px; align-items: center; }
.hero-points .ico { color: var(--accent); }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } .hero-copy h1 { max-width: 22ch; } }

/* ── Finder ───────────────────────────────────────── */
.finder { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); overflow: hidden; }
.panel .finder { box-shadow: none; border: 0; }
.finder-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.finder-tabs button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 10px; border: 0; background: none; color: var(--muted); font: 600 .92rem var(--font-body); cursor: pointer; border-bottom: 2px solid transparent; transition: color .15s, background .15s; }
.finder-tabs button:hover { color: var(--text); }
.finder-tabs button[aria-selected="true"] { color: var(--brand); background: var(--surface); border-bottom-color: var(--accent-fill); }
.finder-panel { padding: clamp(16px, 3vw, 24px); }
.quick-form { position: relative; display: flex; gap: 10px; }
.quick-form input { min-height: 52px; font-size: 1.02rem; }
.quick-form .btn { min-height: 52px; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-2); max-height: 340px; overflow: auto; }
.suggest a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--text); }
.suggest a:hover, .suggest a[aria-selected="true"] { background: var(--brand-soft); }
.or-sep { display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cat-picker { border: 0; padding: 0; margin: 0 0 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; margin: 0; min-height: 40px; padding: 6px 12px 6px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--text-2); font-weight: 500; font-size: .88rem; cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:hover { border-color: var(--brand); color: var(--text); }
.chip:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.chip:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.chip .ico { width: 18px; height: 18px; }
.field-action { display: flex; align-items: end; }
.vin-input { position: relative; }
.vin-input input { font-family: var(--font-mono); font-size: 1.15rem; letter-spacing: .14em; text-transform: uppercase; padding-right: 64px; min-height: 52px; }
.vin-count { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 600 .8rem var(--font-mono); color: var(--muted); }
.vin-count.is-ok { color: var(--accent); }
.vin-form { display: grid; gap: 14px; }
.vin-form .btn { justify-self: start; }
.source-note { display: flex; gap: 6px; align-items: center; font-size: .83rem; color: var(--muted); margin: 0; }
.vin-result:not(:empty) { margin-top: 18px; }
.dims { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 12px 14px 0; margin: 0 0 16px; }
.dims legend { padding: 0 6px; display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 560px) { .quick-form { flex-direction: column; } .finder-tabs button span { font-size: .82rem; } .finder-tabs button .ico { display: none; } }

/* ── Panels, notices, badges ──────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(16px, 3vw, 28px); box-shadow: var(--shadow-1); }
.page-head { padding-top: clamp(20px, 3vw, 36px); padding-bottom: 20px; }
.page-head-tight { padding-bottom: 8px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--brand-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); }
.notice p { margin: 0; }
.notice-error { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.notice-error .ico { color: var(--danger); }
.notice-ok { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.notice-ok .ico { color: var(--accent); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; border-radius: 999px; font: 600 .76rem/1.4 var(--font-body); white-space: nowrap; border: 1px solid; }
.badge-ok { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.badge-demo { background: var(--demo-soft); color: var(--demo); border-color: color-mix(in srgb, var(--demo) 40%, transparent); }
.demo-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin: 16px 0; background: var(--demo-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--demo) 45%, transparent); border-left: 4px solid var(--demo); border-radius: 10px; }
.demo-banner > .ico { color: var(--demo); margin-top: 2px; }
.demo-inline { display: flex; gap: 8px; align-items: center; color: var(--demo); font-weight: 600; font-size: .9rem; margin: 12px 0 0; }
.txt-demo { color: var(--demo); }
.warn-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--text); font-size: .9rem; margin: 12px 0 0; }
.warn-note .ico { color: var(--warn); margin-top: 3px; }
.flag-note { display: inline-flex; gap: 6px; align-items: center; font-size: .88rem; font-weight: 600; color: var(--accent); margin: 10px 0 0; }
.empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 36px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); color: var(--muted); }
.empty .ico { width: 32px; height: 32px; }

/* ── Tech chips ───────────────────────────────────── */
.tech { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 6px; font: 700 .74rem/1.5 var(--font-body); letter-spacing: .04em; text-transform: uppercase; background: var(--surface-3); color: var(--text-2); }
.tech-agm { background: #e3ecfb; color: #0b3f7f; } .tech-efb { background: #e5f4e5; color: #1d6a23; } .tech-lifepo4, .tech-li-ion { background: #f0e8fb; color: #5b2a9a; } .tech-gel { background: #fdf0d9; color: #7a4a00; }
:root[data-theme="dark"] .tech { filter: brightness(.95); }

/* ── Data sheet ───────────────────────────────────── */
.sheets { display: grid; gap: 28px; padding-bottom: 48px; }
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); overflow: hidden; }
.sheets > * { min-width: 0; }
.sheet table { max-width: 100%; }
.sheet-head { display: grid; grid-template-columns: 200px 1fr; gap: 0; border-bottom: 1px solid var(--line); }
.sheet-illus { position: relative; display: grid; place-items: center; padding: 20px; color: var(--brand); border-right: 1px solid var(--line);
  background-color: var(--surface-2); background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 16px 16px; }
.illus { width: 120px; height: 120px; stroke-width: 1.1; }
.illus-cap { position: absolute; bottom: 8px; left: 10px; font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.sheet-id { padding: 20px 24px; }
.sheet-id h2 { font-size: clamp(1.3rem, 1rem + 1.2vw, 1.8rem); margin-bottom: 12px; }
.id-list { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; }
.id-list div { min-width: 0; }
.id-list dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.id-list dd { margin: 0; font-weight: 600; color: var(--text); }
@media (max-width: 680px) { .sheet-head { grid-template-columns: 1fr; } .sheet-illus { border-right: 0; border-bottom: 1px solid var(--line); padding: 14px; } .illus { width: 84px; height: 84px; } }
.rec { padding: 20px 24px 24px; border-top: 1px solid var(--line); }
.sheet > .rec:first-of-type, .sheet .demo-banner + .rec { border-top: 0; }
.wrap > .rec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); margin-top: 16px; }
.rec.is-demo { background-image: repeating-linear-gradient(-45deg, transparent 0 14px, color-mix(in srgb, var(--demo) 4%, transparent) 14px 28px); }
.sheet .demo-banner { margin: 16px 24px 0; }
.rec-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; }
.rec-title { font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem); margin: 0 0 8px; }
.rec-title .mono { font-family: var(--font-display); letter-spacing: -.01em; }
.rec-sub { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; color: var(--text-2); }
.qty { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: .9rem; }
.spec-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.spec { padding: 14px 16px; border-right: 1px solid var(--line); background: var(--surface); }
.spec:last-child { border-right: 0; }
.spec-l { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.spec-v { font: 600 clamp(1.4rem, 1.1rem + 1vw, 1.9rem)/1.1 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.spec-v small { font: 500 .8rem var(--font-body); color: var(--muted); margin-left: 4px; letter-spacing: 0; }
@media (max-width: 680px) { .spec-grid { grid-template-columns: 1fr 1fr; } .spec:nth-child(2) { border-right: 0; } .spec:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
.spec-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 0 24px; margin: 0; border-top: 1px solid var(--line); }
.spec-table > div { display: grid; grid-template-columns: 44% 1fr; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.spec-table dt { color: var(--muted); font-size: .88rem; }
.spec-table dd { margin: 0; font-weight: 500; font-size: .93rem; overflow-wrap: anywhere; }
.provenance { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 20px; margin-top: 18px; padding: 14px 16px; background: var(--surface-2); border-radius: 12px; font-size: .88rem; }
.prov-wide { grid-column: 1 / -1; }
.prov-l { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.prov-v { font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.meter { display: inline-block; width: 64px; height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--accent-fill); border-radius: inherit; }
@media (max-width: 760px) { .provenance { grid-template-columns: 1fr 1fr; } }
.rec-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.alts { margin-top: 22px; }
.alts-title { display: flex; gap: 8px; align-items: center; font-size: 1rem; margin-bottom: 10px; }
.alt-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.alt { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.4fr) auto auto; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface); }
.alt:last-child { border-bottom: 0; }
.alt-name { text-decoration: none; font-weight: 600; color: var(--text); }
.alt-name:hover { color: var(--brand); }
.alt-specs { color: var(--text-2); font-size: .9rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.alt-rel { font-size: .8rem; color: var(--muted); }
.alt-ad { padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
@media (max-width: 680px) { .alt { grid-template-columns: 1fr auto; } .alt-specs { grid-column: 1 / -1; order: 3; } .alt-rel { display: none; } }
.year-nav, .variant-nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; }
.year-nav a, .variant-nav a { padding: 6px 12px; min-height: 36px; display: inline-flex; align-items: center; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; color: var(--text-2); font-size: .9rem; background: var(--surface); }
.year-nav a[aria-current], .variant-nav a[aria-current] { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.disclaimer-box { display: flex; gap: 12px; padding: 16px; border-radius: 12px; background: var(--surface-2); color: var(--text-2); font-size: .92rem; }
.disclaimer-box p { margin: 0; }

/* ── Tables & lists ───────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data-table th, .data-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); background: var(--surface-2); font-weight: 600; position: sticky; top: 0; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody th { font-weight: 500; }
.data-table a { text-decoration: none; }
.result-count { color: var(--muted); font-size: .9rem; }
.result-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.result-list li + li { border-top: 1px solid var(--line); }
.result-list a { display: flex; align-items: center; gap: 10px; padding: 14px 16px; min-height: 52px; text-decoration: none; color: var(--text); }
.result-list a:hover { background: var(--surface-2); }
.result-list a .ico { margin-left: auto; color: var(--muted); }
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.pager a { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text-2); background: var(--surface); }
.pager a[aria-current] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ── Home sections ────────────────────────────────── */
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 8px 24px; margin-bottom: 20px; }
.section-head p { color: var(--muted); margin: 0; max-width: 56ch; }
.type-grid, .calc-grid, .guide-grid, .model-grid, .brand-grid, .year-grid, .make-cloud { list-style: none; margin: 0; padding: 0; }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.type-card { position: relative; display: grid; gap: 6px; padding: 20px; min-height: 140px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); text-decoration: none; color: var(--text); transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease); }
.type-card:hover { border-color: var(--brand); box-shadow: var(--shadow-2); transform: translateY(-2px); color: var(--text); }
.type-card > .ico-lg { color: var(--brand); margin-bottom: 6px; }
.type-name { font: 600 1.08rem var(--font-display); }
.type-desc { color: var(--muted); font-size: .9rem; }
.type-arrow { position: absolute; right: 18px; top: 22px; color: var(--muted); transition: transform .18s var(--ease), color .18s; }
.type-card:hover .type-arrow { transform: translateX(3px); color: var(--accent); }
.type-card-alt { background: var(--surface-2); }
.band { background: var(--surface); border-block: 1px solid var(--line); padding-block: clamp(32px, 5vw, 64px); }
.trust { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px; align-items: start; }
.trust p { color: var(--text-2); }
.levels { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.levels li { display: grid; grid-template-columns: 128px 1fr; gap: 12px; align-items: baseline; font-size: .92rem; color: var(--text-2); }
.stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); margin: 8px 0 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stats div { padding: 16px 18px; border-right: 1px solid var(--line); }
.stats div:last-child { border-right: 0; }
.stats dt { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stats dd { margin: 4px 0 0; font: 600 1.8rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.trust .demo-inline { grid-column: 1 / -1; }
@media (max-width: 860px) { .trust { grid-template-columns: 1fr; } .stats { grid-template-columns: 1fr 1fr; } .stats div:nth-child(2) { border-right: 0; } .stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; margin-bottom: 20px; }
.calc-card { display: flex; gap: 12px; align-items: center; padding: 16px; min-height: 64px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--text); font-weight: 500; transition: border-color .15s; }
.calc-card:hover { border-color: var(--brand); color: var(--brand); }
.calc-card .ico { color: var(--accent); }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.guide-card { display: grid; gap: 8px; align-content: start; height: 100%; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); text-decoration: none; color: var(--text); transition: border-color .18s, box-shadow .18s; }
.guide-card:hover { border-color: var(--brand); box-shadow: var(--shadow-2); }
.guide-card > .ico { color: var(--brand); }
.guide-card h2, .guide-card h3 { font-size: 1.15rem; margin: 0; }
.guide-card p { color: var(--muted); margin: 0; font-size: .93rem; }
.know-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px 32px; margin-top: 16px; }
.know-grid h3 { font-size: 1.02rem; }
.know-grid p { color: var(--text-2); font-size: .95rem; }
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.help-grid .ico-lg { color: var(--brand); margin-bottom: 10px; }
.help-grid h2 { font-size: 1.1rem; }
.help-grid p { color: var(--text-2); font-size: .95rem; }

/* ── Hubs, models, brands ─────────────────────────── */
.hub-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; }
.hub-side, .calc-side, .article-side { display: grid; gap: 16px; align-content: start; }
.side-card { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.side-card .h-sub { margin-top: 0; }
.side-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.side-links a { display: flex; gap: 10px; align-items: center; padding: 9px 8px; min-height: 44px; border-radius: 8px; text-decoration: none; color: var(--text); font-size: .93rem; }
.side-links a:hover { background: var(--surface-2); color: var(--brand); }
.side-links .ico { color: var(--brand); }
.side-cta { display: grid; gap: 10px; justify-items: start; background: var(--brand-soft); border-color: transparent; }
.side-cta .ico-lg { color: var(--brand); }
.side-cta p { margin: 0; font-weight: 600; }
.prose .bullet { display: flex; gap: 10px; align-items: flex-start; }
.prose .bullet .ico { color: var(--accent); margin-top: 4px; }
.make-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.make-cloud a { display: inline-flex; gap: 6px; padding: 8px 14px; min-height: 40px; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; color: var(--text); }
.make-cloud a:hover { border-color: var(--brand); }
.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.model-card { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--text); }
.model-card:hover { border-color: var(--brand); }
.model-name { font: 600 1.05rem var(--font-display); }
.model-card .muted { font-size: .85rem; }
.year-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.year-chip { display: inline-grid; place-items: center; min-width: 72px; min-height: 48px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: 600 1.05rem var(--font-display); text-decoration: none; color: var(--text); }
.year-chip:hover { border-color: var(--brand); color: var(--brand); }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-bottom: 16px; }
.brand-card { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--text); }
.brand-card:hover { border-color: var(--brand); }
.brand-card > span:nth-child(2) { display: grid; flex: 1; }
.brand-card .muted { font-size: .85rem; }
.brand-initial { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font: 700 1.2rem var(--font-display); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filter-chips a { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; min-height: 40px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--text-2); background: var(--surface); font-size: .9rem; }
.filter-chips a[aria-current] { background: var(--brand); color: #fff; border-color: var(--brand); }
.filter-chips a[aria-current] .muted { color: rgba(255, 255, 255, .8); }
@media (max-width: 960px) { .hub-layout { grid-template-columns: 1fr; } }

/* ── Calculators ──────────────────────────────────── */
.calc-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.calc-row { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--text); }
.calc-row:hover { border-color: var(--brand); }
.calc-row > span:nth-child(2) { display: grid; gap: 2px; flex: 1; }
.calc-row .muted { font-size: .88rem; }
.calc-row > .ico { color: var(--muted); }
.calc-ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent); flex: none; }
.calc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; padding-bottom: 56px; }
.calc-main { display: grid; gap: 24px; align-content: start; min-width: 0; }
.calc-form .field-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
.field-row-w { grid-column: span 1; }
.result-panel { padding: 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent-fill); }
.result-title { display: flex; gap: 8px; align-items: center; font-size: 1.05rem; color: var(--accent); }
.result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.result-item { padding: 14px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 4px; }
.result-item.is-primary { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.ri-l { font-size: .82rem; color: var(--muted); }
.ri-v { font: 600 1.45rem/1.15 var(--font-display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ri-v small { font: 500 .85rem var(--font-body); color: var(--muted); }
.ri-n { font-size: .78rem; font-weight: 600; color: var(--warn); }
.steps { margin-top: 16px; }
.steps summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.steps ol { margin: 8px 0 0; padding-left: 22px; color: var(--text-2); font-size: .9rem; }
.formula { margin: 0 0 20px; padding: 16px 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; font: 500 .95rem/1.7 var(--font-mono); color: var(--text); white-space: pre-wrap; }
.explain h2 { font-size: 1.15rem; margin-top: 8px; }
.limits { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.limits li { display: flex; gap: 10px; align-items: flex-start; font-size: .94rem; color: var(--text-2); }
.limits .ico { color: var(--warn); margin-top: 4px; }
.concepts { padding: 22px; border-radius: var(--radius-lg); background: var(--surface-2); margin-top: 24px; }
.concepts h2 { font-size: 1.1rem; }
.concept-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 24px; margin: 0; }
.concept-grid dt { font-weight: 600; display: flex; gap: 6px; align-items: center; margin-bottom: 4px; }
.concept-grid dt .ico { color: var(--brand); }
.concept-grid dd { margin: 0; color: var(--text-2); font-size: .92rem; }
@media (max-width: 960px) { .calc-layout { grid-template-columns: 1fr; } }

/* ── Articles ─────────────────────────────────────── */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; padding-block: 24px 64px; }
.article-head { margin-bottom: 24px; }
.byline { color: var(--muted); font-size: .9rem; }
.prose { font-size: 1.05rem; line-height: 1.75; color: var(--text-2); max-width: 72ch; }
.prose h2 { margin-top: 1.8em; color: var(--text); }
.prose h3 { margin-top: 1.4em; color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .93rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose th { background: var(--surface-2); color: var(--text); }
.prose strong { color: var(--text); }
.prose code { font-family: var(--font-mono); font-size: .88em; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.toc ol { margin: 0; padding-left: 18px; font-size: .92rem; }
.toc li { margin-bottom: 6px; }
.sticky-ad { position: sticky; top: 92px; }
.more { margin-top: 32px; }
@media (max-width: 1000px) { .article-layout { grid-template-columns: 1fr; } .article-side { order: -1; } .sticky-ad { display: none; } }
.prose-block h2 { margin-bottom: 4px; }
.big-code { font: 700 clamp(4rem, 10vw, 7rem)/1 var(--font-display); color: var(--brand); margin: 0; letter-spacing: -.05em; }

/* ── Ads (separated from controls; reserved space limits CLS) ── */
.ad-slot { display: block; margin: 28px 0; padding-top: 6px; border-top: 1px solid var(--line); min-height: 120px; contain: layout; }
.ad-spaced { margin-block: 36px; }
.ad-label { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; }
.ad-preview-box { display: grid; place-items: center; min-height: 110px; border: 2px dashed var(--line-strong); border-radius: 10px; color: var(--muted); font: 600 .85rem var(--font-mono); text-align: center; padding: 12px; }
.alt-ad .ad-slot { margin: 0; border-top: 0; }

/* ── Footer ───────────────────────────────────────── */
.site-footer { margin-top: 48px; background: var(--surface); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-block: 48px 32px; }
.footer-brand p { color: var(--muted); font-size: .92rem; margin-top: 14px; }
.footer-note { display: flex; gap: 6px; align-items: flex-start; }
.footer-h { font: 600 .78rem var(--font-body); text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.site-footer ul a, .site-footer .link-btn { display: inline-flex; min-height: 36px; align-items: center; color: var(--text-2); text-decoration: none; font-size: .93rem; }
.site-footer ul a:hover, .site-footer .link-btn:hover { color: var(--brand); text-decoration: underline; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 18px 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; }
.footer-base p { margin: 0; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ── Consent & dialog ─────────────────────────────── */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; display: flex; justify-content: center; }
.consent[hidden] { display: none; }
.consent-inner { max-width: 760px; width: 100%; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-2); }
.consent-title { font-size: 1.1rem; }
.consent p { font-size: .92rem; color: var(--text-2); }
.consent-prefs { display: grid; gap: 10px; margin-bottom: 14px; font-size: .9rem; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.dialog { width: min(560px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-2); }
.dialog::backdrop { background: rgba(5, 12, 24, .55); }
.dialog .field { margin-bottom: 14px; }
.dialog-close-form { position: absolute; right: 12px; top: 12px; margin: 0; }
.form-status:empty { display: none; }
.form-status { padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.form-status.is-error { background: var(--danger-soft); color: var(--danger); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 70; padding: 12px 18px; border-radius: 10px; background: var(--text); color: var(--bg); font-weight: 600; transition: opacity .2s var(--ease), transform .2s var(--ease); pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ── Motion & print ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
@media print {
  .site-header, .site-footer, .crumbs, .consent, .ad-slot, .rec-actions, .variant-nav, .year-nav, .dialog, .skip-link, .hero, .finder { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .sheet, .rec { box-shadow: none; border-color: #999; break-inside: avoid; }
  .sheets { padding: 0; }
  a { color: #000; text-decoration: none; }
  .spec-v { font-size: 16pt; }
}

/* ════════════════════════════════════════════════════════════════
   v2 — visual layer built on the supplied illustrations and photos
   ════════════════════════════════════════════════════════════════ */
:root { --img-radius: 14px; --overlap: clamp(48px, 9vw, 150px); }

/* Home showcase: full-bleed hero illustration, panel overlaps its lower edge */
.showcase { position: relative; background: #dfeaf6; overflow: hidden; }
.showcase-img { width: 100%; height: clamp(240px, 46vw, 640px); object-fit: cover; object-position: 50% 30%; }
.showcase::after { content: ""; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; }
.hero-panel-wrap { position: relative; margin-top: calc(var(--overlap) * -1); z-index: 2; }
.hero-panel { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(20px, 3vw, 44px); align-items: start;
  padding: clamp(18px, 3vw, 36px); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 30px 60px -30px rgba(7, 47, 97, .35); }
.hero-panel .finder { box-shadow: none; }
.hero-panel h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.9rem); max-width: 16ch; }
@media (max-width: 960px) { .hero-panel { grid-template-columns: 1fr; } :root { --overlap: 40px; } }

/* Category photo cards */
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.photo-card { position: relative; display: grid; grid-template-rows: auto 1fr; height: 100%; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); text-decoration: none; color: var(--text); transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.photo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--brand); color: var(--text); }
.photo-card-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.photo-card-media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); transition: transform .5s var(--ease); }
.photo-card:hover .photo-card-media img { transform: scale(1.04); }
.photo-card-body { display: grid; gap: 4px; padding: 14px 44px 16px 16px; align-content: start; }
.photo-card .type-arrow { top: auto; bottom: 18px; right: 16px; }

/* Three ways */
.ways { background: var(--surface); border-block: 1px solid var(--line); }
.way-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.way { display: grid; grid-template-rows: auto 1fr; border-radius: var(--radius-lg); overflow: hidden; background: var(--bg); border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: box-shadow .2s, transform .2s var(--ease); }
.way:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); color: var(--text); }
.way-media { aspect-ratio: 4 / 3; overflow: hidden; }
.way-media img { width: 100%; height: 100%; object-fit: cover; }
.way-body { position: relative; display: grid; gap: 6px; padding: 30px 20px 20px; align-content: start; }
.way-body h3 { margin: 0; }
.way-body p { margin: 0; color: var(--text-2); font-size: .95rem; }
.way-ico { position: absolute; top: -24px; left: 20px; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--brand); color: #fff; box-shadow: var(--shadow-2); }
.way-link { display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; font-weight: 600; color: var(--brand); }
@media (max-width: 860px) { .way-grid { grid-template-columns: 1fr; } .way { grid-template-columns: 40% 1fr; grid-template-rows: none; } .way-media { aspect-ratio: auto; } .way-ico { position: static; width: 40px; height: 40px; } .way-body { padding: 16px; } }
@media (max-width: 480px) { .way { grid-template-columns: 1fr; } .way-media { aspect-ratio: 16 / 9; } }

/* Photo mosaic (real photographs) */
.mosaic { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.mosaic-item { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: var(--img-radius); overflow: hidden; text-decoration: none; }
.mosaic-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.mosaic-item:hover img { transform: scale(1.05); }
.mosaic-item span { position: absolute; inset: auto 0 0 0; padding: 34px 12px 12px; color: #fff; font-weight: 600; font-size: .95rem; background: linear-gradient(to top, rgba(4, 18, 40, .82), transparent); }
@media (max-width: 960px) { .mosaic { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Calculators feature */
.calc-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.calc-feature-media img { width: 100%; height: auto; border-radius: var(--radius-lg); border: 1px solid var(--line); }
.calc-grid-tight { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin: 18px 0; }
@media (max-width: 960px) { .calc-feature { grid-template-columns: 1fr; } }

/* Guides with images */
.guide-card-img { padding: 0; overflow: hidden; gap: 0; }
.guide-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.guide-media img { width: 100%; height: 100%; object-fit: cover; }
.guide-body { display: grid; gap: 8px; padding: 18px 20px 22px; }

/* CTA band */
.cta-band { background: var(--brand); color: #fff; margin-top: 24px; }
.cta-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); align-items: center; padding-block: clamp(28px, 5vw, 56px); }
.cta-media img { width: 100%; height: auto; border-radius: var(--radius-lg); }
.cta-copy h2 { color: #fff; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); }
.cta-copy p { color: rgba(255, 255, 255, .86); max-width: 52ch; font-size: 1.05rem; }
.cta-copy .btn-primary { background: #fff; color: #072f61; }
.cta-copy .btn-primary:hover { background: #e6eef9; color: #072f61; }
:root[data-theme="dark"] .cta-band { background: #0d2547; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cta-band { background: #0d2547; } }
@media (max-width: 860px) { .cta-grid { grid-template-columns: 1fr; } }
.site-footer { margin-top: 0; }

/* Hub hero: illustration as background, copy sits on its empty sky area */
.hub-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: #dfeaf6; }
.hub-hero-media { position: absolute; inset: 0; }
.hub-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
.hub-hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(245, 247, 250, .96) 0%, rgba(245, 247, 250, .88) 38%, rgba(245, 247, 250, .25) 70%, transparent 100%); }
:root[data-theme="dark"] .hub-hero-media::after { background: linear-gradient(90deg, rgba(9, 17, 31, .95) 0%, rgba(9, 17, 31, .86) 40%, rgba(9, 17, 31, .35) 72%, rgba(9, 17, 31, .15) 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hub-hero-media::after { background: linear-gradient(90deg, rgba(9, 17, 31, .95) 0%, rgba(9, 17, 31, .86) 40%, rgba(9, 17, 31, .35) 72%, rgba(9, 17, 31, .15) 100%); } }
.hub-hero-grid { position: relative; padding-block: clamp(32px, 5vw, 64px); }
.hub-hero-copy h1 { max-width: 20ch; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.7rem); }
@media (max-width: 960px) {
  .hub-hero-media { position: relative; height: 220px; }
  .hub-hero-media::after { background: linear-gradient(to bottom, transparent 55%, var(--bg)); }
  .hub-hero { background: var(--bg); }
  .hub-hero-grid { padding-top: 8px; }
}

/* Inner page hero: copy + framed illustration */
.page-hero { padding-block: clamp(20px, 3vw, 36px) 8px; }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.page-hero-media { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid var(--line); background: var(--surface-2); }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, 50% 50%); }
@media (max-width: 860px) { .page-hero-grid { grid-template-columns: 1fr; } .page-hero-media { order: -1; aspect-ratio: 21 / 9; } }

/* Data sheet illustration */
.sheet-head { grid-template-columns: 260px 1fr; }
.sheet-illus { padding: 0; background: var(--surface-2); min-height: 180px; }
.sheet-illus img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.illus-cap { z-index: 1; padding: 2px 8px; border-radius: 6px; background: rgba(4, 18, 40, .62); color: #fff; }
@media (max-width: 680px) { .sheet-head { grid-template-columns: 1fr; } .sheet-illus { min-height: 0; aspect-ratio: 16 / 9; } }

/* Misc */
.side-photo img { width: 100%; height: auto; border-radius: var(--radius-lg); border: 1px solid var(--line); }
.contact-head { display: flex; gap: 24px; align-items: center; justify-content: space-between; }
.contact-photo img { width: 160px; height: 160px; object-fit: cover; border-radius: 50%; border: 4px solid var(--surface); box-shadow: var(--shadow-2); }
@media (max-width: 560px) { .contact-photo { display: none; } }
.article-media img { width: 100%; height: auto; max-height: 320px; object-fit: cover; border-radius: var(--radius-lg); margin: 8px 0 12px; }
.article-media-wide img { max-height: 360px; }
.nf-media img { width: 220px; height: 220px; object-fit: cover; border-radius: 50%; margin: 0 auto 8px; }
@media (prefers-reduced-motion: reduce) { .photo-card:hover .photo-card-media img, .mosaic-item:hover img { transform: none; } }
@media print { .showcase, .cta-band, .hub-hero-media, .page-hero-media, .sheet-illus { display: none !important; } .hero-panel-wrap { margin: 0; } }
@media (max-width: 560px) {
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .photo-card-body { padding: 10px 12px 12px; }
  .photo-card .type-desc, .photo-card .type-arrow { display: none; }
  .photo-card .type-name { font-size: .95rem; }
}

/* ════════ v3 — unified results: tiers, fit checks, comparator, explanation ════════ */
.rec-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.badge-tier { font-size: .78rem; }
.sheet-tier { margin: 10px 0 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .9rem; }
.sheet-note { margin: 16px 24px 0; }
.cmp-pick { display: inline-flex; gap: 6px; align-items: center; margin: 0; font-weight: 500; font-size: .85rem; color: var(--text-2); cursor: pointer; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.cmp-pick input, .eq-table input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--brand); }
.fit-block { display: grid; gap: 6px; margin-top: 14px; }
.fit-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fit { display: inline-flex; gap: 4px; align-items: center; padding: 2px 8px; border-radius: 6px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.fit-pass { background: var(--accent-soft); color: var(--accent); }
.fit-fail { background: var(--danger-soft); color: var(--danger); }
.fit-unknown { background: var(--warn-soft); color: var(--warn); }
.fit-notes { margin: 4px 0 0; font-size: .8rem; color: var(--muted); }
.eq-table td, .eq-table th { vertical-align: top; }
.eq-table .fit-chips { flex-direction: column; align-items: flex-start; gap: 4px; }
.x-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(18px, 3vw, 28px); }
.x-section > h2 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 1.3rem; }
.x-section > h2 .ico { color: var(--brand); }
.cmp-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.cmp-table th[scope=row] { color: var(--muted); font-weight: 500; white-space: nowrap; }
.cmp-table tr.cmp-diff td { background: color-mix(in srgb, var(--warn-soft) 70%, transparent); font-weight: 600; }
.ai-section { border-left: 4px solid var(--accent-fill); }
.ai-disclaimer { font-size: .88rem; color: var(--muted); max-width: 80ch; }
.ai-h { display: flex; gap: 8px; align-items: center; font-size: 1rem; margin: 18px 0 8px; }
.ai-h .ico { color: var(--brand); }
.ai-list { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; color: var(--text-2); max-width: 80ch; }
.ai-verified li::marker { color: var(--accent-fill); }
.ai-cmp { display: grid; gap: 10px; margin: 0; }
.ai-cmp div { display: grid; grid-template-columns: minmax(110px, 180px) 1fr; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.ai-cmp dd { margin: 0; color: var(--text-2); }
.ai-uncertain { margin-top: 16px; padding: 12px 16px; border-radius: 10px; background: var(--warn-soft); }
.ai-uncertain .ai-h { margin-top: 0; }
.ai-meta { margin: 16px 0 0; font-size: .8rem; color: var(--muted); }
.ai-loading { display: flex; gap: 10px; align-items: center; color: var(--muted); min-height: 120px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 28px; }
.mt-grid h3 { font-size: 1rem; }
.mt-grid ul { margin: 0; padding-left: 1.1em; color: var(--text-2); display: grid; gap: 4px; font-size: .95rem; }
.mt-grid p { color: var(--text-2); font-size: .95rem; }
.mt-tech { display: flex; gap: 10px; align-items: baseline; margin: 12px 0 0; color: var(--text-2); font-size: .95rem; }
.faq-list { display: grid; gap: 8px; }
.faq { border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; background: var(--bg); }
.faq summary { cursor: pointer; font-weight: 600; min-height: 48px; display: flex; align-items: center; }
.faq p { color: var(--text-2); margin: 0 0 12px; }
.identify { margin-top: 18px; border-top: 1px dashed var(--line-strong); padding-top: 12px; }
.identify summary { cursor: pointer; display: inline-flex; gap: 6px; align-items: center; color: var(--brand); font-weight: 600; font-size: .92rem; min-height: 40px; }
.identify .field-grid { margin-top: 10px; }
.idf-card h3 { margin-bottom: 6px; }
.small { font-size: .82rem; }
@media (max-width: 680px) { .ai-cmp div { grid-template-columns: 1fr; gap: 4px; } .rec-badges { justify-content: flex-start; } }
@media print { .comparator, .identify, .cmp-pick, .eq-table td:first-child, .eq-table th:first-child { display: none !important; } }

/* v3 — answer-first summary (only confirmed data) */
.answer-box { margin-top: 18px; padding: 16px 18px; border: 1px solid var(--line); border-left: 4px solid var(--accent-fill); border-radius: 12px; background: var(--surface); max-width: 72ch; margin-bottom: 8px; }
.answer-h { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.answer-box ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.answer-box li { font-size: 1.02rem; line-height: 1.55; color: var(--text); }
.answer-meta { display: block; margin-top: 2px; font-size: .82rem; color: var(--muted); }
/* touch target for compare checkboxes inside the equivalents table */
.eq-table td:first-child { min-width: 44px; }
.eq-table td:first-child input { margin: 13px; }
.cmp-pick:focus-within, .eq-table input:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.credit { white-space: nowrap; }
.credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.credit a:hover { color: var(--brand); }
.site-footer .link-btn { padding: 0; text-align: left; font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.ad-preview-off .ad-preview-box { opacity: .55; border-style: dotted; } .ad-why { color: var(--danger, #b42318); }
