/* ============================================================
   J-SPACE — black + orange interpretability lab aesthetic
   ============================================================ */

:root {
  --bg: #060607;
  --bg-2: #0B0B0D;
  --surface: #121215;

  --orange: #FF6B00;
  --orange-bright: #FF7A18;
  --amber: #FFB347;
  --ember: #CC4E00;
  --glow: #FF9D42;

  --text: #F2F0EC;
  --muted: #8A8A90;
  --line: rgba(255, 107, 0, 0.14);

  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --font-body: "Inter", system-ui, sans-serif;

  --maxw: 1200px;
  --gap: clamp(1.25rem, 4vw, 3rem);
  --radius: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* -------- reset -------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--orange); color: #050505; }

:focus-visible {
  outline: 2px solid var(--orange-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed; top: -60px; left: 12px; z-index: 200;
  background: var(--orange); color: #050505; padding: 10px 16px;
  border-radius: 8px; font-weight: 600; transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* -------- film grain -------- */
.grain {
  position: fixed; inset: 0; z-index: 300; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* -------- scroll progress -------- */
.progress-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 250;
  background: rgba(255,255,255,0.04);
}
.progress-bar span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--ember), var(--orange), var(--amber));
  box-shadow: 0 0 12px var(--orange);
  transition: width .08s linear;
}

/* -------- custom cursor -------- */
.cursor, .cursor-ring { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 400; border-radius: 50%; }
.cursor {
  width: 8px; height: 8px; margin: -4px 0 0 -4px;
  background: var(--orange-bright);
  box-shadow: 0 0 14px 3px rgba(255,122,24,0.7);
  transition: transform .18s var(--ease), opacity .3s;
}
.cursor-ring {
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1px solid rgba(255,107,0,0.5);
  transition: transform .28s var(--ease), width .28s var(--ease), height .28s var(--ease), border-color .28s;
}
.cursor.grow { transform: scale(1.7); }
.cursor-ring.grow { width: 60px; height: 60px; margin: -30px 0 0 -30px; border-color: var(--amber); }
body.cursor-active { cursor: none; }
@media (hover: none), (pointer: coarse) { .cursor, .cursor-ring { display: none; } body.cursor-active { cursor: auto; } }

/* -------- layout helpers -------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gap); }
.container.narrow { max-width: 780px; }

.section { position: relative; padding: clamp(5rem, 12vh, 9rem) 0; }
/* Offset anchored jumps so section tops clear the fixed nav bar */
section[id] { scroll-margin-top: 84px; }
.section + .section { border-top: 1px solid var(--line); }

.section-head { margin-bottom: clamp(2.5rem, 6vh, 4.5rem); max-width: 900px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.kicker {
  display: inline-block; font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--orange); margin-bottom: 1rem;
}
.section-title {
  font-family: var(--font-head); font-weight: 700; line-height: 1.05;
  font-size: clamp(1.9rem, 5vw, 3.4rem); letter-spacing: -0.02em;
}
.section-title.big { font-size: clamp(2.4rem, 8vw, 5.5rem); }

.lead { font-size: clamp(1.05rem, 2vw, 1.35rem); line-height: 1.5; color: #E6E3DD; margin-bottom: 1.25rem; }
p { color: #D8D6D0; }
p + p { margin-top: 1rem; }
.muted-copy { color: var(--muted); }
em { font-style: italic; color: var(--amber); }
strong { color: var(--text); font-weight: 600; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  transition: background .4s var(--ease), border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(6,6,7,0.72);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0.9rem var(--gap);
  display: flex; align-items: center; gap: 1.5rem;
}
.wordmark {
  font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.12em;
  font-size: 1.05rem; color: var(--text); white-space: nowrap;
}
.wordmark::before { content: "◆"; color: var(--orange); margin-right: .5rem; font-size: .7em; vertical-align: 2px; }

.nav-links {
  list-style: none; display: flex; gap: 1.6rem; margin-left: auto;
  font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.04em;
}
.nav-links a {
  color: var(--muted); position: relative; padding: 4px 0;
  transition: color .25s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 0;
  background: var(--orange); transition: width .3s var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after, .nav-links a:hover::after { width: 100%; }

.ca-chip {
  position: relative; display: flex; align-items: center; gap: .5rem;
  border: 1px solid var(--line); border-radius: 999px;
  padding: .45rem .8rem; font-family: var(--font-mono); font-size: .72rem;
  color: var(--muted); transition: border-color .25s, color .25s, background .25s;
}
/* Transparent expansion so the tap target is >=44px while the chip stays slim */
.ca-chip::after {
  content: ""; position: absolute; top: 50%; left: 0; right: 0;
  transform: translateY(-50%); height: 44px; min-height: 44px;
}
.ca-chip:hover { border-color: var(--orange); color: var(--text); background: rgba(255,107,0,0.06); }
.ca-chip-label { color: var(--orange); font-weight: 700; letter-spacing: .1em; }
.ca-chip-value { color: var(--muted); }

/* Menu-only CA action (hidden on desktop) */
.menu-ca-item { display: none; }
.menu-ca {
  display: flex; flex-direction: column; gap: .5rem; text-align: left; width: 100%;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem;
  background: var(--bg); transition: border-color .3s, background .3s;
}
.menu-ca:hover { border-color: var(--orange); background: rgba(255,107,0,0.05); }
.menu-ca-label { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .18em; color: var(--orange); text-transform: uppercase; }
.menu-ca-value { display: flex; align-items: center; gap: .6rem; font-family: var(--font-mono); font-size: 1rem; color: var(--amber); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  width: 44px; height: 44px; padding: 8px; margin-left: auto;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--text); transition: transform .3s, opacity .3s; }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .ca-chip { order: 3; }
  .nav-links {
    position: fixed; inset: 0; top: 0;
    height: 100vh; height: 100dvh;
    flex-direction: column; align-items: flex-start;
    background: rgba(6,6,7,.97);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 5.5rem 2rem 2.5rem; gap: .4rem; font-size: 1.35rem;
    transform: translateX(-102%); transition: transform .45s var(--ease);
    overflow-y: auto; overscroll-behavior: contain;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: flex; align-items: center; width: 100%; min-height: 44px;
    padding: .6rem 0;
  }
  .menu-ca-item { display: block; margin-top: 1.4rem; }

  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Lock body scroll while the mobile menu is open */
  body.menu-open { overflow: hidden; }
}

/* Touch targets: comfortable hit areas on coarse pointers, compact on desktop */
@media (pointer: coarse) {
  .word-chip, .toggle-opt { min-height: 44px; display: inline-flex; align-items: center; }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  overflow: hidden; padding: 6rem 0 4rem;
}
.neural-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-vignette {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(80% 60% at 50% 40%, rgba(255,107,0,0.09), transparent 70%),
    radial-gradient(120% 100% at 50% 100%, rgba(6,6,7,0.9), transparent 60%),
    linear-gradient(180deg, rgba(6,6,7,0.55) 0%, transparent 30%, rgba(6,6,7,0.85) 100%);
}
.hero-inner { position: relative; z-index: 2; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gap); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: 0.22em;
  color: var(--amber); text-transform: uppercase; margin-bottom: 1.6rem;
  border: 1px solid var(--line); border-radius: 999px; padding: .45rem 1rem;
  background: rgba(255,107,0,0.04);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 8px var(--orange); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: .4; transform: scale(.7);} }

.hero-title {
  font-family: var(--font-head); font-weight: 700; letter-spacing: -0.03em;
  font-size: clamp(2.6rem, 8.5vw, 6.4rem); line-height: 0.98;
  max-width: 16ch; margin-bottom: 1.8rem;
  text-wrap: balance;
}
.hero-title .char { display: inline-block; }

.hero-sub {
  max-width: 62ch; font-size: clamp(1rem, 2vw, 1.3rem); line-height: 1.55;
  color: #E6E3DD; margin-bottom: 2.4rem; position: relative;
}
.quote-mark { color: var(--orange); font-family: var(--font-head); font-weight: 700; }
.attribution { display: block; margin-top: .8rem; font-family: var(--font-mono); font-size: .8rem; letter-spacing: .1em; color: var(--muted); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-mono); font-size: .9rem; letter-spacing: .02em;
  padding: .95rem 1.6rem; border-radius: 999px; font-weight: 500;
  transition: transform .25s var(--ease), background .3s, color .3s, box-shadow .3s, border-color .3s;
  will-change: transform;
}
.btn svg { transition: transform .3s var(--ease); }
.btn-primary { background: var(--orange); color: #060607; box-shadow: 0 0 0 rgba(255,107,0,0); }
.btn-primary:hover { background: var(--orange-bright); box-shadow: 0 8px 40px rgba(255,107,0,0.4); }
.btn-primary:hover svg { transform: translateY(3px); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--orange); color: var(--amber); background: rgba(255,107,0,0.05); }
.btn-ghost:hover svg { transform: translate(2px,-2px); }

.scroll-cue {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 3; display: flex; flex-direction: column; align-items: center; gap: .6rem;
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .35em; color: var(--muted);
}
.scroll-cue-line { width: 1px; height: 40px; background: linear-gradient(var(--orange), transparent); position: relative; overflow: hidden; }
.scroll-cue-line::after { content:""; position: absolute; top: -50%; left: 0; width: 100%; height: 50%; background: var(--amber); animation: cueDrop 1.8s var(--ease) infinite; }
@keyframes cueDrop { 0% { transform: translateY(-100%);} 100% { transform: translateY(300%);} }

/* ============================================================
   DISCOVERY
   ============================================================ */
.discovery-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 820px) { .discovery-grid { grid-template-columns: 1fr; } }

.timeline { list-style: none; margin-top: 2.4rem; border-left: 1px solid var(--line); padding-left: 1.6rem; }
.timeline-item { position: relative; padding-bottom: 1.8rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-node {
  position: absolute; left: calc(-1.6rem - 6px); top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--orange); box-shadow: 0 0 10px rgba(255,107,0,0.5);
}
.timeline-label { display: block; font-family: var(--font-mono); font-size: .95rem; color: var(--text); font-weight: 500; }
.timeline-desc { display: block; color: var(--muted); font-size: .92rem; margin-top: .25rem; }

/* Instrument readout strip — a single lab-instrumentation bar */
.readout-strip {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem 1.4rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  padding: 1.4rem 1.6rem;
}
.readout-cell { display: flex; flex-direction: column; gap: .2rem; }
.readout-label {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
}
.readout-num {
  font-family: var(--font-mono); font-weight: 700; font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  color: var(--orange); line-height: 1; letter-spacing: .01em;
}
.readout-div { color: var(--line); font-family: var(--font-mono); font-size: 1.4rem; line-height: 1; }
.readout-caret {
  width: 10px; height: 1.4em; margin-left: auto; background: var(--orange);
  align-self: flex-end; animation: caretBlink 1.05s step-end infinite;
}
@keyframes caretBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
/* On narrow screens the strip wraps to a vertical list inside the same bar */
@media (max-width: 560px) {
  .readout-strip { flex-direction: column; align-items: stretch; gap: 1rem; }
  .readout-div { display: none; }
  .readout-caret { align-self: flex-start; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .readout-caret { animation: none; } }

/* ============================================================
   WHAT
   ============================================================ */
.what-grid, .lens-grid, .safety-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 820px) { .what-grid, .lens-grid, .safety-grid { grid-template-columns: 1fr; } }

.callout {
  position: relative; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 1.4rem 1.5rem;
  font-family: var(--font-head); font-size: clamp(1.1rem, 2.4vw, 1.5rem); font-weight: 500;
  color: var(--text); margin-top: 1.5rem; line-height: 1.35; overflow: hidden;
}
/* short orange rule at top-left instead of a full side-stripe */
.callout::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 32px; height: 2px; background: var(--orange);
}
.hint { font-family: var(--font-mono); font-size: .76rem; color: var(--muted); letter-spacing: .05em; margin: 1.6rem 0 .9rem; }

.word-field { display: flex; flex-wrap: wrap; gap: .6rem; }
.word-chip {
  font-family: var(--font-mono); font-size: .85rem; padding: .5rem .9rem;
  border: 1px solid var(--line); border-radius: 8px; color: var(--muted);
  background: var(--bg-2); transition: all .25s var(--ease); position: relative;
}
.word-chip:hover, .word-chip:focus-visible {
  color: #060607; background: var(--orange); border-color: var(--orange);
  box-shadow: 0 0 24px rgba(255,107,0,0.5); transform: translateY(-3px);
}

/* ============================================================
   LENS
   ============================================================ */
.lens-viz {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
}
@media (max-width: 520px) { .lens-viz { grid-template-columns: 1fr; gap: 1.4rem; } .lens-arrow { transform: rotate(90deg); } }
.lens-tag { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .2em; color: var(--orange); text-transform: uppercase; display: block; margin-bottom: .8rem; }
.lens-numbers { font-family: var(--font-mono); font-size: .74rem; color: var(--muted); line-height: 1.7; word-break: break-all; }
.lens-arrow { display: flex; flex-direction: column; align-items: center; gap: .3rem; color: var(--orange); }
.lens-arrow-label { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .18em; color: var(--amber); }
.lens-words { list-style: none; font-family: var(--font-mono); font-size: .9rem; color: var(--text); }
.lens-words li { display: flex; justify-content: space-between; padding: .3rem 0; border-bottom: 1px solid var(--line); }
.lens-words b { color: var(--amber); }

/* ============================================================
   ZONES
   ============================================================ */
.zones-diagram { display: flex; flex-direction: column; gap: 0; }
.zone-layer {
  display: grid; grid-template-columns: 90px 1fr auto; align-items: center; gap: 1.5rem;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.8rem;
  background: var(--bg-2); transition: border-color .35s, background .35s, transform .35s var(--ease);
}
.zone-layer:hover { border-color: var(--orange); transform: translateX(6px); }
.zone-workspace { background: linear-gradient(100deg, rgba(255,107,0,0.08), var(--surface)); border-color: rgba(255,107,0,0.3); }
.zone-index { font-family: var(--font-mono); font-size: .85rem; color: var(--orange); font-weight: 700; letter-spacing: .05em; }
.zone-body h3 { font-family: var(--font-head); font-size: 1.4rem; margin-bottom: .1rem; }
.zone-role { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .15em; text-transform: uppercase; color: var(--amber); margin-bottom: .5rem; }
.zone-body p { color: var(--muted); font-size: .95rem; max-width: 55ch; }
.zone-bars { display: flex; align-items: flex-end; gap: 4px; height: 40px; }
.zone-bars i { width: 6px; background: var(--orange); border-radius: 2px; animation: bar 1.6s ease-in-out infinite; opacity: .8; }
.zone-bars i:nth-child(1){ height: 40%; animation-delay: 0s; }
.zone-bars i:nth-child(2){ height: 75%; animation-delay: .2s; }
.zone-bars i:nth-child(3){ height: 55%; animation-delay: .4s; }
.zone-bars i:nth-child(4){ height: 90%; animation-delay: .6s; }
.zone-bars i:nth-child(5){ height: 60%; animation-delay: .8s; }
@keyframes bar { 0%,100% { transform: scaleY(.6); } 50% { transform: scaleY(1); } }
.zone-connector { width: 2px; height: 34px; margin-left: calc(0.9rem + 1.8rem); background: linear-gradient(var(--orange), transparent); opacity: .5; }
@media (max-width: 620px) { .zone-layer { grid-template-columns: 1fr; gap: .6rem; } .zone-bars { display: none; } .zone-connector { display: none; } .zones-diagram { gap: 1rem; } }

.zones-punch {
  margin-top: 2.5rem; font-family: var(--font-head); font-weight: 700;
  font-size: clamp(1.4rem, 4vw, 2.4rem); text-align: center; color: var(--text);
  letter-spacing: -0.02em;
}

/* ============================================================
   PROOF
   ============================================================ */
.proof-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; margin-bottom: 3rem; }
@media (max-width: 720px) { .proof-cards { grid-template-columns: 1fr; } }
.proof-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem;
  background: linear-gradient(180deg, var(--surface), var(--bg-2)); position: relative; overflow: hidden;
  transition: border-color .3s, transform .3s var(--ease);
}
.proof-card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .4s;
  background: radial-gradient(60% 80% at 100% 0%, rgba(255,107,0,0.12), transparent 60%);
}
.proof-card:hover { border-color: var(--orange); transform: translateY(-5px); }
.proof-card:hover::before { opacity: 1; }
.proof-num { font-family: var(--font-mono); font-size: .8rem; color: var(--orange); letter-spacing: .15em; text-transform: uppercase; }
.proof-card h3 { font-family: var(--font-head); font-size: 1.3rem; margin: .5rem 0 .6rem; }
.proof-card p { color: var(--muted); font-size: .95rem; }

/* edit demo */
.edit-demo {
  border: 1px solid rgba(255,107,0,0.28); border-radius: var(--radius);
  background: radial-gradient(120% 140% at 0% 0%, rgba(255,107,0,0.08), var(--surface) 55%);
  padding: clamp(1.6rem, 4vw, 2.6rem);
}
.edit-demo-head h3 { font-family: var(--font-head); font-size: clamp(1.3rem, 3vw, 1.9rem); margin: .6rem 0 .5rem; }
.edit-demo-head p { color: var(--muted); max-width: 68ch; }
.edit-demo-body { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 2rem; align-items: center; }
@media (max-width: 720px) { .edit-demo-body { grid-template-columns: 1fr; } }

.edit-row { margin-bottom: 1.6rem; }
.edit-title { display: block; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; padding: 4px; background: var(--bg); }
.toggle-opt {
  font-family: var(--font-mono); font-size: .85rem; padding: .55rem 1.1rem; border-radius: 7px;
  color: var(--muted); transition: all .3s var(--ease); letter-spacing: .05em;
}
.toggle-opt.is-active { background: var(--orange); color: #060607; box-shadow: 0 0 20px rgba(255,107,0,0.45); }

.edit-readout {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem;
  background: var(--bg); text-align: center;
}
.edit-readout-label { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--orange); }
.edit-readout-value { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.4rem, 4vw, 2.2rem); margin: .6rem 0 1.2rem; color: var(--text); }
.edit-sep { color: var(--muted); margin: 0 .6rem; }
.edit-lattice { display: grid; grid-template-columns: repeat(12, 1fr); gap: 5px; }
.edit-lattice span { aspect-ratio: 1; border-radius: 3px; background: rgba(255,107,0,0.08); transition: background .4s var(--ease), box-shadow .4s, transform .4s; }
.edit-lattice span.lit { background: var(--orange); box-shadow: 0 0 12px rgba(255,107,0,0.6); }
.edit-lattice span.lit-amber { background: var(--amber); box-shadow: 0 0 12px rgba(255,179,71,0.6); }

/* ============================================================
   EMERGENCE
   ============================================================ */
.emergence { text-align: center; overflow: hidden; }
.emergence-glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(50% 55% at 50% 30%, rgba(255,107,0,0.14), transparent 70%);
}
.emergence .container { position: relative; z-index: 1; }
.emergence-body { max-width: 760px; margin: 0 auto; }
.emergence-body p { text-align: center; font-size: clamp(1rem, 2vw, 1.2rem); }
.emergence-body .lead { font-size: clamp(1.2rem, 2.6vw, 1.6rem); color: var(--text); }

/* ============================================================
   SAFETY
   ============================================================ */
.safety-thoughts { display: flex; flex-wrap: wrap; gap: .8rem; align-content: flex-start; }
.thought-bubble {
  font-family: var(--font-mono); font-size: .95rem; padding: .7rem 1.1rem;
  border: 1px dashed var(--line); border-radius: 999px; color: var(--muted);
  background: var(--bg-2); transition: all .3s var(--ease);
}
.thought-bubble:hover { color: var(--text); border-color: var(--orange); }
.thought-bubble.strong { color: var(--amber); border-color: rgba(255,107,0,0.4); border-style: solid; background: rgba(255,107,0,0.06); }

/* ============================================================
   CAVEAT
   ============================================================ */
.caveat-box {
  border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.6rem, 4vw, 2.4rem);
  background: var(--bg-2);
}
.caveat-box .kicker { margin-bottom: 1.2rem; }
.caveat-box p { color: #D8D6D0; }
.caveat-box blockquote {
  position: relative; margin-top: 1.4rem; padding: 1.4rem 1.4rem 1.4rem 3rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
  font-family: var(--font-head); font-size: clamp(1.1rem, 2.4vw, 1.4rem); color: var(--text); line-height: 1.4;
}
.caveat-box blockquote::before {
  content: "\201C"; position: absolute; top: .1rem; left: 1rem;
  font-family: var(--font-mono); font-weight: 700; font-size: 2.5rem;
  color: var(--orange); line-height: 1;
}

/* ============================================================
   SOURCES
   ============================================================ */
.source-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 720px) { .source-list { grid-template-columns: 1fr; } }
.source-link {
  display: flex; flex-direction: column; gap: .5rem;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  transition: border-color .3s, transform .3s var(--ease), background .3s;
}
.source-link:hover { border-color: var(--orange); transform: translateY(-4px); background: linear-gradient(180deg, rgba(255,107,0,0.08), var(--bg-2)); }
.source-kind { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .2em; color: var(--orange); text-transform: uppercase; }
.source-name { font-family: var(--font-head); font-weight: 500; font-size: 1.2rem; color: var(--text); }
.source-url { font-family: var(--font-mono); font-size: .8rem; color: var(--muted); }

.disclaimer {
  margin-top: 2.2rem; font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .12em; color: var(--muted);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line); padding: clamp(3rem, 8vh, 5rem) 0 2rem; background: var(--bg-2); position: relative; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 2.5rem; justify-content: space-between; align-items: flex-start; }
.footer-wordmark { font-size: 1.4rem; }
.footer-tag { color: var(--muted); max-width: 34ch; margin-top: .8rem; font-size: .95rem; }
.footer-actions { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }

.ca-block {
  display: flex; flex-direction: column; gap: .5rem; text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem;
  background: var(--bg); transition: border-color .3s, background .3s; max-width: 100%;
}
.ca-block:hover { border-color: var(--orange); background: rgba(255,107,0,0.05); }
.ca-block-label { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .18em; color: var(--orange); text-transform: uppercase; }
.ca-block-value { display: flex; align-items: center; gap: .8rem; color: var(--text); }
.ca-block-value code { font-family: var(--font-mono); font-size: .82rem; word-break: break-all; color: var(--amber); }
.ca-block-value svg { flex-shrink: 0; color: var(--muted); transition: color .3s; }
.ca-block:hover .ca-block-value svg { color: var(--orange); }

.x-link {
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--font-mono); font-size: .9rem; color: var(--text);
  border: 1px solid var(--line); border-radius: 999px; padding: .75rem 1.4rem;
  transition: border-color .3s, background .3s, color .3s;
}
.x-link:hover { border-color: var(--orange); background: var(--orange); color: #060607; }

.footer-fine {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: .72rem; color: var(--muted); letter-spacing: .04em;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translate(-50%, 140%);
  background: var(--orange); color: #060607; font-family: var(--font-mono); font-weight: 700;
  font-size: .85rem; letter-spacing: .05em; padding: .8rem 1.4rem; border-radius: 999px;
  z-index: 500; box-shadow: 0 10px 40px rgba(255,107,0,0.4);
  transition: transform .4s var(--ease); pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); }
.toast.toast-error {
  background: var(--surface); color: var(--amber);
  border: 1px solid var(--orange);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

/* ============================================================
   REVEAL / MOTION
   ============================================================ */
/* Reveal states are gated behind .js so no-JS users see all content immediately. */
.js .reveal { opacity: 0; transform: translateY(28px); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .zone-bars i, .scroll-cue-line::after, .eyebrow .dot { animation: none !important; }
  .cursor, .cursor-ring { display: none !important; }
  * { transition-duration: .001ms !important; }
}
