/* ==========================================================================
   TechWantToTree (TWT) — Modern Developer Climate Infrastructure Design System
   Aesthetic: Linear x Vercel x Stripe x Raycast
   ========================================================================== */

:root {
  /* Color Tokens */
  --bg-primary: #F8F8F5;          /* Warm neutral off-white background */
  --bg-surface: #FFFFFF;          /* Pure white card surface */
  --bg-subtle: #F1F2ED;           /* Secondary container background */
  --bg-dark: #11130F;             /* Deep charcoal developer console */
  --bg-dark-surface: #181B15;     /* Dark card surface */
  --bg-dark-subtle: #20241D;      /* Dark tertiary border/fill */
  
  --text-primary: #11130F;        /* Crisp dark primary text */
  --text-secondary: #5F665C;      /* Legible secondary muted grey-green */
  --text-tertiary: #8A9287;       /* Tertiary caption text */
  --text-dark-primary: #F5F6F3;   /* White text on dark surfaces */
  --text-dark-secondary: #9DA398; /* Muted text on dark surfaces */
  
  --border-light: #E5E7E2;        /* Crisp 1px borders */
  --border-subtle: #ECEEEA;       /* Inset dividers */
  --border-dark: #2A3025;         /* Borders in dark containers */
  
  /* Strategic Brand Accent Tokens */
  --brand-forest: #166534;        /* Deep trustworthy forest green */
  --brand-primary: #15803D;       /* Primary interactive green */
  --brand-leaf: #22C55E;          /* Active pulse / status green */
  --brand-bright: #4ADE80;        /* Accent highlight */
  --brand-earth: #D97706;         /* Secondary warm earth tone */
  --brand-purple: #7C3AED;        /* Staff badge */
  
  /* Status Colors */
  --status-verified: #15803D;
  --status-planted: #0284C7;
  --status-allocated: #D97706;
  --status-funded: #6B7280;
  
  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Geist Mono', SFMono-Regular, Menlo, monospace;
  
  /* Shadows & Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --shadow-subtle: 0 1px 2px rgba(17, 19, 15, 0.04), 0 1px 3px rgba(17, 19, 15, 0.02);
  --shadow-card: 0 4px 20px -2px rgba(17, 19, 15, 0.05), 0 2px 6px -1px rgba(17, 19, 15, 0.03);
  --shadow-pop: 0 20px 40px -15px rgba(17, 19, 15, 0.12);
  --shadow-glow: 0 0 24px rgba(34, 197, 94, 0.2);
  
  /* Layout Transitions */
  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 240ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset & Core Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Environment Banner */
.env-banner {
  background-color: #11130F;
  color: #9DA398;
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 6px 16px;
  border-bottom: 1px solid var(--border-dark);
}

.env-banner-content {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.env-badge {
  background-color: #22C55E22;
  color: #4ADE80;
  border: 1px solid #22C55E44;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.env-meta {
  color: #6B7168;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(248, 248, 245, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: border-color var(--transition-fast);
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: block;
}

.brand-text {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.brand-short-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 5px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  color: var(--text-secondary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-item {
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.nav-item:hover {
  color: var(--text-primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--text-primary);
}

.mobile-drawer {
  display: none;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border-light);
  background-color: var(--bg-surface);
}

.mobile-drawer.open {
  display: block;
}

.mobile-drawer-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mobile-drawer-inner a {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  padding: 6px 0;
}

.mobile-divider {
  border: 0;
  border-top: 1px solid var(--border-light);
  margin: 6px 0;
}

/* Reusable Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--text-primary);
  color: #FFFFFF;
  border-color: var(--text-primary);
}

.btn-primary:hover {
  background-color: #272C24;
  border-color: #272C24;
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-light);
  box-shadow: var(--shadow-subtle);
}

.btn-secondary:hover {
  background-color: var(--bg-subtle);
  border-color: #D3D7CF;
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background-color: rgba(0, 0, 0, 0.04);
}

.btn-ghost-dark {
  background-color: transparent;
  color: var(--text-dark-secondary);
  border: 1px solid var(--border-dark);
}

.btn-ghost-dark:hover {
  background-color: var(--bg-dark-subtle);
  color: #FFFFFF;
}

.btn-lg {
  padding: 12px 22px;
  font-size: 15px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
}

.btn-micro {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font-mono);
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-micro:hover {
  background: #E8ECE4;
}

.w-full {
  width: 100%;
}

.icon-xs { width: 14px; height: 14px; }
.icon-sm { width: 16px; height: 16px; }

/* 7. HERO SECTION */
.hero-section {
  padding: 64px 24px 32px;
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
}

.hero-container {
  text-align: center;
  max-width: 840px;
  margin: 0 auto;
}

.hero-badge-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-subtle);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brand-forest);
}

.status-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--brand-leaf);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
  animation: pulseAnim 2s infinite ease-in-out;
}

@keyframes pulseAnim {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero-headline {
  font-size: 58px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.headline-highlight {
  color: var(--brand-forest);
  position: relative;
  display: inline-block;
}

.hero-subtext {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-subclaim {
  font-size: 12.5px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.check-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sep {
  opacity: 0.5;
}

/* 8. HERO VISUAL - Interactive Node Graph */
.hero-graph-wrapper {
  margin-top: 48px;
  width: 100%;
}

.graph-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.graph-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-light);
  background-color: #FAFAF7;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.graph-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

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

.dot.red { background-color: #EF4444; }
.dot.yellow { background-color: #F59E0B; }
.dot.green { background-color: #10B981; }

.graph-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.node-graph-canvas {
  position: relative;
  height: 380px;
  width: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(248, 248, 245, 0.4) 0%, rgba(255, 255, 255, 1) 100%);
  overflow: hidden;
}

.graph-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pulse-flow {
  animation: flowStroke 2.5s infinite linear;
}

.pulse-flow-out {
  animation: flowStroke 1.8s infinite linear;
}

@keyframes flowStroke {
  from { stroke-dashoffset: 50; }
  to { stroke-dashoffset: 0; }
}

.graph-nodes {
  position: absolute;
  inset: 0;
  pointer-events: auto;
}

.node-box {
  position: absolute;
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-subtle);
  transition: all var(--transition-fast);
}

.node-box:hover {
  transform: translateY(-2px);
  border-color: #CCD0C7;
  box-shadow: var(--shadow-card);
}

.node-box.active-trigger {
  border-color: var(--brand-leaf);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.node-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}

.node-meta {
  display: flex;
  flex-direction: column;
}

.node-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.node-status {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
}

.text-green { color: var(--brand-primary) !important; }

/* Central Engine Box */
.node-box.node-engine {
  width: 250px;
  flex-direction: column;
  align-items: stretch;
  padding: 14px;
  background: #11130F;
  border: 1px solid var(--border-dark);
  color: #FFFFFF;
  box-shadow: var(--shadow-pop);
}

.engine-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.engine-badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brand-bright);
}

.engine-version {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dark-secondary);
}

.engine-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}

.engine-condition {
  background: var(--bg-dark-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  border: 1px solid #2B3125;
}

.condition-badge {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-dark-secondary);
  margin-bottom: 6px;
}

.condition-meter {
  height: 5px;
  background: #2D3327;
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 6px;
}

.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #16A34A, #4ADE80);
  transition: width 0.4s ease;
}

.condition-nums {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--text-dark-secondary);
}

.match-badge {
  background: rgba(34, 197, 94, 0.2);
  color: var(--brand-bright);
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
}

/* Impact & Verify Box */
.impact-badge-top {
  position: absolute;
  top: -9px;
  left: 12px;
  font-size: 9px;
  font-weight: 700;
  background: var(--brand-forest);
  color: #FFFFFF;
  padding: 1px 6px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

.impact-badge-top.verify {
  background: #1E293B;
}

.impact-icon {
  background: #DCFCE7;
  color: var(--brand-forest);
}

.verify-icon {
  background: #E2E8F0;
  color: #334155;
}

.graph-footer {
  padding: 10px 20px;
  background: #FAFAF7;
  border-top: 1px solid var(--border-light);
}

.event-stream-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.stream-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--brand-leaf);
}

/* 9. LIVE IMPACT COUNTER */
.impact-ticker-band {
  margin-top: 24px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
}

.ticker-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 20px;
}

.ticker-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.stat-num {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.ticker-divider {
  width: 1px;
  height: 36px;
  background-color: var(--border-light);
}

/* 10. TRUST BAR */
.trust-bar-section {
  padding: 40px 24px;
  border-bottom: 1px solid var(--border-light);
}

.trust-container {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.trust-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  text-transform: uppercase;
  margin-bottom: 24px;
  display: block;
}

.trust-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  opacity: 0.75;
  transition: opacity var(--transition-fast);
}

.trust-item:hover {
  opacity: 1;
}

/* SECTION CONTAINER COMMONS */
.section-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 80px 24px;
  width: 100%;
}

.section-header-compact {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-tag {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brand-forest);
  margin-bottom: 8px;
  display: inline-block;
}

.section-title {
  font-size: 36px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.section-desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* 11. PRODUCT EXPLANATION (Three Steps Grid) */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
}

.step-card:hover {
  border-color: #D3D7CF;
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.step-card.highlight-step {
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: var(--shadow-glow);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-forest);
  margin-bottom: 16px;
}

.step-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background-color: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.step-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.step-text {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}

.step-footer-meta {
  font-size: 12px;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

/* 12. INTERACTIVE RULE BUILDER */
.rule-builder-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.rb-toolbar {
  padding: 14px 24px;
  background-color: #FAFAF7;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.rb-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rb-filename {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.rb-tag {
  font-size: 10px;
  font-weight: 700;
  background-color: #DCFCE7;
  color: var(--brand-forest);
  padding: 2px 6px;
  border-radius: 4px;
}

.rb-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.preset-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.preset-chip.active, .preset-chip:hover {
  background: var(--text-primary);
  color: #FFFFFF;
  border-color: var(--text-primary);
}

.rb-body {
  padding: 32px 28px;
}

.rule-syntax-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.token-clause {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-tertiary);
  letter-spacing: 0.05em;
  min-width: 50px;
}

.token-clause.then-token {
  color: var(--brand-forest);
}

.token-select-wrap select, .token-input-wrap input {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background-color: var(--bg-subtle);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.token-select-wrap select:focus, .token-input-wrap input:focus {
  border-color: var(--text-primary);
  background-color: #FFFFFF;
}

.token-input-wrap input {
  width: 90px;
  text-align: center;
}

.token-input-wrap.small input {
  width: 70px;
}

.token-unit {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
}

.rule-evaluated-box {
  margin-top: 28px;
  background-color: #FAFAF7;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.eval-left {
  max-width: 550px;
}

.eval-eyebrow {
  font-size: 10.5px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--brand-forest);
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.eval-human-string {
  font-size: 15.5px;
  color: var(--text-primary);
  line-height: 1.5;
}

.eval-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.eval-stat {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.eval-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--brand-forest);
}

.eval-sub {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* 13. DEVELOPER EXPERIENCE SECTION (Dark Section) */
.dev-section {
  background-color: var(--bg-dark);
  color: var(--text-dark-primary);
  padding: 80px 0;
}

.section-header-dark {
  max-width: 720px;
  margin-bottom: 40px;
}

.section-tag-dark {
  font-size: 11.5px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--brand-bright);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  display: inline-block;
}

.section-title-dark {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  color: #FFFFFF;
}

.section-desc-dark {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark-secondary);
}

.code-editor-container {
  background-color: var(--bg-dark-surface);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-pop);
}

.editor-header {
  padding: 12px 20px;
  background-color: var(--bg-dark-subtle);
  border-bottom: 1px solid var(--border-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.editor-tabs {
  display: flex;
  gap: 4px;
}

.editor-tab {
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-dark-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.editor-tab.active, .editor-tab:hover {
  background-color: #272D22;
  color: #FFFFFF;
}

.editor-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.endpoint-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #4ADE80;
  background: rgba(34, 197, 94, 0.1);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.btn-copy-code {
  background: transparent;
  border: 1px solid var(--border-dark);
  color: var(--text-dark-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-copy-code:hover {
  background: var(--bg-dark-subtle);
  color: #FFFFFF;
}

.editor-body {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  border-bottom: 1px solid var(--border-dark);
}

.code-column {
  padding: 20px 24px;
}

.response-column {
  background-color: #141712;
  border-left: 1px solid var(--border-dark);
}

.pane-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dark-secondary);
  margin-bottom: 12px;
}

.response-label {
  color: #4ADE80;
}

.code-snippet {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: #E2E8F0;
  white-space: pre-wrap;
  word-break: break-all;
}

.response-snippet code {
  color: #CBD5E1;
}

.editor-footer {
  padding: 12px 20px;
  background-color: var(--bg-dark-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.doc-link-text {
  font-size: 12.5px;
  color: var(--text-dark-secondary);
}

.doc-link-text a {
  color: var(--brand-bright);
  text-decoration: none;
}

/* 14. ARCHITECTURE VISUALIZATION */
.arch-flow-diagram {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.arch-column {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.arch-col-header {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.arch-node {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.arch-node:hover, .arch-node.active {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-subtle);
  transform: translateY(-2px);
}

.arch-node-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.arch-node-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.arch-connector {
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.arch-inspector-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.inspector-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 3px 6px;
  border-radius: 4px;
  color: var(--brand-forest);
}

.inspector-text {
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* 15. IMPACT TRANSPARENCY & TRUST MODEL */
.trust-stages-bar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.trust-stage-card {
  flex: 1;
  min-width: 220px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
}

.trust-stage-card.highlight {
  border-color: var(--brand-leaf);
  box-shadow: var(--shadow-glow);
}

.ts-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  align-self: flex-start;
  margin-bottom: 12px;
}

.ts-funded { background: #F3F4F6; color: #4B5563; }
.ts-allocated { background: #FEF3C7; color: #92400E; }
.ts-planted { background: #E0F2FE; color: #0369A1; }
.ts-verified { background: #DCFCE7; color: #15803D; }

.ts-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.ts-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

.ts-sla {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}

.trust-stage-arrow {
  display: flex;
  align-items: center;
  color: var(--text-tertiary);
  font-weight: bold;
}

/* 16 & 17. IMPACT MAP & RESTORATION SITES */
.interactive-map-card {
  background-color: #11130F;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.map-viewport {
  position: relative;
  height: 480px;
  width: 100%;
}

.world-svg {
  width: 100%;
  height: 100%;
  background-color: #11130F;
}

.map-continent {
  fill: #1C2018;
  stroke: #2A3025;
  stroke-width: 1;
  transition: fill var(--transition-fast);
}

.map-continent:hover {
  fill: #24291F;
}

.ping-circle {
  fill: rgba(34, 197, 94, 0.18);
  animation: pingMap 2.2s infinite ease-out;
  transform-origin: center;
}

@keyframes pingMap {
  0% { r: 6; opacity: 1; }
  100% { r: 24; opacity: 0; }
}

.pin-dot {
  fill: #22C55E;
  stroke: #FFFFFF;
  stroke-width: 1.5;
  transition: all var(--transition-fast);
}

.pin-dot:hover, .pin-dot.active {
  fill: #4ADE80;
  stroke-width: 2.5;
}

.pin-label {
  fill: #E2E8F0;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
}

/* Map Flyout Pane */
.map-detail-card {
  position: absolute;
  right: 20px;
  bottom: 20px;
  top: 20px;
  width: 380px;
  background: rgba(24, 27, 21, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 24px;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-pop);
  overflow-y: auto;
}

.mdc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.mdc-badge.verified {
  background: rgba(34, 197, 94, 0.2);
  color: #4ADE80;
}

.mdc-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}

.mdc-sub {
  font-size: 11.5px;
  font-family: var(--font-mono);
  color: var(--text-dark-secondary);
  margin-bottom: 16px;
}

.mdc-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  background: var(--bg-dark-subtle);
  border: 1px solid var(--border-dark);
  padding: 12px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
}

.mdc-stat {
  display: flex;
  flex-direction: column;
}

.mdc-stat .val {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
}

.mdc-stat .lbl {
  font-size: 10px;
  color: var(--text-dark-secondary);
}

.mdc-timeline {
  margin-bottom: 18px;
  flex-grow: 1;
}

.tl-title {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--text-dark-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.tl-item {
  font-size: 11.5px;
  color: var(--text-dark-secondary);
  padding: 4px 0;
  border-left: 2px solid var(--border-dark);
  padding-left: 10px;
  margin-left: 4px;
}

.tl-item.complete {
  border-left-color: #22C55E;
  color: #E2E8F0;
  font-weight: 600;
}

.tl-date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #8A9287;
  margin-right: 4px;
}

.mdc-actions {
  display: flex;
  gap: 8px;
}

/* 28 & 29. PRICING & IMPACT ECONOMICS */
.economics-callout {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-subtle);
}

.econ-col {
  min-width: 220px;
}

.econ-pill {
  font-size: 10.5px;
  font-family: var(--font-mono);
  font-weight: 700;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--brand-forest);
}

.econ-total {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 8px;
}

.econ-period {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.econ-sub {
  font-size: 12px;
  color: var(--text-tertiary);
}

.econ-breakdown {
  flex-grow: 1;
  max-width: 650px;
}

.eb-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border-subtle);
}

.eb-val {
  font-family: var(--font-mono);
  font-weight: 700;
}

.font-green { color: var(--brand-forest) !important; }
.font-muted { color: var(--text-tertiary) !important; }

.eb-note {
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-top: 8px;
}

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

.pricing-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-fast);
}

.pricing-card:hover {
  transform: translateY(-2px);
  border-color: #D3D7CF;
}

.pricing-card.featured {
  border-color: var(--brand-forest);
  box-shadow: var(--shadow-card);
}

.pc-featured-badge {
  position: absolute;
  top: -10px;
  left: 20px;
  background-color: var(--brand-forest);
  color: #FFFFFF;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 4px;
}

.pc-tier {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.pc-price {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
}

.pc-price span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.pc-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
  min-height: 40px;
}

.pc-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  flex-grow: 1;
}

.pc-features li {
  font-size: 12.5px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pc-features li i {
  color: var(--brand-forest);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* 30 & 31. PUBLIC PROFILE BADGE SHOWCASE */
.badge-showcase-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
}

.badge-preview-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.live-badge-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-pill-rendered {
  background-color: #11130F;
  color: #FFFFFF;
  padding: 8px 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-subtle);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.badge-pill-rendered:hover {
  transform: translateY(-1px);
}

.badge-icon-part {
  color: #4ADE80;
  display: flex;
  align-items: center;
}

.badge-text-part {
  display: flex;
  flex-direction: column;
  font-size: 12px;
}

.badge-brand {
  font-weight: 700;
  font-size: 12.5px;
}

.badge-sub {
  font-size: 11px;
  color: #9DA398;
}

.badge-sub strong {
  color: #4ADE80;
}

.badge-arrow-part {
  color: #9DA398;
}

.badge-preview-alt {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.compact-badge-mock {
  display: inline-flex;
  font-family: var(--font-mono);
  font-size: 11px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}

.cbm-label {
  background: #272C24;
  color: #FFFFFF;
  padding: 3px 7px;
}

.cbm-val {
  background: var(--bg-surface);
  color: var(--text-primary);
  padding: 3px 7px;
}

.cbm-val.green {
  background: #15803D;
  color: #FFFFFF;
}

.badge-code-column {
  background: #FAFAF7;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.snippet-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.s-tab {
  background: transparent;
  border: none;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
}

.s-tab.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  font-weight: 600;
}

.snippet-pre {
  background: #11130F;
  color: #F5F6F3;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  overflow-x: auto;
  margin-bottom: 14px;
  flex-grow: 1;
}

.snippet-actions {
  display: flex;
  gap: 10px;
}

/* 51. FAQ */
.faq-list {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.faq-question {
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-icon {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  transition: transform var(--transition-fast);
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 52. FINAL CTA */
.final-cta-section {
  padding: 60px 24px 100px;
}

.final-cta-card {
  background-color: #11130F;
  border-radius: var(--radius-xl);
  padding: 64px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
  color: #FFFFFF;
  box-shadow: var(--shadow-pop);
}

.cta-mesh-pattern {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 100%, rgba(34, 197, 94, 0.22) 0%, transparent 60%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
}

.cta-headline {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.cta-sub {
  font-size: 17px;
  color: var(--text-dark-secondary);
  line-height: 1.5;
  margin-bottom: 28px;
}

.cta-btns {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.cta-trust-note {
  font-size: 12px;
  color: #71776D;
  font-family: var(--font-mono);
}

/* 53. FOOTER */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-light);
  padding: 60px 24px 32px;
  margin-top: auto;
}

.footer-container {
  max-width: 1240px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.footer-tagline {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 340px;
  margin-bottom: 18px;
}

.footer-badge-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--brand-forest);
}

.footer-col h4 {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  text-decoration: none;
  font-size: 13px;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-bottom-bar {
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-tertiary);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links-inline {
  display: flex;
  gap: 8px;
}

/* ==========================================================================
   AUTHENTICATED DASHBOARD STYLES (Phase 2 & Customer Console)
   ========================================================================== */
.view-hidden { display: none !important; }
.view-active { display: block; }

.dash-layout {
  display: flex;
  min-height: calc(100vh - 80px);
  background-color: var(--bg-primary);
}

.dash-sidebar {
  width: 250px;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-top {
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.workspace-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.workspace-switch:hover {
  background: var(--bg-subtle);
}

.ws-logo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--text-primary);
  color: #FFFFFF;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ws-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.ws-name {
  font-size: 13.5px;
  font-weight: 700;
}

.ws-tier {
  font-size: 11px;
  color: var(--text-tertiary);
}

.sidebar-nav {
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
  overflow-y: auto;
}

.nav-group-label {
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  padding: 10px 10px 4px;
  letter-spacing: 0.05em;
}

.s-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.s-nav-item:hover {
  color: var(--text-primary);
  background-color: var(--bg-subtle);
}

.s-nav-item.active {
  color: var(--text-primary);
  background-color: var(--bg-subtle);
  font-weight: 700;
}

.s-nav-item i {
  width: 16px;
  height: 16px;
}

.s-pill {
  margin-left: auto;
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.s-pill.green {
  background: #DCFCE7;
  border-color: #86EFAC;
  color: var(--brand-forest);
}

.s-pill.purple {
  background: #EDE9FE;
  border-color: #DDD6FE;
  color: var(--brand-purple);
}

.sidebar-bottom {
  padding: 14px;
  border-top: 1px solid var(--border-subtle);
}

.user-profile-strip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.u-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #E2E8F0;
  color: #334155;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.u-meta {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.u-name {
  font-size: 13px;
  font-weight: 700;
}

.u-email {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* Dashboard Topbar & Main */
.dash-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.dash-topbar {
  height: 56px;
  border-bottom: 1px solid var(--border-light);
  background-color: var(--bg-surface);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.search-command-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  font-size: 12.5px;
  color: var(--text-secondary);
  cursor: pointer;
  min-width: 260px;
}

.search-command-input code {
  font-family: var(--font-mono);
  font-size: 10px;
  background: #E2E5DF;
  padding: 1px 4px;
  border-radius: 3px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
}

.sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-leaf);
}

/* Dashboard Tabs */
.dash-tab-pane {
  display: none;
  padding: 24px;
  flex-grow: 1;
}

.dash-tab-pane.active {
  display: block;
}

.dash-container {
  max-width: 1160px;
  margin: 0 auto;
}

.dash-greeting-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-subtle);
}

.dgc-eyebrow {
  font-size: 10.5px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--brand-forest);
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.dgc-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}

.dgc-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
}

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

.d-metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-subtle);
}

.dm-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.dm-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.dm-icon {
  width: 18px;
  height: 18px;
  color: var(--text-tertiary);
}

.dm-icon.green { color: var(--brand-forest); }

.dm-val {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.dm-trend {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.dm-trend.up {
  color: var(--brand-forest);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dash-split-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

.dash-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-subtle);
}

.dc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dc-title {
  font-size: 15px;
  font-weight: 700;
}

.badge-mini {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}

.badge-mini.green {
  background: #DCFCE7;
  border-color: #86EFAC;
  color: var(--brand-forest);
}

.badge-mini.purple {
  background: #EDE9FE;
  border-color: #DDD6FE;
  color: var(--brand-purple);
}

.chart-canvas-wrap {
  position: relative;
  height: 260px;
  width: 100%;
}

.recent-events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
}

.mer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mer-event {
  font-family: var(--font-mono);
  font-weight: 600;
}

.mer-proj {
  color: var(--text-tertiary);
  font-size: 11px;
}

.mer-impact {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--brand-forest);
}

.mer-time {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* Page Common Header in Dashboard */
.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title {
  font-size: 24px;
  font-weight: 800;
}

.page-sub {
  font-size: 13.5px;
  color: var(--text-secondary);
}

.page-actions {
  display: flex;
  gap: 8px;
}

/* Data Tables */
.table-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.tf-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  flex-grow: 1;
  max-width: 360px;
}

.tf-search input {
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 13px;
  width: 100%;
}

.tf-selects {
  display: flex;
  gap: 8px;
}

.tf-selects select {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
}

.table-responsive {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-subtle);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.data-table th {
  background: #FAFAF7;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  white-space: nowrap;
}

.data-table tr:hover td {
  background: #FAFAF8;
}

.code-pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: 4px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.status-verified { background: #DCFCE7; color: #15803D; }
.status-planted { background: #E0F2FE; color: #0369A1; }
.status-allocated { background: #FEF3C7; color: #92400E; }
.status-funded { background: #F3F4F6; color: #4B5563; }

/* Rules Cards Grid */
.rules-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.automation-rule-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
}

.arc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.arc-title {
  font-size: 16px;
  font-weight: 700;
}

.arc-logic-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  font-size: 13.5px;
  margin-bottom: 14px;
  line-height: 1.4;
}

.arc-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
  font-family: var(--font-mono);
}

.arc-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

/* Integrations Grid */
.integrations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.integration-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-subtle);
}

.ic-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.ic-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ic-name {
  font-size: 15px;
  font-weight: 700;
}

.ic-status {
  font-size: 11px;
  font-family: var(--font-mono);
}

.ic-status.connected { color: var(--brand-forest); font-weight: 600; }
.ic-status.disconnected { color: var(--text-tertiary); }

.ic-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  flex-grow: 1;
}

.ic-stats {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
  margin-bottom: 14px;
}

/* Simulator Layout */
.simulator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.sim-left-card, .sim-right-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
}

.sim-card-header {
  padding: 12px 18px;
  background: #FAFAF7;
  border-bottom: 1px solid var(--border-light);
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sim-body {
  padding: 20px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  font-family: var(--font-sans);
  font-size: 13.5px;
  outline: none;
}

.form-control:focus {
  border-color: var(--text-primary);
  background: #FFFFFF;
}

.code-font {
  font-family: var(--font-mono) !important;
  font-size: 12px !important;
}

.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-1 { margin-bottom: 4px; }
.mb-3 { margin-bottom: 12px; }

.sim-status-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
}

.sim-output-body {
  padding: 20px;
  min-height: 380px;
  background: #11130F;
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 12px;
}

.sim-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 320px;
  text-align: center;
  color: var(--text-dark-secondary);
}

.sim-empty-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  opacity: 0.6;
}

/* API Keys */
.api-keys-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.key-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.key-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.key-actions {
  display: flex;
  gap: 6px;
}

/* Admin queue */
.admin-verification-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-subtle);
}

.avc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.avc-title {
  font-size: 16px;
  font-weight: 700;
}

.admin-queue-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.queue-item {
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.qi-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.qi-batch {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--brand-forest);
}

.qi-name {
  font-size: 14px;
  font-weight: 700;
}

.qi-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.qi-actions {
  display: flex;
  gap: 8px;
}

/* ==========================================================================
   PUBLIC IMPACT PROFILE VIEW (Phase 5)
   ========================================================================== */
.public-profile-layout {
  min-height: calc(100vh - 80px);
  background: var(--bg-primary);
  padding-bottom: 80px;
}

.public-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  padding: 20px 0 40px;
}

.pub-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 36px;
}

.pub-hero-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pub-org-header {
  display: flex;
  align-items: center;
  gap: 20px;
}

.pub-org-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: #11130F;
  color: #FFFFFF;
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pub-org-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pub-verified-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--brand-forest);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pub-org-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.pub-org-bio {
  font-size: 14.5px;
  color: var(--text-secondary);
  max-width: 620px;
}

.pub-url-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
}

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

.pub-stat-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.pub-stat-box .val {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.pub-stat-box .lbl {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.pub-content-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}

.pub-projects-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pub-proj-card {
  border: 1px solid var(--border-light);
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.ppc-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.ppc-header h4 {
  font-size: 15px;
  font-weight: 700;
}

.ppc-stats {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

/* ==========================================================================
   DEVELOPER DOCUMENTATION VIEW (Phase 6)
   ========================================================================== */
.docs-layout {
  display: flex;
  min-height: calc(100vh - 80px);
  background: var(--bg-surface);
}

.docs-sidebar {
  width: 280px;
  border-right: 1px solid var(--border-light);
  padding: 24px 16px;
  flex-shrink: 0;
}

.docs-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-bottom: 24px;
}

.docs-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  width: 100%;
}

.d-nav-title {
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  margin: 16px 8px 6px;
  letter-spacing: 0.05em;
}

.d-nav-link {
  display: block;
  padding: 6px 10px;
  font-size: 13.5px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.d-nav-link:hover, .d-nav-link.active {
  background: var(--bg-subtle);
  color: var(--text-primary);
  font-weight: 600;
}

.docs-content {
  flex-grow: 1;
  padding: 48px;
  max-width: 880px;
  line-height: 1.65;
}

.docs-article h1 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.docs-article h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 32px 0 12px;
}

.docs-article p {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 16px;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 19, 15, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  animation: modalEnter 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-box.modal-lg {
  max-width: 720px;
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-head {
  padding: 16px 22px;
  background: #FAFAF7;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title-group h3 {
  font-size: 16px;
  font-weight: 700;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-tertiary);
  cursor: pointer;
}

.modal-content {
  padding: 22px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-foot {
  padding: 14px 22px;
  background: #FAFAF7;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-col {
  flex: 1;
}

/* Toast System */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #11130F;
  color: #FFFFFF;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  box-shadow: var(--shadow-pop);
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border-dark);
  animation: toastIn 0.2s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Rules */
@media (max-width: 1024px) {
  .hero-headline { font-size: 46px; }
  .steps-grid, .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .badge-showcase-card { grid-template-columns: 1fr; }
  .editor-body { grid-template-columns: 1fr; }
  .response-column { border-left: none; border-top: 1px solid var(--border-dark); }
  .dash-metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-split-grid { grid-template-columns: 1fr; }
  .integrations-grid { grid-template-columns: repeat(2, 1fr); }
  .simulator-layout { grid-template-columns: 1fr; }
  .pub-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .pub-content-grid { grid-template-columns: 1fr; }
  .map-detail-card { position: static; width: 100%; border-radius: 0; }
  .map-viewport { height: auto; }
}

@media (max-width: 768px) {
  .nav-links, .nav-right .btn-ghost { display: none; }
  .mobile-toggle { display: block; }
  .hero-headline { font-size: 34px; }
  .hero-subtext { font-size: 16px; }
  .steps-grid, .pricing-grid, .rules-card-grid, .integrations-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .dash-layout { flex-direction: column; }
  .dash-sidebar { width: 100%; }
  .docs-layout { flex-direction: column; }
  .docs-sidebar { width: 100%; }
}
