/* ANTARIKSHA-RAKSHA Jury Companion — mission-control knowledge companion.
   Desktop-first composition (1200 × 680 design stage, scaled to fit); stacked layout below 1000 px. */

:root {
  --bg: #030814;
  --bg-2: #061024;
  --panel: rgba(12, 28, 54, 0.72);
  --panel-solid: #0b1a33;
  --line: rgba(130, 190, 255, 0.14);
  --line-strong: rgba(130, 190, 255, 0.28);
  --text: #e8eff9;
  --text-soft: #c2cfe2;
  --muted: #8ea2bf;
  --accent: #5cc8ec;
  --accent-strong: #9be2f8;
  --accent-ink: #03121d;
  --accent-wash: rgba(92, 200, 236, 0.10);
  --ai: #94a9ff;
  --human: #f0c27a;
  --ok: #6fd3a8;
  --warn: #f0b955;
  --warn-wash: rgba(240, 185, 85, 0.10);
  --no: #f08a8a;
  --radius: 12px;
  --radius-sm: 8px;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --focus: 0 0 0 3px rgba(92, 200, 236, 0.45);
  --topbar-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background:
    radial-gradient(ellipse 60% 55% at 50% 42%, rgba(30, 90, 160, 0.20) 0%, rgba(3, 8, 20, 0) 70%),
    radial-gradient(ellipse 90% 60% at 50% 110%, rgba(18, 50, 100, 0.25) 0%, rgba(3, 8, 20, 0) 70%),
    var(--bg);
  color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
.starfield {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.75;
  background-image:
    radial-gradient(1px 1px at 23px 41px, rgba(255, 255, 255, 0.55), transparent 60%),
    radial-gradient(1px 1px at 167px 112px, rgba(190, 225, 255, 0.45), transparent 60%),
    radial-gradient(1.4px 1.4px at 92px 188px, rgba(255, 255, 255, 0.40), transparent 60%),
    radial-gradient(1px 1px at 251px 23px, rgba(190, 225, 255, 0.35), transparent 60%),
    radial-gradient(1px 1px at 61px 297px, rgba(255, 255, 255, 0.30), transparent 60%),
    radial-gradient(1.2px 1.2px at 311px 241px, rgba(170, 215, 255, 0.40), transparent 60%);
  background-size: 340px 340px, 340px 340px, 340px 340px, 420px 420px, 420px 420px, 520px 520px;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 650; letter-spacing: -0.005em; }
p { margin: 0; }
a { color: var(--accent); }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); }
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--accent); color: var(--accent-ink);
  padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.glass {
  background: linear-gradient(180deg, rgba(24, 48, 88, 0.55) 0%, rgba(9, 22, 44, 0.62) 100%);
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 12px 32px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}

/* ── Top bar ─────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
  background: rgba(3, 8, 20, 0.86); border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.topbar-inner { max-width: 1320px; height: 100%; margin: 0 auto; padding: 0 28px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); }
.brand-mark { width: 32px; height: 32px; flex: none; }
.bm-core { fill: none; stroke: var(--accent); stroke-width: 1.8; }
.bm-orbit { fill: none; stroke: var(--text-soft); stroke-width: 1.3; opacity: 0.7; }
.bm-sat { fill: var(--accent); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; letter-spacing: 0.1em; font-size: 0.86rem; }
.brand-sub { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.24em; color: var(--accent); }
.topnav { display: flex; gap: 6px; margin-left: auto; }
.topnav a {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.12em; color: var(--text-soft); text-decoration: none;
  padding: 8px 12px; border-radius: 6px; display: inline-flex; align-items: center; gap: 6px;
}
.topnav a:hover { color: var(--text); background: rgba(130, 190, 255, 0.07); }
.topnav a[aria-current="page"] { color: var(--accent-strong); background: var(--accent-wash); }
.nav-badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--warn); color: #1d1300;
  font-size: 0.7rem; font-weight: 700; display: inline-grid; place-items: center; letter-spacing: 0;
}
.chip {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--text-soft); white-space: nowrap;
}
.chip-accent { border-color: rgba(92, 200, 236, 0.5); color: var(--accent-strong); background: var(--accent-wash); }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--line-strong); background: rgba(18, 38, 70, 0.7); color: var(--text);
  font-size: 0.93rem; font-weight: 550; text-decoration: none; white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-strong); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; letter-spacing: 0.08em; }
.btn-primary:hover:not(:disabled) { background: var(--accent-strong); color: var(--accent-ink); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 12px; font-size: 0.86rem; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ═════════════ Command center stage ═════════════ */
.view-command { position: relative; }
.stage-wrap { position: relative; width: 100%; height: 680px; overflow: hidden; }
.stage { position: absolute; left: 0; top: 0; width: 1200px; height: 680px; transform-origin: 0 0; }

.ident { position: absolute; left: 28px; top: 22px; width: 440px; }
.ident-name { font-size: 1.6rem; font-weight: 750; letter-spacing: 0.1em; white-space: nowrap; color: var(--text); line-height: 1.1; }
.ident-sub { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.24em; color: var(--accent); margin-top: 8px; }
.ident-sub span { color: var(--muted); margin: 0 4px; }
.ident-tagline { font-size: 1.2rem; font-weight: 500; color: var(--text-soft); margin-top: 14px; }
.ident-motto { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.2em; color: var(--muted); margin-top: 10px; }

.status { position: absolute; right: 28px; top: 22px; width: 400px; display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.status-line { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; white-space: nowrap; color: var(--text-soft); display: flex; align-items: center; gap: 8px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(111, 211, 168, 0.18); }
.verified-line {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px;
  border: 1px solid rgba(111, 211, 168, 0.35); border-radius: var(--radius-sm);
  background: rgba(111, 211, 168, 0.07); color: #bdebd6; font-size: 0.8rem; white-space: nowrap;
}
.verified-line svg { width: 15px; height: 15px; fill: none; stroke: var(--ok); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.participant { display: flex; gap: 10px; align-items: center; text-align: left; }
.avatar {
  flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--mono); font-weight: 600; font-size: 0.82rem; color: var(--accent-strong);
  border: 1.5px solid var(--accent); background: radial-gradient(circle at 50% 40%, #12305a 0%, #0a1830 72%);
}
.label { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.participant-name { font-size: 0.95rem; font-weight: 650; line-height: 1.25; }

/* Holographic Earth horizon */
.horizon { position: absolute; left: 0; top: 0; width: 1200px; height: 680px; pointer-events: none; }
.hz-grid { fill: none; stroke: rgba(120, 190, 255, 0.10); stroke-width: 1; }

/* Arms and hands (colours are set per domain by app.js) */
.guide-arms { position: absolute; left: 0; top: 0; width: 1200px; height: 680px; pointer-events: none; overflow: visible; }
.arm { transition: opacity 0.25s ease; }
.arm-glow { fill: none; stroke-width: 9; stroke-linecap: round; opacity: 0.16; transition: opacity 0.2s ease; }
.arm-core { fill: none; stroke-width: 2.6; stroke-linecap: round; }
.arm-hi { fill: none; stroke: #ffffff; stroke-opacity: 0.32; stroke-width: 0.7; stroke-linecap: round; }
.arm-flow { fill: none; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 2 16; opacity: 0; }
.arm-port { stroke: rgba(255, 255, 255, 0.7); stroke-width: 0.8; }
.hand-glow { opacity: 0.2; transition: opacity 0.2s ease; }
.hand-finger { fill: none; stroke-width: 2.3; stroke-linecap: round; }
.hand-palm { stroke: rgba(255, 255, 255, 0.75); stroke-width: 0.9; }
.arm.is-hot .arm-glow { opacity: 0.34; }
.arm.is-hot .hand-glow { opacity: 0.42; }
.stage.has-active .arm:not(.is-hot) { opacity: 0.32; }
/* Selected domain: knowledge flows from the domain along the arm into the guide. */
.arm.is-selected .arm-flow { opacity: 1; animation: knowledge-flow 1.1s linear infinite; }
@keyframes knowledge-flow { to { stroke-dashoffset: 36; } }
@media (prefers-reduced-motion: reduce) { .arm.is-selected .arm-flow { animation: none; opacity: 0.6; } }

/* The guide */
.guide { position: absolute; left: 400px; top: 150px; width: 400px; height: 460px; pointer-events: none; }
.g-line { fill: none; stroke: #ffffff; stroke-opacity: 0.26; stroke-width: 1; }
.g-visor { stroke: #ffffff; stroke-opacity: 0.85; stroke-width: 0.6; }
.guide-caption {
  position: absolute; left: 400px; width: 400px; top: 500px; text-align: center; pointer-events: none;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.32em; color: rgba(214, 236, 255, 0.82);
}

/* Domain nodes */
.domain-node {
  --dc: #5cc8ec;
  position: absolute; width: 236px; transform: translate(-50%, -50%);
  display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center;
  padding: 11px 14px; text-align: left; cursor: pointer; border-radius: var(--radius);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.domain-node::before {
  content: ""; position: absolute; left: 14px; right: 14px; top: -1px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--dc), transparent); opacity: 0.85;
}
.domain-node:hover, .domain-node:focus-visible, .domain-node.is-active {
  border-color: color-mix(in srgb, var(--dc) 75%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 0 0 4px color-mix(in srgb, var(--dc) 14%, transparent), 0 12px 32px rgba(0, 0, 0, 0.3);
}
.domain-node.is-active { background: linear-gradient(180deg, color-mix(in srgb, var(--dc) 18%, rgba(16, 36, 70, 0.8)), rgba(9, 22, 44, 0.75)); }
.dn-icon {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--dc, #5cc8ec) 70%, transparent);
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--dc, #5cc8ec) 30%, #0b2142), rgba(6, 18, 38, 0.85));
  box-shadow: 0 0 14px color-mix(in srgb, var(--dc, #5cc8ec) 22%, transparent);
}
.dn-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--dc, var(--accent-strong)); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dn-icon svg .ic-fill { fill: var(--dc, var(--accent-strong)); stroke: none; }
.dn-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dn-label { font-family: var(--mono); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.1em; color: var(--text); line-height: 1.25; }
.dn-count { font-size: 0.78rem; color: var(--muted); }

/* Ask console */
.console { position: absolute; left: 230px; top: 548px; width: 740px; z-index: 4; }
.console-label { font-family: var(--mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.28em; color: var(--accent-strong); text-align: center; margin-bottom: 7px; }
.ask-form {
  display: flex; gap: 8px; align-items: stretch; padding: 7px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(20, 44, 82, 0.88), rgba(8, 20, 42, 0.92));
  border: 1px solid rgba(92, 200, 236, 0.45);
  box-shadow: 0 0 0 5px rgba(92, 200, 236, 0.06), 0 16px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.ask-form:focus-within { border-color: var(--accent); }
.ask-form input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; font-size: 1.05rem; padding: 9px 8px; }
.ask-form input::placeholder { color: #7488a6; }
.ask-form .btn-primary { padding: 9px 26px; }
.mic-btn {
  flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; cursor: pointer; border-radius: 9px;
  background: rgba(92, 200, 236, 0.08); border: 1px solid rgba(92, 200, 236, 0.35); color: var(--accent-strong);
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em;
}
.mic-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.mic-btn:hover:not(:disabled) { border-color: var(--accent); background: rgba(92, 200, 236, 0.16); }
.mic-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.mic-btn.listening { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.voice-status { min-height: 1.35em; margin-top: 5px; color: var(--muted); font-size: 0.8rem; text-align: center; }
.voice-status.is-active { color: var(--accent-strong); }
.examples { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; width: 1000px; margin-left: -130px; }
.examples-label { color: var(--muted); font-size: 0.78rem; }
.example {
  background: rgba(10, 24, 46, 0.6); border: 1px solid var(--line); color: var(--text-soft);
  border-radius: 999px; padding: 3px 11px; font-size: 0.78rem; cursor: pointer; white-space: nowrap;
}
.example:hover { border-color: var(--accent); color: var(--accent-strong); }

/* ── Contextual intelligence panel ───────────────────── */
.intel {
  --dc: #5cc8ec;
  position: absolute; top: 158px; width: 436px; height: 380px; z-index: 6;
  display: flex; flex-direction: column; border-radius: 14px;
  background: linear-gradient(180deg, rgb(15, 34, 64) 0%, rgb(7, 18, 38) 100%);
  border: 1px solid color-mix(in srgb, var(--dc) 45%, transparent);
  border-top: 2px solid var(--dc);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--dc) 7%, transparent), 0 24px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.intel.side-left { left: 24px; animation: intel-in-left 0.32s ease-out; }
.intel.side-right { right: 24px; animation: intel-in-right 0.32s ease-out; }
@keyframes intel-in-left { from { opacity: 0; transform: translateX(-34px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes intel-in-right { from { opacity: 0; transform: translateX(34px) scale(0.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .intel.side-left, .intel.side-right { animation: none; } }
.intel-close {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 8px; z-index: 2;
  background: transparent; border: 1px solid transparent; color: var(--muted); font-size: 1.35rem; line-height: 1; cursor: pointer;
}
.intel-close:hover { color: var(--text); border-color: var(--line-strong); }
.intel-body { overflow-y: auto; padding: 20px 22px 18px; flex: 1; scrollbar-width: thin; scrollbar-color: rgba(130, 190, 255, 0.3) transparent; }

.ip-head { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; margin: 0 36px 10px 0; }
.ip-head .dn-icon { width: 40px; height: 40px; --dc: inherit; }
.ip-count { font-size: 0.82rem; color: var(--muted); }
.intel .ip-kicker { color: var(--dc); }
.ip-kicker { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.22em; color: var(--accent); }
.ip-title { font-size: 1.15rem; font-weight: 700; letter-spacing: 0.04em; }
.ip-blurb { color: var(--text-soft); font-size: 0.9rem; margin-bottom: 12px; }
.ip-group { margin-top: 12px; }
.ip-group h4 { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em; color: var(--muted); font-weight: 600; margin-bottom: 4px; text-transform: uppercase; }
.ip-qlist { list-style: none; margin: 0; padding: 0; }
.ip-q {
  width: 100%; display: flex; gap: 10px; align-items: baseline; text-align: left; cursor: pointer;
  background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 8px 6px; font-size: 0.92rem; color: var(--text);
}
.ip-q::after { content: "›"; margin-left: auto; color: var(--muted); }
.ip-q:hover { background: rgba(92, 200, 236, 0.07); color: var(--accent-strong); }
.ip-q:hover::after { color: var(--accent); }
.ip-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.ip-label { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.22em; color: var(--muted); margin: 14px 0 5px; }
.ip-label:first-child { margin-top: 0; }
.ip-question { font-size: 1.12rem; font-weight: 650; line-height: 1.3; margin-right: 34px; }
.ip-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 36px 10px 0; }
.answer-text { font-size: 0.98rem; color: var(--text); }
.answer-points { margin: 10px 0 0; padding-left: 20px; color: var(--text-soft); font-size: 0.92rem; }
.answer-points li { margin: 5px 0; }
.ip-meta { display: grid; gap: 4px; margin-top: 4px; font-size: 0.86rem; color: var(--text-soft); }
.ip-verified { color: #bdebd6; display: flex; gap: 7px; align-items: center; font-size: 0.86rem; }
.ip-verified svg { width: 14px; height: 14px; fill: none; stroke: var(--ok); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.asked { color: var(--muted); font-size: 0.84rem; margin-top: 4px; }
.asked q { color: var(--text-soft); }
.fallback-title { font-size: 1.15rem; font-weight: 650; color: #f8e2b5; margin-top: 12px; }
.fallback-sub { color: var(--text-soft); margin-top: 4px; }
.saved-note { color: var(--ok); font-size: 0.86rem; align-self: center; }
.intel.is-fallback { border-color: rgba(240, 185, 85, 0.55); }

.related { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.related-title { font-size: 0.82rem; color: var(--muted); margin-bottom: 6px; }
.related-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.related-list button { text-align: left; background: transparent; border: 0; padding: 4px 0; cursor: pointer; color: var(--accent); font-size: 0.9rem; }
.related-list button:hover { text-decoration: underline; }
.rel-cat { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); margin-right: 8px; }

.tag {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--text-soft);
}
.tag-verified { color: #bdebd6; border-color: rgba(111, 211, 168, 0.45); background: rgba(111, 211, 168, 0.08); }
.tag-domain { color: var(--dc); border-color: color-mix(in srgb, var(--dc) 55%, transparent); }
.btn-accent { border-color: color-mix(in srgb, var(--dc, #5cc8ec) 70%, transparent); color: var(--dc, var(--accent-strong)); font-family: var(--mono); letter-spacing: 0.12em; font-weight: 700; }

/* Speech bar: automatic answer playback state (sticks to the bottom of the panel while scrolling) */
.speech-bar {
  position: sticky; bottom: -18px; z-index: 1; margin: 14px -22px 0; padding: 10px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  background: rgb(7, 18, 38); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.speech-bar.is-speaking { background: linear-gradient(90deg, color-mix(in srgb, var(--dc) 16%, rgb(7, 18, 38)), rgb(7, 18, 38)); }
.sb-text { display: inline-flex; align-items: center; gap: 9px; font-size: 0.9rem; font-weight: 600; color: var(--text); }
.sb-idle { color: var(--muted); font-weight: 500; }
.sb-warn { color: #f6d79b; font-weight: 500; }
.sb-buttons { display: inline-flex; gap: 8px; }
.sb-stop { border-color: rgba(240, 138, 138, 0.6); color: #ffc9c9; }
.sb-replay { border-color: color-mix(in srgb, var(--dc) 60%, transparent); }
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq span { width: 3px; height: 100%; border-radius: 1px; background: var(--dc); transform-origin: bottom; animation: eq 0.9s ease-in-out infinite; }
.eq span:nth-child(2) { animation-delay: 0.15s; }
.eq span:nth-child(3) { animation-delay: 0.3s; }
.eq span:nth-child(4) { animation-delay: 0.45s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .eq span { animation: none; transform: scaleY(0.7); } }
.tag-fallback { color: #f6d79b; border-color: rgba(240, 185, 85, 0.5); background: var(--warn-wash); }
.tag-demo { color: #f6d79b; border-color: rgba(240, 185, 85, 0.5); }

/* ═════════════ Secondary views ═════════════ */
.view-page { padding: 44px 0 64px; min-height: calc(100vh - var(--topbar-h) - 90px); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.page-head { margin-bottom: 28px; max-width: 820px; }
.kicker { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.26em; color: var(--accent); margin-bottom: 8px; }
.page-head h2 { font-size: 1.8rem; margin-bottom: 8px; }
.page-note { color: var(--muted); }

/* Workflow: mission flow */
.phases, .flow-track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 10px; }
.phases { margin-bottom: 10px; }
.phases li { border-top: 1px solid rgba(92, 200, 236, 0.35); padding-top: 6px; text-align: center; }
.phases .ph-2 { grid-column: span 2; }
.wf-name { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.2em; color: var(--muted); }
.flow-track li { position: relative; }
.flow-track li:not(:last-child)::after {
  content: ""; position: absolute; top: 34px; right: -10px; width: 10px; height: 1px; background: rgba(92, 200, 236, 0.55);
}
.flow-step {
  width: 100%; height: 100%; display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer;
  padding: 14px 12px 12px; border-radius: var(--radius); color: var(--text);
  background: linear-gradient(180deg, rgba(24, 48, 88, 0.55), rgba(9, 22, 44, 0.65));
  border: 1px solid var(--line-strong); border-top: 2px solid var(--accent);
}
.flow-step[data-actor="ai"] { border-top-color: var(--ai); }
.flow-step[data-actor="human"] { border-top-color: var(--human); }
.flow-step:hover { border-color: var(--accent); }
.fs-n { font-family: var(--mono); font-size: 0.7rem; color: var(--muted); }
.fs-name { font-family: var(--mono); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em; line-height: 1.3; }
.fs-desc { font-size: 0.8rem; color: var(--text-soft); line-height: 1.4; }
.fs-actor { margin-top: auto; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em; color: var(--accent); }
.flow-step[data-actor="ai"] .fs-actor { color: var(--ai); }
.flow-step[data-actor="human"] .fs-actor { color: var(--human); }

.boundary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 30px; }
.boundary { border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.boundary h3 { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.boundary-foot { color: var(--muted); font-size: 0.85rem; margin-top: auto; }
.statement { font-weight: 600; }
.flow-text { color: var(--text-soft); }
.flow-text span { color: var(--accent); }
.tick-list, .cross-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tick-list li, .cross-list li { position: relative; padding-left: 22px; color: var(--text-soft); font-size: 0.93rem; }
.tick-list li::before, .cross-list li::before { position: absolute; left: 0; top: 0; font-family: var(--mono); font-weight: 700; }
.tick-list li::before { content: "+"; color: var(--ok); }
.cross-list li::before { content: "×"; color: var(--no); }
.demo-note { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--text-soft); font-size: 0.93rem; }

/* Knowledge base */
.kb-tools { display: grid; gap: 12px; margin-bottom: 16px; }
.kb-search-label { font-weight: 600; }
.search-wrap { display: flex; align-items: center; gap: 10px; border-radius: var(--radius); padding: 0 14px; }
.search-wrap:focus-within { border-color: var(--accent); }
.search-wrap svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; flex: none; }
.search-wrap input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; padding: 12px 0; font-size: 1rem; }
.search-wrap input::placeholder { color: #7488a6; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-btn { cursor: pointer; background: rgba(10, 24, 46, 0.6); border: 1px solid var(--line-strong); color: var(--text-soft); border-radius: 999px; padding: 5px 12px; font-size: 0.86rem; }
.chip-btn .cl { font-family: var(--mono); color: var(--muted); margin-right: 6px; }
.chip-btn:hover { border-color: var(--accent); }
.chip-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.chip-btn[aria-pressed="true"] .cl { color: var(--accent-ink); }
.kb-status { color: var(--muted); font-size: 0.9rem; margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.kb-status .btn { padding: 3px 10px; font-size: 0.82rem; }
.kb-group { margin-bottom: 24px; }
.kb-group-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.kb-group-title .count { color: var(--muted); letter-spacing: 0.05em; }
.qa { background: rgba(10, 24, 46, 0.7); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 7px; }
.qa[open] { border-color: var(--line-strong); }
.qa.is-flash { border-color: var(--accent); }
.qa summary { list-style: none; cursor: pointer; padding: 13px 16px; display: flex; gap: 14px; align-items: baseline; font-weight: 560; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; margin-left: auto; font-family: var(--mono); color: var(--muted); font-size: 1.15rem; line-height: 1; }
.qa[open] summary::after { content: "−"; color: var(--accent); }
.qa summary:hover { color: var(--accent-strong); }
.qa-id { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); flex: none; min-width: 2.6em; }
.qa-body { padding: 0 16px 16px calc(16px + 2.6em + 14px); }
.qa-body .answer-text { color: var(--text-soft); }
.qa-actions { margin-top: 12px; display: flex; gap: 8px; }
.empty { color: var(--muted); padding: 16px 0; }

/* Unknown questions */
.unknown-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.copy-status { color: var(--ok); font-size: 0.9rem; }
.unknown-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.unknown-list li { display: flex; gap: 14px; align-items: center; justify-content: space-between; background: rgba(10, 24, 46, 0.7); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 15px; }
.uq-time { color: var(--muted); font-size: 0.82rem; font-family: var(--mono); white-space: nowrap; }
.uq-remove { background: transparent; border: 0; color: var(--muted); cursor: pointer; font-size: 0.88rem; padding: 4px 6px; }
.uq-remove:hover { color: var(--no); }
.uq-right { display: flex; gap: 10px; align-items: center; flex: none; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 14px 0 18px; color: var(--muted); font-size: 0.78rem; }
.footer-inner { max-width: 1320px; margin: 0 auto; padding: 0 28px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }

/* ═════════════ Responsive: stacked command center below 1000 px ═════════════ */
@media (max-width: 1180px) {
  .topnav a { padding: 8px 8px; letter-spacing: 0.08em; }
  .topbar .chip { display: none; }
}
@media (max-width: 999px) {
  .topnav { display: none; }
  .stage-wrap { height: auto !important; overflow: visible; }
  .stage {
    position: static; width: auto; height: auto; transform: none !important;
    display: flex; flex-direction: column; align-items: center; padding: 26px 16px 32px; gap: 14px;
  }
  .ident, .status, .guide, .guide-caption, .console, .domain-nodes { position: static; }
  .ident { width: auto; text-align: center; order: 1; }
  .guide { order: 2; }
  .guide-caption { order: 3; }
  .console { order: 4; }
  .domain-nodes { order: 5; }
  .ident-name { font-size: 1.5rem; letter-spacing: 0.12em; }
  .ident-sub { font-size: 0.68rem; letter-spacing: 0.14em; }
  .ident-motto { letter-spacing: 0.1em; }
  .status { width: auto; align-items: center; order: 6; }
  .guide-arms, .horizon { display: none; }
  .examples { width: auto; margin-left: 0; }
  .guide { width: 190px; height: 218px; margin-bottom: -40px; }
  .guide-caption { width: auto; margin-top: -6px; }
  .console { width: 100%; max-width: 640px; }
  .domain-nodes { width: 100%; max-width: 640px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .domain-node { position: static; width: auto; transform: none; }
  .intel {
    position: fixed; inset: auto 0 0 0; top: 64px; width: auto; height: auto; z-index: 40;
    border-radius: 16px 16px 0 0; animation: intel-in-up 0.28s ease-out !important;
  }
  .intel.side-left, .intel.side-right { left: 0; right: 0; }
  @keyframes intel-in-up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
  .flow-track { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .phases { display: none; }
  .flow-track li::after { display: none; }
  .boundary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .topbar-inner { padding: 0 16px; }
  .ask-form { flex-wrap: wrap; }
  .ask-form input { flex-basis: 100%; order: -1; }
  .ask-form .btn-primary { flex: 1; }
  .mic-btn { padding: 8px 14px; }
  .domain-node { grid-template-columns: 36px 1fr; gap: 9px; padding: 10px; }
  .domain-node .dn-icon { width: 36px; height: 36px; }
  .dn-label { font-size: 0.74rem; }
  .flow-track { grid-template-columns: 1fr 1fr; }
  .boundary-grid { grid-template-columns: 1fr; }
  .qa-body { padding-left: 16px; }
  .unknown-list li { flex-direction: column; align-items: flex-start; }
  .footer-inner { padding: 0 16px; }
}
