:root {
  color-scheme: dark;
  --bg: #071019;
  --bg-2: #0d1823;
  --card: rgba(9, 19, 31, 0.94);
  --card-2: rgba(13, 24, 37, 0.96);
  --line: rgba(111, 141, 166, 0.24);
  --ink: #e7eef5;
  --muted: #98aabc;
  --brand: #86d2ff;
  --brand-2: #5e7bff;
  --accent: #f66e6e;
  --trust: #5fd6a8;
  --clarity: #8dc6ff;
  --heat: #f3ae5f;
  --shadow: 0 24px 54px rgba(0, 0, 0, 0.34);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top, rgba(80, 127, 255, 0.15), transparent 35%),
    linear-gradient(180deg, #0a1420 0%, #071019 45%, #040b12 100%);
  line-height: 1.6;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.site-shell { max-width: 1180px; margin: 0 auto; padding: 24px 16px 56px; }
.site-header, .site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.site-header { margin-bottom: 24px; }
.site-footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.brand-wrap { display: flex; flex-direction: column; gap: 4px; }
.brand {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tagline { margin: 0; color: var(--muted); font-size: 0.95rem; }
.site-nav, .footer-links { display: flex; gap: 14px; flex-wrap: wrap; }
.nav-link {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
}
.nav-link.is-active,
.nav-link:hover {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255,255,255,0.04);
  text-decoration: none;
}
.card {
  background: linear-gradient(180deg, rgba(15, 28, 42, 0.96), rgba(9, 18, 29, 0.96));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.hero-panel, .builder-grid, .legend-grid, .meter-grid, .summary-metrics, .summary-list {
  display: grid;
  gap: 18px;
}
.hero-panel {
  grid-template-columns: 1.08fr 0.92fr;
  margin-bottom: 22px;
}
.hero-copy { font-size: 1.06rem; color: var(--muted); max-width: 60ch; }
.eyebrow,
.status-pill,
.mini-label {
  display: inline-block;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.eyebrow {
  color: var(--brand);
  font-size: 0.78rem;
  margin-bottom: 10px;
  font-weight: 700;
}
.status-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(134, 210, 255, 0.12);
  border: 1px solid rgba(134, 210, 255, 0.24);
  color: var(--brand);
  font-size: 0.72rem;
  margin-bottom: 10px;
}
.mini-label {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 6px;
}
h1, h2, h3 { line-height: 1.14; margin: 0 0 14px; }
h1 { font-size: clamp(2rem, 4.2vw, 3.3rem); }
h2 { font-size: clamp(1.32rem, 2vw, 1.75rem); }
h3 { font-size: clamp(1.12rem, 1.8vw, 1.36rem); }
p { margin-top: 0; }
.bullet-list, .number-list { padding-left: 20px; margin: 0; }
.bullet-list li, .number-list li { margin-bottom: 10px; }
.hero-stats,
.legend-grid,
.summary-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.stat-card,
.legend-card,
.note-card,
.summary-card,
.meter-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
}
.stat-card span,
.legend-card span,
.meter-card span,
.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}
.stat-card strong,
.legend-card strong,
.meter-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.02rem;
}
.notice-panel { margin-bottom: 22px; }
.panel-head, .progress-row, .section-heading { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.game-panel { margin-bottom: 22px; }
.progress-row {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.03);
}
.builder-grid {
  grid-template-columns: 1.1fr 0.9fr;
  margin-bottom: 20px;
}
.chat-panel,
.board-panel { min-height: 540px; }
.message-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 420px;
  max-height: 620px;
  overflow-y: auto;
  padding-right: 4px;
}
.message-bubble {
  max-width: 88%;
  border-radius: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
}
.message-bubble .speaker {
  display: block;
  margin-bottom: 6px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.message-bubble p { margin: 0; }
.message-bubble.from-you {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(94, 123, 255, 0.24), rgba(134, 210, 255, 0.18));
}
.message-bubble.from-system {
  align-self: center;
  background: rgba(255,255,255,0.02);
  border-style: dashed;
}
.meter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; }
.meter-card strong { font-size: 1.5rem; }
.meter-card.trust strong { color: var(--trust); }
.meter-card.clarity strong { color: var(--clarity); }
.meter-card.heat strong { color: var(--heat); }
.compact-list { margin-top: 0; }
.clue-list {
  display: grid;
  gap: 12px;
}
.clue-card {
  border: 1px solid rgba(134, 210, 255, 0.2);
  border-radius: 16px;
  padding: 14px;
  background: rgba(134, 210, 255, 0.06);
}
.clue-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}
.clue-card span { color: var(--muted); font-size: 0.94rem; }
.clue-card.empty {
  background: rgba(255,255,255,0.03);
  border-color: var(--line);
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.choice-card,
.primary-button,
.ghost-button {
  font: inherit;
  border-radius: 18px;
  padding: 14px 16px;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, border-color 140ms ease;
}
.choice-card,
.primary-button {
  border: none;
  color: #081018;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand), #bde4ff 60%, #d9f2ff);
  box-shadow: 0 14px 30px rgba(94, 123, 255, 0.16);
}
.choice-card:hover,
.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}
.ghost-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255,255,255,0.04);
  text-align: center;
}
.compact-button { width: auto; }
.action-row,
.summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}
.primary-button { min-width: 220px; }
.summary-list { margin-top: 18px; }
.copy-panel { margin-bottom: 12px; }
.disclaimer,
.footer-meta { margin: 0; }
.footer-links { align-self: flex-start; }
code {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.92em;
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: 6px;
}
@media (max-width: 980px) {
  .hero-panel,
  .builder-grid,
  .choice-grid,
  .hero-stats,
  .legend-grid,
  .summary-metrics,
  .meter-grid {
    grid-template-columns: 1fr;
  }
  .panel-head,
  .progress-row,
  .site-header,
  .site-footer,
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }
  .message-bubble { max-width: 100%; }
  .primary-button,
  .ghost-button,
  .compact-button { width: 100%; }
}
