:root {
  --bg-primary: #0a0e14;
  --bg-surface: #121820;
  --bg-surface-elevated: #1a222d;
  --bg-surface-hover: #222d3b;
  --text-primary: #f0f4f8;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-orca: #f43f5e;
  --accent-whale: #06b6d4;
  --accent-bot: #eab308;
  --accent-fish: #8b5cf6;
  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-focus: rgba(244, 63, 94, 0.4);
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.35);
  --max-width: 1080px;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--accent-orca);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 20px;
}

.shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 80px 24px;
}

/* TOPBAR */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0 32px 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 48px;
}

.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(244, 63, 94, 0.1);
  color: var(--accent-orca);
  border: 1px solid rgba(244, 63, 94, 0.25);
  padding: 4px 12px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lang-switch {
  display: flex;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.lang-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.lang-link:hover {
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.lang-link.active {
  color: #fff;
  background: var(--bg-surface-elevated);
  border-color: var(--border-subtle);
  font-weight: 600;
}

/* HERO */
.hero {
  margin-bottom: 56px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: #ffffff;
}

.standfirst {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 880px;
  margin-bottom: 40px;
}

/* LEAD STATS */
.lead-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 64px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease;
}

.stat-card:hover {
  border-color: rgba(148, 163, 184, 0.3);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-card:nth-child(1) .stat-value { color: var(--accent-whale); }
.stat-card:nth-child(2) .stat-value { color: var(--accent-orca); }
.stat-card:nth-child(3) .stat-value { color: var(--accent-bot); }
.stat-card:nth-child(4) .stat-value { color: var(--accent-fish); }

.stat-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* SECTION BASICS */
.section {
  margin-bottom: 72px;
}

.section-header {
  margin-bottom: 28px;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-orca);
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 600;
  color: #ffffff;
  line-height: 1.25;
}

.prose-block {
  max-width: 820px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.prose-block p {
  margin-bottom: 16px;
}

/* TAXONOMY / WALLET EXPLORER */
.taxonomy-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.tab-button {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-button:hover {
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
}

.tab-button.active[data-tier="orcas"] {
  background: rgba(244, 63, 94, 0.15);
  border-color: var(--accent-orca);
  color: #fff;
}

.tab-button.active[data-tier="whales"] {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-whale);
  color: #fff;
}

.tab-button.active[data-tier="bots"] {
  background: rgba(234, 179, 8, 0.15);
  border-color: var(--accent-bot);
  color: #fff;
}

.tab-button.active[data-tier="small-fish"] {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--accent-fish);
  color: #fff;
}

.tier-detail-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-subtle);
}

.tier-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.tier-metric-item {
  display: flex;
  flex-direction: column;
}

.tier-metric-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}

.tier-metric-value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
}

.tier-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* PROFIT VS WALLET SHARE VISUAL */
.comparison-bar-container {
  margin-top: 28px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-md);
  padding: 20px;
}

.comp-row {
  margin-bottom: 16px;
}

.comp-row:last-child {
  margin-bottom: 0;
}

.comp-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.comp-track {
  height: 24px;
  background: var(--bg-surface);
  border-radius: 4px;
  display: flex;
  overflow: hidden;
}

.comp-segment {
  height: 100%;
  transition: width 0.3s ease;
  position: relative;
}

.seg-orcas { background: var(--accent-orca); }
.seg-whales { background: var(--accent-whale); }
.seg-bots { background: var(--accent-bot); }
.seg-fish { background: var(--accent-fish); }

/* TIMELINE / CASCADES */
.cascade-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.cascade-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.cascade-summary {
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-bottom: 28px;
  padding-left: 16px;
  border-left: 3px solid var(--accent-orca);
}

.timeline-steps {
  position: relative;
  padding-left: 28px;
}

.timeline-steps::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 6px;
  width: 2px;
  background: var(--border-subtle);
}

.timeline-step {
  position: relative;
  margin-bottom: 24px;
}

.timeline-step:last-child {
  margin-bottom: 0;
}

.step-marker {
  position: absolute;
  left: -28px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--accent-orca);
}

.step-time {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-whale);
  font-weight: 600;
  margin-bottom: 2px;
}

.step-actor {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.step-action {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* MONEY TRAIL DIAGRAM */
.flow-diagram-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.flow-card {
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-md);
  padding: 20px;
  border: 1px solid var(--border-subtle);
}

.flow-card-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-orca);
  font-weight: 700;
  margin-bottom: 6px;
}

.flow-card-title {
  font-weight: 600;
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.flow-card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* INFERENCES & GUARDRAILS */
.inference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.inference-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.inference-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.badge-fact { background: rgba(6, 182, 212, 0.15); color: var(--accent-whale); border: 1px solid rgba(6, 182, 212, 0.3); }
.badge-inference { background: rgba(244, 63, 94, 0.15); color: var(--accent-orca); border: 1px solid rgba(244, 63, 94, 0.3); }
.badge-mechanism { background: rgba(234, 179, 8, 0.15); color: var(--accent-bot); border: 1px solid rgba(234, 179, 8, 0.3); }
.badge-risk { background: rgba(139, 92, 246, 0.15); color: var(--accent-fish); border: 1px solid rgba(139, 92, 246, 0.3); }

.inference-claim {
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}

.inference-detail {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
  flex-grow: 1;
}

.inference-counter {
  background: var(--bg-surface-elevated);
  border-left: 3px solid var(--text-muted);
  padding: 10px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.counter-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 2px;
}

/* POLICY GRID */
.policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.policy-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
}

.policy-num {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-orca);
  margin-bottom: 8px;
}

.policy-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

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

/* FOOTER / COLOPHON */
.colophon {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.colophon details {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.colophon summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-secondary);
}

.colophon-body {
  padding-top: 16px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.footer-nav {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.footer-link {
  color: var(--accent-orca);
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .shell {
    padding: 0 16px 40px 16px;
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .tier-detail-card, .cascade-wrapper, .flow-diagram-container {
    padding: 20px;
  }
}
