/* ============================================================
   KafaSys Design System — style.css
   Enterprise Intelligence Platform
   ============================================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Backgrounds */
  --bg-primary: #06060A;
  --bg-secondary: #0A0A12;
  --bg-tertiary: #0E0E18;
  --bg-surface: #111120;
  --bg-elevated: #16162A;
  --bg-hover: #1A1A30;

  /* Borders */
  --border-subtle: rgba(255,255,255,0.06);
  --border-default: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.15);
  --border-accent: rgba(0,212,170,0.3);

  /* Text */
  --text-primary: #E8E8ED;
  --text-secondary: #9494A8;
  --text-tertiary: #6B6B80;
  --text-muted: #4A4A5A;
  --text-inverse: #06060A;

  /* Brand */
  --accent-primary: #00D4AA;
  --accent-secondary: #0099FF;
  --accent-gradient: linear-gradient(135deg, #00D4AA, #0099FF);

  /* Risk States */
  --risk-pass: #00D4AA;
  --risk-pass-bg: rgba(0,212,170,0.08);
  --risk-pass-border: rgba(0,212,170,0.25);
  --risk-watch: #FFAA00;
  --risk-watch-bg: rgba(255,170,0,0.08);
  --risk-watch-border: rgba(255,170,0,0.25);
  --risk-flag: #FF4466;
  --risk-flag-bg: rgba(255,68,102,0.08);
  --risk-flag-border: rgba(255,68,102,0.25);

  /* Decision States */
  --decision-proceed: #00D4AA;
  --decision-conditional: #FFAA00;
  --decision-flag: #FF4466;
  --decision-reject: #CC2244;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;
  --space-5xl: 128px;

  /* Typography */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --text-xs: 0.6875rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-lg: 1.125rem;
  --text-xl: 1.3125rem;
  --text-2xl: 1.625rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.25rem;

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(0,212,170,0.08);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Layout */
  --nav-height: 64px;
  --max-width: 1280px;
  --max-width-wide: 1440px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10000;
  padding: 12px 24px;
  background: var(--accent-primary);
  color: var(--text-inverse);
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: top var(--transition-fast);
}
.skip-link:focus {
  top: 16px;
}

/* Focus */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

a { color: var(--accent-primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--accent-secondary); }

img, svg { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

h1,h2,h3,h4,h5,h6 {
  line-height: 1.2;
  font-weight: 600;
  color: var(--text-primary);
}

h1 { font-size: var(--text-5xl); letter-spacing: -0.03em; }
h2 { font-size: var(--text-3xl); letter-spacing: -0.02em; }
h3 { font-size: var(--text-2xl); letter-spacing: -0.01em; }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}
.container-wide {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-5xl) 0;
}
.section-sm {
  padding: var(--space-3xl) 0;
}

/* Grid */
.grid { display: grid; gap: var(--space-lg); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Flex */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(6,6,10,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-base);
}
.nav.scrolled {
  background: rgba(6,6,10,0.95);
  border-bottom-color: var(--border-default);
}
.nav-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo img, .nav-logo svg {
  height: 28px;
  width: auto;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  list-style: none;
}
.nav-links a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.nav-utility {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Mobile Menu */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--space-sm);
  color: var(--text-primary);
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 24px; height: 24px; }

.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background: var(--bg-primary);
  padding: var(--space-lg);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--transition-base);
}
.mobile-nav.open {
  transform: translateX(0);
}
.mobile-nav a {
  display: block;
  padding: var(--space-md) 0;
  font-size: var(--text-lg);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  transition: color var(--transition-fast);
}
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--text-primary);
}
.mobile-nav .mobile-nav-section {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-default);
}
.mobile-nav .mobile-nav-section-title {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--text-inverse);
  border-color: var(--accent-primary);
}
.btn-primary:hover {
  background: #00E8BB;
  border-color: #00E8BB;
  color: var(--text-inverse);
  box-shadow: 0 0 20px rgba(0,212,170,0.2);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(0,212,170,0.05);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
  padding: 10px 16px;
}
.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.btn-sm {
  padding: 6px 14px;
  font-size: var(--text-xs);
  min-height: 36px;
}
.btn-lg {
  padding: 14px 28px;
  font-size: var(--text-base);
  min-height: 48px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: border-color var(--transition-fast);
}
.card:hover {
  border-color: var(--border-default);
}
.card-elevated {
  background: var(--bg-elevated);
  box-shadow: var(--shadow-md);
}

/* ============================================================
   STATUS / RISK BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.4;
}
.badge-pass {
  background: var(--risk-pass-bg);
  color: var(--risk-pass);
  border: 1px solid var(--risk-pass-border);
}
.badge-watch {
  background: var(--risk-watch-bg);
  color: var(--risk-watch);
  border: 1px solid var(--risk-watch-border);
}
.badge-flag {
  background: var(--risk-flag-bg);
  color: var(--risk-flag);
  border: 1px solid var(--risk-flag-border);
}
.badge-neutral {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-md);
}
.section-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}
.section-desc {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.7;
}

/* ============================================================
   DATA TABLES
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.data-table th {
  text-align: left;
  padding: var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
}
.data-table td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  vertical-align: middle;
}
.data-table tr:hover td {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border-default);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-tertiary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
  min-height: 44px;
}
.tab-btn:hover {
  color: var(--text-secondary);
}
.tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}
.tab-panel {
  display: none;
  padding: var(--space-xl) 0;
}
.tab-panel.active {
  display: block;
}

/* ============================================================
   ACCORDION
   ============================================================ */
.accordion-item {
  border-bottom: 1px solid var(--border-subtle);
}
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) 0;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: var(--text-base);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  min-height: 44px;
  transition: color var(--transition-fast);
}
.accordion-trigger:hover { color: var(--accent-primary); }
.accordion-trigger svg {
  width: 20px;
  height: 20px;
  color: var(--text-tertiary);
  transition: transform var(--transition-base);
  flex-shrink: 0;
}
.accordion-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow);
}
.accordion-content-inner {
  padding-bottom: var(--space-lg);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================================
   CITATION COMPONENT
   ============================================================ */
.citation {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.citation:hover {
  border-color: var(--border-default);
  background: var(--bg-surface);
}
.citation-source {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent-primary);
  margin-bottom: var(--space-sm);
}
.citation-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  line-height: 1.6;
}
.citation-meta {
  display: flex;
  gap: var(--space-md);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

/* ============================================================
   PROGRESS / BARS
   ============================================================ */
.progress-bar {
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width var(--transition-slow);
}
.progress-fill.pass { background: var(--risk-pass); }
.progress-fill.watch { background: var(--risk-watch); }
.progress-fill.flag { background: var(--risk-flag); }
.progress-fill.accent { background: var(--accent-gradient); }

/* ============================================================
   DASHBOARD PANELS
   ============================================================ */
.dash-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.dash-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
}
.dash-panel-title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.dash-panel-body {
  padding: var(--space-lg);
}

/* ============================================================
   METRIC CARDS
   ============================================================ */
.metric {
  text-align: center;
  padding: var(--space-xl);
}
.metric-value {
  font-family: var(--font-mono);
  font-size: var(--text-4xl);
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: var(--space-sm);
}
.metric-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}
.metric-note {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================================
   WORKFLOW / PIPELINE
   ============================================================ */
.workflow {
  display: flex;
  align-items: stretch;
  gap: 2px;
}
.workflow-step {
  flex: 1;
  text-align: center;
  padding: var(--space-lg) var(--space-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  position: relative;
  transition: all var(--transition-fast);
}
.workflow-step:first-child { border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.workflow-step:last-child { border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.workflow-step.active {
  background: var(--bg-elevated);
  border-color: var(--accent-primary);
}
.workflow-step-num {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}
.workflow-step-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
  margin-bottom: var(--space-lg);
}
.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}
.form-required {
  color: var(--risk-flag);
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  min-height: 44px;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0,212,170,0.1);
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}
.form-textarea {
  resize: vertical;
  min-height: 120px;
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B6B80' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
}
.form-error {
  font-size: var(--text-xs);
  color: var(--risk-flag);
  margin-top: var(--space-xs);
  display: none;
}
.form-group.error .form-input,
.form-group.error .form-select,
.form-group.error .form-textarea {
  border-color: var(--risk-flag);
}
.form-group.error .form-error {
  display: block;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}
.hero-content {
  position: relative;
  z-index: 2;
}
.hero-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: var(--space-lg);
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-lg);
  max-width: 720px;
}
.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: var(--space-xl);
}
.hero-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Page Hero (subpages) */
.page-hero {
  padding: calc(var(--nav-height) + var(--space-4xl)) 0 var(--space-3xl);
  border-bottom: 1px solid var(--border-subtle);
}
.page-hero-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: var(--space-md);
}
.page-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}
.page-hero-desc {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.7;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-4xl) 0 var(--space-2xl);
  background: var(--bg-secondary);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}
.footer-brand-desc {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  line-height: 1.7;
  margin-top: var(--space-md);
  max-width: 320px;
}
.footer-col-title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-lg);
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.footer-links a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}
.footer-links a:hover {
  color: var(--text-primary);
}
.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}
.footer-copy {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.footer-legal {
  display: flex;
  gap: var(--space-lg);
}
.footer-legal a {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.footer-legal a:hover {
  color: var(--text-secondary);
}

/* ============================================================
   MODAL / DIALOG
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}
.modal-overlay.open {
  display: flex;
}
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
}
.modal-title {
  font-size: var(--text-lg);
  font-weight: 600;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-tertiary);
  padding: var(--space-sm);
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}
.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}
.modal-body {
  padding: var(--space-lg);
}

/* ============================================================
   COOKIE CONSENT
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1500;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-default);
  padding: var(--space-lg);
  display: none;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}
.cookie-banner.show {
  display: block;
}
.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
}
.cookie-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  flex: 1;
  min-width: 300px;
}
.cookie-actions {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-center { text-align: center; }
.text-mono { font-family: var(--font-mono); }
.text-accent { color: var(--accent-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-tertiary); }
.text-sm { font-size: var(--text-sm); }
.text-xs { font-size: var(--text-xs); }
.text-lg { font-size: var(--text-lg); }
.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: var(--space-3xl) 0;
}

/* ============================================================
   BACKGROUND ELEMENTS
   ============================================================ */
.bg-grid {
  position: relative;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}
.bg-gradient-radial {
  position: relative;
  background-image: radial-gradient(circle at 50% 0%, rgba(0, 212, 170, 0.07) 0%, rgba(6, 6, 10, 0) 70%);
}
.bg-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
  pointer-events: none;
}
.bg-gradient-radial-overlay {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  max-width: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 212, 170, 0.04), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   RISK INDICATOR ROW
   ============================================================ */
.risk-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.risk-row:last-child { border-bottom: none; }
.risk-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
}
.risk-score {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin: 0 var(--space-md);
}

/* ============================================================
   VERTICAL FLOW
   ============================================================ */
.v-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.v-flow-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-xl);
  text-align: center;
  width: 100%;
  max-width: 360px;
  position: relative;
  transition: all var(--transition-fast);
}
.v-flow-item:hover {
  border-color: var(--accent-primary);
  background: var(--bg-elevated);
}
.v-flow-connector {
  width: 1px;
  height: 32px;
  background: var(--border-default);
  position: relative;
}
.v-flow-connector::after {
  content: '↓';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: var(--text-xs);
}

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
  position: relative;
  padding-left: var(--space-xl);
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border-default);
}
.timeline-item {
  position: relative;
  padding-bottom: var(--space-xl);
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-xl));
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid var(--bg-primary);
}
.timeline-item.planned::before { background: var(--text-muted); }
.timeline-item.construction::before { background: var(--risk-watch); }
.timeline-item.operational::before { background: var(--risk-pass); }

/* ============================================================
   MINI STAT ROW
   ============================================================ */
.stat-row {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}
.stat-item {
  flex: 1;
  min-width: 120px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
}
.stat-item-value {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
}
.stat-item-label {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: var(--space-xs);
}

/* ============================================================
   SVG / GRAPH CONTAINERS
   ============================================================ */
.graph-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  overflow: hidden;
}
.graph-container svg text {
  font-family: var(--font-mono);
}

/* Map container */
.map-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
  min-height: 400px;
}

/* ============================================================
   LEADER CARD
   ============================================================ */
.leader-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
}
.leader-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border-default);
  margin: 0 auto var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--accent-primary);
}
.leader-name {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}
.leader-role {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ============================================================
   COMMERCIAL TIERS
   ============================================================ */
.tier-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: all var(--transition-fast);
}
.tier-card:hover {
  border-color: var(--border-strong);
}
.tier-card.featured {
  border-color: var(--accent-primary);
  position: relative;
}
.tier-card.featured::before {
  content: 'Most Common';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-primary);
  color: var(--text-inverse);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.tier-name {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-md);
}
.tier-title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}
.tier-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}
.tier-features {
  list-style: none;
  margin-bottom: var(--space-xl);
}
.tier-features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}
.tier-features li::before {
  content: '✓';
  color: var(--accent-primary);
  font-weight: 700;
  flex-shrink: 0;
}

/* ============================================================
   EVIDENCE PANEL
   ============================================================ */
.evidence-panel {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--transition-slow);
}
.evidence-panel.open {
  max-height: 500px;
}
.evidence-panel-inner {
  padding: var(--space-lg);
}
.evidence-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}
.evidence-doc {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--accent-primary);
}
.evidence-body {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.7;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

/* ============================================================
   SPECIAL: HERO DASHBOARD MOCK
   ============================================================ */
.hero-dashboard {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.hero-dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
}
.hero-dash-title {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.hero-dash-body {
  padding: var(--space-lg);
}
.hero-dash-project {
  margin-bottom: var(--space-lg);
}
.hero-dash-project-name {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}
.hero-dash-project-meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}
.hero-dash-risks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
}
.hero-dash-risk-item {
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}
.hero-dash-risk-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-xs);
}
