:root {
  --bg: #0b1020;
  --bg-2: #121a30;
  --card: #151f3a;
  --line: #24304f;
  --text: #e8ecf6;
  --muted: #94a0bd;
  --charge: #34d399;
  --sell: #fbbf24;
  --accent: #60a5fa;
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: inherit; }

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(11, 16, 32, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.logo { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 22px; text-decoration: none; letter-spacing: -0.01em; }
.logo .logo-accent { font-style: italic; color: var(--sell); }
.nav nav { display: flex; gap: 20px; }
.nav nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.nav nav a:hover { color: var(--text); }
.nav nav a.nav-cta { color: var(--sell); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
}
.pill:hover { border-color: var(--sell); }
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sell); box-shadow: 0 0 8px var(--sell); }

main section { max-width: 960px; margin: 0 auto; padding: 72px 24px; }

.hero { text-align: center; padding-top: 96px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: 0.12em; font-size: 13px; font-weight: 600; margin: 0 0 12px; }
h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 20px; }
.accent { background: linear-gradient(90deg, var(--charge), var(--sell)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0 auto 32px; }

h2 { font-size: clamp(26px, 4vw, 36px); letter-spacing: -0.02em; margin: 0 0 8px; }
.sub { color: var(--muted); margin: 0 0 24px; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #0b1020;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font-size: 15px;
}
.btn:hover { filter: brightness(1.1); }
.btn.small { padding: 8px 14px; font-size: 13px; min-width: 44px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  overflow: hidden;
}

/* Scene */
.scene { position: relative; border-radius: 12px; overflow: hidden; background: var(--bg-2); transition: background 0.4s; }
.scene-svg { display: block; width: 100%; height: auto; }
#sun { fill: #fde68a; filter: drop-shadow(0 0 12px rgba(253, 230, 138, 0.7)); }
.pylon path { stroke: var(--muted); stroke-width: 3; fill: none; stroke-linecap: round; }
.pylon circle { fill: var(--muted); }
.label { fill: var(--muted); font-size: 14px; text-anchor: middle; }
.cable { stroke: var(--line); stroke-width: 6; stroke-linecap: round; }
.flow { stroke-width: 6; stroke-linecap: round; stroke-dasharray: 2 22; opacity: 0; transition: opacity 0.3s; }
.flow.charging { stroke: var(--charge); opacity: 1; animation: flow-right 0.6s linear infinite; }
.flow.discharging { stroke: var(--sell); opacity: 1; animation: flow-left 0.6s linear infinite; }
@keyframes flow-right { to { stroke-dashoffset: -24; } }
@keyframes flow-left { to { stroke-dashoffset: 24; } }

.batt-shell { fill: none; stroke: var(--text); stroke-width: 4; }
#batt-fill { fill: var(--charge); transition: fill 0.3s; }
#batt-fill.discharging { fill: var(--sell); }
.batt-pct { fill: var(--text); font-size: 24px; font-weight: 700; text-anchor: middle; dominant-baseline: middle; paint-order: stroke; stroke: rgba(0, 0, 0, 0.35); stroke-width: 4px; }

.status {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 14px;
  font-weight: 600;
}
.status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.status[data-mode="charging"] .dot { background: var(--charge); box-shadow: 0 0 10px var(--charge); }
.status[data-mode="discharging"] .dot { background: var(--sell); box-shadow: 0 0 10px var(--sell); }

/* Chart */
.chart { margin-top: 16px; }
#chart { display: block; width: 100%; height: auto; }
#chart .grid-line { stroke: var(--line); stroke-width: 1; }
#chart .axis { fill: var(--muted); font-size: 12px; }
#chart .price-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; }
#chart .price-area { fill: url(#price-grad); }
#chart .band-charge { fill: var(--charge); opacity: 0.14; }
#chart .band-sell { fill: var(--sell); opacity: 0.16; }
#chart .band-label { font-size: 11px; font-weight: 600; text-anchor: middle; }
#chart .band-label.charge { fill: var(--charge); }
#chart .band-label.sell { fill: var(--sell); }
#chart .cursor { stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 4 4; }
#chart .cursor-dot { fill: var(--text); stroke: var(--bg); stroke-width: 3; }

/* Controls */
.controls { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.controls input[type="range"] { flex: 1; accent-color: var(--accent); }
.clock { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 48px; text-align: right; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.stats > div { background: var(--bg-2); border-radius: 12px; padding: 14px 16px; }
.stats .k { display: block; color: var(--muted); font-size: 13px; }
.stats .v { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stats .u { color: var(--muted); font-size: 13px; margin-left: 2px; }
.stats .profit { color: var(--charge); }

/* How */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step h3 { margin: 12px 0 6px; }
.step p { color: var(--muted); margin: 0; }
.icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; font-weight: 700; color: #0b1020; }
.icon.charge { background: var(--charge); }
.icon.store { background: var(--accent); }
.icon.sell { background: var(--sell); }

/* Edge */
.edge .sub { max-width: 720px; }
.pipeline { display: flex; align-items: center; gap: 12px; margin: 32px 0; }
.pipeline .inputs { display: grid; gap: 8px; }
.node { display: block; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 14px; font-weight: 600; text-align: center; white-space: nowrap; }
.node.core { border-color: var(--accent); box-shadow: 0 0 24px rgba(96, 165, 250, 0.35); animation: pulse 2.4s ease-in-out infinite; }
.node.out { border-color: var(--charge); color: var(--charge); }
.wire { flex: 1; height: 3px; background: var(--line); border-radius: 2px; position: relative; overflow: hidden; min-width: 40px; }
.wire span { position: absolute; top: 0; left: -30%; width: 30%; height: 100%; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: travel 1.6s linear infinite; }
@keyframes travel { to { left: 100%; } }
@keyframes travel-down { to { top: 100%; } }
@keyframes pulse { 50% { box-shadow: 0 0 40px rgba(96, 165, 250, 0.6); } }
.signals { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.signal { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.signal h3 { margin: 0 0 6px; font-size: 17px; }
.signal p { margin: 0; color: var(--muted); font-size: 15px; }
.engine { margin-top: 16px; padding: 20px 22px; border-radius: var(--radius); border: 1px solid var(--accent); background: rgba(96, 165, 250, 0.08); color: var(--muted); }
.engine strong { color: var(--text); }

.more { margin-top: 20px; }
.more a { color: var(--accent); text-decoration: none; font-weight: 600; }
.more a:hover { text-decoration: underline; }

/* Methodology page */
.nav nav a[aria-current="page"] { color: var(--text); }
.doc-hero { text-align: center; padding-top: 96px; }
.doc-body { max-width: 860px; }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 24px; }
.toc-title { margin: 0 0 8px; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--accent); }
.chapter { padding: 56px 0 8px; border-top: 1px solid var(--line); margin-top: 40px; scroll-margin-top: 64px; }
.chapter:first-of-type { border-top: 0; margin-top: 0; }
.chapter-num { font-family: Georgia, serif; font-size: 15px; color: var(--sell); margin: 0 0 4px; letter-spacing: 0.1em; }
.chapter p, .chapter li { color: #c3cbe0; font-size: 17px; line-height: 1.75; }
.chapter em { color: var(--text); }
.formula { margin: 28px 0; padding: 22px 20px 14px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.formula math { font-size: 1.3em; color: var(--text); font-family: "STIX Two Math", "Cambria Math", "Latin Modern Math", math; }
.formula.highlight { border-color: var(--charge); background: rgba(52, 211, 153, 0.07); }
.formula-label { margin: 12px 0 0; text-align: center; font-size: 13px !important; color: var(--muted) !important; line-height: 1.5 !important; }

.fig { margin: 32px 0; padding: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.fig svg { display: block; width: 100%; height: auto; }
.fig figcaption { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.fig figcaption strong { color: var(--text); }
.fig .grid-line { stroke: var(--line); stroke-width: 1; }
.fig .axis { fill: var(--muted); font-size: 12px; }
.fig .axis-title { fill: var(--muted); font-size: 12px; font-weight: 600; }
.fig .fig-note { fill: var(--muted); font-size: 12px; font-weight: 600; }
.fig .fig-note.charge { fill: var(--charge); }
.fig .fig-note.sell { fill: var(--sell); }
.fig .price-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linejoin: round; }
.fig .soc-line { fill: none; stroke: var(--charge); stroke-width: 3; stroke-linejoin: round; }
.fig .sell-line { fill: none; stroke: var(--sell); stroke-width: 3; }
.fig .soc-area { fill: var(--charge); opacity: 0.12; }
.fig .band-outer { fill: var(--accent); opacity: 0.12; }
.fig .band-inner { fill: var(--accent); opacity: 0.22; }
.fig .path-sample { fill: none; stroke: var(--text); stroke-width: 1; opacity: 0.35; }
.fig .dash-line { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 6 5; }
.fig .demand-line { stroke: var(--text); stroke-width: 2; stroke-dasharray: 5 4; }
.fig .clear-line { stroke: var(--sell); stroke-width: 2; stroke-dasharray: 5 4; }
.fig .merit-label { fill: var(--muted); font-size: 11px; }
.fig .merit-demand { fill: var(--text); font-size: 12px; font-weight: 600; }
.fig .merit-clear { fill: var(--sell); font-size: 12px; font-weight: 700; }
.fig .bar { fill: var(--accent); opacity: 0.75; }
.fig .bar.tail { fill: var(--sell); opacity: 1; }
.fig .risk-line { stroke: var(--sell); stroke-width: 2; }
.fig .risk-line.cvar { stroke-dasharray: 5 4; }
.fig .heat-cell:hover { stroke: var(--text); stroke-width: 1.5; }

.key { display: inline-block; width: 14px; height: 4px; border-radius: 2px; vertical-align: middle; margin: 0 6px 0 2px; }
.key-price { background: var(--accent); }
.key-soc { background: var(--charge); }
.key-sell { background: var(--sell); }
.key-band { background: rgba(96, 165, 250, 0.35); height: 10px; }
.key-dash { background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 7px); }

.fig-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { background: var(--bg-2); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; cursor: pointer; }
.chip.active { color: var(--bg); background: var(--charge); border-color: var(--charge); font-weight: 600; }

/* Reveal animations: draw lines, fade areas, grow bars once the figure scrolls into view. */
.fig .draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2s ease-out; }
.fig .fade { opacity: 0; transition: opacity 1.2s ease-out 0.4s; }
.fig .grow { transform: scaleY(0); transform-origin: bottom; transform-box: fill-box; transition: transform 0.6s ease-out; }
.fig.in-view .draw { stroke-dashoffset: 0; }
.fig.in-view .soc-area.fade { opacity: 0.12; }
.fig.in-view .band-outer.fade { opacity: 0.12; }
.fig.in-view .band-inner.fade { opacity: 0.22; }
.fig.in-view .grow { transform: scaleY(1); }

.checks { padding-left: 20px; }
.checks li { margin-bottom: 8px; }
.checks strong { color: var(--text); }

.stack-diagram { display: flex; align-items: center; gap: 10px; margin: 24px 0; padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.stack-diagram .col { display: grid; gap: 8px; }
.stack-diagram .node small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; margin-top: 2px; }

.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0 40px; }
.team-card { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--sell); border-radius: var(--radius); padding: 22px; }
.team-card h3 { margin: 0 0 6px; font-size: 17px; }
.team-card p { margin: 0; font-size: 15px !important; color: var(--muted) !important; line-height: 1.6 !important; }

/* Grid storage 101 page */
.meta-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: 14px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.fact-v { display: block; font-size: 30px; font-weight: 700; letter-spacing: -0.02em; color: var(--sell); }
.fact-k { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 4px; }
sup a { color: var(--accent); text-decoration: none; font-size: 0.8em; }

.fig .ground { stroke: var(--line); stroke-width: 2; }
.fig .site-label { fill: var(--muted); font-size: 12px; text-anchor: middle; }
.fig .site-box { fill: var(--bg-2); stroke: var(--muted); stroke-width: 2; }
.fig .site-box.control { stroke: var(--accent); }
.fig .site-coil { fill: none; stroke: var(--sell); stroke-width: 3; }
.fig .site-glyph { fill: var(--text); font-size: 15px; font-weight: 700; text-anchor: middle; }
.fig .site-glyph-line { stroke: var(--muted); stroke-width: 2; }
.fig .site-small { fill: var(--muted); font-size: 11px; text-anchor: middle; }
.fig .site-flow { stroke-width: 5; stroke-linecap: round; stroke-dasharray: 2 14; animation: flow-right 0.9s linear infinite; fill: none; }
.fig .site-flow.ac { stroke: var(--sell); }
.fig .site-flow.dc { stroke: var(--charge); }
.fig .site-data { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 4 4; animation: flow-right 1.4s linear infinite; }
.fig .container rect:first-child { fill: var(--bg-2); stroke: var(--text); stroke-width: 2; }
.fig .container .cell { fill: var(--charge); opacity: 0.7; animation: cell-pulse 3s ease-in-out infinite; }
.fig .container:nth-child(2) .cell { animation-delay: 0.4s; }
.fig .container:nth-child(3) .cell { animation-delay: 0.8s; }
@keyframes cell-pulse { 50% { opacity: 0.35; } }
.fig .fan circle { fill: var(--bg-2); stroke: var(--muted); stroke-width: 2; }
.fig .fan path { stroke: var(--muted); stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: spin 1.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fig .callout circle { fill: var(--sell); }
.fig .callout text { fill: var(--bg); font-size: 13px; font-weight: 700; text-anchor: middle; }
.key-ac { background: var(--sell); }
.key-dc { background: var(--charge); }
.key-data { background: repeating-linear-gradient(90deg, var(--accent) 0 4px, transparent 4px 7px); }
.legend-list { padding-left: 22px; }
.legend-list li { margin-bottom: 8px; }
.legend-list li::marker { color: var(--sell); font-weight: 700; }
.legend-list strong { color: var(--text); }

.cycle { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 20px; counter-reset: c; }
.cycle-step { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.cycle-step:not(:last-child)::after { content: "→"; position: absolute; right: -12px; top: 26px; color: var(--muted); font-size: 18px; z-index: 1; }
.cycle-step h3 { margin: 10px 0 4px; font-size: 17px; }
.cycle-step p { margin: 0; font-size: 14px !important; line-height: 1.55 !important; color: var(--muted) !important; }
.cycle-n { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-weight: 700; color: var(--bg); }
.cycle-n.charge { background: var(--charge); }
.cycle-n.store { background: var(--accent); }
.cycle-n.sell { background: var(--sell); }
.cycle-n.grid { background: #a78bfa; }

.freq { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; }
.gauge-track { fill: none; stroke: var(--bg-2); stroke-width: 22; }
.gauge-band { fill: none; stroke: var(--charge); stroke-opacity: 0.35; stroke-width: 22; }
.gauge-tick { stroke: var(--muted); stroke-width: 1.5; }
.gauge-label { fill: var(--muted); font-size: 12px; }
.needle { stroke: var(--sell); stroke-width: 4; stroke-linecap: round; }
.needle-hub { fill: var(--sell); }
.freq-readout { font-size: 44px !important; font-weight: 700; margin: 0 0 4px !important; color: var(--text) !important; font-variant-numeric: tabular-nums; line-height: 1.1 !important; }
.freq-readout small { font-size: 18px; color: var(--muted); }
.freq-state { display: flex; gap: 8px; align-items: center; font-size: 14px !important; margin: 0 0 14px !important; }
.freq-state .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.freq-state[data-state="discharging"] .dot { background: var(--sell); box-shadow: 0 0 10px var(--sell); }
.freq-state[data-state="charging"] .dot { background: var(--charge); box-shadow: 0 0 10px var(--charge); }
.freq-bar { position: relative; height: 10px; border-radius: 5px; background: var(--bg-2); overflow: hidden; }
.freq-bar::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--muted); }
#freq-power { position: absolute; top: 0; bottom: 0; transition: width 0.1s, left 0.1s; }
#freq-power.out { background: var(--sell); }
#freq-power.in { background: var(--charge); }
.freq-power-label { font-size: 13px !important; margin: 6px 0 16px !important; }
.freq-power-label strong { font-variant-numeric: tabular-nums; }

.stack { display: flex; gap: 3px; height: 54px; border-radius: 12px; overflow: hidden; }
.stack-seg { border: 0; cursor: pointer; font: inherit; font-size: 13px; color: var(--bg); font-weight: 600; opacity: 0.55; transition: opacity 0.2s, transform 0.2s; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; }
.stack-seg b { display: block; font-size: 15px; }
.stack-seg.active, .stack-seg:hover { opacity: 1; }
.stack-seg.s1 { background: var(--accent); }
.stack-seg.s2 { background: var(--sell); }
.stack-seg.s3 { background: var(--charge); }
.stack-seg.s4 { background: #a78bfa; }
.stack-seg.s5 { background: #f472b6; }
.stream { margin-top: 16px; padding: 18px 20px; background: var(--bg-2); border-radius: 12px; min-height: 150px; }
.stream h3 { margin: 0 0 6px; }
.stream p { margin: 0 0 12px; font-size: 15px !important; }
.stream dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; font-size: 14px; }
.stream dt { color: var(--muted); }
.stream dd { margin: 0; color: var(--text); }

.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--line); border-radius: var(--radius); }
.cmp { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.cmp th, .cmp td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.cmp th { background: var(--card); color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.cmp td { color: #c3cbe0; }
.cmp tr:last-child td { border-bottom: 0; }
.cmp td:first-child { color: var(--text); font-weight: 600; }
.note { font-size: 14px !important; color: var(--muted) !important; }
.note a { color: var(--accent); }

.fig .scale-bar { fill: var(--accent); transform-box: fill-box; transform-origin: left; animation: grow-x 1.2s ease-out both; }
.fig .scale-bar.big { fill: var(--sell); }
@keyframes grow-x { from { transform: scaleX(0); } }

.land { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px 0; }
.land-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-align: center; }
.land-v { display: block; font-size: 26px; font-weight: 700; color: var(--charge); }
.land-k { display: block; font-size: 13px; color: var(--muted); }
.timeline { list-style: none; padding: 0; margin: 24px 0; counter-reset: t; }
.timeline li { counter-increment: t; position: relative; padding: 0 0 18px 48px; }
.timeline li::before { content: counter(t); position: absolute; left: 0; top: 2px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--charge); color: var(--charge); font-weight: 700; font-size: 14px; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 34px; bottom: 0; width: 1px; background: var(--line); }
.timeline strong { color: var(--text); }

.faq { display: grid; gap: 10px; margin-top: 20px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; }
.faq details[open] { border-color: var(--accent); }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 20px; line-height: 1; transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 16px; font-size: 15px !important; }

.sources { margin: 56px 0 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.sources h3 { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.sources ol { padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.sources a { color: var(--accent); }
.sources li:target { color: var(--text); }

/* Homepage numbers strip */
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 24px; }
.numbers .fact-v { font-size: 34px; }

/* Why */
.why ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.why li { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 18px 20px; color: var(--muted); }
.why strong { color: var(--text); display: block; }

.invest-card {
  text-align: center;
  padding: 48px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.12), rgba(251, 191, 36, 0.12)), var(--card);
}
.invest-card p:not(.eyebrow) { color: var(--muted); max-width: 600px; margin: 12px auto 28px; }

.contact-form { max-width: 640px; margin: 0 auto; text-align: left; display: grid; gap: 14px; }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.contact-form .opt { color: var(--muted); font-weight: 400; }
.contact-form input, .contact-form select, .contact-form textarea {
  font: inherit; font-size: 15px; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%;
}
.contact-form textarea { resize: vertical; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25); }
.contact-form [aria-invalid="true"] { border-color: #f87171; }
.contact-form .btn { justify-self: start; }
.contact-form .btn:disabled { opacity: 0.6; cursor: wait; }
.contact-form .hp { position: absolute; left: -9999px; }
.form-status { margin: 0 !important; min-height: 1.5em; font-size: 14px; }
.form-status.ok { color: var(--charge) !important; }
.form-status.err { color: #f87171 !important; }

footer { text-align: center; color: var(--muted); font-size: 13px; padding: 32px 24px 48px; border-top: 1px solid var(--line); }

@media (max-width: 720px) {
  .nav nav { display: none; }
  main section { padding: 56px 16px; }
  .steps { grid-template-columns: 1fr; }
  .signals { grid-template-columns: 1fr; }
  .team { grid-template-columns: 1fr; }
  .facts, .land, .numbers { grid-template-columns: 1fr 1fr; }
  .cycle { grid-template-columns: 1fr 1fr; }
  .cycle-step::after { display: none; }
  .freq { grid-template-columns: 1fr; }
  .stack-seg { font-size: 11px; }
  .contact-form .row { grid-template-columns: 1fr; }
  .invest-card { padding: 32px 16px; }
  .toc ol { columns: 1; }
  .fig { padding: 12px; }
  .formula { padding: 16px 12px 10px; }
  .formula math { font-size: 1em; }
  .stack-diagram { flex-direction: column; align-items: stretch; padding: 16px; }
  .stack-diagram .wire { height: 24px; width: 3px; min-width: 0; flex: none; align-self: center; }
  .stack-diagram .wire span { left: 0; top: -30%; width: 100%; height: 30%; animation-name: travel-down; }
  .pipeline { gap: 6px; }
  .node { padding: 8px 8px; font-size: 12px; }
  .wire { min-width: 16px; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .stats > div { padding: 10px; }
  .stats .v { font-size: 18px; }
  .card { padding: 12px; }
  .status { position: static; margin: 10px; width: fit-content; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flow.charging, .flow.discharging { animation-duration: 2.4s; }
  .wire span, .node.core, .fig .site-flow, .fig .site-data, .fig .container .cell, .fig .fan path, .fig .scale-bar { animation: none; }
}

/* Landowners and About pages */
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--sell); }
.land-list { padding-left: 1.1em; }
.land-list li { margin: 8px 0; color: var(--muted); }
.land-list strong { color: var(--text); }
.land-steps { list-style: none; counter-reset: step; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.land-steps li { counter-increment: step; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 18px; }
.land-steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sell); color: var(--bg); font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.land-steps h3 { margin: 0 0 6px; font-size: 17px; }
.land-steps p { margin: 0; font-size: 15px !important; color: var(--muted) !important; }
.deals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0; }
.deal { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--charge); border-radius: var(--radius); padding: 22px; }
.deal h3 { margin: 0; font-size: 18px; }
.deal .deal-tag { margin: 4px 0 10px !important; color: var(--charge) !important; font-size: 12px !important; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; }
.deal p { font-size: 15px !important; color: var(--muted) !important; margin: 0; }
.land-note { font-size: 14px !important; color: var(--muted) !important; }
.faq { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 8px 0 0; color: var(--muted); }
.founder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 36px; align-items: center; margin: 8px 0 48px; }
.founder img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.founder h2 { margin: 0 0 12px; }
.founder-links { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 720px) {
  .land-steps, .deals, .founder { grid-template-columns: 1fr; }
}
