/* ════════ Tokens (from mockup-desk) ════════ */
:root {
  --ink: #0a0d14;
  --panel: #101522;
  --panel-2: #0d1220;
  --line: #1e2740;
  --text: #c7d0e4;
  --muted: #8792aa;
  --phosphor: #ffb454;
  --phosphor-dim: #8a6430;
  --long: #46c28a;
  --short: #e0565e;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--ink); scroll-behavior: smooth; }
body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}
a { color: var(--phosphor); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--phosphor); outline-offset: 2px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.hide-sm { display: inline-flex; }
@media (max-width: 720px) { .statusbar .status-item.hide-sm { display: none; } }

/* ════════ Status bar ════════ */
.statusbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
}
.statusbar .wrap { display: flex; align-items: center; gap: 24px; height: 44px; }
.brand { color: var(--phosphor); font-weight: 700; }
.status-item { color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.status-item b { color: var(--text); font-weight: 600; }
.pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--long);
  animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: .35; } }
.spacer { flex: 1; }

.bar-contact { color: var(--text); font-weight: 600; margin-right: 4px; }
.bar-contact:hover { color: var(--phosphor); text-decoration: none; }

.mode-switch { display: inline-flex; align-items: center; gap: 6px; }
.mode-label { color: var(--muted); margin-right: 2px; }
.mode-btn {
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em;
  background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 6px;
  padding: 4px 10px; cursor: pointer; transition: .15s;
}
.mode-btn:hover { color: var(--text); border-color: var(--phosphor-dim); }
.mode-btn.active { color: var(--ink); background: var(--phosphor); border-color: var(--phosphor); font-weight: 700; }
.mode-btn[hidden] { display: none; }
.mode-btn .soon {
  font-style: normal; font-size: 8px; letter-spacing: .05em;
  vertical-align: super; color: var(--phosphor); margin-left: 2px;
}
.mode-btn.active .soon { color: var(--ink); }
.inline-mode {
  font-family: var(--mono); font-size: inherit;
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--phosphor); text-decoration: underline;
}

/* ════════ Hero ════════ */
.hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
  padding-top: 80px; padding-bottom: 64px;
}
@media (max-width: 880px) { .hero { grid-template-columns: 1fr; padding-top: 48px; } }

.term-eyebrow { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.term-eyebrow::before { content: "$ "; color: var(--phosphor); }
.hero-name {
  font-size: clamp(1.5rem, 3vw, 1.9rem); font-weight: 700;
  color: #e8edf8; letter-spacing: -.01em; margin: 0 0 2px;
}
.hero-title { font-family: var(--mono); font-size: 13px; color: var(--phosphor); margin: 0 0 22px; }
.hero-roles { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 0 0 26px; letter-spacing: .02em; }
.hero-roles b { color: var(--long); font-weight: 700; letter-spacing: .08em; margin-right: 8px; }
h1 {
  font-family: var(--mono);
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  color: #e8edf8;
}
h1 .accent { color: var(--phosphor); }
h1 .accent-brain { color: var(--long); }
.cursor {
  display: inline-block; width: .55em; height: 1em;
  background: var(--phosphor); vertical-align: text-bottom; margin-left: 4px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-lead { color: var(--muted); font-size: 1.05rem; max-width: 36em; margin: 0 0 28px; }
.hero-lead strong { color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  padding: 12px 20px; border-radius: 4px; border: 1px solid transparent;
  cursor: pointer; transition: .15s;
}
.btn-primary { background: var(--phosphor); color: var(--ink); }
.btn-primary:hover { filter: brightness(1.1); text-decoration: none; }
.btn-ghost { border-color: var(--phosphor-dim); color: var(--phosphor); }
.btn-ghost:hover { border-color: var(--phosphor); text-decoration: none; }
.hero-hint { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 0; }
.hero-hint kbd {
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px;
  font-family: var(--mono); font-size: 11px; color: var(--text); background: var(--panel);
}

/* Terminal side card */
.term-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 180, 84, .05), 0 24px 60px rgba(0, 0, 0, .5);
}
.term-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.term-title { margin-left: 6px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.term-body { padding: 18px; font-family: var(--mono); font-size: 12.5px; line-height: 1.8; }
.tl .cmd { color: #e8edf8; }
.tl .ok { color: var(--long); } .tl .warn { color: var(--phosphor); }
.tl .key { color: var(--muted); } .tl .val { color: var(--long); }
.tl.mt { margin-top: 10px; }
.term-metrics {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 16px;
}
.metric {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; display: flex; flex-direction: column;
}
.metric .label { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.metric .value { font-size: 18px; font-weight: 700; color: var(--phosphor); }

/* ════════ Stat band ════════ */
.statband { background: var(--panel-2); border-block: 1px solid var(--line); }
.statband-grid { display: grid; grid-template-columns: repeat(5, 1fr); }
@media (max-width: 880px) { .statband-grid { grid-template-columns: repeat(2, 1fr); } }
.stat {
  padding: 22px 20px;
  border-right: 1px solid var(--line);
  font-family: var(--mono);
}
.stat:last-child { border-right: none; }
.stat b { display: block; font-size: 26px; color: #e8edf8; }
.stat b i { color: var(--long); font-style: normal; }
.stat span { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }

/* ════════ Sections ════════ */
.section { padding: 72px 24px 8px; }
.kicker { font-family: var(--mono); font-size: 12px; color: var(--phosphor); letter-spacing: .08em; margin: 0 0 8px; }
h2 { font-family: var(--mono); font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: #e8edf8; letter-spacing: -.01em; margin: 0 0 28px; }
h3 { font-family: var(--mono); font-size: 14px; letter-spacing: .04em; color: #e8edf8; margin: 0 0 10px; }

/* Pipeline */
.pipeline {
  display: flex; align-items: stretch; gap: 10px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 24px; overflow-x: auto;
}
.pipe-step {
  flex: 1; min-width: 130px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px;
}
.pipe-step b { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--phosphor); margin-bottom: 6px; }
.pipe-step span { font-size: 12.5px; color: var(--muted); line-height: 1.45; display: block; }
.pipe-step.live { border-color: var(--long); }
.pipe-step.live b { color: var(--long); }
.pipe-arrow { align-self: center; color: var(--muted); font-family: var(--mono); }
.pipeline-note { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin: 14px 4px 0; }
.pipeline-note b { color: var(--text); }

/* Capability cards */
.cards-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 720px) { .cards-2col { grid-template-columns: 1fr; } }
.card {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 22px 24px;
}
.card p { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 4px; padding: 4px 8px;
}
.chips span.hot { color: var(--phosphor); border-color: var(--phosphor-dim); }

/* Timeline */
.timeline { border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); overflow: hidden; }
.trow {
  display: grid; grid-template-columns: 150px 1fr; gap: 24px;
  padding: 22px 24px; border-bottom: 1px solid var(--line);
}
.trow:last-child { border-bottom: none; }
@media (max-width: 720px) { .trow { grid-template-columns: 1fr; gap: 6px; } }
.tdate { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 3px; }
.tbody-cell h3 .at { color: var(--phosphor); font-weight: 400; }
.tbody-cell p { color: var(--muted); font-size: 14px; margin: 0; }

/* Field notes */
.field-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px; align-items: center; }
@media (max-width: 720px) { .field-grid { grid-template-columns: 1fr; } }
.field-photo { margin: 0; }
.field-photo img {
  width: 100%; height: auto; display: block; border-radius: 12px;
  border: 1px solid var(--line);
  aspect-ratio: 1080 / 1236; object-fit: cover; /* reserve space pre-load: no layout shift */
}
.field-photo figcaption { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 10px; }
.field-copy p { color: var(--muted); font-size: 14.5px; margin: 0 0 16px; }

/* Projects */
.proj-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter-btn {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 6px 12px; cursor: pointer; transition: .15s;
}
.filter-btn:hover { color: var(--text); border-color: var(--phosphor-dim); }
.filter-btn.active { color: var(--ink); background: var(--phosphor); border-color: var(--phosphor); font-weight: 700; }

.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 880px) { .proj-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .proj-grid { grid-template-columns: 1fr; } }
.proj-card {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .15s;
}
.proj-card:hover { border-color: var(--phosphor-dim); }
.proj-card img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.proj-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.proj-body h3 { margin: 0; font-size: 13px; }
.proj-body p { color: var(--muted); font-size: 13px; margin: 0; flex: 1; }
.proj-links { display: flex; gap: 14px; font-family: var(--mono); font-size: 12px; }

/* Publications */
.pubs { display: flex; flex-direction: column; gap: 12px; }
.pub {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 22px;
}
.pub.featured { border-color: var(--phosphor-dim); }
.pub h3 { font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: 0; margin-bottom: 6px; }
.pub-meta { font-size: 13px; color: var(--muted); margin: 0; }
.pub-meta i { color: var(--text); }
.pub-tag { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--phosphor); margin: 8px 0 0; }
.pubs-more { font-family: var(--mono); font-size: 13px; color: var(--muted); margin-top: 18px; }

/* Contact */
.contact-band {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: var(--panel-2);
  padding: 64px 0 40px;
}
.contact-band h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
.contact-links { display: flex; flex-wrap: wrap; gap: 22px; font-family: var(--mono); font-size: 14px; margin-bottom: 34px; }
.signature { height: 44px; width: auto; opacity: .8; filter: invert(.85); margin-bottom: 22px; }
.footer-line { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--muted); margin: 0; }

/* ════════ CLI mode ════════ */
#cli-root { position: fixed; inset: 44px 0 0; z-index: 40; background: var(--ink); }
.cli-screen {
  height: 100%; overflow-y: auto;
  padding: 24px clamp(16px, 4vw, 48px) 40px;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.7;
  cursor: text;
}
#cli-scrollback { white-space: pre-wrap; word-break: break-word; }
#cli-scrollback .out-cmd { color: #e8edf8; }
#cli-scrollback .out-dim { color: var(--muted); }
#cli-scrollback .out-accent { color: var(--phosphor); }
#cli-scrollback .out-ok { color: var(--long); }
#cli-scrollback .out-err { color: var(--short); }
#cli-scrollback a { color: var(--phosphor); }

.cli-welcome {
  border: 1px solid var(--phosphor-dim); border-radius: 8px;
  padding: 12px 18px; margin-bottom: 16px;
  color: var(--text); display: inline-block;
}
.cli-welcome .star { color: var(--phosphor); }

.cli-suggest { margin: 0 0 18px; }
.cli-suggest .lbl { color: var(--muted); margin-right: 6px; }
.suggest-btn {
  font-family: var(--mono); font-size: 12px;
  color: var(--phosphor); background: transparent;
  border: 1px solid var(--phosphor-dim); border-radius: 4px;
  padding: 4px 10px; margin: 0 6px 6px 0; cursor: pointer; transition: .15s;
}
.suggest-btn:hover { background: var(--phosphor); color: var(--ink); }

.cli-input-row { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; }
.cli-prompt { color: var(--long); white-space: nowrap; }
#cli-input {
  flex: 1; background: transparent; border: none; outline: none;
  color: #e8edf8; font-family: var(--mono); font-size: 13.5px;
  caret-color: var(--phosphor);
}

/* ════════ AGI mode ════════ */
#agi-root { position: fixed; inset: 44px 0 0; z-index: 40; background: var(--ink); overflow-y: auto; }
.agi-screen {
  width: min(1240px, 100%); min-height: 100%; margin: 0 auto;
  padding: 28px 24px 36px; font-family: var(--mono);
}
.agi-heading {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  margin-bottom: 18px;
}
.agi-heading .kicker { margin-bottom: 4px; }
.agi-title { font-size: clamp(1.55rem, 3vw, 2.15rem); color: #e8edf8; margin: 0 0 5px; }
.agi-sub { color: var(--muted); font-family: var(--sans); font-size: 13px; line-height: 1.5; margin: 0; max-width: 650px; }
.agi-beta {
  display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto;
  color: var(--muted); font-size: 10px; letter-spacing: .12em;
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px;
}
.agi-beta span { width: 7px; height: 7px; border-radius: 50%; background: var(--long); box-shadow: 0 0 12px var(--long); }
.agi-call {
  display: grid; grid-template-columns: minmax(0, 1.13fr) minmax(330px, .87fr);
  min-height: min(690px, calc(100vh - 165px));
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: var(--panel-2); box-shadow: 0 30px 90px rgba(0, 0, 0, .45);
}
.agi-stage {
  position: relative; min-height: 490px; overflow: hidden; isolation: isolate;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--long) 13%, transparent), transparent 36%),
    linear-gradient(155deg, color-mix(in srgb, var(--panel) 88%, var(--long)), var(--ink));
}
.agi-stage::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .34;
  background-image:
    linear-gradient(color-mix(in srgb, var(--line) 60%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--line) 60%, transparent) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, transparent, black 28%, black 70%, transparent);
}
#agi-avatar-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; }
.agi-stage-glow {
  position: absolute; z-index: 0; left: 50%; bottom: 4%; transform: translateX(-50%);
  width: 72%; height: 18%; border-radius: 50%; background: color-mix(in srgb, var(--phosphor) 12%, transparent);
  filter: blur(28px);
}
.agi-avatar-label {
  position: absolute; z-index: 3; top: 18px; left: 18px;
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px;
  background: color-mix(in srgb, var(--ink) 78%, transparent); backdrop-filter: blur(10px);
}
.agi-live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--long); box-shadow: 0 0 12px var(--long); }
.agi-avatar-label b { display: block; color: #e8edf8; font-size: 11px; letter-spacing: .1em; }
.agi-avatar-label small { display: block; color: var(--muted); font-size: 10px; margin-top: -2px; }
.agi-thinking {
  position: absolute; z-index: 4; left: 50%; top: 35%; transform: translate(-50%, -50%);
  display: flex; gap: 6px; padding: 10px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 75%, transparent); border: 1px solid var(--line);
}
.agi-thinking[hidden] { display: none; }
.agi-thinking span { width: 6px; height: 6px; border-radius: 50%; background: var(--phosphor); animation: agi-think 1s infinite ease-in-out; }
.agi-thinking span:nth-child(2) { animation-delay: .16s; }
.agi-thinking span:nth-child(3) { animation-delay: .32s; }
@keyframes agi-think { 0%, 70%, 100% { transform: translateY(0); opacity: .4; } 35% { transform: translateY(-5px); opacity: 1; } }
.agi-self-video {
  position: absolute; z-index: 4; right: 16px; bottom: 18px;
  width: min(29%, 170px); aspect-ratio: 4 / 3; object-fit: cover; transform: scaleX(-1);
  border: 1px solid var(--phosphor-dim); border-radius: 9px; background: var(--panel);
  box-shadow: 0 12px 35px rgba(0, 0, 0, .4);
}
.agi-wave {
  position: absolute; z-index: 3; left: 20px; bottom: 23px; height: 28px;
  display: flex; align-items: center; gap: 3px;
}
.agi-wave i { display: block; width: 3px; height: 5px; border-radius: 9px; background: var(--long); transition: height .12s; }
.agi-stage[data-state="listening"] .agi-wave i { animation: agi-wave .72s infinite ease-in-out alternate; }
.agi-stage[data-state="listening"] .agi-wave i:nth-child(2n) { animation-delay: -.25s; }
.agi-stage[data-state="listening"] .agi-wave i:nth-child(3n) { animation-delay: -.48s; }
.agi-stage[data-state="speaking"] .agi-wave i { background: var(--phosphor); animation: agi-wave .42s infinite ease-in-out alternate; }
.agi-stage[data-state="speaking"] .agi-wave i:nth-child(2n) { animation-delay: -.16s; }
@keyframes agi-wave { to { height: 26px; } }

.agi-panel { min-width: 0; display: flex; flex-direction: column; background: var(--panel-2); }
.agi-transcript {
  flex: 1; min-height: 250px; overflow-y: auto; padding: 22px;
  scrollbar-color: var(--line) transparent;
}
.agi-message { margin: 0 0 20px; max-width: 92%; text-align: left; }
.agi-message.user { margin-left: auto; }
.agi-message > span { display: block; color: var(--muted); font-size: 9px; letter-spacing: .12em; margin: 0 0 5px 5px; }
.agi-message.user > span { text-align: right; margin-right: 5px; }
.agi-message p {
  display: inline-block; color: var(--text); font-family: var(--sans); font-size: 14px; line-height: 1.55;
  margin: 0; padding: 10px 13px; border: 1px solid var(--line); border-radius: 4px 12px 12px 12px;
  background: var(--panel);
}
.agi-message.user p { float: right; color: #e8edf8; border-color: var(--phosphor-dim); border-radius: 12px 4px 12px 12px; }
.agi-message.user::after { content: ""; display: block; clear: both; }
.agi-message.error p { color: var(--short); }
.agi-prompts { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 18px 14px; }
.agi-prompts button {
  color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px;
  font-family: var(--mono); font-size: 10px; padding: 6px 10px; cursor: pointer;
}
.agi-prompts button:hover { color: var(--phosphor); border-color: var(--phosphor-dim); }
.agi-input-form { display: flex; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
#agi-input {
  min-width: 0; flex: 1; color: #e8edf8; background: var(--ink); border: 1px solid var(--line); border-radius: 7px;
  font-family: var(--sans); font-size: 14px; padding: 11px 12px; outline: none;
}
#agi-input:focus { border-color: var(--phosphor-dim); box-shadow: 0 0 0 2px color-mix(in srgb, var(--phosphor) 9%, transparent); }
.agi-send {
  flex: 0 0 42px; color: var(--ink); background: var(--phosphor); border: none; border-radius: 7px;
  font-size: 20px; cursor: pointer;
}
.agi-send:disabled { opacity: .45; cursor: wait; }
.agi-controls { display: grid; grid-template-columns: 1.35fr 1fr 1fr .78fr; gap: 7px; padding: 0 18px 12px; }
.agi-control {
  min-width: 0; display: inline-flex; justify-content: center; align-items: center; gap: 7px;
  color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 7px;
  font-family: var(--mono); font-size: 10px; padding: 9px 7px; cursor: pointer;
}
.agi-control:hover:not(:disabled) { color: var(--text); border-color: var(--phosphor-dim); }
.agi-control:disabled { opacity: .42; cursor: not-allowed; }
.agi-control.primary { color: var(--ink); background: var(--long); border-color: var(--long); font-weight: 700; }
.agi-control.danger:not(:disabled) { color: var(--short); }
.agi-control[aria-pressed="true"] { color: var(--long); border-color: var(--long); }
.agi-control .control-icon { font-size: 9px; letter-spacing: .04em; }
.agi-privacy { color: var(--muted); font-family: var(--sans); font-size: 10.5px; line-height: 1.45; margin: 0; padding: 0 18px 14px; }
.agi-privacy code { color: var(--phosphor); font-family: var(--mono); }
.agi-admin-dialog {
  width: min(430px, calc(100% - 32px)); color: var(--text); background: var(--panel-2);
  border: 1px solid var(--phosphor-dim); border-radius: 12px; padding: 0;
  box-shadow: 0 32px 100px rgba(0, 0, 0, .68);
}
.agi-admin-dialog::backdrop { background: rgba(4, 7, 12, .84); backdrop-filter: blur(8px); }
.agi-admin-form { position: relative; display: grid; gap: 13px; padding: 28px; }
.agi-admin-form .kicker { margin: 0; }
.agi-admin-form h2 { color: #e8edf8; font-family: var(--mono); font-size: 1.45rem; margin: 0; }
.agi-admin-form > p:not(.kicker, .agi-admin-status) {
  color: var(--muted); font-family: var(--sans); line-height: 1.55; margin: 0 0 4px;
}
.agi-admin-form label { color: var(--text); font-family: var(--mono); font-size: 11px; }
.agi-admin-form input {
  width: 100%; color: #e8edf8; background: var(--ink); border: 1px solid var(--line);
  border-radius: 7px; font-family: var(--mono); font-size: 14px; padding: 11px 12px; outline: none;
}
.agi-admin-form input:focus { border-color: var(--phosphor-dim); }
.agi-admin-close {
  position: absolute; top: 14px; right: 16px; color: var(--muted); background: transparent;
  border: 0; font-size: 24px; line-height: 1; cursor: pointer;
}
.agi-admin-close:hover { color: var(--text); }
.agi-admin-status { min-height: 1.4em; color: var(--short); font-family: var(--mono); font-size: 11px; margin: 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (max-width: 880px) {
  .agi-screen { padding: 22px 16px 28px; }
  .agi-call { grid-template-columns: 1fr; min-height: auto; }
  .agi-stage { min-height: min(58vh, 520px); border-right: none; border-bottom: 1px solid var(--line); }
  .agi-transcript { min-height: 280px; max-height: 420px; }
}
@media (max-width: 600px) {
  .agi-heading { align-items: flex-start; }
  .agi-beta { display: none; }
  .agi-stage { min-height: 420px; }
  .agi-transcript { padding: 18px 14px; }
  .agi-prompts { padding-inline: 12px; }
  .agi-input-form { padding-inline: 12px; }
  .agi-controls { grid-template-columns: 1fr 1fr; padding-inline: 12px; }
  .agi-privacy { padding-inline: 12px; }
  .agi-self-video { width: 31%; }
}

/* Mode visibility */
body[data-mode="cli"] #gui-root, body[data-mode="agi"] #gui-root { display: none; }
body[data-mode="cli"] { overflow: hidden; }

/* ════════ Mobile readability ════════ */
@media (max-width: 880px) {
  .statband-grid .stat { border-right: none; border-bottom: 1px solid var(--line); }
  .statband-grid .stat:first-child { grid-column: 1 / -1; text-align: center; }
  .statband-grid .stat:nth-last-child(-n+2) { border-bottom: none; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .statusbar .wrap { gap: 12px; padding: 0 14px; }
  .mode-label { display: none; }
  .mode-btn { padding: 4px 8px; }
  .card p, .tbody-cell p, .field-copy p { font-size: 15px; }
  .pub-meta { font-size: 14px; }
  .pipeline { flex-direction: column; align-items: stretch; }
  .pipe-step { min-width: 0; }
  .pipe-arrow { transform: rotate(90deg); align-self: center; padding: 2px 0; }
  .contact-links { flex-direction: column; gap: 0; }
  .contact-links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .contact-links a:last-child { border-bottom: none; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor, .pulse, .agi-thinking span, .agi-stage .agi-wave i { animation: none; }
  html { scroll-behavior: auto; }
}
