/* ============================================================
   OutagePilot — "Night shift" design system
   A dusk-to-dawn palette: the product lives in the hours when
   the sun is gone and the grid fails.
   ============================================================ */

@font-face { font-family: "Unbounded"; font-style: normal; font-display: swap; font-weight: 200 900;
  src: url(fonts/unbounded-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-style: normal; font-display: swap; font-weight: 200 900;
  src: url(fonts/unbounded-latin-wght-normal.woff2) format("woff2");
  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: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(fonts/manrope-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url(fonts/manrope-latin-wght-normal.woff2) format("woff2");
  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: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url(fonts/jetbrains-mono-cyrillic-wght-normal.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url(fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2");
  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; }

:root {
  --bg: #070a12;
  --bg-2: #0b1020;
  --panel: #0f1628;
  --panel-2: #141c33;
  --line: #1f2945;
  --line-2: #2c3860;
  --text: #edf1fa;
  --text-2: #a2acc8;
  --text-3: #6c779a;

  --volt: #3df2c0;          /* battery · OutagePilot */
  --volt-dim: rgba(61, 242, 192, 0.14);
  --volt-ink: #03241b;
  --sun: #ffb547;
  --sun-soft: rgba(255, 181, 71, 0.22);
  --alarm: #ff5b4f;
  --alarm-soft: rgba(255, 91, 79, 0.18);
  --gen: #b98cff;
  --grid: #7ab0ff;
  --warm: #ffd58a;
  --installer: #8e8aa6;

  --f-display: "Unbounded", "Manrope", ui-sans-serif, system-ui, sans-serif;
  --f-body: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r: 18px;
  --r-sm: 12px;
  --gutter: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--f-body);
  font-feature-settings: "ss01", "tnum";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* schematic grid, like an electrical drawing */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 600px at 78% -10%, rgba(61, 242, 192, 0.07), transparent 60%),
    radial-gradient(900px 500px at 0% 30%, rgba(122, 176, 255, 0.05), transparent 60%),
    linear-gradient(var(--bg), var(--bg));
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.35;
  background-image:
    linear-gradient(rgba(122, 176, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 176, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
h1, h2, h3 { margin: 0; font-weight: 600; }
h1, h2 { font-family: var(--f-display); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.45rem, 3.2vw, 2.2rem); line-height: 1.12; }
h3 { font-size: 1rem; font-weight: 700; }
a { color: var(--volt); }
.fine { color: var(--text-3); font-size: 0.82rem; line-height: 1.5; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--volt); color: var(--volt-ink); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--volt); outline-offset: 3px; border-radius: 6px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px) saturate(140%); background: rgba(7, 10, 18, 0.72); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: var(--f-display); font-weight: 500; font-size: 1.02rem; letter-spacing: -0.01em; flex: none; }
.brand b { font-weight: 700; color: var(--volt); }
.brand-mark { width: 30px; height: 30px; }
.brand-mark .ring path { fill: none; stroke: var(--volt); stroke-width: 3.2; stroke-linecap: round; }
.brand-mark .ring path:nth-child(odd) { stroke: rgba(61, 242, 192, 0.45); }
.brand-mark .bolt { fill: var(--sun); }
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { color: var(--text-2); text-decoration: none; font-size: 0.86rem; padding: 6px 10px; border-radius: 8px; }
.nav a:hover { color: var(--text); background: var(--panel); }
.controls { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; background: transparent; color: var(--text-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; font: 600 0.8rem/1 var(--f-body); cursor: pointer; }
.pill svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pill:hover { color: var(--text); border-color: var(--text-3); }
.pill[aria-pressed="true"] { background: var(--volt); color: var(--volt-ink); border-color: var(--volt); }
.lang { display: flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.lang button { background: transparent; border: 0; color: var(--text-2); font: 700 0.75rem/1 var(--f-mono); padding: 8px 10px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--text); color: var(--bg); }

/* ---------- generic ---------- */
.stage { padding: 72px 0; position: relative; }
.stage + .stage { border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 14px; }
.sec-no { font-family: var(--f-display); font-weight: 800; font-size: clamp(3.2rem, 9vw, 6.4rem); line-height: 0.8; color: transparent; -webkit-text-stroke: 1.5px var(--line-2); letter-spacing: -0.04em; flex: none; user-select: none; }
.kicker { font: 700 0.74rem/1 var(--f-mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--volt); margin: 0 0 10px; }
.sec-lede { color: var(--text-2); max-width: 760px; margin: 0 0 22px; font-size: 1.04rem; }
.panel { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 18px; margin-bottom: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; background: var(--volt); color: var(--volt-ink); border: 1px solid var(--volt); border-radius: 12px; padding: 11px 18px; font: 700 0.92rem/1 var(--f-body); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(61, 242, 192, 0.25); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--text-3); box-shadow: none; }
.badge { display: inline-flex; align-items: center; gap: 6px; font: 700 0.72rem/1 var(--f-mono); letter-spacing: 0.04em; padding: 6px 10px; border-radius: 999px; background: var(--volt-dim); color: var(--volt); vertical-align: 2px; }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.badge.offline { background: var(--panel-2); color: var(--text-2); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.8rem; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; }
.legend i.line { height: 3px; border-radius: 2px; }
.legend i.dash { height: 0; border-top: 3px dashed; border-radius: 0; background: none !important; }
.legend i.dot { width: 9px; height: 9px; border-radius: 50%; }

/* ---------- jury lens ---------- */
.jury-note { display: none; margin: 0 0 18px; padding: 10px 14px; border: 1px dashed rgba(255, 181, 71, 0.55); border-radius: var(--r-sm); background: rgba(255, 181, 71, 0.06); font-size: 0.86rem; color: var(--text-2); }
.jury-note b { display: block; font: 700 0.72rem/1.4 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--sun); margin-bottom: 2px; }
body.jury .jury-note, body.pitch .jury-note { display: block; }

/* ---------- hero ---------- */
.hero { padding: 56px 0 64px; overflow: hidden; }
.chip { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px; padding: 7px 14px 7px 10px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(15, 22, 40, 0.7); font: 600 0.74rem/1.2 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--volt); box-shadow: 0 0 0 4px var(--volt-dim), 0 0 14px var(--volt); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(61, 242, 192, 0.04), 0 0 18px var(--volt); } }
.hero h1 { font-size: clamp(2.05rem, 5.6vw, 4.35rem); line-height: 1.02; max-width: 15ch; font-weight: 700; letter-spacing: -0.035em; }
.flicker { color: var(--text-3); text-shadow: none; animation: flicker 3.2s steps(1, end) 0.6s 1 both; }
@keyframes flicker {
  0% { color: var(--warm); text-shadow: 0 0 28px rgba(255, 213, 138, 0.6); }
  8% { color: var(--text-3); text-shadow: none; } 11% { color: var(--warm); text-shadow: 0 0 28px rgba(255, 213, 138, 0.6); }
  14% { color: var(--text-3); text-shadow: none; } 30% { color: var(--warm); text-shadow: 0 0 28px rgba(255, 213, 138, 0.6); }
  34%, 100% { color: var(--text-3); text-shadow: none; }
}
.lede { color: var(--text-2); font-size: clamp(1rem, 1.6vw, 1.15rem); max-width: 720px; margin: 22px 0 30px; }

.duel { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; }
.vs { align-self: center; font: 800 0.8rem/1 var(--f-display); color: var(--text-3); letter-spacing: 0.1em; writing-mode: vertical-rl; transform: rotate(180deg); }
.scene { margin: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); overflow: hidden; display: flex; flex-direction: column; }
.scene.pilot { border-color: rgba(61, 242, 192, 0.45); box-shadow: 0 0 0 1px rgba(61, 242, 192, 0.12), 0 20px 60px -20px rgba(61, 242, 192, 0.25); }
.scene figcaption { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.side { display: inline-flex; align-items: center; gap: 7px; font: 700 0.78rem/1 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); }
.pilot .side { color: var(--volt); }
.side svg { width: 14px; height: 14px; fill: var(--sun); }
.status { font: 600 0.74rem/1 var(--f-mono); padding: 6px 9px; border-radius: 999px; background: var(--panel-2); color: var(--text-2); white-space: nowrap; transition: background .2s, color .2s; }
.status.s-grid { color: var(--grid); background: rgba(122, 176, 255, 0.12); }
.status.s-battery, .status.s-solar { color: var(--volt); background: var(--volt-dim); }
.status.s-gen { color: var(--gen); background: rgba(185, 140, 255, 0.14); }
.status.s-dark { color: #fff; background: var(--alarm); }
.scene-canvas { aspect-ratio: 400 / 250; background: #0a0f22; }
.scene-svg { display: block; width: 100%; height: 100%; }
.meters { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.meter { padding: 12px 14px; }
.meter + .meter { border-left: 1px solid var(--line); }
.meter .mv { font: 600 1.25rem/1.1 var(--f-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.meter .ml { font-size: 0.72rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; font-family: var(--f-mono); margin-top: 4px; }
.meter.bad .mv { color: var(--alarm); }
.meter.good .mv { color: var(--volt); }
.meter.gen .mv { color: var(--gen); }

/* scene artwork */
.scene-svg .stars circle { fill: #fff; }
.scene-svg .stars, .scene-svg .sun, .scene-svg .moon { transition: opacity .35s ease; }
.scene-svg .sun-core { fill: #ffd27a; }
.scene-svg .sun-halo { fill: rgba(255, 196, 92, 0.25); }
.scene-svg .moon-core { fill: #e9edf9; }
.scene-svg .moon-cut { fill: #0c1230; }
.scene-svg .ground { fill: #070b18; }
.scene-svg .ground-line { stroke: #1d2747; }
.scene-svg .pole line { stroke: #4a5579; stroke-width: 3; stroke-linecap: round; }
.scene-svg .wire { fill: none; stroke: var(--grid); stroke-width: 2; stroke-dasharray: 6 5; animation: flow 1s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -11; } }
.scene-svg .pole-x { opacity: 0; transition: opacity .2s; }
.scene-svg .pole-x circle { fill: var(--alarm); }
.scene-svg .pole-x path { stroke: #fff; stroke-width: 2; stroke-linecap: round; }
.scene-svg.grid-down .wire { stroke: var(--alarm); stroke-dasharray: 2 6; animation: none; opacity: 0.6; }
.scene-svg.grid-down .pole-x { opacity: 1; }
.scene-svg .b-body { fill: #1b2340; stroke: #2c3762; }
.scene-svg .b-roof { fill: #26305a; }
.scene-svg .panels path { fill: #23407a; stroke: #6f93d9; stroke-width: 0.8; transition: opacity .3s; }
.scene-svg.pv-on .panels path { fill: #2f5aa8; }
.scene-svg .b-door { fill: #121935; stroke: #2c3762; }
.scene-svg .b-sign { fill: #f4f6fb; }
.scene-svg .b-cross { fill: #e5484d; }
.scene-svg .awn-a { fill: #e8604f; } .scene-svg .awn-b { fill: #f3efe4; }
.scene-svg .awn-edge { fill: none; stroke: #e8604f; stroke-width: 2; }
.scene-svg .win { fill: #10162d; stroke: #2a3561; transition: fill .25s ease; }
.scene-svg .win.lit { fill: var(--warm); stroke: #ffe3ad; }
.scene-svg .win-glow { fill: rgba(255, 205, 120, 0.55); opacity: 0.55; transition: opacity .3s; }
.scene-svg.dark .win-glow { opacity: 0.12; }
.scene-svg .bat-shell { fill: #0d1328; stroke: #3a4673; stroke-width: 2; }
.scene-svg .bat-nub { fill: #3a4673; }
.scene-svg .bat-fill { fill: var(--volt); transition: fill .25s; }
.scene-svg.bat-low .bat-fill { fill: var(--alarm); }
.scene-svg .gen-body rect { fill: #2a2346; stroke: #4e4380; }
.scene-svg .gen-body path { stroke: #5d5290; stroke-width: 2; }
.scene-svg .gen-body circle { fill: #3a3166; }
.scene-svg .smoke { opacity: 0; }
.scene-svg .puff { fill: rgba(170, 160, 200, 0.55); }
.scene-svg.gen-on .gen-body rect { fill: #3b2d6b; stroke: var(--gen); }
.scene-svg.gen-on .gen-body circle { fill: var(--gen); }
.scene-svg.gen-on .gen-body { animation: shake .12s linear infinite; transform-box: fill-box; transform-origin: center; }
.scene-svg.gen-on .smoke { opacity: 1; }
.scene-svg.gen-on .puff { animation: rise 1.6s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.scene-svg.gen-on .puff.p2 { animation-delay: .5s; } .scene-svg.gen-on .puff.p3 { animation-delay: 1s; }
@keyframes shake { 25% { transform: translate(0.6px, -0.4px); } 75% { transform: translate(-0.6px, 0.4px); } }
@keyframes rise { 0% { transform: translate(0, 0) scale(0.6); opacity: 0.9; } 100% { transform: translate(-10px, -38px) scale(2.2); opacity: 0; } }

/* scrubber */
.scrubber { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); }
.play { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--volt); color: var(--volt-ink); display: grid; place-items: center; cursor: pointer; }
.play svg { width: 18px; height: 18px; fill: currentColor; }
.play .i-pause { display: none; }
.play.playing .i-play { display: none; }
.play.playing .i-pause { display: block; }
.track { position: relative; height: 34px; }
.track-bar { position: absolute; inset: 9px 0; border-radius: 6px; overflow: hidden; display: flex; background: var(--panel-2); }
.track-bar span { flex: 1; }
.track-bar .night { background: rgba(9, 13, 32, 0.9); }
.track-bar .day { background: rgba(255, 181, 71, 0.3); }
.track-bar .out { background: var(--alarm); opacity: 0.75; }
.track input { position: absolute; inset: 0; width: 100%; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.track input::-webkit-slider-runnable-track { height: 34px; background: transparent; }
.track input::-moz-range-track { height: 34px; background: transparent; }
.track input::-webkit-slider-thumb { -webkit-appearance: none; width: 4px; height: 34px; border-radius: 2px; background: var(--text); box-shadow: 0 0 0 3px rgba(237, 241, 250, 0.18), 0 0 16px rgba(237, 241, 250, 0.5); }
.track input::-moz-range-thumb { width: 4px; height: 34px; border: 0; border-radius: 2px; background: var(--text); }
.clock { font: 600 1.05rem/1 var(--f-mono); min-width: 9.5ch; text-align: right; color: var(--text); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* ---------- 01 sites ---------- */
.sites { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.site { position: relative; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 0; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); overflow: hidden; transition: border-color .2s, transform .2s; }
.site:hover { transform: translateY(-2px); border-color: var(--line-2); }
.site[aria-checked="true"] { border-color: var(--volt); box-shadow: 0 0 0 1px var(--volt), 0 16px 40px -18px rgba(61, 242, 192, 0.35); }
.site-art { height: 96px; background: linear-gradient(180deg, #141a3a, #0b1022); display: grid; place-items: end center; border-bottom: 1px solid var(--line); }
.site-art svg { width: 150px; height: 88px; }
.site-body { padding: 14px 16px 16px; }
.site-tag { display: inline-block; font: 700 0.66rem/1 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--sun); border: 1px solid rgba(255, 181, 71, 0.35); padding: 4px 6px; border-radius: 6px; }
.site b { display: block; margin: 10px 0 4px; font-family: var(--f-display); font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.site small { color: var(--text-2); font-size: 0.82rem; }
.site .check { position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; background: rgba(7, 10, 18, 0.6); }
.site[aria-checked="true"] .check { background: var(--volt); border-color: var(--volt); }
.site[aria-checked="true"] .check::after { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--volt-ink); border-bottom: 2px solid var(--volt-ink); transform: rotate(-45deg) translate(1px, -1px); }
.mini .b { fill: #26305a; } .mini .w { fill: var(--warm); } .mini .p { fill: #2f5aa8; stroke: #6f93d9; stroke-width: .6; } .mini .r { fill: #e5484d; } .mini .s { fill: #f4f6fb; } .mini .a { fill: #e8604f; } .mini .g { fill: #070b18; }

.upload { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 16px; border: 1.5px dashed var(--line-2); border-radius: var(--r); background: rgba(15, 22, 40, 0.5); transition: border-color .2s, background .2s; }
.upload.drag { border-color: var(--volt); background: var(--volt-dim); }
.up-ico { width: 30px; height: 30px; fill: none; stroke: var(--volt); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.up-text { display: flex; flex-direction: column; gap: 2px; }
.up-text span { color: var(--text-2); font-size: 0.86rem; }
.up-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.notice { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--panel-2); font-size: 0.88rem; color: var(--text-2); border-left: 3px solid var(--volt); }
.notice.warn { border-left-color: var(--sun); }
.notice.err { border-left-color: var(--alarm); }
.settings { margin-top: 16px; }
.settings summary { cursor: pointer; font-weight: 700; color: var(--text-2); font-size: 0.92rem; }
.settings summary:hover { color: var(--text); }
.form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 0.78rem; color: var(--text-3); font-family: var(--f-mono); }
.form input[type="number"] { font: 600 0.95rem var(--f-body); color: var(--text); background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px; width: 100%; }
.form .check { flex-direction: row; align-items: center; gap: 8px; padding-top: 20px; font-family: var(--f-body); font-size: 0.9rem; color: var(--text-2); }
.form .check input { width: 18px; height: 18px; accent-color: var(--volt); }

/* ---------- 02 diagnose ---------- */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 16px; }
.kpi { padding: 16px 14px; border-radius: var(--r-sm); background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.kpi .v { font: 600 clamp(1.4rem, 2.6vw, 2rem)/1 var(--f-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: 0.55em; color: var(--text-3); margin-left: 3px; letter-spacing: 0; }
.kpi .l { font-size: 0.78rem; color: var(--text-2); line-height: 1.35; }
.kpi.alert { border-color: rgba(255, 91, 79, 0.45); background: linear-gradient(180deg, rgba(255, 91, 79, 0.1), var(--panel)); }
.kpi.alert .v { color: var(--alarm); }
.fp-svg { display: block; width: 100%; height: auto; }
.fp-svg text { font: 500 10px var(--f-mono); fill: var(--text-3); }
.fp-up { fill: #18213b; }
.fp-na { fill: #0d1224; }
.fp-out { fill: var(--alarm); opacity: 0.42; }
.fp-empty { fill: var(--alarm); }
.fp-gen { fill: var(--gen); stroke: #0b1020; stroke-width: 1; }
.fp-model { fill: var(--alarm); opacity: 0.85; }
.fp-axis { stroke: var(--line-2); }

/* ---------- 03 plan ---------- */
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--text-3); font: 500 10.5px var(--f-mono); }
.chart .grid line { stroke: var(--line); }
.chart .legend { margin-bottom: 8px; }
#legendPlan { margin-bottom: 10px; }
.score { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 12px; margin-top: 16px; }
.card { border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.card.win { border-color: rgba(61, 242, 192, 0.55); background: radial-gradient(500px 200px at 100% 0%, rgba(61, 242, 192, 0.12), transparent 70%), var(--panel); }
.card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.card-name { font: 600 1rem/1.2 var(--f-display); letter-spacing: -0.01em; }
.card.win .card-name { color: var(--volt); }
.card-sub { font-size: 0.78rem; color: var(--text-3); }
.card-rows { display: grid; gap: 8px; }
.crow { display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: 10px; font-size: 0.86rem; color: var(--text-2); }
.crow b { font: 600 1rem/1 var(--f-display); color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.crow b small { font: 500 0.7rem var(--f-mono); color: var(--text-3); margin-left: 3px; }
.crow .d { font: 700 0.72rem/1 var(--f-mono); padding: 4px 6px; border-radius: 6px; min-width: 46px; text-align: center; }
.crow .d.good { color: var(--volt); background: var(--volt-dim); }
.crow .d.bad { color: var(--alarm); background: var(--alarm-soft); }
.crow .d.neutral { color: var(--text-2); background: var(--panel-2); }
.crow .d:empty { background: none; }
.verdict { margin: 16px 0 0; padding: 16px 18px; border-radius: var(--r); background: linear-gradient(90deg, rgba(61, 242, 192, 0.16), rgba(61, 242, 192, 0.02)); border: 1px solid rgba(61, 242, 192, 0.35); font: 500 1.05rem/1.45 var(--f-body); color: var(--text); }

/* ---------- 04 program ---------- */
.program { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: center; margin-bottom: 14px; }
.dial svg { display: block; width: 100%; max-width: 460px; margin: 0 auto; height: auto; overflow: visible; }
.d-track { fill: none; stroke: #111933; }
.d-guide { fill: none; stroke: #1c2646; stroke-dasharray: 2 4; }
.d-risk { fill: var(--alarm); }
.d-day { fill: var(--sun); }
.d-wedge { fill: rgba(61, 242, 192, 0.55); stroke: var(--bg); stroke-width: 1.5; cursor: pointer; transition: fill .15s, filter .15s; outline: none; }
.d-wedge.gc { fill: rgba(61, 242, 192, 0.85); }
.d-wedge:hover, .d-wedge.active, .d-wedge:focus { fill: var(--volt); filter: drop-shadow(0 0 12px rgba(61, 242, 192, 0.6)); }
.d-bolt { fill: var(--sun); stroke: var(--bg); stroke-width: 1; pointer-events: none; }
.d-sep { stroke: var(--bg); stroke-width: 2; pointer-events: none; }
.d-tick { stroke: var(--line-2); stroke-width: 1; }
.d-tick.major { stroke: var(--text-3); stroke-width: 1.5; }
.d-hour { font: 600 12px var(--f-mono); fill: var(--text-2); }
.d-now { stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 3 3; }
.d-now-dot { fill: var(--text); }
.d-hub { fill: var(--bg-2); stroke: var(--line-2); }
.d-center { font: 700 30px var(--f-display); fill: var(--text); letter-spacing: -1px; }
.d-sub { font: 600 10.5px var(--f-mono); fill: var(--text-3); letter-spacing: 1.5px; text-transform: uppercase; }
.program-side { display: flex; flex-direction: column; gap: 16px; }
.screen { background: #04140f; border: 1px solid #12382c; border-radius: var(--r); padding: 16px 18px; box-shadow: inset 0 0 40px rgba(61, 242, 192, 0.07), 0 0 0 6px #0b1311; font-family: var(--f-mono); color: #b6f7df; }
.screen-top { display: flex; justify-content: space-between; align-items: center; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: #4f9c82; margin-bottom: 8px; }
.screen-led { width: 8px; height: 8px; border-radius: 50%; background: var(--volt); box-shadow: 0 0 10px var(--volt); }
table.tou { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.tou th { text-align: left; font-weight: 500; font-size: 0.7rem; color: #4f9c82; padding: 4px 6px; letter-spacing: 0.06em; }
.tou td { padding: 8px 6px; border-top: 1px solid rgba(182, 247, 223, 0.1); font-variant-numeric: tabular-nums; }
.tou tr { transition: background .15s; }
.tou tbody tr.active { background: rgba(61, 242, 192, 0.12); }
.tou .on { color: var(--sun); font-weight: 700; }
.tou .off { color: #3f7a66; }
.tou .bar { display: inline-block; height: 6px; border-radius: 3px; background: var(--volt); margin-left: 8px; vertical-align: 1px; opacity: 0.75; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- 05 method ---------- */
.pipeline { list-style: none; padding: 0; margin: 8px 0 22px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; }
.pipeline li { position: relative; padding: 0 18px 0 0; }
.pipeline li:not(:last-child)::after { content: ""; position: absolute; top: 19px; left: 48px; right: 8px; height: 2px; background: repeating-linear-gradient(90deg, var(--volt) 0 6px, transparent 6px 11px); opacity: 0.55; }
.node { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--volt); color: var(--volt); font: 700 1rem var(--f-display); position: relative; z-index: 1; margin-bottom: 14px; box-shadow: 0 0 22px rgba(61, 242, 192, 0.2); }
.pipeline b { font-family: var(--f-display); font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.pipeline p { color: var(--text-2); font-size: 0.9rem; margin: 6px 0 10px; }
.pipeline code { display: inline-block; font: 600 0.72rem/1.4 var(--f-mono); color: var(--sun); background: rgba(255, 181, 71, 0.08); border: 1px solid rgba(255, 181, 71, 0.2); padding: 4px 7px; border-radius: 6px; }
.badges { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.badges li { font: 700 0.78rem/1 var(--f-mono); padding: 9px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--text); background: var(--panel); }
.badges li::before { content: "● "; color: var(--volt); }
.truth { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.truth > div { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; background: var(--panel); }
.truth > div:last-child { border-style: dashed; }
.truth h3 { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--volt); margin-bottom: 8px; }
.truth > div:last-child h3 { color: var(--sun); }
.truth ul { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 0.92rem; }
.truth li { margin: 5px 0; }

/* ---------- 06 impact ---------- */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 28px; }
.fact { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 8px; padding: 20px 18px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); transition: border-color .2s, transform .2s; }
.fact:hover { border-color: var(--line-2); transform: translateY(-2px); }
.fv { font: 700 clamp(1.5rem, 2.5vw, 2.4rem)/1 var(--f-display); letter-spacing: -0.04em; color: var(--sun); white-space: nowrap; }
.fl { color: var(--text-2); font-size: 0.9rem; line-height: 1.4; }
.fs { margin-top: auto; font: 500 0.7rem/1.3 var(--f-mono); color: var(--text-3); }
.fs::after { content: " ↗"; }
.route h3 { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; }
.route-line { list-style: none; padding: 0; margin: 0 0 26px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.route-line li { position: relative; padding: 22px 18px 0 0; border-top: 2px solid var(--line-2); display: flex; flex-direction: column; gap: 6px; }
.route-line li::before { content: ""; position: absolute; top: -8px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--volt); }
.route-line li:first-child { border-top-color: var(--volt); }
.route-line li:first-child::before { background: var(--volt); box-shadow: 0 0 14px var(--volt); }
.route-line b { font-family: var(--f-display); font-weight: 600; font-size: 1.02rem; }
.route-line span { color: var(--text-2); font-size: 0.88rem; }
.model3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.model3 > div { padding: 16px 18px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.m3k { font: 700 0.74rem/1 var(--f-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--volt); }
.model3 p { margin: 8px 0 0; color: var(--text-2); font-size: 0.9rem; }

/* ---------- footer, rail, offline ---------- */
.footer { border-top: 1px solid var(--line); padding: 28px 0 48px; color: var(--text-3); font-size: 0.8rem; }
.footer p { margin: 5px 0; }
.rail { display: none; }
.offline { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 30; background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text-2); font: 600 0.78rem var(--f-mono); padding: 8px 14px; border-radius: 999px; }

/* ---------- PITCH MODE (projector / live demo at the regional final) ---------- */
html.pitch-root { scroll-snap-type: y mandatory; scroll-padding-top: 0; }
body.pitch { font-size: 18px; }
body.pitch .topbar { background: transparent; border-bottom-color: transparent; backdrop-filter: none; }
body.pitch .nav, body.pitch .no-pitch, body.pitch .footer, body.pitch .hero-cta, body.pitch .notice { display: none !important; }
body.pitch .stage { min-height: 100vh; scroll-snap-align: start; display: flex; flex-direction: column; justify-content: center; padding: 76px 0 84px; border-top: 0; }
body.pitch .wrap { max-width: 1320px; }
body.pitch .hero h1 { font-size: clamp(2rem, 4.2vw, 3.6rem); max-width: none; }
body.pitch .hero .lede { display: none; }
body.pitch .hero .chip { margin-bottom: 14px; }
body.pitch .hero h1 + .lede + .jury-note { margin-top: 18px; }
/* fit both scenes, scrubber and headline into one projector screen */
body.pitch .duel, body.pitch .scrubber, body.pitch #sceneNote { max-width: clamp(560px, calc(320vh - 2000px), 1320px); margin-left: auto; margin-right: auto; }
body.pitch .stage.hero { padding-top: 64px; }
body.pitch .sec-lede { font-size: 1.15rem; }
body.pitch .rail { display: flex; position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 25; gap: 6px; align-items: center; padding: 6px; border-radius: 999px; background: rgba(15, 22, 40, 0.88); border: 1px solid var(--line-2); backdrop-filter: blur(10px); }
.rail span[data-c] { font: 700 0.72rem/1 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); padding: 8px 12px; border-radius: 999px; transition: background .2s, color .2s; }
.rail span[data-c].on { background: var(--volt); color: var(--volt-ink); }
.rail-hint { font: 500 0.68rem/1 var(--f-mono); color: var(--text-3); padding: 0 10px 0 6px; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .nav { display: none; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .score { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .pipeline li:nth-child(2)::after { display: none; }
}
@media (max-width: 760px) {
  .stage { padding: 52px 0; }
  .hero { padding-top: 34px; }
  .controls .pill span { display: none; }
  .controls .pill { padding: 7px 9px; }
  .duel { grid-template-columns: 1fr; gap: 10px; }
  .vs { writing-mode: horizontal-tb; transform: none; justify-self: center; }
  .sites { grid-template-columns: 1fr; }
  .site { display: grid; grid-template-columns: 110px 1fr; }
  .site-art { height: auto; border-bottom: 0; border-right: 1px solid var(--line); }
  .site-art svg { width: 100px; height: 64px; }
  .upload { grid-template-columns: 1fr; }
  .up-ico { display: none; }
  .form { grid-template-columns: repeat(2, 1fr); }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .program { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr; }
  .pipeline li::after { display: none; }
  .truth, .model3, .route-line { grid-template-columns: 1fr; }
  .route-line li { border-top: 0; border-left: 2px solid var(--line-2); padding: 0 0 18px 20px; }
  .route-line li:first-child { border-left-color: var(--volt); }
  .route-line li::before { top: 2px; left: -8px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .sec-head { gap: 12px; }
  .meter { padding: 10px; }
  .meter .mv { font-size: 1.05rem; }
  .scrubber { grid-template-columns: auto 1fr; }
  .clock { grid-column: 1 / -1; text-align: left; order: -1; font-size: 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .flicker { color: var(--text-3); }
}

@media print {
  body { background: #fff; color: #000; }
  body::before, body::after, .topbar, .hero, #site, #diagnose, #plan, #method, #impact, .footer, .rail, .row-actions, .jury-note { display: none !important; }
  .stage { padding: 0; }
  .screen { box-shadow: none; }
}
