/* Nova Forge — Design System v4
   Visual Redesign: diagrams, inline chat, terminal hero
   ─────────────────────────────── */

:root {
  --bg:        #0a0a12;
  --surface:   #12121e;
  --card:      #16162a;
  --border:    rgba(255, 255, 255, 0.06);
  --border-hl: rgba(255, 255, 255, 0.12);
  --text:      #e4e4f0;
  --text-2:    #b8b8cc;
  --muted:     #7a7a94;
  --dim:       #4a4a62;
  --accent:    #a78bfa;
  --accent-2:  #c084fc;
  --cyan:      #67e8f9;
  --green:     #4ade80;
  --orange:    #fb923c;
  --red:       #f87171;
  --glow-a:    rgba(167, 139, 250, 0.12);
  --glow-c:    rgba(103, 232, 249, 0.08);
  --gradient:  linear-gradient(135deg, #e879f9 0%, #a78bfa 40%, #67e8f9 100%);
  --font:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --mono:      'JetBrains Mono', 'SF Mono', 'Cascadia Code', 'Fira Code', Menlo, Consolas, monospace;
  --sidebar-w: 220px;
  --header-h:  52px;
  --radius:    12px;
  --radius-sm: 8px;
  --ease:      0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ──────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1.5rem); }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 24px 24px;
}
::selection { background: rgba(167, 139, 250, 0.3); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--dim); border-radius: 3px; }

/* ── Sidebar ────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: rgba(10, 10, 18, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 100;
  transition: transform 0.25s ease;
}
.sidebar::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient);
  opacity: 0.6;
}
.sidebar-header {
  padding: 1.5rem 1.25rem 0.75rem;
}
.logo { display: flex; align-items: center; gap: 0.5rem; }
.logo-icon {
  font-size: 1.2rem;
  filter: drop-shadow(0 0 6px var(--glow-a));
}
.logo-text {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.mobile-close { display: none; }

.nav-links {
  list-style: none;
  padding: 0.75rem 0;
  flex: 1;
  overflow-y: auto;
}
.nav-links li { position: relative; }
.nav-links a {
  display: block;
  padding: 0.4rem 1.25rem 0.4rem 1.25rem;
  color: var(--dim);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: color var(--ease), padding-left var(--ease);
  border-left: 2px solid transparent;
}
.nav-links a:hover {
  color: var(--text-2);
  padding-left: 1.4rem;
}
.nav-links a.active {
  color: var(--text);
  border-left-color: var(--accent);
  padding-left: 1.4rem;
}

.sidebar-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
}
.sidebar-meta {
  display: flex; justify-content: space-between;
  font-size: 0.65rem;
  color: var(--dim);
  font-family: var(--mono);
}

/* ── Mobile Header ──────────────────────────────────────────────────── */
.mobile-header {
  display: none;
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(10, 10, 18, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 90;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
}
.hamburger {
  background: none; border: none; cursor: pointer;
  width: 20px; height: 16px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.hamburger span {
  display: block; width: 100%; height: 1.5px;
  background: var(--muted); border-radius: 1px;
}
.mobile-logo {
  font-weight: 700; font-size: 0.9rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* ── Main Content ───────────────────────────────────────────────────── */
.content { margin-left: var(--sidebar-w); min-height: 100vh; }
.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 5rem 2rem 3rem;
}
.section-wide {
  max-width: 900px;
}

/* ── Section Titles ─────────────────────────────────────────────────── */
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 0.35rem;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 32px; height: 2px;
  background: var(--accent);
  border-radius: 1px;
  opacity: 0.7;
}
.section-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
  max-width: 540px;
  line-height: 1.65;
}
.section-desc code {
  background: rgba(103, 232, 249, 0.08);
  color: var(--cyan);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.82em;
}

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
  padding-top: 7rem;
  padding-bottom: 3rem;
  text-align: center;
  max-width: 720px;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: -20%; left: 50%;
  transform: translateX(-50%);
  width: 800px; height: 600px;
  background:
    radial-gradient(ellipse 400px 250px at 35% 40%, rgba(167, 139, 250, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 350px 200px at 65% 50%, rgba(103, 232, 249, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 300px 300px at 50% 30%, rgba(232, 121, 249, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}
.hero-badge {
  display: inline-flex;
  align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.85rem;
  background: rgba(167, 139, 250, 0.06);
  border: 1px solid rgba(167, 139, 250, 0.15);
  border-radius: 20px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin-bottom: 1.5rem;
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-dim {
  color: var(--text-2);
  font-weight: 400;
  display: block;
  font-size: 0.6em;
  margin-top: 0.25em;
  letter-spacing: -0.01em;
}
.hero-sub {
  color: var(--muted);
  font-size: 1rem;
  max-width: 540px;
  margin: 0 auto 3rem;
  line-height: 1.7;
}
.hero-sub code {
  background: rgba(103, 232, 249, 0.08);
  color: var(--cyan);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.82em;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.hero-stat { text-align: center; }
.hero-stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text);
  letter-spacing: -0.03em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-stat-label {
  font-size: 0.65rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.hero-providers {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.provider-badge {
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
  transition: all var(--ease);
}
.provider-badge:hover {
  border-color: var(--border-hl);
  color: var(--text-2);
}

/* ── Demo Player (asciinema) ────────────────────────────────────────── */
.demo-player-wrap {
  max-width: 680px;
  margin: 0 auto 3.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  background: #0d1117;
  transition: box-shadow var(--ease), border-color var(--ease);
}
.demo-player-wrap:hover {
  border-color: var(--border-hl);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}

/* Override asciinema-player theme to match site */
.demo-player-wrap .ap-wrapper {
  background: #0d1117 !important;
}
.demo-player-wrap .ap-terminal {
  background: #0d1117 !important;
  border-radius: 0 !important;
}
.demo-player-wrap .ap-control-bar {
  background: rgba(13, 17, 23, 0.9) !important;
  border-top: 1px solid var(--border) !important;
}
.demo-player-wrap .ap-progressbar .ap-fill {
  background: var(--accent) !important;
}
.demo-player-wrap .ap-play-btn svg,
.demo-player-wrap .ap-fullscreen-btn svg {
  fill: var(--muted) !important;
}
.demo-player-wrap .ap-play-btn:hover svg,
.demo-player-wrap .ap-fullscreen-btn:hover svg {
  fill: var(--text) !important;
}

/* Demo result link */
.demo-result {
  max-width: 720px;
  margin: 2rem auto 0;
  text-align: center;
}
.demo-result-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 1.25rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 8px;
  background: rgba(167, 139, 250, 0.04);
  transition: all var(--ease);
}
.demo-result-link:hover {
  color: var(--accent-2);
  border-color: rgba(167, 139, 250, 0.4);
  background: rgba(167, 139, 250, 0.08);
  box-shadow: 0 0 16px var(--glow-a);
}

/* ── Code Blocks — terminal style ───────────────────────────────────── */
.code-block {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.code-block:hover {
  border-color: var(--border-hl);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}
.code-block:not(.compact)::before {
  content: '';
  display: block;
  height: 36px;
  background: rgba(255,255,255,0.015);
  border-bottom: 1px solid var(--border);
  background-image:
    radial-gradient(circle at 18px 18px, #f87171 4.5px, transparent 4.5px),
    radial-gradient(circle at 38px 18px, #fbbf24 4.5px, transparent 4.5px),
    radial-gradient(circle at 58px 18px, #4ade80 4.5px, transparent 4.5px);
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.code-block.compact {
  display: flex;
  align-items: center;
  padding: 0 1.15rem;
  height: 48px;
  gap: 0.75rem;
  background: var(--surface);
}
.code-block.compact::before {
  content: '$';
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  flex-shrink: 0;
  font-weight: 600;
}
.code-block.compact code {
  flex: 1;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--cyan);
  white-space: nowrap;
  overflow-x: auto;
}
.code-block pre {
  margin: 0;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.75;
  color: var(--text-2);
  background: transparent;
  border: none;
}
.code-block pre code {
  background: none; padding: 0;
  font-size: inherit; color: inherit;
}
.copy-btn {
  position: absolute;
  top: 40px; right: 0.75rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--dim);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  transition: all var(--ease);
}
.code-block.compact .copy-btn {
  position: static;
  flex-shrink: 0;
  top: auto; right: auto;
}
.code-block:not(.compact) .copy-btn { top: 40px; }
.copy-btn:hover {
  color: var(--text-2);
  border-color: var(--border);
  background: rgba(255,255,255,0.06);
}
.copy-btn .copy-ok { display: none; color: var(--green); }
.copy-btn.copied .copy-icon { display: none; }
.copy-btn.copied .copy-ok { display: inline; }

/* Syntax tokens */
.c  { color: #555575; font-style: italic; }
.kw { color: var(--accent-2); }
.s  { color: var(--green); }
.n  { color: var(--cyan); }
.p  { color: var(--accent); font-weight: 600; }

/* ── Steps — vertical timeline ──────────────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 0; }
.step {
  display: flex;
  gap: 1.25rem;
  padding: 1.75rem 1.25rem;
  border-left: 1px solid rgba(167, 139, 250, 0.15);
  position: relative;
  transition: border-color var(--ease);
}
.step:last-child { border-left-color: transparent; }
.step:last-child .step-number { left: -16px; margin-right: -16px; }
.step:hover { border-left-color: rgba(167, 139, 250, 0.4); }
.step-number {
  width: 32px; height: 32px;
  border: 1.5px solid rgba(167, 139, 250, 0.25);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  font-family: var(--mono);
  color: var(--accent);
  flex-shrink: 0;
  background: var(--bg);
  position: relative;
  left: -17px;
  margin-right: -17px;
  transition: all var(--ease);
}
.step:hover .step-number {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--glow-a);
}
.step-content h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}
.step-content p {
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 0.75rem;
  line-height: 1.6;
}
.step-content .hint {
  font-size: 0.78rem;
  color: var(--dim);
  font-style: italic;
}

/* ── Quick Start Cards ─────────────────────────────────────────────── */
.quickstart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 640px;
}
.quickstart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative;
  transition: all var(--ease);
}
.quickstart-card:hover {
  border-color: var(--border-hl);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.quickstart-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  color: #0a0a12;
  font-weight: 800;
  font-size: 0.75rem;
  font-family: var(--mono);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.75rem;
}
.quickstart-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}
.quickstart-card .code-block.compact {
  margin-bottom: 0;
  height: auto;
  min-height: 48px;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}
.quickstart-card .code-block.compact code {
  white-space: normal;
  word-break: break-all;
}
.quickstart-hint {
  font-size: 0.75rem;
  color: var(--dim);
  margin-top: 0.6rem;
  line-height: 1.5;
  font-style: italic;
}

/* ── Inline Chat (Ask Nova) ─────────────────────────────────────────── */
.chat-inline {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 1.25rem;
  align-items: start;
}
.chat-main {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}
.chat-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}
.chat-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 800;
  color: #0a0a12;
  flex-shrink: 0;
}
.chat-header-info {
  flex: 1;
}
.chat-header-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.chat-header-status {
  font-size: 0.62rem;
  color: var(--green);
  font-family: var(--mono);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.15rem;
}
.chat-header-status::before {
  content: '';
  width: 5px; height: 5px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
.chat-messages {
  height: 380px;
  overflow-y: auto;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.chat-msg {
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  font-size: 0.82rem; line-height: 1.65;
  max-width: 85%;
  word-break: break-word;
  position: relative;
}
.chat-msg.assistant {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  align-self: flex-start;
  color: var(--text-2);
  border-bottom-left-radius: 4px;
}
.chat-msg.user {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.12), rgba(103, 232, 249, 0.06));
  border: 1px solid rgba(167, 139, 250, 0.2);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-msg code {
  background: rgba(103, 232, 249, 0.1);
  color: var(--cyan);
  padding: 0.12em 0.35em;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.85em;
}
.chat-msg pre {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  margin-top: 0.5rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-2);
}
.chat-msg.thinking {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--dim); font-style: italic;
}
.chat-suggestions {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  padding: 0.5rem 0;
}
.chat-suggest {
  background: rgba(167, 139, 250, 0.04);
  border: 1px solid rgba(167, 139, 250, 0.12);
  border-radius: 20px;
  color: var(--muted);
  font-size: 0.72rem;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: all var(--ease);
  font-weight: 500;
}
.chat-suggest:hover {
  color: var(--accent);
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(167, 139, 250, 0.08);
  transform: translateY(-1px);
}
.chat-input {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  display: flex; gap: 0.5rem;
  background: rgba(0, 0, 0, 0.1);
}
.chat-input input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.6rem 1rem;
  color: var(--text);
  font-size: 0.82rem;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--ease), box-shadow var(--ease);
}
.chat-input input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow-a);
}
.chat-input input::placeholder { color: var(--dim); }
#chat-send {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  border-radius: 50%;
  color: #0a0a12;
  font-size: 0.85rem;
  font-weight: 700;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--ease);
  flex-shrink: 0;
}
#chat-send:hover {
  box-shadow: 0 0 16px var(--glow-a);
  transform: scale(1.05);
}
#chat-send:disabled { opacity: 0.3; cursor: not-allowed; box-shadow: none; transform: none; }

.chat-side {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.chat-side-header {
  margin-bottom: 0;
}
.chat-powered {
  font-size: 0.62rem;
  color: var(--dim);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.chat-powered::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--orange);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(251, 146, 60, 0.5);
}
.chat-side-desc {
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.chat-topics {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.chat-topics li {
  color: var(--dim);
  font-size: 0.75rem;
  padding: 0.25rem 0 0.25rem 0.75rem;
  position: relative;
  transition: color var(--ease);
}
.chat-topics li:hover { color: var(--muted); }
.chat-topics li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.55em;
  width: 4px; height: 4px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0.5;
}
.chat-side-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.chat-side-stat {
  text-align: center;
}
.chat-side-stat-value {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  display: block;
}
.chat-side-stat-label {
  font-size: 0.6rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Preset Prompts ─────────────────────────────────────────────────── */
.prompt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.prompt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  transition: all var(--ease);
  position: relative;
}
.prompt-card:hover {
  border-left-color: var(--accent);
  border-color: var(--border-hl);
  background: rgba(18, 18, 30, 0.8);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
.prompt-card h4 {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}
.prompt-card p {
  color: var(--dim);
  font-size: 0.75rem;
  font-family: var(--mono);
  margin-bottom: 0.7rem;
  line-height: 1.5;
}
.copy-prompt-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  transition: all var(--ease);
}
.copy-prompt-btn:hover {
  color: var(--accent);
  border-color: rgba(167, 139, 250, 0.3);
}

/* ── Pipeline Diagram ───────────────────────────────────────────────── */
.pipeline-diagram {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.5rem;
}
.pipeline-node {
  flex: 0 0 auto;
  width: 140px;
  text-align: center;
  padding: 1rem 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--ease);
  position: relative;
}
.pipeline-node:hover {
  background: rgba(103, 232, 249, 0.03);
}
.pipeline-node.active {
  background: rgba(103, 232, 249, 0.06);
  box-shadow: 0 0 20px rgba(103, 232, 249, 0.05);
}
.pipeline-node-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  margin: 0 auto 0.5rem;
  border-radius: 50%;
  background: rgba(103, 232, 249, 0.06);
  border: 1px solid rgba(103, 232, 249, 0.15);
  color: var(--cyan);
  transition: all var(--ease);
}
.pipeline-node:hover .pipeline-node-icon {
  border-color: rgba(103, 232, 249, 0.4);
  box-shadow: 0 0 16px var(--glow-c);
}
.pipeline-node.active .pipeline-node-icon {
  border-color: var(--cyan);
  background: rgba(103, 232, 249, 0.12);
  box-shadow: 0 0 20px var(--glow-c);
}
.pipeline-node h4 {
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}
.pipeline-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
}
.pipeline-tags span {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--dim);
  background: rgba(255,255,255,0.02);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  border: 1px solid var(--border);
}

/* Pipeline connectors */
.pipeline-connector {
  flex: 1;
  max-width: 60px;
  height: 2px;
  position: relative;
  margin-top: 24px; /* center with 48px icon */
}
.pipeline-connector::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 8px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--dim) 0, var(--dim) 4px, transparent 4px, transparent 8px);
}
.pipeline-connector::after {
  content: '';
  position: absolute;
  right: 0; top: -3px;
  border-left: 6px solid var(--dim);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}
.pipeline-pulse {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  top: -2px;
  animation: pulseTravel 3s ease-in-out infinite;
}
@keyframes pulseTravel {
  0% { left: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: calc(100% - 6px); opacity: 0; }
}
/* Stagger pulse across connectors */
.pipeline-diagram > :nth-child(2) .pipeline-pulse { animation-delay: 0s; }
.pipeline-diagram > :nth-child(4) .pipeline-pulse { animation-delay: 0.75s; }
.pipeline-diagram > :nth-child(6) .pipeline-pulse { animation-delay: 1.5s; }
.pipeline-diagram > :nth-child(8) .pipeline-pulse { animation-delay: 2.25s; }

/* Parallel lanes in Build node */
.parallel-lanes {
  display: flex;
  gap: 3px;
  justify-content: center;
  margin-top: 0.5rem;
}
.lane {
  width: 4px;
  height: 12px;
  background: var(--cyan);
  border-radius: 2px;
  opacity: 0.4;
  animation: laneFlash 2s ease-in-out infinite;
}
.lane:nth-child(2) { animation-delay: 0.3s; }
.lane:nth-child(3) { animation-delay: 0.6s; }
@keyframes laneFlash {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

/* Pipeline detail panel */
.pipeline-detail {
  max-width: 660px;
  margin: 0 auto;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}
.pipeline-detail.visible {
  max-height: 200px;
  opacity: 1;
  padding: 1rem 1.25rem;
  background: rgba(103, 232, 249, 0.03);
  border: 1px solid rgba(103, 232, 249, 0.1);
  border-radius: var(--radius);
}
.pipeline-detail p {
  color: var(--text-2);
  font-size: 0.84rem;
  line-height: 1.65;
}
.pipeline-detail code {
  background: rgba(103, 232, 249, 0.08);
  color: var(--cyan);
  padding: 0.1em 0.3em;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.85em;
}

/* ── Command Tables ─────────────────────────────────────────────────── */
.cmd-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}
.cmd-tab {
  padding: 0.5rem 1rem;
  background: none; border: none;
  border-bottom: 2px solid transparent;
  color: var(--dim);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--ease), border-color var(--ease);
}
.cmd-tab:hover { color: var(--muted); }
.cmd-tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.cmd-panel { display: none; padding-top: 0; }
.cmd-panel.active { display: block; }
.cmd-table { width: 100%; border-collapse: collapse; }
.cmd-table tr {
  transition: background var(--ease);
}
.cmd-table tr:hover {
  background: rgba(255, 255, 255, 0.015);
}
.cmd-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 0.82rem;
  vertical-align: middle;
}
.cmd-table td:first-child { white-space: nowrap; }
.cmd-table td:nth-child(2) { color: var(--muted); }
.cmd-table td:last-child { text-align: right; width: 50px; }
.cmd-name {
  font-family: var(--mono);
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 500;
  background: none; padding: 0;
}
.copy-btn-sm {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--dim);
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  cursor: pointer;
  transition: all var(--ease);
}
.copy-btn-sm:hover { color: var(--muted); border-color: var(--border); }
.copy-btn-sm.copied { color: var(--green); }

/* ── Model Cards ────────────────────────────────────────────────────── */
.model-grid { display: flex; flex-direction: column; gap: 2.5rem; }
.model-group-header {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}
.provider-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.provider-dot.bedrock   { background: var(--orange); box-shadow: 0 0 6px rgba(251, 146, 60, 0.4); }
.provider-dot.openrouter { background: var(--cyan); box-shadow: 0 0 6px rgba(103, 232, 249, 0.4); }
.provider-dot.anthropic  { background: var(--accent); box-shadow: 0 0 6px rgba(167, 139, 250, 0.4); }
.model-group { display: flex; flex-direction: column; gap: 0; }
.model-group > .model-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem 1.25rem;
  transition: all var(--ease);
}
.model-group > .model-card:first-of-type { border-radius: var(--radius) var(--radius) 0 0; }
.model-group > .model-card:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.model-group > .model-card:only-of-type { border-radius: var(--radius); }
.model-group > .model-card + .model-card { border-top: none; }
.model-card:hover {
  border-color: var(--border-hl);
  background: rgba(18, 18, 30, 0.8);
}
.model-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.model-name {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  background: none; padding: 0;
}
.model-ctx {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--dim);
  letter-spacing: 0.02em;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.model-strengths { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.35rem; }
.tag {
  color: var(--dim);
  font-size: 0.65rem;
  font-family: var(--mono);
  font-weight: 500;
}
.tag::before { content: '#'; color: var(--accent); opacity: 0.5; }
.model-desc { color: var(--muted); font-size: 0.8rem; margin-bottom: 0.25rem; line-height: 1.5; }
.model-cost {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--green);
  opacity: 0.7;
}

/* ── Formation Cards ────────────────────────────────────────────────── */
.formation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}
.formation-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  transition: all var(--ease);
  position: relative;
  overflow: hidden;
}
.formation-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  transition: background var(--ease);
}
.formation-card:hover {
  border-color: var(--border-hl);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.formation-card:hover::before {
  background: var(--gradient);
}
.formation-card.recommended {
  border-color: rgba(167, 139, 250, 0.2);
}
.formation-card.recommended::before {
  background: var(--gradient);
  opacity: 0.6;
}

/* Formation topology SVG */
.formation-topo {
  display: block;
  margin: 0 auto 0.6rem;
  transition: filter var(--ease);
}
.formation-card:hover .formation-topo {
  filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.4));
}

.formation-header {
  display: flex; align-items: center; gap: 0.5rem;
  margin-bottom: 0.3rem;
}
.formation-header h4 {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
}
.formation-badge {
  background: var(--accent);
  color: #0a0a12;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.formation-roles {
  font-size: 0.7rem;
  font-family: var(--mono);
  color: var(--dim);
  margin-bottom: 0.5rem;
}
.formation-card p {
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 0.7rem;
  line-height: 1.55;
}
.formation-cmd code {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--cyan);
}

/* ── Autonomy Matrix ────────────────────────────────────────────────── */
.autonomy-matrix-wrap {
  overflow-x: auto;
}
.autonomy-matrix {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.78rem;
}
.autonomy-matrix thead th {
  padding: 0.5rem 0.75rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.7rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}
.autonomy-matrix thead th.level-col {
  text-align: left;
  width: 160px;
}
.autonomy-matrix thead th.desc-col {
  text-align: right;
  width: 100px;
}
.autonomy-matrix tbody td {
  padding: 0.6rem 0.75rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 0.85rem;
  transition: background var(--ease);
}
.autonomy-matrix tbody tr:hover td {
  background: rgba(255,255,255,0.015);
}
.autonomy-matrix tbody tr.level-default td {
  background: rgba(167, 139, 250, 0.04);
}
.autonomy-matrix tbody tr.level-default:hover td {
  background: rgba(167, 139, 250, 0.07);
}
.level-name {
  text-align: left !important;
}
.level-label {
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--text);
  display: block;
}
.default-badge {
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--green);
  margin-left: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.autonomy-bar-mini {
  width: 60px;
  height: 3px;
  background: rgba(255,255,255,0.04);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.3rem;
}
.autonomy-fill-mini {
  height: 100%;
  background: var(--gradient);
  border-radius: 2px;
}
.level-desc {
  text-align: right !important;
  font-size: 0.68rem !important;
  color: var(--dim);
  font-style: italic;
}
.perm-yes { color: var(--green); font-weight: 700; }
.perm-no { color: var(--dim); font-size: 1.1rem; }
.perm-cond { color: var(--orange); font-weight: 700; }

.autonomy-legend {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--dim);
  font-family: var(--mono);
}
.autonomy-legend .perm-yes,
.autonomy-legend .perm-cond,
.autonomy-legend .perm-no {
  margin-right: 0.25rem;
}

/* ── API Section ────────────────────────────────────────────────────── */
.api-endpoints { margin-top: 2.5rem; }
.api-endpoints h3 {
  font-size: 0.95rem; font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.footer {
  text-align: center;
  padding: 3rem 2rem;
  margin-top: 4rem;
  position: relative;
}
.footer::before {
  content: '';
  position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 120px; height: 1px;
  background: var(--gradient);
  opacity: 0.4;
}
.footer-links {
  display: flex; justify-content: center; gap: 2rem;
  margin-bottom: 0.75rem;
}
.footer-links a {
  color: var(--dim); text-decoration: none;
  font-size: 0.8rem; font-weight: 500;
  transition: color var(--ease);
}
.footer-links a:hover { color: var(--accent); }
.footer-copy { color: var(--dim); font-size: 0.72rem; }

/* ── Scroll Reveal ─────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0s; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.06s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.06s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.12s; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.18s; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 0.24s; }
.reveal-stagger > .reveal:nth-child(7) { transition-delay: 0.3s; }
.reveal-stagger > .reveal:nth-child(8) { transition-delay: 0.36s; }
.reveal-stagger > .reveal:nth-child(9) { transition-delay: 0.42s; }

/* ── Hero Entrance ─────────────────────────────────────────────────── */
.hero {
  animation: hero-in 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes hero-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-badge {
  animation: hero-in 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}
.hero h1 {
  animation: hero-in 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}
.hero-sub {
  animation: hero-in 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}
.demo-player-wrap {
  animation: hero-in 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
}
.hero-stats {
  animation: hero-in 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.5s both;
}

/* ── Section Dividers ───────────────────────────────────────────────── */
#pipeline { background: rgba(103, 232, 249, 0.015); border-radius: var(--radius); }
#formations { background: rgba(167, 139, 250, 0.015); border-radius: var(--radius); }
#ask-nova { background: rgba(74, 222, 128, 0.015); border-radius: var(--radius); }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); width: 260px; }
  .sidebar.open { transform: translateX(0); }
  .mobile-close {
    display: block; background: none; border: none;
    color: var(--muted); font-size: 1.3rem; cursor: pointer;
    position: absolute; top: 1rem; right: 1rem;
  }
  .mobile-header { display: flex; }
  .content { margin-left: 0; padding-top: var(--header-h); }
  .section { padding: 2.5rem 1.15rem 2rem; }
  .section-wide { max-width: 100%; }
  .hero { padding-top: 2.5rem; }
  .hero h1 { font-size: 1.9rem; }
  .hero::before { width: 100%; }
  .hero-stats { gap: 1.5rem; }
  .hero-stat-value { font-size: 1.35rem; }
  .demo-player-wrap { margin: 0 auto 2rem; }
  .prompt-grid { grid-template-columns: 1fr; }
  .formation-grid { grid-template-columns: 1fr; }
  .cmd-table td:last-child { display: none; }
  .step { padding: 1.25rem 1rem; }
  .quickstart-grid { grid-template-columns: 1fr; }

  /* Pipeline: vertical on mobile */
  .pipeline-diagram {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  .pipeline-node { width: 100%; max-width: 280px; }
  .pipeline-connector {
    width: 2px; height: 24px;
    margin-top: 0;
  }
  .pipeline-connector::before {
    width: 2px; height: 100%; top: 0; left: 0; right: auto;
    background: repeating-linear-gradient(180deg, var(--dim) 0, var(--dim) 4px, transparent 4px, transparent 8px);
  }
  .pipeline-connector::after {
    right: auto; top: auto;
    bottom: -1px; left: -3px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--dim);
    border-bottom: none;
  }
  .pipeline-pulse { display: none; }

  /* Chat: stack vertically */
  .chat-inline {
    grid-template-columns: 1fr;
  }
  .chat-side { order: -1; }
  .chat-side-stats { grid-template-columns: repeat(4, 1fr); }
  .chat-messages { height: 320px; }

  #pipeline, #formations, #ask-nova { margin-left: 0; margin-right: 0; }
}

@media (min-width: 769px) and (max-width: 1060px) {
  :root { --sidebar-w: 180px; }
  .nav-links a { font-size: 0.75rem; padding: 0.35rem 1rem; }
  .pipeline-node { width: 120px; }
  .pipeline-node h4 { font-size: 0.72rem; }
}

/* ── Gallery Section ──────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.gallery-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.gallery-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.gallery-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.gallery-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.gallery-card p {
  font-size: 0.85rem;
  color: var(--dim);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
.gallery-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.gallery-tag {
  background: rgba(167, 139, 250, 0.12);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}
.gallery-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.72rem;
  color: var(--dim);
}
/* Gallery section CTA */
.gallery-cta {
  text-align: center;
  margin-top: 2rem;
}
.gallery-cta-btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background: var(--accent);
  color: #0a0a12;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background var(--ease), box-shadow var(--ease);
}
.gallery-cta-btn:hover {
  background: var(--accent-2);
  box-shadow: 0 0 20px var(--glow-a);
}

/* "View Demo" affordance on gallery card links */
a.gallery-card::after {
  content: 'View Demo \2192';
  display: block;
  margin-top: 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--ease), transform var(--ease);
}
a.gallery-card:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* ── Tier Grid Layout ──────────────────────────────────────────── */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.tier-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tier-header {
  text-align: center;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.tier-header .tier-ctx {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-2);
  margin-top: 0.25rem;
  font-family: var(--mono);
}
.tier-header .tier-tagline {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.15rem;
  font-style: italic;
}
.tier-header.lite {
  background: rgba(103, 232, 249, 0.1);
  border: 1px solid rgba(103, 232, 249, 0.25);
  color: var(--cyan);
}
.tier-header.pro {
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.25);
  color: var(--accent);
}
.tier-header.premier {
  background: linear-gradient(135deg, rgba(232, 121, 249, 0.1), rgba(167, 139, 250, 0.1));
  border: 1px solid rgba(232, 121, 249, 0.25);
  color: #e879f9;
}

/* Tier demo cards */
.tier-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.tier-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.tier-card .card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}
.tier-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.tier-card .card-desc {
  font-size: 0.82rem;
  color: var(--text-2);
  line-height: 1.4;
  margin-bottom: 0.6rem;
  flex: 1;
}
.tier-card .card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.6rem;
}
.tier-card .card-tag {
  background: rgba(167, 139, 250, 0.1);
  color: var(--accent);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}
.tier-card .card-stats {
  display: flex;
  gap: 0.8rem;
  font-size: 0.7rem;
  color: var(--dim);
  font-family: var(--mono);
}
/* "Play" affordance */
a.tier-card::after {
  content: 'Play Demo \2192';
  display: block;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--ease), transform var(--ease);
}
a.tier-card:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* ── Build Proof (Expandable) ──────────────────────────────────── */
.build-proof {
  margin-top: 0.5rem;
  border-top: 1px solid var(--border);
  padding-top: 0.4rem;
}
.build-proof summary {
  font-size: 0.7rem;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  padding: 0.3rem 0;
  user-select: none;
  list-style: none;
}
.build-proof summary::before {
  content: '\25b6 ';
  font-size: 0.6rem;
  transition: transform 0.2s;
  display: inline-block;
}
.build-proof[open] summary::before {
  transform: rotate(90deg);
}
.build-proof summary:hover {
  color: var(--accent);
}
.proof-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-top: 0.4rem;
  font-size: 0.72rem;
  font-family: var(--mono);
  line-height: 1.7;
}
.proof-content .proof-label {
  color: var(--muted);
  min-width: 6rem;
  display: inline-block;
}
.proof-content .proof-value {
  color: var(--text);
}
.proof-content .proof-prompt {
  color: var(--text-2);
  font-style: italic;
  display: block;
  margin: 0.3rem 0 0.6rem;
  padding: 0.5rem;
  background: rgba(167, 139, 250, 0.05);
  border-radius: 4px;
  border-left: 2px solid var(--accent);
  line-height: 1.5;
}
.proof-content .proof-row {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 0.3rem;
}
.proof-content .proof-tasks {
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
}
.proof-content .proof-task {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.15rem 0;
}
.proof-content .proof-task .task-check {
  color: var(--green);
  font-size: 0.8rem;
}
.proof-content .proof-task .task-name {
  color: var(--text-2);
  flex: 1;
}
.proof-content .proof-task .task-turns {
  color: var(--dim);
}

/* Tier grid responsive */
@media (max-width: 900px) {
  .tier-grid {
    grid-template-columns: 1fr;
  }
  .tier-column {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .tier-column .tier-header {
    width: 100%;
  }
  .tier-column .tier-card {
    flex: 1;
    min-width: 260px;
  }
}
@media (max-width: 600px) {
  .tier-column {
    flex-direction: column;
  }
  .tier-column .tier-card {
    min-width: 0;
  }
}

/* ── Formation "New" Badge ───────────────────────────────────────── */
.formation-badge.new {
  background: rgba(74, 222, 128, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

/* ── Benchmark Scorecard ──────────────────────────────────────────── */
.benchmark-scorecard {
  background: rgba(167, 139, 250, 0.06);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}
.score-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  min-width: 120px;
}
.score-grade {
  font-size: 1.6rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a78bfa, #67e8f9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.score-label {
  font-weight: 600;
  color: var(--text);
  margin-top: 0.25rem;
}
.score-detail {
  font-size: 0.75rem;
  color: var(--dim);
  margin-top: 0.25rem;
}
