:root {
  --bg: #000;
  --bg-2: #0a0a0a;
  --panel: #111;
  --panel-2: #161616;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #fff;
  --muted: #999;
  --dim: #666;
  --amber: #ffb224;
  --amber-soft: rgba(255, 178, 36, 0.14);
  --up: #4ade80;
  --down: #f87171;
  --radius: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--amber); color: #000; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px;
  font-weight: 500; font-size: 15px; letter-spacing: -0.01em;
  border: 0; cursor: pointer; white-space: nowrap;
  transition: transform .2s ease, background .2s ease, opacity .2s ease;
}
.btn:active { transform: scale(0.97); }
.btn-light { background: #fff; color: #000; }
.btn-light:hover { background: #e6e6e6; }
.btn-dark { background: rgba(255, 255, 255, 0.1); color: #fff; }
.btn-dark:hover { background: rgba(255, 255, 255, 0.16); }
.btn-amber { background: var(--amber); color: #000; }
.btn-amber:hover { background: #ffc24f; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.logo { font-weight: 700; font-size: 19px; letter-spacing: -0.03em; }
.logo span { color: var(--amber); }
.nav-links { display: flex; gap: 32px; }
.nav-links a { color: var(--muted); font-size: 14px; font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: #fff; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-toggle { display: none; width: 36px; height: 36px; background: rgba(255,255,255,.1); border: 0; border-radius: 999px; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: #fff; transition: transform .25s ease; }
.nav-toggle span:first-child { top: 14px; }
.nav-toggle span:last-child { top: 20px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }

/* ---------- Type ---------- */
h1, h2, h3 { margin: 0; letter-spacing: -0.045em; font-weight: 600; line-height: 1.02; }
h1 { font-size: clamp(44px, 8.4vw, 104px); }
h2 { font-size: clamp(34px, 5.6vw, 68px); }
h3 { font-size: 22px; letter-spacing: -0.025em; line-height: 1.2; }
.lead { color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; max-width: 620px; margin: 24px auto 0; letter-spacing: -0.01em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 28px;
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-2);
  color: var(--muted); font-size: 13px; font-weight: 500;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 12px var(--amber); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.amber { color: var(--amber); }

/* ---------- Reveal on scroll ---------- */
/* Hidden only once the page's script has confirmed it runs (.js on <html>); .reveal-all is the 2.5s failsafe. */
.js .reveal { opacity: 0; transform: translateY(24px); filter: blur(6px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1), filter .9s ease; }
.js .reveal.in, .reveal-all .reveal { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; filter: none; transition: none; } html { scroll-behavior: auto; } }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 168px 0 96px; text-align: center; overflow: hidden; }
.hero-glow {
  position: absolute; left: 50%; top: 360px; width: 1100px; height: 700px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255, 178, 36, 0.22), rgba(255, 120, 20, 0.06) 55%, transparent 75%);
  pointer-events: none; filter: blur(20px);
}
.hero-copy { position: relative; }
.hero-copy h1 { max-width: 980px; margin: 0 auto; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.hero-copy .reveal:nth-child(2) { transition-delay: .08s; }
.hero-copy .reveal:nth-child(3) { transition-delay: .16s; }
.hero-copy .reveal:nth-child(4) { transition-delay: .24s; }

/* ---------- Product preview ---------- */
.preview {
  position: relative; margin: 80px auto 0; text-align: left;
  background: linear-gradient(180deg, #121212, #0a0a0a);
  border: 1px solid var(--line-2); border-radius: 20px; overflow: hidden;
  box-shadow: 0 40px 120px -20px rgba(255, 160, 30, 0.18), 0 0 0 1px rgba(0,0,0,.6);
}
.preview-bar { display: flex; align-items: center; gap: 14px; height: 44px; padding: 0 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.lights { display: flex; gap: 6px; }
.lights i { width: 10px; height: 10px; border-radius: 50%; background: #333; }
.preview-title { color: #ddd; font-weight: 500; }
.preview-hint { margin-left: auto; color: var(--dim); }
.preview-body { display: grid; grid-template-columns: 220px 1fr 280px; height: 560px; }
.preview-side { border-right: 1px solid var(--line); overflow-y: auto; padding: 10px; scrollbar-width: thin; }
.sig-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; cursor: pointer;
  font-size: 13px; color: #ccc; text-align: left; transition: background .15s;
}
.sig-btn:hover { background: rgba(255,255,255,.05); }
.sig-btn.active { background: var(--amber-soft); color: #fff; }
.sig-btn .chg { font-variant-numeric: tabular-nums; font-size: 12px; }
.up { color: var(--up); } .down { color: var(--down); }
.preview-graph { position: relative; min-width: 0; }
#graph { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; }
#graph .link { stroke: rgba(255,255,255,.08); transition: stroke .2s, stroke-width .2s; }
#graph .link.neg { stroke-dasharray: 3 4; }
#graph .link.hot { stroke: var(--amber); stroke-opacity: .8; }
#graph .node circle { stroke: #000; stroke-width: 2; transition: r .2s; cursor: pointer; }
#graph .node text { fill: #aaa; font-size: 11px; pointer-events: none; paint-order: stroke; stroke: #000; stroke-width: 3px; }
#graph .node.faded { opacity: .22; }
#graph .node.active text { fill: #fff; font-weight: 600; }
.graph-legend { position: absolute; left: 14px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11px; color: var(--muted); max-width: 70%; pointer-events: none; }
.graph-legend span { display: inline-flex; align-items: center; gap: 6px; }
.graph-legend i { width: 8px; height: 8px; border-radius: 50%; }
.preview-detail { border-left: 1px solid var(--line); padding: 20px; overflow-y: auto; }
.detail-group { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.detail-name { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; margin: 6px 0 14px; }
.detail-value { font-size: 34px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.detail-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.spark { width: 100%; height: 90px; margin: 16px 0 18px; display: block; }
.detail-h { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.conn { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; cursor: pointer; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; color: #ddd; }
.conn:hover { color: var(--amber); }
.conn b { font-weight: 500; font-variant-numeric: tabular-nums; color: var(--muted); }
/* Early-access prompt, shown once a visitor has explored enough (js/engage.js) */
.engage { position: relative; margin-top: 16px; padding: 24px 28px; border: 1px solid var(--amber); border-radius: 20px; background: var(--panel); display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: center; text-align: left; }
.engage[hidden] { display: none; }
.engage .kicker { margin: 0 0 8px; }
.engage h3 { margin: 0 0 10px; font-size: 22px; }
.engage-copy p:not(.kicker) { margin: 0; color: var(--muted); font-size: 14px; }
.engage-form { display: flex; flex-wrap: wrap; gap: 10px; }
.engage-form input[type="email"] { flex: 1 1 200px; min-width: 0; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: #0b0b0b; color: #fff; font: inherit; font-size: 16px; }
.engage-form input[type="email"]:focus { outline: none; border-color: var(--amber); }
.engage-form .btn { height: 40px; }
.engage-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.engage-note { flex-basis: 100%; margin: 0; font-size: 11px; color: var(--dim); }
.engage-note a { color: inherit; text-decoration: underline; }
.engage-note.error { color: #f87171; }
.engage-x { position: absolute; top: 8px; right: 12px; background: none; border: 0; color: var(--dim); font-size: 22px; line-height: 1; cursor: pointer; padding: 6px; }
.engage-x:hover { color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 860px) { .engage { grid-template-columns: 1fr; gap: 16px; padding: 20px; } }
.source-note { color: var(--dim); font-size: 12px; margin: 16px 0 0; text-align: center; }

/* ---------- Sections ---------- */
.section { padding: 140px 0 40px; }
.section-head { text-align: center; max-width: 900px; margin: 0 auto 64px; }
.kicker { color: var(--amber); font-size: 14px; font-weight: 500; margin: 0 0 18px; letter-spacing: -0.01em; }
.section-head .lead { margin-top: 22px; }

/* ---------- Discovery cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 24px;
  transition: border-color .3s, transform .3s, background .3s;
}
.card:hover { border-color: var(--line-2); transform: translateY(-4px); background: #141414; }
.card-tag { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.tag-opportunity { background: rgba(74, 222, 128, .12); color: var(--up); }
.tag-relationship { background: var(--amber-soft); color: var(--amber); }
.tag-risk { background: rgba(248, 113, 113, .12); color: var(--down); }
.card h3 { margin: 18px 0 10px; }
.card .obs { color: var(--muted); font-size: 15px; margin: 0; }
.evidence { margin: 20px 0; padding: 16px; border-radius: 14px; background: #0b0b0b; border: 1px solid var(--line); }
.ev-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; color: var(--muted); }
.ev-row + .ev-row { margin-top: 6px; }
.ev-row b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 15px; }
.evidence .spark { height: 64px; margin: 12px 0 4px; }
.ev-legend { display: flex; gap: 12px; font-size: 11px; color: var(--dim); }
.ev-legend i { display: inline-block; width: 10px; height: 2px; vertical-align: middle; margin-right: 5px; }
.card-more { border-top: 1px solid var(--line); padding-top: 16px; margin-top: auto; }
.card-more summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 500; }
.card-more summary::-webkit-details-marker { display: none; }
.card-more summary::after { content: "+"; font-size: 20px; color: var(--muted); transition: transform .25s; }
.card-more[open] summary::after { transform: rotate(45deg); }
.card-more ul { margin: 12px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.card-more li + li { margin-top: 6px; }
.card-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.card-link { color: var(--amber); font-size: 14px; font-weight: 500; }
.card-save { height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; font-size: 13px; }
.card-save:hover:not([disabled]) { border-color: var(--amber); }

/* ---------- Method demo ---------- */
.method { display: grid; grid-template-columns: 280px 1fr; gap: 16px; }
.method-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.m-step {
  position: relative; display: flex; gap: 14px; align-items: flex-start; width: 100%; text-align: left;
  padding: 16px; border-radius: 14px; border: 1px solid transparent; background: transparent; cursor: pointer;
  transition: background .2s, border-color .2s; overflow: hidden;
}
.m-step:hover { background: rgba(255,255,255,.03); }
.m-step.active { background: var(--panel); border-color: var(--line-2); }
.m-num { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: #1c1c1c; color: var(--muted); }
.m-step.active .m-num, .m-step.done .m-num { background: var(--amber); color: #000; }
.m-name { display: block; font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }
.m-desc { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.m-bar { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--amber); width: 0; }
.m-step.active .m-bar { animation: fill var(--dur, 6s) linear forwards; }
.method.paused .m-step.active .m-bar { animation: none; width: 0; }
@keyframes fill { to { width: 100%; } }
.method-stage {
  min-height: 460px; background: linear-gradient(180deg, #121212, #0b0b0b); border: 1px solid var(--line-2);
  border-radius: 20px; padding: 32px; position: relative; overflow: hidden;
}
.stage-in { animation: stageIn .5s cubic-bezier(.2,.7,.2,1); }
@keyframes stageIn { from { opacity: 0; transform: translateY(12px); } }
.stage-label { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--amber); }
.stage-title { font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; margin: 10px 0 14px; }
.stage-text { color: var(--muted); max-width: 640px; margin: 0; }
.stage-chart { margin-top: 24px; }
.stage-chart svg { width: 100%; height: 220px; display: block; }
.stage-chart .axis text { fill: #666; font-size: 11px; }
.stage-chart .axis line, .stage-chart .axis path { stroke: #222; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.pill { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; color: #ddd; background: rgba(255,255,255,.03); }
.pill b { color: var(--amber); font-weight: 600; }
.scan { margin-top: 24px; display: grid; gap: 8px; }
.scan-row { display: grid; grid-template-columns: 170px 1fr 48px; gap: 12px; align-items: center; font-size: 13px; color: var(--muted); }
.scan-row span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.scan-bar { height: 8px; border-radius: 99px; background: #1a1a1a; overflow: hidden; }
.scan-bar i { display: block; height: 100%; border-radius: 99px; background: #444; animation: grow 1s cubic-bezier(.2,.7,.2,1); }
.scan-row.flag { color: #fff; font-weight: 500; }
.scan-row.flag .scan-bar i { background: var(--amber); }
.scan-cap { font-size: 12px; color: var(--dim); margin-top: 4px; }
@keyframes grow { from { width: 0; } }
.hyp { margin-top: 22px; display: grid; gap: 10px; }
.hyp-item { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 12px; background: #0b0b0b; border: 1px solid var(--line); font-size: 14px; }
.hyp-meter { flex: none; width: 80px; height: 6px; border-radius: 99px; background: #222; overflow: hidden; }
.hyp-meter i { display: block; height: 100%; background: var(--amber); border-radius: 99px; }
.hyp-item span:last-child { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.decision { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.decision div { padding: 16px; border-radius: 14px; background: #0b0b0b; border: 1px solid var(--line); font-size: 14px; color: #ddd; }
.decision b { display: block; font-size: 12px; color: var(--amber); font-weight: 500; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- Thought Laboratory ---------- */
.lab { display: grid; grid-template-columns: 300px 1fr; background: linear-gradient(180deg, #121212, #0a0a0a); border: 1px solid var(--line-2); border-radius: 20px; overflow: hidden; min-height: 620px; }
.lab-side { border-right: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.lab-side h4 { margin: 0 0 6px; font-size: 12px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; }
.obs-btn { text-align: left; width: 100%; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: #0d0d0d; cursor: pointer; transition: border-color .2s, background .2s; }
.obs-btn:hover { border-color: var(--line-2); }
.obs-btn.active { border-color: var(--amber); background: rgba(255,178,36,.06); }
.obs-btn strong { display: block; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.obs-btn small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.lab-progress { margin-top: auto; font-size: 12px; color: var(--muted); }
.lab-progress .bar { height: 4px; border-radius: 99px; background: #222; margin-top: 8px; overflow: hidden; }
.lab-progress .bar i { display: block; height: 100%; background: var(--amber); width: 0; transition: width .5s ease; }
.lab-main { display: flex; flex-direction: column; min-width: 0; }
.lab-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.lab-head .badge { margin-left: auto; padding: 3px 10px; border-radius: 99px; background: #1c1c1c; font-size: 12px; }
.lab-head .badge.live { background: var(--amber-soft); color: var(--amber); }
.chat { flex: 1; overflow-y: auto; padding: 24px 20px; display: flex; flex-direction: column; gap: 16px; max-height: 560px; scroll-behavior: smooth; }
.msg { max-width: 640px; font-size: 15px; line-height: 1.55; }
.msg.user { align-self: flex-end; background: #1f1f1f; padding: 10px 16px; border-radius: 18px 18px 4px 18px; }
.msg.ai { display: flex; gap: 12px; }
.msg.ai .av { flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--amber); color: #000; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.msg.ai .body { color: #e5e5e5; min-width: 0; }
.msg.ai .body p { margin: 0 0 10px; }
.msg.ai .body p:last-child { margin-bottom: 0; }
.msg .mini { margin-top: 10px; padding: 12px; border-radius: 12px; background: #0b0b0b; border: 1px solid var(--line); }
.msg .mini .spark { height: 70px; margin: 6px 0 0; }
.msg .mini-cap { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; gap: 10px; }
.typing span { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: #666; animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 16px; }
.chip { padding: 10px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; font-size: 14px; color: #eee; text-align: left; transition: border-color .2s, background .2s; }
.chip:hover { border-color: var(--amber); background: rgba(255,178,36,.06); }
.composer { display: flex; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--line); }
.composer input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: #0b0b0b; color: #fff; font: inherit; font-size: 16px; }
.composer input:focus { outline: none; border-color: var(--amber); }
.composer input:disabled { opacity: .5; }
.unlock { margin: 0 20px 16px; padding: 18px; border-radius: 14px; border: 1px solid rgba(255,178,36,.35); background: rgba(255,178,36,.06); display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.unlock p { margin: 0; font-size: 14px; color: #ddd; }
.unlock strong { display: block; color: #fff; font-size: 16px; margin-bottom: 2px; }

/* ---------- Capabilities ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.cap { background: #070707; padding: 40px 32px 44px; }
.cap-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--amber-soft); display: grid; place-items: center; margin-bottom: 28px; }
.cap-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--amber); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cap p { color: var(--muted); margin: 10px 0 0; }

/* ---------- Recent findings ---------- */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.project { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; transition: border-color .3s, transform .3s; }
.project:hover { border-color: var(--line-2); transform: translateY(-3px); }
.project-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.project-meta .type { color: var(--amber); }
.project h3 { margin: 16px 0 10px; font-size: 20px; }
.project p { color: var(--muted); font-size: 14px; margin: 0; }
.project-result { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); display: flex; align-items: baseline; gap: 10px; }
.project > p:not(.fig-src) { margin-bottom: 20px; }
.project-result b { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; white-space: nowrap; }
.project-result span { color: var(--muted); font-size: 13px; }
.project .fig-src { margin-top: 10px; font-size: 11px; color: var(--dim); }
.project-cta { margin-top: 14px; color: var(--amber); font-size: 14px; text-decoration: none; }
.project-cta:hover { text-decoration: underline; }

/* ---------- Final CTA ---------- */
.final { position: relative; padding: 200px 0 220px; margin-top: 140px; text-align: center; overflow: hidden; border-top: 1px solid var(--line); background: #000; }
.final-glow { position: absolute; left: 50%; bottom: -380px; width: 1200px; height: 700px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(255,178,36,.28), rgba(255,120,20,.07) 55%, transparent 75%); pointer-events: none; }
.final h2 { position: relative; font-size: clamp(48px, 9vw, 120px); }
.final-ctas { position: relative; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 48px; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 16px; }
.center-cta { display: flex; justify-content: center; margin-top: 32px; }

.footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--dim); font-size: 13px; }
.footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer p { margin: 0; }
.footer-note { margin-left: auto !important; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cards, .projects { grid-template-columns: 1fr 1fr; }
  .method { grid-template-columns: 1fr; }
  .method-steps { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .method-steps li { flex: 1 0 auto; }
  .m-desc { display: none; }
  .lab { grid-template-columns: 1fr; }
  .lab-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .lab-obs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .lab-progress { margin-top: 6px; }
}
@media (max-width: 1024px) {
  .preview-body { grid-template-columns: 1fr 260px; }
  .preview-side { display: none; }
}
@media (max-width: 760px) {
  .container, .nav-inner { padding: 0 16px; }
  .nav-links {
    position: fixed; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: rgba(0,0,0,.96); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px; transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 14px 0; font-size: 18px; color: #fff; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
  .hero { padding: 128px 0 64px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .preview { margin-top: 56px; border-radius: 16px; }
  .preview-hint { display: none; }
  .preview-body { grid-template-columns: 1fr; grid-template-rows: 360px auto; height: auto; }
  .preview-detail { border-left: 0; border-top: 1px solid var(--line); }
  .graph-legend { max-width: 92%; }
  .section { padding: 96px 0 24px; }
  .section-head { margin-bottom: 40px; }
  .cards, .projects, .grid3 { grid-template-columns: 1fr; }
  .card, .project { padding: 20px; }
  .method-stage { padding: 22px; min-height: 0; border-radius: 16px; }
  .m-step { padding: 12px; gap: 8px; }
  .m-name { font-size: 14px; }
  .decision { grid-template-columns: 1fr; }
  .scan-row { grid-template-columns: 112px 1fr 40px; gap: 8px; font-size: 12px; }
  .lab { border-radius: 16px; min-height: 0; }
  .lab-side { padding: 14px; }
  .lab-obs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px; }
  .obs-btn { flex: 0 0 78%; }
  .chat { padding: 18px 14px; max-height: 70vh; }
  .lab-head { padding: 12px 14px; }
  .lab-head > span:nth-child(-n+2) { display: none; }
  #labTopic { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #ddd; }
  .chips { padding: 0 14px 14px; }
  .unlock { margin: 0 14px 14px; }
  .cap { padding: 32px 22px; }
  .final { padding: 140px 0 160px; margin-top: 96px; }
  .final-ctas .btn { flex: 1 1 100%; }
  .footer-note { margin-left: 0 !important; }
}

/* ---------- Energy map (hero preview) ---------- */
.map-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 18px 20px; }
.map-toggle { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line-2); background: #0b0b0b; }
.map-toggle button { height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.map-toggle button[aria-pressed="true"] { background: var(--amber); color: #000; font-weight: 600; }
.map-span { width: min(420px, 100%); margin: 14px auto 0; display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.map-span[hidden] { display: none; }
.map-span label b { color: var(--text, #fff); font-weight: 600; }
.map-span input[type="range"] { width: 100%; accent-color: var(--amber); margin: 0; }
.span-ticks { display: flex; justify-content: space-between; }
.span-ticks button { border: 0; background: none; padding: 2px 0; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.span-ticks button[aria-current="true"] { color: var(--amber); font-weight: 600; }
#energyMap { width: 100%; max-width: 600px; height: auto; display: block; }
#energyMap .tile { cursor: pointer; outline: none; }
#energyMap .tile rect { stroke: transparent; stroke-width: 2; transition: stroke .15s; }
#energyMap .tile:hover rect, #energyMap .tile:focus-visible rect { stroke: #555; }
#energyMap .tile.active rect { stroke: #fff; }
#energyMap .t-st { fill: #fff; font-size: 12px; font-weight: 600; }
#energyMap .t-v { fill: rgba(255,255,255,.78); font-size: 10px; font-variant-numeric: tabular-nums; }
#energyMap .tile.muted .t-st { fill: #666; }
#energyMap .tile.muted .t-v { fill: #444; }
.map-hint { margin: 0; font-size: 12px; color: var(--dim); text-align: center; }
.side-h { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .08em; padding: 6px 10px 8px; }
.detail-value small { font-size: 14px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.detail-rows { margin-top: 6px; }
.detail-note { font-size: 12px; color: var(--dim); margin: 10px 0 0; }
.ev-row b small { color: var(--muted); font-weight: 500; font-size: 12px; }

/* ---------- ERCOT bars, model notes, split ---------- */
.ercot-bars { width: 100%; height: auto; display: block; }
.ercot-bars text { fill: #666; font-size: 11px; }
.ercot-bars.mini { margin: 12px 0 4px; }
.ercot-bars.mini text { display: none; }
.fig-src { margin: 10px 0 0; font-size: 11px; color: var(--dim); }
.model-notes { margin-top: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #0b0b0b; font-size: 12px; color: var(--muted); }
.model-notes p { margin: 0; }
.model-notes b { color: #ddd; font-weight: 600; }
.model-notes ul { margin: 8px 0 0; padding-left: 16px; font-size: 12px; }
.model-notes li + li { margin-top: 4px; }
.split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.split div { padding: 16px; border-radius: 14px; background: #0b0b0b; border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.split b { display: block; font-size: 24px; color: #fff; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .split, .decision { grid-template-columns: 1fr; }
  .map-wrap { padding: 14px 10px; }
}
@media (max-width: 760px) { .preview-body { grid-template-rows: auto auto; } }
.warm { color: #fb923c; } .cool { color: #60a5fa; }

/* Homepage Lab section, open state (allowed account only) */
.lab-open-note { margin: 14px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.lab-open-note a { color: #ddd; text-decoration: underline; }

/* Map: compare */
.cmp-btn { margin-top: 16px; width: 100%; height: 38px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: #ddd; font: inherit; font-size: 13px; cursor: pointer; }
.cmp-btn:hover { border-color: var(--amber); color: #fff; }
.cmp { width: 100%; border-collapse: collapse; margin: 10px 0 4px; font-size: 13px; }
.cmp th, .cmp td { padding: 9px 0 9px 8px; text-align: right; border-top: 1px solid var(--line); vertical-align: top; }
.cmp thead th { border-top: 0; color: #fff; font-weight: 600; font-size: 14px; }
.cmp tbody th { text-align: left; padding-left: 0; color: var(--muted); font-weight: 400; }
.cmp td .v { white-space: nowrap; } .cmp td .u { margin-left: 2px; font-weight: 400; font-size: 11px; color: var(--muted); }
.cmp tr.cmp-grp th { padding-top: 16px; color: #fff; font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.cmp tr.cmp-grp th small { display: block; margin-top: 3px; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); }
.cmp td { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.cmp td small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.cmp td small.warm { color: #fb923c; } .cmp td small.cool { color: #60a5fa; } .cmp td small.up { color: var(--up); } .cmp td small.down { color: var(--down); }
@media (max-width: 420px) { .map-toggle button { padding: 0 11px; } }

/* ---------- Workbench (homepage Lab section) ---------- */
.workbench { background: linear-gradient(180deg, #121212, #0a0a0a); border: 1px solid var(--line-2); border-radius: 20px; padding: 20px; text-align: left; }
.workbench + .engage { margin-top: 16px; }
.wb-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.wb-controls label { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; min-width: 0; white-space: nowrap; }
.wb-controls select { height: 36px; padding: 0 30px 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: #0b0b0b; color: #fff; font: inherit; font-size: 13px; max-width: 100%; min-width: 0; text-overflow: ellipsis; }
.wb-swap { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: #ddd; font-size: 16px; cursor: pointer; }
.wb-swap:hover { border-color: var(--amber); }
.wb-regions { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.wb-regions button { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.wb-regions button[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); color: #000; font-weight: 600; }
.wb-body { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.wb-chart { width: 100%; height: auto; display: block; }
.wb-chart text { fill: #777; font-size: 11px; font-variant-numeric: tabular-nums; }
.wb-chart .wb-axis { fill: #aaa; font-size: 12px; }
.wb-grid { stroke: #1b1b1b; }
.wb-fit { stroke: var(--amber); stroke-width: 2; stroke-dasharray: 6 5; }
.wb-pt { cursor: pointer; outline: none; }
.wb-pt circle { fill: rgba(255,178,36,.55); stroke: #000; stroke-width: 1; transition: r .15s; }
.wb-pt text { fill: #8a8a8a; font-size: 10px; pointer-events: none; }
.wb-pt:hover circle, .wb-pt:focus-visible circle { fill: var(--amber); }
.wb-pt:hover text, .wb-pt.far text { fill: #fff; }
.wb-pt.far circle { fill: #fb923c; }
.wb-pt.active circle { fill: #fff; stroke: var(--amber); stroke-width: 2; }
.wb-pt.active text { fill: #fff; font-weight: 600; }
.wb-read { border-left: 1px solid var(--line); padding-left: 20px; }
.wb-lead { font-size: 18px; line-height: 1.35; color: #fff; font-weight: 600; letter-spacing: -0.01em; margin: 10px 0 12px; }
.wb-line { font-size: 14px; color: #ccc; margin: 0 0 8px; }
.wb-picked { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.wb-picked > b { display: block; font-size: 16px; margin-bottom: 8px; }
@media (max-width: 860px) {
  .wb-body { grid-template-columns: 1fr; }
  .wb-read { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; }
  .wb-regions { margin-left: 0; }
  .workbench { padding: 14px; border-radius: 16px; }
}
.wb-sig { margin-top: 14px; padding: 14px; border: 1px solid var(--amber); border-radius: 12px; font-size: 13px; color: #ccc; }
.wb-sig b { color: #fff; font-size: 14px; }
.wb-sig p { margin: 8px 0 0; }

/* Homepage questions (guess, then reveal) */
.guess { max-width: 640px; margin: 36px auto 8px; text-align: left; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 24px; }
.guess:empty { display: none; }
.g-kicker { margin: 0 0 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); }
.g-q { margin: 0 0 16px; font-size: clamp(20px, 3.4vw, 26px); line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
.g-hl { color: var(--amber); white-space: nowrap; }
.g-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.g-chip { font: inherit; font-size: 14px; color: var(--text); background: rgba(255,255,255,.06); border: 1px solid var(--line-2); border-radius: 999px; padding: 9px 14px; cursor: pointer; }
.g-chip:hover { background: rgba(255,255,255,.1); }
.g-chip[aria-pressed] { background: var(--amber-soft); border-color: var(--amber); color: var(--amber); }
.g-state { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.g-state select { font: inherit; font-size: 15px; color: var(--text); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; min-width: 0; max-width: 100%; }
.g-guess { display: flex; align-items: center; gap: 14px; }
.g-guess input { flex: 1; min-width: 0; accent-color: var(--amber); height: 32px; }
.g-guess output { min-width: 64px; text-align: right; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.g-help, .g-note { font-size: 13px; color: var(--muted); margin: 10px 0 0; line-height: 1.5; }
.g-src { font-size: 12px; color: var(--dim); margin: 10px 0 0; line-height: 1.5; }
.g-you { margin: 0 0 12px; color: var(--muted); }
.g-close { margin: 14px 0 0; line-height: 1.5; }
.g-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.g-facts { margin: 0; display: grid; gap: 10px; }
.g-facts div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.g-facts dt { color: var(--muted); font-size: 14px; }
.g-facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.g-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 15px; }
.g-table th { text-align: left; font-weight: 500; }
.g-table th, .g-table td { padding: 8px 0; border-top: 1px solid var(--line); }
.g-table td { text-align: right; color: var(--muted); padding-left: 12px; }
.g-table td.g-big { color: var(--amber); font-weight: 600; }
.g-access { margin-top: 20px; padding: 16px; border-radius: 12px; background: var(--amber-soft); border: 1px solid rgba(255,178,36,.3); }
.g-access p { margin: 0; line-height: 1.5; }
@media (max-width: 520px) { .guess { padding: 18px 16px; margin-top: 28px; } .g-table td:not(.g-big) { font-size: 13px; } }
.cmp-pick { font: inherit; font-size: 13px; font-weight: 600; color: var(--text); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 5px 6px; max-width: 100%; width: 100%; }
/* J-DESK-244: partial-reporting badge on battery figures. */
.partial-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border: 1px solid #444; border-radius: 999px; font-size: 11px; font-weight: 400; color: var(--muted); white-space: normal; vertical-align: middle; }
.cmp .partial-badge { white-space: nowrap; margin-left: 0; margin-top: 4px; }
