/* Levion. Apple-like: white and light grey fields, one black chapter, blue for actions.
   The battery data keeps its own meaning: red for the weak block, green once balanced. */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --line: #d2d2d7;
  --track: #e8e8ed;
  --blue: #0071e3;
  --link: #0066cc;
  --red: #ff3b30;
  --red-ink: #d70015;
  --green: #34c759;
  --green-ink: #248a3d;
  --gray-bar: #a1a1a6;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --nav: 52px;
  --m: clamp(20px, 4vw, 40px);
  --max: 1080px;
  --wide: 1240px;
  --gap: clamp(12px, 1.6vw, 20px);
  --section: clamp(88px, 11vw, 160px);
  --r-lg: 28px;
  --r-md: 18px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--nav); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px / 1.47 var(--font);
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
img, video { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
b { font-weight: 600; color: var(--ink); }
::selection { background: color-mix(in oklab, var(--blue) 22%, transparent); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
[hidden] { display: none !important; }
html.lock, html:has(dialog[open]) { overflow: hidden; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } /* taste-skill-ignore */
.wrap { width: min(var(--max), 100% - 2 * var(--m)); margin-inline: auto; }
.wrap-wide { width: min(var(--wide), 100% - 2 * var(--m)); margin-inline: auto; }

section:not(.story) { padding-block: var(--section); }
.alt { background: var(--bg-alt); }
.dark { background: #000; color: #f5f5f7; --ink: #f5f5f7; --ink-2: #a1a1a6; --line: #424245; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5.4vw, 4.75rem); line-height: 1.05; letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.5rem); line-height: 1.07; letter-spacing: -0.028em; }
h2 span { color: var(--ink-2); }
h3 { font-size: clamp(1.375rem, 2vw, 1.75rem); line-height: 1.14; letter-spacing: -0.02em; }
.sub { font-size: clamp(1.1875rem, 1rem + 0.6vw, 1.5rem); line-height: 1.33; letter-spacing: -0.016em; color: var(--ink-2); max-width: 34em; }
.fine { font-size: 0.875rem; line-height: 1.43; color: var(--ink-2); }
.sec-head { display: grid; gap: 18px; margin-bottom: clamp(40px, 5vw, 64px); max-width: 52rem; }

/* ---------- actions ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 24px;
  border-radius: 980px;
  background: var(--blue);
  color: #fff;
  font: 500 1.0625rem / 1.2 var(--font);
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background-color 0.2s, transform 0.2s var(--ease);
}
.pill:hover { background: #0077ed; }
.pill:active { transform: scale(0.97); }
.pill-sm { min-height: 32px; padding: 6px 16px; font-size: 0.875rem; }
.more { color: var(--link); font-size: 1.0625rem; }
.more::after { content: "\00a0›"; }
.more:hover { text-decoration: underline; }
.dark .more { color: #2997ff; }

/* ---------- navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--nav);
  background: rgba(251, 251, 253, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: background-color 0.3s, border-color 0.3s;
}
.nav-in { height: 100%; width: min(var(--max), 100% - 2 * var(--m)); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { font: 600 1.125rem / 1 var(--display); letter-spacing: -0.02em; transition: color 0.3s; }
.nav nav { display: flex; gap: clamp(16px, 2.6vw, 36px); font-size: 0.8125rem; }
.nav nav a { color: color-mix(in oklab, var(--ink) 80%, transparent); transition: color 0.2s; }
.nav nav a:hover { color: var(--ink); }
.menu-btn { display: none; place-content: center; gap: 6px; width: 44px; height: 44px; margin-right: -12px; padding: 0; border: 0; background: none; cursor: pointer; }
.menu-btn span { display: block; width: 18px; height: 1.5px; border-radius: 1px; background: var(--ink); transition: transform 0.4s var(--out), background-color 0.3s; }
.nav.open .menu-btn span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav.open .menu-btn span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
/* over the black chapter the bar turns dark, as on apple.com */
.nav.on-dark:not(.open) { background: rgba(22, 22, 23, 0.8); border-bottom-color: rgba(255, 255, 255, 0.1); }
.nav.on-dark:not(.open) .logo { color: #f5f5f7; }
.nav.on-dark:not(.open) nav a { color: rgba(245, 245, 247, 0.8); }
.nav.on-dark:not(.open) nav a:hover { color: #f5f5f7; }
.nav.on-dark:not(.open) .menu-btn span { background: #f5f5f7; }

/* a thin line under the bar when there is a battery to sell */
.ribbon { padding: 12px var(--m); background: var(--bg-alt); text-align: center; font-size: 0.875rem; line-height: 1.4; }
.ribbon .more { font-size: inherit; }

/* ---------- the story: one pinned repair ---------- */
@property --w { syntax: "<number>"; inherits: true; initial-value: 0; }
.story {
  --e: 0;
  --bar: color-mix(in oklab, var(--green) calc(var(--e) * 100%), var(--gray-bar));
  height: 210svh;
}
.stage {
  position: sticky;
  top: var(--nav);
  height: calc(100svh - var(--nav));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(22px, 4svh, 48px);
  padding-block: clamp(14px, 3svh, 40px);
  overflow: clip;
}
.intro { width: min(var(--max), 100% - 2 * var(--m)); margin-inline: auto; display: grid; justify-items: center; gap: clamp(12px, 2svh, 22px); text-align: center; }
.caption { display: grid; max-width: 34em; min-height: 2.7em; font-size: clamp(1.0625rem, 0.95rem + 0.55vw, 1.5rem); line-height: 1.33; letter-spacing: -0.016em; color: var(--ink-2); }
.caption span {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s, transform 0.6s var(--out);
}
.story[data-s="0"] .s0, .story[data-s="1"] .s1, .story[data-s="2"] .s2, .story[data-s="3"] .s3 { opacity: 1; transform: none; }
.ctas { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 28px; }
/* a live status, like an "available" dot: the nearest free date from config.js */
.free-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 980px; background: var(--bg-alt); font-size: 0.875rem; font-weight: 500; transition: background-color 0.2s; }
.free-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in oklab, var(--green) 25%, transparent); }
.free-chip:hover { background: #e8e8ed; }

/* the voltage monitor: one bar per block, height = real voltage */
.monitor { width: min(var(--wide), 100% - 2 * var(--m)); margin-inline: auto; background: var(--bg-alt); border-radius: var(--r-lg); padding: clamp(18px, 2.6vw, 32px); }
.readout { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 18px; }
.readout dt { font-size: 0.875rem; font-weight: 500; color: var(--ink-2); }
.readout dd { font: 600 clamp(1.75rem, 3.4vw, 3rem) / 1 var(--display); letter-spacing: -0.03em; }
.readout b { color: color-mix(in oklab, var(--green-ink) calc(var(--e) * 100%), var(--red-ink)); }
.readout div:last-child { text-align: right; }

.bars {
  --bh: clamp(110px, 25svh, 300px);
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--cols, 96), minmax(0, 1fr));
  grid-auto-rows: var(--bh);
  column-gap: clamp(1px, 0.25vw, 4px);
}
.gl {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--bh) * var(--y));
  z-index: 2;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding-top: 2px;
  font-size: 0.6875rem;
  color: var(--ink-2);
  text-align: right;
  pointer-events: none;
}
.cell {
  --f: 0.97;
  position: relative;
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--track);
}
.cell::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: color-mix(in oklab, var(--blue) calc(var(--w) * 100%), var(--bar));
  transform-origin: bottom;
  transform: scaleY(var(--f));
}
.cell.weak { --f: 0.03; --bar: color-mix(in oklab, var(--green) calc(var(--e) * 100%), var(--red)); z-index: 3; cursor: pointer; }
/* boot: the bars rise one after another, then a highlight sweeps across */
.js .cell::after { animation: rise 1s var(--out) calc(var(--i) * 10ms) backwards; }
.js .cell { animation: sweep 1s ease-out calc(1.6s + var(--i) * 12ms); }
@keyframes rise { from { transform: scaleY(0); } }
@keyframes sweep { 0%, 100% { --w: 0; } 35% { --w: 0.8; } }

.flag {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 4;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: 980px;
  background: var(--red);
  color: #fff;
  font: 600 0.75rem / 1.3 var(--font);
  white-space: nowrap;
  pointer-events: none;
  transition: background-color 0.3s;
}
.story[data-s="3"] .flag { background: var(--green-ink); }
.tip {
  position: absolute;
  z-index: 5;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(29, 29, 31, 0.92);
  color: #fff;
  font: 500 0.8125rem / 1.2 var(--font);
  white-space: nowrap;
  transform: translate(-50%, -130%);
  pointer-events: none;
}
.cue { margin-top: 14px; text-align: center; font-size: 0.875rem; color: var(--ink-2); transition: opacity 0.4s; }
.cue.gone { opacity: 0; }

.story.static { height: auto; }
.story.static .stage { position: static; height: auto; min-height: calc(100svh - var(--nav)); }
.story.static .cue { display: none; }

/* ---------- highlights ---------- */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.tile { display: flex; flex-direction: column; gap: 12px; min-height: 230px; padding: clamp(24px, 2.6vw, 36px); border-radius: var(--r-lg); background: var(--bg); }
.tile p:not(.num) { font-size: 1.0625rem; color: var(--ink-2); max-width: 24em; }
.num { font: 600 clamp(2.5rem, 4.6vw, 4rem) / 1 var(--display); letter-spacing: -0.035em; }
.tile .num { margin-bottom: auto; }

/* ---------- the offer: a receipt that stays at zero whatever you decide ---------- */
.offer-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(48px, 6vw, 72px) var(--gap); align-items: center; }
.offer-text { grid-column: 1 / span 6; display: grid; justify-items: start; gap: 24px; }
.offer-text .more { font-size: inherit; white-space: nowrap; }
.bill-col { grid-column: 8 / -1; min-width: 0; }
.bill-q { margin-bottom: 12px; font-weight: 600; text-align: center; }
.bill-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; margin-bottom: 24px; }
.bill-seg button { padding: 8px 6px; font-size: 0.875rem; line-height: 1.15; }
/* the paper comes out of a slot: everything above the slot is clipped, nothing else */
.slot { position: relative; z-index: 1; height: 12px; border-radius: 6px; background: #1d1d1f; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.22); }
.paper-clip { margin-top: -4px; clip-path: inset(0 -60px -80px -60px); }
.paper { margin-inline: 14px; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.1)); transition: transform 1.6s var(--out); }
.js .printer:not(.printed) .paper { transform: translateY(-101%); }
.bill {
  padding: 28px clamp(20px, 2.2vw, 28px) 34px;
  background: #fff;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%;
}
.bill-brand { font: 600 1.25rem / 1.2 var(--display); letter-spacing: -0.02em; }
.bill-title { margin-bottom: 16px; font-size: 0.9375rem; color: var(--ink-2); }
.bill-rows > div { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; font-size: 0.9375rem; }
.bill-rows dt { flex: 1; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.bill-rows dt::after { content: ""; flex: 1; min-width: 12px; border-bottom: 1px dotted var(--gray-bar); }
.bill-rows dd { font-weight: 600; white-space: nowrap; }
.bill .vbars { --vh: 52px; margin-top: 16px; }
.bill-cap { margin: 8px 0 14px; font-size: 0.75rem; line-height: 1.35; color: var(--ink-2); }
.bill-total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--ink); font-weight: 600; }
.bill-total b { font: 600 clamp(3rem, 5.4vw, 4.25rem) / 1 var(--display); letter-spacing: -0.035em; color: var(--green-ink); }
.bill-note { min-height: calc(3 * 1.4em); margin-top: 12px; font-size: 0.9375rem; line-height: 1.4; color: var(--ink-2); }
.bill-end { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 0.75rem; color: var(--ink-2); text-align: center; }

/* ---------- proof ---------- */
.seg { display: inline-flex; padding: 4px; margin-bottom: clamp(32px, 4vw, 48px); border-radius: 980px; background: #e8e8ed; }
.seg button {
  min-height: 40px;
  padding: 10px 22px;
  border: 0;
  border-radius: 980px;
  background: transparent;
  color: var(--ink);
  font: 500 0.9375rem / 1 var(--font);
  cursor: pointer;
  transition: background-color 0.25s, box-shadow 0.25s;
}
.seg button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.proof-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: center; }
.phones { grid-column: 1 / span 5; display: grid; justify-items: center; gap: 32px; }
.phone { width: min(290px, 100%); }
.phone .screen { position: relative; aspect-ratio: 9 / 19.5; overflow: hidden; border: 10px solid #1d1d1f; border-radius: 46px; background: #000; }
.phone .screen::before { content: ""; position: absolute; top: 9px; left: 50%; z-index: 1; width: 32%; height: 22px; border-radius: 12px; background: #000; transform: translateX(-50%); }
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone figcaption { margin-top: 16px; text-align: center; font-size: 0.875rem; color: var(--ink-2); }
.js .proof[data-state="before"] .shot-after, .js .proof[data-state="after"] .shot-before { display: none; }
.js .phone .screen { animation: swap 0.5s var(--out); }
@keyframes swap { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.specs { grid-column: 7 / -1; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 18px 0; text-align: left; font-weight: 400; border-bottom: 1px solid var(--line); }
thead th { padding-top: 0; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
th:nth-child(n + 2), td:nth-child(n + 2) { text-align: right; padding-left: 16px; }
tbody td { font: 600 clamp(1.125rem, 1.6vw, 1.5rem) / 1.2 var(--display); letter-spacing: -0.02em; white-space: nowrap; }
.c-before, .c-after { transition: color 0.3s, opacity 0.3s; }
.proof[data-state="before"] .c-after, .proof[data-state="after"] .c-before { opacity: 0.35; }
.proof[data-state="before"] td.c-before { color: var(--red-ink); }
.proof[data-state="after"] td.c-after { color: var(--green-ink); }
.specs .fine { margin-top: 18px; }

/* ---------- services ---------- */
.cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap); }
.card { display: flex; flex-direction: column; gap: 12px; padding: 30px 24px; border-radius: var(--r-lg); background: var(--bg); }
.card h3 { font-size: clamp(1.25rem, 1.6vw, 1.5rem); }
.card p { color: var(--ink-2); }
.card .meta { margin-top: auto; padding-top: 8px; color: var(--ink); font-weight: 600; }
.glyph { position: relative; display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; align-items: end; height: 64px; margin-bottom: 16px; }
.glyph i { display: block; height: calc(var(--h) * 100%); border-radius: 2px; background: var(--gray-bar); }
.glyph i.r { background: var(--red); }
.glyph.ok i { background: var(--green); }
.glyph.board::before { content: ""; position: absolute; left: -4px; right: -4px; top: 0; height: 9px; border-radius: 3px; background: var(--blue); }
.glyph.water::after { content: ""; position: absolute; left: -4px; right: -4px; bottom: 0; height: 45%; border-radius: 3px; background: color-mix(in oklab, var(--blue) 30%, transparent); }
.glyph.lens::after { content: ""; position: absolute; right: 2px; top: -8px; width: 36px; height: 36px; border: 3px solid var(--blue); border-radius: 50%; background: color-mix(in oklab, var(--blue) 12%, transparent); }
.services-note { margin-top: 24px; }

/* ---------- buying a used Tesla: the check, shown on the same real pack ---------- */
.buy-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px); align-items: center; }
.buy-text { grid-column: 1 / span 6; display: grid; justify-items: start; gap: 24px; }
.buy-list { display: grid; gap: 14px; }
.buy-list li { position: relative; padding-left: 30px; color: var(--ink-2); }
.buy-list li::before { content: ""; position: absolute; left: 3px; top: 0.45em; width: 12px; height: 6px; border-left: 2px solid var(--green-ink); border-bottom: 2px solid var(--green-ink); transform: rotate(-45deg); }
.buy-price { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.buy-price p:last-child { color: var(--ink-2); line-height: 1.35; }
.verdicts { grid-column: 7 / -1; display: grid; gap: 14px; }
.verdict { display: grid; gap: 16px; padding: 22px 22px 20px; border-radius: var(--r-lg); background: var(--bg-alt); }
.verdict figcaption { display: grid; justify-items: start; gap: 10px; color: var(--ink-2); }
.verdict .badge { position: static; background: var(--bg); }
.badge[data-status="bad"]::before { background: var(--red); }
.vbars { --vh: 84px; display: grid; grid-template-columns: repeat(96, minmax(0, 1fr)); column-gap: 2px; align-items: end; height: var(--vh); }
.vbars i { display: block; height: calc(var(--f) * 100%); min-height: 3px; border-radius: 1px; background: var(--green); }
.vbars[data-set="before"] i { background: var(--gray-bar); }
.vbars i.low { position: relative; background: var(--red); }
.vbars i.low::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--vh); border-radius: 1px; background: color-mix(in oklab, var(--red) 22%, transparent); }

/* ---------- check: what the owner notices ---------- */
.check-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.check-head { grid-column: 1 / span 5; position: sticky; top: calc(var(--nav) + 40px); gap: 24px; }
.next { display: grid; gap: 14px; counter-reset: next; font-size: clamp(1.0625rem, 0.95rem + 0.4vw, 1.25rem); line-height: 1.33; letter-spacing: -0.016em; color: var(--ink-2); }
.next li { position: relative; padding-left: 38px; counter-increment: next; }
.next li::before { content: counter(next); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--bg-alt); color: var(--ink); font: 600 0.8125rem / 26px var(--font); letter-spacing: 0; text-align: center; }
.panel { grid-column: 7 / -1; display: grid; gap: 28px; padding: clamp(24px, 3.4vw, 44px); border-radius: var(--r-lg); background: var(--bg-alt); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.chips legend { padding: 0; margin-bottom: 14px; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 980px;
  background: var(--bg);
  font-size: 0.9375rem;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.chip:hover { border-color: #86868b; }
.chip:has(input:checked) { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); background: color-mix(in oklab, var(--blue) 6%, #fff); }
.chip:has(input:checked) span::before { content: "✓\00a0"; color: var(--blue); font-weight: 600; }
.chip:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 3px; }
.field { display: grid; gap: 8px; font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem / 1.3 var(--font);
}
.field textarea { resize: vertical; }
.field select {
  appearance: none;
  padding-right: 42px;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236e6e73' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center;
  cursor: pointer;
}
.field input::placeholder, .field textarea::placeholder { color: #86868b; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in oklab, var(--blue) 25%, transparent); }
.field input[aria-invalid="true"] { border-color: var(--red); }
.lead-body { display: grid; gap: 24px; min-width: 0; }
.chip-call { justify-self: start; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* a field for spam bots, people never see it */
.lead-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
button.pill { border: 0; cursor: pointer; }
.form-msg { font-size: 0.9375rem; color: var(--ink-2); }
.form-msg:empty { display: none; }
.form-msg.err { color: var(--red-ink); }
.lead-ok { display: grid; justify-items: start; gap: 14px; }
.lead-ok:focus { outline: none; }
.lead-ok h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.08; letter-spacing: -0.028em; }
.chat { display: grid; justify-items: end; gap: 10px; padding: 18px 20px 20px; border-radius: var(--r-md); background: var(--bg); }
.bubble { max-width: 90%; padding: 10px 14px; border-radius: 18px 18px 4px 18px; background: var(--blue); color: #fff; line-height: 1.4; overflow-wrap: anywhere; }
.panel .pill { justify-self: start; }

/* ---------- no queue, and a second opinion ---------- */
.promos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.promo { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: clamp(28px, 3.4vw, 48px); border-radius: var(--r-lg); background: var(--bg); }
.promo h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.08; letter-spacing: -0.028em; }
.promo-date { font: 600 clamp(2.25rem, 4.6vw, 3.75rem) / 1 var(--display); letter-spacing: -0.035em; color: var(--green-ink); }
.promo-lead { font: 600 clamp(1.25rem, 2vw, 1.5rem) / 1.2 var(--display); letter-spacing: -0.02em; }
.promo-text { max-width: 30em; color: var(--ink-2); }
.promo .chat { width: 100%; background: var(--bg-alt); }
.promo > .pill, .promo .lead-actions { margin-top: auto; }
.promo .fine { margin-top: -6px; }
/* a calendar leaf, like the Calendar app icon */
.cal { display: grid; justify-items: center; width: 88px; padding: 9px 0 11px; border-radius: 20px; background: var(--bg); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1); }
.cal-m { font: 600 0.75rem / 1.2 var(--font); color: var(--red-ink); }
.cal-d { font: 500 2.75rem / 1 var(--display); letter-spacing: -0.04em; }

/* ---------- how (the black chapter) ---------- */
.how-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.steps { grid-column: 1 / span 6; display: grid; gap: clamp(56px, 9svh, 110px); padding-block: clamp(0px, 5svh, 56px); counter-reset: step; }
.steps li { counter-increment: step; }
.steps h3 { margin-bottom: 10px; }
.steps h3::before { content: counter(step) ". "; color: var(--ink-2); }
.steps p { color: var(--ink-2); max-width: 30em; }
/* each step lights up as it passes the middle of the screen */
.steps.dim h3, .steps.dim h3::before, .steps.dim p { transition: color 0.6s; }
.steps.dim li:not(.lit) h3, .steps.dim li:not(.lit) p { color: #6e6e73; }
.steps.dim li:not(.lit) h3::before { color: #48484a; }
.video { grid-column: 8 / -1; justify-self: center; position: sticky; top: calc(var(--nav) + 40px); }
.video video { width: min(340px, 100%); aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--r-lg); background: #1d1d1f; }
.video figcaption { margin-top: 14px; text-align: center; font-size: 0.875rem; color: var(--ink-2); }

/* ---------- batteries for sale (drawn by stock.js from batteries.js) ---------- */
.filters { max-width: 100%; margin-bottom: 28px; overflow-x: auto; scrollbar-width: none; }
.filters button { flex: none; white-space: nowrap; }
.stock-list { container-type: inline-size; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--gap); }
.stock-list.one { grid-template-columns: minmax(0, 1fr); }
.bcard { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); background: var(--bg); }
.bcard-media { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; overflow: hidden; border: 0; background: var(--bg-alt); cursor: pointer; }
.bcard-photos { display: block; height: 100%; }
.bcard-photos img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--out); }
.bcard-photos .sub { display: none; }
.bcard-media:hover .main { transform: scale(1.03); }
.bph { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 5px; align-items: end; height: 100%; padding: 20% 16% 18%; }
.bph i { height: 100%; border-radius: 3px; background: color-mix(in oklab, var(--green) 55%, #fff); }
.badge { position: absolute; top: 14px; left: 14px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 980px; background: rgba(255, 255, 255, 0.92); color: var(--ink); font: 600 0.75rem / 1.2 var(--font); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.badge[data-status="reserved"]::before { background: #ff9f0a; }
.badge[data-status="sold"]::before { background: var(--gray-bar); }
.bcard-body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 24px 24px 28px; }
.bcard h3 span, .sheet-info h3 span { display: block; color: var(--ink-2); }
.bcard-meta { font-size: 0.9375rem; color: var(--ink-2); }
.bcard .spec-rows { display: none; }
.bcard-price { margin-top: auto; padding-top: 6px; font: 600 1.25rem / 1.2 var(--display); letter-spacing: -0.02em; }
.bcard-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 6px; }
button.more { padding: 0; border: 0; background: none; font: inherit; font-size: 1.0625rem; cursor: pointer; }
.bcard[data-status="sold"] .bcard-photos, .bcard[data-status="sold"] .bph { filter: grayscale(1); opacity: 0.55; }
.stock-empty { display: grid; justify-items: start; gap: 20px; padding: clamp(28px, 4vw, 48px); border-radius: var(--r-lg); background: var(--bg); }
.stock-empty p { max-width: 30em; font-size: clamp(1.1875rem, 1rem + 0.6vw, 1.5rem); line-height: 1.33; color: var(--ink-2); }
.spec-rows { border-top: 1px solid var(--line); }
.spec-rows div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.spec-rows dt { color: var(--ink-2); }
.spec-rows dd { font-weight: 600; text-align: right; }

/* one battery on sale: a wide card with the photos and every figure */
@container (min-width: 760px) {
  .one .bcard { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: start; padding: clamp(20px, 3vw, 40px); }
  .one .bcard-media { aspect-ratio: auto; overflow: visible; background: none; }
  .one .bcard-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .one .bcard-photos img { height: auto; aspect-ratio: 1; border-radius: 12px; }
  .one .bcard-photos .main { grid-column: 1 / -1; aspect-ratio: 4 / 3; border-radius: var(--r-md); }
  .one .bcard-photos .sub { display: block; }
  .one .bph { height: auto; aspect-ratio: 4 / 3; border-radius: var(--r-md); background: var(--bg-alt); }
  .one .badge { top: 16px; left: 16px; }
  .one .bcard-body { gap: 22px; padding: 8px 0 0; }
  .one .bcard h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.08; letter-spacing: -0.028em; }
  .one .bcard .spec-rows { display: block; }
  .one .bcard-meta, .one .bcard-price { display: none; }
}

/* ---------- battery details: a sheet over the page ---------- */
.sheet {
  width: min(1040px, 100% - 32px);
  max-width: none;
  max-height: min(92svh, 920px);
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
}
.sheet::backdrop { background: rgba(0, 0, 0, 0.42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet[open] { animation: sheet-in 0.5s var(--out); }
.sheet[open]::backdrop { animation: fade 0.4s ease; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(28px) scale(0.98); } }
@keyframes fade { from { opacity: 0; } }
.sheet-in { container-type: inline-size; position: relative; padding: clamp(20px, 3vw, 40px); }
.sheet-x { position: absolute; top: 14px; right: 14px; z-index: 3; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.9); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.16); color: var(--ink); font: 400 1.375rem / 1 var(--font); cursor: pointer; transition: background-color 0.2s; }
.sheet-x:hover { background: #fff; }
.sheet-body { display: grid; gap: clamp(20px, 3vw, 40px); }
@container (min-width: 720px) {
  .sheet-body { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
  .sheet-gallery { position: sticky; top: 0; }
}
.sheet-main img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-md); background: var(--bg-alt); }
.sheet-gallery .bph { height: auto; aspect-ratio: 4 / 3; border-radius: var(--r-md); background: var(--bg-alt); }
.sheet-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.sheet-thumbs button { padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 12px; background: none; cursor: pointer; transition: border-color 0.2s; }
.sheet-thumbs button[aria-current="true"] { border-color: var(--blue); }
.sheet-thumbs img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.sheet-info { display: flex; flex-direction: column; gap: 16px; padding-top: 4px; }
.sheet-info .badge { position: static; align-self: flex-start; background: var(--bg-alt); }
.sheet-info h3 { padding-right: 40px; font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.08; letter-spacing: -0.028em; }
.sheet-price { font: 600 1.375rem / 1.2 var(--display); letter-spacing: -0.02em; }
.sheet-desc { color: var(--ink-2); white-space: pre-line; }
.cells { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 1px; height: 84px; padding: 14px; border-radius: 14px; background: var(--bg-alt); }
.cells i { display: block; height: 100%; border-radius: 1px; background: var(--green); transform-origin: bottom; transform: scaleY(var(--f)); }

/* ---------- faq ---------- */
.qa { border-top: 1px solid var(--line); }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  font: 600 clamp(1.1875rem, 1rem + 0.6vw, 1.5rem) / 1.25 var(--display);
  letter-spacing: -0.02em;
  list-style: none;
  cursor: pointer;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; flex: none; font-size: 1.75rem; font-weight: 300; line-height: 1; color: var(--ink-2); transition: transform 0.3s var(--ease); }
.qa details[open] summary::after { transform: rotate(45deg); }
.qa details p { max-width: 44em; padding-bottom: 26px; color: var(--ink-2); }

/* ---------- contact ---------- */
.contact { text-align: center; }
.contact .wrap { width: min(640px, 100% - 2 * var(--m)); display: grid; justify-items: center; gap: 18px; }
.rows { width: 100%; max-width: 520px; margin-top: 40px; text-align: left; border-top: 1px solid var(--line); }
.rows div { display: flex; justify-content: space-between; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.rows dt { color: var(--ink-2); }
.rows dd a { color: var(--link); }

/* ---------- footer ---------- */
.foot { padding: 28px 0 40px; background: var(--bg-alt); color: var(--ink-2); font-size: 0.75rem; line-height: 1.4; border-top: 1px solid var(--line); }
.foot-note { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 20px 0 24px; }
.foot-cols h3 { margin-bottom: 10px; font: 600 0.75rem / 1.4 var(--font); letter-spacing: 0; color: var(--ink); }
.foot-cols li + li { margin-top: 8px; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.foot a { color: var(--ink); }
.foot-cols a { color: var(--ink-2); }
.foot a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- arrival: blocks rise into place as they scroll in ---------- */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.9s var(--out), transform 1.1s var(--out); transition-delay: calc(var(--k, 0) * 80ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .cell, .js .cell::after, .js .phone .screen, .sheet[open], .sheet[open]::backdrop { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- tablet and phone ---------- */
@media (max-width: 1180px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bill-col { grid-column: 7 / -1; }
}

@media (max-width: 833px) {
  :root { --nav: 48px; }
  .menu-btn { display: grid; }
  .nav-in { gap: 12px; }
  .nav-in .pill { margin-left: auto; }
  /* the menu opens as a full-screen list under the bar */
  .nav.open { background: rgba(251, 251, 253, 0.98); }
  .nav nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100svh - var(--nav));
    flex-direction: column;
    gap: 2px;
    padding: 20px var(--m) 40px;
    background: rgba(251, 251, 253, 0.98);
    font: 600 1.75rem / 1.2 var(--display);
    letter-spacing: -0.02em;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0s 0.3s;
  }
  .nav nav a { padding: 8px 0; color: var(--ink); transform: translateY(-8px); transition: transform 0.5s var(--out), color 0.2s; }
  .nav.open nav { opacity: 1; visibility: visible; transition-delay: 0s; }
  .nav.open nav a { transform: none; }
  .bars { --cols: 48; --bh: clamp(60px, 12svh, 120px); row-gap: 26px; }
  .gl { display: none; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .proof-grid, .how-grid, .check-grid, .buy-grid, .offer-grid { grid-template-columns: minmax(0, 1fr); }
  .phones, .specs, .steps, .video, .check-head, .panel, .buy-text, .verdicts, .offer-text, .bill-col { grid-column: 1 / -1; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .promos { grid-template-columns: minmax(0, 1fr); }
  .check-head, .video { position: static; }
  .video { justify-self: start; }
  .sheet { width: 100%; max-height: 94svh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .sheet[open] { animation-name: sheet-up; }
}
@keyframes sheet-up { from { opacity: 0; transform: translateY(40%); } }

@media (max-width: 600px) {
  .bento, .cards { grid-template-columns: minmax(0, 1fr); }
  .tile { min-height: 0; }
  .ctas { gap: 12px 20px; }
  .stage { gap: 18px; }
  .free-chip { padding: 5px 12px; font-size: 0.8125rem; }
  .readout dd { font-size: 1.75rem; }
  th { font-size: 0.9375rem; }
  .rows div { flex-direction: column; gap: 4px; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters button { padding-inline: 14px; }
  .vbars { column-gap: 1px; }
}

/* ---------- page not found ---------- */
.lost { min-height: 100svh; display: grid; place-content: center; justify-items: center; gap: 20px; padding: var(--m); text-align: center; }
