/* ============================================================================
   PoolGuard — Grok Bot Usage Optimizer Design System
   Precision Swiss-editorial engineering aesthetic (Light & Dark HSL tokens)
   ============================================================================ */

:root {
  --bg-page: hsl(40, 20%, 97%);
  --surface-card: hsl(0, 0%, 100%);
  --surface-subtle: hsl(38, 16%, 94%);
  --surface-canvas: hsl(0, 0%, 100%);
  --surface-elevated: hsl(0, 0%, 100%);

  --border-subtle: hsl(34, 12%, 88%);
  --border-strong: hsl(34, 10%, 78%);

  --text-primary: hsl(220, 24%, 12%);
  --text-secondary: hsl(218, 14%, 34%);
  --text-muted: hsl(218, 10%, 48%);

  --accent-teal: hsl(168, 76%, 30%);
  --accent-teal-soft: hsl(168, 60%, 94%);
  --accent-teal-ink: hsl(168, 82%, 22%);

  --accent-burn: hsl(350, 78%, 48%);
  --accent-burn-soft: hsl(350, 82%, 95%);
  --accent-burn-ink: hsl(350, 80%, 36%);

  --accent-amber: hsl(34, 88%, 42%);
  --accent-amber-soft: hsl(38, 92%, 93%);
  --accent-amber-ink: hsl(30, 86%, 30%);

  --accent-cobalt: hsl(216, 76%, 48%);
  --accent-cobalt-soft: hsl(216, 82%, 95%);

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 8px 24px -8px rgba(15, 23, 42, 0.08), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 44px -16px rgba(15, 23, 42, 0.16);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

[data-theme="dark"] {
  --bg-page: hsl(220, 14%, 9%);
  --surface-card: hsl(220, 13%, 12%);
  --surface-subtle: hsl(220, 12%, 16%);
  --surface-canvas: hsl(220, 13%, 11%);
  --surface-elevated: hsl(220, 13%, 15%);

  --border-subtle: hsl(220, 10%, 21%);
  --border-strong: hsl(220, 10%, 30%);

  --text-primary: hsl(210, 20%, 95%);
  --text-secondary: hsl(214, 14%, 76%);
  --text-muted: hsl(215, 11%, 56%);

  --accent-teal: hsl(166, 72%, 46%);
  --accent-teal-soft: hsla(166, 72%, 46%, 0.14);
  --accent-teal-ink: hsl(166, 74%, 66%);

  --accent-burn: hsl(351, 86%, 64%);
  --accent-burn-soft: hsla(351, 86%, 64%, 0.15);
  --accent-burn-ink: hsl(351, 90%, 76%);

  --accent-amber: hsl(38, 92%, 56%);
  --accent-amber-soft: hsla(38, 92%, 56%, 0.15);
  --accent-amber-ink: hsl(38, 94%, 72%);

  --accent-cobalt: hsl(213, 90%, 66%);
  --accent-cobalt-soft: hsla(213, 90%, 66%, 0.15);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 28px -10px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 48px -14px rgba(0, 0, 0, 0.6);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-primary);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ============================================================================
   Header & Navigation
   ============================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg-page) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

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

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--text-primary);
  color: var(--bg-page);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.04em;
}

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

.brand-sub {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.1;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-subtle);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow-x: auto;
  max-width: 100%;
}

.nav-tab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

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

.nav-tab.active {
  background: var(--surface-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Plan switcher pill (Free / Pro Preview) */
.plan-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--surface-card);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.plan-switch:hover {
  border-color: var(--border-strong);
}

.plan-switch.is-pro {
  background: var(--accent-teal-soft);
  border-color: var(--accent-teal);
  color: var(--accent-teal-ink);
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--surface-card);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.icon-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.icon-btn:active {
  transform: scale(0.96);
}

/* ============================================================================
   Live Shared Weekly Pool Telemetry Bar
   ============================================================================ */
.telemetry-strip {
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-subtle);
}

.telemetry-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
}

.telemetry-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.telemetry-pct {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.telemetry-pct.healthy { color: var(--accent-teal); }
.telemetry-pct.warning { color: var(--accent-amber); }
.telemetry-pct.exhausted { color: var(--accent-burn); }

.telemetry-caption {
  font-size: 12px;
  color: var(--text-muted);
}

.pool-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pool-bar-track {
  position: relative;
  height: 10px;
  background: var(--surface-subtle);
  border-radius: 999px;
  overflow: hidden;
  display: flex;
}

.pool-seg {
  height: 100%;
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.25s ease;
}

.pool-seg-chat { background: var(--accent-cobalt); }
.pool-seg-cursor { background: hsl(215, 20%, 62%); }
.pool-seg-bots.healthy { background: var(--accent-teal); }
.pool-seg-bots.warning { background: var(--accent-amber); }
.pool-seg-bots.exhausted { background: var(--accent-burn); }

.pool-marker-80 {
  position: absolute;
  left: 80%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent-amber);
  z-index: 2;
}

.pool-bar-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 8px;
}

.legend-items {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}

/* ============================================================================
   Main Container & Hero
   ============================================================================ */
.main-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.hero-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.hero-intro h1 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--text-primary);
}

.hero-intro p {
  margin: 0;
  max-width: 660px;
  color: var(--text-secondary);
  font-size: 14.5px;
}

.preset-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================================================================
   Buttons & Interactive Controls
   ============================================================================ */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--surface-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

.btn:hover {
  border-color: var(--border-strong);
  background: var(--surface-subtle);
}

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

.btn:focus-visible,
.nav-tab:focus-visible,
.icon-btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-page);
  border-color: var(--text-primary);
}

.btn-primary:hover {
  opacity: 0.9;
  background: var(--text-primary);
}

.btn-teal {
  background: var(--accent-teal);
  color: #ffffff;
  border-color: var(--accent-teal);
}

.btn-teal:hover {
  filter: brightness(1.06);
  background: var(--accent-teal);
}

.btn-danger-soft {
  background: var(--accent-burn-soft);
  color: var(--accent-burn-ink);
  border-color: transparent;
}

.btn-danger-soft:hover {
  background: var(--accent-burn-soft);
  border-color: var(--accent-burn);
}

.btn-amber-soft {
  background: var(--accent-amber-soft);
  color: var(--accent-amber-ink);
  border-color: transparent;
}

.btn-amber-soft.active {
  background: var(--accent-amber);
  color: #ffffff;
}

.btn-sm {
  font-size: 12px;
  padding: 5px 10px;
}

.btn-chip {
  font-size: 12px;
  padding: 6px 11px;
  border-radius: 999px;
}

.btn-chip.active {
  background: var(--text-primary);
  color: var(--bg-page);
  border-color: var(--text-primary);
}

/* ============================================================================
   Views & Surface Panels
   ============================================================================ */
.tab-panel {
  display: none;
  animation: fadeSlide 0.22s ease;
}

.tab-panel.active {
  display: block;
}

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

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

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.panel-desc {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* Grid Layouts */
.sim-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  align-items: start;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

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

/* Equation Banner */
.equation-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.eq-terms {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 13px;
}

.eq-term {
  display: inline-flex;
  flex-direction: column;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
}

.eq-term span:first-child {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.eq-term strong {
  font-size: 14px;
  color: var(--text-primary);
}

.eq-op {
  color: var(--text-muted);
  font-weight: 700;
}

.eq-result {
  text-align: right;
}

.eq-result .big-num {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.eq-result .sub-num {
  font-size: 12px;
  color: var(--text-muted);
}

/* Canvas containers */
.canvas-box {
  width: 100%;
  border-radius: var(--radius-md);
  background: var(--surface-canvas);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  position: relative;
}

.canvas-forecast { height: 270px; }
.canvas-pipeline { height: 150px; margin-top: 14px; }
.canvas-race { height: 260px; }

.canvas-box canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Factor Control Blocks */
.factor-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.factor-block:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.factor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.factor-label {
  font-weight: 700;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.factor-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--text-primary);
}

.factor-badge.burn {
  background: var(--accent-burn-soft);
  color: var(--accent-burn-ink);
}

.factor-badge.teal {
  background: var(--accent-teal-soft);
  color: var(--accent-teal-ink);
}

.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.slider-row label {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 118px;
}

.slider-row input[type="range"] {
  flex: 1;
  accent-color: var(--accent-teal);
  cursor: pointer;
}

.slider-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  min-width: 68px;
  text-align: right;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  font-size: 12.5px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-track {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
  border-radius: 999px;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.switch-track::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .switch-track {
  background: var(--accent-teal);
}

.switch input:checked + .switch-track::before {
  transform: translateX(16px);
}

/* ============================================================================
   Fleet Auditor & Leaks
   ============================================================================ */
.fleet-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bot-row {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: var(--surface-card);
  transition: border-color 0.15s ease, opacity 0.2s ease;
}

.bot-row.is-paused {
  opacity: 0.6;
  background: var(--surface-subtle);
}

.bot-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.bot-name {
  font-weight: 700;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bot-role {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.bot-units {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  text-align: right;
}

.bot-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.mini-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mini-field label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.mini-field select,
.mini-field input[type="number"],
.mini-field input[type="text"] {
  font-family: inherit;
  font-size: 12.5px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--surface-subtle);
  color: var(--text-primary);
}

.leak-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--surface-subtle);
  margin-bottom: 10px;
}

.leak-card:last-child {
  margin-bottom: 0;
}

.leak-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.tag-critical { background: var(--accent-burn-soft); color: var(--accent-burn-ink); }
.tag-high { background: var(--accent-amber-soft); color: var(--accent-amber-ink); }
.tag-medium { background: var(--accent-cobalt-soft); color: var(--accent-cobalt); }
.tag-teal { background: var(--accent-teal-soft); color: var(--accent-teal-ink); }
.tag-pro { background: var(--text-primary); color: var(--bg-page); }

.leak-title {
  font-weight: 700;
  font-size: 13.5px;
  margin: 0 0 3px;
}

.leak-detail {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin: 0;
}

/* ============================================================================
   Prompt Compiler, Handoff Builder & Action Checklist
   ============================================================================ */
.code-output {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  color: var(--text-primary);
  max-height: 360px;
  overflow-y: auto;
}

.handoff-textarea {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--surface-subtle);
  color: var(--text-primary);
}

.word-meter {
  height: 7px;
  border-radius: 999px;
  background: var(--surface-subtle);
  overflow: hidden;
  margin: 10px 0 6px;
}

.word-meter-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease, background-color 0.25s ease;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin-bottom: 8px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.checklist-item:hover {
  background: var(--surface-subtle);
}

.checklist-item.done {
  opacity: 0.65;
}

.checklist-item.done .check-title {
  text-decoration: line-through;
}

/* ============================================================================
   Governance Table & Freemium Pricing
   ============================================================================ */
.data-table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 700;
}

.pro-lock-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  border: 1px dashed var(--border-strong);
  margin-top: 12px;
  flex-wrap: wrap;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 860px;
  margin: 0 auto;
}

.price-card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.price-card.featured {
  border-color: var(--accent-teal);
  box-shadow: var(--shadow-md);
}

.price-amount {
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 8px 0 4px;
}

.price-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.price-list li::before {
  content: '✓';
  color: var(--accent-teal);
  font-weight: 700;
  margin-right: 8px;
}

/* ============================================================================
   Race Stats Strip & Toast
   ============================================================================ */
.race-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.stat-tile {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
}

.stat-tile .stat-k {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-tile .stat-v {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  margin-top: 2px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  background: var(--text-primary);
  color: var(--bg-page);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: none;
  place-items: center;
  z-index: 80;
  padding: 20px;
}

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

.modal-card {
  width: 100%;
  max-width: 480px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.footer-note {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ============================================================================
   Responsive Breakpoints
   ============================================================================ */
@media (max-width: 960px) {
  .sim-grid,
  .two-col,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .telemetry-inner {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 600px) {
  .header-inner {
    padding: 10px 14px;
  }
  .main-wrap {
    padding: 18px 14px 48px;
  }
  .three-col,
  .race-stats {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 15px;
  }
  .eq-result {
    text-align: left;
  }
}

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