/* Truepower — engineering drawing + rating plate */
:root {
  --ground: #dcdedc;
  --ground-2: #d2d5d3;
  --plate: #e9ebea;
  --plate-edge: #c4c8c6;
  --ink: #111315;
  --ink-2: #3f4448;
  --ink-3: #5b6166;
  --line: rgba(17, 19, 21, 0.16);
  --line-2: rgba(17, 19, 21, 0.32);
  --red: #c12221;
  --red-ink: #a81d1c;
  --red-deep: #8f1716;
  --signal: #1f9d55;
  --amber: #e2a21b;
  --lcd: #9fd8ff;
  --sky-a: #9fc3dc;
  --sky-b: #e6ecee;
  --wire: rgba(17, 19, 21, 0.18);
  --scope-bg: #101214;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1320px;
  color-scheme: light;
}

body.outage {
  --ground: #0d0f10;
  --ground-2: #121416;
  --plate: #17191b;
  --plate-edge: #2a2e31;
  --ink: #e8eae9;
  --ink-2: #b4babd;
  --ink-3: #8f969a;
  --line: rgba(232, 234, 233, 0.13);
  --line-2: rgba(232, 234, 233, 0.28);
  --red: #e0332c;
  --red-ink: #ff5a4f;
  --sky-a: #0b1524;
  --sky-b: #1a2233;
  --wire: rgba(232, 234, 233, 0.14);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color 0.9s var(--ease), color 0.9s var(--ease);
}

::selection { background: var(--red); color: #fff; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }
html { scrollbar-color: var(--ink-3) var(--ground); scrollbar-width: thin; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--ground); padding: 10px 14px; border-radius: 6px; }
.skip:focus { top: 12px; }

h1, h2, h3 { margin: 0; font-weight: 800; line-height: 0.98; letter-spacing: -0.03em; text-wrap: balance; }
h2 { font-size: clamp(2.1rem, 4.6vw, 4.4rem); font-variation-settings: "wdth" 88; }
p { margin: 0; text-wrap: pretty; }

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

/* ---------- stage ---------- */
#stage {
  position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh;
  z-index: 0; display: block; pointer-events: none;
}
.blackout {
  position: fixed; inset: 0; background: #000; z-index: 90; opacity: 0; pointer-events: none;
}
.blackout.flick { animation: flick 0.75s steps(1, end) forwards; }
@keyframes flick {
  0% { opacity: 0.94; } 12% { opacity: 0.2; } 20% { opacity: 0.97; } 46% { opacity: 0.85; } 62% { opacity: 1; } 100% { opacity: 0; }
}

main, .foot { position: relative; z-index: 1; }

/* ---------- top bar ---------- */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter);
  transition: background-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.bar.scrolled { background: color-mix(in srgb, var(--ground) 82%, transparent); backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 1px 0 var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; display: block; }
.brand-word { font-size: 21px; font-weight: 500; letter-spacing: -0.02em; font-variation-settings: "wdth" 110; }
.brand-word b { font-weight: 800; color: var(--red); }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink-2); font-variation-settings: "wdth" 92; letter-spacing: 0.01em; transition: color 0.2s; }
.nav a:hover { color: var(--red-ink); }
.bar-end { display: flex; align-items: center; gap: 18px; }
.mains { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--ink-2); letter-spacing: 0.02em; white-space: nowrap; }
.mains i { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 22%, transparent); }
body.outage .mains i { background: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 25%, transparent); animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.35; } }

/* ---------- buttons ---------- */
.btn {
  --b: var(--ink); --t: var(--ground);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 700 15px/1 var(--font); font-variation-settings: "wdth" 100; letter-spacing: 0.005em;
  background: var(--b); color: var(--t); text-decoration: none; border: 1.5px solid var(--b);
  transition: transform 0.35s var(--ease), background-color 0.25s, color 0.25s, box-shadow 0.35s var(--ease);
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(0,0,0,.35); }
.btn:active { transform: translateY(0); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 13px; }
.btn-red { --b: var(--red); --t: #fff; }
.btn-red:hover { --b: var(--red-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-white { --b: #fff; --t: var(--red-deep); }
.btn-line { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-line:hover { border-color: #fff; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center;
  padding: 120px var(--gutter) 150px; max-width: 1560px; margin: 0 auto;
}
.hero-copy { position: relative; z-index: 2; max-width: 620px; }
.hero h1 {
  font-size: clamp(3rem, 6.6vw, 6rem); font-variation-settings: "wdth" 76; font-weight: 850; line-height: 0.92; letter-spacing: -0.035em;
}
.hero h1 span { color: var(--red-ink); display: inline-block; }
.lede { margin-top: 26px; font-size: clamp(17px, 1.35vw, 20px); color: var(--ink-2); max-width: 32em; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.switch-wrap { margin-top: 44px; display: flex; align-items: center; gap: 18px; padding-top: 22px; border-top: 1px solid var(--line); max-width: 520px; }
.gridswitch {
  display: inline-flex; align-items: center; gap: 12px; flex: none;
  background: none; border: 0; padding: 0; color: var(--ink); cursor: pointer; font: 700 14px/1 var(--font);
}
.gs-track {
  position: relative; width: 62px; height: 34px; border-radius: 6px; flex: none;
  background: linear-gradient(#f4f5f4, #cfd2d0); border: 1px solid var(--plate-edge);
  box-shadow: inset 0 1px 2px rgba(0,0,0,.18), 0 1px 0 rgba(255,255,255,.6);
}
body.outage .gs-track { background: linear-gradient(#232629, #16181a); }
.gs-knob {
  position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 4px;
  background: linear-gradient(#e2372f, #a51b1a); box-shadow: 0 2px 4px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.35);
  transform: translateX(28px); transition: transform 0.4s var(--ease);
}
body.outage .gs-knob { transform: translateX(0); background: linear-gradient(#55595d, #2c2f32); }
.gs-off, .sn-off { display: none; }
body.outage .gs-on, body.outage .sn-on { display: none; }
body.outage .gs-off, body.outage .sn-off { display: inline; }
.switch-note { font-size: 14px; color: var(--ink-3); line-height: 1.45; }

.hero-plate {
  position: absolute; right: var(--gutter); bottom: 132px; z-index: 2;
  width: 250px; padding: 12px 14px; border-radius: 6px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--plate) 92%, #fff) 0%, var(--plate) 60%, color-mix(in srgb, var(--plate) 88%, #000) 100%);
  border: 1px solid var(--plate-edge);
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 12px 30px -18px rgba(0,0,0,.4);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.01em;
}
.rp-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.rp-row:last-child { border-bottom: 0; }
.rp-row span { color: var(--ink-3); text-transform: uppercase; }
.rp-row b { font-weight: 600; text-align: right; }

.scope {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: 36px; margin: 0; z-index: 2;
  height: 76px; border-top: 1px solid var(--line); padding-top: 8px;
}
.scope canvas { width: 100%; height: 48px; display: block; }
.scope figcaption { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); margin-top: 4px; }
.scroll-cue { position: absolute; left: 50%; bottom: 128px; width: 22px; height: 36px; border: 1.5px solid var(--line-2); border-radius: 12px; z-index: 2; translate: -50% 0; }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--red); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- shared section ---------- */
section { position: relative; }
.sec-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 32px 64px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.sec-head p { color: var(--ink-2); max-width: 34em; }
.fine { font-size: 13px; color: var(--ink-3); margin-top: 18px; max-width: 70ch; }

/* ---------- hazard ---------- */
.hazard { background: var(--ground-2); padding: clamp(96px, 12vw, 170px) 0; border-top: 1px solid var(--line); transition: background-color .9s var(--ease); }
.hazard-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.hazard-copy p { margin-top: 22px; color: var(--ink-2); max-width: 36em; }
.wave-tabs { display: inline-flex; margin-top: 30px; padding: 4px; border-radius: 999px; background: var(--plate); border: 1px solid var(--plate-edge); gap: 2px; flex-wrap: wrap; }
.wave-tabs button {
  border: 0; background: transparent; color: var(--ink-2); font: 650 14px/1 var(--font); padding: 11px 16px; border-radius: 999px; cursor: pointer;
  transition: background-color .25s, color .25s;
}
.wave-tabs button:hover { color: var(--ink); }
.wave-tabs button[aria-selected="true"] { background: var(--ink); color: var(--ground); }
.wave-note { font-size: 15px !important; min-height: 3.2em; margin-top: 16px !important; }
.oscillo { margin: 0; background: var(--scope-bg); border-radius: 14px; padding: 18px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.05); }
.oscillo canvas { width: 100%; aspect-ratio: 16 / 10; display: block; border-radius: 6px; }
.oscillo figcaption { display: flex; gap: 22px; font-family: var(--mono); font-size: 11px; color: #8fa39a; margin-top: 12px; }
.osc-label { margin-left: auto; color: #7cf2a6; }

/* ---------- inside (exploded) ---------- */
.inside { height: 520vh; }
.inside-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.inside-head { position: absolute; left: var(--gutter); top: 96px; max-width: 460px; z-index: 2; }
.inside-head h2 { font-size: clamp(2rem, 3.6vw, 3.4rem); }
.inside-head p { margin-top: 12px; color: var(--ink-2); font-size: 15px; }
.leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; overflow: visible; }
.leaders polyline { stroke-width: 1.4px; stroke-linejoin: round; }
.leaders circle.dot { fill: var(--red); }
.leaders circle.ring { fill: none; stroke: var(--red); stroke-width: 1; }
.callouts { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.callouts li {
  position: absolute; left: 0; top: 0; width: 270px; padding: 12px 14px 13px; border-radius: 8px;
  background: color-mix(in srgb, var(--plate) 90%, transparent); border: 1px solid var(--plate-edge);
  box-shadow: 0 14px 34px -22px rgba(0,0,0,.5);
  opacity: 0; filter: blur(6px); transition: opacity .5s var(--ease), filter .5s var(--ease), border-color .4s;
  will-change: transform;
}
.callouts li.on { opacity: 1; filter: none; }
.callouts li.active { border-color: var(--red); }
.callouts li b { display: flex; gap: 10px; align-items: baseline; font-size: 15px; font-weight: 750; letter-spacing: -0.01em; }
.callouts li b::before { content: attr(data-n); font-family: var(--mono); font-size: 10px; color: #fff; background: var(--red); border-radius: 50%; width: 20px; height: 20px; flex: none; display: inline-grid; place-items: center; transform: translateY(-2px); }
.callouts li span { display: block; font-size: 13px; line-height: 1.45; color: var(--ink-2); margin-top: 5px; }
.inside-foot { position: absolute; left: var(--gutter); bottom: 26px; font-size: 12px; color: var(--ink-3); font-family: var(--mono); z-index: 2; }

/* ---------- range ---------- */
.range { background: var(--ground); padding: clamp(110px, 12vw, 180px) 0 clamp(90px, 10vw, 140px); border-top: 1px solid var(--line); transition: background-color .9s var(--ease); }
.plates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1.5px solid var(--ink); }
.plate { display: grid; grid-template-rows: auto 1fr; padding: 34px 30px 30px 0; border-right: 1px solid var(--line); }
.plate + .plate { padding-left: 30px; }
.plate:last-child { border-right: 0; }
.elev { width: 140px; height: 175px; display: block; margin-bottom: 26px; fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; transition: transform .6s var(--ease); }
.plate:hover .elev { transform: translateY(-6px) rotate(-1deg); }
.elev .fill { fill: var(--ink); }
.elev .lcd { fill: var(--lcd); stroke: none; }
.elev .red { stroke: var(--red); stroke-width: 4; }
.elev .dim { stroke-width: 0.8; stroke-dasharray: 3 3; opacity: .6; }
.elev .cells { stroke-width: .8; opacity: .45; }
.elev .dimt { font: 9px var(--mono); fill: var(--ink-3); stroke: none; }
.plate h3 { font-size: clamp(1.9rem, 2.6vw, 2.5rem); font-variation-settings: "wdth" 112; font-weight: 850; letter-spacing: -0.03em; display: flex; flex-direction: column; gap: 6px; }
.plate h3 span { font-size: 14px; font-weight: 650; letter-spacing: 0.005em; color: var(--red-ink); font-variation-settings: "wdth" 100; }
.plate-body p { margin-top: 14px; color: var(--ink-2); font-size: 15.5px; max-width: 34em; }
.plate dl { margin: 22px 0 0; border-top: 1px solid var(--line); }
.plate dl div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.plate dt { font-size: 13px; color: var(--ink-3); }
.plate dd { margin: 0; font-family: var(--mono); font-size: 13px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.plate-link { display: inline-flex; margin-top: 22px; font-weight: 700; font-size: 15px; color: var(--red-ink); text-decoration: none; gap: 8px; align-items: center; }
.plate-link::after { content: ""; width: 30px; height: 1.5px; background: currentColor; transform: scaleX(.6); transform-origin: left; transition: transform .35s var(--ease); }
.plate-link:hover::after { transform: scaleX(1); }

/* ---------- kivo gauges ---------- */
.kivo { background: #121416; color: #e8eae9; padding: clamp(100px, 11vw, 170px) 0; --line: rgba(232,234,233,.12); --ink-2: #b4babd; --ink-3: #8f969a; }
.kivo .sec-head p { color: #b4babd; }
.kivo-models { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: #1c1f22; border: 1px solid #2a2e31; margin-bottom: 30px; }
.kivo-models button { font: 750 15px/1 var(--font); font-variation-settings: "wdth" 110; padding: 13px 22px; border-radius: 999px; border: 0; background: transparent; color: #b4babd; cursor: pointer; transition: background-color .25s, color .25s; }
.kivo-models button:hover { color: #fff; }
.kivo-models button[aria-checked="true"] { background: var(--red); color: #fff; }
.panel {
  display: grid; grid-template-columns: 1fr; gap: clamp(24px, 3vw, 40px);
  background: linear-gradient(180deg, #17191c, #0f1113); border: 1px solid #23272a; border-radius: 18px; padding: clamp(18px, 3vw, 40px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 40px 80px -40px rgba(0,0,0,.8);
}
.gauges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 2vw, 30px); }
.gauge { margin: 0; }
.gauge svg { display: block; width: 100%; height: auto; aspect-ratio: 1; background: radial-gradient(circle at 50% 40%, #1a1d20 0%, #0b0c0e 70%); border-radius: 50%; box-shadow: inset 0 0 0 1px #2b2f33, inset 0 6px 18px rgba(0,0,0,.7), 0 1px 0 rgba(255,255,255,.04); }
.gauge figcaption { margin-top: 14px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.gauge .gv { font-family: var(--mono); font-weight: 500; font-size: clamp(18px, 2vw, 28px); color: #fff; font-variant-numeric: tabular-nums; }
.gauge figcaption span { font-size: clamp(10px, 0.9vw, 12px); color: #8f969a; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 650; }
.gauge .tick { stroke: #d9dcdb; stroke-width: 1.2; }
.gauge .tick.minor { stroke: #5c6266; stroke-width: 1; }
.gauge .tl { fill: #aab0b3; font: 9px var(--mono); text-anchor: middle; }
.gauge .needle { fill: var(--red); }
.gauge .hub { fill: #2a2e31; stroke: #444a4f; }
.gauge .trend { fill: none; stroke: #7cf2a6; stroke-width: 2.5; stroke-linecap: round; opacity: .8; }
.spec { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 32px; border-top: 1px solid rgba(232,234,233,.1); }
.spec div { display: flex; flex-direction: column; gap: 4px; padding: 14px 0; border-bottom: 1px solid rgba(232,234,233,.1); }
.spec dt { font-size: 13.5px; color: #8f969a; }
.spec dd { margin: 0; font-family: var(--mono); font-size: 14px; color: #fff; font-variant-numeric: tabular-nums; }
.spec .price dd { font-family: var(--font); font-size: 22px; font-weight: 800; font-variation-settings: "wdth" 100; color: #fff; }
.spec dd.flash { animation: flash .6s var(--ease); }
@keyframes flash { from { color: #ff6b61; } }
.kivo .fine { color: #8f969a; }
.kivo-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.kivo .btn-ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.kivo .btn-ghost:hover { border-color: #fff; }

/* ---------- day ---------- */
.day { background: var(--ground); padding: clamp(100px, 11vw, 170px) 0; transition: background-color .9s var(--ease); }
.day-board { background: var(--plate); border: 1px solid var(--plate-edge); border-radius: 18px; padding: clamp(14px, 2vw, 26px); }
.flow { width: 100%; height: auto; display: block; }
.flow .sky { transition: opacity .4s; }
.flow .sun circle { fill: #ffcf4a; stroke: none; }
.flow .sun path { stroke: #ffcf4a; stroke-width: 3; stroke-linecap: round; }
.flow .wire { fill: none; stroke: rgba(128,138,148,.32); stroke-width: 10; stroke-linecap: round; }
.flow .flowline { fill: none; stroke: var(--red); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 2 16; opacity: 0; transition: opacity .4s, stroke-width .4s; }
.flow .flowline.live { opacity: 1; animation: flow 0.9s linear infinite; }
.flow #f-pv.live { stroke: #e79a0d; }
.flow #f-grid.live { stroke: #3a6fd8; }
@keyframes flow { to { stroke-dashoffset: -18; } }
.flow .node path, .flow .node rect { fill: var(--plate); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.flow .node.inv rect:first-child { fill: #c9ccce; }
body.outage .flow .node.inv rect:first-child { fill: #3a3e42; }
.flow .node .lcd { fill: var(--lcd); stroke: none; }
.flow .node .red { stroke: var(--red); stroke-width: 4; }
.flow .node .soc { fill: var(--signal); stroke: none; }
.flow text { fill: var(--ink); font: 700 15px var(--font); text-anchor: middle; paint-order: stroke; stroke: var(--plate); stroke-width: 5px; stroke-linejoin: round; }
.flow text.nv { font: 500 13px var(--mono); fill: var(--ink-2); }
.day-controls { padding: 18px 6px 4px; }
.day-time { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.day-time b { font-family: var(--mono); font-size: 28px; font-weight: 500; font-variant-numeric: tabular-nums; }
.day-time span { color: var(--ink-2); }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 34px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #233149, #9fc3dc 30%, #ffd36b 50%, #9fc3dc 70%, #233149); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #233149, #9fc3dc 30%, #ffd36b 50%, #9fc3dc 70%, #233149); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 6px; background: var(--red); border: 3px solid var(--plate); box-shadow: 0 3px 10px rgba(0,0,0,.3); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 6px; background: var(--red); border: 3px solid var(--plate); }
.day-ticks { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); padding: 0 4px; }

/* ---------- lithvon ---------- */
.lithvon { background: var(--ground-2); padding: clamp(100px, 11vw, 170px) 0; border-top: 1px solid var(--line); transition: background-color .9s var(--ease); }
.lith-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 90px); align-items: start; }
.lith-copy p { margin-top: 22px; color: var(--ink-2); }
.facts { list-style: none; padding: 0; margin: 30px 0 34px; display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 30px; }
.facts li { display: flex; flex-direction: column; }
.facts b { font-size: clamp(2rem, 3vw, 2.8rem); font-weight: 850; letter-spacing: -0.03em; font-variation-settings: "wdth" 80; line-height: 1; }
.facts span { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.lith-table { border-top: 1.5px solid var(--ink); }
.lt-row { display: grid; grid-template-columns: 0.85fr 1.35fr 2.5fr 0.95fr; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.lt-row:not(.lt-head) { transition: background-color .2s; }
.lt-row:not(.lt-head):hover { background: color-mix(in srgb, var(--plate) 70%, transparent); }
.lt-head { font-size: 12px; color: var(--ink-3); font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; }
.lt-model { font-weight: 800; font-variation-settings: "wdth" 110; }
.lt-rating, .lt-price { font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.lt-price { text-align: right; }
.lt-price.ask { color: var(--ink-3); font-family: var(--font); font-size: 13px; }
.lt-bat { display: flex; align-items: center; gap: 10px; white-space: nowrap; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.cells { display: flex; gap: 2px; flex: none; }
.cells i { width: 6px; height: 16px; border-radius: 1.5px; background: var(--line); }
.cells i.f { background: var(--signal); }
.lt-row.in .cells i.f { animation: cellin .5s var(--ease) both; animation-delay: calc(var(--i) * 30ms); }
@keyframes cellin { from { transform: scaleY(.2); opacity: 0; } }

/* ---------- exports ---------- */
.exports { background: var(--ground); padding: clamp(100px, 11vw, 160px) 0; overflow: hidden; transition: background-color .9s var(--ease); }
.ex-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 60px); align-items: center; }
.ex-copy p { margin-top: 22px; color: var(--ink-2); max-width: 36em; }
.regions { margin-top: 28px; display: grid; gap: 16px; }
.region h3 { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 750; color: var(--ink-3); margin-bottom: 8px; }
.region ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.region li button { font: 600 13px/1 var(--font); padding: 8px 11px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink); cursor: pointer; transition: background-color .2s, border-color .2s, color .2s; }
.region li button:hover, .region li button.hot { background: var(--red); border-color: var(--red); color: #fff; }
.globe-wrap { position: relative; aspect-ratio: 1; max-width: 680px; width: 100%; justify-self: center; }
#globe { width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; }
#globe:active { cursor: grabbing; }
.globe-hint { position: absolute; bottom: 4%; left: 50%; translate: -50% 0; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }

/* ---------- since / nameplate ---------- */
.since { background: var(--ground-2); padding: clamp(100px, 11vw, 160px) 0; border-top: 1px solid var(--line); transition: background-color .9s var(--ease); }
.nameplate {
  position: relative; border-radius: 14px; padding: clamp(28px, 5vw, 64px);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 3px),
    linear-gradient(165deg, #c9cdcb 0%, #b2b7b5 45%, #a3a8a6 100%);
  color: #121416; border: 1px solid #8e9391;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -2px 0 rgba(0,0,0,.12), 0 40px 70px -40px rgba(0,0,0,.55);
}
body.outage .nameplate { background: repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 1px, transparent 1px 3px), linear-gradient(165deg, #3b3f42, #26292c); color: #e8eae9; border-color: #3e4347; }
.rivet { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f2f3f2, #8b908e 60%, #5c605f); box-shadow: 0 1px 1px rgba(0,0,0,.35); }
.r1 { top: 16px; left: 16px; } .r2 { top: 16px; right: 16px; } .r3 { bottom: 16px; left: 16px; } .r4 { bottom: 16px; right: 16px; }
.np-top { display: flex; gap: 22px; align-items: center; padding-bottom: 28px; border-bottom: 1.5px solid currentColor; }
.np-mark { width: 54px; height: 54px; flex: none; }
.nameplate h2 { font-size: clamp(1.9rem, 4.2vw, 4rem); font-variation-settings: "wdth" 120; font-weight: 800; letter-spacing: -0.035em; }
.np-grid { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.np-grid div { padding: 26px 20px 22px 0; border-right: 1px solid color-mix(in srgb, currentColor 30%, transparent); }
.np-grid div + div { padding-left: 22px; }
.np-grid div:last-child { border-right: 0; }
.np-grid dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; opacity: .72; }
.np-grid dd { margin: 10px 0 0; font-size: clamp(2.4rem, 5vw, 4.6rem); font-weight: 850; letter-spacing: -0.04em; line-height: .95; font-variation-settings: "wdth" 72; font-variant-numeric: tabular-nums; }
.np-grid sup { font-size: .45em; vertical-align: top; position: relative; top: .15em; color: var(--red-ink); margin-left: 2px; }
.np-foot { font-family: var(--mono); font-size: 11px; padding-top: 18px; border-top: 1px solid color-mix(in srgb, currentColor 30%, transparent); opacity: .78; }
.values { margin-top: 40px; font-size: clamp(1.2rem, 2vw, 1.7rem); font-weight: 650; letter-spacing: -0.015em; max-width: 30em; color: var(--ink-2); font-variation-settings: "wdth" 95; }

/* ---------- contact ---------- */
.contact { background: var(--red); color: #fff; padding: clamp(100px, 11vw, 170px) 0; }
body.outage .contact { background: #b81f1d; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 90px); align-items: end; }
.contact h2 { font-size: clamp(3rem, 8vw, 7.6rem); font-variation-settings: "wdth" 72; font-weight: 900; letter-spacing: -0.04em; line-height: .88; }
.contact-lede { margin-top: 24px; font-size: 18px; max-width: 32em; color: #ffe3e0; }
.contact-big { display: flex; flex-direction: column; gap: 4px; margin-top: 34px; }
.contact-big a { font-family: var(--mono); font-size: clamp(18px, 2.2vw, 28px); font-weight: 500; text-decoration: none; width: fit-content; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .45s var(--ease); }
.contact-big a:hover { background-size: 100% 1.5px; }
.routes { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid #fff; }
.routes a { display: block; padding: 20px 40px 20px 0; border-bottom: 1px solid rgba(255,255,255,.35); text-decoration: none; position: relative; }
.routes b, .routes span { transition: transform .35s var(--ease); }
.routes a::after { content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; border-top: 2px solid #fff; border-right: 2px solid #fff; transform: translateY(-50%) rotate(45deg); transition: right .35s var(--ease); }
.routes a:hover b, .routes a:hover span { transform: translateX(10px); }
.routes a:hover::after { right: 0; }
.routes b { display: block; font-size: 19px; font-weight: 750; letter-spacing: -0.01em; }
.routes span { display: block; font-size: 14px; color: #ffe3e0; margin-top: 3px; }
.contact :focus-visible { outline-color: #fff; }

/* ---------- footer ---------- */
.foot { background: #0d0f10; color: #c8cccb; padding: 50px 0 40px; }
.foot .brand-word { color: #fff; }
.foot .brand-word b { color: #ff5a4f; }
.foot-grid { display: grid; grid-template-columns: auto 1fr auto; gap: 24px 40px; align-items: center; }
.foot nav, .social { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot nav a, .social a { font-size: 14px; text-decoration: none; color: #c8cccb; }
.foot nav a:hover, .social a:hover { color: #fff; text-decoration: underline; }
.foot-legal { grid-column: 1 / -1; font-size: 12.5px; color: #8f969a; border-top: 1px solid #23272a; padding-top: 22px; }

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(28px); filter: blur(6px); transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease); }
.rv.in { opacity: 1; transform: none; filter: none; }
.no-js .rv { opacity: 1; transform: none; filter: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .nav { display: none; }
  .bar-end { margin-left: auto; }
  .hero-plate { display: none; }
}
@media (max-width: 900px) {
  body { font-size: 16px; }
  .hero { grid-template-columns: 1fr; align-items: start; padding-top: 100px; padding-bottom: 120px; min-height: 0; }
  .hero-copy { max-width: none; padding-top: 52vh; }
  .hero h1 { font-size: clamp(2.7rem, 12vw, 4.4rem); }
  .switch-wrap { margin-top: 30px; }
  .scroll-cue { display: none; }
  .scope { bottom: 22px; }
  .sec-head { grid-template-columns: 1fr; gap: 16px; }
  .hazard-grid, .lith-grid, .ex-grid, .contact-grid { grid-template-columns: 1fr; }
  .plates { grid-template-columns: 1fr; }
  .plate, .plate + .plate { padding: 30px 0; border-right: 0; border-bottom: 1px solid var(--line); grid-template-columns: 110px 1fr; grid-template-rows: auto; gap: 20px; }
  .elev { width: 100px; height: 125px; margin: 0; }
  .gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec { grid-template-columns: 1fr 1fr; }
  .np-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .np-grid div, .np-grid div + div { padding: 20px 14px 18px 0; border-right: 0; border-bottom: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
  .np-grid div:nth-child(even) { padding-left: 14px; border-left: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
  .inside-head { top: 80px; right: var(--gutter); }
  .inside-foot { bottom: auto; top: 214px; right: var(--gutter); font-size: 10.5px; }
  .callouts li { width: min(300px, calc(100vw - 32px)); }
  .foot-grid { grid-template-columns: 1fr; }
  .globe-wrap { max-width: 520px; }
}
@media (max-width: 560px) {
  .mains { display: none; }
  .brand-word { font-size: 19px; }
  .plate, .plate + .plate { grid-template-columns: 1fr; }
  .elev { width: 84px; height: 105px; }
  .facts { gap: 20px; }
  .lt-row { grid-template-columns: 1fr auto; grid-template-areas: "model price" "rating rating" "bat bat"; row-gap: 6px; padding: 14px 0; }
  .lt-head { display: none; }
  .lt-model { grid-area: model; }
  .lt-price { grid-area: price; }
  .lt-rating { grid-area: rating; color: var(--ink-2); }
  .lt-bat { grid-area: bat; }
  .switch-wrap { flex-direction: column; align-items: flex-start; gap: 12px; }
  .wave-tabs button { padding: 10px 12px; font-size: 13px; }
  .hero-actions .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .rv { opacity: 1; transform: none; filter: none; }
}

/* no WebGL fallback */
.no-gl #stage { display: none; }
.no-gl .inside { height: auto; padding: 120px 0 80px; }
.no-gl .inside-sticky { position: relative; height: auto; overflow: visible; }
.no-gl .inside-head { position: relative; left: auto; top: auto; padding: 0 var(--gutter); }
.no-gl .callouts { position: relative; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; padding: 30px var(--gutter) 0; }
.no-gl .callouts li { position: relative; opacity: 1; filter: none; width: auto; }
.no-gl .inside-foot { position: relative; left: auto; bottom: auto; padding: 16px var(--gutter); }

@media (max-width: 560px) { .spec { grid-template-columns: 1fr; } }
