/* ============================================================
   BEES DESIGN SPEC — STYLES
   Palette: Electric Mint + Volcanic Glass hybrid
   Fonts: Syne (display) + DM Mono (code) + Instrument Serif (accent)
   ============================================================ */

:root {
  --bg-dark: #0A0F0A;
  --bg-dark2: #0F1A0F;
  --bg-card: #111A11;
  --bg-card2: #162016;
  --surface: #1C2A1C;
  --surface2: #243024;
  --border: rgba(0, 245, 100, 0.12);
  --border-bright: rgba(0, 245, 100, 0.3);
  --accent: #00F564;
  --accent2: #00C84E;
  --accent-dim: rgba(0, 245, 100, 0.15);
  --accent-glow: rgba(0, 245, 100, 0.08);
  --amber: #F5A623;
  --amber-dim: rgba(245, 166, 35, 0.15);
  --red: #FF4444;
  --red-dim: rgba(255, 68, 68, 0.15);
  --blue: #4FC3F7;
  --blue-dim: rgba(79, 195, 247, 0.15);
  --purple: #CE93D8;
  --text-primary: #E8F5E8;
  --text-secondary: #8FAF8F;
  --text-muted: #4A6A4A;
  --text-code: #A8D8A8;
  --font-display: 'Syne', sans-serif;
  --font-mono: 'DM Mono', monospace;
  --font-serif: 'Instrument Serif', serif;
  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-accent: 0 0 40px rgba(0, 245, 100, 0.1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 2px 6px;
  border-radius: 4px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section-dark {
  background: var(--bg-dark2);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.8;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.section-intro {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin-bottom: 60px;
  line-height: 1.7;
}

.subsection-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
  margin-top: 60px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.subsection-desc {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.7;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 16px 40px;
  background: rgba(10, 15, 10, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  flex-shrink: 0;
}

.bee-icon {
  font-size: 1.3rem;
  animation: hexPulse 3s ease-in-out infinite;
}

@keyframes hexPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.95); }
}

.nav-links {
  display: flex;
  gap: 24px;
  flex: 1;
}

.nav-links a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hex-grid {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='52' viewBox='0 0 60 52'%3E%3Cpolygon points='30,2 58,17 58,47 30,62 2,47 2,17' fill='none' stroke='%2300F564' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 60px 52px;
}

.hero-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(0, 245, 100, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 120px 40px 80px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid var(--border-bright);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 32px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--accent-dim);
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

.title-line {
  display: block;
}

.title-line.accent {
  color: var(--accent);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 680px;
  line-height: 1.7;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 48px;
  margin-bottom: 60px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

.scroll-arrow {
  animation: bounce 2s ease-in-out infinite;
  font-size: 1.2rem;
  color: var(--accent);
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ============================================================
   CAPABILITY CARDS
   ============================================================ */

.capability-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 80px;
}

.cap-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  cursor: default;
}

.cap-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.cap-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-4px);
  box-shadow: var(--shadow-accent);
}

.cap-card:hover::before {
  opacity: 1;
}

.cap-icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
  margin-bottom: 16px;
}

.cap-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.cap-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.cap-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.cap-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.cap-specs span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-secondary);
  background: var(--surface);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.cap-flag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
  border: 1px solid rgba(0, 245, 100, 0.2);
}

/* ============================================================
   ARCHITECTURE DIAGRAM
   ============================================================ */

.arch-section {
  margin-top: 60px;
}

.arch-diagram {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.arch-layer {
  width: 100%;
  display: flex;
  justify-content: center;
}

.arch-layer-multi {
  gap: 16px;
}

.arch-arrow-down {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.arch-node {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  position: relative;
  min-width: 200px;
  text-align: center;
  transition: border-color 0.2s;
}

.arch-node:hover {
  border-color: var(--border-bright);
}

.arch-node.node-wide {
  min-width: 400px;
}

.arch-node.node-new {
  border-color: rgba(0, 245, 100, 0.3);
  background: rgba(0, 245, 100, 0.05);
}

.arch-node.node-extended {
  border-color: rgba(245, 166, 35, 0.3);
  background: rgba(245, 166, 35, 0.05);
}

.arch-node.node-unchanged {
  border-color: var(--border);
  opacity: 0.7;
}

.node-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  padding: 2px 8px;
  border-radius: 100px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.node-new .node-badge {
  background: var(--accent);
  color: var(--bg-dark);
}

.node-extended .node-badge {
  background: var(--amber);
  color: var(--bg-dark);
}

.node-label {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.node-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.arch-legend {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.dot-new { background: var(--accent); }
.dot-extended { background: var(--amber); }
.dot-unchanged { background: var(--text-muted); }

/* ============================================================
   NON-GOALS
   ============================================================ */

.nongoals-section {
  margin-top: 60px;
}

.nongoals-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.nongoal-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.ng-x {
  color: var(--red);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ============================================================
   ISOLATION DIAGRAM
   ============================================================ */

.isolation-diagram {
  margin-bottom: 60px;
}

.isolation-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.iso-level {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 700px;
  transition: border-color 0.2s;
}

.iso-level:hover {
  border-color: var(--border-bright);
}

.iso-account { background: rgba(0, 245, 100, 0.04); }
.iso-hive { background: rgba(0, 245, 100, 0.06); }
.iso-sandbox { background: rgba(0, 245, 100, 0.08); }
.iso-workspace { background: rgba(0, 245, 100, 0.10); }

.iso-connector {
  width: 2px;
  height: 24px;
  background: linear-gradient(to bottom, var(--border-bright), var(--border));
  margin: 0 auto;
}

.iso-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.iso-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.iso-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* ============================================================
   LIFECYCLE DIAGRAM
   ============================================================ */

.lifecycle-section {
  margin-bottom: 60px;
}

.lifecycle-diagram {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding: 32px 0;
}

.lc-state {
  flex-shrink: 0;
  padding: 20px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
  min-width: 120px;
  transition: transform 0.2s;
}

.lc-state:hover { transform: scale(1.05); }

.lc-none { background: var(--surface); }
.lc-running { background: rgba(0, 245, 100, 0.1); border-color: rgba(0, 245, 100, 0.3); }
.lc-stopped { background: rgba(245, 166, 35, 0.1); border-color: rgba(245, 166, 35, 0.3); }
.lc-archived { background: rgba(79, 195, 247, 0.1); border-color: rgba(79, 195, 247, 0.3); }

.lc-state-name {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.lc-state-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.lc-arrow {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 8px;
  min-width: 80px;
}

.lc-arrow-line {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--border-bright), var(--border));
  position: relative;
}

.lc-arrow-line::after {
  content: '▶';
  position: absolute;
  right: -8px;
  top: -8px;
  font-size: 0.6rem;
  color: var(--accent);
}

.lc-arrow-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
}

.lc-arrow-back .lc-arrow-line {
  background: linear-gradient(90deg, var(--border), var(--border-bright));
}

.lifecycle-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-top: 16px;
}

/* ============================================================
   TOOLS GRID
   ============================================================ */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s, transform 0.2s;
}

.tool-card:hover {
  border-color: var(--border-bright);
  transform: translateY(-2px);
}

.tool-card-special {
  border-color: rgba(0, 245, 100, 0.25);
  background: rgba(0, 245, 100, 0.04);
}

.tool-icon {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.tool-name {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  color: var(--accent);
}

.tool-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.tool-flag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  background: var(--surface);
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-block;
}

/* ============================================================
   SECURITY GRID
   ============================================================ */

.security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.sec-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s;
}

.sec-item:hover {
  border-color: var(--border-bright);
}

.sec-icon {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.sec-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.sec-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================================
   MEMORY COEXISTENCE
   ============================================================ */

.memory-coexist {
  display: flex;
  gap: 0;
  align-items: stretch;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 60px;
}

.mem-col {
  flex: 1;
  padding: 32px;
}

.mem-db {
  background: rgba(79, 195, 247, 0.04);
  border-right: 1px solid var(--border);
}

.mem-files {
  background: rgba(0, 245, 100, 0.04);
}

.mem-col-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.mem-col-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.mem-col-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.mem-col-sub {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.mem-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  gap: 12px;
}

.mem-divider-line {
  flex: 1;
  width: 1px;
  background: var(--border);
}

.mem-divider-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.mem-item {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
}

.mem-item:last-child { border-bottom: none; }

.mem-col-note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 16px;
  padding: 8px 12px;
  background: var(--surface);
  border-radius: 4px;
}

/* ============================================================
   FILESYSTEM TREE
   ============================================================ */

.filesystem-tree {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  font-family: var(--font-mono);
}

.fs-root {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.fs-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fs-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fs-item-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.fs-item-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.fs-item-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.fs-item-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.fs-item-special .fs-item-name {
  color: var(--accent);
}

.fs-children {
  margin-left: 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-left: 1px solid var(--border);
  padding-left: 16px;
}

.fs-child {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================================
   PROJECTOR FLOW
   ============================================================ */

.projector-flow {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
  overflow-x: auto;
}

.proj-step {
  flex: 1;
  min-width: 160px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: border-color 0.2s;
}

.proj-step:hover {
  border-color: var(--border-bright);
}

.proj-step-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 700;
}

.proj-step-title {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.proj-step-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.proj-arrow {
  font-size: 1.2rem;
  color: var(--accent);
  padding: 0 12px;
  flex-shrink: 0;
}

/* ============================================================
   MEMORY.MD PREVIEW
   ============================================================ */

.memory-md-preview, .skill-md-preview {
  background: #0D1A0D;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.preview-dot.red { background: #FF5F57; }
.preview-dot.yellow { background: #FFBD2E; }
.preview-dot.green { background: #28CA41; }

.preview-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.preview-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 400px;
  overflow-y: auto;
}

.preview-line {
  color: var(--text-secondary);
  line-height: 1.6;
}

.preview-line.comment { color: var(--text-muted); }
.preview-line.heading { color: var(--accent); font-weight: 600; margin-top: 8px; }
.preview-line.scratchpad { color: #4A6A4A; font-style: italic; }
.preview-line.key { color: var(--blue); }
.preview-line.val { color: var(--text-secondary); }
.preview-line.indent { padding-left: 16px; color: var(--text-secondary); }

.mem-cite {
  color: var(--text-muted);
  font-size: 0.72em;
}

/* ============================================================
   EVENT TYPES
   ============================================================ */

.event-types {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.event-type {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.event-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 600;
}

.event-badge.created { background: rgba(0, 245, 100, 0.2); color: var(--accent); }
.event-badge.updated { background: rgba(79, 195, 247, 0.2); color: var(--blue); }
.event-badge.superseded { background: rgba(245, 166, 35, 0.2); color: var(--amber); }
.event-badge.tombstoned { background: rgba(255, 68, 68, 0.2); color: var(--red); }

.event-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.event-note {
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================================
   OWNERSHIP TABLE
   ============================================================ */

.ownership-table {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.own-header, .own-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 2fr;
  gap: 16px;
  padding: 14px 20px;
  font-size: 0.85rem;
}

.own-header {
  background: var(--surface);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.own-row {
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  align-items: center;
}

.own-row:hover {
  background: var(--accent-glow);
}

.own-writer {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.own-immutable {
  color: var(--text-muted);
}

/* ============================================================
   THREE TIERS
   ============================================================ */

.tiers-diagram {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 60px;
}

.tier {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s;
}

.tier:hover {
  border-color: var(--border-bright);
}

.tier-1 { border-color: rgba(0, 245, 100, 0.3); }
.tier-2 { border-color: rgba(245, 166, 35, 0.3); }
.tier-3 { border-color: rgba(255, 68, 68, 0.3); }

.tier-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
}

.tier-1 .tier-header { background: rgba(0, 245, 100, 0.06); }
.tier-2 .tier-header { background: rgba(245, 166, 35, 0.06); }
.tier-3 .tier-header { background: rgba(255, 68, 68, 0.06); }

.tier-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
}

.tier-1 .tier-num { background: var(--accent); color: var(--bg-dark); }
.tier-2 .tier-num { background: var(--amber); color: var(--bg-dark); }
.tier-3 .tier-num { background: var(--red); color: white; }

.tier-name {
  font-weight: 700;
  font-size: 1rem;
  flex: 1;
}

.tier-cost {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.tier-body {
  padding: 24px 28px;
  background: var(--bg-card);
}

.tier-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.tier-rules {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rule-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface);
  border-radius: var(--radius);
  font-size: 0.82rem;
}

.rule-match {
  font-family: var(--font-mono);
  color: var(--accent);
  min-width: 200px;
}

.rule-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
}

.rule-repair {
  color: var(--text-secondary);
}

.tier-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 4px;
}

.tier-connector-line {
  width: 2px;
  height: 20px;
  background: var(--border);
}

.tier-connector-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
}

.reflexion-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.ref-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-align: center;
}

.ref-haiku {
  border-color: rgba(245, 166, 35, 0.4);
  background: rgba(245, 166, 35, 0.08);
  color: var(--amber);
  font-weight: 600;
}

.ref-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
}

.tier-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  padding: 10px 14px;
  background: var(--surface);
  border-radius: var(--radius);
  border-left: 2px solid var(--amber);
}

.tier3-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.t3-action {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius);
}

.t3-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.t3-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================================
   DECISION TABLE
   ============================================================ */

.decision-table {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.dt-header, .dt-row {
  display: grid;
  grid-template-columns: 2.5fr 1.5fr 1fr 1fr;
  gap: 16px;
  padding: 14px 20px;
  font-size: 0.82rem;
  align-items: center;
}

.dt-header {
  background: var(--surface);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.dt-row {
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
}

.dt-row:hover { background: var(--accent-glow); }

.dt-fires {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.dt-possible {
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.dt-skip {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* ============================================================
   OBSERVABILITY
   ============================================================ */

.obs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.obs-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s;
}

.obs-item:hover { border-color: var(--border-bright); }

.obs-metric {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 600;
}

.obs-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.obs-spans {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ============================================================
   SKILL FORMAT
   ============================================================ */

.skill-format-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 60px;
}

.skill-format-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.skill-info-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.skill-info-item:hover { border-color: var(--border-bright); }

.skill-info-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.skill-info-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.skill-info-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ============================================================
   AUTHORING FLOW
   ============================================================ */

.authoring-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 600px;
  margin: 0 auto 60px;
}

.auth-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: rgba(0, 245, 100, 0.1);
  border: 1px solid rgba(0, 245, 100, 0.3);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  width: 100%;
  justify-content: center;
}

.auth-trigger-icon { font-size: 1.2rem; }

.auth-arrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 8px 0;
  text-align: center;
}

.auth-gate {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}

.auth-gate:hover { border-color: var(--border-bright); }

.gate-1 { border-color: rgba(79, 195, 247, 0.3); }
.gate-2 { border-color: rgba(245, 166, 35, 0.3); }
.gate-author { border-color: rgba(0, 245, 100, 0.3); }

.gate-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}

.gate-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--surface);
  color: var(--text-secondary);
}

.gate-1 .gate-num { background: rgba(79, 195, 247, 0.2); color: var(--blue); }
.gate-2 .gate-num { background: rgba(245, 166, 35, 0.2); color: var(--amber); }
.gate-author .gate-num { background: rgba(0, 245, 100, 0.2); color: var(--accent); }

.gate-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.gate-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 20px;
}

.gate-check {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--blue);
  background: var(--blue-dim);
  padding: 4px 10px;
  border-radius: 4px;
}

.gate-desc {
  padding: 16px 20px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  font-style: italic;
}

/* ============================================================
   REVISION TRIGGERS
   ============================================================ */

.revision-triggers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.rev-trigger {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

.rev-trigger:hover {
  transform: translateY(-2px);
}

.rev-force { border-color: rgba(255, 68, 68, 0.3); }
.rev-candidate { border-color: rgba(245, 166, 35, 0.3); }
.rev-eligibility { border-color: rgba(0, 245, 100, 0.3); }

.rev-trigger-icon { font-size: 1.5rem; margin-bottom: 10px; }
.rev-trigger-title { font-weight: 700; font-size: 0.85rem; margin-bottom: 8px; }
.rev-trigger-desc { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.4; }

.revision-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ============================================================
   SAFETY GRID
   ============================================================ */

.safety-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 16px;
}

.safety-col {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.safety-reject { border-color: rgba(255, 68, 68, 0.3); }
.safety-allow { border-color: rgba(0, 245, 100, 0.3); }

.safety-col-header {
  padding: 16px 20px;
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.safety-reject .safety-col-header { background: rgba(255, 68, 68, 0.08); }
.safety-allow .safety-col-header { background: rgba(0, 245, 100, 0.08); }

.safety-items {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.safety-item {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 4px;
}

.safety-reject .safety-item {
  color: var(--red);
  background: var(--red-dim);
}

.safety-allow .safety-item {
  color: var(--accent);
  background: var(--accent-dim);
}

.safety-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  line-height: 1.5;
}

.safety-governance {
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius);
  line-height: 1.6;
}

/* ============================================================
   THREE-RUN STORY
   ============================================================ */

.story-runs {
  display: flex;
  gap: 0;
  align-items: stretch;
}

.story-run {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s;
}

.story-run:hover { border-color: var(--border-bright); }

.run-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.run-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  margin-bottom: 4px;
  font-weight: 700;
}

.run-title {
  font-weight: 700;
  font-size: 1rem;
}

.run-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.run-step {
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 8px 12px;
  background: var(--surface);
  border-radius: 4px;
  line-height: 1.4;
}

.run-outcome {
  font-size: 0.82rem;
  color: var(--accent);
  padding: 10px 12px;
  background: var(--accent-dim);
  border-radius: 4px;
  font-weight: 600;
  border: 1px solid rgba(0, 245, 100, 0.2);
}

.story-arrow {
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-size: 1.5rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ============================================================
   DATA FLOW DIAGRAM
   ============================================================ */

.flow-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 800px;
  margin: 0 auto 60px;
}

.flow-step {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color 0.2s;
}

.flow-step:hover { border-color: var(--border-bright); }

.flow-entry { border-color: rgba(79, 195, 247, 0.3); }
.flow-queen { border-color: rgba(206, 147, 216, 0.3); }
.flow-supervisor { border-color: rgba(0, 245, 100, 0.3); }
.flow-worker { border-color: rgba(245, 166, 35, 0.3); }
.flow-log { border-color: rgba(0, 245, 100, 0.2); }

.flow-step-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.flow-step-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.flow-step-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.flow-new {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  background: var(--accent);
  color: var(--bg-dark);
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 6px;
}

.flow-extended {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  background: var(--amber);
  color: var(--bg-dark);
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 6px;
}

.flow-connector {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 8px 0;
  text-align: center;
}

.flow-parallel {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.flow-parallel-label {
  padding: 10px 20px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.flow-parallel-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.flow-parallel-item {
  padding: 20px;
  border-right: 1px solid var(--border);
}

.flow-parallel-item:last-child { border-right: none; }

.flow-p-icon { font-size: 1.2rem; margin-bottom: 8px; }
.flow-p-title { font-weight: 700; font-size: 0.85rem; margin-bottom: 6px; }
.flow-p-desc { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.4; }

.flow-branch {
  width: 100%;
  border: 1px solid rgba(255, 68, 68, 0.3);
  border-radius: var(--radius);
  overflow: hidden;
}

.flow-branch-label {
  padding: 10px 20px;
  background: rgba(255, 68, 68, 0.08);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--red);
  border-bottom: 1px solid rgba(255, 68, 68, 0.2);
}

.flow-branch-items {
  padding: 16px 20px;
}

.flow-t1 {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.flow-async {
  width: 100%;
  border: 1px solid rgba(0, 245, 100, 0.2);
  border-radius: var(--radius);
  overflow: hidden;
}

.flow-async-label {
  padding: 10px 20px;
  background: rgba(0, 245, 100, 0.06);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent);
  border-bottom: 1px solid rgba(0, 245, 100, 0.15);
}

.flow-async-items {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flow-async-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.flow-async-letter {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}

/* ============================================================
   FLAG MATRIX
   ============================================================ */

.flag-matrix {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.fm-header, .fm-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 16px;
  padding: 16px 20px;
  font-size: 0.85rem;
}

.fm-header {
  background: var(--surface);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
}

.fm-row {
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  align-items: start;
}

.fm-row:hover { background: var(--accent-glow); }

.fm-flag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
}

/* ============================================================
   COST BARS
   ============================================================ */

.cost-bars {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.cost-item {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.cost-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  min-width: 220px;
  flex-shrink: 0;
}

.cost-bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
}

.cost-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent2), var(--accent));
  border-radius: 4px;
  transition: width 1s ease;
}

.cost-value {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
  min-width: 60px;
  text-align: right;
  flex-shrink: 0;
}

.cost-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  font-weight: 700;
  font-size: 0.95rem;
}

.cost-total span:last-child {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1.1rem;
}

/* ============================================================
   PR TIMELINE
   ============================================================ */

.pr-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 16px;
}

.pr-item {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.pr-item:last-child { border-bottom: none; }

.pr-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0, 245, 100, 0.3);
  padding: 6px 14px;
  border-radius: 100px;
  flex-shrink: 0;
  margin-top: 2px;
}

.pr-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.pr-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}

.pr-size {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--surface);
  padding: 3px 10px;
  border-radius: 4px;
  display: inline-block;
}

.pr-connector {
  width: 2px;
  height: 0;
  background: var(--border);
  margin-left: 40px;
}

.pr-deps {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  padding: 12px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* ============================================================
   FLAG STEPS
   ============================================================ */

.flag-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.flag-step {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.flag-step:last-child { border-bottom: none; }

.flag-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.flag-step-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 4px;
  font-family: var(--font-mono);
  color: var(--accent);
}

.flag-step-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ============================================================
   TESTING GRID
   ============================================================ */

.test-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.test-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.2s;
}

.test-card:hover { border-color: var(--border-bright); }

.test-card-coverage {
  border-color: rgba(0, 245, 100, 0.3);
  background: rgba(0, 245, 100, 0.04);
}

.test-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 4px 10px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 12px;
}

.test-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.test-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.test-item {
  font-size: 0.78rem;
  color: var(--text-secondary);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
}

.test-item:last-child { border-bottom: none; }

/* ============================================================
   METRICS
   ============================================================ */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s;
}

.metric-card:hover { border-color: var(--border-bright); }

.metric-icon { font-size: 1.5rem; margin-bottom: 12px; }
.metric-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 16px; }

.metric-targets {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.metric-target {
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 8px 12px;
  background: var(--surface);
  border-radius: 4px;
  border-left: 2px solid var(--accent);
  line-height: 1.4;
}

/* ============================================================
   RISKS
   ============================================================ */

.risks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.risk-card {
  display: flex;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s;
}

.risk-card:hover { border-color: rgba(255, 68, 68, 0.3); }

.risk-id {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--red);
  background: var(--red-dim);
  padding: 4px 10px;
  border-radius: 4px;
  height: fit-content;
  flex-shrink: 0;
}

.risk-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.risk-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.4;
}

.risk-mitigation {
  font-size: 0.78rem;
  color: var(--accent);
  padding: 8px 12px;
  background: var(--accent-dim);
  border-radius: 4px;
  line-height: 1.4;
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
  background: var(--bg-dark2);
  border-top: 1px solid var(--border);
  padding: 60px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 12px;
}

.footer-meta, .footer-scope {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.signoff-title {
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 12px;
  color: var(--text-secondary);
}

.signoff-item {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.signoff-item:last-child { border-bottom: none; }

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .nav-links { display: none; }
  .capability-grid { grid-template-columns: 1fr; }
  .security-grid { grid-template-columns: repeat(2, 1fr); }
  .obs-grid { grid-template-columns: repeat(2, 1fr); }
  .skill-format-grid { grid-template-columns: 1fr; }
  .revision-triggers { grid-template-columns: repeat(2, 1fr); }
  .test-grid { grid-template-columns: repeat(2, 1fr); }
  .metrics-grid { grid-template-columns: 1fr; }
  .risks-grid { grid-template-columns: 1fr; }
  .story-runs { flex-direction: column; }
  .story-arrow { transform: rotate(90deg); align-self: center; }
  .dt-header, .dt-row { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .own-header, .own-row { grid-template-columns: 1fr 1fr 1fr; }
  .footer-content { flex-direction: column; }
  .hero-stats { gap: 24px; flex-wrap: wrap; justify-content: center; }
  .container { padding: 0 20px; }
  .memory-coexist { flex-direction: column; }
  .mem-divider { flex-direction: row; writing-mode: horizontal-tb; }
  .mem-divider-label { writing-mode: horizontal-tb; }
}

@media (max-width: 600px) {
  .security-grid { grid-template-columns: 1fr; }
  .obs-grid { grid-template-columns: 1fr; }
  .revision-triggers { grid-template-columns: 1fr; }
  .test-grid { grid-template-columns: 1fr; }
  .safety-grid { grid-template-columns: 1fr; }
  .flow-parallel-items { grid-template-columns: 1fr; }
  .dt-header, .dt-row { grid-template-columns: 1fr; }
  .own-header, .own-row { grid-template-columns: 1fr; }
  .fm-header, .fm-row { grid-template-columns: 1fr; }
}