/* ToolBatteryFit main stylesheet. Tokens come from the site spec (plan/07-DESIGN.md). Mobile first. */
:root {
	--primary: #2c3440;
	--accent: #4fb0c6;
	--bg: #f5f6f8;
	--ink: #181c22;
	--muted: color-mix(in srgb, var(--ink) 62%, var(--bg));
	--line: color-mix(in srgb, var(--ink) 16%, var(--bg));
	--panel: color-mix(in srgb, var(--primary) 5%, #ffffff);
	--warn: #9a3b00;
	--warn-bg: #fff4ea;
	--ok: #1d6b3a;
	--radius: 10px;
	--font-head: "Rajdhani", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--w: 72rem;
	--prose: 44rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--font-body); }
img { max-width: 100%; height: auto; }
a { color: var(--primary); text-underline-offset: .15em; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 4vw, 2.6rem); margin: .4em 0 .3em; }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin: 1.8em 0 .5em; }
h3 { font-size: 1.15rem; margin: 1.4em 0 .4em; }
.wrap { max-width: var(--w); margin: 0 auto; padding: 0 1.1rem; }
.prose { max-width: var(--prose); }
.small { font-size: .875rem; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: #fff; padding: .5rem 1rem; z-index: 10; }

/* Header / footer */
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; flex-wrap: wrap; }
.brand { font: 700 1.15rem var(--font-head); color: var(--ink); text-decoration: none; }
.nav ul { list-style: none; display: flex; gap: 1.1rem; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; }
.site-footer { margin-top: 4rem; border-top: 1px solid var(--line); background: #fff; padding: 2rem 0 1rem; }
.footer-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 2fr 1fr; } }

/* Hero + tools */
.hero { background: linear-gradient(180deg, var(--panel), var(--bg)); padding: 1.5rem 0 2rem; border-bottom: 1px solid var(--line); }
.lede { font-size: 1.15rem; max-width: var(--prose); color: var(--muted); }
.tool { background: #fff; border: 2px solid var(--primary); border-radius: var(--radius); padding: 1rem 1.1rem 1.2rem; margin: 1rem 0; max-width: 44rem; }
.tool-title { margin: 0 0 .6rem; font: 700 1.1rem var(--font-head); }
.finder-input, .calc input, .calc select { width: 100%; font: inherit; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.finder-input:focus, .calc input:focus, .calc select:focus { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); border-color: var(--accent); }
.finder-list { list-style: none; margin: .4rem 0 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; max-height: 20rem; overflow: auto; }
.finder-list li a { display: block; padding: .55rem .8rem; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.finder-list li a:hover, .finder-list li a[aria-selected="true"] { background: var(--panel); }
.finder-list .grp { font-size: .8rem; color: var(--muted); margin-left: .4rem; }
.calc-fields { display: grid; gap: .8rem; grid-template-columns: 1fr; }
@media (min-width: 36rem) { .calc-fields { grid-template-columns: 1fr 1fr; } }
.calc-field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .25rem; }
.unit { color: var(--muted); font-weight: 400; }
.calc-out { margin: 1rem 0 .4rem; font-size: 1.2rem; }
.calc-value { font: 800 1.6rem var(--font-head); color: var(--primary); }
.calc-method summary, .quote summary { cursor: pointer; color: var(--primary); font-size: .9rem; }
.trust { margin-top: .6rem; }

/* Page */
.page-head .answer { font-size: 1.15rem; max-width: var(--prose); border: 2px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; background: #fff; }
.checked { font-size: .875rem; color: var(--muted); }
.crumbs, .rank-math-breadcrumb { font-size: .875rem; color: var(--muted); margin-top: 1rem; }
.blk { margin: 1.6rem 0; }
.intro { color: var(--muted); max-width: var(--prose); }
.src { font-size: .82rem; color: var(--muted); }
.quote blockquote { margin: .4rem 0; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: .92rem; }
.facts { display: grid; gap: .6rem; margin: 0; }
.fact { display: grid; grid-template-columns: 1fr; gap: .2rem; border: 1px solid var(--line); border-radius: 8px; padding: .7rem .9rem; background: #fff; }
.fact dt { font-weight: 600; color: var(--muted); font-size: .9rem; }
.fact dd { margin: 0; }
@media (min-width: 40rem) { .fact { grid-template-columns: 14rem 1fr; } }
.compat { list-style: none; padding: 0; display: grid; gap: .6rem; }
.compat-item { border: 1px solid var(--line); border-radius: 8px; padding: .7rem .9rem; background: #fff; }
.compat-name { font-weight: 700; }
.compat-note { margin: .25rem 0; }
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: .1rem .45rem; border-radius: 999px; border: 1px solid var(--line); margin-left: .3rem; color: var(--muted); }
.badge-warn { border-color: var(--warn); color: var(--warn); background: var(--warn-bg); }
.steps { padding-left: 1.3rem; max-width: var(--prose); }
.steps li { margin: .35rem 0; }
.code-head { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.code-head h2 { margin: 0; }
.code-chip { font: 800 1.4rem/1 var(--font-head); padding: .45rem .7rem; border: 2px solid var(--ink); border-radius: 8px; background: #fff; }
.code-meaning { font-size: 1.1rem; max-width: var(--prose); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--panel); font-weight: 700; }
.table-note { font-size: .9rem; color: var(--muted); }

/* Notes: full-border labelled cards. Never a left-rule callout (owner rule). */
.note { border: 2px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; background: #fff; max-width: var(--prose); margin: 1rem 0; }
.note-label { margin: 0 0 .25rem; font: 700 .8rem var(--font-head); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.note p:last-child { margin-bottom: 0; }
.note-warn { border-color: var(--warn); background: var(--warn-bg); }
.note-warn .note-label { color: var(--warn); }
.note-tip { border-color: var(--primary); }
.note-tip .note-label { color: var(--primary); }

/* Buy box */
.disclosure { font-size: .82rem; color: var(--muted); }
.buybox { border: 2px solid var(--line); border-radius: var(--radius); padding: .8rem; background: #fff; display: grid; gap: .8rem; max-width: var(--prose); }
.bb-reason { margin: 0; color: var(--muted); font-size: .92rem; }
.bb-item { display: grid; grid-template-columns: 90px 1fr; gap: .8rem; align-items: center; }
.bb-item img { width: 90px; height: 90px; object-fit: contain; }
.bb-title { margin: 0 0 .3rem; font-weight: 600; }
.bb-price { margin: 0 0 .4rem; font-weight: 700; }
.bb-asof { display: block; font-weight: 400; font-size: .75rem; color: var(--muted); }
.btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 700; padding: .55rem 1rem; border-radius: 8px; }
.btn:hover { color: #fff; filter: brightness(.95); }

/* Cards, FAQ, sources */
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); margin: 1rem 0; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 1rem; }
.card-kicker { margin: 0; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.card-title { margin: .3rem 0; font-size: 1.05rem; }
.card-title a { text-decoration: none; color: var(--ink); }
.card-text { margin: 0; font-size: .92rem; color: var(--muted); }
.faq details { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .9rem; background: #fff; margin: .5rem 0; max-width: var(--prose); }
.faq summary { font-weight: 600; cursor: pointer; }
.sources ol { padding-left: 1.3rem; font-size: .92rem; }
.empty { color: var(--muted); }

/* Video facade (YouTube loads only on click) */
.yt { position: relative; aspect-ratio: 16/9; background: #000; border-radius: var(--radius); overflow: hidden; max-width: var(--prose); cursor: pointer; }
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.yt button { position: absolute; inset: 0; margin: auto; width: 4.2rem; height: 3rem; border: 0; border-radius: 12px; background: #c00; color: #fff; font-size: 1.2rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Home tools: fit finder + charger-light picker */
.muted { color: var(--muted); }
.home-tools { display: grid; gap: 1rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 60rem) { .home-tools { grid-template-columns: 1.15fr 1fr; } .home-tools .tool { max-width: none; } }
.fitf-fields { display: grid; gap: .8rem; }
.fitf-field { position: relative; }
.fitf-field label, .lights-step { display: block; font-weight: 600; font-size: .95rem; margin: 0 0 .25rem; }
.finder-list .opt { display: block; width: 100%; text-align: left; font: inherit; background: #fff; border: 0; border-bottom: 1px solid var(--line); padding: .6rem .8rem; min-height: 44px; cursor: pointer; color: var(--ink); }
.finder-list .opt:hover, .finder-list .opt[aria-selected="true"] { background: var(--panel); }
.fit-result:not(:empty), .lights-result:not(:empty) { margin-top: 1rem; }
.fit-head { border-bottom: 1px solid var(--line); margin-bottom: .6rem; }
.fit-kicker { margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.fit-title { margin: .1rem 0 .5rem; font: 700 1.3rem var(--font-head); }
.fit-group { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.fit-gtitle { margin: 0 0 .3rem; font-weight: 700; }
.fit-names { list-style: none; margin: 0 0 .3rem; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem .8rem; }
.verdict { border: 2px solid var(--primary); border-radius: var(--radius); padding: .9rem 1rem; background: #fff; }
.verdict-head { margin: .2rem 0 .4rem; font: 700 1.35rem/1.25 var(--font-head); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.verdict-yes { color: var(--ok); }
.verdict-no { color: var(--warn); }
.verdict-unknown, .verdict-info { color: var(--primary); }
.verdict-why { margin: 0 0 .4rem; }
.light-meaning { font-size: 1.15rem; font-weight: 600; margin: .2rem 0; }
.steps-box { margin: .6rem 0; }
.steps-box summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 .9rem; }
.chip { font: 600 .95rem var(--font-body); min-height: 44px; padding: .45rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; text-align: left; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: #fff; }
.chip:focus-visible, .opt:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.chip-light { border-radius: var(--radius); font-weight: 500; font-size: .9rem; }
.dots { display: inline-flex; gap: .25rem; flex: none; }
.dot { width: .9rem; height: .9rem; border-radius: 50%; border: 1px solid rgba(0,0,0,.35); display: inline-block; }
.dot-red { background: #d7262b; } .dot-green { background: #1f9d48; } .dot-orange { background: #f08a00; }
.dot-yellow { background: #f4c20d; } .dot-white { background: #fff; } .dot-off { background: transparent; border-style: dashed; }
.dot-blink { animation: tlb-blink 1s steps(2, start) infinite; }
@keyframes tlb-blink { to { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .dot-blink { animation: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px currentColor; } }
