/* SINGULARITY — Agent Command Deck · ABCO SYS aesthetic (matches Beacon) */

:root {
  --bg: #05060a;
  --bg-elev: #0b0d14;
  --bg-card: rgba(14, 17, 28, 0.78);
  --bg-panel: rgba(10, 12, 20, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f6fb;
  --muted: rgba(244, 246, 251, 0.62);
  --dim: rgba(244, 246, 251, 0.38);
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.16);
  --cyan-glow: rgba(34, 211, 238, 0.35);
  --ember: #ff6b3d;
  --ember-soft: rgba(255, 107, 61, 0.18);
  --violet: #8b5cf6;
  --violet-soft: rgba(139, 92, 246, 0.18);
  --green: #34d399;
  --green-soft: rgba(52, 211, 153, 0.16);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.16);
  --red: #f87171;
  --radius: 14px;
  --radius-sm: 10px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 64px;
  --board-h: auto;
}

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

html {
  color-scheme: dark;
  height: 100%;
}

body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 45% at 15% -5%, rgba(34, 211, 238, 0.08), transparent 55%),
    radial-gradient(ellipse 50% 40% at 95% 10%, rgba(255, 107, 61, 0.06), transparent 50%),
    radial-gradient(ellipse 40% 30% at 70% 90%, rgba(139, 92, 246, 0.05), transparent 50%),
    linear-gradient(180deg, #05060a 0%, #070910 45%, #05060a 100%);
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
a:hover { color: #67e8f9; text-decoration: underline; text-underline-offset: 3px; }

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

::selection {
  background: rgba(34, 211, 238, 0.35);
  color: #fff;
}

.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
.cyan { color: var(--cyan); }
.ember { color: var(--ember); }

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4em;
  padding: 0.12em 0.4em;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  line-height: 1.3;
}

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

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.03;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.35) 2px,
    rgba(0, 0, 0, 0.35) 4px
  );
}

/* ========== HERO STRIP ========== */
.hero-strip {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 6, 10, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.hero-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 280px;
}

.sys-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-soft), 0 0 18px var(--cyan-glow);
  flex-shrink: 0;
  animation: pulse-dot 2.4s var(--ease) infinite;
}

.hero-titles h1 {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.hero-titles .slash { color: var(--ember); font-weight: 500; }
.hero-sub {
  font-size: 0.72rem;
  color: var(--dim);
  font-family: var(--mono);
  margin-top: 2px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
}
.chip-meta {
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}
.chip-link {
  background: var(--cyan-soft);
  border-color: rgba(34, 211, 238, 0.28);
  color: var(--cyan);
  text-decoration: none;
}
.chip-link:hover { background: rgba(34, 211, 238, 0.25); text-decoration: none; color: #fff; }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.icon-btn:hover,
.icon-btn[aria-pressed="true"] {
  background: var(--cyan-soft);
  border-color: rgba(34, 211, 238, 0.3);
  color: var(--cyan);
}
.icon-btn .ico { font-size: 0.85rem; }
.icon-btn .lbl { font-size: 0.72rem; font-weight: 500; }

.btn-cmd {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(255, 107, 61, 0.12));
  border: 1px solid rgba(34, 211, 238, 0.35);
  color: var(--text);
  font-weight: 600;
  font-size: 0.8rem;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, border-color 0.2s;
}
.btn-cmd:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(34, 211, 238, 0.15);
  border-color: var(--cyan);
}
.btn-cmd kbd {
  background: rgba(0, 0, 0, 0.35);
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.25);
}

/* ========== MISSION BOARD ========== */
.mission-board {
  position: relative;
  z-index: 5;
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 10, 16, 0.55);
}

.board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.board-head h2 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.board-hint {
  font-size: 0.72rem;
  color: var(--dim);
}
.board-hint kbd { margin: 0 2px; }

.mission-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.mission-card {
  position: relative;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s;
  overflow: hidden;
  text-align: left;
}
.mission-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent, var(--cyan));
  opacity: 0.7;
}
.mission-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.mission-card:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}
.mission-card.is-running {
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.15), 0 8px 32px rgba(34, 211, 238, 0.08);
}
.mission-card.is-done {
  border-color: rgba(52, 211, 153, 0.35);
}
.mission-card.is-done::before { background: var(--green); }

.mission-num {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--dim);
  margin-bottom: 4px;
}
.mission-title {
  font-size: 0.88rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.mission-desc {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 10px;
}
.mission-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--dim);
  border: 1px solid var(--line);
}
.mission-status[data-status="queued"] { color: var(--dim); }
.mission-status[data-status="running"] {
  color: var(--cyan);
  background: var(--cyan-soft);
  border-color: rgba(34, 211, 238, 0.3);
}
.mission-status[data-status="done"] {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(52, 211, 153, 0.3);
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.mission-status[data-status="running"] .status-dot {
  animation: blink 1s steps(2) infinite;
}

/* ========== DECK LAYOUT ========== */
.deck {
  position: relative;
  z-index: 5;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(200px, 240px) 1fr minmax(220px, 280px);
  gap: 0;
  min-height: 0;
  border-bottom: 1px solid var(--line);
}

.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--line);
}
.panel:last-child { border-right: none; }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.panel-head h2 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.live-pill .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse-dot 2s ease infinite;
}

.log-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.text-btn {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--dim);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
}
.text-btn:hover {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.panel-foot {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.65rem;
  color: var(--dim);
  flex-shrink: 0;
}
.panel-foot a { color: var(--muted); }
.panel-foot a:hover { color: var(--cyan); }

/* Roster */
.roster {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}

.agent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
  margin-bottom: 2px;
}
.agent:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
}
.agent.is-active {
  background: var(--cyan-soft);
  border-color: rgba(34, 211, 238, 0.25);
}
.agent.is-busy .agent-avatar {
  box-shadow: 0 0 0 2px var(--cyan-soft), 0 0 12px var(--cyan-glow);
}

.agent-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  flex-shrink: 0;
  background: var(--agent-bg, var(--cyan-soft));
  color: var(--agent-fg, var(--cyan));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.agent-body { min-width: 0; flex: 1; }
.agent-name {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.agent-role {
  font-size: 0.65rem;
  color: var(--dim);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.agent-chip {
  display: inline-flex;
  margin-top: 6px;
  padding: 2px 7px;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.agent-chip[data-status="idle"] { color: var(--dim); }
.agent-chip[data-status="ready"] {
  color: var(--green);
  background: var(--green-soft);
  border-color: rgba(52, 211, 153, 0.25);
}
.agent-chip[data-status="running"] {
  color: var(--cyan);
  background: var(--cyan-soft);
  border-color: rgba(34, 211, 238, 0.3);
}
.agent-chip[data-status="standby"] {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: rgba(251, 191, 36, 0.25);
}

/* Transcript */
.panel-transcript {
  background: rgba(6, 8, 14, 0.95);
}

.transcript {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 20px;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.65;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}

.boot-banner {
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 10px;
  border: 1px dashed var(--line-strong);
  background: rgba(34, 211, 238, 0.04);
}
.boot-banner p + p { margin-top: 4px; }
.boot-banner kbd { margin: 0 3px; }

.log-entry {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  animation: fade-in 0.35s var(--ease) both;
}
.log-entry:last-child { border-bottom: none; }

.log-time {
  color: var(--dim);
  font-size: 0.68rem;
  padding-top: 2px;
}

.log-body { min-width: 0; word-break: break-word; }

.log-tag {
  display: inline-block;
  padding: 1px 6px;
  margin-right: 6px;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.log-tag.sys { background: rgba(255,255,255,0.06); color: var(--muted); }
.log-tag.agent { background: var(--cyan-soft); color: var(--cyan); }
.log-tag.tool { background: var(--violet-soft); color: #c4b5fd; }
.log-tag.ok { background: var(--green-soft); color: var(--green); }
.log-tag.warn { background: var(--amber-soft); color: var(--amber); }
.log-tag.err { background: rgba(248, 113, 113, 0.15); color: var(--red); }
.log-tag.mission { background: var(--ember-soft); color: var(--ember); }

.log-text { color: var(--muted); }
.log-text strong { color: var(--text); font-weight: 600; }
.log-text a { color: var(--cyan); }

.tool-block {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  color: #ddd6fe;
  font-size: 0.7rem;
  white-space: pre-wrap;
}
.tool-block .tool-name {
  color: #c4b5fd;
  font-weight: 600;
  margin-bottom: 4px;
}

.typing-cursor {
  display: inline-block;
  width: 7px;
  height: 1em;
  background: var(--cyan);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 0.9s steps(2) infinite;
}

.compose-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}
.prompt-mark {
  font-family: var(--mono);
  color: var(--cyan);
  font-weight: 600;
}
.compose-hint {
  font-size: 0.7rem;
  color: var(--dim);
  font-family: var(--mono);
}

/* Artifacts */
.artifact-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.12) transparent;
}

.artifact {
  display: block;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line);
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
  animation: fade-in 0.4s var(--ease) both;
  text-decoration: none;
  color: inherit;
}
.artifact:hover {
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.05);
  transform: translateX(2px);
  text-decoration: none;
  color: inherit;
}
.artifact.is-warn {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.04);
}
.artifact.is-warn:hover {
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.08);
}

.artifact-kind {
  font-family: var(--mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dim);
  margin-bottom: 4px;
}
.artifact-title {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.artifact-url {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--cyan);
  word-break: break-all;
  line-height: 1.4;
}
.artifact.is-warn .artifact-url { color: var(--amber); }
.artifact-note {
  margin-top: 6px;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.4;
}
.artifact-badge {
  display: inline-flex;
  margin-top: 8px;
  padding: 2px 7px;
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid rgba(52, 211, 153, 0.25);
}
.artifact-badge.warn {
  background: var(--amber-soft);
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.3);
}

/* Footer */
.deck-footer {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 10px;
  padding: 10px 16px;
  font-size: 0.7rem;
  color: var(--muted);
  background: rgba(5, 6, 10, 0.9);
}
.deck-footer .sep { color: var(--dim); }
.deck-footer a { color: var(--muted); font-weight: 500; }
.deck-footer a:hover { color: var(--cyan); }

/* ========== OVERLAYS ========== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 12vh 16px 16px;
  background: rgba(2, 3, 6, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade-in 0.2s var(--ease) both;
}
.overlay[hidden] { display: none !important; }

.palette {
  width: min(520px, 100%);
  background: #0c0e16;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(34, 211, 238, 0.08);
  overflow: hidden;
  animation: slide-down 0.28s var(--ease) both;
}

.palette-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.palette-head input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 500;
}
.palette-head input::placeholder { color: var(--dim); }
.esc-hint { margin-left: auto; }

.palette-label {
  padding: 10px 16px 4px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}

.palette-list {
  list-style: none;
  padding: 4px 8px 10px;
  max-height: 320px;
  overflow-y: auto;
}

.palette-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  text-align: left;
  transition: background 0.15s;
}
.palette-item:hover,
.palette-item.is-active {
  background: var(--cyan-soft);
  border-color: rgba(34, 211, 238, 0.2);
}
.palette-item .pi-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--dim);
  width: 18px;
}
.palette-item .pi-body { flex: 1; min-width: 0; }
.palette-item .pi-title {
  font-size: 0.88rem;
  font-weight: 600;
}
.palette-item .pi-desc {
  font-size: 0.7rem;
  color: var(--dim);
  margin-top: 1px;
}
.palette-item .pi-key {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--dim);
}

.palette-foot {
  padding: 8px 16px 12px;
  font-size: 0.65rem;
  border-top: 1px solid var(--line);
}

.help-card {
  width: min(440px, 100%);
  background: #0c0e16;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  animation: slide-down 0.28s var(--ease) both;
}
.help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.help-head h2 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.shortcuts {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shortcuts > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.shortcuts > div:last-child { border-bottom: none; }
.shortcuts dt {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.shortcuts dd {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: right;
}

.help-note {
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid rgba(34, 211, 238, 0.15);
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ========== ANIMATIONS ========== */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slide-down {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scanlines { display: none; }
  .typing-cursor { animation: none; opacity: 1; }
  .sys-mark, .live-pill .pulse, .mission-status[data-status="running"] .status-dot {
    animation: none;
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1100px) {
  .mission-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .deck {
    grid-template-columns: 200px 1fr;
    grid-template-rows: minmax(360px, 1fr) auto;
  }
  .panel-artifacts {
    grid-column: 1 / -1;
    border-right: none;
    border-top: 1px solid var(--line);
    max-height: 220px;
  }
  .artifact-list {
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
  }
  .artifact {
    flex: 1 1 200px;
  }
}

@media (max-width: 720px) {
  .hero-strip {
    padding: 10px 12px;
  }
  .icon-btn .lbl { display: none; }
  .hero-meta { order: 3; width: 100%; }
  .mission-board { padding: 12px; }
  .mission-grid { grid-template-columns: 1fr; }
  .deck {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .panel {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .panel-roster {
    max-height: 220px;
  }
  .panel-transcript {
    min-height: 320px;
  }
  .panel-artifacts {
    max-height: none;
    grid-column: auto;
  }
  .log-entry {
    grid-template-columns: 52px 1fr;
    gap: 8px;
  }
  .deck-footer {
    padding: 12px;
    text-align: center;
  }
}

@media (min-width: 1101px) {
  .deck {
    min-height: calc(100vh - 64px - 130px - 40px);
  }
  .panel-roster,
  .panel-transcript,
  .panel-artifacts {
    max-height: calc(100vh - 64px - 130px - 40px);
  }
}
