:root {
  --bg: #0c0a0f;
  --bg-panel: #141118;
  --bg-panel-2: #1b1722;
  --ink: #ece8f0;
  --ink-dim: #9a93a6;
  --ink-faint: #6b6478;
  --line: #2a2533;
  --rust: #c8612e;      /* Pinky's coat */
  --magenta: #ff3d8b;   /* "Pinky" neon */
  --cyan: #38e1d6;

  /* persona accents (mirror backend Persona.color) */
  --planner: #3b82f6;
  --wildcard: #ef4444;
  --worrier: #f59e0b;
  --optimist: #22c55e;

  --r: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  height: 100%;
}

body {
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(255, 61, 139, 0.10), transparent 60%),
    radial-gradient(800px 500px at -5% 110%, rgba(56, 225, 214, 0.07), transparent 55%),
    var(--bg);
  min-height: 100vh;
}

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

/* ---- top bar ---- */
.topbar {
  display: flex; align-items: center; gap: 28px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20,17,24,0.9), rgba(12,10,15,0.6));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: baseline; gap: 8px; }
.brand-mark {
  font-family: "Bebas Neue", sans-serif; font-size: 30px; letter-spacing: 2px;
  color: var(--magenta); line-height: 1;
}
.brand-sub {
  font-family: "Bebas Neue", sans-serif; font-size: 30px; letter-spacing: 6px;
  color: var(--ink); line-height: 1;
}
.case-banner { display: flex; flex-direction: column; gap: 2px; margin-left: 4px; }
.case-label {
  font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 3px;
  color: var(--rust);
}
.case-title { font-size: 14px; color: var(--ink-dim); font-weight: 500; }

.status {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--ink-dim);
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-faint); box-shadow: 0 0 0 0 transparent; }
.dot.ok { background: var(--optimist); box-shadow: 0 0 12px var(--optimist); }
.dot.bad { background: var(--wildcard); box-shadow: 0 0 12px var(--wildcard); }

/* ---- layout ---- */
.layout {
  display: grid;
  grid-template-columns: 320px 1fr 340px;
  gap: 18px; padding: 18px 28px 40px;
  align-items: start;
  max-width: 1640px; margin: 0 auto;
}
@media (max-width: 1180px) { .layout { grid-template-columns: 1fr; } }

.panel {
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-panel-2));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
}
.panel-title {
  font-family: "Bebas Neue", sans-serif; letter-spacing: 3px; font-size: 20px;
  margin: 0 0 4px; color: var(--ink);
}
.panel-hint { margin: 0 0 16px; font-size: 12.5px; color: var(--ink-faint); line-height: 1.5; }
.sub {
  font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 2px;
  color: var(--ink-dim); margin: 22px 0 10px; display: flex; align-items: center; gap: 8px;
}
.badge {
  background: var(--rust); color: #1a0f08; font-weight: 700; border-radius: 999px;
  font-size: 11px; padding: 1px 8px; font-family: "Inter", sans-serif;
}

/* ---- evidence intake ---- */
textarea, input[type="text"], select {
  width: 100%; background: #0c0a11; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px;
  font-family: "Inter", sans-serif; font-size: 13.5px; resize: vertical;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
textarea:focus, input:focus, select:focus {
  outline: none; border-color: var(--magenta);
  box-shadow: 0 0 0 3px rgba(255, 61, 139, 0.15);
}
.evidence-controls { display: flex; gap: 8px; margin-top: 10px; }
.evidence-controls select { width: 130px; }

.btn {
  border: none; border-radius: 10px; padding: 11px 16px; cursor: pointer;
  font-family: "Inter", sans-serif; font-weight: 600; font-size: 13px;
  transition: transform .15s var(--ease), background .2s, box-shadow .2s, opacity .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--magenta), var(--rust));
  color: #150a10; box-shadow: 0 6px 20px rgba(255, 61, 139, 0.25);
  letter-spacing: 1px;
}
.btn-primary:hover { box-shadow: 0 8px 28px rgba(255, 61, 139, 0.4); }
.btn-primary:disabled { opacity: .55; cursor: wait; }
.btn-ghost { background: #241d2e; color: var(--ink); flex: 1; }
.btn-ghost:hover { background: #2e2539; }
.btn-link {
  background: none; color: var(--cyan); padding: 6px 0; font-size: 12.5px; font-weight: 500;
}
.btn-link:hover { text-decoration: underline; }
.seed-row { margin-top: 6px; }

.clue-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.clue-list li {
  background: #0e0c13; border: 1px solid var(--line); border-left: 3px solid var(--rust);
  border-radius: 8px; padding: 9px 11px; font-size: 12.5px; color: var(--ink-dim);
  line-height: 1.45; animation: slideIn .35s var(--ease);
}
.clue-list li .tag {
  font-family: "JetBrains Mono", monospace; font-size: 9.5px; letter-spacing: 1px;
  color: var(--ink-faint); display: flex; align-items: center; gap: 6px; margin-bottom: 3px;
}
.clue-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: 0 0 9px; background: #f59e0b; box-shadow: 0 0 6px rgba(245,158,11,0.7); }
.clue-dot.dot-true { background: #22c55e; box-shadow: 0 0 6px rgba(34,197,94,0.8); }
.clue-dot.dot-false { background: #ef4444; box-shadow: 0 0 6px rgba(239,68,68,0.8); }
.clue-dot.dot-unknown { background: var(--cyan); box-shadow: 0 0 6px rgba(56,225,214,0.7); }
.clue-dot.dot-checking { background: #f59e0b; animation: blink 1s steps(1) infinite; }
.clue-list li.verified { border-left-color: var(--optimist); }
.clue-list li.timeline { border-left-color: var(--cyan); }
.clue-list li.all { border-left-color: var(--worrier); }
/* verdict overrides the lens colour once a clue is judged */
.clue-list li.verdict-true { border-left-color: #22c55e; }
.clue-list li.verdict-false { border-left-color: #ef4444; }
.clue-list li.verdict-pending, .clue-list li.verdict-checking { border-left-color: #f59e0b; }
.clue-body { display: block; }
.clue-reason { display: block; margin-top: 4px; font-size: 11px; color: var(--ink-faint); font-style: italic; }
.clue-actions { display: flex; gap: 6px; margin-top: 8px; }
.mini {
  border: 1px solid var(--line); background: #14111a; color: var(--ink-dim);
  border-radius: 6px; padding: 3px 8px; font-size: 11px; font-weight: 600; cursor: pointer;
  font-family: "Inter", sans-serif; transition: all .15s var(--ease);
}
.mini:hover { transform: translateY(-1px); }
.mini.ok:hover { background: rgba(34,197,94,0.18); color: #7fdca0; border-color: #22c55e; }
.mini.bad:hover { background: rgba(239,68,68,0.18); color: #f2b8b8; border-color: #ef4444; }
.mini.chk:hover { background: rgba(56,225,214,0.16); color: var(--cyan); border-color: var(--cyan); }

/* ---- interrogation ---- */
.ask-bar { display: flex; gap: 10px; }
.ask-bar input { flex: 1; font-size: 14px; }
.evidence-context {
  margin: 14px 0 18px; border: 1px solid var(--line); border-radius: 10px;
  background: #0c0a11; overflow: hidden;
}
.evidence-context summary {
  cursor: pointer; padding: 10px 14px; font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 1px; color: var(--cyan);
}
.evidence-context pre {
  margin: 0; padding: 0 14px 14px; white-space: pre-wrap; font-size: 12px;
  color: var(--ink-dim); line-height: 1.55; font-family: "Inter", sans-serif;
}

.pack { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 720px) { .pack { grid-template-columns: 1fr; } }

.persona {
  background: #100d16; border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; position: relative; overflow: hidden;
  border-top: 3px solid var(--accent, var(--line));
  animation: rise .45s var(--ease) both;
}
.persona::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 60px;
  background: radial-gradient(120px 60px at 24px 0, var(--accent), transparent 70%);
  opacity: .14; pointer-events: none;
}
.persona-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.persona-avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: 18px; background: #0c0a11; border: 2px solid var(--accent);
}
.persona-name { font-weight: 700; font-size: 14px; }
.persona-arche {
  font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 1px;
  color: var(--ink-faint);
}
.persona-text { font-size: 13.5px; line-height: 1.6; color: var(--ink); }
.persona.err .persona-text { color: var(--wildcard); font-family: "JetBrains Mono", monospace; font-size: 12px; }

.persona.loading .persona-text::after {
  content: "▍"; animation: blink 1s steps(1) infinite; color: var(--accent);
}
.skeleton { color: var(--ink-faint); font-style: italic; }

/* ---- rail ---- */
.suspect { margin: 0 0 8px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); position: relative; }
.suspect img { width: 100%; display: block; aspect-ratio: 384/520; object-fit: cover; object-position: center 30%; }
.suspect figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px;
  background: linear-gradient(180deg, transparent, rgba(12,10,15,0.95));
  display: flex; flex-direction: column; gap: 2px;
}
.suspect figcaption strong { font-family: "Bebas Neue", sans-serif; letter-spacing: 3px; font-size: 22px; color: var(--magenta); }
.suspect figcaption span { font-size: 11.5px; color: var(--ink-dim); }

.graph {
  height: 320px; background: #09070c; border: 1px solid var(--line);
  border-radius: 12px; overflow: hidden;
}

/* ---- animations ---- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }

/* stagger persona cards */
.persona:nth-child(1) { animation-delay: .02s; }
.persona:nth-child(2) { animation-delay: .10s; }
.persona:nth-child(3) { animation-delay: .18s; }
.persona:nth-child(4) { animation-delay: .26s; }

/* ============================================================
   PAGE ROUTING
   ============================================================ */
.view { min-height: 100vh; }
.hidden { display: none !important; }

/* ============================================================
   PAGE 1 — LANDING / MOVIE POSTER
   ============================================================ */
.landing {
  position: relative;
  background:
    radial-gradient(1200px 700px at 50% -5%, rgba(255,61,139,0.22), transparent 55%),
    radial-gradient(900px 600px at 12% 100%, rgba(56,225,214,0.16), transparent 55%),
    radial-gradient(900px 600px at 90% 90%, rgba(200,97,46,0.18), transparent 55%),
    #07060a;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.landing-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 32px; font-family: "JetBrains Mono", monospace; font-size: 11px;
  letter-spacing: 2px; color: var(--ink-dim); z-index: 3;
}
.logo-cognee { color: var(--magenta); }
.logo-team { color: var(--cyan); }

.poster {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 10px 20px 50px; position: relative; z-index: 2;
}
.poster-credits {
  font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 4px;
  color: var(--cyan); margin-bottom: 6px;   /* whole credits row cyan, like TEAM CLOUD SAILOR */
}
.poster-title { margin: 0; display: flex; flex-direction: column; align-items: center; line-height: 0.86; }
.t-the {
  font-family: "Bebas Neue"; font-size: clamp(20px, 2.6vw, 34px); letter-spacing: 10px;
  color: #ffd447; font-weight: 700; text-shadow: 0 0 16px rgba(255,196,60,0.55);
}
.t-hang {
  font-family: "Anton", sans-serif; font-size: clamp(48px, 11vw, 150px); letter-spacing: 1px;
  color: #fff;
  /* Pink haze in em units so the glow scales with the letter size — visible on
     both small (phone) and huge (desktop) text. */
  text-shadow:
    0 0 0.28em rgba(255,61,139,0.9),
    0 0 0.6em rgba(255,61,139,0.6),
    0 0 1em rgba(255,61,139,0.35),
    0 4px 0 #2a1020;
  -webkit-text-stroke: 2px rgba(255,61,139,0.35);   /* Option B: soft all-pink edge (no gold) */
}
.t-part {
  font-family: "Bebas Neue"; font-size: clamp(16px, 2.2vw, 27px); letter-spacing: 8px;
  color: #ffd447; font-weight: 700; margin: 6px 0; text-shadow: 0 0 16px rgba(255,196,60,0.6);
}
.t-berlin {
  font-family: "Anton", sans-serif; font-size: clamp(60px, 16vw, 230px); letter-spacing: 2px;
  background: linear-gradient(180deg, #ff5ea0 0%, #ff3d8b 40%, var(--rust) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 40px rgba(255,61,139,0.45));
}
.poster-tag {
  font-family: "Inter"; font-size: clamp(14px, 1.6vw, 19px); color: var(--ink); font-weight: 500;
  margin: 14px 0 8px; max-width: 640px;
}
.hero-stage { position: relative; margin: 10px 0 6px; display: grid; place-items: center; }
.spotlight {
  position: absolute; width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,61,139,0.30), transparent 62%);
  filter: blur(8px); animation: pulse 4s var(--ease) infinite;
}
.hero-poster {
  height: clamp(340px, 56vh, 620px); width: auto; border-radius: 16px;
  object-fit: cover; position: relative; z-index: 2;
  border: 1px solid rgba(255,61,139,0.45);
  box-shadow: 0 40px 100px rgba(0,0,0,0.7), 0 0 70px rgba(255,61,139,0.3);
  animation: floaty 6s ease-in-out infinite;
}
.hero-badge {
  position: absolute; right: max(8vw, 20px); top: 20px; z-index: 3;
  font-family: "Bebas Neue"; font-size: 13px; letter-spacing: 2px; color: var(--ink-dim);
  background: rgba(12,10,15,0.7); border: 1px solid var(--magenta); border-radius: 10px;
  padding: 8px 12px; transform: rotate(6deg); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.hero-badge b { font-size: 22px; color: var(--magenta); }
.cast { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin: 22px 0 10px; }
.cast-member { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 92px; }
.cast-member img {
  width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--accent, var(--line)); transition: transform .25s var(--ease), box-shadow .25s;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
}
.cast-member:hover img { transform: translateY(-6px) scale(1.08) rotate(-3deg); box-shadow: 0 12px 28px var(--accent); }
.cast-role { font-family: "JetBrains Mono", monospace; font-size: 9.5px; letter-spacing: 1px; color: var(--accent); }
.cast-name { font-size: 10px; color: var(--ink-faint); }
.cast-member.cameo img { border-color: var(--cyan); }
.btn-cta {
  margin-top: 22px; font-family: "Bebas Neue"; font-size: 22px; letter-spacing: 3px;
  padding: 16px 38px; color: #150a10;
  background: linear-gradient(135deg, var(--magenta), var(--rust));
  box-shadow: 0 10px 40px rgba(255,61,139,0.45); border-radius: 12px;
}
.btn-cta:hover { box-shadow: 0 14px 56px rgba(255,61,139,0.7); transform: translateY(-2px); }
.cta-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: center; margin-top: 22px; }
.btn-secure {
  font-family: "Bebas Neue"; font-size: 16px; letter-spacing: 2px; padding: 15px 22px;
  color: var(--cyan); background: rgba(56,225,214,0.08); border: 1px solid rgba(56,225,214,0.4);
  border-radius: 12px;
}
.btn-secure:hover { background: rgba(56,225,214,0.16); box-shadow: 0 6px 24px rgba(56,225,214,0.25); }
.poster-foot { margin-top: 18px; font-size: 12px; color: var(--ink-faint); }
.poster-foot b { color: var(--magenta); }

/* ---- THE MISSION (page 1 intro) ---- */
.mission { max-width: 900px; margin: 0 auto; padding: 20px 22px 70px; text-align: center; position: relative; z-index: 2; }
.mission-title { font-family: "Anton", sans-serif; font-size: clamp(28px, 5vw, 48px); letter-spacing: 2px; color: #fff; margin: 10px 0 12px; }
.mission-lead { font-size: clamp(14px, 1.7vw, 18px); line-height: 1.65; color: var(--ink-dim); max-width: 680px; margin: 0 auto 10px; }
.mission-lead b { color: var(--ink); }
.mission-sub { font-family: "JetBrains Mono", monospace; font-size: 12px; letter-spacing: 3px; color: var(--rust); margin: 34px 0 16px; }
.who-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 640px) { .who-grid { grid-template-columns: repeat(2, 1fr); } }
.who { margin: 0; background: var(--bg-panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.who img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.who figcaption { padding: 10px 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.who figcaption b { font-size: 13px; color: var(--ink); }
.who figcaption span { font-size: 10.5px; color: var(--ink-faint); line-height: 1.3; }
.mission-steps { list-style: none; margin: 0 auto; padding: 0; max-width: 620px; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.mission-steps li { display: flex; gap: 12px; align-items: flex-start; background: var(--bg-panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; color: var(--ink-dim); }
.mission-steps li b { color: var(--ink); }
.ms-n { flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #150a10; background: linear-gradient(135deg, var(--magenta), var(--rust)); }
.mission-cta { display: inline-block; margin-top: 30px; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti::before, .confetti::after {
  content: ""; position: absolute; inset: -20% 0 0 0;
  background-image:
    radial-gradient(3px 3px at 20% 10%, var(--magenta), transparent),
    radial-gradient(3px 3px at 70% 20%, var(--cyan), transparent),
    radial-gradient(2px 2px at 40% 30%, var(--rust), transparent),
    radial-gradient(3px 3px at 90% 15%, #fff, transparent),
    radial-gradient(2px 2px at 55% 5%, var(--magenta), transparent),
    radial-gradient(2px 2px at 10% 25%, var(--cyan), transparent);
  background-size: 100% 100%; opacity: 0.5;
  animation: fall 9s linear infinite;
}
.confetti::after { animation-duration: 13s; animation-delay: -4s; opacity: 0.3; }

/* ============================================================
   PAGE 2 — CENTERED STAGE (big dog + big graph)
   ============================================================ */
.btn-back { background: #241d2e; color: var(--ink); font-size: 12px; padding: 8px 14px; margin-right: 6px; }
.btn-back:hover { background: #2e2539; }
.btn-next { font-size: 12px; padding: 8px 16px; letter-spacing: .5px; }
.stage {
  max-width: 860px; margin: 28px auto 10px; padding: 0 20px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.suspect-big {
  margin: 0; border-radius: 18px; overflow: hidden; border: 1px solid rgba(255,61,139,0.35);
  position: relative; max-width: 460px; width: 100%;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 50px rgba(255,61,139,0.18);
}
.suspect-big img { width: 100%; display: block; aspect-ratio: 384/520; object-fit: cover; object-position: center 28%; }
.suspect-big figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 16px;
  background: linear-gradient(180deg, transparent, rgba(7,6,10,0.95));
  display: flex; flex-direction: column; gap: 3px;
}
.suspect-big figcaption strong { font-family: "Bebas Neue"; letter-spacing: 4px; font-size: 34px; color: var(--magenta); }
.suspect-big figcaption span { font-size: 13px; color: var(--ink-dim); }
.stage-label {
  font-family: "JetBrains Mono", monospace; font-size: 12px; letter-spacing: 2px;
  color: var(--ink-dim); margin: 30px 0 12px;
}
.graph-big {
  width: 100%; height: 440px; background: #09070c;
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
}
iframe.graph-big { border: 1px solid var(--line); background: #fff; }
.graph-toggle { display: flex; gap: 8px; justify-content: center; margin-bottom: 10px; }
.gtab {
  background: #14111a; color: var(--ink-dim); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 16px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  font-family: "Inter", sans-serif; transition: all .18s var(--ease);
}
.gtab:hover { color: var(--ink); border-color: var(--magenta); }
.gtab.active {
  color: #150a10; background: linear-gradient(135deg, var(--magenta), var(--rust));
  border-color: transparent; box-shadow: 0 4px 16px rgba(255,61,139,0.3);
}

/* Colour-coded action buttons on the graph explorer, each with a thin glowing border */
.gtab-green { border-color: #34d399; color: #a7f3d0; box-shadow: 0 0 10px rgba(52,211,153,0.45); }
.gtab-green:hover { border-color: #34d399; color: #d1fae5; box-shadow: 0 0 16px rgba(52,211,153,0.75); }
.gtab-pink { border-color: var(--magenta); color: #ffb3d1; box-shadow: 0 0 10px rgba(255,61,139,0.45); }
.gtab-pink:hover { border-color: var(--magenta); color: #ffd1e4; box-shadow: 0 0 16px rgba(255,61,139,0.75); }
.gtab-blue { border-color: #38bdf8; color: #bae6fd; animation: founderGlow 2.2s ease-in-out infinite; }
.gtab-blue:hover { border-color: #38bdf8; color: #e0f2fe; box-shadow: 0 0 18px rgba(56,189,248,0.85); }
@keyframes founderGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(56,189,248,0.4); }
  50%      { box-shadow: 0 0 18px rgba(56,189,248,0.9); }
}
.graph-legend {
  display: flex; gap: 18px; justify-content: center; margin: 0 0 12px;
  font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: 1px; color: var(--ink-faint);
}
.graph-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.lg-lit { background: #10241a; border: 2px solid #22c55e; box-shadow: 0 0 8px rgba(34,197,94,0.7); }
.lg-dim { background: #161320; border: 2px solid #2a2533; }
.lg-pending { background: #241f10; border: 2px solid #f59e0b; box-shadow: 0 0 8px rgba(245,158,11,0.7); }
.lg-refuted { background: #241016; border: 2px solid #ef4444; }
.lg-unknown { background: #141320; border: 2px solid #38e1d6; box-shadow: 0 0 8px rgba(56,225,214,0.6); }
.lg-path { width: 16px; height: 3px; border-radius: 2px; display: inline-block; background: var(--magenta); box-shadow: 0 0 8px var(--magenta); }
.lg-route { width: 18px; height: 0; display: inline-block; border-top: 2px dashed rgba(150,146,165,0.6); }
/* Auto Detective banner */
/* Blue circular "bark" speaker button next to Pinky (Google-style) */
.bark-btn {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border: none; border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1;
  color: #fff; background: #1a73e8; box-shadow: 0 2px 8px rgba(26,115,232,0.5);
  transition: transform .12s var(--ease), box-shadow .18s, background .18s;
}
.bark-btn:hover { background: #1b66c9; box-shadow: 0 4px 14px rgba(26,115,232,0.7); }
.bark-btn:active { transform: scale(0.9); }
.bark-btn.barking { animation: barkPulse 0.5s ease-in-out; }
@keyframes barkPulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(26,115,232,0.5); }
  50%      { box-shadow: 0 0 0 8px rgba(26,115,232,0.25), 0 4px 14px rgba(26,115,232,0.8); }
}

.auto-det { max-width: 720px; margin: 8px auto 0; padding: 16px 20px; text-align: center;
  background: linear-gradient(180deg, rgba(34,197,94,0.12), transparent);
  border: 1.5px solid rgba(34,197,94,0.55); border-radius: 14px;
  box-shadow: 0 0 22px rgba(34,197,94,0.22); }
.auto-det-label {
  display: inline-block; margin-bottom: 10px; padding: 4px 14px;
  font-family: "Bebas Neue", sans-serif; font-size: 15px; letter-spacing: 2px;
  color: #052e16; background: linear-gradient(135deg, #4ade80, #22c55e);
  border-radius: 999px; box-shadow: 0 0 14px rgba(34,197,94,0.5);
}
.auto-det .btn-cta { font-size: 17px; padding: 13px 26px;
  background: linear-gradient(135deg, #4ade80, #16a34a); color: #052e16;
  box-shadow: 0 6px 20px rgba(34,197,94,0.4); }
.auto-det .btn-cta:hover { box-shadow: 0 10px 28px rgba(34,197,94,0.6); }
.auto-det-desc { font-size: 13px; color: var(--ink-dim); line-height: 1.55; margin: 12px auto 0; max-width: 560px; }
.auto-det-status { margin-top: 10px; font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--cyan); min-height: 16px; }

.ask-wrap, .evidence-wrap { max-width: 980px; margin: 0 auto; padding: 18px 20px; }
.ask-wrap { margin-top: 10px; }
.evidence-wrap .evidence { max-width: 560px; margin: 0 auto; }

/* ============================================================
   LANDING ANIMATIONS
   ============================================================ */
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulse { 0%,100% { opacity: 0.5; transform: scale(0.95); } 50% { opacity: 0.9; transform: scale(1.05); } }
@keyframes fall { from { transform: translateY(-10%);} to { transform: translateY(110%);} }

/* ============================================================
   PAGE 3 — FACE-GATE SECURITY
   ============================================================ */
.gate { display: flex; flex-direction: column; }
.gate-wrap {
  max-width: 720px; margin: 30px auto; padding: 0 20px; text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.gate-title {
  font-family: "Anton", sans-serif; font-size: clamp(34px, 6vw, 64px); letter-spacing: 2px;
  margin: 6px 0; color: #fff; text-shadow: 0 0 30px rgba(34,197,94,0.4);
}
.gate-sub { color: var(--ink-dim); font-size: 14px; margin: 0 0 22px; max-width: 460px; }

.scanner {
  position: relative; width: min(440px, 86vw); aspect-ratio: 4/3; border-radius: 16px;
  overflow: hidden; background: #050409; border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(0,0,0,0.6);
  margin: 0 auto;   /* center the box in the page flow (text-align can't center a block) */
}
.scanner video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); filter: contrast(1.05) saturate(1.05); }
.scan-frame {
  position: absolute; inset: 14%; border: 2px solid rgba(34,225,214,0.5); border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(5,4,9,0.35) inset; pointer-events: none;
}
.scan-frame::before, .scan-frame::after {
  content: ""; position: absolute; width: 22px; height: 22px; border: 3px solid var(--cyan);
}
.scan-frame::before { top: -2px; left: -2px; border-right: 0; border-bottom: 0; }
.scan-frame::after { bottom: -2px; right: -2px; border-left: 0; border-top: 0; }
.scan-line {
  position: absolute; left: 0; right: 0; top: 0; height: 3px; opacity: 0;
  background: linear-gradient(90deg, transparent, var(--optimist), transparent);
  box-shadow: 0 0 16px var(--optimist);
}
.scanner.scanning .scan-line { opacity: 1; animation: scanmove 1.6s ease-in-out infinite; }
.scanner.scanning .scan-frame { border-color: var(--optimist); }
.scan-verdict {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; pointer-events: none;
  font-family: "Bebas Neue"; font-size: 30px; letter-spacing: 3px;
  background: rgba(5,4,9,0.55); transition: opacity .25s var(--ease);
}
.scan-verdict.show { opacity: 1; }
.scan-verdict.ok { color: var(--optimist); text-shadow: 0 0 20px var(--optimist); }
.scan-verdict.bad { color: var(--wildcard); text-shadow: 0 0 20px var(--wildcard); }

.gate-controls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 22px 0 10px; }
.gate-controls input { width: 220px; }
.gate-meta {
  display: flex; flex-direction: column; gap: 6px; margin-top: 10px;
  font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--ink-faint);
}
.gate-meta .ok { color: var(--optimist); }
.gate-meta .bad { color: var(--wildcard); }

/* ---- PAGE 3 access (story + code + face) ---- */
.access-wrap { max-width: 900px; margin: 0 auto; padding: 24px 20px 70px; }
.access-row { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; margin-bottom: 28px; }
@media (max-width: 720px) { .access-row { grid-template-columns: 1fr; } }
.story-vid { margin: 0; }
.story-vid video { width: 100%; border-radius: 14px; border: 1px solid var(--line); background: #000; display: block; }
.story-vid figcaption { font-size: 12.5px; color: var(--ink-dim); margin-top: 8px; }
.founder-chat { background: var(--bg-panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }

/* face-scan guidance + delay explainer (page 3) */
.scan-tips { margin: 8px 0 4px; font-size: 12.5px; line-height: 1.5; color: var(--ink-dim); }
.scan-tips b { color: var(--ink); }
.scan-why { margin: 2px 0 4px; font-size: 12px; color: var(--ink-faint); }
.scan-why summary { cursor: pointer; color: var(--cyan); font-weight: 600; }
.scan-why p { margin: 6px 0 0; line-height: 1.55; color: var(--ink-dim); }
.scan-why b { color: var(--ink); }
.fc-head { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-dim); }
.fc-head img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--cyan); }
.fc-head b { color: var(--cyan); }
#fc-vid { width: 100%; border-radius: 10px; background: #000; aspect-ratio: 1/1; object-fit: cover; }
.fc-line { font-size: 14px; color: var(--ink); font-style: italic; min-height: 20px; }
.access-step { max-width: 640px; margin: 0 auto 30px; text-align: center; }
.access-h { font-family: "Bebas Neue", sans-serif; letter-spacing: 2px; font-size: 22px; color: var(--ink); margin: 0 0 12px; }
.demo-vid { width: 100%; max-width: 520px; border-radius: 14px; border: 1px solid var(--line); background: #000; }
.code-entry { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.code-entry input {
  width: 200px; text-align: center; font-family: "JetBrains Mono", monospace; font-size: 24px;
  letter-spacing: 8px; padding: 12px; background: #0c0a11; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
}
.code-entry input:focus { outline: none; border-color: var(--magenta); box-shadow: 0 0 0 3px rgba(255,61,139,0.15); }
.access-msg { margin-top: 10px; font-size: 13px; min-height: 18px; }
.access-msg.ok { color: var(--optimist); }
.access-msg.bad { color: var(--wildcard); }
.access-final { text-align: center; margin-top: 10px; }
.access-checks { display: flex; gap: 18px; justify-content: center; margin-bottom: 14px; font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--ink-faint); }
.chk.ok { color: var(--optimist); }

/* ---- PAGE 4 success (dog-show win) ---- */
.success { position: relative; }
.success-wrap { max-width: 760px; margin: 0 auto; padding: 30px 20px 70px; text-align: center; position: relative; z-index: 2; }
.success-title { font-family: "Anton", sans-serif; font-size: clamp(38px, 8vw, 84px); letter-spacing: 2px; margin: 8px 0 14px;
  background: linear-gradient(180deg, #ffd76a, var(--rust)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 30px rgba(255,180,60,0.4)); }
.success-lead { font-size: clamp(14px, 1.8vw, 18px); line-height: 1.65; color: var(--ink-dim); max-width: 620px; margin: 0 auto 22px; }
.success-lead b { color: var(--ink); }
.win-vid { margin: 0 0 22px; }
.win-media { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,180,60,0.4); box-shadow: 0 24px 70px rgba(0,0,0,0.6), 0 0 50px rgba(255,180,60,0.18); }
.win-media video { width: 100%; background: #000; display: block; }
.win-banner {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  font-family: "Anton", sans-serif; font-size: clamp(26px, 6vw, 56px); line-height: 1.05; letter-spacing: 1px;
  color: #fff; background: rgba(6,5,10,0.55); opacity: 0; pointer-events: none; transition: opacity .5s var(--ease);
  text-shadow: 0 0 26px rgba(255,180,60,0.7);
}
.win-banner b { color: #ffd76a; font-size: 1.35em; }
.win-banner.show { opacity: 1; animation: winPop .6s var(--ease); }
.win-vid figcaption { margin-top: 10px; font-size: 13px; color: var(--ink-dim); }
@keyframes winPop { 0% { transform: scale(0.85); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
.success-foot { font-size: 14px; color: var(--ink-dim); margin: 0 auto 24px; max-width: 560px; }
.success-foot b { color: var(--magenta); }

@keyframes scanmove { 0%,100% { top: 12%; } 50% { top: 86%; } }

/* ============================================================
   PAGE 5 — FULL-SCREEN GRAPH EXPLORER
   ============================================================ */
.explorer { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }

/* control bar — its own row under the header */
.explorer-bar {
  display: flex; align-items: center; gap: 16px; padding: 10px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20,17,24,0.9), rgba(12,10,15,0.5));
}
.ds-picker { display: flex; align-items: center; gap: 8px; font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: 1px; color: var(--ink-dim); }
.ds-picker select { width: auto; min-width: 160px; padding: 7px 10px; }
.explorer-hint {
  margin-left: auto; font-family: "JetBrains Mono", monospace; font-size: 10.5px;
  color: var(--ink-faint); max-width: 42ch; text-align: right; line-height: 1.4;
}

/* graph area fills everything below the bar */
.explorer-stage { position: relative; flex: 1; min-height: 0; }
.explorer-graph { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
div.explorer-graph { background: #09070c; overflow: hidden; }
iframe.explorer-graph { background: #fff; }

/* always-visible escape hatch on the full-screen graph page (mobile) */
.explorer-exit { display: none; }

/* Node-details card, mirrored below the graph on mobile only (desktop uses the
   in-iframe panel). Sits in the scroll flow under the graph — never overlaps it. */
.node-card { display: none; }
.node-card.hidden { display: none !important; }
@media (max-width: 760px) {
  .node-card {
    display: block; margin: 12px; padding: 0; overflow: hidden;
    background: linear-gradient(180deg, var(--bg-panel), var(--bg-panel-2));
    border: 1px solid var(--line); border-radius: 14px; color: var(--ink);
    box-shadow: 0 12px 34px rgba(0,0,0,0.4);
  }
  .node-card-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 14px; border-bottom: 1px solid var(--line);
    font-family: "Bebas Neue", sans-serif; letter-spacing: 2px; font-size: 14px; color: var(--cyan);
    position: sticky; top: 0; background: var(--bg-panel); z-index: 2;
  }
  .node-card-x {
    border: 1px solid var(--line); background: #14111a; color: var(--ink-dim);
    width: 28px; height: 28px; border-radius: 8px; cursor: pointer; font-size: 15px; line-height: 1;
  }
  .node-card-body {
    max-height: 58vh; overflow-y: scroll; padding: 12px 14px 18px;
    scrollbar-width: auto; scrollbar-color: var(--magenta) rgba(255,255,255,0.08);
  }
  /* prominent, always-visible scrollbar so it's obvious the card scrolls */
  .node-card-body::-webkit-scrollbar { width: 12px; }
  .node-card-body::-webkit-scrollbar-thumb {
    background: var(--magenta); border-radius: 6px; border: 2px solid rgba(0,0,0,0.25);
    box-shadow: 0 0 8px rgba(255,61,139,0.6);
  }
  .node-card-body::-webkit-scrollbar-track { background: rgba(255,255,255,0.08); border-radius: 6px; }
  /* flash the card when it snaps down so the eye lands on it */
  .node-card.flash { animation: nodeCardFlash 0.9s ease-out; }
  @keyframes nodeCardFlash {
    0%   { box-shadow: 0 0 0 2px var(--magenta), 0 12px 34px rgba(0,0,0,0.4); }
    100% { box-shadow: 0 0 0 0 transparent, 0 12px 34px rgba(0,0,0,0.4); }
  }
}

@media (max-width: 760px) {
  /* let the page breathe: scroll vertically instead of cramming everything
     into one locked viewport where the bars overlap the graph */
  .explorer { height: auto; min-height: 100dvh; overflow-y: auto; }
  /* WRAP the controls onto multiple rows so every button is visible & tappable
     (no horizontal scroll hiding buttons); they live in the normal scroll flow. */
  .explorer-bar { flex-wrap: wrap; overflow-x: visible; gap: 8px; padding: 10px 12px; }
  .explorer-bar .gtab { flex: 0 0 auto; font-size: 11px; padding: 7px 12px; }
  .ds-picker { flex: 0 0 auto; }
  .ds-picker select { min-width: 118px; }
  .explorer-hint { display: none; }
  /* graph gets its own tall, dedicated block so it never collapses or overlaps */
  .explorer-stage { flex: none; height: 72vh; min-height: 440px; }
  /* keep the header compact — its Back/Intro buttons stay usable at the top */
  .explorer .topbar { flex-wrap: wrap; padding: 8px 12px; gap: 6px; }
  .explorer .case-banner { display: none; }
  /* hide the floating exit pill on phones — it overlapped the control buttons,
     and the sticky header already has Back + Intro. */
  .explorer-exit { display: none !important; }
  /* chat launcher in the bottom-RIGHT corner, inset a bit so the node sheet's
     right-edge scrollbar stays visible next to it. */
  .ask-dock { right: 14px; left: auto; bottom: 14px; }
  .ask-launch { font-size: 12px; padding: 10px 14px; }
  .ask-panel { height: 60vh; width: min(360px, 92vw); }
}

/* Cognee explainer overlay (page 5) */
.about-overlay { position: fixed; inset: 0; z-index: 1000; display: none; place-items: center;
  background: rgba(6,5,10,0.82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); padding: 20px; }
.about-overlay.show { display: grid; }
.about-card { position: relative; width: min(620px, 94vw); max-height: 88vh; overflow: auto;
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-panel-2)); border: 1px solid rgba(255,61,139,0.4);
  border-radius: 18px; padding: 26px 26px 24px; box-shadow: 0 30px 90px rgba(0,0,0,0.7); }
.about-title { font-family: "Anton", sans-serif; font-size: clamp(28px, 5vw, 44px); margin: 8px 0 14px; color: #fff; }
.c-magenta { color: var(--magenta); }
.about-p { font-size: 14.5px; line-height: 1.6; color: var(--ink-dim); margin: 0 0 12px; }
.about-p b { color: var(--ink); }
.about-feats { list-style: none; margin: 14px 0 20px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.about-feats li { font-size: 13.5px; color: var(--ink-dim); background: #0e0c13; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.about-feats b { color: var(--cyan); }

/* Ask-about-Cognee help dock (page 5) */
.ask-dock { position: fixed; right: 20px; bottom: 20px; z-index: 900; }
.ask-launch {
  border: none; cursor: pointer; font-family: "Inter", sans-serif; font-weight: 700; font-size: 13px;
  color: #150a10; background: linear-gradient(135deg, var(--cyan), var(--magenta));
  border-radius: 999px; padding: 12px 18px; box-shadow: 0 8px 26px rgba(255,61,139,0.35);
}
.ask-launch:hover { transform: translateY(-2px); }
.ask-panel {
  width: min(380px, 92vw); height: 480px; max-height: 76vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-panel-2)); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; box-shadow: 0 24px 70px rgba(0,0,0,0.6);
}
.ask-head { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ink-dim); }
.ask-head b { color: var(--cyan); }
.ask-min { background: #14111a; color: var(--ink-dim); border: 1px solid var(--line); border-radius: 8px;
  width: 26px; height: 26px; cursor: pointer; font-size: 16px; line-height: 1; }
.ask-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ask-bubble { max-width: 85%; padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; }
.ask-bubble.bot { align-self: flex-start; background: #14111a; border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 4px; }
.ask-bubble.me { align-self: flex-end; background: linear-gradient(135deg, var(--magenta), var(--rust)); color: #150a10; font-weight: 500; border-bottom-right-radius: 4px; }
.ask-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 8px; }
.ask-chips button { background: #14111a; color: var(--cyan); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 10px; font-size: 11px; cursor: pointer; }
.ask-chips button:hover { border-color: var(--cyan); }
.ask-form { display: flex; gap: 8px; padding: 10px 12px 4px; border-top: 1px solid var(--line); }
.ask-form input { flex: 1; }
.ask-form .btn-primary { padding: 10px 14px; font-size: 12px; }
.ask-powered { text-align: center; padding: 4px 12px 10px; font-size: 10px; color: var(--ink-faint); font-family: "JetBrains Mono", monospace; }
.ask-powered b { color: var(--cyan); }
.ask-enable {
  display: block; width: calc(100% - 4px); margin: 8px auto 0; cursor: pointer;
  font-family: "Inter", sans-serif; font-size: 11.5px; font-weight: 700; color: #150a10;
  background: linear-gradient(135deg, var(--cyan), #22c55e); border: none; border-radius: 8px; padding: 8px 10px;
}
.ask-enable:hover { filter: brightness(1.08); }
.ask-enable:disabled { opacity: 0.7; cursor: default; }

/* Back / Next page navigation (bottom of pages 1-4) */
.page-nav { display: flex; align-items: center; gap: 12px; max-width: 900px; margin: 20px auto 46px; padding: 0 20px; }
.page-nav .pn-spacer { flex: 1; }
.pn-back, .pn-next { text-decoration: none; border-radius: 11px; padding: 12px 20px; font-weight: 700; font-size: 13.5px; font-family: "Inter", sans-serif; transition: transform .15s var(--ease), box-shadow .2s, background .2s; }
.pn-back { background: #241d2e; color: var(--ink); border: 1px solid var(--line); }
.pn-back:hover { background: #2e2539; transform: translateY(-1px); }
.pn-next { background: linear-gradient(135deg, var(--magenta), var(--rust)); color: #150a10; box-shadow: 0 6px 20px rgba(255,61,139,0.25); }
.pn-next:hover { box-shadow: 0 10px 28px rgba(255,61,139,0.45); transform: translateY(-1px); }

/* ============================================================
   MOBILE / RESPONSIVE (phones, iPhone-friendly)
   ============================================================ */
@media (max-width: 760px) {
  /* top bar wraps; the long case title drops to its own row */
  .topbar { flex-wrap: wrap; gap: 8px 12px; padding: 12px 14px; }
  .case-banner { order: 3; flex-basis: 100%; }
  .case-title { font-size: 12px; }
  .status { font-size: 11px; margin-left: auto; }
  .brand-mark, .brand-sub { font-size: 24px; }

  /* investigation stage */
  .stage { margin-top: 16px; padding: 0 12px; }
  .graph-big { height: 340px; }
  iframe.graph-big { height: 360px; }
  .graph-toggle { flex-wrap: wrap; }
  .gtab { font-size: 11.5px; padding: 6px 12px; }
  .stage-label { font-size: 11px; }
  .graph-legend { flex-wrap: wrap; gap: 8px 14px; font-size: 9px; }
  .suspect-big { max-width: 300px; }
  .suspect-big figcaption strong { font-size: 26px; }

  /* ask + evidence stack full-width */
  .ask-wrap, .evidence-wrap { padding: 12px 14px; }
  .ask-bar { flex-direction: column; }
  .ask-bar .btn-primary { width: 100%; }
  .pack { grid-template-columns: 1fr; }
  .clue-actions { flex-wrap: wrap; }

  /* landing poster */
  .landing-nav { padding: 14px 16px; font-size: 10px; }
  .poster { padding: 8px 14px 40px; }
  .hero-poster { height: clamp(240px, 50vh, 440px); }
  .hero-badge { right: 6px; top: 10px; }
  .cta-row { flex-direction: column; width: 100%; max-width: 340px; }
  .btn-cta, .btn-secure { width: 100%; text-align: center; }
  .cast-member { width: 72px; }
  .cast-member img { width: 56px; height: 56px; }

  /* face-id gate */
  .gate-wrap { margin: 16px auto; }
  .gate-controls { flex-direction: column; align-items: stretch; }
  .gate-controls input, .gate-controls .btn { width: 100%; }
}

@media (max-width: 400px) {
  .t-hang { font-size: 42px; }
  .t-berlin { font-size: 60px; }
  .poster-tag { font-size: 13px; }
}

/* ============================================================
   STORYLINE SIDEBAR (progress stepper)
   ============================================================ */
.app-shell { display: flex; gap: 22px; max-width: 1320px; margin: 0 auto; padding: 18px 28px 40px; align-items: flex-start; }
.app-main { flex: 1; min-width: 0; }
.storyline-rail {
  flex: 0 0 240px; position: sticky; top: 88px;
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-panel-2));
  border: 1px solid var(--line); border-radius: var(--r); padding: 16px 14px;
}
.rail-title { font-family: "Bebas Neue", sans-serif; letter-spacing: 3px; font-size: 18px; margin: 0 0 8px; color: var(--ink); }
.rail-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 14px; font-family: "JetBrains Mono", monospace; font-size: 9.5px; color: var(--ink-faint); }
.rail-legend span { display: inline-flex; align-items: center; gap: 5px; }
.sdot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.sdot.done { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.sdot.current { background: var(--magenta); box-shadow: 0 0 6px var(--magenta); }
.sdot.upcoming { background: #eab308; box-shadow: 0 0 6px #eab308; }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }

/* Advance-to-next-page button, sitting just under the storyline steps */
.rail-next-btn {
  display: block; margin-top: 16px; text-decoration: none; text-align: center;
  color: #150a10; background: linear-gradient(135deg, var(--magenta), var(--rust));
  border-radius: 10px; padding: 11px 12px; font-size: 13px; font-weight: 700; letter-spacing: 0.3px;
  box-shadow: 0 6px 20px rgba(255,61,139,0.28);
}
.rail-next-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(255,61,139,0.42); }

/* Own little box, spaced well below the storyline steps: jump to the Cognee graph */
.skip-graph {
  margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--line);
  display: flex; flex-direction: column; gap: 10px; text-align: center;
}
.skip-graph-lead { margin: 0; font-size: 11.5px; color: var(--ink-faint); line-height: 1.45; }
.skip-graph-btn {
  display: block; text-decoration: none; text-align: center;
  color: #052e16; background: linear-gradient(135deg, var(--cyan), #22c55e);
  border-radius: 10px; padding: 10px 12px; font-size: 12.5px; font-weight: 700;
  box-shadow: 0 4px 16px rgba(56,225,214,0.28);
}
.skip-graph-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(56,225,214,0.45); }
.step {
  display: flex; align-items: center; gap: 10px; padding: 10px 11px;
  border-radius: 11px; border: 1px solid var(--line); background: #100d16;
  position: relative; transition: border-color .3s var(--ease), box-shadow .3s var(--ease), opacity .3s;
}
.step-marker {
  flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; background: #0c0a11; border: 1.5px solid var(--line); color: var(--ink-dim);
}
.step-body { display: flex; flex-direction: column; min-width: 0; }
.step-name { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.15; }
.step-sub { font-size: 10.5px; color: var(--ink-faint); }
.step-count {
  margin-left: auto; min-width: 20px; text-align: center; font-size: 11px; font-weight: 700;
  color: var(--ink-faint); background: #0c0a11; border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px;
}
.step-count.has { color: #150a10; background: var(--cyan); border-color: transparent; }

/* --- the three states: green reached · pink now · yellow to-do --- */
.step.done { border-color: #22c55e; box-shadow: 0 0 10px rgba(34,197,94,0.30); }
.step.done .step-marker { border-color: #22c55e; color: #7fdca0; }
.step.current { border-color: var(--magenta); box-shadow: 0 0 16px rgba(255,61,139,0.5); animation: stepPulse 1.8s var(--ease) infinite; }
.step.current .step-marker { border-color: var(--magenta); color: var(--magenta); }
.step.upcoming { border-color: #7a6412; box-shadow: 0 0 8px rgba(234,179,8,0.18); opacity: 0.9; }
.step.upcoming .step-marker { border-color: #eab308; color: #eab308; }

/* goal = the gymnasium button */
.step.goal { padding: 13px 12px; }
.step.goal .step-name { font-family: "Bebas Neue", sans-serif; letter-spacing: 1.5px; font-size: 16px; }
.step.goal.done { background: linear-gradient(135deg, rgba(34,197,94,0.18), transparent); }
.step.goal.current { background: linear-gradient(135deg, rgba(255,61,139,0.16), transparent); }

@keyframes stepPulse { 0%,100% { box-shadow: 0 0 12px rgba(255,61,139,0.4); } 50% { box-shadow: 0 0 22px rgba(255,61,139,0.75); } }

/* ============================================================
   FOUNDER CAMEO (AI video card)
   ============================================================ */
.cameo-overlay {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  background: rgba(6,5,10,0.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .3s var(--ease);
}
.cameo-overlay.show { opacity: 1; }
.cameo-card {
  position: relative; width: min(460px, 92vw); padding: 18px;
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-panel-2));
  border: 1px solid rgba(56,225,214,0.4); border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.7), 0 0 50px rgba(56,225,214,0.18);
  transform: translateY(14px) scale(0.98); transition: transform .3s var(--ease);
}
.cameo-overlay.show .cameo-card { transform: none; }
.cameo-close {
  position: absolute; top: 10px; right: 12px; z-index: 3; width: 30px; height: 30px;
  border-radius: 50%; border: 1px solid var(--line); background: #0c0a11; color: var(--ink-dim);
  cursor: pointer; font-size: 13px;
}
.cameo-close:hover { color: var(--ink); border-color: var(--magenta); }
.cameo-tag {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  font-family: "JetBrains Mono", monospace; font-size: 9px; letter-spacing: 2px;
  color: var(--cyan); background: rgba(12,10,15,0.8); border: 1px solid rgba(56,225,214,0.4);
  border-radius: 6px; padding: 3px 7px;
}
.cameo-stage {
  position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 1/1;
  background: #050409; border: 1px solid var(--line);
}
.cameo-face, .cameo-loop { width: 100%; height: 100%; object-fit: cover; display: block; }
.cameo-face { transform-origin: center 85%; }
.cameo-face { animation: kenburns 9s ease-in-out infinite alternate; }
/* while a clip plays, the jaw/head reacts to the live audio amplitude (--talk) */
.cameo-stage.speaking .cameo-face {
  animation: none;
  transform: translateY(calc(var(--talk, 0) * -1.4%))
             scaleY(calc(1.02 + var(--talk, 0) * 0.10)) scaleX(1.02);
}
.cameo-ring {
  position: absolute; inset: 0; border-radius: 12px; pointer-events: none;
  box-shadow: inset 0 0 0 0 rgba(56,225,214,0); transition: box-shadow .2s;
}
.cameo-stage.speaking .cameo-ring {
  box-shadow: inset 0 0 40px rgba(56,225,214,0.35), inset 0 0 0 2px rgba(56,225,214,0.6);
  animation: chowGlow 0.7s ease-in-out infinite;
}
.cameo-bars {
  position: absolute; left: 0; right: 0; bottom: 10px; display: flex; gap: 5px;
  justify-content: center; align-items: flex-end; height: 26px; opacity: 0; transition: opacity .2s;
}
.cameo-stage.speaking .cameo-bars { opacity: 1; }
.cameo-bars i { width: 5px; height: 6px; border-radius: 3px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); transition: height .06s linear; }
.cameo-name {
  text-align: center; margin-top: 14px; font-family: "Bebas Neue", sans-serif;
  letter-spacing: 3px; font-size: 18px; color: var(--ink-dim);
}
.cameo-name b { color: var(--cyan); }
.cameo-subtitle {
  text-align: center; margin-top: 8px; min-height: 42px; font-size: 14px; line-height: 1.4;
  color: var(--ink); font-weight: 500;
}
.cameo-another {
  display: block; margin: 12px auto 2px; padding: 10px 20px; cursor: pointer;
  font-family: "Bebas Neue", sans-serif; font-size: 16px; letter-spacing: 1.5px; color: #150a10;
  background: linear-gradient(135deg, var(--cyan), #22c55e); border: none; border-radius: 10px;
  box-shadow: 0 6px 20px rgba(56,225,214,0.3); transition: transform .15s var(--ease), box-shadow .2s;
}
.cameo-another:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(56,225,214,0.5); }
.cameo-another:disabled { opacity: 0.5; cursor: wait; }

/* re-watch dropdown under the founder video (cameo + page-3 founder chat) */
.cameo-pick, .fc-pick {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  margin: 8px auto 2px; font-family: "JetBrains Mono", monospace;
  font-size: 11px; letter-spacing: 0.5px; color: var(--ink-dim);
}
.fc-pick { justify-content: flex-start; }
.cameo-pick select, .fc-pick select {
  flex: 0 1 auto; max-width: 220px; padding: 6px 9px; font-size: 12px;
  background: #0e0c13; color: var(--ink); border: 1px solid var(--line); border-radius: 8px;
}

@keyframes kenburns { from { transform: scale(1) translateY(0); } to { transform: scale(1.08) translateY(-2%); } }
@keyframes chowGlow { 0%,100% { box-shadow: inset 0 0 30px rgba(56,225,214,0.25), inset 0 0 0 2px rgba(56,225,214,0.5); } 50% { box-shadow: inset 0 0 55px rgba(56,225,214,0.5), inset 0 0 0 3px rgba(56,225,214,0.85); } }

/* sidebar on mobile: full width above the content, steps scroll horizontally */
@media (max-width: 900px) {
  .app-shell { flex-direction: column; gap: 14px; padding: 14px 16px 32px; }
  .storyline-rail { position: static; flex: none; width: 100%; }
  .steps { flex-direction: row; overflow-x: auto; padding-bottom: 6px; }
  .step { flex: 0 0 200px; }
  .rail-legend { margin-bottom: 10px; }
}
