/* ══════════════════════════════════════════════════════════════════
   AI Cost of Delay Simulator — Design System
   Dark glassmorphism · electric teal × hot pink · Outfit + Inter
   ══════════════════════════════════════════════════════════════════ */

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

:root {
  --bg:           #06060f;
  --surface:      #0d0d1f;
  --card:         #111128;
  --card-border:  rgba(255,255,255,0.07);
  --glass:        rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.10);
  --teal:         #00f5c8;
  --teal-dim:     rgba(0,245,200,0.15);
  --teal-glow:    rgba(0,245,200,0.35);
  --pink:         #ff4d6d;
  --pink-dim:     rgba(255,77,109,0.12);
  --purple:       #9b59b6;
  --yellow:       #ffd700;
  --text:         #eeeef8;
  --text-muted:   #7777a0;
  --text-dim:     #4a4a70;
  --radius:       12px;
  --radius-lg:    18px;
  --shadow:       0 8px 32px rgba(0,0,0,0.5);
  --transition:   0.22s cubic-bezier(0.4,0,0.2,1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

h1,h2,h3,h4,h5 { font-family: 'Outfit', sans-serif; }

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Scrollbar ────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(0,245,200,0.25); border-radius: 99px; }

/* ── Gradient text utility ────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--teal) 0%, #0099ff 50%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.val-teal { color: var(--teal); font-weight: 600; }
.val-pink  { color: var(--pink); font-weight: 600; }

/* ══════════════════════════════════════════════════════════════════
   TOP BAR
   ══════════════════════════════════════════════════════════════════ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(6,6,15,0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0,245,200,0.1);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: opacity var(--transition);
}
.topbar-brand:hover { opacity: 0.8; text-decoration: none; }

.topbar-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px rgba(0,245,200,0.8);
  animation: glowPulse 2.5s ease infinite;
  flex-shrink: 0;
}

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

.topbar-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
}
.topbar-link:hover { color: var(--teal); text-decoration: none; }
.topbar-link-li { color: var(--text-dim); }
.topbar-link-li:hover { color: var(--teal); }

/* Push body content below fixed topbar */
body { padding-top: 46px; }

/* ══════════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(ellipse 120% 80% at 50% 0%,
    rgba(0,245,200,0.08) 0%,
    rgba(155,89,182,0.05) 40%,
    transparent 70%),
    var(--bg);
}

#particles-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

.hero-content {
  position: relative; z-index: 1;
  text-align: center;
  padding: 60px 32px;
  max-width: 860px;
}

.hero-badge {
  display: inline-block;
  background: rgba(0,245,200,0.1);
  border: 1px solid rgba(0,245,200,0.3);
  color: var(--teal);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 99px;
  margin-bottom: 24px;
  animation: fadeSlideDown 0.8s ease both;
}

.hero-title {
  font-size: clamp(2.6rem, 5.5vw, 5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  animation: fadeSlideDown 0.8s 0.1s ease both;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--text-muted);
  margin-bottom: 48px;
  line-height: 1.65;
  animation: fadeSlideDown 0.8s 0.2s ease both;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 48px;
  flex-wrap: wrap;
  animation: fadeSlideDown 0.8s 0.3s ease both;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hero-stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--teal), #00aaff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat-unit {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--teal), #00aaff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  max-width: 160px;
  line-height: 1.4;
  text-align: center;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--teal), #00aaff);
  color: #050510;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 99px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  animation: fadeSlideDown 0.8s 0.4s ease both;
}

.hero-cta:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(0,245,200,0.5);
  opacity: 0.92;
}

/* ══════════════════════════════════════════════════════════════════
   MOBILE FALLBACK
   ══════════════════════════════════════════════════════════════════ */
.mobile-fallback { display: none; }

@media (max-width: 1023px) {
  .mobile-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 20px;
    background: radial-gradient(ellipse 100% 60% at 50% 0%, rgba(0,245,200,0.06) 0%, transparent 60%), var(--bg);
  }
  .simulator-layout { display: none !important; }
}

.mobile-fallback-content {
  max-width: 480px;
  text-align: center;
}

.mobile-icon { font-size: 3.5rem; margin-bottom: 20px; }

.mobile-fallback-content h2 {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.mobile-fallback-content > p {
  color: var(--text-muted);
  margin-bottom: 32px;
}

.mobile-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 32px;
}

.mobile-stat-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 18px 12px;
}

.mobile-stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--teal);
  margin-bottom: 6px;
}

.mobile-stat-label { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

.mobile-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; }

.mobile-url-box {
  background: rgba(0,245,200,0.06);
  border: 1px solid rgba(0,245,200,0.2);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--teal);
  word-break: break-all;
}

/* ══════════════════════════════════════════════════════════════════
   SIMULATOR LAYOUT
   ══════════════════════════════════════════════════════════════════ */
.simulator-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  min-height: 100vh;
  background: var(--bg);
}

/* ══════════════════════════════════════════════════════════════════
   PARAMS PANEL (LEFT)
   ══════════════════════════════════════════════════════════════════ */
.params-panel {
  border-right: 1px solid var(--card-border);
  background: var(--surface);
  overflow-y: auto;
  position: sticky;
  top: 0;
  height: 100vh;
  padding-bottom: 32px;
}

.params-panel-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--card-border);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(10px);
}

.params-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

/* ── Preset bar ─── */
.preset-bar {
  padding: 14px 20px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preset-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

.preset-chips { display: flex; flex-wrap: wrap; gap: 6px; }

.preset-chip {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 11px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 99px;
  cursor: pointer;
  transition: all var(--transition);
}

.preset-chip:hover {
  border-color: rgba(0,245,200,0.4);
  color: var(--teal);
}

.preset-chip.active {
  background: rgba(0,245,200,0.12);
  border-color: rgba(0,245,200,0.5);
  color: var(--teal);
}

/* ── Params Section ─── */
.params-section {
  border-bottom: 1px solid var(--card-border);
}

.params-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition);
}

.params-section-header:hover { background: var(--glass); }

.section-icon { font-size: 1rem; }

.section-title {
  flex: 1;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.section-chevron { font-size: 0.7rem; color: var(--text-dim); }

.params-section-body { padding: 16px 20px 8px; }

/* ── Slider group ─── */
.slider-group {
  margin-bottom: 18px;
}

.slider-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 7px;
}

.slider-label label {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}

.slider-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  color: var(--teal);
  background: rgba(0,245,200,0.08);
  padding: 2px 8px;
  border-radius: 5px;
  min-width: 60px;
  text-align: right;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  outline: none;
  cursor: pointer;
  transition: background var(--transition);
}

input[type="range"]:hover { background: rgba(0,245,200,0.12); }

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 10px rgba(0,245,200,0.6);
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 18px rgba(0,245,200,0.8);
  transform: scale(1.15);
}

.slider-hints {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ── Toggle switch ─── */
.toggle-group {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 4px 12px;
  margin-bottom: 16px;
}

.toggle-label {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}

.toggle-hint {
  grid-column: 1;
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.4;
}

.toggle-switch {
  grid-row: 1;
  grid-column: 2;
  position: relative;
  display: inline-block;
  width: 38px;
  height: 21px;
}

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

.toggle-slider {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.25s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 15px; height: 15px;
  left: 3px; top: 3px;
  border-radius: 50%;
  background: white;
  transition: transform 0.25s;
}

.toggle-switch input:checked + .toggle-slider { background: rgba(0,245,200,0.5); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(17px); }

/* ── Run button ─── */
.run-section { padding: 24px 20px 10px; }

.run-btn {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: linear-gradient(135deg, rgba(0,245,200,0.9), rgba(0,170,255,0.9));
  border: none;
  border-radius: var(--radius);
  color: #050518;
  cursor: pointer;
  padding: 16px 20px;
  font-family: 'Outfit', sans-serif;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.run-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.run-btn:hover::before { opacity: 1; }
.run-btn:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(0,245,200,0.5); }
.run-btn:active { transform: translateY(0); }

.run-btn-icon { font-size: 1.1rem; }
.run-btn-text { font-size: 1rem; font-weight: 700; letter-spacing: 0.02em; }
.run-btn-subtitle { font-size: 10px; opacity: 0.7; }

.run-btn.running {
  background: linear-gradient(135deg, rgba(155,89,182,0.9), rgba(0,170,255,0.9));
  animation: pulseBtn 1s ease infinite;
}

.run-btn.done {
  background: linear-gradient(135deg, rgba(0,200,100,0.9), rgba(0,245,200,0.9));
}

@keyframes pulseBtn {
  0%,100% { box-shadow: 0 0 10px rgba(155,89,182,0.4); }
  50%      { box-shadow: 0 0 28px rgba(155,89,182,0.7); }
}

.run-hint { font-size: 11px; color: var(--text-dim); text-align: center; margin-top: 10px; }

/* ── Buttons ─── */
.btn-ghost {
  background: none;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all var(--transition);
}
.btn-ghost:hover { border-color: rgba(0,245,200,0.4); color: var(--teal); }
.btn-sm { font-size: 11px; padding: 5px 12px; }

/* ── Docs section ─── */
.docs-body { font-size: 12px; }

.doc-block {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--card-border);
}
.doc-block:last-child { border-bottom: none; }
.doc-block h4 { font-size: 12px; font-weight: 600; color: var(--teal); margin-bottom: 6px; }
.doc-block p { color: var(--text-muted); line-height: 1.6; margin-bottom: 6px; }
.doc-block ul { color: var(--text-muted); padding-left: 18px; }
.doc-block ul li { margin-bottom: 4px; }

/* ══════════════════════════════════════════════════════════════════
   RESULTS PANEL (RIGHT)
   ══════════════════════════════════════════════════════════════════ */
.results-panel {
  overflow-y: auto;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  background: var(--bg);
}

/* ── Placeholder ─── */
.results-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
}

.placeholder-content {
  text-align: center;
  max-width: 420px;
}

.placeholder-icon { font-size: 4rem; margin-bottom: 20px; opacity: 0.6; }

.placeholder-content h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-muted);
}

.placeholder-content p { font-size: 0.9rem; color: var(--text-dim); margin-bottom: 28px; }

.placeholder-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.preview-item {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Results content ─── */
#results-content { display: none; }

/* ── Section header ─── */
.results-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.results-section-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  flex: 1;
}

.results-section-header p { font-size: 12px; color: var(--text-muted); }

/* ── KPI grid ─── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

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

.kpi-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
}

.kpi-card:hover { border-color: rgba(0,245,200,0.25); transform: translateY(-2px); }

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), transparent);
  opacity: 0.7;
}

.kpi-card.kpi-danger::before { background: linear-gradient(90deg, var(--pink), transparent); }
.kpi-card.kpi-purple::before { background: linear-gradient(90deg, var(--purple), transparent); }
.kpi-card.kpi-yellow::before { background: linear-gradient(90deg, var(--yellow), transparent); }

.kpi-icon { font-size: 1.4rem; margin-bottom: 10px; }
.kpi-label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 6px; }

.kpi-value {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
  margin-bottom: 6px;
}

.kpi-card.kpi-danger .kpi-value { color: var(--pink); }
.kpi-card.kpi-purple .kpi-value { color: var(--purple); }
.kpi-card.kpi-yellow .kpi-value { color: var(--yellow); }

.kpi-sub { font-size: 11px; color: var(--text-dim); line-height: 1.4; }

/* ── Chart card ─── */
.chart-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition);
}

.chart-card:hover { border-color: rgba(255,255,255,0.1); }

.chart-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.chart-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.chart-wrap {
  position: relative;
  height: 240px;
}

.chart-wrap.tall { height: 300px; }

/* ── Charts grid ─── */
.charts-grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ── Insight panel ─── */
.insight-card {
  background: linear-gradient(135deg, rgba(0,245,200,0.04), rgba(155,89,182,0.04));
  border: 1px solid rgba(0,245,200,0.15);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.insight-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.insight-card-header h2 { font-size: 1rem; font-weight: 700; }

#insight-text p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.7;
}

#insight-text p:last-child { margin-bottom: 0; }

.insight-note {
  font-size: 11px !important;
  color: var(--text-dim) !important;
  background: rgba(255,255,255,0.03);
  border-left: 2px solid var(--text-dim);
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
}

/* ── Legend pills ─── */
.legend-pills {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.legend-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

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

/* ── Divider label ─── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0;
}

.section-divider span {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  white-space: nowrap;
}

.section-divider::before,.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--card-border);
}

/* ══════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════ */
footer {
  background: var(--surface);
  border-top: 1px solid var(--card-border);
  padding: 28px 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand { font-family: 'Outfit', sans-serif; font-size: 0.85rem; font-weight: 600; color: var(--teal); margin-bottom: 4px; }
.footer-copy { font-size: 11px; color: var(--text-dim); }

.footer-author {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-dim);
}

.footer-author-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--teal);
  font-weight: 500;
  text-decoration: none;
  transition: opacity var(--transition);
}

.footer-author-link:hover { opacity: 0.75; text-decoration: none; }

.footer-refs { max-width: 480px; }
.footer-refs h4 { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); margin-bottom: 6px; }
.footer-refs p { font-size: 10px; color: var(--text-dim); line-height: 1.6; }

/* ══════════════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════════════ */
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes glowPulse {
  0%,100% { box-shadow: 0 0 8px rgba(0,245,200,0.2); }
  50%      { box-shadow: 0 0 22px rgba(0,245,200,0.5); }
}

#results-content { animation: fadeIn 0.5s ease; }

/* ══════════════════════════════════════════════════════════════════
   PARAMETER TOOLTIPS  — JS-positioned, never clipped by overflow
   ══════════════════════════════════════════════════════════════════ */
.param-tip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(0,245,200,0.10);
  border: 1px solid rgba(0,245,200,0.28);
  color: var(--teal);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  flex-shrink: 0;
  margin-left: 5px;
  vertical-align: middle;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
  position: relative;
  top: -1px;
}

.param-tip:hover {
  background: rgba(0,245,200,0.22);
  border-color: var(--teal);
  box-shadow: 0 0 8px rgba(0,245,200,0.35);
}

/* The floating balloon — appended to <body> by JS, uses position:fixed */
.tooltip-balloon {
  position: fixed;
  z-index: 9999;
  width: 260px;
  background: rgba(6,6,22,0.97);
  border: 1px solid rgba(0,245,200,0.22);
  border-radius: 10px;
  padding: 11px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: #aaaacc;
  line-height: 1.6;
  pointer-events: none;
  box-shadow: 0 12px 36px rgba(0,0,0,0.75);
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: normal;
  text-align: left;
}

.tooltip-balloon.visible { opacity: 1; }

/* Small arrow tip (::before on the balloon div) */
.tooltip-balloon::before {
  content: '';
  position: absolute;
  left: var(--arrow-left, 50%);
  transform: translateX(-50%);
  border: 5px solid transparent;
}
.tooltip-balloon.arrow-down::before {
  top: 100%;
  border-top-color: rgba(0,245,200,0.22);
}
.tooltip-balloon.arrow-up::before {
  bottom: 100%;
  border-bottom-color: rgba(0,245,200,0.22);
}
