/* ═══════════════════════════════════════════════════════════════
   FOXWELL META DECISION COACH — design system
   dark war-room / diagnostic-console aesthetic
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #07080a;
  --bg2: #0a0c10;
  --panel: #0d1015;
  --panel2: #10141a;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e9edf2;
  --dim: #8a93a1;
  --lime: #d4ff3f;
  --lime-dim: rgba(212, 255, 63, 0.14);
  --violet: #8a7cff;
  --violet-dim: rgba(138, 124, 255, 0.14);
  --red: #ff4d5e;
  --green: #3ce8a5;
  --amber: #ffb020;
  --blue: #59c2ff;
  --font: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --pad: clamp(20px, 4vw, 56px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: var(--bg); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

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

::selection { background: var(--lime); color: #0a0c05; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #23262e; border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--lime); }

.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
.lime { color: var(--lime); }
.violet { color: var(--violet); }
.red { color: var(--red); }
.green { color: var(--green); }
.amber { color: var(--amber); }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

a { color: inherit; }
button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }

:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

/* ── grain ──────────────────────────────────────────────────── */
.grain {
  position: fixed; inset: -100px; z-index: 90; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  opacity: 0.05;
  animation: grain-shift 0.9s steps(3) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-30px, 20px); }
  66% { transform: translate(25px, -25px); }
  100% { transform: translate(0, 0); }
}

/* ── cursor ─────────────────────────────────────────────────── */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none;
  border-radius: 50%; transform: translate(-100px, -100px);
}
.cursor-dot { width: 7px; height: 7px; background: var(--lime); }
.cursor-ring {
  width: 38px; height: 38px; border: 1px solid rgba(212, 255, 63, 0.5);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.cursor-ring.is-hover { width: 64px; height: 64px; background: rgba(212, 255, 63, 0.07); border-color: var(--lime); }
@media (hover: none), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* ── progress ───────────────────────────────────────────────── */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; background: rgba(255,255,255,0.05); }
#progress-fill { display: block; height: 100%; width: 100%; background: var(--lime); transform-origin: 0 50%; transform: scaleX(0); }

/* ── preloader ──────────────────────────────────────────────── */
#preloader {
  position: fixed; inset: 0; z-index: 1000; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s;
}
#preloader.done { opacity: 0; visibility: hidden; }
.pre-inner { width: min(560px, 86vw); }
.pre-line { font-size: 13px; letter-spacing: 0.18em; margin-bottom: 18px; }
.pre-log { font-size: 12px; line-height: 2; color: var(--dim); min-height: 96px; }
.pre-log .ok { color: var(--lime); }
.pre-bar { height: 2px; background: rgba(255,255,255,0.08); margin-top: 16px; overflow: hidden; }
#pre-bar-fill { display: block; height: 100%; width: 0%; background: var(--lime); transition: width 0.3s ease; }

/* ── HUD top bar ────────────────────────────────────────────── */
.hud {
  position: fixed; top: 3px; left: 0; right: 0; z-index: 110;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px var(--pad); font-size: 11px; letter-spacing: 0.16em;
  mix-blend-mode: difference; color: #fff;
}
.hud-slash { color: var(--lime); margin: 0 2px; mix-blend-mode: normal; }
.hud-right { display: flex; gap: 22px; }
.hud-item { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-lime { background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.dot-red { background: var(--red); box-shadow: 0 0 10px var(--red); }
.dot-violet { background: var(--violet); box-shadow: 0 0 10px var(--violet); }
.dot.pulse { animation: dot-pulse 1.6s ease-in-out infinite; }
@keyframes dot-pulse { 50% { opacity: 0.25; } }

/* ── buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em;
  padding: 16px 28px; border: 1px solid var(--line-strong);
  text-decoration: none; position: relative; overflow: hidden;
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}
.btn-lime { background: var(--lime); color: #0a0c05; border-color: var(--lime); font-weight: 700; }
.btn-lime:hover { background: #e6ff70; border-color: #e6ff70; }
.btn-ghost { color: var(--text); }
.btn-ghost:hover { border-color: var(--lime); color: var(--lime); }
.btn-mini { font-size: 11px; padding: 7px 12px; border: 1px solid var(--line-strong); letter-spacing: 0.1em; transition: all .25s; }
.btn-mini:hover { border-color: var(--lime); color: var(--lime); }

/* ── shared section chrome ──────────────────────────────────── */
.section { padding: clamp(90px, 16vh, 190px) 0; position: relative; }
.sec-label { font-size: 12px; letter-spacing: 0.28em; color: var(--dim); margin-bottom: 26px; }
.sec-label .lime, .sec-label .violet { font-weight: 700; }
.sec-title {
  font-size: clamp(42px, 7vw, 96px); font-weight: 700; line-height: 0.98;
  letter-spacing: -0.02em; text-transform: uppercase; margin-bottom: 30px;
}
.sec-title em { font-style: normal; }
.sec-sub { max-width: 640px; color: var(--dim); font-size: clamp(16px, 1.6vw, 19px); }
.sec-sub.wide { max-width: 780px; }
.sec-sub strong, .moment-copy strong { color: var(--text); }

/* reveal base (JS enhances; content visible without JS) */
.reveal { will-change: transform, opacity; }

/* ═══════════════ HERO ═══════════════ */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7,8,10,0.72) 0%, rgba(7,8,10,0.15) 34%, rgba(7,8,10,0.12) 62%, rgba(7,8,10,0.92) 100%);
}
.hero-content { position: relative; z-index: 2; padding-bottom: 84px; padding-top: 120px; }
.hero-eyebrow { font-size: 12px; letter-spacing: 0.3em; color: var(--dim); margin-bottom: 20px; }
.hero-title {
  font-size: clamp(52px, 10.4vw, 148px); font-weight: 700; line-height: 0.92;
  letter-spacing: -0.03em; text-transform: uppercase; margin-bottom: 24px;
}
.hero-line { display: block; overflow: hidden; }
.hero-line > span { display: inline-block; will-change: transform; }
.hero-sub { max-width: 620px; font-size: clamp(16px, 1.7vw, 20px); color: #c3c9d2; margin-bottom: 22px; }
.hero-sub strong { color: var(--lime); font-weight: 600; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; letter-spacing: 0.18em; color: var(--dim); margin-bottom: 30px; }
.hero-meta i { color: var(--lime); font-style: normal; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; }

.hero-scrollcue {
  position: absolute; right: var(--pad); bottom: 96px; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 10px; letter-spacing: 0.3em; color: var(--dim);
  writing-mode: vertical-rl;
}
.hero-scrollcue em { font-style: normal; color: var(--lime); animation: cue 1.8s ease-in-out infinite; writing-mode: horizontal-tb; }
@keyframes cue { 50% { transform: translateY(8px); } }

.marquee {
  position: relative; z-index: 2; border-top: 1px solid var(--line);
  background: rgba(7,8,10,0.82); backdrop-filter: blur(6px); overflow: hidden; padding: 14px 0;
}
.marquee-track { display: flex; white-space: nowrap; animation: marquee 36s linear infinite; font-size: 12px; letter-spacing: 0.22em; color: var(--dim); }
.marquee-track span { padding-right: 12px; }
.marquee-track b { color: var(--red); font-weight: 400; padding: 0 12px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ═══════════════ 01 MOMENT ═══════════════ */
#moment { background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%); }
.moment-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 6vw, 90px); align-items: center; margin-top: 20px; }
.moment-copy p { margin-bottom: 20px; color: var(--dim); font-size: clamp(16px, 1.6vw, 19px); }
.moment-copy p strong em { font-style: normal; color: var(--red); }
.moment-note { font-size: 11px !important; letter-spacing: 0.14em; color: #5c6470 !important; line-height: 1.9; }

.moment-stage { position: relative; min-height: 420px; display: flex; align-items: center; justify-content: center; }
.panic-card {
  position: relative; width: min(460px, 100%); background: var(--panel);
  border: 1px solid var(--line-strong); border-radius: 12px; padding: 22px 24px 26px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,77,94,0.08), 0 0 60px rgba(255,77,94,0.06);
  transform: rotate(-1.2deg);
}
.panic-head { display: flex; align-items: center; gap: 10px; font-size: 10px; letter-spacing: 0.2em; color: var(--dim); margin-bottom: 16px; }
.panic-text { font-size: 15.5px; line-height: 1.65; color: var(--text); min-height: 180px; }
.panic-text .hl-red { color: var(--red); font-weight: 600; }
.panic-cursor { position: absolute; width: 8px; height: 18px; background: var(--red); animation: blink 0.85s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.chip {
  position: absolute; padding: 9px 14px; font-size: 11px; letter-spacing: 0.1em;
  background: var(--panel2); border: 1px solid var(--line-strong); border-radius: 100px;
  color: var(--text); box-shadow: 0 14px 40px rgba(0,0,0,0.5); white-space: nowrap;
}
.chip.red { border-color: rgba(255,77,94,0.5); color: var(--red); }
.chip-1 { top: 2%; left: 4%; transform: rotate(-5deg); }
.chip-2 { top: 8%; right: 0%; transform: rotate(4deg); }
.chip-3 { bottom: 10%; left: -2%; transform: rotate(3deg); }
.chip-4 { bottom: 0%; right: 8%; transform: rotate(-4deg); color: var(--dim); }

/* ═══════════════ 02 PHASES ═══════════════ */
.phases { background: var(--bg2); padding-top: clamp(90px, 14vh, 170px); overflow: hidden; }
.phases-intro { padding-bottom: clamp(50px, 8vh, 90px); }
.phases-pin { position: relative; }
.phases-track {
  display: flex; gap: clamp(24px, 3vw, 48px);
  padding: 0 var(--pad) clamp(80px, 12vh, 130px);
  width: max-content;
}
.phase-panel {
  position: relative; flex-shrink: 0; width: min(78vw, 860px);
  border: 1px solid var(--line); background: linear-gradient(160deg, var(--panel) 0%, var(--bg2) 100%);
  border-radius: 20px; padding: clamp(28px, 4vw, 56px);
  min-height: min(66vh, 560px); display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden;
}
.phase-num {
  position: absolute; top: -0.14em; right: 0.05em;
  font-size: clamp(150px, 24vw, 320px); font-weight: 700; line-height: 0.8;
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,0.1); pointer-events: none;
}
.phase-num.violet { -webkit-text-stroke-color: rgba(138,124,255,0.35); }
.phase-name { font-size: clamp(30px, 4vw, 52px); font-weight: 700; letter-spacing: -0.01em; text-transform: uppercase; margin-bottom: 16px; }
.phase-desc { max-width: 560px; color: var(--dim); font-size: clamp(15px, 1.4vw, 17.5px); margin-bottom: 30px; }
.phase-desc strong, .phase-desc em { color: var(--text); font-style: normal; }
.phase-visual { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.qchip {
  font-size: 11px; letter-spacing: 0.1em; padding: 10px 15px;
  border: 1px dashed rgba(212,255,63,0.35); border-radius: 100px; color: #cfd6de;
}
.qchip:hover { border-color: var(--lime); color: var(--lime); }

.playbook-mini { flex-direction: column; align-items: stretch; gap: 7px; max-width: 420px; }
.pm {
  font-size: 12px; letter-spacing: 0.12em; padding: 11px 16px; border: 1px solid var(--line);
  color: var(--dim); border-radius: 8px; transition: all 0.3s;
}
.pm.active { border-color: var(--lime); color: var(--lime); background: var(--lime-dim); box-shadow: 0 0 30px rgba(212,255,63,0.08); }

.phase-panel-mcp { border-color: rgba(138,124,255,0.3); background: linear-gradient(160deg, #12101f 0%, var(--bg2) 100%); }
.radar { position: relative; width: 130px; height: 130px; flex-shrink: 0; }
.radar i {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 9px; letter-spacing: 0.16em; color: var(--violet); font-style: normal; text-align: center;
}
.radar span { position: absolute; inset: 0; border: 1px solid var(--violet); border-radius: 50%; opacity: 0; animation: radar 3s ease-out infinite; }
.radar span:nth-child(2) { animation-delay: 1s; }
.radar span:nth-child(3) { animation-delay: 2s; }
@keyframes radar { 0% { transform: scale(0.25); opacity: 0.9; } 100% { transform: scale(1.15); opacity: 0; } }
.mini-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.phase-visual-note { width: 100%; font-size: 10px; letter-spacing: 0.14em; }

.tag { font-size: 10px; letter-spacing: 0.14em; padding: 4px 10px; border-radius: 4px; font-weight: 700; }
.tag-fresh { background: rgba(60,232,165,0.14); color: var(--green); border: 1px solid rgba(60,232,165,0.4); }
.tag-recent { background: rgba(89,194,255,0.12); color: var(--blue); border: 1px solid rgba(89,194,255,0.4); }
.tag-aging { background: rgba(255,176,32,0.12); color: var(--amber); border: 1px solid rgba(255,176,32,0.35); }
.tag-stale { background: rgba(138,147,161,0.12); color: var(--dim); border: 1px solid rgba(138,147,161,0.3); }

.ledger-mini { align-items: stretch; gap: 12px; }
.lm-col { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 8px; }
.lm-head { font-size: 10px; letter-spacing: 0.2em; }
.lm-card {
  font-size: 12.5px; line-height: 1.5; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 8px; color: var(--dim); background: rgba(255,255,255,0.02);
}
.lm-card.strike { text-decoration: line-through; opacity: 0.6; }

.plan-mini { flex-direction: column; align-items: stretch; max-width: 520px; gap: 14px; }
.pl-step { display: grid; grid-template-columns: 1fr; gap: 6px; font-size: 11px; letter-spacing: 0.1em; }
.pl-step span { color: var(--text); }
.pl-step em { font-style: normal; color: var(--dim); font-size: 10px; }
.pl-bar { display: block; height: 3px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.pl-bar b { display: block; height: 100%; width: var(--w, 50%); background: linear-gradient(90deg, var(--green), var(--lime)); border-radius: 2px; animation: barflow 2.6s ease-in-out infinite alternate; }
@keyframes barflow { from { filter: brightness(0.75); } to { filter: brightness(1.25); } }

/* ═══════════════ 03 MCP ═══════════════ */
.mcp { background: var(--bg); }
.network-frame {
  position: relative; margin: clamp(40px, 7vh, 80px) var(--pad);
  height: clamp(420px, 68vh, 640px);
  border: 1px solid var(--line-strong); border-radius: 20px; overflow: hidden;
  background: radial-gradient(ellipse 70% 90% at 72% 50%, rgba(138,124,255,0.07) 0%, transparent 60%),
              radial-gradient(ellipse 40% 60% at 14% 50%, rgba(212,255,63,0.05) 0%, transparent 60%), var(--bg2);
}
#network-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.net-hud { position: absolute; z-index: 3; font-size: 10.5px; letter-spacing: 0.18em; color: var(--dim); display: flex; align-items: center; gap: 9px; }
.net-hud-tl { top: 18px; left: 20px; color: var(--violet); }
.net-hud-tr { top: 18px; right: 20px; }
.net-hud-tr span { color: var(--text); font-weight: 700; }
.net-hud-bl { bottom: 18px; left: 20px; max-width: 60%; color: #b7bfca; }
.net-hud-br { bottom: 18px; right: 20px; gap: 6px; }
.corner { position: absolute; width: 18px; height: 18px; border-color: rgba(212,255,63,0.5); border-style: solid; z-index: 3; }
.c-tl { top: 10px; left: 10px; border-width: 1px 0 0 1px; }
.c-tr { top: 10px; right: 10px; border-width: 1px 1px 0 0; }
.c-bl { bottom: 10px; left: 10px; border-width: 0 0 1px 1px; }
.c-br { bottom: 10px; right: 10px; border-width: 0 1px 1px 0; }

.tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: clamp(40px, 7vh, 70px); }
.tool-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 26px 26px 30px;
  background: linear-gradient(170deg, var(--panel) 0%, transparent 100%);
  transition: border-color 0.35s, transform 0.35s, box-shadow 0.35s;
}
.tool-card:hover { border-color: rgba(138,124,255,0.55); transform: translateY(-5px); box-shadow: 0 24px 60px rgba(0,0,0,0.45), 0 0 40px rgba(138,124,255,0.06); }
.tool-sig { font-size: 12.5px; color: var(--violet); margin-bottom: 16px; line-height: 1.6; word-break: break-word; }
.tool-sig span { color: var(--dim); }
.tool-card p { font-size: 14.5px; color: var(--dim); }
.tool-card p em { color: var(--text); font-style: normal; }
.tool-card .mono { font-size: 12px; }

.evidence { margin-top: clamp(50px, 9vh, 90px); }
.evidence-head { font-size: 11px; letter-spacing: 0.26em; color: var(--dim); margin-bottom: 18px; }
.evidence-bar { position: relative; display: grid; grid-template-columns: 3fr 2.4fr 1.8fr 1.4fr; height: 86px; border-radius: 12px; overflow: visible; }
.eb-seg { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 20px; border: 1px solid var(--line); border-right: none; }
.eb-seg:last-of-type { border-right: 1px solid var(--line); border-radius: 0 12px 12px 0; }
.eb-seg:first-of-type { border-radius: 12px 0 0 12px; }
.eb-seg .mono { font-size: 12px; font-weight: 700; letter-spacing: 0.16em; }
.eb-seg em { font-style: normal; font-size: 11.5px; color: var(--dim); }
.eb-fresh { background: rgba(60,232,165,0.09); } .eb-fresh .mono { color: var(--green); }
.eb-recent { background: rgba(89,194,255,0.07); } .eb-recent .mono { color: var(--blue); }
.eb-aging { background: rgba(255,176,32,0.06); } .eb-aging .mono { color: var(--amber); }
.eb-stale { background: rgba(138,147,161,0.05); } .eb-stale .mono { color: var(--dim); }
.eb-marker {
  position: absolute; top: -12px; bottom: -12px; left: 8%; width: 2px; background: var(--lime);
  box-shadow: 0 0 16px var(--lime); animation: marker-scan 7s ease-in-out infinite alternate;
}
@keyframes marker-scan { from { left: 4%; } to { left: 96%; } }
.evidence-note { margin-top: 20px; max-width: 720px; color: var(--dim); font-size: 15px; }
.evidence-note strong { color: var(--text); }

/* ═══════════════ 04 DEMO ═══════════════ */
#demo { background: linear-gradient(180deg, var(--bg) 0%, var(--bg2) 60%, var(--bg) 100%); }
.demo-window {
  margin-top: clamp(40px, 6vh, 60px); border: 1px solid var(--line-strong); border-radius: 16px;
  background: #0a0d12; box-shadow: 0 40px 120px rgba(0,0,0,0.6), 0 0 80px rgba(212,255,63,0.03);
  overflow: hidden;
}
.demo-titlebar {
  display: flex; align-items: center; gap: 16px; padding: 13px 18px;
  border-bottom: 1px solid var(--line); font-size: 11px; letter-spacing: 0.12em; color: var(--dim);
  background: rgba(255,255,255,0.02);
}
.dt-dots { display: flex; gap: 7px; }
.dt-dots i { width: 11px; height: 11px; border-radius: 50%; background: #2a2f38; }
.dt-dots i:nth-child(1) { background: rgba(255,77,94,0.75); }
.dt-dots i:nth-child(2) { background: rgba(255,176,32,0.75); }
.dt-dots i:nth-child(3) { background: rgba(60,232,165,0.75); }
.dt-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-body { padding: clamp(20px, 3.4vw, 40px); min-height: 480px; font-size: 15px; }

/* demo generated content */
.d-user {
  margin-left: auto; max-width: 640px; background: rgba(255,77,94,0.07);
  border: 1px solid rgba(255,77,94,0.3); border-radius: 14px 14px 4px 14px;
  padding: 18px 22px; color: #f0e2e4; line-height: 1.65;
}
.d-user .d-who { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--red); margin-bottom: 10px; }
.d-skill { max-width: 780px; margin-top: 26px; }
.d-who-skill { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--lime); margin-bottom: 14px; }
.d-banner {
  display: inline-flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.18em; color: var(--lime); border: 1px solid rgba(212,255,63,0.35);
  background: var(--lime-dim); padding: 9px 16px; border-radius: 6px; margin: 6px 0 18px;
}
.d-banner.violet { color: var(--violet); border-color: rgba(138,124,255,0.4); background: var(--violet-dim); }
.d-checks { display: flex; flex-direction: column; gap: 9px; margin-bottom: 22px; }
.d-check { display: flex; gap: 12px; align-items: baseline; color: var(--dim); font-size: 14.5px; }
.d-check b { font-family: var(--mono); font-weight: 700; flex-shrink: 0; }
.d-check.ok b { color: var(--green); }
.d-check.warn b { color: var(--amber); }
.d-check span strong { color: var(--text); font-weight: 600; }

.d-tool {
  font-family: var(--mono); font-size: 12.5px; line-height: 1.7; margin-bottom: 14px;
  border-left: 2px solid rgba(138,124,255,0.4); padding: 4px 0 4px 18px;
}
.d-tool-call { color: var(--violet); }
.d-tool-call .args { color: #b9b3e8; }
.d-tool-res { color: var(--dim); margin-top: 5px; }
.d-tool-res .tag { margin: 0 4px; font-size: 9px; }
.d-tool-res strong { color: #c9d0d9; font-weight: 500; }

.d-ledger { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 22px; }
.d-ledger h5 { font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; margin-bottom: 12px; font-weight: 700; }
.d-ledger .lg-card {
  font-size: 13px; line-height: 1.55; color: var(--dim); background: rgba(255,255,255,0.025);
  border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-bottom: 9px;
}
.d-ledger .lg-card strong { color: var(--text); font-weight: 600; }
.d-ledger .lg-card .confirm { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; color: var(--amber); margin-top: 8px; line-height: 1.5; }
.d-ledger .strike { text-decoration: line-through; }

.d-plan { display: flex; flex-direction: column; gap: 0; margin-bottom: 20px; }
.d-step { display: flex; gap: 18px; position: relative; padding-bottom: 20px; }
.d-step::before {
  content: ''; position: absolute; left: 15px; top: 34px; bottom: 0; width: 1px;
  background: linear-gradient(180deg, rgba(212,255,63,0.4), rgba(212,255,63,0.05));
}
.d-step:last-child::before { display: none; }
.d-step-num {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(212,255,63,0.5);
  display: flex; align-items: center; justify-content: center; font-family: var(--mono);
  font-size: 12px; color: var(--lime); background: var(--bg);
}
.d-step-body { flex: 1; font-size: 14.5px; color: var(--dim); padding-top: 5px; }
.d-step-body strong { color: var(--text); font-weight: 600; }
.d-step-body .d-window-tag {
  display: inline-block; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em;
  color: var(--blue); border: 1px solid rgba(89,194,255,0.35); border-radius: 4px;
  padding: 2px 8px; margin-left: 10px; vertical-align: 1px;
}
.d-step-body .d-window-tag.red { color: var(--red); border-color: rgba(255,77,94,0.4); }

.d-saved {
  display: flex; align-items: center; gap: 14px; font-family: var(--mono); font-size: 12px;
  border: 1px dashed rgba(60,232,165,0.45); background: rgba(60,232,165,0.06);
  color: var(--green); padding: 14px 18px; border-radius: 8px; letter-spacing: 0.04em;
}
.d-saved .dim { font-size: 11px; }
.d-thinking { display: inline-flex; gap: 6px; padding: 8px 0; }
.d-thinking i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); animation: think 1s ease-in-out infinite; }
.d-thinking i:nth-child(2) { animation-delay: 0.15s; }
.d-thinking i:nth-child(3) { animation-delay: 0.3s; }
@keyframes think { 50% { opacity: 0.2; transform: translateY(4px); } }

/* ═══════════════ 05 PLAYBOOKS ═══════════════ */
#playbooks { background: var(--bg2); }
.pb-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: clamp(40px, 6vh, 60px); }
.pb-card {
  border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(165deg, var(--panel) 0%, var(--bg2) 100%);
  transition: border-color 0.35s, box-shadow 0.35s; overflow: hidden;
}
.pb-card:hover { border-color: var(--line-strong); }
.pb-card.open { border-color: rgba(212,255,63,0.45); box-shadow: 0 0 50px rgba(212,255,63,0.05); }
.pb-head {
  display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: start;
  width: 100%; text-align: left; padding: 26px 26px;
}
.pb-num { font-size: 13px; color: var(--lime); padding-top: 4px; }
.pb-titles strong { display: block; font-size: clamp(18px, 1.9vw, 23px); font-weight: 700; letter-spacing: -0.01em; margin-bottom: 8px; text-transform: uppercase; }
.pb-titles em { display: block; font-style: normal; font-size: 14px; color: var(--dim); line-height: 1.55; }
.pb-chev {
  font-size: 22px; color: var(--dim); border: 1px solid var(--line); border-radius: 50%;
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  transition: transform 0.4s cubic-bezier(0.6, 0, 0.2, 1), color 0.3s, border-color 0.3s; flex-shrink: 0;
}
.pb-card.open .pb-chev { transform: rotate(45deg); color: var(--lime); border-color: rgba(212,255,63,0.5); }
.pb-body { max-height: 0; overflow: hidden; transition: max-height 0.55s cubic-bezier(0.6, 0, 0.2, 1); }
.pb-card.open .pb-body { max-height: 900px; }
.pb-checks { list-style: none; padding: 0 26px; counter-reset: chk; }
.pb-checks li {
  counter-increment: chk; position: relative; padding: 13px 0 13px 42px;
  border-top: 1px solid var(--line); font-size: 14.5px; color: var(--dim); line-height: 1.6;
}
.pb-checks li::before {
  content: counter(chk, decimal-leading-zero); position: absolute; left: 0; top: 15px;
  font-family: var(--mono); font-size: 11px; color: var(--lime);
}
.pb-checks li strong { color: var(--text); }
.pb-checks li em { color: var(--text); font-style: normal; }
.pb-checks .mono { font-size: 10px; letter-spacing: 0.1em; display: block; margin-top: 4px; }
.pb-foot { padding: 16px 26px 24px; font-size: 10.5px; letter-spacing: 0.14em; color: var(--lime); opacity: 0.85; }
.pb-foot em { font-style: normal; }

/* ═══════════════ 06 BRIEF ═══════════════ */
#brief { background: var(--bg); }
.brief-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 6vw, 80px); align-items: center; margin-top: 20px; }
.brief-copy p { color: var(--dim); font-size: clamp(16px, 1.6vw, 19px); margin-bottom: 24px; }
.brief-copy p strong { color: var(--text); }
.brief-points { list-style: none; }
.brief-points li { padding: 11px 0 11px 30px; position: relative; border-top: 1px solid var(--line); color: #c3c9d2; font-size: 15px; }
.brief-points li::before { content: '→'; position: absolute; left: 0; color: var(--lime); font-family: var(--mono); }
.brief-window { border: 1px solid var(--line-strong); border-radius: 16px; background: #0a0d12; overflow: hidden; box-shadow: 0 40px 100px rgba(0,0,0,0.5); }
.brief-pre {
  padding: 24px 26px; font-size: 12.5px; line-height: 1.75; color: #b9c1cc;
  white-space: pre-wrap; word-break: break-word; min-height: 380px;
}
.brief-pre .md-h { color: var(--lime); font-weight: 700; }
.brief-pre .md-dim { color: #5c6470; }

/* ═══════════════ NUMBERS ═══════════════ */
.numbers { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg2); padding: clamp(50px, 8vh, 80px) 0; }
.numbers-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 30px; }
.num { display: flex; flex-direction: column; gap: 12px; }
.num-val { font-size: clamp(40px, 5.4vw, 72px); font-weight: 700; color: var(--lime); letter-spacing: -0.02em; line-height: 1; }
.num-label { font-size: 10px; letter-spacing: 0.2em; color: var(--dim); line-height: 1.7; }

/* ═══════════════ FOOTER ═══════════════ */
.footer { padding: clamp(100px, 16vh, 190px) 0 0; background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(212,255,63,0.05) 0%, transparent 60%), var(--bg); }
.footer-title {
  font-size: clamp(52px, 10vw, 140px); font-weight: 700; line-height: 0.94;
  letter-spacing: -0.03em; text-transform: uppercase; margin-bottom: clamp(60px, 9vh, 100px);
}
.footer-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(40px, 6vw, 90px); margin-bottom: clamp(70px, 10vh, 110px); }
.footer-grid > * { min-width: 0; }
.install-card { border: 1px solid var(--line-strong); border-radius: 16px; background: var(--panel); padding: 28px 30px 32px; }
.install-head { font-size: 11px; letter-spacing: 0.26em; color: var(--lime); margin-bottom: 20px; }
.install-tree { font-size: 12.5px; line-height: 1.9; color: #c3c9d2; margin-bottom: 22px; overflow-x: auto; }
.install-note { font-size: 14.5px; color: var(--dim); margin-bottom: 22px; }
.install-note .mono { font-size: 12px; }
.install-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.install-actions .btn { padding: 13px 20px; font-size: 12px; }
.btn svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }
.clone-cmd {
  font-size: 11px; color: var(--dim); border: 1px dashed var(--line-strong);
  border-radius: 8px; padding: 11px 14px; overflow-x: auto; white-space: nowrap;
  user-select: all;
}
.footer-badges a {
  font-size: 10px; letter-spacing: 0.16em; border: 1px solid var(--line-strong);
  padding: 7px 13px; border-radius: 100px; color: var(--dim); text-decoration: none;
  transition: all 0.25s;
}
.footer-badges a:hover { border-color: var(--lime); color: var(--lime); }
.footer-meta > .mono { font-size: 11px; letter-spacing: 0.22em; color: var(--dim); margin-bottom: 18px; }
.footer-meta p:not(.mono) { color: var(--dim); font-size: 15.5px; margin-bottom: 26px; }
.footer-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-badges span { font-size: 10px; letter-spacing: 0.16em; border: 1px solid var(--line-strong); padding: 7px 13px; border-radius: 100px; color: var(--dim); }
.footer-base {
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding: 22px 0 26px; font-size: 10.5px; letter-spacing: 0.18em;
}

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 1020px) {
  .tools-grid { grid-template-columns: 1fr; }
  .numbers-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .hud-hide-m { display: none; }
  .moment-grid, .brief-grid, .footer-grid { grid-template-columns: 1fr; }
  .moment-stage { min-height: 380px; }
  .phases-track { flex-direction: column; width: auto; padding-bottom: 90px; }
  .phase-panel { width: 100%; min-height: 0; }
  .phase-num { font-size: clamp(120px, 30vw, 200px); }
  .pb-grid { grid-template-columns: 1fr; }
  .d-ledger { grid-template-columns: 1fr; }
  .network-frame { height: 420px; margin-left: 14px; margin-right: 14px; }
  .net-hud-bl { display: none; }
  .hero-scrollcue { display: none; }
  .chip-3 { left: 0; }
}
@media (max-width: 640px) {
  .hud { font-size: 9px; letter-spacing: 0.1em; }
  .hud-right { gap: 12px; }
  .numbers-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-content { padding-bottom: 90px; }
  .evidence-bar { grid-template-columns: 1fr 1fr; height: auto; }
  .eb-seg { border-right: 1px solid var(--line); border-bottom: none; border-radius: 0 !important; padding: 14px; }
  .eb-seg:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .panic-text { min-height: 220px; }
}

/* ═══════════════ WORLD MODE ═══════════════ */
.btn-violet { border-color: rgba(138, 124, 255, 0.55); color: var(--violet); }
.btn-violet:hover { background: var(--violet-dim); border-color: var(--violet); color: #c9c2ff; }

#world-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 95;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em;
  padding: 12px 17px; border: 1px solid rgba(138, 124, 255, 0.5); border-radius: 100px;
  color: var(--violet); background: rgba(10, 12, 16, 0.85); backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}
#world-fab:hover { border-color: var(--violet); background: var(--violet-dim); box-shadow: 0 0 34px rgba(138, 124, 255, 0.28); }
body.world-active #world-fab { display: none; }

body.world-active { overflow: hidden; }
#world-overlay {
  position: fixed; inset: 0; z-index: 200; background: #05060a;
  opacity: 0; visibility: hidden; transition: opacity 0.5s ease, visibility 0.5s;
}
body.world-active #world-overlay { opacity: 1; visibility: visible; }
#world-canvas { position: absolute; inset: 0; cursor: crosshair; touch-action: none; }

.world-hud { position: absolute; z-index: 5; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.18em; color: var(--dim); }
.wh-tl { top: 20px; left: 22px; color: var(--text); }
.wh-tr { top: 20px; right: 22px; display: flex; gap: 18px; align-items: center; }
.wh-tr span { color: var(--dim); }
.wh-bl { bottom: 20px; left: 22px; line-height: 1.9; }
.wh-br { bottom: 20px; right: 22px; }
#world-exit {
  border: 1px solid var(--line-strong); padding: 8px 14px; border-radius: 100px;
  color: var(--text); font-family: var(--mono); letter-spacing: 0.14em; font-size: 10px;
  transition: all 0.25s;
}
#world-exit:hover { border-color: var(--red); color: var(--red); }

#world-prompt {
  position: absolute; left: 50%; bottom: 88px; z-index: 6;
  transform: translateX(-50%) translateY(10px);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--lime);
  background: rgba(10, 12, 16, 0.88); border: 1px solid rgba(212, 255, 63, 0.4);
  padding: 10px 18px; border-radius: 100px; white-space: nowrap;
  opacity: 0; transition: opacity 0.3s, transform 0.3s; pointer-events: none;
}
#world-prompt.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#world-prompt b { border: 1px solid rgba(212, 255, 63, 0.6); border-radius: 4px; padding: 1px 7px; margin-right: 9px; }

#world-minimap { border: 1px solid var(--line-strong); border-radius: 8px; display: block; }

#world-toasts {
  position: absolute; bottom: 140px; left: 50%; transform: translateX(-50%);
  z-index: 7; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.wt {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--text);
  background: rgba(13, 16, 21, 0.94); border: 1px solid var(--line-strong);
  border-left: 3px solid var(--lime); padding: 10px 16px; border-radius: 6px;
  max-width: min(560px, 86vw); text-align: center; animation: wt-in 0.35s ease both;
}
.wt.out { animation: wt-out 0.4s ease both; }
@keyframes wt-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes wt-out { to { opacity: 0; transform: translateY(8px); } }

#world-panel {
  position: absolute; inset: 0; z-index: 210; display: flex;
  align-items: center; justify-content: center; padding: 24px; visibility: hidden;
}
#world-panel.show { visibility: visible; }
.wp-backdrop { position: absolute; inset: 0; background: rgba(5, 6, 10, 0.72); backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.35s; }
#world-panel.show .wp-backdrop { opacity: 1; }
.wp-card {
  position: relative; width: min(720px, 94vw); max-height: 82vh; display: flex; flex-direction: column;
  background: #0b0e13; border: 1px solid var(--line-strong); border-radius: 16px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
  transform: translateY(24px) scale(0.98); opacity: 0;
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.15), opacity 0.35s;
}
#world-panel.show .wp-card { transform: none; opacity: 1; }
.wp-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.wp-kicker { font-size: 10.5px; letter-spacing: 0.22em; color: var(--lime); }
.wp-close {
  border: 1px solid var(--line-strong); width: 34px; height: 34px; border-radius: 50%;
  color: var(--dim); font-size: 14px; transition: all 0.25s; flex-shrink: 0;
}
.wp-close:hover { border-color: var(--red); color: var(--red); transform: rotate(90deg); }
.wp-body { padding: 22px 24px 26px; overflow-y: auto; }
.wp-body h3 { font-size: clamp(22px, 3vw, 28px); text-transform: uppercase; letter-spacing: -0.01em; margin-bottom: 12px; }
.wp-body p { color: var(--dim); font-size: 15px; margin-bottom: 14px; }
.wp-body p strong, .wp-body li strong { color: var(--text); }
.wp-body .wp-red { color: var(--red) !important; font-style: normal; font-weight: 600; }
.wp-body .pb-head { pointer-events: none; padding: 0 0 14px; grid-template-columns: auto 1fr; }
.wp-body .pb-chev { display: none; }
.wp-body .pb-body { max-height: none; }
.wp-body .pb-checks { padding: 0; }
.wp-body .pb-foot { padding: 14px 0 0; }
.wp-body .tool-card { margin-bottom: 12px; }
.wp-body .tool-card:hover { transform: none; box-shadow: none; }
.wp-cta { margin-top: 10px; text-decoration: none; }

@media (max-width: 700px) {
  .wh-bl { display: none; }
  .wh-tr { gap: 10px; font-size: 9.5px; }
  #world-minimap { width: 110px; height: 85px; }
  #world-toasts { bottom: 110px; }
}

/* ═══════════════ REDUCED MOTION ═══════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; }
  .grain { animation: none; }
  .marquee-track { animation: none; }
  .eb-marker { display: none; }
}
