/* =========================================================
   REMIT — COMMAND DECK
   Palette: graphite-petrol dark with electroluminescent cyan
   Type: Syne (headings) + Space Grotesk (body) + Space Mono (data)
   ========================================================= */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  /* Base dark — deep graphite-petrol, not generic near-black */
  --bg-base:       #0d1117;
  --bg-surface:    #111820;
  --bg-raised:     #161e28;
  --bg-card:       #1a2330;
  --bg-card-hover: #1f2a3a;
  --bg-active:     #0f1c2a;

  /* Borders */
  --border-subtle:  rgba(255,255,255,0.06);
  --border-mid:     rgba(255,255,255,0.10);
  --border-strong:  rgba(255,255,255,0.16);

  /* Accent — electroluminescent instrument cyan */
  --accent:        #00d4c8;
  --accent-dim:    rgba(0,212,200,0.12);
  --accent-glow:   rgba(0,212,200,0.25);

  /* Secondary accent — amber instrument, used sparingly for warnings/F3 */
  --amber:         #f5a623;
  --amber-dim:     rgba(245,166,35,0.12);

  /* Never red */
  --never:         #e5484d;
  --never-dim:     rgba(229,72,77,0.12);

  /* Approve green */
  --approve:       #3dd68c;
  --approve-dim:   rgba(61,214,140,0.10);

  /* Text */
  --text-primary:  #e8edf2;
  --text-secondary:#8fa3b8;
  --text-tertiary: #5c7387;
  --text-mono:     #7eb8cc;

  /* Typography */
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body:    'Space Grotesk', system-ui, sans-serif;
  --font-mono:    'Space Mono', 'Courier New', monospace;

  /* Spacing scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;
  --s12: 48px; --s16: 64px; --s20: 80px; --s24: 96px;

  /* Layout */
  --max-w: 1200px;
  --panel-w: 560px;

  /* Radius */
  --r1: 4px; --r2: 6px; --r3: 8px; --r4: 12px; --r5: 16px;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* prevent any child from widening the page */
}
body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
}
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font: inherit; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
strong { font-weight: 600; color: var(--text-primary); }

/* ── UTILITY ─────────────────────────────────────────────── */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.mono { font-family: var(--font-mono); font-size: 0.78em; letter-spacing: 0.01em; }

/* ── SCAN-LINE OVERLAY ───────────────────────────────────── */
.scanline-overlay {
  pointer-events: none;
  position: fixed; inset: 0; z-index: 1000;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0) 0px,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0.03) 2px,
    rgba(0,0,0,0.03) 4px
  );
}

/* ── TOPBAR ──────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,17,23,0.85);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid var(--border-subtle);
}
.topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s6);
  height: 52px;
  display: flex;
  align-items: center;
  gap: var(--s6);
}

/* Wordmark */
.wordmark {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0;
}
.wordmark-rem { color: var(--text-primary); }
.wordmark-it  { color: var(--accent); }
.wordmark-pipe {
  display: inline-block;
  width: 2px; height: 14px;
  background: var(--accent);
  opacity: 0.7;
  margin-left: var(--s3);
}
.wordmark--sm { font-size: 0.875rem; letter-spacing: 0.2em; }

/* Topbar status */
.topbar-status {
  flex: 1;
  color: var(--text-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.status-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--approve);
  box-shadow: 0 0 6px var(--approve);
  animation: pulse-dot 2.4s ease-in-out infinite;
}
.status-dot--sm { width: 5px; height: 5px; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 5px var(--approve); }
  50% { opacity: 0.5; box-shadow: 0 0 2px var(--approve); }
}

/* Nav CTA */
.nav-cta {
  margin-left: auto;
  padding: var(--s2) var(--s4);
  border: 1px solid var(--border-mid);
  border-radius: var(--r2);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.nav-cta:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}
.nav-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  padding: var(--s20) var(--s6) var(--s16);
  position: relative;
  overflow: hidden;
}
.hero-copy { min-width: 0; }

/* Background radial glow */
.hero::before {
  content: '';
  position: absolute;
  top: -120px; left: -80px;
  width: 600px; height: 600px;
  background: radial-gradient(ellipse, rgba(0,212,200,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; right: -60px;
  width: 400px; height: 400px;
  background: radial-gradient(ellipse, rgba(0,212,200,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr var(--panel-w);
  gap: var(--s16);
  align-items: start;
}
.hero-grid > * { min-width: 0; }

/* Hero copy */
.hero-copy { max-width: 576px; }

.cohort-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0,212,200,0.3);
  border-radius: 100px;
  padding: 5px 14px;
  margin-bottom: var(--s5);
}

h1 {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--s6);
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}
.headline-accent {
  color: var(--accent);
  position: relative;
}

.lede {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--s8);
}
.lede strong { color: var(--text-primary); }

/* Waitlist form */
.waitlist { margin-top: var(--s2); }
.waitlist-field {
  display: flex;
  gap: var(--s3);
  flex-wrap: wrap;
}
.waitlist input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: var(--s3) var(--s5);
  background: var(--bg-surface);
  border: 1px solid var(--border-mid);
  border-radius: var(--r2);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.waitlist input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.waitlist input[type="email"]::placeholder { color: var(--text-tertiary); }

/* Honeypot */
.hp { position: absolute; left: -9999px; opacity: 0; }

.btn-primary {
  padding: var(--s3) var(--s6);
  background: var(--accent);
  color: #0a1a1a;
  border-radius: var(--r2);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s var(--ease-spring);
}
.btn-primary:hover {
  background: #00ebe0;
  box-shadow: 0 0 20px rgba(0,212,200,0.35);
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.form-note {
  margin-top: var(--s3);
  font-size: 0.78rem;
  color: var(--text-tertiary);
  line-height: 1.5;
}
.form-note.ok { color: var(--approve); }
.form-note.err { color: var(--never); }

/* ── COMMAND PANEL ───────────────────────────────────────── */
.command-panel {
  position: sticky;
  top: 72px;
  min-width: 0;
  max-width: 100%;
}

.panel-chrome {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--r5);
  overflow: hidden;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  box-shadow:
    0 0 0 1px rgba(0,212,200,0.08),
    0 32px 64px rgba(0,0,0,0.5),
    0 0 40px rgba(0,212,200,0.04);
}

/* Panel titlebar */
.panel-titlebar {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border-subtle);
}
.chrome-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.chrome-dot--red   { background: #e5484d; }
.chrome-dot--amber { background: #f5a623; }
.chrome-dot--green { background: #3dd68c; }
.panel-title {
  flex: 1;
  font-size: 0.68rem;
  color: var(--text-tertiary);
  letter-spacing: 0.06em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.panel-live {
  font-size: 0.65rem;
  color: var(--approve);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: var(--s1);
}

/* Queue list */
.queue-list {
  padding: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

/* Queue card */
.queue-card {
  border-radius: var(--r3);
  padding: var(--s4);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.3s, background 0.3s;
  position: relative;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  /* no overflow:hidden here — panel-chrome clips; hiding here cuts action buttons */
}
.queue-card--active {
  background: var(--bg-active);
  border-color: rgba(0,212,200,0.25);
  box-shadow: 0 0 0 1px rgba(0,212,200,0.08) inset;
}
.queue-card--queued {
  background: var(--bg-surface);
  opacity: 0.65;
}
.queue-card.card-approved  { border-color: var(--approve); background: rgba(61,214,140,0.05); }
.queue-card.card-amended   { border-color: var(--amber); background: rgba(245,166,35,0.05); }
.queue-card.card-rejected  { border-color: var(--never); background: rgba(229,72,77,0.05); }

/* Card header */
.qcard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s3);
}
.qcard-who { display: flex; align-items: center; gap: var(--s2); }
.qcard-name { font-size: 0.85rem; font-weight: 500; }
.qcard-role { color: var(--text-tertiary); font-size: 0.68rem; }
.qcard-meta { display: flex; align-items: center; gap: var(--s2); }
.qcard-num { font-size: 0.7rem; color: var(--text-tertiary); }

/* Exec badges */
.exec-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: var(--r1);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
.exec-badge--cos { background: rgba(139,92,246,0.2); color: #a78bfa; border: 1px solid rgba(139,92,246,0.3); }
.exec-badge--cfo { background: rgba(0,212,200,0.15); color: var(--accent); border: 1px solid rgba(0,212,200,0.25); }
.exec-badge--cgo { background: rgba(245,166,35,0.15); color: var(--amber); border: 1px solid rgba(245,166,35,0.25); }
.exec-badge--coo { background: rgba(229,72,77,0.12); color: #f87171; border: 1px solid rgba(229,72,77,0.2); }

.exec-badge-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--r2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: var(--s4);
}

/* Tier badges */
.tier-badge {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: var(--r1);
  font-weight: 700;
}
.tier-f1 { background: rgba(61,214,140,0.1); color: var(--approve); border: 1px solid rgba(61,214,140,0.2); }
.tier-f2 { background: rgba(0,212,200,0.1); color: var(--accent); border: 1px solid rgba(0,212,200,0.2); }
.tier-f3 { background: rgba(245,166,35,0.1); color: var(--amber); border: 1px solid rgba(245,166,35,0.2); }

/* Card body */
.qcard-body {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: var(--s3);
}
.qcard-attach {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  margin-bottom: var(--s3);
  word-break: break-all;
  overflow-wrap: anywhere;
}

/* Debate */
.qcard-debate-toggle { margin-bottom: var(--s3); }
.debate-toggle {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 0;
  transition: color 0.2s;
}
.debate-toggle:hover { color: var(--accent); }
.debate-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.debate-transcript {
  margin-top: var(--s3);
  border-left: 2px solid var(--border-mid);
  padding-left: var(--s3);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.debate-transcript[hidden] { display: none; }
.debate-line {
  display: flex;
  gap: var(--s2);
  align-items: flex-start;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.debate-who {
  flex-shrink: 0;
  width: 28px; height: 20px;
  font-size: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r1);
}

/* Action buttons */
.qcard-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s2);
  margin-top: var(--s3);
}
.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  padding: var(--s2) var(--s2);
  border-radius: var(--r2);
  font-size: 0.76rem;
  font-weight: 500;
  border: 1px solid;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s var(--ease-spring), box-shadow 0.2s;
}
.action-btn:active { transform: scale(0.96); }
.action-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-icon { font-size: 0.85em; }

.action-approve { border-color: rgba(61,214,140,0.2); color: var(--approve); background: rgba(61,214,140,0.05); }
.action-approve:hover { background: rgba(61,214,140,0.15); box-shadow: 0 0 12px rgba(61,214,140,0.2); }

.action-amend { border-color: rgba(245,166,35,0.2); color: var(--amber); background: rgba(245,166,35,0.05); }
.action-amend:hover { background: rgba(245,166,35,0.15); box-shadow: 0 0 12px rgba(245,166,35,0.2); }

.action-reject { border-color: rgba(229,72,77,0.2); color: var(--never); background: rgba(229,72,77,0.05); }
.action-reject:hover { background: rgba(229,72,77,0.15); box-shadow: 0 0 12px rgba(229,72,77,0.2); }

/* ── SLACK SURFACE (the demo window is Slack; the kernel strip below is not) ── */
.slack-chan-header {
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border-subtle);
  background: #1a1d21;
}
.slack-chan-name { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); }
.slack-hash { color: var(--text-tertiary); font-weight: 400; margin-right: 1px; }
.slack-chan-desc { font-size: 0.62rem; color: var(--text-tertiary); letter-spacing: 0.04em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.slack-window .queue-list { background: #1a1d21; gap: var(--s2); }

.slack-msg {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  border: none;
  border-left: 3px solid transparent;
  border-radius: var(--r2);
  padding: var(--s3);
}
.slack-msg.queue-card--active {
  background: rgba(255,255,255,0.03);
  border-left-color: var(--accent);
  box-shadow: none;
}
.slack-msg.queue-card--queued { background: transparent; opacity: 0.55; }
.slack-msg.card-approved  { border-left-color: var(--approve); background: rgba(61,214,140,0.06); }
.slack-msg.card-amended   { border-left-color: var(--amber); background: rgba(245,166,35,0.06); }
.slack-msg.card-rejected  { border-left-color: var(--never); background: rgba(229,72,77,0.06); }

.slack-msg-main { flex: 1; min-width: 0; }
.slack-msg .qcard-header { justify-content: flex-start; gap: var(--s2); margin-bottom: var(--s2); flex-wrap: wrap; }
.slack-msg .qcard-meta { margin-left: auto; }

.slack-avatar {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: var(--r2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
}
.slack-avatar--cfo { background: rgba(0,212,200,0.18); color: var(--accent); }
.slack-avatar--cgo { background: rgba(245,166,35,0.18); color: var(--amber); }
.slack-avatar--cos { background: rgba(139,92,246,0.2); color: #a78bfa; }
.slack-avatar--coo { background: rgba(229,72,77,0.15); color: #f87171; }

.slack-name { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); }
.slack-app-badge {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  padding: 1px 4px;
}
.slack-time { font-size: 0.65rem; color: var(--text-tertiary); }

/* Slack-style Block Kit buttons */
.slack-msg .action-approve { background: #007a5a; border-color: #007a5a; color: #ffffff; }
.slack-msg .action-approve:hover { background: #148567; box-shadow: none; }
.slack-msg .action-amend { background: transparent; border-color: rgba(255,255,255,0.3); color: var(--text-primary); }
.slack-msg .action-amend:hover { background: rgba(255,255,255,0.06); box-shadow: none; }
.slack-msg .action-reject { background: transparent; border-color: rgba(224,30,90,0.55); color: #ec5f8a; }
.slack-msg .action-reject:hover { background: rgba(224,30,90,0.1); box-shadow: none; }

/* Thread-style debate toggle */
.slack-msg .debate-toggle { color: #1d9bd1; font-size: 0.72rem; }
.slack-msg .debate-toggle:hover { color: #4db8e8; text-decoration: underline; }
.debate-avatars { display: inline-flex; gap: 2px; }
.mini-av {
  width: 16px; height: 16px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 700;
}
.mini-av--cos { background: rgba(139,92,246,0.25); color: #a78bfa; }
.mini-av--coo { background: rgba(229,72,77,0.2); color: #f87171; }
.mini-av--cfo { background: rgba(0,212,200,0.2); color: var(--accent); }

/* Kernel strip header — visually separates the kernel layer from the Slack window */
.kernel-strip-head {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  padding-bottom: var(--s2);
  margin-bottom: var(--s3);
  border-bottom: 1px solid var(--border-subtle);
}

/* Streak panel */
.streak-panel {
  padding: var(--s4);
  border-top: 2px solid rgba(0,212,200,0.25);
  background: var(--bg-surface);
}
.streak-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s3);
}
.streak-title { font-size: 0.65rem; color: var(--text-tertiary); letter-spacing: 0.08em; }
.streak-fraction { font-size: 0.72rem; color: var(--accent); }
.streak-track {
  height: 6px;
  background: var(--bg-raised);
  border-radius: 3px;
  overflow: visible;
  position: relative;
  margin-bottom: var(--s2);
}
.streak-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--approve), var(--accent));
  border-radius: 3px;
  width: 55%;
  transition: width 0.6s var(--ease-out);
  box-shadow: 0 0 8px rgba(0,212,200,0.4);
}
.streak-milestone {
  position: absolute;
  top: -3px;
  width: 2px; height: 12px;
  background: var(--accent);
  opacity: 0.4;
  transform: translateX(-50%);
}
.streak-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.6rem;
  color: var(--text-tertiary);
  letter-spacing: 0.06em;
}
.streak-target { color: var(--accent); opacity: 0.6; }

/* Gauge row */
.gauge-row {
  padding: var(--s4);
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-card);
  display: flex;
  gap: var(--s4);
  align-items: flex-start;
}
.gauge-wrap {
  flex-shrink: 0;
  position: relative;
  width: 90px;
}
.gauge-svg { width: 90px; height: 55px; }
.gauge-track { stroke: var(--bg-raised); }
.gauge-arc {
  stroke: var(--accent);
  filter: drop-shadow(0 0 4px rgba(0,212,200,0.6));
  transition: stroke-dashoffset 0.6s var(--ease-out);
}
#gauge-needle { transition: transform 0.6s var(--ease-out); }
#gauge-needle line { stroke: var(--text-secondary); }
#gauge-needle circle { fill: var(--text-secondary); }
.gauge-label {
  margin-top: var(--s1);
  text-align: center;
}
.gauge-val { font-size: 0.68rem; color: var(--accent); display: block; }
.gauge-sub { font-size: 0.55rem; color: var(--text-tertiary); display: block; }

/* Ledger mini */
.ledger-recent {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.ledger-line {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 0.65rem;
  color: var(--text-tertiary);
  line-height: 1.3;
}
.ledger-icon { font-size: 0.7rem; flex-shrink: 0; width: 12px; }
.ledger-approve .ledger-icon { color: var(--approve); }
.ledger-amend .ledger-icon   { color: var(--amber); }
.ledger-reject .ledger-icon  { color: var(--never); }
.ledger-verdict {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.6rem;
  white-space: nowrap;
}
.ledger-approve .ledger-verdict { color: var(--approve); }
.ledger-amend .ledger-verdict   { color: var(--amber); }

/* Card loading animation */
@keyframes card-slide-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.queue-card--loading {
  animation: card-slide-in 0.4s var(--ease-out) forwards;
}
@keyframes stamp-flash {
  0%   { opacity: 0; transform: scale(1.2) rotate(-4deg); }
  30%  { opacity: 1; transform: scale(1.05) rotate(-2deg); }
  100% { opacity: 1; transform: scale(1) rotate(-2deg); }
}
.card-stamp-label {
  position: absolute;
  top: var(--s4); right: var(--s4);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: var(--r1);
  border: 2px solid;
  opacity: 0;
  pointer-events: none;
}
.card-stamp-label.visible { animation: stamp-flash 0.45s var(--ease-spring) forwards; }
.stamp-approved { color: var(--approve); border-color: var(--approve); background: var(--approve-dim); }
.stamp-amended  { color: var(--amber);   border-color: var(--amber);   background: var(--amber-dim); }
.stamp-rejected { color: var(--never);   border-color: var(--never);   background: var(--never-dim); }

/* ── SECTIONS (shared) ───────────────────────────────────── */
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--s6);
}
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--text-tertiary);
  margin-bottom: var(--s4);
}
h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: var(--s5);
}
.section-lede {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
  margin-bottom: var(--s10);
}

/* ── TRUST / TIER SECTION ────────────────────────────────── */
.section-trust {
  padding: var(--s20) 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s4);
  margin-bottom: var(--s8);
}
.tier-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r4);
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  transition: border-color 0.3s;
  position: relative;
  overflow: hidden;
}
.tier-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  right: 0; height: 2px;
}
.tier-card.tier-f1::before { background: var(--approve); }
.tier-card.tier-f2::before { background: var(--accent); }
.tier-card.tier-f3::before { background: var(--amber); }
.tier-card.tier-never::before { background: var(--never); }

.tier-code {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.tier-card.tier-f1 .tier-code { color: var(--approve); }
.tier-card.tier-f2 .tier-code { color: var(--accent); }
.tier-card.tier-f3 .tier-code { color: var(--amber); }
.tier-card.tier-never .tier-code { color: var(--never); }

.tier-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}
.tier-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  flex: 1;
}
.tier-earn {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
}
.tier-earn strong { color: var(--text-secondary); }

.tier-bar {
  height: 4px;
  background: var(--bg-raised);
  border-radius: 2px;
  overflow: hidden;
}
.tier-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.8s var(--ease-out);
}
.tier-f1 .tier-bar-fill { background: var(--approve); }
.tier-f2 .tier-bar-fill { background: var(--accent); }
.tier-f3 .tier-bar-fill { background: var(--amber); }

.never-bar {
  background: rgba(229,72,77,0.1);
  display: flex;
  align-items: center;
  padding: 0 var(--s2);
}
.never-lock {
  font-size: 0.6rem;
  color: var(--never);
  letter-spacing: 0.08em;
}
.never-mark { color: var(--never); }

.tier-footnote {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
  line-height: 1.6;
}

/* ── TEAM SECTION ────────────────────────────────────────── */
.section-team {
  padding: var(--s20) 0;
  border-top: 1px solid var(--border-subtle);
}

.exec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s4);
  margin-bottom: var(--s10);
}
.exec-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r4);
  padding: var(--s6);
  transition: border-color 0.25s, transform 0.25s var(--ease-out);
}
.exec-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}
.exec-card h3 {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--s3);
}
.exec-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--s4);
}
.exec-character {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--s3);
  margin-top: auto;
}
.char-label { color: var(--text-tertiary); margin-right: var(--s1); }
.exec-character em { color: var(--accent); font-style: italic; }

.debate-note {
  display: flex;
  gap: var(--s5);
  align-items: flex-start;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent);
  border-radius: var(--r3);
  padding: var(--s5) var(--s6);
}
.debate-note-icon { font-size: 1rem; color: var(--accent); margin-top: 2px; flex-shrink: 0; }
.debate-note p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; margin: 0; }
.debate-note em { color: var(--text-primary); font-style: italic; }

/* ── KERNEL SECTION ──────────────────────────────────────── */
.section-kernel {
  padding: var(--s20) 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}
.kernel-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s16);
  align-items: center;
}
.kernel-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--r4);
  overflow: hidden;
}
.kernel-header {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border-subtle);
}
.kernel-light {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--approve);
  box-shadow: 0 0 6px var(--approve);
  flex-shrink: 0;
}
.kernel-title { font-size: 0.65rem; color: var(--text-tertiary); letter-spacing: 0.08em; }

.kernel-code {
  padding: var(--s4);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.kernel-line {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.2s;
}
.kernel-line:last-child { border-bottom: none; }
.kernel-line:hover { background: var(--bg-raised); }
.kl-num { font-size: 0.65rem; color: var(--text-tertiary); width: 18px; flex-shrink: 0; }
.kl-text { flex: 1; font-size: 0.82rem; color: var(--text-secondary); }
.kl-status { font-size: 0.62rem; letter-spacing: 0.06em; flex-shrink: 0; }
.never-status { color: var(--never); }
.ok-status { color: var(--approve); }

.kernel-footer {
  font-size: 0.65rem;
  color: var(--text-tertiary);
  padding: var(--s3) var(--s4);
  border-top: 1px solid var(--border-subtle);
  letter-spacing: 0.04em;
  background: var(--bg-raised);
}

.kernel-copy h2 { margin-bottom: var(--s5); }
.kernel-copy p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--s4);
}
.kernel-copy p:last-child {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 0;
}

/* ── BUILD IN PUBLIC / CLOSE ─────────────────────────────── */
.section-public {
  padding: var(--s20) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border-subtle);
}
.section-public::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 700px; height: 400px;
  background: radial-gradient(ellipse, rgba(0,212,200,0.06) 0%, transparent 65%);
  pointer-events: none;
}
.section-public .section-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.section-public .section-eyebrow { text-align: center; }
.section-public h2 { margin: 0 auto var(--s5); max-width: 700px; }
.section-public .section-lede { margin: 0 auto var(--s6); text-align: center; }

.waitlist--close { width: 100%; max-width: 560px; }
.waitlist--close .waitlist-field { justify-content: center; }
.waitlist--close .form-note { text-align: center; }

/* ── FOOTER ──────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  padding: var(--s6) var(--s6);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s6);
  flex-wrap: wrap;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: var(--s4);
}
.footer-op {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}
.footer-right {
  font-size: 0.68rem;
  color: var(--text-tertiary);
}

/* ── LOAD ANIMATIONS ─────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero-copy > * { animation: fade-up 0.6s var(--ease-out) both; }
.hero-copy .cohort-pill { animation-delay: 0.05s; }
.hero-copy h1           { animation-delay: 0.12s; }
.hero-copy .lede        { animation-delay: 0.2s; }
.hero-copy .waitlist    { animation-delay: 0.28s; }

.command-panel { animation: fade-in 0.5s var(--ease-out) 0.3s both; }

/* Panel queue items stagger */
.queue-card:nth-child(1) { animation: card-slide-in 0.5s var(--ease-out) 0.5s both; }
.queue-card:nth-child(2) { animation: card-slide-in 0.5s var(--ease-out) 0.65s both; }
.queue-card:nth-child(3) { animation: card-slide-in 0.5s var(--ease-out) 0.8s both; }

/* ── REDUCED MOTION ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .hero-copy > * { animation: none; opacity: 1; transform: none; }
  .command-panel { animation: none; opacity: 1; }
  .queue-card { animation: none; opacity: 1; }
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s12); }
  .hero-copy { max-width: 100%; }
  .command-panel { position: relative; top: auto; max-width: 640px; }
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
  .exec-grid { grid-template-columns: repeat(2, 1fr); }
  .kernel-inner { grid-template-columns: 1fr; gap: var(--s10); }

  /* Scale h1 down at mid viewport — no clamp, straightforward */
  h1 { font-size: 2.8rem; }

  /* Tighten section padding at mid sizes */
  .hero { padding-left: var(--s6); padding-right: var(--s6); }
  .section-trust,
  .section-team,
  .section-kernel,
  .section-public { padding-top: var(--s16); padding-bottom: var(--s16); }
}

@media (max-width: 680px) {
  :root { --s20: 56px; --s16: 48px; --s24: 72px; }

  /* Hard stop on horizontal overflow at the root */
  html, body { overflow-x: hidden; max-width: 100%; }

  .topbar-inner { gap: var(--s3); padding: 0 var(--s4); }
  .topbar-status { display: none; }

  /* Typography — explicit values, no clamp, guaranteed to fit within 390px */
  h1 { font-size: 1.75rem !important; line-height: 1.12; word-break: normal; overflow-wrap: break-word; hyphens: none; }
  h2 { font-size: 1.25rem !important; word-break: break-word; overflow-wrap: break-word; line-height: 1.25; }

  /* Hero */
  .hero { padding: var(--s10) var(--s4) var(--s8); max-width: 100vw; overflow: hidden; }
  .hero-copy { max-width: 100%; overflow: hidden; }
  .hero-grid { gap: var(--s8); }
  .lede { font-size: 0.95rem; }

  /* Form */
  .waitlist-field { flex-direction: column; gap: var(--s3); }
  .waitlist input[type="email"] { min-width: 0; width: 100%; box-sizing: border-box; }
  .btn-primary { width: 100%; justify-content: center; text-align: center; }

  /* Command panel */
  .command-panel { max-width: 100%; width: 100%; overflow: hidden; }
  .panel-chrome { border-radius: var(--r3); overflow: hidden; }
  .queue-list { padding: var(--s3); gap: var(--s2); }
  .queue-card { min-width: 0; box-sizing: border-box; }
  .qcard-header { flex-wrap: wrap; gap: var(--s2); min-width: 0; }
  .slack-avatar { width: 28px; height: 28px; font-size: 0.8rem; }
  .slack-name { font-size: 0.8rem; }
  .qcard-role { display: none; }
  .slack-chan-desc { display: none; }
  .qcard-body { font-size: 0.8rem; word-break: break-word; overflow-wrap: break-word; }
  .qcard-attach { font-size: 0.65rem; word-break: break-word; }
  .debate-transcript .debate-line { font-size: 0.7rem; }

  /* Action buttons — keep 3-col grid */
  .qcard-actions { grid-template-columns: repeat(3, 1fr) !important; gap: var(--s1); }
  .action-btn { font-size: 0.68rem; padding: 6px 4px; }

  /* Streak + gauge */
  .streak-panel { padding: var(--s3); }
  .gauge-row { flex-direction: column; padding: var(--s3); gap: var(--s3); }
  .gauge-wrap { width: 80px; }
  .gauge-svg { width: 80px; height: 48px; }
  .ledger-recent { width: 100%; }
  .ledger-line { flex-wrap: wrap; gap: var(--s1); }
  .ledger-line span.mono { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
  .ledger-verdict { white-space: nowrap; }

  /* Sections */
  .section-inner { padding: 0 var(--s4); }
  .section-trust,
  .section-team,
  .section-kernel,
  .section-public { padding-top: var(--s12); padding-bottom: var(--s12); }
  .tier-grid { grid-template-columns: 1fr; gap: var(--s3); }
  .exec-grid { grid-template-columns: 1fr; gap: var(--s3); }
  .kernel-inner { grid-template-columns: 1fr; gap: var(--s8); }
  .debate-note { flex-direction: column; gap: var(--s3); }
  .section-lede { margin-bottom: var(--s6); }

  /* Footer */
  .footer-inner { flex-direction: column; align-items: flex-start; gap: var(--s3); }
  .footer { padding: var(--s5) var(--s4); }
}

@media (max-width: 420px) {
  h1 { font-size: 1.75rem; }
  .nav-cta { display: none; }
  /* Ensure panel chrome doesn't overflow at 375px */
  .panel-titlebar { padding: var(--s2) var(--s3); }
  .panel-title { font-size: 0.6rem; letter-spacing: 0.04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .qcard-header { flex-wrap: wrap; gap: var(--s2); }
  /* Ledger lines: allow text wrap */
  .ledger-line { flex-wrap: wrap; }
  .ledger-verdict { margin-left: 0; }
}

/* Mobile-only line break helper */
.mob-br { display: none; }
@media (max-width: 680px) { .mob-br { display: block; } }

/* ── FOCUS RING (global) ─────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
