/* ─── DESIGN TOKENS ─────────────────────────────────── */
:root {
  /* Type Scale */
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-hero: clamp(2.5rem,   1rem    + 4vw,    5rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Layout */
  --content-wide: 1280px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: 160ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Fonts */
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-body: 'Space Grotesk', 'Inter', sans-serif;
}

/* ─── DARK MODE (default) ───────────────────────────── */
:root, [data-theme="dark"] {
  --bg:           #0a0b0d;
  --surface:      #111318;
  --surface-2:    #161920;
  --surface-3:    #1c2028;
  --border:       #252b36;
  --border-light: #1e2430;

  --text:         #e8eaf0;
  --text-muted:   #7a8499;
  --text-faint:   #3d4455;

  --neon:         #00ffcc;
  --neon-dim:     rgba(0, 255, 204, 0.12);
  --neon-glow:    0 0 20px rgba(0, 255, 204, 0.3);

  --accent:       #7c6bff;
  --accent-dim:   rgba(124, 107, 255, 0.12);

  --gold:         #f0c040;
  --gold-dim:     rgba(240, 192, 64, 0.12);

  --red:          #ff4d6d;
  --red-dim:      rgba(255, 77, 109, 0.12);
  --green:        #4ade80;
  --green-dim:    rgba(74, 222, 128, 0.1);
  --orange:       #fb923c;
  --orange-dim:   rgba(251, 146, 60, 0.12);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.6);
}

/* ─── LIGHT MODE ────────────────────────────────────── */
[data-theme="light"] {
  --bg:           #f4f5f7;
  --surface:      #ffffff;
  --surface-2:    #f8f9fb;
  --surface-3:    #eef0f4;
  --border:       #dde0e8;
  --border-light: #e8eaef;

  --text:         #111318;
  --text-muted:   #5a6272;
  --text-faint:   #aab0be;

  --neon:         #008866;
  --neon-dim:     rgba(0, 136, 102, 0.1);
  --neon-glow:    0 0 12px rgba(0, 136, 102, 0.2);

  --accent:       #5b4de0;
  --accent-dim:   rgba(91, 77, 224, 0.1);

  --gold:         #b8860b;
  --gold-dim:     rgba(184, 134, 11, 0.1);

  --red:          #d6244d;
  --red-dim:      rgba(214, 36, 77, 0.1);
  --green:        #16a34a;
  --green-dim:    rgba(22, 163, 74, 0.08);
  --orange:       #c2610c;
  --orange-dim:   rgba(194, 97, 12, 0.1);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.12);
}

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
}

img, svg { display: block; max-width: 100%; }
button { cursor: pointer; background: none; border: none; font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { text-wrap: balance; line-height: 1.15; }
p, li { text-wrap: pretty; }

a, button, [role="button"] {
  transition: color var(--transition), background var(--transition),
              border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ─── HEADER ────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: 0 var(--space-8);
  height: 60px;
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.logo-mark {
  width: 32px;
  height: 32px;
  color: var(--neon);
  filter: drop-shadow(0 0 6px var(--neon));
}

.logo-text {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.logo-os {
  color: var(--neon);
}

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

.nav-link {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.nav-link:hover, .nav-link.active {
  color: var(--neon);
  background: var(--neon-dim);
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
  margin-left: auto;
}

.ai-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--gold);
  background: var(--gold-dim);
  border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
  border-radius: var(--radius-full, 9999px);
  padding: var(--space-1) var(--space-3);
  letter-spacing: 0.02em;
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.btn-ghost {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface-2);
}

/* ─── CONFESSION BAR ────────────────────────────────── */
.confession-bar {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}

.confession-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: var(--space-3) var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

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

.confession-text {
  flex: 1;
  color: var(--text-muted);
}

.confession-text strong { color: var(--accent); }

.confession-sub {
  color: var(--text-faint);
  font-style: italic;
}

.confession-right {
  margin-left: auto;
  flex-shrink: 0;
}

.blink-cursor {
  font-family: var(--font-mono);
  color: var(--neon);
  animation: blink 1s step-end infinite;
}

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

/* ─── MAIN ──────────────────────────────────────────── */
.main {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: var(--space-12) var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
}

/* ─── HERO ──────────────────────────────────────────── */
.hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  padding: var(--space-16) 0 var(--space-12);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 10% 50%, var(--neon-dim), transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--neon);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.terminal-prompt {
  color: var(--text-faint);
  user-select: none;
}

.hero-title {
  font-family: var(--font-mono);
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 16ch;
}

.hero-accent {
  color: var(--neon);
  text-shadow: 0 0 40px rgba(0, 255, 204, 0.3);
}

.hero-muted {
  color: var(--text-faint);
}

.hero-sub {
  max-width: 56ch;
  color: var(--text-muted);
  font-size: var(--text-base);
  line-height: 1.7;
}

.inline-code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-3);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--neon);
  color: #0a0b0d;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  box-shadow: var(--neon-glow);
}

.btn-primary:hover {
  box-shadow: 0 0 32px rgba(0, 255, 204, 0.5);
  transform: translateY(-1px);
}

.btn-outline {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--neon);
  color: var(--neon);
  background: var(--neon-dim);
}

.hero-meta {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.meta-chip {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full, 9999px);
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.meta-chip-ai {
  background: var(--gold-dim);
  color: var(--gold);
  border-color: color-mix(in srgb, var(--gold) 30%, transparent);
}

/* ─── KPI STRIP ─────────────────────────────────────── */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

@media (max-width: 900px) { .kpi-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .kpi-strip { grid-template-columns: 1fr; } }

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.kpi-card:hover {
  border-color: var(--neon);
  box-shadow: 0 0 24px rgba(0,255,204,0.08);
}

.kpi-card.kpi-highlight {
  border-color: var(--neon);
  background: color-mix(in srgb, var(--surface) 90%, var(--neon));
}

.kpi-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.kpi-icon { font-style: normal; }

.kpi-value {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--neon);
  line-height: 1;
  letter-spacing: -0.03em;
}

.kpi-unit {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--text);
  font-weight: 500;
}

.kpi-footnote {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-faint);
  margin-top: var(--space-1);
}

/* ─── PANEL (generic card) ──────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.panel-wide { grid-column: 1 / -1; }

.panel-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.panel-title {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
}

.panel-badge {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 2px 10px;
  border-radius: var(--radius-full, 9999px);
  letter-spacing: 0.03em;
}

.ai-badge-inline {
  color: var(--gold);
  background: var(--gold-dim);
  border-color: color-mix(in srgb, var(--gold) 30%, transparent);
}

.panel-sub {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: calc(-1 * var(--space-3));
}

.panel-footer-note {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-faint);
  border-top: 1px solid var(--border);
  padding-top: var(--space-4);
}

/* ─── GRID SECTION ──────────────────────────────────── */
.grid-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  scroll-margin-top: 72px;
}

@media (max-width: 860px) { .grid-section { grid-template-columns: 1fr; } }

/* ─── CLASS LIST ────────────────────────────────────── */
.class-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.class-item {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--surface-2);
  transition: border-color var(--transition), background var(--transition);
}

.class-item:hover {
  border-color: var(--neon);
  background: var(--neon-dim);
}

.class-icon { font-size: 1.1rem; text-align: center; }

.class-name {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text);
}

.class-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

.class-bar {
  width: 60px;
  height: 4px;
  border-radius: var(--radius-full, 9999px);
  background: var(--border);
  overflow: hidden;
  flex-shrink: 0;
}

.class-bar-fill {
  height: 100%;
  width: var(--fill, 50%);
  background: linear-gradient(90deg, var(--neon), var(--accent));
  border-radius: inherit;
}

/* ─── LOCATION TABLE ────────────────────────────────── */
.location-table {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.loc-header-row {
  display: grid;
  grid-template-columns: 1fr 0.6fr 0.9fr 0.7fr;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--surface-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}

.loc-row {
  display: grid;
  grid-template-columns: 1fr 0.6fr 0.9fr 0.7fr;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}

.loc-row:last-child { border-bottom: none; }
.loc-row:hover { background: var(--surface-2); }

.loc-city {
  font-size: var(--text-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.flag { font-style: normal; line-height: 1; }

.loc-pop, .loc-income {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.loc-status {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full, 9999px);
  text-align: center;
  letter-spacing: 0.03em;
}

.status-launch   { background: var(--green-dim);  color: var(--green);  border: 1px solid color-mix(in srgb, var(--green) 30%, transparent); }
.status-y2       { background: var(--accent-dim); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.status-priority { background: var(--gold-dim);   color: var(--gold);   border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); }

/* ─── REVENUE CHART ─────────────────────────────────── */
.revenue-section {
  scroll-margin-top: 72px;
}

.revenue-section .panel {
  gap: var(--space-6);
}

.rev-chart {
  position: relative;
  padding: var(--space-4) 0 var(--space-8);
}

.rev-bars {
  display: flex;
  align-items: flex-end;
  gap: var(--space-3);
  height: 200px;
}

.rev-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  height: 100%;
  position: relative;
  cursor: pointer;
}

.rev-bar-group::after {
  content: attr(data-year);
  position: absolute;
  bottom: -28px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-faint);
  font-weight: 600;
}

.rev-bar-group:hover .rev-bar {
  filter: brightness(1.3);
}

.rev-bar-group:hover::before {
  content: attr(data-rev) '\A' attr(data-users) ' users';
  white-space: pre;
  position: absolute;
  top: -58px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-3);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  white-space: nowrap;
  z-index: 10;
  box-shadow: var(--shadow-md);
  pointer-events: none;
}

.rev-bar-wrap {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  width: 100%;
}

.rev-bar {
  width: 100%;
  height: var(--h, 10%);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  background: var(--surface-3);
  transition: height 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter var(--transition);
}

.rev-bar-breakeven {
  background: linear-gradient(180deg, var(--gold) 0%, var(--orange) 100%);
  box-shadow: 0 0 12px rgba(240, 192, 64, 0.3);
}

.rev-bar-positive {
  background: linear-gradient(180deg, var(--neon) 0%, var(--accent) 100%);
  box-shadow: 0 0 8px rgba(0, 255, 204, 0.2);
}

.rev-breakeven-label {
  position: absolute;
  bottom: var(--space-3);
  left: calc(3 * (100% / 10) + 5px);
  right: calc(6 * (100% / 10) + 5px);
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--gold);
  border-top: 1px dashed color-mix(in srgb, var(--gold) 40%, transparent);
  padding-top: var(--space-1);
}

.rev-legend {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}

.rev-legend-item {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.rev-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.rev-dot-ramp      { background: var(--surface-3); border: 1px solid var(--border); }
.rev-dot-breakeven { background: var(--gold); }
.rev-dot-positive  { background: var(--neon); }

/* ─── SAUCE + MILESTONES ────────────────────────────── */
.sauce-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
}

@media (max-width: 860px) { .sauce-section { grid-template-columns: 1fr; } }

.sauce-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.sauce-item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--surface-2);
  transition: border-color var(--transition);
}

.sauce-item:hover {
  border-color: var(--accent);
}

.sauce-num {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-dim);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.sauce-title {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text);
  margin-bottom: var(--space-1);
}

.sauce-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── MILESTONES ────────────────────────────────────── */
.milestone-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.milestone-phase {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.milestone-phase-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: var(--radius-full, 9999px);
  display: inline-flex;
  width: fit-content;
}

.phase-build    { background: var(--neon-dim);   color: var(--neon);   border: 1px solid color-mix(in srgb, var(--neon) 30%, transparent); }
.phase-launch   { background: var(--accent-dim); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.phase-scale    { background: var(--gold-dim);   color: var(--gold);   border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); }
.phase-dominate { background: var(--red-dim);    color: var(--red);    border: 1px solid color-mix(in srgb, var(--red) 30%, transparent); }

.milestone-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-left: var(--space-4);
}

.milestone-item {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.ms-check {
  color: var(--green);
  font-family: var(--font-mono);
  font-weight: 800;
  flex-shrink: 0;
  line-height: 1.6;
}

.ms-pending {
  color: var(--text-faint);
  font-family: var(--font-mono);
  flex-shrink: 0;
  line-height: 1.6;
}

/* ─── COMPETITORS ───────────────────────────────────── */
.comp-section .panel {
  gap: var(--space-6);
}

.comp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}

@media (max-width: 860px) { .comp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .comp-grid { grid-template-columns: 1fr; } }

.comp-card {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: border-color var(--transition);
}

.comp-threat-low  { border-left: 3px solid var(--green);  }
.comp-threat-med  { border-left: 3px solid var(--gold);   }
.comp-threat-high { border-left: 3px solid var(--red);    }

.comp-name {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text);
}

.comp-price {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.comp-gap {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

.comp-verdict {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  margin-top: var(--space-2);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  width: fit-content;
}

.verdict-advantage { background: var(--green-dim);  color: var(--green); }
.verdict-watch     { background: var(--gold-dim);   color: var(--gold); }
.verdict-threat    { background: var(--red-dim);    color: var(--red); }

.comp-moat-note {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  line-height: 1.7;
  display: flex;
  gap: var(--space-3);
}

.comp-moat-note .terminal-prompt {
  flex-shrink: 0;
  line-height: 1.7;
}

.comp-moat-note strong { color: var(--neon); }

/* ─── TECH STACK ────────────────────────────────────── */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

@media (max-width: 860px) { .stack-grid { grid-template-columns: repeat(2, 1fr); } }

.stack-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  transition: border-color var(--transition);
}

.stack-item:hover {
  border-color: var(--neon);
}

.stack-layer {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stack-tech {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text);
}

.stack-cost {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--green);
  font-weight: 700;
}

.stack-note {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: var(--space-4);
  line-height: 1.6;
}

.stack-note strong { color: var(--neon); }

/* ─── FOOTER ────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-12) 0 var(--space-8);
}

.footer-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: 0 var(--space-8);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-10);
  align-items: start;
}

@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }

.robot-ascii {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--neon);
  line-height: 1.6;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  white-space: nowrap;
}

.footer-legal {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer-disclaimer {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 60ch;
}

.footer-disclaimer strong { color: var(--text); }

.footer-links {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-faint);
  display: flex;
  gap: var(--space-3);
}

/* ─── SPECIAL NAV TAB (used on both pages) ───────────── */
.nav-link-special {
  color: var(--gold) !important;
  background: var(--gold-dim) !important;
  border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent) !important;
}

.nav-link-special:hover,
.nav-link-special.active {
  background: color-mix(in srgb, var(--gold) 20%, transparent) !important;
  color: var(--gold) !important;
}

.nav-link-special-green {
  color: var(--accent) !important;
  background: rgba(0,255,204,0.07) !important;
  border: 1px solid rgba(0,255,204,0.25) !important;
}
.nav-link-special-green:hover {
  background: rgba(0,255,204,0.14) !important;
}
.nav-link-special2 {
  background: linear-gradient(135deg, #7c3aed, #4f46e5) !important;
  color: #fff !important;
  border: none !important;
  font-weight: 600 !important;
}
.nav-link-special2:hover { opacity: 0.85 !important; }

/* ======== NAV DROPDOWN (Explore ▾) ======== */
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
  background: rgba(0,255,204,0.08);
  border: 1px solid rgba(0,255,204,0.25);
  color: var(--neon);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
}
.nav-dropdown-btn:hover { background: rgba(0,255,204,0.15); }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #111316;
  border: 1px solid #2a2d35;
  border-radius: 10px;
  padding: 6px;
  min-width: 220px;
  z-index: 999;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { display: flex; flex-direction: column; gap: 2px; }
.nav-drop-item {
  padding: 9px 14px;
  border-radius: 7px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.15s ease;
  white-space: nowrap;
}
.nav-drop-item:hover { background: #1a1d22; }
.gold-item   { color: #f0c040; }
.green-item  { color: #00ffcc; }
.purple-item { color: #c77dff; }
.pro-item      { color: #a78bfa; font-weight: 700; }
.strategy-item { color: #00ffcc; font-weight: 700; }
.climate-item  { color: #ff6b6b; font-weight: 700; }

/* ─── ANCHOR SCROLL OFFSETS ─────────────────────────── */
#locations {
  scroll-margin-top: 72px;
}
