/* ==========================================================================
   CSS Custom Properties & Reset
   ========================================================================== */
:root {
  --bg-dark: #020409;
  --bg-surface: rgba(10, 15, 28, 0.88);
  --bg-surface-elevated: rgba(15, 23, 42, 0.92);
  --bg-card: rgba(10, 15, 28, 0.86);

  --border-subtle: rgba(148, 163, 184, 0.22);
  --border-highlight: rgba(56, 189, 248, 0.35);
  --border-accent: rgba(250, 204, 21, 0.35);

  --cyan-400: #38bdf8;
  --cyan-500: #0ea5e9;
  --cyan-900-20: rgba(56, 189, 248, 0.2);

  --gold-400: #facc15;
  --gold-900-20: rgba(250, 204, 21, 0.18);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --backdrop-blur: blur(14px);
  --transition-smooth: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow: hidden;
  user-select: text;
  -webkit-user-select: text;
  width: 100vw;
  height: 100vh;
}

/* Accessible & Theme-Matching Text Selection Highlight */
::selection {
  background: rgba(56, 189, 248, 0.4);
  color: #ffffff;
}
::-moz-selection {
  background: rgba(56, 189, 248, 0.4);
  color: #ffffff;
}

/* Explicit Selectable Text Across All Portal Pages, Modals & HUDs */
#home-view,
#labs-view,
#universe-view,
.home-portal-inner,
.labs-portal-inner,
.home-hero,
.home-hero-title,
.home-hero-desc,
.home-workflow-section,
.workflow-card,
.home-features-grid,
.home-feature-card,
.home-subjects-grid,
.home-subject-card,
.home-standards-strip,
.home-pricing-teaser,
.home-footer,
.seo-footer-grid,
.labs-cards-grid,
.labs-card,
.lab-card-title,
.lab-card-desc,
.lab-card-equation,
.lab-card-topics,
.lab-runner-container,
.lab-theory-pane,
.lab-sidebar,
.tel-grid,
.formula-box,
.lab-tab-pane,
.modal-info-panel,
.theory-text,
.hud-card,
.hud-description,
.hud-facts,
.hud-comparison,
.brand,
.pricing-modal,
.pricing-card,
.feature-row {
  user-select: text;
  -webkit-user-select: text;
}

/* Interactive controls where dragging/rapid clicking should not highlight label text */
button,
.btn,
input[type="range"],
.nav-tab-btn,
.portal-nav-bar,
.canvas-nav-controls,
canvas {
  user-select: none;
  -webkit-user-select: none;
}

#canvas-container {
  position: fixed;
  inset: 0;
  touch-action: none;
  z-index: 1;
}

/* Common Button & Glass Styling */
.btn {
  background: var(--bg-surface-elevated);
  color: #e2e8f0;
  border: 1px solid var(--border-subtle);
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover {
  border-color: var(--cyan-400);
  color: var(--cyan-400);
  background: rgba(30, 41, 59, 0.95);
}
.btn:active {
  transform: scale(0.97);
}
.btn.active {
  background: var(--cyan-900-20);
  border-color: var(--cyan-400);
  color: var(--cyan-400);
}
.btn:focus-visible {
  outline: 2px solid var(--cyan-400);
  outline-offset: 2px;
}

/* ==========================================================================
   Top Navigation & HUD Header
   ========================================================================== */
.hud-top {
  position: fixed;
  top: 60px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  pointer-events: none;
  z-index: 20;
}

.brand {
  pointer-events: auto;
  background: var(--bg-surface);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-highlight);
  padding: 11px 16px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.brand h1 {
  font-size: 0.98rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan-400);
  font-weight: 700;
}
.brand p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.top-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  pointer-events: auto;
}

.scale-readout {
  pointer-events: auto;
  text-align: right;
  background: var(--bg-surface);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-highlight);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  min-width: 185px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.scale-readout .exp {
  font-size: 1.45rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #f8fafc;
  letter-spacing: -0.02em;
}
.scale-readout .unit {
  font-size: 0.76rem;
  color: var(--cyan-400);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Active Item Info Card (Bottom-Left)
   ========================================================================== */
.info-card {
  position: fixed;
  left: 18px;
  bottom: 148px;
  width: 380px;
  max-width: calc(100vw - 36px);
  max-height: calc(100vh - 240px);
  overflow-y: auto;
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  z-index: 20;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: border-color 0.3s ease;
}
.info-card::-webkit-scrollbar {
  width: 4px;
}
.info-card::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 4px;
}
.info-card.pro-active {
  border-color: rgba(250, 204, 21, 0.4);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 8px;
}
.card-domain-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.domain-tag {
  font-size: 0.68rem;
  color: var(--cyan-400);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.info-card.pro-active .domain-tag {
  color: var(--gold-400);
}
.discovery-tag {
  font-size: 0.67rem;
  color: var(--text-dim);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-style: italic;
}
.badge {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--cyan-900-20);
  color: var(--cyan-400);
  border: 1px solid rgba(56, 189, 248, 0.3);
  white-space: nowrap;
}
.badge.pro {
  background: var(--gold-900-20);
  color: var(--gold-400);
  border-color: rgba(250, 204, 21, 0.4);
}
.category-tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-card h2 {
  font-size: 1.15rem;
  margin-bottom: 4px;
  color: #f8fafc;
  font-weight: 600;
}
.info-card .size-label {
  font-size: 0.82rem;
  color: var(--cyan-400);
  margin-bottom: 8px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.info-card p {
  font-size: 0.82rem;
  line-height: 1.48;
  color: #cbd5e1;
}

/* Cosmic Fact / Trivia Box */
.card-fact-box {
  margin-top: 10px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 9px;
  padding: 8px 10px;
}
.info-card.pro-active .card-fact-box {
  border-color: rgba(250, 204, 21, 0.25);
  background: rgba(20, 24, 38, 0.75);
}
.fact-header {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cyan-400);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}
.info-card.pro-active .fact-header {
  color: var(--gold-400);
}
.fact-icon {
  font-size: 0.76rem;
}
.fact-text {
  font-size: 0.74rem;
  color: #e2e8f0;
  line-height: 1.42;
}

/* Scale Analogy Box */
.card-analogy-box {
  margin-top: 8px;
  background: rgba(56, 189, 248, 0.08);
  border-left: 3px solid var(--cyan-400);
  padding: 6px 9px;
  border-radius: 0 7px 7px 0;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #cbd5e1;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.info-card.pro-active .card-analogy-box {
  background: rgba(250, 204, 21, 0.08);
  border-left-color: var(--gold-400);
}
.analogy-icon {
  font-size: 0.72rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.analogy-text {
  flex: 1;
}

/* Anatomy / Parts Component Breakdown in Info Card */
.card-parts-section {
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}
.parts-header {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 7px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.parts-count {
  font-size: 0.65rem;
  background: rgba(56, 189, 248, 0.14);
  color: var(--cyan-400);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.parts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 155px;
  overflow-y: auto;
  padding-right: 3px;
}
.parts-list::-webkit-scrollbar {
  width: 3px;
}
.parts-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 3px;
}
.part-item {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  padding: 7px 9px;
  transition: var(--transition-smooth);
}
.part-item:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(30, 41, 59, 0.85);
}
.part-item.pro {
  border-color: rgba(250, 204, 21, 0.22);
}
.part-item.pro:hover {
  border-color: rgba(250, 204, 21, 0.45);
}
.part-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cyan-400);
  display: flex;
  align-items: center;
  gap: 6px;
}
.part-item.pro .part-name {
  color: var(--gold-400);
}
.part-bullet {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan-400);
  box-shadow: 0 0 6px var(--cyan-400);
  flex-shrink: 0;
}
.part-item.pro .part-bullet {
  background: var(--gold-400);
  box-shadow: 0 0 6px var(--gold-400);
}
.part-role {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-left: auto;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.part-desc {
  font-size: 0.71rem;
  color: #cbd5e1;
  margin-top: 3px;
  line-height: 1.38;
}

/* On-Screen 3D Callouts Layer */
#callouts-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 15;
  overflow: hidden;
  transition: opacity 0.3s ease;
}
.callout-tag {
  position: absolute;
  pointer-events: auto;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: opacity 0.2s ease;
  will-change: transform, left, top;
}
.callout-tag.flipped {
  transform: translate(-50%, 0);
  flex-direction: column-reverse;
}
.callout-box {
  background: rgba(10, 15, 28, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 6px 12px;
  border-radius: 9px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55), 0 0 12px rgba(56, 189, 248, 0.2);
  max-width: 235px;
  text-align: left;
}
.callout-box.pro {
  border-color: rgba(250, 204, 21, 0.5);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55), 0 0 12px rgba(250, 204, 21, 0.22);
}
.callout-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--cyan-400);
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.02em;
}
.callout-box.pro .callout-title {
  color: var(--gold-400);
}
.callout-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan-400);
  box-shadow: 0 0 6px var(--cyan-400);
  flex-shrink: 0;
}
.callout-box.pro .callout-badge-dot {
  background: var(--gold-400);
  box-shadow: 0 0 6px var(--gold-400);
}
.callout-desc {
  font-size: 0.69rem;
  color: #cbd5e1;
  margin-top: 3px;
  line-height: 1.38;
}
.callout-line {
  width: 1px;
  height: 22px;
  background: linear-gradient(to bottom, rgba(56, 189, 248, 0.85), rgba(56, 189, 248, 0.2));
}
.callout-tag.flipped .callout-line {
  background: linear-gradient(to top, rgba(56, 189, 248, 0.85), rgba(56, 189, 248, 0.2));
}
.callout-box.pro + .callout-line,
.callout-tag.flipped .callout-box.pro + .callout-line {
  background: linear-gradient(to bottom, rgba(250, 204, 21, 0.85), rgba(250, 204, 21, 0.2));
}
.callout-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan-400);
  box-shadow: 0 0 8px var(--cyan-400);
  margin-top: -1px;
}
.callout-tag.flipped .callout-dot {
  margin-top: 0;
  margin-bottom: -1px;
}
.callout-box.pro ~ .callout-dot {
  background: var(--gold-400);
  box-shadow: 0 0 8px var(--gold-400);
}

/* Keyboard navigation indicator */
.shortcut-hint {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  font-size: 0.68rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.shortcut-hint kbd {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: inherit;
  color: #cbd5e1;
}

/* ==========================================================================
   Comparison Sandbox Drawer (Right Side)
   ========================================================================== */
.compare-panel {
  position: fixed;
  right: 18px;
  top: 86px;
  width: 325px;
  max-width: calc(100vw - 36px);
  background: var(--bg-surface-elevated);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 16px;
  z-index: 25;
  display: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}
.compare-panel.open {
  display: block;
  animation: fadeIn 0.2s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.compare-panel h3 {
  font-size: 0.9rem;
  color: var(--gold-400);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.compare-panel h3 span {
  font-size: 0.68rem;
  background: var(--gold-900-20);
  border: 1px solid rgba(250, 204, 21, 0.4);
  padding: 2px 7px;
  border-radius: 4px;
}
.compare-panel label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 10px;
  margin-bottom: 4px;
  font-weight: 500;
}
.compare-panel select {
  width: 100%;
  background: #0f172a;
  color: #f1f5f9;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.8rem;
  outline: none;
  transition: var(--transition-smooth);
}
.compare-panel select:focus {
  border-color: var(--gold-400);
}
.ratio-box {
  margin-top: 12px;
  padding: 12px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.48;
}
.ratio-box strong {
  color: var(--cyan-400);
}

/* ==========================================================================
   Bottom Controls: Logarithmic Scrubber & Filter Tabs
   ========================================================================== */
.hud-bottom {
  position: fixed;
  bottom: 16px;
  left: 18px;
  right: 18px;
  background: var(--bg-surface);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  z-index: 20;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tour-controls {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.play-btn {
  background: var(--bg-surface-elevated);
  color: #e2e8f0;
  border: 1px solid var(--border-subtle);
  padding: 6px 13px;
  border-radius: 9px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}
.play-btn.btn-icon-only {
  padding: 6px 9px;
}
.play-btn:hover {
  border-color: var(--cyan-400);
  color: var(--cyan-400);
  background: var(--cyan-900-20);
}
.play-btn.active {
  background: var(--cyan-900-20);
  border-color: var(--cyan-400);
  color: var(--cyan-400);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.45);
}
.play-btn .play-icon {
  font-size: 0.72rem;
}
.slider-row span {
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
input[type="range"] {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  accent-color: var(--cyan-400);
  cursor: pointer;
  outline: none;
  background: rgba(30, 41, 59, 0.8);
}

.filter-tabs {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 3px;
  -webkit-overflow-scrolling: touch;
}
.filter-tabs button {
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}
.filter-tabs button:hover {
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.4);
}
.filter-tabs button.active {
  background: var(--cyan-900-20);
  border-color: var(--cyan-400);
  color: var(--cyan-400);
}

.quick-jumps {
  display: flex;
  gap: 7px;
  margin-top: 9px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  position: relative;
  scroll-behavior: smooth;
}
.quick-jumps::-webkit-scrollbar,
.filter-tabs::-webkit-scrollbar {
  height: 4px;
}
.quick-jumps::-webkit-scrollbar-thumb,
.filter-tabs::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 4px;
}
.quick-jumps button {
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  padding: 5px 11px;
  font-size: 0.73rem;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}
.quick-jumps button:hover {
  border-color: var(--cyan-400);
  background: var(--cyan-900-20);
  color: var(--cyan-400);
}
.quick-jumps button.active {
  background: rgba(56, 189, 248, 0.28);
  border-color: var(--cyan-400);
  color: var(--cyan-400);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.5), inset 0 0 6px rgba(56, 189, 248, 0.2);
  font-weight: 700;
  transform: translateY(-1px);
}
.quick-jumps button.pro-btn {
  border-color: rgba(250, 204, 21, 0.35);
  color: #fef08a;
}
.quick-jumps button.pro-btn:hover {
  background: var(--gold-900-20);
  border-color: var(--gold-400);
  color: var(--gold-400);
}
.quick-jumps button.pro-btn.active {
  background: rgba(250, 204, 21, 0.26);
  border-color: var(--gold-400);
  color: #fef08a;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.5), inset 0 0 6px rgba(250, 204, 21, 0.2);
  font-weight: 700;
  transform: translateY(-1px);
}

/* ==========================================================================
   Responsive Breakpoints (Mobile & Tablet)
   ========================================================================== */
@media (max-width: 768px) {
  .hud-top {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    top: 54px;
    left: 10px;
    right: 10px;
  }
  .brand {
    padding: 8px 12px;
  }
  .brand h1 {
    font-size: 0.88rem;
  }
  .brand p {
    display: none;
  }
  .top-actions {
    justify-content: space-between;
  }
  .scale-readout {
    padding: 6px 12px;
    min-width: auto;
  }
  .scale-readout .exp {
    font-size: 1.15rem;
  }
  .info-card {
    left: 10px;
    right: 10px;
    width: auto;
    bottom: 140px;
    padding: 12px 14px;
  }
  .hud-bottom {
    left: 10px;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    padding: 10px 14px;
  }
  .slider-row {
    gap: 8px;
  }
  .play-btn {
    padding: 5px 9px;
    font-size: 0.72rem;
  }
  .play-btn.btn-icon-only {
    padding: 5px 7px;
  }
  .label-sub {
    display: none;
  }
  .compare-panel {
    top: auto;
    bottom: 140px;
    right: 10px;
    left: 10px;
    width: auto;
  }
  .shortcut-hint {
    display: none;
  }
}


/* ==========================================================================
   Master Portal Navigation Bar (Top-level view switcher)
   ========================================================================== */
.portal-nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: rgba(8, 12, 24, 0.94);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border-bottom: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: 1fr minmax(300px, 680px) 1fr;
  gap: 16px;
  align-items: center;
  padding: 0 20px;
  z-index: 50;
}

.portal-brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  justify-self: start;
}
.portal-brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.55));
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease;
  flex-shrink: 0;
  display: block;
}
.portal-brand-block:hover .portal-brand-icon {
  transform: scale(1.1) rotate(6deg);
  filter: drop-shadow(0 0 14px rgba(56, 189, 248, 0.9));
}
.portal-logo-glow {
  color: var(--cyan-400);
  font-size: 1.15rem;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
}
.portal-brand-text {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f8fafc;
}

.portal-tabs {
  display: flex;
  gap: 8px;
  align-items: center;
}
.portal-tab {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: var(--transition-smooth);
}
.portal-tab:hover {
  color: #ffffff;
  border-color: var(--cyan-400);
}
.portal-tab.active {
  background: var(--cyan-900-20);
  border-color: var(--cyan-400);
  color: var(--cyan-400);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}
.tab-count-pill {
  background: #0284c7;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.5);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1, #0284c7);
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.4);
}

.btn-pro {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.2), rgba(202, 138, 4, 0.25));
  border: 1px solid rgba(250, 204, 21, 0.5);
  color: #fef08a;
}
.btn-pro:hover {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.35), rgba(202, 138, 4, 0.4));
  border-color: #facc15;
  color: #ffffff;
}

/* ==========================================================================
   Section Views: Universe Zoom vs Standalone Science Labs
   ========================================================================== */
.portal-view-section {
  position: fixed;
  inset: 0;
}

#universe-view {
  pointer-events: none;
}
#universe-view > * {
  pointer-events: auto;
}

#labs-view {
  background: radial-gradient(circle at 50% 10%, #0d1527 0%, #030712 100%);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  z-index: 30;
  padding-top: 48px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.labs-portal-inner {
  width: 100%;
  max-width: 1240px;
  padding: 24px 20px 60px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex-shrink: 0;
}

.labs-view-header {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}
.labs-view-title-group h2 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--cyan-400);
}
.labs-view-title-group p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Labs Toolbar (Subject tabs & search box) */
.labs-toolbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.labs-toolbar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.labs-toolbar-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.labs-toolbar-icon {
  font-size: 1.1rem;
}

.labs-toolbar-label {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.labs-toolbar-badge {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 2px 7px;
  border-radius: 999px;
}

.labs-search-box {
  display: flex;
  align-items: center;
}

.labs-search-box input {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  outline: none;
  width: 320px;
  max-width: 100%;
  transition: var(--transition-smooth);
}
.labs-search-box input:focus {
  border-color: var(--cyan-400);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.labs-subject-tabs {
  display: flex;
  flex-wrap: wrap;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  overflow: visible;
}

@media (max-width: 1024px) {
  .labs-subject-tabs {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

@media (max-width: 640px) {
  .labs-subject-tabs {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.labs-tab-btn {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 44px;
  user-select: text;
  -webkit-user-select: text;
}
.labs-tab-btn:hover {
  background: rgba(56, 189, 248, 0.14);
  color: #ffffff;
  border-color: var(--cyan-400);
  transform: translateY(-1px);
}
.labs-tab-btn.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(56, 189, 248, 0.15));
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}
.labs-tab-btn .tab-icon {
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  flex-shrink: 0;
}
.labs-tab-btn .tab-label,
.labs-tab-btn > span:not(.tab-icon):not(.tab-badge) {
  flex: 1 1 auto;
  margin: 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  user-select: text;
  -webkit-user-select: text;
}
.tab-badge,
.labs-tab-btn .tab-badge {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  flex-shrink: 0;
  margin-left: auto;
  line-height: 1.2;
}
.labs-tab-btn.active .tab-badge {
  background: rgba(56, 189, 248, 0.3);
  color: #ffffff;
}

/* Experiments Cards Grid */
.labs-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 18px;
}
.labs-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
}

/* Algorithm Problem Domain Subcategory Filter Bar */
.labs-subcategories-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 2px 20px 2px;
  margin-bottom: 20px;
  align-items: center;
}
.labs-subcategories-bar::-webkit-scrollbar {
  height: 4px;
}
.labs-subcategories-bar::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 4px;
}

.algo-subcategory-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: #94a3b8;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 9999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.algo-subcategory-pill:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.45);
  color: #f8fafc;
  transform: translateY(-1px);
}

/* All subcategories active in feed mode */
.algo-subcategory-pill.in-feed {
  background: rgba(14, 165, 233, 0.14);
  border-color: rgba(56, 189, 248, 0.45);
  color: #e0f2fe;
}
.algo-subcategory-pill.in-feed .pill-badge {
  background: rgba(56, 189, 248, 0.22);
  color: #38bdf8;
}

/* Single active subcategory mode */
.algo-subcategory-pill.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.35), rgba(56, 189, 248, 0.2));
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}
.algo-subcategory-pill.active .pill-badge {
  background: rgba(56, 189, 248, 0.35);
  color: #ffffff;
}

/* When one subcategory is strictly active, dim the other pills */
.labs-subcategories-bar.has-single-active .algo-subcategory-pill:not(.active) {
  opacity: 0.6;
  background: rgba(15, 23, 42, 0.5);
  border-color: rgba(148, 163, 184, 0.18);
  color: #94a3b8;
}
.labs-subcategories-bar.has-single-active .algo-subcategory-pill:not(.active):hover {
  opacity: 0.95;
  border-color: rgba(56, 189, 248, 0.4);
  color: #ffffff;
}

.algo-subcategory-pill .pill-icon {
  font-size: 0.9rem;
}
.algo-subcategory-pill .pill-badge {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
}

/* Downward-pointing triangular arrow indicator */
.algo-subcategory-pill .pill-down-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
  font-size: 0.85rem;
  line-height: 1;
  color: #38bdf8;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.algo-subcategory-pill .pill-down-arrow svg {
  width: 13px;
  height: 10px;
  filter: drop-shadow(0 1px 3px rgba(56, 189, 248, 0.5));
}
.algo-subcategory-pill .pill-down-arrow.hidden {
  display: none !important;
}
.algo-subcategory-pill.active .pill-down-arrow {
  color: #ffffff;
}
.algo-subcategory-pill.active .pill-down-arrow svg {
  filter: drop-shadow(0 1px 4px rgba(255, 255, 255, 0.6));
}

/* Triangular pointer indicator pointing downward from the bottom edge */
.algo-subcategory-pill.has-down-arrow::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid rgba(56, 189, 248, 0.9);
  pointer-events: none;
  transition: all 0.2s ease;
  filter: drop-shadow(0 3px 6px rgba(56, 189, 248, 0.5));
}
.algo-subcategory-pill.active::after {
  border-top-color: #38bdf8;
  filter: drop-shadow(0 3px 8px rgba(56, 189, 248, 0.7));
}

/* Categorized Domain Groups View for Algorithms */
.labs-cards-grid.categorized-view {
  display: flex !important;
  flex-direction: column !important;
  gap: 36px !important;
}

.algo-domain-group {
  background: rgba(11, 17, 32, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 16px;
  padding: 22px 24px;
  position: relative;
  box-shadow: 0 8px 32px rgba(2, 6, 23, 0.45);
  transition: border-color 0.25s ease;
}
.algo-domain-group:hover {
  border-color: rgba(56, 189, 248, 0.4);
}

.algo-domain-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}
.algo-domain-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}
.algo-domain-icon {
  font-size: 1.8rem;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.algo-domain-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.algo-domain-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
  letter-spacing: -0.01em;
}
.algo-domain-desc {
  font-size: 0.8rem;
  color: #94a3b8;
  margin: 0;
}

.algo-domain-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.algo-domain-count-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(56, 189, 248, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}
.algo-domain-free-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.algo-domain-cards-subgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.lab-complexity-badge {
  font-size: 0.65rem;
  font-family: monospace;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(168, 85, 247, 0.16);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.32);
}

/* Lab Card */
.lab-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}
.lab-card:hover {
  border-color: var(--cyan-400);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.lab-card.pro {
  border-color: rgba(250, 204, 21, 0.28);
}
.lab-card.pro:hover {
  border-color: var(--gold-400);
}

.lab-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.lab-card-badges {
  display: flex;
  gap: 6px;
  align-items: center;
}
.lab-subject-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(14, 165, 233, 0.16);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.lab-difficulty-badge {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-muted);
}
.lab-dev-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.16);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.02em;
}

.lab-card.in-development {
  border: 1px dashed rgba(245, 158, 11, 0.4);
  background: rgba(15, 23, 42, 0.6);
}
.lab-card.in-development:hover {
  border-color: rgba(245, 158, 11, 0.7);
  background: rgba(15, 23, 42, 0.85);
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.12);
}
.lab-tier-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
}
.lab-tier-badge.free {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}
.lab-tier-badge.pro {
  background: var(--gold-900-20);
  color: var(--gold-400);
}
.lab-tier-badge.upcoming {
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.3);
}

.lab-card.coming-soon {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.55);
}
.lab-card.coming-soon:hover {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(15, 23, 42, 0.85);
}

.btn-coming-soon {
  background: rgba(30, 41, 59, 0.8) !important;
  border: 1px dashed rgba(56, 189, 248, 0.5) !important;
  color: #38bdf8 !important;
  font-weight: 600 !important;
}
.btn-coming-soon:hover {
  background: rgba(56, 189, 248, 0.18) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
}

.btn-pro-locked {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.28)) !important;
  border: 1px solid rgba(245, 158, 11, 0.5) !important;
  color: #fbbf24 !important;
  font-weight: 600 !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.btn-pro-locked:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(217, 119, 6, 0.55)) !important;
  border-color: #f59e0b !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3) !important;
}

.lab-card.pro.locked {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(15, 23, 42, 0.72);
}
.lab-card.pro.locked:hover {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}

.lab-tier-badge.pro.locked {
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.lab-tier-badge.pro.unlocked {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.lab-pro-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 2.5rem;
  text-align: center;
}
.pro-lock-badge {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.45);
  margin-bottom: 14px;
}
.lab-pro-lock-overlay h3 {
  font-size: 1.5rem;
  color: #f8fafc;
  margin-bottom: 10px;
  font-weight: 700;
}
.lab-pro-lock-overlay p {
  font-size: 0.92rem;
  color: #94a3b8;
  max-width: 500px;
  line-height: 1.6;
  margin-bottom: 24px;
}
.pro-lock-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.lab-coming-soon-notice {
  background: rgba(15, 23, 42, 0.8);
  border: 1px dashed rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lab-coming-soon-notice h4 {
  font-size: 0.95rem;
  color: #facc15;
  font-weight: 700;
}
.lab-coming-soon-notice p {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.45;
}
.coming-soon-specs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.75rem;
  color: #cbd5e1;
  background: rgba(8, 12, 24, 0.6);
  padding: 10px;
  border-radius: 8px;
  margin-top: 4px;
}
.coming-soon-specs div {
  display: flex;
  justify-content: space-between;
}
.coming-soon-specs span {
  color: #94a3b8;
}
.coming-soon-specs strong {
  color: #38bdf8;
}

/* ==========================================================================
   Simulation Launch Cards Typography & Layout
   ========================================================================== */
.lab-card {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.lab-card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  margin-bottom: 14px;
}

.lab-card-title,
.lab-title,
.lab-card h3 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: #f8fafc;
  margin: 0 0 5px 0;
}

.lab-card-domain,
.lab-domain {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #38bdf8;
  margin: 0 0 8px 0;
}

.lab-card-tagline,
.lab-tagline,
.lab-card-desc,
.lab-desc {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
  flex-grow: 1;
}

.lab-card-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  margin-top: auto;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  width: 100%;
  box-sizing: border-box;
}

.lab-scale-indicator {
  display: none;
}

.launch-lab-btn {
  width: 100% !important;
  box-sizing: border-box !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.015em !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.launch-lab-btn span {
  font-family: inherit;
  font-weight: inherit;
}

.lab-card-actions {
  display: flex;
}
.lab-card-actions .btn {
  width: 100%;
  justify-content: center;
  padding: 8px 12px;
  font-size: 0.8rem;
}

/* Pro Banner at bottom of directory */
.labs-pro-banner {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.1), rgba(15, 23, 42, 0.8));
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}
.pro-banner-content h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold-400);
}
.pro-banner-content p {
  font-size: 0.75rem;
  color: #cbd5e1;
  margin-top: 2px;
}

/* ==========================================================================
   Interactive Lab Runner Modal Styles (Inside Science Labs)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.lab-runner-container {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  width: 98vw;
  max-width: 1750px;
  height: 95vh;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
  animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalSlideUp {
  from { transform: translateY(18px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.lab-runner-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(14px);
  gap: 14px;
}
.lab-runner-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.lab-runner-title-group h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fafc;
}
.lab-domain-badge {
  font-size: 0.82rem;
  font-weight: 500;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.14);
  padding: 3px 9px;
  border-radius: 5px;
}
.lab-runner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.lab-playback-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lab-playback-controls .btn {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid var(--border-subtle);
  color: #f1f5f9;
  transition: var(--transition-smooth);
}
.lab-playback-controls .btn:hover {
  background: rgba(51, 65, 85, 0.95);
  border-color: var(--cyan-400);
  color: #ffffff;
}
.lab-playback-controls .btn.active {
  background: rgba(14, 165, 233, 0.2);
  border-color: rgba(56, 189, 248, 0.6);
  color: var(--cyan-400);
}
#lab-export-csv-btn {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(56, 189, 248, 0.45);
  color: #38bdf8;
}
#lab-export-csv-btn:hover {
  background: rgba(14, 165, 233, 0.3);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}
#lab-export-csv-btn.active {
  background: rgba(34, 197, 94, 0.25);
  border-color: #22c55e;
  color: #4ade80;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition-smooth);
}
.modal-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* ---- Info Panel (floating overlay over canvas) ---- */
.lab-info-panel {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 88%;
  max-width: 720px;
  max-height: 80%;
  z-index: 40;
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(56, 189, 248, 0.08);
  backdrop-filter: blur(16px);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.lab-info-panel.open {
  display: flex;
  flex-direction: column;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.lab-info-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  flex-shrink: 0;
}
.lab-info-panel-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.3px;
}
.lab-info-panel-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 7px;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
}
.lab-info-panel-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}
.lab-info-panel-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 16px 18px;
  overflow-y: auto;
}
.lab-info-section {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 10px;
  padding: 14px 16px;
}
.lab-info-section h4 {
  font-size: 0.82rem;
  font-weight: 700;
  color: #38bdf8;
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.lab-info-content {
  font-size: 0.82rem;
  line-height: 1.6;
  color: #cbd5e1;
}
.lab-info-content code {
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}
.lab-info-content a {
  color: #38bdf8;
  text-decoration: none;
  border-bottom: 1px dashed rgba(56, 189, 248, 0.4);
  transition: color 0.2s ease;
}
.lab-info-content a:hover {
  color: #7dd3fc;
  border-bottom-color: #7dd3fc;
}
.lab-info-content ul,
ul.lab-info-content {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.lab-info-content ul li,
ul.lab-info-content li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 5px;
}
.lab-info-content ul li::before,
ul.lab-info-content li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: #38bdf8;
  font-size: 0.75rem;
}
#lab-info-btn {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.45);
  color: #a78bfa;
}
#lab-info-btn:hover {
  background: rgba(139, 92, 246, 0.3);
  border-color: #a78bfa;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.35);
}
#lab-info-btn.active {
  background: rgba(139, 92, 246, 0.25);
  border-color: #a78bfa;
  color: #c4b5fd;
}

#lab-missions-btn {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}
#lab-missions-btn:hover,
#lab-missions-btn.active {
  background: rgba(245, 158, 11, 0.25);
  border-color: #fbbf24;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}
#lab-missions-btn.all-done {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.55);
  color: #34d399;
}

/* ---- Interactive Lab Missions HUD (floating top-right over canvas) ---- */
.lab-missions-hud {
  display: none;
  position: absolute;
  top: 14px;
  right: 14px;
  width: 320px;
  max-width: calc(100% - 28px);
  max-height: calc(100% - 28px);
  z-index: 35;
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(14px);
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.lab-missions-hud.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}
.lab-missions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  flex-shrink: 0;
}
.lab-missions-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lab-missions-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #f8fafc;
}
.lab-missions-progress {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.lab-missions-progress.all-done {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.45);
}
.lab-missions-list {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}
.lab-mission-card {
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 9px;
  padding: 10px 11px;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.lab-mission-card.completed {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.5);
}
.lab-mission-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.lab-mission-status {
  font-size: 0.92rem;
  line-height: 1.2;
  flex-shrink: 0;
}
.lab-mission-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 2px;
}
.lab-mission-card.completed .lab-mission-title {
  color: #6ee7b7;
}
.lab-mission-prompt {
  font-size: 0.74rem;
  line-height: 1.4;
  color: #94a3b8;
}
.lab-mission-hint-btn {
  margin-top: 6px;
  background: transparent;
  border: none;
  color: #38bdf8;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.lab-mission-hint-btn:hover {
  text-decoration: underline;
}
.lab-mission-hint-body {
  display: none;
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.2);
  font-size: 0.72rem;
  line-height: 1.45;
  color: #cbd5e1;
}
.lab-mission-hint-body.open {
  display: block;
}
.lab-mission-actions-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
  flex-wrap: wrap;
}
.lab-mission-actions-row .lab-mission-hint-btn {
  margin-top: 0;
}
.lab-mission-deriv-btn {
  background: transparent;
  border: none;
  color: #a78bfa;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.lab-mission-deriv-btn:hover {
  text-decoration: underline;
}
.lab-mission-deriv-body {
  display: none;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.28);
  font-size: 0.72rem;
  line-height: 1.5;
  color: #e2e8f0;
}
.lab-mission-deriv-body.open {
  display: block;
}
.lab-mission-deriv-body code {
  background: rgba(139, 92, 246, 0.2);
  color: #ddd6fe;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.7rem;
}

/* ---- Lab Report Button ---- */
#lab-report-btn {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(99, 102, 241, 0.45);
  color: #a5b4fc;
}
#lab-report-btn:hover {
  background: rgba(99, 102, 241, 0.28);
  border-color: #818cf8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.3);
}

/* ---- Share & Embed Panel + ?embed=1 Iframe Mode ---- */
#lab-share-btn {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.45);
  color: #34d399;
}
#lab-share-btn:hover,
#lab-share-btn.active {
  background: rgba(16, 185, 129, 0.28);
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}
.lab-share-panel {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 88%;
  max-width: 600px;
  z-index: 42;
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(16px);
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.lab-share-panel.open {
  display: flex;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.lab-share-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lab-share-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}
.lab-share-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.lab-share-input {
  flex: 1;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  padding: 8px 10px;
  color: #7dd3fc;
  font-size: 0.76rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

body.embed-mode .top-nav,
body.embed-mode #home-view,
body.embed-mode #labs-view,
body.embed-mode #universe-view,
body.embed-mode #lab-close-btn {
  display: none !important;
}
body.embed-mode #lab-runner-modal {
  padding: 0;
  background: #020617;
}
body.embed-mode .lab-runner-container {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  border-radius: 0;
  border: none;
}

.lab-runner-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

/* Interactive Viewport */
.lab-canvas-viewport {
  flex: 1;
  position: relative;
  background: #02040a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  height: 100%;
  min-height: 0;
}
.lab-canvas-viewport canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Lab Controls Sidebar */
.lab-sidebar {
  width: 310px;
  background: rgba(10, 15, 28, 0.92);
  border-left: 1px solid var(--border-subtle);
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  flex-shrink: 0;
}
.lab-sidebar h3 {
  font-size: 0.96rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cyan-400);
}
.lab-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lab-control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.control-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.control-label-row label {
  font-size: 0.94rem;
  font-weight: 600;
  color: #f1f5f9;
}
.control-val {
  font-size: 0.92rem;
  font-weight: 700;
  font-family: monospace;
  color: var(--cyan-400);
  background: rgba(14, 165, 233, 0.15);
  padding: 2px 8px;
  border-radius: 5px;
}

.lab-control-group input[type="range"] {
  width: 100%;
  accent-color: var(--cyan-400);
  cursor: pointer;
  height: 6px;
}

.lab-control-group select {
  width: 100%;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 6px;
  color: #f1f5f9;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lab-control-group select:focus {
  border-color: var(--cyan-400);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.control-toggle-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.94rem;
  font-weight: 600;
  color: #f1f5f9;
  cursor: pointer;
}
.control-toggle-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--cyan-400);
  cursor: pointer;
}

/* Objectives list */
.lab-objectives-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lab-objectives-list li {
  display: flex;
  gap: 10px;
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.5;
}
.lab-objectives-list li span {
  color: var(--cyan-400);
  font-size: 0.85rem;
}

/* Telemetry HUD Footer */
.lab-telemetry-hud {
  padding: 8px 18px;
  background: rgba(15, 23, 42, 0.98);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}
.tel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}
.tel-card {
  background: rgba(10, 15, 28, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
}
.tel-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tel-val {
  font-size: 1.15rem;
  font-weight: 700;
  font-family: monospace;
  color: #f8fafc;
  margin-top: 2px;
}
.tel-val.highlight {
  color: var(--cyan-400);
}
.tel-val.danger {
  color: #f87171;
}
.tel-equation {
  font-size: 0.94rem;
  color: #cbd5e1;
  line-height: 1.6;
}
.tel-equation code {
  font-family: monospace;
  font-size: 0.96rem;
  font-weight: 600;
  color: #facc15;
  background: rgba(250, 204, 21, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
}
}

/* Mobile responsive adjustments */
@media (max-width: 920px) {
  .portal-nav-bar {
    display: flex;
    justify-content: space-between;
  }
  .nav-search-container {
    flex: 1;
    max-width: 420px;
    min-width: 0;
    margin: 0 12px;
  }
}
@media (max-width: 680px) {
  .nav-search-container {
    display: none;
  }
}
@media (max-width: 768px) {
  .portal-nav-bar {
    padding: 0 10px;
  }
  .portal-brand-text {
    display: none;
  }
  .home-stats-strip {
    flex-direction: column;
    align-items: stretch;
  }
  .stat-divider {
    width: 100%;
    height: 1px;
  }
  .home-workflow-grid,
  .home-subjects-grid,
  .standards-grid {
    grid-template-columns: 1fr;
  }
  .home-pricing-teaser {
    flex-direction: column;
    align-items: stretch;
  }
  .labs-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .labs-search-box input {
    width: 100%;
  }
  .labs-cards-grid {
    grid-template-columns: 1fr;
  }
  .labs-pro-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .lab-runner-container {
    max-height: 96vh;
    height: 96vh;
    overflow-y: auto;
  }
  .lab-runner-header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 14px;
  }
  .lab-runner-actions {
    justify-content: space-between;
    width: 100%;
  }
  .lab-playback-controls {
    flex-wrap: wrap;
    gap: 6px;
  }
  .lab-playback-controls .btn {
    font-size: 0.74rem;
    padding: 5px 9px;
  }
  .lab-info-panel {
    width: 94%;
    max-height: 75%;
  }
  .lab-info-panel-inner {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 14px;
  }
  .lab-runner-body {
    flex-direction: column;
    height: auto;
    min-height: auto;
    flex-shrink: 0;
  }
  .lab-canvas-viewport {
    height: 58vh;
    min-height: 460px;
    flex-shrink: 0;
  }
  .lab-sidebar {
    width: 100%;
    height: 360px;
    max-height: 360px;
    border-left: none;
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
  }
  .tel-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   Header Pricing Action & Special Card Buttons
   ========================================================================== */
.portal-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}
.btn-pricing {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.18), rgba(56, 189, 248, 0.15));
  border: 1px solid rgba(250, 204, 21, 0.5);
  color: #fef08a;
  padding: 6px 13px;
  font-size: 0.8rem;
  border-radius: 8px;
  transition: var(--transition-smooth);
}
.btn-pricing:hover {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.35), rgba(56, 189, 248, 0.3));
  border-color: #facc15;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.35);
  transform: translateY(-1px);
}
.btn-pricing .btn-icon {
  font-size: 0.95rem;
}

.btn-universe {
  background: linear-gradient(135deg, #0284c7, #38bdf8) !important;
  color: #020617 !important;
  font-weight: 700 !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
}
.btn-universe:hover {
  background: linear-gradient(135deg, #38bdf8, #7dd3fc) !important;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.7);
}

/* ==========================================================================
   Home Showcase View Styles
   ========================================================================== */
#home-view {
  background: radial-gradient(circle at 50% 8%, #0f1c3f 0%, #030712 60%, #010206 100%);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  z-index: 30;
  padding-top: 40px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.home-portal-inner {
  width: 100%;
  max-width: 1200px;
  padding: 0 20px 44px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex-shrink: 0;
}

/* Hero Section */
.home-hero {
  position: relative;
  text-align: center;
  padding: 24px 28px 22px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(56, 189, 248, 0.28);
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(56, 189, 248, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 70% 55% at 85% 90%, rgba(129, 140, 248, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 0%, rgba(15, 35, 80, 0.85) 0%, rgba(7, 13, 30, 0.94) 100%);
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.home-hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.75;
}
.home-hero > *:not(.home-hero-canvas) {
  position: relative;
  z-index: 1;
}
.home-hero-glow {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 200px;
  background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.22) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(40px);
}
.home-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--cyan-400);
  margin-top: 0;
  margin-bottom: 4px;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.15);
}
.badge-dot {
  width: 7px;
  height: 7px;
  background: #38bdf8;
  border-radius: 50%;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.home-hero-title {
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin-top: 2px;
  margin-bottom: 12px;
  max-width: 900px;
}
.gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 50%, #facc15 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.home-hero-desc {
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  color: #94a3b8;
  max-width: 820px;
  line-height: 1.55;
  margin-bottom: 18px;
}

.home-hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

/* Featured Interactive Simulators Showcase */
.home-featured-section {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: var(--radius-xl);
  padding: 20px 22px;
  backdrop-filter: blur(12px);
}
.home-featured-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.home-featured-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.9px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 2px 9px;
  border-radius: 999px;
  margin-bottom: 5px;
}
.home-featured-title-group h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #f8fafc;
}
.home-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.home-sim-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  padding: 14px 15px;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.home-sim-card:hover {
  transform: translateY(-2px);
  background: rgba(30, 41, 59, 0.92);
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.45), 0 0 16px rgba(56, 189, 248, 0.12);
}
.home-sim-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.home-sim-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: #7dd3fc;
}
.home-sim-fps {
  font-size: 0.66rem;
  font-weight: 600;
  color: #a78bfa;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 1px 7px;
  border-radius: 6px;
}
.home-sim-card h3 {
  margin: 0 0 5px 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: #f1f5f9;
}
.home-sim-card p {
  margin: 0 0 10px 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #94a3b8;
  flex: 1;
}
.home-sim-cta {
  font-size: 0.76rem;
  font-weight: 700;
  color: #38bdf8;
}
@media (max-width: 960px) {
  .home-featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .home-featured-grid {
    grid-template-columns: 1fr;
  }
}
.btn-primary-lg {
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.6);
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.35);
  transition: var(--transition-smooth);
}
.btn-primary-lg:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(14, 165, 233, 0.55);
}
.btn-secondary-lg {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-subtle);
  color: #f1f5f9;
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-secondary-lg:hover {
  background: rgba(51, 65, 85, 0.9);
  border-color: var(--cyan-400);
  color: var(--cyan-400);
  transform: translateY(-2px);
}
.btn-sub-pill {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 700;
}
.btn-pricing-lg {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.15), rgba(15, 23, 42, 0.8));
  border: 1px solid rgba(250, 204, 21, 0.45);
  color: #fef08a;
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-pricing-lg:hover {
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.3), rgba(15, 23, 42, 0.9));
  border-color: #facc15;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(250, 204, 21, 0.25);
}

/* Key Stats Strip */
.home-stats-strip {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 24px;
  width: 100%;
  max-width: 980px;
  margin: 28px auto 8px auto;
  backdrop-filter: var(--backdrop-blur);
  flex-wrap: wrap;
  gap: 16px;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.stat-number {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}
.stat-label {
  font-size: 0.72rem;
  color: #94a3b8;
  text-align: center;
  font-weight: 500;
}
.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border-subtle);
}

/* Section Header */
.home-section-header {
  text-align: center;
}
.section-tag-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--cyan-400);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 3px 12px;
  border-radius: 999px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.home-section-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 6px;
}
.home-section-header p {
  font-size: 0.88rem;
  color: #94a3b8;
  max-width: 720px;
  margin: 0 auto;
}

/* Research & Pedagogical Workflow */
.home-workflow-section {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.home-workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.workflow-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition-smooth);
  backdrop-filter: var(--backdrop-blur);
}
.workflow-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), 0 0 16px rgba(56, 189, 248, 0.15);
}
.workflow-step-badge {
  font-size: 0.68rem;
  font-weight: 800;
  color: #facc15;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.3);
  padding: 2px 8px;
  border-radius: 6px;
  align-self: flex-start;
  margin-bottom: 12px;
  letter-spacing: 0.06em;
}
.workflow-icon-wrap {
  font-size: 1.8rem;
  margin-bottom: 12px;
}
.workflow-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}
.workflow-card p {
  font-size: 0.84rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}
.workflow-subtext {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--cyan-400);
}

/* Features Grid */
.home-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.home-feature-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.home-feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan-400);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 16px rgba(56, 189, 248, 0.2);
}
.feature-icon-box {
  width: 44px;
  height: 44px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
}
.feature-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cyan-400);
  margin-bottom: 8px;
}
.home-feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}
.home-feature-card p {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}
.feature-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--cyan-400);
}

/* Subjects Grid */
.home-subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.home-subject-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  cursor: pointer;
  position: relative;
  backdrop-filter: var(--backdrop-blur);
}
.home-subject-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}
.subject-card-physics:hover {
  border-color: #38bdf8;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.25);
}
.subject-card-chemistry:hover {
  border-color: #34d399;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(52, 211, 153, 0.25);
}
.subject-card-biology:hover {
  border-color: #f43f5e;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(244, 63, 94, 0.25);
}
.subject-card-math:hover {
  border-color: #a78bfa;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(167, 139, 250, 0.25);
}
.subject-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.subject-card-icon {
  font-size: 1.8rem;
}
.subject-card-count {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--cyan-400);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 3px 9px;
  border-radius: 999px;
}
.home-subject-card h4 {
  font-size: 1.12rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}
.home-subject-card p {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.45;
  margin-bottom: 16px;
  flex-grow: 1;
}
.subject-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.chip-pill {
  font-size: 0.68rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.2);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.chip-nobel {
  color: #fef08a;
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(250, 204, 21, 0.45);
  font-weight: 700;
}
.chip-flagship {
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  font-weight: 700;
}
.subject-card-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--cyan-400);
  transition: var(--transition-smooth);
}
.home-subject-card:hover .subject-card-action {
  color: #ffffff;
}
.action-arrow {
  transition: transform 0.2s ease;
}
.home-subject-card:hover .action-arrow {
  transform: translateX(4px);
}

/* Institutional Standards Strip */
.home-standards-strip {
  background: radial-gradient(ellipse at 50% 0%, rgba(30, 41, 59, 0.6) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}
.standards-badge {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--cyan-400);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 8px;
}
.standards-content h3 {
  font-size: 1.22rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 20px;
}
.standards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.standard-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.standard-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.15);
  color: var(--cyan-400);
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 2px;
}
.standard-item div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.standard-item strong {
  font-size: 0.84rem;
  font-weight: 700;
  color: #f1f5f9;
}
.standard-item span {
  font-size: 0.74rem;
  color: #94a3b8;
  line-height: 1.4;
}

/* Upcoming Roadmap Grid */
.home-roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.roadmap-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}
.roadmap-card:hover {
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(15, 23, 42, 0.85);
  transform: translateY(-2px);
}
.roadmap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.roadmap-subject {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--cyan-400);
}
.roadmap-status {
  font-size: 0.65rem;
  font-weight: 700;
  color: #facc15;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.roadmap-card h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 6px;
}
.roadmap-card p {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.45;
}

/* Pricing Teaser */
.home-pricing-teaser {
  background: radial-gradient(circle at 80% 50%, rgba(250, 204, 21, 0.12) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1px solid rgba(250, 204, 21, 0.4);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.teaser-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: #facc15;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  display: inline-block;
}
.teaser-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}
.teaser-content p {
  font-size: 0.84rem;
  color: #cbd5e1;
  max-width: 650px;
  line-height: 1.45;
}
.btn-pro-glow {
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #020617;
  border: none;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(250, 204, 21, 0.35);
  transition: var(--transition-smooth);
}
.btn-pro-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(250, 204, 21, 0.55);
}

/* Home Footer & Semantic SEO Link Grid */
.home-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 40px;
  padding-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.footer-top-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.btn-footer-toggle-all {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--cyan-400);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-footer-toggle-all:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: var(--cyan-400);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
}
.footer-tagline {
  font-size: 0.88rem;
  color: #94a3b8;
  margin: 0;
}

.seo-footer-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.seo-footer-col {
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.seo-footer-col:hover {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(15, 23, 42, 0.78);
}
.seo-footer-col.expanded {
  border-color: rgba(56, 189, 248, 0.45);
}
.seo-footer-col h4 {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  cursor: pointer;
  user-select: none;
  line-height: 1.35;
}
.seo-footer-col h4::after {
  content: '▾';
  font-size: 0.85rem;
  color: var(--cyan-400);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.seo-footer-col.expanded h4 {
  color: var(--cyan-400);
}
.seo-footer-col.expanded h4::after {
  transform: rotate(180deg);
}
.seo-footer-subcats {
  display: none;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}
.seo-footer-col.expanded .seo-footer-subcats {
  display: flex;
}
.seo-footer-subcat {
  background: rgba(2, 6, 23, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  padding: 8px 10px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.seo-footer-subcat:hover {
  border-color: rgba(56, 189, 248, 0.3);
}
.seo-footer-subcat.expanded {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(2, 6, 23, 0.55);
}
.seo-footer-subcat h5 {
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  line-height: 1.35;
}
.seo-footer-subcat h5::after {
  content: '▾';
  font-size: 0.75rem;
  color: #94a3b8;
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}
.seo-footer-subcat.expanded h5 {
  color: var(--cyan-400);
}
.seo-footer-subcat.expanded h5::after {
  transform: rotate(180deg);
  color: var(--cyan-400);
}
.seo-footer-list {
  list-style: none;
  display: none;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 0 0;
  padding: 8px 6px 2px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.35) transparent;
}
.seo-footer-subcat.expanded .seo-footer-list {
  display: flex;
}
.seo-footer-list li a {
  font-size: 0.8rem;
  color: #94a3b8;
  text-decoration: none;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.35;
}
.seo-footer-list li a:hover {
  color: #38bdf8;
  transform: translateX(3px);
}
.seo-footer-list li a::before {
  content: '›';
  color: #64748b;
  font-weight: bold;
  flex-shrink: 0;
}

.seo-stem-overview-strip {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.seo-stem-overview-strip h5 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #facc15;
  margin: 0;
}
.seo-stem-overview-strip p {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  font-size: 0.78rem;
  color: #64748b;
}

/* ==========================================================================
   Pricing Modal Styles
   ========================================================================== */
.pricing-modal-container {
  background: var(--bg-surface-elevated);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 1060px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85);
  animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.pricing-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.pricing-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--cyan-400);
  background: rgba(56, 189, 248, 0.12);
  padding: 3px 8px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 8px;
}
.pricing-header-titles h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}
.pricing-header-titles p {
  font-size: 0.85rem;
  color: #94a3b8;
}

/* Billing Toggle Switch */
.pricing-billing-switch {
  display: flex;
  align-self: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}
.billing-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.billing-btn.active {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.4);
}
.save-tag {
  background: #facc15;
  color: #020617;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
}

/* Pricing Cards Grid */
.pricing-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.pricing-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: var(--transition-smooth);
}
.pricing-card:hover {
  transform: translateY(-3px);
  border-color: rgba(148, 163, 184, 0.4);
}
.pricing-card.pro {
  background: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.12) 0%, rgba(15, 23, 42, 0.9) 75%);
  border: 1.5px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.15);
}
.pricing-card.pro:hover {
  border-color: #38bdf8;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6), 0 0 28px rgba(56, 189, 248, 0.3);
}
.featured-ribbon {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #020617;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(250, 204, 21, 0.4);
}

.plan-header {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
}
.plan-type {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  display: block;
  margin-bottom: 8px;
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 8px;
}
.price-amount {
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
}
.price-period {
  font-size: 0.8rem;
  color: #94a3b8;
}
.plan-summary {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  flex-grow: 1;
}
.plan-features li {
  font-size: 0.8rem;
  color: #cbd5e1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.35;
}
.check-icon {
  color: #38bdf8;
  font-weight: 800;
  font-size: 0.85rem;
}
.check-icon.gold {
  color: #facc15;
}

.plan-cta-btn {
  width: 100%;
  justify-content: center;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 10px;
}
.plan-cta-btn.current {
  background: rgba(30, 41, 59, 0.8);
  border-color: var(--border-subtle);
  color: #94a3b8;
  cursor: default;
}

/* FAQ Strip in modal */
.pricing-faq-strip {
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.faq-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.76rem;
  color: #94a3b8;
  line-height: 1.4;
}
.faq-item strong {
  color: #e2e8f0;
}

/* Toast Notice */
.pricing-toast-notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #f8fafc;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(56, 189, 248, 0.2);
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pricing-toast-notice.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Pricing & Checkout Modal Visibility Overrides */
#pricing-modal.open,
#checkout-modal.open {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
  z-index: 2600 !important;
}

/* Plan Active Styles in Pricing Modal */
.pricing-card.current-active-plan {
  border: 1.5px solid #10b981 !important;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.25) !important;
}
.btn.btn-active-plan {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: #10b981 !important;
  color: #10b981 !important;
  cursor: default !important;
}

/* ==========================================================================
   Stripe Checkout Modal Styles
   ========================================================================== */
.checkout-modal-container {
  background: #0b1329;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), 0 0 30px rgba(56, 189, 248, 0.2);
  animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.checkout-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.checkout-badge {
  font-size: 0.65rem;
  font-weight: 800;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 3px 8px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 6px;
}

.checkout-brand h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 2px;
}

.checkout-brand p {
  font-size: 0.8rem;
  color: #94a3b8;
}

/* Order Summary Box */
.checkout-order-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  padding: 14px 18px;
}

.summary-plan-details {
  display: flex;
  align-items: center;
  gap: 12px;
}

.summary-plan-icon {
  font-size: 1.8rem;
  width: 44px;
  height: 44px;
  background: rgba(56, 189, 248, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.summary-plan-details strong {
  display: block;
  font-size: 0.95rem;
  color: #f8fafc;
}

.summary-plan-details span {
  font-size: 0.78rem;
  color: #38bdf8;
}

.summary-price-box {
  text-align: right;
}

.summary-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  display: block;
}

.summary-term {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* Payment Mode Tabs */
.payment-modes-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  padding-bottom: 8px;
}

.payment-mode-tab {
  flex: 1;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.payment-mode-tab:hover {
  background: rgba(30, 41, 59, 0.6);
  color: #f1f5f9;
}

.payment-mode-tab.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Card Inputs */
.card-input-wrapper {
  position: relative;
}

.card-brand-icons {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 4px;
}

.brand-tag {
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 2px 5px;
  border-radius: 4px;
  color: #cbd5e1;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Wallets */
.wallet-payment-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}

.wallet-buttons-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-gpay {
  background: #000000;
  border: 1px solid #3c4043;
  color: #ffffff;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-gpay:hover {
  background: #1f1f1f;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.btn-applepay {
  background: #000000;
  border: 1px solid #3c4043;
  color: #ffffff;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-applepay:hover {
  background: #1a1a1a;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.wallet-note {
  font-size: 0.72rem;
  color: #64748b;
}

/* Net Banking & UPI */
.netbanking-label {
  font-size: 0.8rem;
  color: #cbd5e1;
  display: block;
  margin-bottom: 8px;
}

.bank-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bank-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  color: #f1f5f9;
  cursor: pointer;
}

.bank-pill:hover {
  border-color: #38bdf8;
}

/* Checkout Footer */
.checkout-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.checkout-pay-btn {
  width: 100%;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  border: none;
  border-radius: 10px;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.4);
  transition: all 0.2s ease;
}

.checkout-pay-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(2, 132, 199, 0.55);
}

.checkout-demo-btn {
  width: 100%;
  padding: 8px;
  font-size: 0.8rem;
  background: rgba(16, 185, 129, 0.15);
  border: 1px dashed rgba(16, 185, 129, 0.5);
  color: #34d399;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.checkout-demo-btn:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
}

.checkout-guarantee {
  text-align: center;
  font-size: 0.72rem;
  color: #94a3b8;
}

.pricing-toast-notice {
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #38bdf8;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(56, 189, 248, 0.3);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.pricing-toast-notice.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Scale-Linked Simulation Launcher inside Info Card */
.card-scale-lab-box {
  margin-top: 14px;
  padding: 12px 14px;
  background: radial-gradient(circle at 10% 0%, rgba(14, 165, 233, 0.22) 0%, rgba(15, 23, 42, 0.9) 100%);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(14, 165, 233, 0.2);
}

.scale-lab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.scale-lab-badge {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.01em;
}

.scale-lab-level {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  color: #facc15;
  background: rgba(250, 204, 21, 0.12);
  border-radius: 4px;
  padding: 1px 5px;
}

.scale-lab-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.hud-launch-lab-btn {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  width: 100%;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 12px;
  margin-top: 2px;
  border-radius: 8px;
}

/* ==========================================================================
   Global Simulation Search & Navigation Bar Upgrades
   ========================================================================== */
.portal-nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.nav-search-container {
  position: relative;
  width: 100%;
  min-width: 320px;
  max-width: 680px;
  margin: 0 auto;
  justify-self: center;
}

.nav-search-input-wrap,
.nav-search-box {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  padding: 6px 14px;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) inset;
}

.nav-search-input-wrap:focus-within,
.nav-search-box:focus-within {
  border-color: var(--cyan-400);
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18), 0 2px 10px rgba(0, 0, 0, 0.3);
}

.nav-search-icon {
  font-size: 0.88rem;
  opacity: 0.8;
  color: #94a3b8;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f8fafc;
  font-size: 0.85rem;
  font-family: inherit;
  padding: 0;
  line-height: 1.4;
  min-width: 0;
}

.nav-search-input::placeholder {
  color: #64748b;
  font-weight: 400;
}

.nav-search-kbd {
  font-size: 0.68rem;
  font-family: monospace;
  font-weight: 600;
  background: rgba(51, 65, 85, 0.55);
  color: #94a3b8;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  line-height: 1;
  flex-shrink: 0;
  user-select: none;
}

.nav-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.65), 0 0 15px rgba(56, 189, 248, 0.15);
  max-height: 480px;
  overflow-y: auto;
  z-index: 1000;
}

.search-results-list {
  display: flex;
  flex-direction: column;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(51, 65, 85, 0.35);
  cursor: pointer;
  transition: background 0.15s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover,
.search-result-item.selected {
  background: rgba(56, 189, 248, 0.12);
}

.search-item-icon {
  font-size: 1.25rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.search-item-info {
  flex: 1;
  min-width: 0;
}

.search-item-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.search-item-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-match {
  background: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-weight: 700;
  border-radius: 2px;
  padding: 0 1px;
}

.search-item-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-free {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-pro {
  background: rgba(234, 179, 8, 0.2);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.search-item-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  gap: 6px;
  align-items: center;
}

.search-item-arrow {
  color: var(--text-muted);
  font-size: 0.85rem;
  opacity: 0.6;
}

.search-empty-state {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

/* ==========================================================================
   Login Button, Login Modal & User Profile Popover
   ========================================================================== */
.btn-login-nav,
.portal-tab-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #f1f5f9;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-login-nav:hover,
.portal-tab-login:hover {
  border-color: #38bdf8;
  color: #ffffff;
  background: rgba(56, 189, 248, 0.15);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.btn-login-nav.logged-in,
.portal-tab-login.logged-in {
  background: rgba(14, 165, 233, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

/* Navigation Auth Groups & Direct Profile/Logout Controls */
.nav-auth-logged-out,
.nav-auth-logged-in {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Direct Demo Account Button in Navbar */
.btn-nav-demo-direct {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(6, 182, 212, 0.16);
  border: 1px solid rgba(6, 182, 212, 0.55);
  color: #22d3ee;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-nav-demo-direct:hover {
  background: rgba(6, 182, 212, 0.3);
  border-color: #22d3ee;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.45);
  transform: translateY(-1px);
}

/* Direct Profile Button in Navbar */
.btn-nav-profile-direct {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-nav-profile-direct:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}

/* Direct Log Out Button in Navbar */
.btn-nav-logout-direct {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-nav-logout-direct:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

/* User Identity Badge Button in Navbar */
.btn-user-identity {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 4px 12px 4px 6px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #f1f5f9;
}

.btn-user-identity:hover {
  border-color: #38bdf8;
  background: rgba(30, 41, 59, 0.9);
}

.nav-user-avatar {
  font-size: 1.1rem;
  width: 26px;
  height: 26px;
  background: rgba(56, 189, 248, 0.15);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-user-meta {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.nav-user-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #f8fafc;
}

.nav-user-inst {
  font-size: 0.68rem;
  color: #94a3b8;
}

/* Modal z-index and animation rules */
#login-modal {
  z-index: 2500;
}

#login-modal.open {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

/* User Profile Menu Dropdown */
.user-profile-menu {
  position: absolute;
  top: 54px;
  right: 18px;
  width: 290px;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(56, 189, 248, 0.15);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-avatar-badge {
  font-size: 1.8rem;
  width: 44px;
  height: 44px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-user-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
  margin: 0;
}

.profile-role {
  font-size: 0.75rem;
  color: #38bdf8;
  font-weight: 600;
}

.profile-inst {
  font-size: 0.72rem;
  color: #94a3b8;
}

.profile-divider {
  height: 1px;
  background: rgba(51, 65, 85, 0.5);
}

.profile-features-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.78rem;
  color: #cbd5e1;
}

.profile-feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-tier-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  margin-top: 4px;
}

.profile-tier-pill.tier-pro {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.25), rgba(250, 204, 21, 0.35));
  border-color: #facc15;
  color: #fef08a;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.3);
}

.btn-pro-upgrade {
  width: 100%;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  border: 1px solid rgba(56, 189, 248, 0.6);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-pro-upgrade:hover {
  background: linear-gradient(135deg, #38bdf8, #7dd3fc);
  color: #020617;
  transform: translateY(-1px);
}

.btn-profile-view {
  width: 100%;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #f1f5f9;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 6px;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-profile-view:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

.btn-logout {
  width: 100%;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #ffffff;
}

/* Login Modal Container */
.login-modal-container {
  width: 100%;
  max-width: 440px;
  background: radial-gradient(circle at 50% 0%, #1e293b 0%, #090e1a 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.login-modal-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #38bdf8;
  margin-bottom: 4px;
}

.login-modal-title-group h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.login-modal-title-group p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.auth-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.8);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(51, 65, 85, 0.5);
  gap: 4px;
}

.auth-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn:hover {
  color: #ffffff;
}

.auth-tab-btn.active {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  font-weight: 700;
}

.login-alert {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-size: 0.78rem;
  padding: 8px 12px;
  border-radius: 6px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-link {
  font-size: 0.72rem;
  color: #38bdf8;
  text-decoration: none;
}

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

.form-input {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(71, 85, 105, 0.5);
  border-radius: 8px;
  padding: 9px 12px;
  color: #ffffff;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.form-checkbox-row {
  display: flex;
  align-items: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #94a3b8;
  cursor: pointer;
}

.w-full {
  width: 100%;
}

.sso-pane-content,
.demo-pane-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sso-desc,
.demo-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.sso-subtext {
  font-size: 0.7rem;
  color: #64748b;
  text-align: center;
  margin: 4px 0 0 0;
}

.demo-buttons-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-choice-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(71, 85, 105, 0.5);
}

.demo-choice-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
}

.demo-btn-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.demo-btn-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.demo-btn-info strong {
  font-size: 0.85rem;
  color: #ffffff;
}

.demo-btn-info span {
  font-size: 0.72rem;
  color: #94a3b8;
}

/* Toast alert notification */
.auth-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.25);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.labs-breadcrumb-row {
  margin-bottom: 8px;
}

/* ==========================================================================
   User Profile & Scholar Workspace Modal Styles
   ========================================================================== */
#profile-modal {
  z-index: 2600;
}

#profile-modal.open {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

.profile-modal-container {
  width: 100%;
  max-width: 520px;
  background: radial-gradient(circle at 50% 0%, #1e293b 0%, #090e1a 100%);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(56, 189, 248, 0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 90vh;
  overflow-y: auto;
}

.profile-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.profile-header-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-avatar-large {
  font-size: 2.2rem;
  width: 54px;
  height: 54px;
  background: rgba(56, 189, 248, 0.15);
  border: 2px solid rgba(56, 189, 248, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-titles h3 {
  margin: 0 0 2px 0;
  font-size: 1.25rem;
  color: #ffffff;
}

.profile-role-tag {
  font-size: 0.78rem;
  color: #38bdf8;
  font-weight: 600;
  display: block;
}

.profile-titles small {
  font-size: 0.75rem;
  color: #94a3b8;
}

.profile-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  gap: 12px;
}

.plan-details-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.plan-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.plan-current-tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.08em;
}

.plan-card-header h4 {
  margin: 4px 0 0 0;
  font-size: 1.1rem;
  color: #ffffff;
}

.plan-status-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
}

.plan-desc {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0;
}

.plan-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.saved-sims-empty {
  text-align: center;
  padding: 28px 16px;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.saved-sims-empty .empty-icon {
  font-size: 2.2rem;
  margin-bottom: 4px;
}

.saved-sims-empty p {
  font-size: 0.9rem;
  font-weight: 600;
  color: #cbd5e1;
  margin: 0;
}

.saved-sims-empty small {
  font-size: 0.75rem;
  max-width: 380px;
  line-height: 1.4;
}

/* ==========================================================================
   Theme Switcher Button & Warm / White Theme
   ========================================================================== */
.btn-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-theme-toggle:hover {
  background: rgba(56, 189, 248, 0.16);
  border-color: var(--cyan-400);
  color: #ffffff;
  transform: translateY(-1px);
}
.theme-toggle-icon {
  font-size: 0.9rem;
}
.theme-toggle-label {
  font-size: 0.76rem;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Crisp Modern Light Color Theme (data-theme="light", .theme-light)
   High-Contrast Scientific Publication Aesthetic
   ========================================================================== */
[data-theme="warm"],
[data-theme="light"],
.theme-light, .theme-warm {
  --bg-dark: #faf8f5;
  --bg-surface: rgba(255, 255, 255, 0.96);
  --bg-surface-elevated: #ffffff;
  --bg-card: #ffffff;

  --border-subtle: rgba(215, 205, 195, 0.75);
  --border-highlight: rgba(2, 132, 199, 0.55);
  --border-accent: rgba(217, 119, 6, 0.55);

  --cyan-400: #0284c7;
  --cyan-500: #0369a1;
  --cyan-900-20: rgba(2, 132, 199, 0.12);

  --gold-400: #d97706;
  --gold-900-20: rgba(217, 119, 6, 0.14);

  --text-main: #1c1917;
  --text-muted: #475569;
  --text-dim: #64748b;

  --backdrop-blur: blur(14px);
}

/* Global Body & Document Defaults */
[data-theme="warm"] body,
[data-theme="light"] body,
.theme-light body , .theme-warm body {
  background: #faf8f5;
  color: #1c1917;
}

/* Theme Toggle Button */
[data-theme="warm"] .btn-theme-toggle,
[data-theme="light"] .btn-theme-toggle,
.theme-light .btn-theme-toggle , .theme-warm .btn-theme-toggle {
  background: #ffffff;
  border-color: rgba(210, 198, 185, 0.85);
  color: #1c1917;
  box-shadow: 0 1px 4px rgba(60, 45, 30, 0.06);
}
[data-theme="warm"] .btn-theme-toggle:hover,
[data-theme="light"] .btn-theme-toggle:hover,
.theme-light .btn-theme-toggle:hover , .theme-warm .btn-theme-toggle:hover {
  background: rgba(217, 119, 6, 0.12);
  border-color: #d97706;
  color: #b45309;
}

/* ==========================================================================
   1. Portal Navigation Bar (Top Bar)
   ========================================================================== */
[data-theme="warm"] .portal-nav-bar,
[data-theme="light"] .portal-nav-bar,
.theme-light .portal-nav-bar , .theme-warm .portal-nav-bar {
  background: rgba(253, 250, 245, 0.96);
  border-bottom: 1px solid rgba(215, 205, 195, 0.8);
  box-shadow: 0 1px 8px rgba(90, 70, 50, 0.05);
}

[data-theme="warm"] .portal-brand-text,
[data-theme="light"] .portal-brand-text,
.theme-light .portal-brand-text , .theme-warm .portal-brand-text {
  color: #1c1917;
}

[data-theme="warm"] .nav-search-input-wrap,
[data-theme="light"] .nav-search-input-wrap,
.theme-light .nav-search-input-wrap , .theme-warm .nav-search-input-wrap {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.85);
  box-shadow: 0 1px 4px rgba(80, 60, 40, 0.05);
}
[data-theme="warm"] .nav-search-input-wrap:focus-within,
[data-theme="light"] .nav-search-input-wrap:focus-within,
.theme-light .nav-search-input-wrap:focus-within , .theme-warm .nav-search-input-wrap:focus-within {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15), 0 2px 8px rgba(80, 60, 40, 0.08);
}

[data-theme="warm"] .nav-search-icon,
[data-theme="light"] .nav-search-icon,
.theme-light .nav-search-icon , .theme-warm .nav-search-icon {
  color: #64748b;
  opacity: 1;
}

[data-theme="warm"] .nav-search-input,
[data-theme="light"] .nav-search-input,
.theme-light .nav-search-input , .theme-warm .nav-search-input {
  color: #1c1917;
  caret-color: #0284c7;
}

[data-theme="warm"] .nav-search-input::placeholder,
[data-theme="light"] .nav-search-input::placeholder,
.theme-light .nav-search-input::placeholder , .theme-warm .nav-search-input::placeholder {
  color: #64748b;
}

[data-theme="warm"] .nav-search-kbd,
[data-theme="light"] .nav-search-kbd,
.theme-light .nav-search-kbd , .theme-warm .nav-search-kbd {
  background: #f1f5f9;
  border-color: rgba(200, 188, 175, 0.8);
  color: #475569;
}

[data-theme="warm"] .nav-search-dropdown,
[data-theme="light"] .nav-search-dropdown,
.theme-light .nav-search-dropdown , .theme-warm .nav-search-dropdown {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.85);
  box-shadow: 0 12px 36px rgba(60, 45, 30, 0.12);
}

[data-theme="warm"] .search-result-item:hover,
[data-theme="warm"] .search-result-item.selected,
[data-theme="light"] .search-result-item:hover,
[data-theme="light"] .search-result-item.selected,
.theme-light .search-result-item:hover, .theme-warm .search-result-item:hover,
.theme-light .search-result-item.selected , .theme-warm .search-result-item.selected {
  background: rgba(2, 132, 199, 0.08);
}

[data-theme="warm"] .search-item-title,
[data-theme="light"] .search-item-title,
.theme-light .search-item-title , .theme-warm .search-item-title {
  color: #1c1917;
}

[data-theme="warm"] .search-item-subject,
[data-theme="light"] .search-item-subject,
.theme-light .search-item-subject , .theme-warm .search-item-subject {
  color: #0284c7;
}

[data-theme="warm"] .search-item-domain,
[data-theme="light"] .search-item-domain,
.theme-light .search-item-domain , .theme-warm .search-item-domain {
  color: #64748b;
}

[data-theme="warm"] .search-no-results,
[data-theme="light"] .search-no-results,
.theme-light .search-no-results , .theme-warm .search-no-results {
  color: #64748b;
}

/* Nav Auth Buttons (Logged-out & Logged-in) */
[data-theme="warm"] .btn-login-nav,
[data-theme="warm"] .portal-tab-login,
[data-theme="light"] .btn-login-nav,
[data-theme="light"] .portal-tab-login,
.theme-light .btn-login-nav, .theme-warm .btn-login-nav,
.theme-light .portal-tab-login , .theme-warm .portal-tab-login {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.85);
  color: #1c1917;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
[data-theme="warm"] .btn-login-nav:hover,
[data-theme="warm"] .portal-tab-login:hover,
[data-theme="light"] .btn-login-nav:hover,
[data-theme="light"] .portal-tab-login:hover,
.theme-light .btn-login-nav:hover, .theme-warm .btn-login-nav:hover,
.theme-light .portal-tab-login:hover , .theme-warm .portal-tab-login:hover {
  background: rgba(2, 132, 199, 0.08);
  border-color: #0284c7;
  color: #0284c7;
}

[data-theme="warm"] .btn-nav-profile-direct,
[data-theme="light"] .btn-nav-profile-direct,
.theme-light .btn-nav-profile-direct , .theme-warm .btn-nav-profile-direct {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.85);
  color: #1c1917;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
[data-theme="warm"] .btn-nav-profile-direct:hover,
[data-theme="light"] .btn-nav-profile-direct:hover,
.theme-light .btn-nav-profile-direct:hover , .theme-warm .btn-nav-profile-direct:hover {
  background: rgba(2, 132, 199, 0.08);
  border-color: #0284c7;
  color: #0284c7;
}

[data-theme="warm"] .btn-nav-demo-direct,
[data-theme="light"] .btn-nav-demo-direct,
.theme-light .btn-nav-demo-direct , .theme-warm .btn-nav-demo-direct {
  background: #ffffff;
  border: 1px solid rgba(2, 132, 199, 0.6);
  color: #0284c7;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
[data-theme="warm"] .btn-nav-demo-direct:hover,
[data-theme="light"] .btn-nav-demo-direct:hover,
.theme-light .btn-nav-demo-direct:hover , .theme-warm .btn-nav-demo-direct:hover {
  background: rgba(2, 132, 199, 0.1);
  border-color: #0369a1;
  color: #0369a1;
}

[data-theme="warm"] .btn-nav-logout-direct,
[data-theme="light"] .btn-nav-logout-direct,
.theme-light .btn-nav-logout-direct , .theme-warm .btn-nav-logout-direct {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #dc2626;
}
[data-theme="warm"] .btn-nav-logout-direct:hover,
[data-theme="light"] .btn-nav-logout-direct:hover,
.theme-light .btn-nav-logout-direct:hover , .theme-warm .btn-nav-logout-direct:hover {
  background: rgba(239, 68, 68, 0.16);
  border-color: #dc2626;
  color: #b91c1c;
}

[data-theme="warm"] .btn-user-identity,
[data-theme="light"] .btn-user-identity,
.theme-light .btn-user-identity , .theme-warm .btn-user-identity {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.85);
  color: #1c1917;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
[data-theme="warm"] .btn-user-identity:hover,
[data-theme="light"] .btn-user-identity:hover,
.theme-light .btn-user-identity:hover , .theme-warm .btn-user-identity:hover {
  border-color: #0284c7;
  background: #f8fafc;
}

[data-theme="warm"] .nav-user-name,
[data-theme="light"] .nav-user-name,
.theme-light .nav-user-name , .theme-warm .nav-user-name {
  color: #1c1917;
}
[data-theme="warm"] .nav-user-inst,
[data-theme="light"] .nav-user-inst,
.theme-light .nav-user-inst , .theme-warm .nav-user-inst {
  color: #64748b;
}

[data-theme="warm"] .user-profile-menu,
[data-theme="light"] .user-profile-menu,
.theme-light .user-profile-menu , .theme-warm .user-profile-menu {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.85);
  box-shadow: 0 16px 40px rgba(50, 35, 20, 0.15);
}
[data-theme="warm"] .profile-name,
[data-theme="light"] .profile-name,
.theme-light .profile-name , .theme-warm .profile-name {
  color: #1c1917;
}
[data-theme="warm"] .profile-role,
[data-theme="light"] .profile-role,
.theme-light .profile-role , .theme-warm .profile-role {
  color: #0284c7;
}
[data-theme="warm"] .profile-inst,
[data-theme="light"] .profile-inst,
.theme-light .profile-inst , .theme-warm .profile-inst {
  color: #64748b;
}
[data-theme="warm"] .profile-divider,
[data-theme="light"] .profile-divider,
.theme-light .profile-divider , .theme-warm .profile-divider {
  background: rgba(210, 198, 185, 0.6);
}
[data-theme="warm"] .profile-tier-pill,
[data-theme="light"] .profile-tier-pill,
.theme-light .profile-tier-pill , .theme-warm .profile-tier-pill {
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid rgba(2, 132, 199, 0.25);
  color: #0284c7;
}
[data-theme="warm"] .btn-profile-view,
[data-theme="light"] .btn-profile-view,
.theme-light .btn-profile-view , .theme-warm .btn-profile-view {
  background: #f8fafc;
  border: 1px solid rgba(210, 198, 185, 0.85);
  color: #1c1917;
}
[data-theme="warm"] .btn-profile-view:hover,
[data-theme="light"] .btn-profile-view:hover,
.theme-light .btn-profile-view:hover , .theme-warm .btn-profile-view:hover {
  background: rgba(2, 132, 199, 0.08);
  border-color: #0284c7;
  color: #0284c7;
}

/* ==========================================================================
   2. Home Showcase View
   ========================================================================== */
[data-theme="warm"] #home-view,
[data-theme="light"] #home-view,
.theme-light #home-view , .theme-warm #home-view {
  background: radial-gradient(circle at 50% 6%, #ffffff 0%, #faf6f0 40%, #f4ece1 100%);
}

[data-theme="warm"] .home-hero,
[data-theme="light"] .home-hero,
.theme-light .home-hero , .theme-warm .home-hero {
  background:
    radial-gradient(ellipse 80% 60% at 15% 15%, rgba(14, 165, 233, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 70% 55% at 85% 85%, rgba(99, 102, 241, 0.10) 0%, transparent 60%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.92) 55%, rgba(240, 249, 255, 0.94) 100%);
  border: 1px solid rgba(14, 165, 233, 0.22);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="warm"] .home-hero-glow,
[data-theme="light"] .home-hero-glow,
.theme-light .home-hero-glow , .theme-warm .home-hero-glow {
  background: radial-gradient(ellipse at center, rgba(2, 132, 199, 0.1) 0%, transparent 70%);
}

[data-theme="warm"] .home-hero-badge,
[data-theme="light"] .home-hero-badge,
.theme-light .home-hero-badge , .theme-warm .home-hero-badge {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.85);
  color: #0369a1;
  box-shadow: 0 2px 8px rgba(80, 60, 40, 0.05);
}

[data-theme="warm"] .home-hero-title,
[data-theme="light"] .home-hero-title,
.theme-light .home-hero-title , .theme-warm .home-hero-title {
  color: #1c1917;
}

[data-theme="warm"] .home-hero-title .gradient-text,
[data-theme="light"] .home-hero-title .gradient-text,
.theme-light .home-hero-title .gradient-text , .theme-warm .home-hero-title .gradient-text {
  background: linear-gradient(135deg, #0284c7 0%, #4338ca 50%, #b45309 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Featured Simulators – Light / Warm Theme */
[data-theme="warm"] .home-featured-section,
[data-theme="light"] .home-featured-section,
.theme-light .home-featured-section, .theme-warm .home-featured-section {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(210, 198, 185, 0.75);
}
[data-theme="warm"] .home-featured-title-group h2,
[data-theme="light"] .home-featured-title-group h2,
.theme-light .home-featured-title-group h2, .theme-warm .home-featured-title-group h2 {
  color: #1c1917;
}
[data-theme="warm"] .home-sim-card,
[data-theme="light"] .home-sim-card,
.theme-light .home-sim-card, .theme-warm .home-sim-card {
  background: #f8fafc;
  border: 1px solid rgba(210, 198, 185, 0.65);
}
[data-theme="warm"] .home-sim-card:hover,
[data-theme="light"] .home-sim-card:hover,
.theme-light .home-sim-card:hover, .theme-warm .home-sim-card:hover {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}
[data-theme="warm"] .home-sim-card h3,
[data-theme="light"] .home-sim-card h3,
.theme-light .home-sim-card h3, .theme-warm .home-sim-card h3 {
  color: #1c1917;
}
[data-theme="warm"] .home-sim-card p,
[data-theme="light"] .home-sim-card p,
.theme-light .home-sim-card p, .theme-warm .home-sim-card p {
  color: #475569;
}
[data-theme="warm"] .home-sim-tag,
[data-theme="light"] .home-sim-tag,
.theme-light .home-sim-tag, .theme-warm .home-sim-tag,
[data-theme="warm"] .home-sim-cta,
[data-theme="light"] .home-sim-cta,
.theme-light .home-sim-cta, .theme-warm .home-sim-cta {
  color: #0369a1;
}

[data-theme="warm"] .home-hero-desc,
[data-theme="light"] .home-hero-desc,
.theme-light .home-hero-desc , .theme-warm .home-hero-desc {
  color: #334155;
}

[data-theme="warm"] .btn-secondary-lg,
[data-theme="light"] .btn-secondary-lg,
.theme-light .btn-secondary-lg , .theme-warm .btn-secondary-lg {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.85);
  color: #1c1917;
  box-shadow: 0 2px 8px rgba(80, 60, 40, 0.05);
}
[data-theme="warm"] .btn-secondary-lg:hover,
[data-theme="light"] .btn-secondary-lg:hover,
.theme-light .btn-secondary-lg:hover , .theme-warm .btn-secondary-lg:hover {
  background: #fdfbf7;
  border-color: #0284c7;
  color: #0284c7;
}

[data-theme="warm"] .btn-pricing-lg,
[data-theme="light"] .btn-pricing-lg,
.theme-light .btn-pricing-lg , .theme-warm .btn-pricing-lg {
  background: #ffffff;
  border: 1px solid rgba(217, 119, 6, 0.45);
  color: #b45309;
}
[data-theme="warm"] .btn-pricing-lg:hover,
[data-theme="light"] .btn-pricing-lg:hover,
.theme-light .btn-pricing-lg:hover , .theme-warm .btn-pricing-lg:hover {
  background: rgba(217, 119, 6, 0.08);
  border-color: #d97706;
  color: #92400e;
}

[data-theme="warm"] .home-stats-strip,
[data-theme="light"] .home-stats-strip,
.theme-light .home-stats-strip , .theme-warm .home-stats-strip {
  background: #ffffff;
  border: 1px solid rgba(215, 205, 195, 0.85);
  box-shadow: 0 4px 20px rgba(80, 60, 40, 0.05);
}

[data-theme="warm"] .stat-number,
[data-theme="light"] .stat-number,
.theme-light .stat-number , .theme-warm .stat-number {
  color: #1c1917;
}

[data-theme="warm"] .stat-label,
[data-theme="light"] .stat-label,
.theme-light .stat-label , .theme-warm .stat-label {
  color: #475569;
}

[data-theme="warm"] .stat-divider,
[data-theme="light"] .stat-divider,
.theme-light .stat-divider , .theme-warm .stat-divider {
  background: rgba(215, 205, 195, 0.7);
}

/* Institutional Standards Strip */
[data-theme="warm"] .home-standards-strip,
[data-theme="light"] .home-standards-strip,
.theme-light .home-standards-strip , .theme-warm .home-standards-strip {
  background: #ffffff;
  border: 1px solid rgba(215, 205, 195, 0.85);
  box-shadow: 0 4px 20px rgba(80, 60, 40, 0.05);
}

[data-theme="warm"] .standards-badge,
[data-theme="light"] .standards-badge,
.theme-light .standards-badge , .theme-warm .standards-badge {
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.25);
  color: #0284c7;
}

[data-theme="warm"] .standards-content h3,
[data-theme="light"] .standards-content h3,
.theme-light .standards-content h3 , .theme-warm .standards-content h3 {
  color: #1c1917;
}

[data-theme="warm"] .standard-check,
[data-theme="light"] .standard-check,
.theme-light .standard-check , .theme-warm .standard-check {
  background: rgba(2, 132, 199, 0.12);
  color: #0284c7;
}

[data-theme="warm"] .standard-item strong,
[data-theme="light"] .standard-item strong,
.theme-light .standard-item strong , .theme-warm .standard-item strong {
  color: #1c1917;
}

[data-theme="warm"] .standard-item span,
[data-theme="light"] .standard-item span,
.theme-light .standard-item span , .theme-warm .standard-item span {
  color: #475569;
}

/* Workflow Cards, Features, Subjects, Roadmap */
[data-theme="warm"] .workflow-card,
[data-theme="warm"] .home-feature-card,
[data-theme="warm"] .home-subject-card,
[data-theme="warm"] .home-roadmap-card,
[data-theme="light"] .workflow-card,
[data-theme="light"] .home-feature-card,
[data-theme="light"] .home-subject-card,
[data-theme="light"] .home-roadmap-card,
.theme-light .workflow-card, .theme-warm .workflow-card,
.theme-light .home-feature-card, .theme-warm .home-feature-card,
.theme-light .home-subject-card, .theme-warm .home-subject-card,
.theme-light .home-roadmap-card , .theme-warm .home-roadmap-card {
  background: #ffffff;
  border: 1px solid rgba(215, 205, 195, 0.85);
  box-shadow: 0 4px 18px rgba(80, 60, 40, 0.05);
}

[data-theme="warm"] .workflow-card:hover,
[data-theme="warm"] .home-feature-card:hover,
[data-theme="warm"] .home-subject-card:hover,
[data-theme="light"] .workflow-card:hover,
[data-theme="light"] .home-feature-card:hover,
[data-theme="light"] .home-subject-card:hover,
.theme-light .workflow-card:hover, .theme-warm .workflow-card:hover,
.theme-light .home-feature-card:hover, .theme-warm .home-feature-card:hover,
.theme-light .home-subject-card:hover , .theme-warm .home-subject-card:hover {
  border-color: #0284c7;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.12);
}

[data-theme="warm"] .workflow-card h3,
[data-theme="warm"] .home-feature-card h3,
[data-theme="warm"] .home-subject-card h3,
[data-theme="warm"] .home-roadmap-card h3,
[data-theme="light"] .workflow-card h3,
[data-theme="light"] .home-feature-card h3,
[data-theme="light"] .home-subject-card h3,
[data-theme="light"] .home-roadmap-card h3,
.theme-light .workflow-card h3, .theme-warm .workflow-card h3,
.theme-light .home-feature-card h3, .theme-warm .home-feature-card h3,
.theme-light .home-subject-card h3, .theme-warm .home-subject-card h3,
.theme-light .home-roadmap-card h3 , .theme-warm .home-roadmap-card h3 {
  color: #1c1917;
}

[data-theme="warm"] .workflow-card p,
[data-theme="warm"] .home-feature-card p,
[data-theme="warm"] .home-subject-card p,
[data-theme="warm"] .home-roadmap-card p,
[data-theme="light"] .workflow-card p,
[data-theme="light"] .home-feature-card p,
[data-theme="light"] .home-subject-card p,
[data-theme="light"] .home-roadmap-card p,
.theme-light .workflow-card p, .theme-warm .workflow-card p,
.theme-light .home-feature-card p, .theme-warm .home-feature-card p,
.theme-light .home-subject-card p, .theme-warm .home-subject-card p,
.theme-light .home-roadmap-card p , .theme-warm .home-roadmap-card p {
  color: #334155;
}

[data-theme="warm"] .workflow-step-badge,
[data-theme="light"] .workflow-step-badge,
.theme-light .workflow-step-badge , .theme-warm .workflow-step-badge {
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid rgba(2, 132, 199, 0.25);
  color: #0284c7;
}

[data-theme="warm"] .workflow-subtext,
[data-theme="light"] .workflow-subtext,
.theme-light .workflow-subtext , .theme-warm .workflow-subtext {
  color: #64748b;
}

[data-theme="warm"] .home-feature-tag,
[data-theme="light"] .home-feature-tag,
.theme-light .home-feature-tag , .theme-warm .home-feature-tag {
  background: rgba(2, 132, 199, 0.08);
  color: #0369a1;
}

[data-theme="warm"] .home-subject-meta,
[data-theme="light"] .home-subject-meta,
.theme-light .home-subject-meta , .theme-warm .home-subject-meta {
  color: #64748b;
}

[data-theme="warm"] .home-pricing-teaser,
[data-theme="light"] .home-pricing-teaser,
.theme-light .home-pricing-teaser , .theme-warm .home-pricing-teaser {
  background: #ffffff;
  border: 1px solid rgba(215, 205, 195, 0.85);
  box-shadow: 0 8px 30px rgba(90, 70, 50, 0.06);
}

/* Home Footer & Semantic SEO Links */
[data-theme="warm"] .home-footer,
[data-theme="light"] .home-footer,
.theme-light .home-footer , .theme-warm .home-footer {
  background: #ede6da;
  border-top: 1px solid rgba(210, 198, 185, 0.8);
  color: #475569;
}

[data-theme="warm"] .home-footer a,
[data-theme="light"] .home-footer a,
.theme-light .home-footer a , .theme-warm .home-footer a {
  color: #475569;
}
[data-theme="warm"] .home-footer a:hover,
[data-theme="light"] .home-footer a:hover,
.theme-light .home-footer a:hover , .theme-warm .home-footer a:hover {
  color: #0284c7;
}

[data-theme="warm"] .home-footer h4,
[data-theme="light"] .home-footer h4,
.theme-light .home-footer h4 , .theme-warm .home-footer h4 {
  color: #0f172a;
}

[data-theme="warm"] .seo-footer-col,
[data-theme="light"] .seo-footer-col,
.theme-light .seo-footer-col , .theme-warm .seo-footer-col {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.85);
}
[data-theme="warm"] .seo-footer-col:hover,
[data-theme="light"] .seo-footer-col:hover,
.theme-light .seo-footer-col:hover , .theme-warm .seo-footer-col:hover {
  background: #f8fafc;
  border-color: rgba(2, 132, 199, 0.45);
}
[data-theme="warm"] .seo-footer-col.expanded h4,
[data-theme="light"] .seo-footer-col.expanded h4,
.theme-light .seo-footer-col.expanded h4 , .theme-warm .seo-footer-col.expanded h4,
[data-theme="warm"] .seo-footer-col h4::after,
[data-theme="light"] .seo-footer-col h4::after,
.theme-light .seo-footer-col h4::after , .theme-warm .seo-footer-col h4::after {
  color: #0284c7;
}
[data-theme="warm"] .seo-footer-list,
[data-theme="light"] .seo-footer-list,
.theme-light .seo-footer-list , .theme-warm .seo-footer-list {
  border-top-color: rgba(210, 198, 185, 0.65);
  scrollbar-color: rgba(2, 132, 199, 0.35) transparent;
}
[data-theme="warm"] .seo-footer-subcats,
[data-theme="light"] .seo-footer-subcats,
.theme-light .seo-footer-subcats , .theme-warm .seo-footer-subcats {
  border-top-color: rgba(210, 198, 185, 0.65);
}
[data-theme="warm"] .seo-footer-subcat,
[data-theme="light"] .seo-footer-subcat,
.theme-light .seo-footer-subcat , .theme-warm .seo-footer-subcat {
  background: #f8fafc;
  border-color: rgba(203, 213, 225, 0.85);
}
[data-theme="warm"] .seo-footer-subcat.expanded,
[data-theme="light"] .seo-footer-subcat.expanded,
.theme-light .seo-footer-subcat.expanded , .theme-warm .seo-footer-subcat.expanded {
  background: #ffffff;
  border-color: rgba(2, 132, 199, 0.45);
}
[data-theme="warm"] .seo-footer-subcat h5,
[data-theme="light"] .seo-footer-subcat h5,
.theme-light .seo-footer-subcat h5 , .theme-warm .seo-footer-subcat h5 {
  color: #334155;
}
[data-theme="warm"] .seo-footer-subcat.expanded h5,
[data-theme="light"] .seo-footer-subcat.expanded h5,
.theme-light .seo-footer-subcat.expanded h5 , .theme-warm .seo-footer-subcat.expanded h5,
[data-theme="warm"] .seo-footer-subcat.expanded h5::after,
[data-theme="light"] .seo-footer-subcat.expanded h5::after,
.theme-light .seo-footer-subcat.expanded h5::after , .theme-warm .seo-footer-subcat.expanded h5::after {
  color: #0284c7;
}
[data-theme="warm"] .btn-footer-toggle-all,
[data-theme="light"] .btn-footer-toggle-all,
.theme-light .btn-footer-toggle-all , .theme-warm .btn-footer-toggle-all {
  background: #ffffff;
  border-color: rgba(2, 132, 199, 0.4);
  color: #0369a1;
}
[data-theme="warm"] .btn-footer-toggle-all:hover,
[data-theme="light"] .btn-footer-toggle-all:hover,
.theme-light .btn-footer-toggle-all:hover , .theme-warm .btn-footer-toggle-all:hover {
  background: rgba(2, 132, 199, 0.08);
  border-color: #0284c7;
}

[data-theme="warm"] .footer-brand span,
[data-theme="light"] .footer-brand span,
.theme-light .footer-brand span , .theme-warm .footer-brand span {
  color: #1c1917;
}

[data-theme="warm"] .footer-tagline,
[data-theme="light"] .footer-tagline,
.theme-light .footer-tagline , .theme-warm .footer-tagline {
  color: #475569;
}

[data-theme="warm"] .seo-footer-list li a,
[data-theme="light"] .seo-footer-list li a,
.theme-light .seo-footer-list li a , .theme-warm .seo-footer-list li a {
  color: #475569;
}
[data-theme="warm"] .seo-footer-list li a:hover,
[data-theme="light"] .seo-footer-list li a:hover,
.theme-light .seo-footer-list li a:hover , .theme-warm .seo-footer-list li a:hover {
  color: #0284c7;
}

[data-theme="warm"] .seo-footer-list li a::before,
[data-theme="light"] .seo-footer-list li a::before,
.theme-light .seo-footer-list li a::before , .theme-warm .seo-footer-list li a::before {
  color: #94a3b8;
}

[data-theme="warm"] .seo-stem-overview-strip,
[data-theme="light"] .seo-stem-overview-strip,
.theme-light .seo-stem-overview-strip , .theme-warm .seo-stem-overview-strip {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.8);
}

[data-theme="warm"] .seo-stem-overview-strip h5,
[data-theme="light"] .seo-stem-overview-strip h5,
.theme-light .seo-stem-overview-strip h5 , .theme-warm .seo-stem-overview-strip h5 {
  color: #b45309;
}

[data-theme="warm"] .seo-stem-overview-strip p,
[data-theme="light"] .seo-stem-overview-strip p,
.theme-light .seo-stem-overview-strip p , .theme-warm .seo-stem-overview-strip p {
  color: #475569;
}

[data-theme="warm"] .footer-bottom,
[data-theme="light"] .footer-bottom,
.theme-light .footer-bottom , .theme-warm .footer-bottom {
  color: #64748b;
  border-top: 1px solid rgba(210, 198, 185, 0.7);
}

/* ==========================================================================
   3. Science Labs & Algorithms Directory View
   ========================================================================== */
[data-theme="warm"] #labs-view,
[data-theme="light"] #labs-view,
.theme-light #labs-view , .theme-warm #labs-view {
  background: radial-gradient(circle at 50% 6%, #faf6f0 0%, #f4ece1 100%);
}

[data-theme="warm"] .labs-view-title-group h2,
[data-theme="light"] .labs-view-title-group h2,
.theme-light .labs-view-title-group h2 , .theme-warm .labs-view-title-group h2 {
  color: #1c1917;
}

[data-theme="warm"] .labs-view-title-group p,
[data-theme="light"] .labs-view-title-group p,
.theme-light .labs-view-title-group p , .theme-warm .labs-view-title-group p {
  color: #475569;
}

[data-theme="warm"] .tab-count-pill,
[data-theme="light"] .tab-count-pill,
.theme-light .tab-count-pill , .theme-warm .tab-count-pill {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
  border: 1px solid rgba(2, 132, 199, 0.3);
}

[data-theme="warm"] .btn-secondary-sm,
[data-theme="light"] .btn-secondary-sm,
.theme-light .btn-secondary-sm , .theme-warm .btn-secondary-sm {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.85);
  color: #1c1917;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
[data-theme="warm"] .btn-secondary-sm:hover,
[data-theme="light"] .btn-secondary-sm:hover,
.theme-light .btn-secondary-sm:hover , .theme-warm .btn-secondary-sm:hover {
  border-color: #0284c7;
  color: #0284c7;
  background: #fdfbf7;
}

/* Labs Search Input */
[data-theme="warm"] .labs-search-box input,
[data-theme="light"] .labs-search-box input,
.theme-light .labs-search-box input , .theme-warm .labs-search-box input {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.85);
  color: #1c1917;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}
[data-theme="warm"] .labs-search-box input::placeholder,
[data-theme="light"] .labs-search-box input::placeholder,
.theme-light .labs-search-box input::placeholder , .theme-warm .labs-search-box input::placeholder {
  color: #64748b;
}

/* Subject Tabs */
[data-theme="warm"] .labs-tab-btn,
[data-theme="light"] .labs-tab-btn,
.theme-light .labs-tab-btn , .theme-warm .labs-tab-btn {
  background: #ffffff;
  border: 1px solid rgba(203, 213, 225, 0.9);
  color: #334155;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
[data-theme="warm"] .labs-tab-btn span,
[data-theme="light"] .labs-tab-btn span,
.theme-light .labs-tab-btn span , .theme-warm .labs-tab-btn span {
  color: #334155;
}
[data-theme="warm"] .labs-tab-btn .tab-badge,
[data-theme="light"] .labs-tab-btn .tab-badge,
.theme-light .labs-tab-btn .tab-badge , .theme-warm .labs-tab-btn .tab-badge {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid rgba(203, 213, 225, 0.8);
}
[data-theme="warm"] .labs-tab-btn:hover,
[data-theme="light"] .labs-tab-btn:hover,
.theme-light .labs-tab-btn:hover , .theme-warm .labs-tab-btn:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #0284c7;
}
[data-theme="warm"] .labs-tab-btn:hover span,
[data-theme="light"] .labs-tab-btn:hover span,
.theme-light .labs-tab-btn:hover span , .theme-warm .labs-tab-btn:hover span {
  color: #0f172a;
}
[data-theme="warm"] .labs-tab-btn:hover .tab-badge,
[data-theme="light"] .labs-tab-btn:hover .tab-badge,
.theme-light .labs-tab-btn:hover .tab-badge , .theme-warm .labs-tab-btn:hover .tab-badge {
  background: #e2e8f0;
  color: #0f172a;
}
[data-theme="warm"] .labs-tab-btn.active,
[data-theme="light"] .labs-tab-btn.active,
.theme-light .labs-tab-btn.active , .theme-warm .labs-tab-btn.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.28);
}
[data-theme="warm"] .labs-tab-btn.active span,
[data-theme="light"] .labs-tab-btn.active span,
.theme-light .labs-tab-btn.active span , .theme-warm .labs-tab-btn.active span {
  color: #ffffff !important;
  font-weight: 700;
}
[data-theme="warm"] .labs-tab-btn.active .tab-badge,
[data-theme="light"] .labs-tab-btn.active .tab-badge,
.theme-light .labs-tab-btn.active .tab-badge , .theme-warm .labs-tab-btn.active .tab-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-weight: 700;
}

/* Algorithm Problem Domain Subcategory Filter Bar */
[data-theme="warm"] .labs-subcategories-bar,
[data-theme="light"] .labs-subcategories-bar,
.theme-light .labs-subcategories-bar , .theme-warm .labs-subcategories-bar {
  border-bottom: 1px solid rgba(210, 198, 185, 0.7);
}

[data-theme="warm"] .algo-subcategory-pill,
[data-theme="light"] .algo-subcategory-pill,
.theme-light .algo-subcategory-pill , .theme-warm .algo-subcategory-pill {
  background: #ffffff;
  border: 1px solid rgba(203, 213, 225, 0.9);
  color: #334155;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
[data-theme="warm"] .algo-subcategory-pill .pill-label,
[data-theme="light"] .algo-subcategory-pill .pill-label,
.theme-light .algo-subcategory-pill .pill-label , .theme-warm .algo-subcategory-pill .pill-label {
  color: #334155;
}
[data-theme="warm"] .algo-subcategory-pill .pill-badge,
[data-theme="light"] .algo-subcategory-pill .pill-badge,
.theme-light .algo-subcategory-pill .pill-badge , .theme-warm .algo-subcategory-pill .pill-badge {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid rgba(203, 213, 225, 0.8);
}
[data-theme="warm"] .algo-subcategory-pill:hover,
[data-theme="light"] .algo-subcategory-pill:hover,
.theme-light .algo-subcategory-pill:hover , .theme-warm .algo-subcategory-pill:hover {
  background: #f8fafc;
  border-color: #0284c7;
  color: #0f172a;
}
[data-theme="warm"] .algo-subcategory-pill:hover .pill-label,
[data-theme="light"] .algo-subcategory-pill:hover .pill-label,
.theme-light .algo-subcategory-pill:hover .pill-label , .theme-warm .algo-subcategory-pill:hover .pill-label {
  color: #0f172a;
}

/* Light theme in-feed state (all subcategories appearing below) */
[data-theme="warm"] .algo-subcategory-pill.in-feed,
[data-theme="light"] .algo-subcategory-pill.in-feed,
.theme-light .algo-subcategory-pill.in-feed , .theme-warm .algo-subcategory-pill.in-feed {
  background: #f0f9ff;
  border-color: #38bdf8;
  color: #0369a1;
}
[data-theme="warm"] .algo-subcategory-pill.in-feed .pill-label,
[data-theme="light"] .algo-subcategory-pill.in-feed .pill-label,
.theme-light .algo-subcategory-pill.in-feed .pill-label , .theme-warm .algo-subcategory-pill.in-feed .pill-label {
  color: #0369a1;
  font-weight: 600;
}
[data-theme="warm"] .algo-subcategory-pill.in-feed .pill-badge,
[data-theme="light"] .algo-subcategory-pill.in-feed .pill-badge,
.theme-light .algo-subcategory-pill.in-feed .pill-badge , .theme-warm .algo-subcategory-pill.in-feed .pill-badge {
  background: rgba(2, 132, 199, 0.15);
  color: #0284c7;
  border: 1px solid rgba(2, 132, 199, 0.3);
}
[data-theme="warm"] .algo-subcategory-pill.in-feed .pill-down-arrow,
[data-theme="light"] .algo-subcategory-pill.in-feed .pill-down-arrow,
.theme-light .algo-subcategory-pill.in-feed .pill-down-arrow , .theme-warm .algo-subcategory-pill.in-feed .pill-down-arrow {
  color: #0284c7;
}
[data-theme="warm"] .algo-subcategory-pill.in-feed::after,
[data-theme="light"] .algo-subcategory-pill.in-feed::after,
.theme-light .algo-subcategory-pill.in-feed::after , .theme-warm .algo-subcategory-pill.in-feed::after {
  border-top-color: #0284c7;
  filter: drop-shadow(0 2px 5px rgba(2, 132, 199, 0.35));
}

/* Light theme single active state */
[data-theme="warm"] .algo-subcategory-pill.active,
[data-theme="light"] .algo-subcategory-pill.active,
.theme-light .algo-subcategory-pill.active , .theme-warm .algo-subcategory-pill.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.28);
}
[data-theme="warm"] .algo-subcategory-pill.active .pill-label,
[data-theme="light"] .algo-subcategory-pill.active .pill-label,
.theme-light .algo-subcategory-pill.active .pill-label , .theme-warm .algo-subcategory-pill.active .pill-label {
  color: #ffffff !important;
  font-weight: 700;
}
[data-theme="warm"] .algo-subcategory-pill.active .pill-badge,
[data-theme="light"] .algo-subcategory-pill.active .pill-badge,
.theme-light .algo-subcategory-pill.active .pill-badge , .theme-warm .algo-subcategory-pill.active .pill-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-weight: 700;
}
[data-theme="warm"] .algo-subcategory-pill.active .pill-down-arrow,
[data-theme="light"] .algo-subcategory-pill.active .pill-down-arrow,
.theme-light .algo-subcategory-pill.active .pill-down-arrow , .theme-warm .algo-subcategory-pill.active .pill-down-arrow {
  color: #ffffff;
}
[data-theme="warm"] .algo-subcategory-pill.active::after,
[data-theme="light"] .algo-subcategory-pill.active::after,
.theme-light .algo-subcategory-pill.active::after , .theme-warm .algo-subcategory-pill.active::after {
  border-top-color: #0284c7;
  filter: drop-shadow(0 2px 6px rgba(2, 132, 199, 0.45));
}

/* Light theme dimmed inactive pills when one is active */
[data-theme="warm"] .labs-subcategories-bar.has-single-active .algo-subcategory-pill:not(.active),
[data-theme="light"] .labs-subcategories-bar.has-single-active .algo-subcategory-pill:not(.active),
.theme-light .labs-subcategories-bar.has-single-active .algo-subcategory-pill:not(.active) , .theme-warm .labs-subcategories-bar.has-single-active .algo-subcategory-pill:not(.active) {
  opacity: 0.55;
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #64748b;
}

/* Algorithm Domain Group Section */
[data-theme="warm"] .algo-domain-group,
[data-theme="light"] .algo-domain-group,
.theme-light .algo-domain-group , .theme-warm .algo-domain-group {
  background: #ffffff;
  border: 1px solid rgba(215, 205, 195, 0.85);
  box-shadow: 0 4px 20px rgba(90, 70, 50, 0.05);
}
[data-theme="warm"] .algo-domain-title,
[data-theme="light"] .algo-domain-title,
.theme-light .algo-domain-title , .theme-warm .algo-domain-title {
  color: #1c1917;
}
[data-theme="warm"] .algo-domain-desc,
[data-theme="light"] .algo-domain-desc,
.theme-light .algo-domain-desc , .theme-warm .algo-domain-desc {
  color: #475569;
}
[data-theme="warm"] .algo-domain-icon,
[data-theme="light"] .algo-domain-icon,
.theme-light .algo-domain-icon , .theme-warm .algo-domain-icon {
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.25);
}
[data-theme="warm"] .algo-domain-meta,
[data-theme="light"] .algo-domain-meta,
.theme-light .algo-domain-meta , .theme-warm .algo-domain-meta {
  color: #64748b;
}

/* Simulation Lab Cards */
[data-theme="warm"] .lab-card,
[data-theme="light"] .lab-card,
.theme-light .lab-card , .theme-warm .lab-card {
  background: #ffffff;
  border: 1px solid rgba(215, 205, 195, 0.8);
  box-shadow: 0 2px 10px rgba(90, 70, 50, 0.04);
}
[data-theme="warm"] .lab-card:hover,
[data-theme="light"] .lab-card:hover,
.theme-light .lab-card:hover , .theme-warm .lab-card:hover {
  border-color: #0284c7;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.12);
}
[data-theme="warm"] .lab-card-title,
[data-theme="warm"] .lab-title,
[data-theme="light"] .lab-card-title,
[data-theme="light"] .lab-title,
.theme-light .lab-card-title,
.theme-light .lab-title,
.theme-warm .lab-card-title,
.theme-warm .lab-title {
  color: #1c1917;
}
[data-theme="warm"] .lab-card-domain,
[data-theme="warm"] .lab-domain,
[data-theme="light"] .lab-card-domain,
[data-theme="light"] .lab-domain,
.theme-light .lab-card-domain,
.theme-light .lab-domain,
.theme-warm .lab-card-domain,
.theme-warm .lab-domain {
  color: #0369a1;
}
[data-theme="warm"] .lab-card-desc,
[data-theme="warm"] .lab-card-tagline,
[data-theme="warm"] .lab-tagline,
[data-theme="light"] .lab-card-desc,
[data-theme="light"] .lab-card-tagline,
[data-theme="light"] .lab-tagline,
.theme-light .lab-card-desc,
.theme-light .lab-card-tagline,
.theme-light .lab-tagline,
.theme-warm .lab-card-desc,
.theme-warm .lab-card-tagline,
.theme-warm .lab-tagline {
  color: #475569;
}
[data-theme="warm"] .lab-card-footer,
[data-theme="light"] .lab-card-footer,
.theme-light .lab-card-footer,
.theme-warm .lab-card-footer {
  border-top-color: rgba(215, 205, 195, 0.7);
}
[data-theme="warm"] .lab-scale-indicator,
[data-theme="light"] .lab-scale-indicator,
.theme-light .lab-scale-indicator,
.theme-warm .lab-scale-indicator {
  background: #f1f5f9;
  border-color: rgba(203, 213, 225, 0.85);
  color: #475569;
}

/* Badges on Lab Cards */
[data-theme="warm"] .lab-subject-badge,
[data-theme="light"] .lab-subject-badge,
.theme-light .lab-subject-badge , .theme-warm .lab-subject-badge {
  background: rgba(2, 132, 199, 0.1);
  color: #0369a1;
  border: 1px solid rgba(2, 132, 199, 0.25);
}
[data-theme="warm"] .lab-difficulty-badge,
[data-theme="light"] .lab-difficulty-badge,
.theme-light .lab-difficulty-badge , .theme-warm .lab-difficulty-badge {
  background: rgba(71, 85, 105, 0.08);
  color: #334155;
}
[data-theme="warm"] .lab-dev-badge,
[data-theme="light"] .lab-dev-badge,
.theme-light .lab-dev-badge,
.theme-warm .lab-dev-badge {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.35);
}
[data-theme="warm"] .lab-card.in-development,
[data-theme="light"] .lab-card.in-development,
.theme-light .lab-card.in-development,
.theme-warm .lab-card.in-development {
  border: 1px dashed rgba(217, 119, 6, 0.45);
  background: #ffffff;
}
[data-theme="warm"] .lab-card.in-development:hover,
[data-theme="light"] .lab-card.in-development:hover,
.theme-light .lab-card.in-development:hover,
.theme-warm .lab-card.in-development:hover {
  border-color: #d97706;
  box-shadow: 0 8px 30px rgba(217, 119, 6, 0.12);
}
[data-theme="warm"] .lab-complexity-badge,
[data-theme="light"] .lab-complexity-badge,
.theme-light .lab-complexity-badge , .theme-warm .lab-complexity-badge {
  background: rgba(147, 51, 234, 0.1);
  color: #7e22ce;
  border: 1px solid rgba(147, 51, 234, 0.25);
}
[data-theme="warm"] .lab-tier-badge.free,
[data-theme="light"] .lab-tier-badge.free,
.theme-light .lab-tier-badge.free , .theme-warm .lab-tier-badge.free {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
[data-theme="warm"] .lab-tier-badge.pro,
[data-theme="light"] .lab-tier-badge.pro,
.theme-light .lab-tier-badge.pro , .theme-warm .lab-tier-badge.pro {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.25);
}
[data-theme="warm"] .lab-tier-badge.pro.locked,
[data-theme="light"] .lab-tier-badge.pro.locked,
.theme-light .lab-tier-badge.pro.locked , .theme-warm .lab-tier-badge.pro.locked {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.25);
}
[data-theme="warm"] .lab-card.pro.locked,
[data-theme="light"] .lab-card.pro.locked,
.theme-light .lab-card.pro.locked , .theme-warm .lab-card.pro.locked {
  background: #fffdfa;
  border-color: rgba(217, 119, 6, 0.4);
}
[data-theme="warm"] .btn-launch-lab,
[data-theme="warm"] .launch-lab-btn.btn-primary,
[data-theme="light"] .btn-launch-lab,
[data-theme="light"] .launch-lab-btn.btn-primary,
.theme-light .btn-launch-lab,
.theme-light .launch-lab-btn.btn-primary,
.theme-warm .btn-launch-lab,
.theme-warm .launch-lab-btn.btn-primary {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}
[data-theme="warm"] .btn-pro-locked,
[data-theme="light"] .btn-pro-locked,
.theme-light .btn-pro-locked , .theme-warm .btn-pro-locked {
  background: rgba(217, 119, 6, 0.12) !important;
  border: 1px solid rgba(217, 119, 6, 0.5) !important;
  color: #b45309 !important;
}
[data-theme="warm"] .btn-pro-locked:hover,
[data-theme="light"] .btn-pro-locked:hover,
.theme-light .btn-pro-locked:hover , .theme-warm .btn-pro-locked:hover {
  background: rgba(217, 119, 6, 0.22) !important;
  border-color: #d97706 !important;
  color: #78350f !important;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.2) !important;
}

/* Labs Bottom Pro Callout Banner */
[data-theme="warm"] .labs-pro-banner,
[data-theme="light"] .labs-pro-banner,
.theme-light .labs-pro-banner , .theme-warm .labs-pro-banner {
  background: radial-gradient(circle at 50% 0%, #fffdf5 0%, #ffffff 80%);
  border: 1px solid rgba(217, 119, 6, 0.45);
  box-shadow: 0 4px 18px rgba(217, 119, 6, 0.08);
}
[data-theme="warm"] .pro-banner-content h4,
[data-theme="light"] .pro-banner-content h4,
.theme-light .pro-banner-content h4 , .theme-warm .pro-banner-content h4 {
  color: #b45309;
}
[data-theme="warm"] .pro-banner-content p,
[data-theme="light"] .pro-banner-content p,
.theme-light .pro-banner-content p , .theme-warm .pro-banner-content p {
  color: #475569;
}

/* ==========================================================================
   4. Interactive Simulation Runner Modal
   ========================================================================== */
[data-theme="warm"] .lab-runner-modal,
[data-theme="light"] .lab-runner-modal,
.theme-light .lab-runner-modal , .theme-warm .lab-runner-modal {
  background: rgba(28, 25, 23, 0.65);
}

[data-theme="warm"] .lab-runner-container,
[data-theme="light"] .lab-runner-container,
.theme-light .lab-runner-container , .theme-warm .lab-runner-container {
  background: #faf8f5;
  border: 1px solid rgba(210, 198, 185, 0.85);
  box-shadow: 0 25px 70px rgba(50, 35, 20, 0.25);
}

/* Lab Missions HUD – Light / Warm Theme */
[data-theme="warm"] .lab-missions-hud,
[data-theme="light"] .lab-missions-hud,
.theme-light .lab-missions-hud, .theme-warm .lab-missions-hud {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(217, 119, 6, 0.4);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}
[data-theme="warm"] .lab-missions-title,
[data-theme="light"] .lab-missions-title,
.theme-light .lab-missions-title, .theme-warm .lab-missions-title,
[data-theme="warm"] .lab-mission-title,
[data-theme="light"] .lab-mission-title,
.theme-light .lab-mission-title, .theme-warm .lab-mission-title {
  color: #1c1917;
}
[data-theme="warm"] .lab-mission-card,
[data-theme="light"] .lab-mission-card,
.theme-light .lab-mission-card, .theme-warm .lab-mission-card {
  background: #f8fafc;
  border: 1px solid rgba(210, 198, 185, 0.7);
}
[data-theme="warm"] .lab-mission-card.completed,
[data-theme="light"] .lab-mission-card.completed,
.theme-light .lab-mission-card.completed, .theme-warm .lab-mission-card.completed {
  background: rgba(16, 185, 129, 0.1);
  border-color: #10b981;
}
[data-theme="warm"] .lab-mission-card.completed .lab-mission-title,
[data-theme="light"] .lab-mission-card.completed .lab-mission-title,
.theme-light .lab-mission-card.completed .lab-mission-title, .theme-warm .lab-mission-card.completed .lab-mission-title {
  color: #047857;
}
[data-theme="warm"] .lab-mission-prompt,
[data-theme="light"] .lab-mission-prompt,
.theme-light .lab-mission-prompt, .theme-warm .lab-mission-prompt {
  color: #475569;
}
[data-theme="warm"] .lab-mission-hint-body,
[data-theme="light"] .lab-mission-hint-body,
.theme-light .lab-mission-hint-body, .theme-warm .lab-mission-hint-body {
  background: #f1f5f9;
  color: #334155;
}
[data-theme="warm"] .lab-mission-deriv-body,
[data-theme="light"] .lab-mission-deriv-body,
.theme-light .lab-mission-deriv-body, .theme-warm .lab-mission-deriv-body {
  background: rgba(109, 40, 217, 0.06);
  border-color: rgba(109, 40, 217, 0.25);
  color: #1e293b;
}
[data-theme="warm"] .lab-mission-deriv-body code,
[data-theme="light"] .lab-mission-deriv-body code,
.theme-light .lab-mission-deriv-body code, .theme-warm .lab-mission-deriv-body code {
  background: rgba(109, 40, 217, 0.1);
  color: #5b21b6;
}
[data-theme="warm"] .lab-mission-deriv-btn,
[data-theme="light"] .lab-mission-deriv-btn,
.theme-light .lab-mission-deriv-btn, .theme-warm .lab-mission-deriv-btn {
  color: #6d28d9;
}
[data-theme="warm"] .lab-share-panel,
[data-theme="light"] .lab-share-panel,
.theme-light .lab-share-panel, .theme-warm .lab-share-panel {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(16, 185, 129, 0.4);
}
[data-theme="warm"] .lab-share-group label,
[data-theme="light"] .lab-share-group label,
.theme-light .lab-share-group label, .theme-warm .lab-share-group label {
  color: #334155;
}
[data-theme="warm"] .lab-share-input,
[data-theme="light"] .lab-share-input,
.theme-light .lab-share-input, .theme-warm .lab-share-input {
  background: #f8fafc;
  border: 1px solid rgba(210, 198, 185, 0.8);
  color: #0369a1;
}

[data-theme="warm"] .lab-runner-header,
[data-theme="light"] .lab-runner-header,
.theme-light .lab-runner-header , .theme-warm .lab-runner-header {
  background: #ffffff;
  border-bottom: 1px solid rgba(215, 205, 195, 0.75);
}

[data-theme="warm"] .lab-runner-header h2,
[data-theme="light"] .lab-runner-header h2,
.theme-light .lab-runner-header h2 , .theme-warm .lab-runner-header h2 {
  color: #1c1917;
}

[data-theme="warm"] #lab-header-domain,
[data-theme="light"] #lab-header-domain,
.theme-light #lab-header-domain , .theme-warm #lab-header-domain {
  background: rgba(71, 85, 105, 0.08);
  color: #475569;
}

/* Playback and Header Buttons */
[data-theme="warm"] .lab-playback-controls .btn,
[data-theme="light"] .lab-playback-controls .btn,
.theme-light .lab-playback-controls .btn , .theme-warm .lab-playback-controls .btn {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.85);
  color: #1c1917;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
[data-theme="warm"] .lab-playback-controls .btn:hover,
[data-theme="light"] .lab-playback-controls .btn:hover,
.theme-light .lab-playback-controls .btn:hover , .theme-warm .lab-playback-controls .btn:hover {
  background: #f8fafc;
  border-color: #0284c7;
  color: #0284c7;
}
[data-theme="warm"] .lab-playback-controls .btn.active,
[data-theme="light"] .lab-playback-controls .btn.active,
.theme-light .lab-playback-controls .btn.active , .theme-warm .lab-playback-controls .btn.active {
  background: rgba(2, 132, 199, 0.12);
  border-color: #0284c7;
  color: #0284c7;
}

[data-theme="warm"] #lab-export-csv-btn,
[data-theme="light"] #lab-export-csv-btn,
.theme-light #lab-export-csv-btn , .theme-warm #lab-export-csv-btn {
  background: rgba(2, 132, 199, 0.08);
  border: 1px solid rgba(2, 132, 199, 0.35);
  color: #0369a1;
}
[data-theme="warm"] #lab-export-csv-btn:hover,
[data-theme="light"] #lab-export-csv-btn:hover,
.theme-light #lab-export-csv-btn:hover , .theme-warm #lab-export-csv-btn:hover {
  background: rgba(2, 132, 199, 0.16);
  border-color: #0284c7;
  color: #0284c7;
}

[data-theme="warm"] .modal-close-btn,
[data-theme="light"] .modal-close-btn,
.theme-light .modal-close-btn , .theme-warm .modal-close-btn {
  color: #64748b;
}
[data-theme="warm"] .modal-close-btn:hover,
[data-theme="light"] .modal-close-btn:hover,
.theme-light .modal-close-btn:hover , .theme-warm .modal-close-btn:hover {
  color: #1c1917;
}

/* Info Panel – Light / Warm Theme */
[data-theme="warm"] .lab-info-panel,
[data-theme="light"] .lab-info-panel,
.theme-light .lab-info-panel , .theme-warm .lab-info-panel {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(210, 198, 185, 0.85);
  box-shadow: 0 20px 60px rgba(50, 35, 20, 0.2), 0 0 0 1px rgba(210, 198, 185, 0.4);
}
[data-theme="warm"] .lab-info-panel-header,
[data-theme="light"] .lab-info-panel-header,
.theme-light .lab-info-panel-header , .theme-warm .lab-info-panel-header {
  border-bottom: 1px solid rgba(215, 205, 195, 0.6);
}
[data-theme="warm"] .lab-info-panel-title,
[data-theme="light"] .lab-info-panel-title,
.theme-light .lab-info-panel-title , .theme-warm .lab-info-panel-title {
  color: #1c1917;
}
[data-theme="warm"] .lab-info-panel-close,
[data-theme="light"] .lab-info-panel-close,
.theme-light .lab-info-panel-close , .theme-warm .lab-info-panel-close {
  color: #64748b;
}
[data-theme="warm"] .lab-info-panel-close:hover,
[data-theme="light"] .lab-info-panel-close:hover,
.theme-light .lab-info-panel-close:hover , .theme-warm .lab-info-panel-close:hover {
  color: #1c1917;
  background: rgba(0, 0, 0, 0.06);
}
[data-theme="warm"] .lab-info-section,
[data-theme="light"] .lab-info-section,
.theme-light .lab-info-section , .theme-warm .lab-info-section {
  background: #f8fafc;
  border: 1px solid rgba(210, 198, 185, 0.6);
}
[data-theme="warm"] .lab-info-section h4,
[data-theme="light"] .lab-info-section h4,
.theme-light .lab-info-section h4 , .theme-warm .lab-info-section h4 {
  color: #0369a1;
}
[data-theme="warm"] .lab-info-content,
[data-theme="light"] .lab-info-content,
.theme-light .lab-info-content , .theme-warm .lab-info-content {
  color: #334155;
}
[data-theme="warm"] .lab-info-content code,
[data-theme="light"] .lab-info-content code,
.theme-light .lab-info-content code , .theme-warm .lab-info-content code {
  background: rgba(2, 132, 199, 0.08);
  color: #0369a1;
}
[data-theme="warm"] .lab-info-content a,
[data-theme="light"] .lab-info-content a,
.theme-light .lab-info-content a , .theme-warm .lab-info-content a {
  color: #0369a1;
  border-bottom-color: rgba(2, 132, 199, 0.4);
}
[data-theme="warm"] #lab-info-btn,
[data-theme="light"] #lab-info-btn,
.theme-light #lab-info-btn , .theme-warm #lab-info-btn {
  background: rgba(109, 40, 217, 0.08);
  border-color: rgba(109, 40, 217, 0.35);
  color: #6d28d9;
}
[data-theme="warm"] #lab-info-btn:hover,
[data-theme="light"] #lab-info-btn:hover,
.theme-light #lab-info-btn:hover , .theme-warm #lab-info-btn:hover {
  background: rgba(109, 40, 217, 0.16);
  border-color: #6d28d9;
  color: #6d28d9;
}
[data-theme="warm"] #lab-info-btn.active,
[data-theme="light"] #lab-info-btn.active,
.theme-light #lab-info-btn.active , .theme-warm #lab-info-btn.active {
  background: rgba(109, 40, 217, 0.14);
  border-color: #7c3aed;
  color: #6d28d9;
}

/* Runner Sidebar */
[data-theme="warm"] .lab-sidebar,
[data-theme="light"] .lab-sidebar,
.theme-light .lab-sidebar , .theme-warm .lab-sidebar {
  background: #ffffff;
  border-left: 1px solid rgba(215, 205, 195, 0.75);
}

[data-theme="warm"] .lab-sidebar h3,
[data-theme="light"] .lab-sidebar h3,
.theme-light .lab-sidebar h3 , .theme-warm .lab-sidebar h3 {
  color: #1c1917;
  border-bottom: 1px solid rgba(215, 205, 195, 0.6);
}

[data-theme="warm"] .control-label-row label,
[data-theme="light"] .control-label-row label,
.theme-light .control-label-row label , .theme-warm .control-label-row label {
  color: #1c1917;
}

[data-theme="warm"] .control-toggle-label,
[data-theme="light"] .control-toggle-label,
.theme-light .control-toggle-label , .theme-warm .control-toggle-label {
  color: #1c1917;
}

[data-theme="warm"] .control-val,
[data-theme="light"] .control-val,
.theme-light .control-val , .theme-warm .control-val {
  background: rgba(2, 132, 199, 0.1);
  color: #0369a1;
}

[data-theme="warm"] .lab-control-group input[type="range"],
[data-theme="light"] .lab-control-group input[type="range"],
.theme-light .lab-control-group input[type="range"] , .theme-warm .lab-control-group input[type="range"] {
  accent-color: #0284c7;
}

[data-theme="warm"] .lab-control-group select,
[data-theme="light"] .lab-control-group select,
.theme-light .lab-control-group select , .theme-warm .lab-control-group select {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.85);
  color: #1c1917;
}

[data-theme="warm"] .lab-objectives-list li,
[data-theme="light"] .lab-objectives-list li,
.theme-light .lab-objectives-list li , .theme-warm .lab-objectives-list li {
  color: #334155;
}

[data-theme="warm"] .lab-objectives-list li span,
[data-theme="light"] .lab-objectives-list li span,
.theme-light .lab-objectives-list li span , .theme-warm .lab-objectives-list li span {
  color: #0284c7;
}

/* Telemetry HUD Strip */
[data-theme="warm"] .lab-telemetry,
[data-theme="warm"] .lab-telemetry-hud,
[data-theme="light"] .lab-telemetry,
[data-theme="light"] .lab-telemetry-hud,
.theme-light .lab-telemetry, .theme-warm .lab-telemetry,
.theme-light .lab-telemetry-hud , .theme-warm .lab-telemetry-hud {
  background: #f5f0e6;
  border-top: 1px solid rgba(215, 205, 195, 0.75);
}

[data-theme="warm"] .tel-card,
[data-theme="light"] .tel-card,
.theme-light .tel-card , .theme-warm .tel-card {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.75);
  box-shadow: 0 1px 4px rgba(80, 60, 40, 0.04);
}

[data-theme="warm"] .tel-label,
[data-theme="light"] .tel-label,
.theme-light .tel-label , .theme-warm .tel-label {
  color: #64748b;
}

[data-theme="warm"] .tel-val,
[data-theme="light"] .tel-val,
.theme-light .tel-val , .theme-warm .tel-val {
  color: #1c1917;
}

[data-theme="warm"] .tel-equation,
[data-theme="light"] .tel-equation,
.theme-light .tel-equation , .theme-warm .tel-equation {
  color: #475569;
}

[data-theme="warm"] .tel-equation code,
[data-theme="light"] .tel-equation code,
.theme-light .tel-equation code , .theme-warm .tel-equation code {
  background: #ffffff;
  color: #0369a1;
  border: 1px solid rgba(2, 132, 199, 0.25);
}

/* Paywall Lock Overlay inside Runner */
[data-theme="warm"] .lab-pro-lock-overlay,
[data-theme="light"] .lab-pro-lock-overlay,
.theme-light .lab-pro-lock-overlay , .theme-warm .lab-pro-lock-overlay {
  background: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(14px);
}

[data-theme="warm"] .pro-lock-badge,
[data-theme="light"] .pro-lock-badge,
.theme-light .pro-lock-badge , .theme-warm .pro-lock-badge {
  background: rgba(217, 119, 6, 0.12);
  color: #b45309;
  border: 1px solid rgba(217, 119, 6, 0.35);
}

[data-theme="warm"] .lab-pro-lock-overlay h3,
[data-theme="light"] .lab-pro-lock-overlay h3,
.theme-light .lab-pro-lock-overlay h3 , .theme-warm .lab-pro-lock-overlay h3 {
  color: #1c1917;
}

[data-theme="warm"] .lab-pro-lock-overlay p,
[data-theme="light"] .lab-pro-lock-overlay p,
.theme-light .lab-pro-lock-overlay p , .theme-warm .lab-pro-lock-overlay p {
  color: #475569;
}

/* ==========================================================================
   5. Modals (Pricing, Checkout, Login, Profile)
   ========================================================================== */
/* Pricing Modal */
[data-theme="warm"] .pricing-modal-container,
[data-theme="light"] .pricing-modal-container,
.theme-light .pricing-modal-container , .theme-warm .pricing-modal-container {
  background: #faf8f5;
  border: 1px solid rgba(210, 198, 185, 0.85);
  box-shadow: 0 20px 60px rgba(50, 35, 20, 0.2);
}

[data-theme="warm"] .pricing-badge,
[data-theme="light"] .pricing-badge,
.theme-light .pricing-badge , .theme-warm .pricing-badge {
  background: rgba(2, 132, 199, 0.12);
  color: #0284c7;
}

[data-theme="warm"] .pricing-header-titles h2,
[data-theme="light"] .pricing-header-titles h2,
.theme-light .pricing-header-titles h2 , .theme-warm .pricing-header-titles h2 {
  color: #1c1917;
}

[data-theme="warm"] .pricing-header-titles p,
[data-theme="light"] .pricing-header-titles p,
.theme-light .pricing-header-titles p , .theme-warm .pricing-header-titles p {
  color: #475569;
}

[data-theme="warm"] .pricing-billing-switch,
[data-theme="light"] .pricing-billing-switch,
.theme-light .pricing-billing-switch , .theme-warm .pricing-billing-switch {
  background: #ede6da;
  border: 1px solid rgba(210, 198, 185, 0.8);
}

[data-theme="warm"] .billing-btn,
[data-theme="light"] .billing-btn,
.theme-light .billing-btn , .theme-warm .billing-btn {
  color: #475569;
}

[data-theme="warm"] .billing-btn.active,
[data-theme="light"] .billing-btn.active,
.theme-light .billing-btn.active , .theme-warm .billing-btn.active {
  background: #0284c7;
  color: #ffffff;
}

[data-theme="warm"] .save-tag,
[data-theme="light"] .save-tag,
.theme-light .save-tag , .theme-warm .save-tag {
  background: #d97706;
  color: #ffffff;
}

/* Pricing Cards */
[data-theme="warm"] .pricing-card,
[data-theme="light"] .pricing-card,
.theme-light .pricing-card , .theme-warm .pricing-card {
  background: #ffffff;
  border: 1px solid rgba(215, 205, 195, 0.85);
  box-shadow: 0 4px 18px rgba(80, 60, 40, 0.05);
}

[data-theme="warm"] .pricing-card.pro,
[data-theme="light"] .pricing-card.pro,
.theme-light .pricing-card.pro , .theme-warm .pricing-card.pro {
  background: radial-gradient(circle at 50% 0%, #fffdf5 0%, #ffffff 80%);
  border: 1.5px solid #f59e0b;
  box-shadow: 0 8px 30px rgba(217, 119, 6, 0.12);
}

[data-theme="warm"] .plan-type,
[data-theme="light"] .plan-type,
.theme-light .plan-type , .theme-warm .plan-type {
  color: #1c1917;
}

[data-theme="warm"] .pricing-card.pro .plan-type,
[data-theme="light"] .pricing-card.pro .plan-type,
.theme-light .pricing-card.pro .plan-type , .theme-warm .pricing-card.pro .plan-type {
  color: #b45309;
}

[data-theme="warm"] .price-amount,
[data-theme="light"] .price-amount,
.theme-light .price-amount , .theme-warm .price-amount {
  color: #1c1917;
}

[data-theme="warm"] .price-period,
[data-theme="light"] .price-period,
.theme-light .price-period , .theme-warm .price-period {
  color: #64748b;
}

[data-theme="warm"] .plan-summary,
[data-theme="light"] .plan-summary,
.theme-light .plan-summary , .theme-warm .plan-summary {
  color: #475569;
}

[data-theme="warm"] .plan-features li,
[data-theme="light"] .plan-features li,
.theme-light .plan-features li , .theme-warm .plan-features li {
  color: #334155;
}

[data-theme="warm"] .check-icon,
[data-theme="light"] .check-icon,
.theme-light .check-icon , .theme-warm .check-icon {
  color: #0284c7;
}

[data-theme="warm"] .check-icon.gold,
[data-theme="light"] .check-icon.gold,
.theme-light .check-icon.gold , .theme-warm .check-icon.gold {
  color: #d97706;
}

[data-theme="warm"] .plan-cta-btn.current,
[data-theme="light"] .plan-cta-btn.current,
.theme-light .plan-cta-btn.current , .theme-warm .plan-cta-btn.current {
  background: #f1f5f9;
  border: 1px solid rgba(200, 188, 175, 0.8);
  color: #64748b;
}

[data-theme="warm"] .pricing-faq-strip,
[data-theme="light"] .pricing-faq-strip,
.theme-light .pricing-faq-strip , .theme-warm .pricing-faq-strip {
  border-top: 1px solid rgba(215, 205, 195, 0.7);
}

[data-theme="warm"] .faq-item,
[data-theme="light"] .faq-item,
.theme-light .faq-item , .theme-warm .faq-item {
  color: #475569;
}

[data-theme="warm"] .faq-item strong,
[data-theme="light"] .faq-item strong,
.theme-light .faq-item strong , .theme-warm .faq-item strong {
  color: #1c1917;
}

/* Checkout Modal */
[data-theme="warm"] .checkout-modal-container,
[data-theme="light"] .checkout-modal-container,
.theme-light .checkout-modal-container , .theme-warm .checkout-modal-container {
  background: #faf8f5;
  border: 1px solid rgba(210, 198, 185, 0.85);
  box-shadow: 0 20px 60px rgba(50, 35, 20, 0.2);
}

[data-theme="warm"] .checkout-brand h3,
[data-theme="light"] .checkout-brand h3,
.theme-light .checkout-brand h3 , .theme-warm .checkout-brand h3 {
  color: #1c1917;
}

[data-theme="warm"] .checkout-brand p,
[data-theme="light"] .checkout-brand p,
.theme-light .checkout-brand p , .theme-warm .checkout-brand p {
  color: #475569;
}

[data-theme="warm"] .checkout-badge,
[data-theme="light"] .checkout-badge,
.theme-light .checkout-badge , .theme-warm .checkout-badge {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

[data-theme="warm"] .checkout-order-summary,
[data-theme="light"] .checkout-order-summary,
.theme-light .checkout-order-summary , .theme-warm .checkout-order-summary {
  background: #ffffff;
  border: 1px solid rgba(215, 205, 195, 0.8);
}

[data-theme="warm"] .summary-plan-details strong,
[data-theme="light"] .summary-plan-details strong,
.theme-light .summary-plan-details strong , .theme-warm .summary-plan-details strong {
  color: #1c1917;
}

[data-theme="warm"] .summary-plan-details span,
[data-theme="light"] .summary-plan-details span,
.theme-light .summary-plan-details span , .theme-warm .summary-plan-details span {
  color: #0284c7;
}

[data-theme="warm"] .summary-price,
[data-theme="light"] .summary-price,
.theme-light .summary-price , .theme-warm .summary-price {
  color: #1c1917;
}

[data-theme="warm"] .summary-term,
[data-theme="light"] .summary-term,
.theme-light .summary-term , .theme-warm .summary-term {
  color: #64748b;
}

[data-theme="warm"] .payment-modes-tabs,
[data-theme="light"] .payment-modes-tabs,
.theme-light .payment-modes-tabs , .theme-warm .payment-modes-tabs {
  border-bottom: 1px solid rgba(210, 198, 185, 0.7);
}

[data-theme="warm"] .payment-mode-tab,
[data-theme="light"] .payment-mode-tab,
.theme-light .payment-mode-tab , .theme-warm .payment-mode-tab {
  color: #475569;
}
[data-theme="warm"] .payment-mode-tab:hover,
[data-theme="light"] .payment-mode-tab:hover,
.theme-light .payment-mode-tab:hover , .theme-warm .payment-mode-tab:hover {
  background: rgba(2, 132, 199, 0.08);
  color: #1c1917;
}
[data-theme="warm"] .payment-mode-tab.active,
[data-theme="light"] .payment-mode-tab.active,
.theme-light .payment-mode-tab.active , .theme-warm .payment-mode-tab.active {
  background: rgba(2, 132, 199, 0.12);
  border-color: #0284c7;
  color: #0284c7;
}

[data-theme="warm"] .form-group label,
[data-theme="light"] .form-group label,
.theme-light .form-group label , .theme-warm .form-group label {
  color: #1c1917;
}

[data-theme="warm"] .form-input,
[data-theme="light"] .form-input,
.theme-light .form-input , .theme-warm .form-input {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.85);
  color: #1c1917;
}
[data-theme="warm"] .form-input::placeholder,
[data-theme="light"] .form-input::placeholder,
.theme-light .form-input::placeholder , .theme-warm .form-input::placeholder {
  color: #64748b;
}

[data-theme="warm"] .brand-tag,
[data-theme="light"] .brand-tag,
.theme-light .brand-tag , .theme-warm .brand-tag {
  background: #f1f5f9;
  border-color: rgba(200, 188, 175, 0.8);
  color: #334155;
}

[data-theme="warm"] .wallet-payment-box,
[data-theme="light"] .wallet-payment-box,
.theme-light .wallet-payment-box , .theme-warm .wallet-payment-box {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.8);
}
[data-theme="warm"] .wallet-payment-box p,
[data-theme="light"] .wallet-payment-box p,
.theme-light .wallet-payment-box p , .theme-warm .wallet-payment-box p {
  color: #475569;
}
[data-theme="warm"] .wallet-note,
[data-theme="light"] .wallet-note,
.theme-light .wallet-note , .theme-warm .wallet-note {
  color: #64748b;
}

[data-theme="warm"] .netbanking-label,
[data-theme="light"] .netbanking-label,
.theme-light .netbanking-label , .theme-warm .netbanking-label {
  color: #1c1917;
}
[data-theme="warm"] .bank-pill,
[data-theme="light"] .bank-pill,
.theme-light .bank-pill , .theme-warm .bank-pill {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.8);
  color: #1c1917;
}

[data-theme="warm"] .checkout-guarantee,
[data-theme="light"] .checkout-guarantee,
.theme-light .checkout-guarantee , .theme-warm .checkout-guarantee {
  color: #64748b;
}

/* Login Modal */
[data-theme="warm"] .login-modal-container,
[data-theme="light"] .login-modal-container,
.theme-light .login-modal-container , .theme-warm .login-modal-container {
  background: #faf8f5;
  border: 1px solid rgba(210, 198, 185, 0.85);
  box-shadow: 0 20px 60px rgba(50, 35, 20, 0.2);
}

[data-theme="warm"] .login-modal-badge,
[data-theme="light"] .login-modal-badge,
.theme-light .login-modal-badge , .theme-warm .login-modal-badge {
  color: #0369a1;
}

[data-theme="warm"] .login-modal-title-group h3,
[data-theme="light"] .login-modal-title-group h3,
.theme-light .login-modal-title-group h3 , .theme-warm .login-modal-title-group h3 {
  color: #1c1917;
}

[data-theme="warm"] .login-modal-title-group p,
[data-theme="light"] .login-modal-title-group p,
.theme-light .login-modal-title-group p , .theme-warm .login-modal-title-group p {
  color: #475569;
}

[data-theme="warm"] .auth-tabs,
[data-theme="light"] .auth-tabs,
.theme-light .auth-tabs , .theme-warm .auth-tabs {
  background: #ede6da;
  border: 1px solid rgba(210, 198, 185, 0.8);
}

[data-theme="warm"] .auth-tab-btn,
[data-theme="light"] .auth-tab-btn,
.theme-light .auth-tab-btn , .theme-warm .auth-tab-btn {
  color: #475569;
}
[data-theme="warm"] .auth-tab-btn:hover,
[data-theme="light"] .auth-tab-btn:hover,
.theme-light .auth-tab-btn:hover , .theme-warm .auth-tab-btn:hover {
  color: #1c1917;
}
[data-theme="warm"] .auth-tab-btn.active,
[data-theme="light"] .auth-tab-btn.active,
.theme-light .auth-tab-btn.active , .theme-warm .auth-tab-btn.active {
  background: #ffffff;
  color: #0284c7;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

[data-theme="warm"] .checkbox-label,
[data-theme="light"] .checkbox-label,
.theme-light .checkbox-label , .theme-warm .checkbox-label {
  color: #475569;
}

[data-theme="warm"] .form-link,
[data-theme="light"] .form-link,
.theme-light .form-link , .theme-warm .form-link {
  color: #0284c7;
}

[data-theme="warm"] .sso-desc,
[data-theme="light"] .sso-desc,
.theme-light .sso-desc , .theme-warm .sso-desc {
  color: #475569;
}

[data-theme="warm"] .sso-subtext,
[data-theme="light"] .sso-subtext,
.theme-light .sso-subtext , .theme-warm .sso-subtext {
  color: #64748b;
}

[data-theme="warm"] .demo-desc,
[data-theme="light"] .demo-desc,
.theme-light .demo-desc , .theme-warm .demo-desc {
  color: #475569;
}

[data-theme="warm"] .demo-choice-btn,
[data-theme="light"] .demo-choice-btn,
.theme-light .demo-choice-btn , .theme-warm .demo-choice-btn {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.85);
  color: #1c1917;
}
[data-theme="warm"] .demo-choice-btn:hover,
[data-theme="light"] .demo-choice-btn:hover,
.theme-light .demo-choice-btn:hover , .theme-warm .demo-choice-btn:hover {
  background: rgba(2, 132, 199, 0.08);
  border-color: #0284c7;
}
[data-theme="warm"] .demo-btn-info strong,
[data-theme="light"] .demo-btn-info strong,
.theme-light .demo-btn-info strong , .theme-warm .demo-btn-info strong {
  color: #1c1917;
}
[data-theme="warm"] .demo-btn-info span,
[data-theme="light"] .demo-btn-info span,
.theme-light .demo-btn-info span , .theme-warm .demo-btn-info span {
  color: #475569;
}

/* Profile Modal */
[data-theme="warm"] .profile-modal-container,
[data-theme="light"] .profile-modal-container,
.theme-light .profile-modal-container , .theme-warm .profile-modal-container {
  background: #faf8f5;
  border: 1px solid rgba(210, 198, 185, 0.85);
  box-shadow: 0 20px 60px rgba(50, 35, 20, 0.2);
}

[data-theme="warm"] #modal-profile-name,
[data-theme="light"] #modal-profile-name,
.theme-light #modal-profile-name , .theme-warm #modal-profile-name {
  color: #1c1917;
}

[data-theme="warm"] #modal-profile-role,
[data-theme="light"] #modal-profile-role,
.theme-light #modal-profile-role , .theme-warm #modal-profile-role {
  color: #0369a1;
}

[data-theme="warm"] #modal-profile-email,
[data-theme="light"] #modal-profile-email,
.theme-light #modal-profile-email , .theme-warm #modal-profile-email {
  color: #64748b;
}

[data-theme="warm"] .profile-avatar-large,
[data-theme="light"] .profile-avatar-large,
.theme-light .profile-avatar-large , .theme-warm .profile-avatar-large {
  background: rgba(2, 132, 199, 0.12);
  border: 1px solid rgba(2, 132, 199, 0.3);
}

[data-theme="warm"] .plan-details-card,
[data-theme="light"] .plan-details-card,
.theme-light .plan-details-card , .theme-warm .plan-details-card {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.85);
}

[data-theme="warm"] #plan-tier-title,
[data-theme="light"] #plan-tier-title,
.theme-light #plan-tier-title , .theme-warm #plan-tier-title {
  color: #1c1917;
}

[data-theme="warm"] #plan-desc-text,
[data-theme="light"] #plan-desc-text,
.theme-light #plan-desc-text , .theme-warm #plan-desc-text {
  color: #475569;
}

[data-theme="warm"] .plan-current-tag,
[data-theme="light"] .plan-current-tag,
.theme-light .plan-current-tag , .theme-warm .plan-current-tag {
  color: #0284c7;
}

[data-theme="warm"] .plan-status-pill,
[data-theme="light"] .plan-status-pill,
.theme-light .plan-status-pill , .theme-warm .plan-status-pill {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

[data-theme="warm"] .saved-sims-empty p,
[data-theme="light"] .saved-sims-empty p,
.theme-light .saved-sims-empty p , .theme-warm .saved-sims-empty p {
  color: #1c1917;
}

[data-theme="warm"] .saved-sims-empty small,
[data-theme="light"] .saved-sims-empty small,
.theme-light .saved-sims-empty small , .theme-warm .saved-sims-empty small {
  color: #64748b;
}

/* ==========================================================================
   6. Universe Scale Zoom View HUD
   ========================================================================== */
[data-theme="warm"] .hud-top,
[data-theme="light"] .hud-top,
.theme-light .hud-top , .theme-warm .hud-top {
  background: rgba(253, 250, 245, 0.94);
  border-bottom: 1px solid rgba(210, 198, 185, 0.8);
  box-shadow: 0 1px 8px rgba(80, 60, 40, 0.05);
}

[data-theme="warm"] .hud-top .brand h1,
[data-theme="light"] .hud-top .brand h1,
.theme-light .hud-top .brand h1 , .theme-warm .hud-top .brand h1 {
  color: #1c1917;
}

[data-theme="warm"] .hud-top .brand p,
[data-theme="light"] .hud-top .brand p,
.theme-light .hud-top .brand p , .theme-warm .hud-top .brand p {
  color: #475569;
}

[data-theme="warm"] .top-actions .btn,
[data-theme="light"] .top-actions .btn,
.theme-light .top-actions .btn , .theme-warm .top-actions .btn {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.85);
  color: #1c1917;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
[data-theme="warm"] .top-actions .btn:hover,
[data-theme="light"] .top-actions .btn:hover,
.theme-light .top-actions .btn:hover , .theme-warm .top-actions .btn:hover {
  border-color: #0284c7;
  color: #0284c7;
}
[data-theme="warm"] .top-actions .btn.active,
[data-theme="light"] .top-actions .btn.active,
.theme-light .top-actions .btn.active , .theme-warm .top-actions .btn.active {
  background: rgba(2, 132, 199, 0.12);
  border-color: #0284c7;
  color: #0284c7;
}

[data-theme="warm"] .scale-readout .exp,
[data-theme="light"] .scale-readout .exp,
.theme-light .scale-readout .exp , .theme-warm .scale-readout .exp {
  color: #1c1917;
}

[data-theme="warm"] .scale-readout .unit,
[data-theme="light"] .scale-readout .unit,
.theme-light .scale-readout .unit , .theme-warm .scale-readout .unit {
  color: #0369a1;
}

/* Info Card in Universe View */
[data-theme="warm"] .info-card,
[data-theme="light"] .info-card,
.theme-light .info-card , .theme-warm .info-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(210, 198, 185, 0.85);
  box-shadow: 0 12px 36px rgba(50, 35, 20, 0.12);
}

[data-theme="warm"] #card-title,
[data-theme="light"] #card-title,
.theme-light #card-title , .theme-warm #card-title {
  color: #1c1917;
}

[data-theme="warm"] #card-desc,
[data-theme="light"] #card-desc,
.theme-light #card-desc , .theme-warm #card-desc {
  color: #334155;
}

[data-theme="warm"] #card-size,
[data-theme="light"] #card-size,
.theme-light #card-size , .theme-warm #card-size {
  color: #0284c7;
}

[data-theme="warm"] .card-fact-box,
[data-theme="light"] .card-fact-box,
.theme-light .card-fact-box , .theme-warm .card-fact-box {
  background: #faf6f0;
  border: 1px solid rgba(215, 205, 195, 0.8);
}

[data-theme="warm"] .fact-header,
[data-theme="light"] .fact-header,
.theme-light .fact-header , .theme-warm .fact-header {
  color: #b45309;
}

[data-theme="warm"] .fact-text,
[data-theme="light"] .fact-text,
.theme-light .fact-text , .theme-warm .fact-text {
  color: #475569;
}

[data-theme="warm"] .card-analogy-box,
[data-theme="light"] .card-analogy-box,
.theme-light .card-analogy-box , .theme-warm .card-analogy-box {
  background: #f0f7ff;
  border: 1px solid rgba(2, 132, 199, 0.25);
}

[data-theme="warm"] .analogy-text,
[data-theme="light"] .analogy-text,
.theme-light .analogy-text , .theme-warm .analogy-text {
  color: #0369a1;
}

[data-theme="warm"] .parts-header,
[data-theme="light"] .parts-header,
.theme-light .parts-header , .theme-warm .parts-header {
  color: #1c1917;
}

[data-theme="warm"] .shortcut-hint,
[data-theme="light"] .shortcut-hint,
.theme-light .shortcut-hint , .theme-warm .shortcut-hint {
  color: #64748b;
}

[data-theme="warm"] .shortcut-hint kbd,
[data-theme="light"] .shortcut-hint kbd,
.theme-light .shortcut-hint kbd , .theme-warm .shortcut-hint kbd {
  background: #f1f5f9;
  border-color: rgba(200, 188, 175, 0.8);
  color: #334155;
}

/* Compare Panel */
[data-theme="warm"] .compare-panel,
[data-theme="light"] .compare-panel,
.theme-light .compare-panel , .theme-warm .compare-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(210, 198, 185, 0.85);
  box-shadow: 0 12px 36px rgba(50, 35, 20, 0.12);
}

[data-theme="warm"] .compare-panel h3,
[data-theme="light"] .compare-panel h3,
.theme-light .compare-panel h3 , .theme-warm .compare-panel h3 {
  color: #1c1917;
}

[data-theme="warm"] .compare-panel label,
[data-theme="light"] .compare-panel label,
.theme-light .compare-panel label , .theme-warm .compare-panel label {
  color: #475569;
}

[data-theme="warm"] .compare-panel select,
[data-theme="light"] .compare-panel select,
.theme-light .compare-panel select , .theme-warm .compare-panel select {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.85);
  color: #1c1917;
}

[data-theme="warm"] .ratio-box,
[data-theme="light"] .ratio-box,
.theme-light .ratio-box , .theme-warm .ratio-box {
  background: #faf6f0;
  border: 1px solid rgba(215, 205, 195, 0.8);
  color: #1c1917;
}

/* Universe Bottom HUD */
[data-theme="warm"] .hud-bottom,
[data-theme="light"] .hud-bottom,
.theme-light .hud-bottom , .theme-warm .hud-bottom {
  background: rgba(253, 250, 245, 0.95);
  border-top: 1px solid rgba(210, 198, 185, 0.8);
  box-shadow: 0 -1px 8px rgba(80, 60, 40, 0.05);
}

[data-theme="warm"] .slider-row span,
[data-theme="light"] .slider-row span,
.theme-light .slider-row span , .theme-warm .slider-row span {
  color: #1c1917;
}

[data-theme="warm"] .label-sub,
[data-theme="light"] .label-sub,
.theme-light .label-sub , .theme-warm .label-sub {
  color: #64748b;
}

[data-theme="warm"] #scale-slider,
[data-theme="light"] #scale-slider,
.theme-light #scale-slider , .theme-warm #scale-slider {
  accent-color: #0284c7;
}

[data-theme="warm"] .play-btn,
[data-theme="light"] .play-btn,
.theme-light .play-btn , .theme-warm .play-btn {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.85);
  color: #1c1917;
}
[data-theme="warm"] .play-btn:hover,
[data-theme="light"] .play-btn:hover,
.theme-light .play-btn:hover , .theme-warm .play-btn:hover {
  border-color: #0284c7;
  color: #0284c7;
}

[data-theme="warm"] .filter-tab,
[data-theme="light"] .filter-tab,
.theme-light .filter-tab , .theme-warm .filter-tab {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.85);
  color: #475569;
}
[data-theme="warm"] .filter-tab:hover,
[data-theme="light"] .filter-tab:hover,
.theme-light .filter-tab:hover , .theme-warm .filter-tab:hover {
  color: #1c1917;
  border-color: #0284c7;
}
[data-theme="warm"] .filter-tab.active,
[data-theme="light"] .filter-tab.active,
.theme-light .filter-tab.active , .theme-warm .filter-tab.active {
  background: rgba(2, 132, 199, 0.12);
  border-color: #0284c7;
  color: #0284c7;
}

[data-theme="warm"] .jump-chip,
[data-theme="light"] .jump-chip,
.theme-light .jump-chip , .theme-warm .jump-chip {
  background: #ffffff;
  border: 1px solid rgba(210, 198, 185, 0.85);
  color: #475569;
}
[data-theme="warm"] .jump-chip:hover,
[data-theme="light"] .jump-chip:hover,
.theme-light .jump-chip:hover , .theme-warm .jump-chip:hover {
  color: #0284c7;
  border-color: #0284c7;
}
[data-theme="warm"] .jump-chip.active,
[data-theme="light"] .jump-chip.active,
.theme-light .jump-chip.active , .theme-warm .jump-chip.active {
  background: rgba(2, 132, 199, 0.12);
  border-color: #0284c7;
  color: #0284c7;
}

/* ---- Contact Admin Modal & Footer Button ---- */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
#footer-contact-admin-btn {
  white-space: nowrap;
}
.contact-admin-container {
  max-width: 480px;
}
.contact-admin-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.btn-whatsapp {
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(34, 197, 94, 0.45);
  color: #4ade80;
  text-align: center;
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
}
.btn-whatsapp:hover {
  background: rgba(34, 197, 94, 0.28);
  color: #ffffff;
}
