/* ==========================================================================
   PrayogSetu — Voltage Divider Simulator Stylesheet
   Professional Engineering Virtual Laboratory Design Language
   ========================================================================== */

:root {
  /* Core Dark Theme Palette */
  --bg-main: #060911;
  --bg-card: #0c1220;
  --bg-card-alt: #111a2e;
  --bg-input: #080d18;
  --bg-hover: #17233d;

  --border: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-active: rgba(56, 189, 248, 0.4);

  --primary: #38bdf8;
  --primary-glow: rgba(56, 189, 248, 0.35);
  --secondary: #818cf8;
  --accent-r1: #38bdf8;
  --accent-r2: #a78bfa;
  --accent-rl: #f59e0b;
  --accent-gnd: #10b981;
  --accent-err: #ef4444;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-highlight: #38bdf8;

  --font-main: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.15);
}

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

body {
  background-color: var(--bg-main);
  background-image: none !important;
  color: var(--text-primary);
  font-family: var(--font-main);
  min-height: 100vh;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────────────────────────────────────
   1. HEADER NAVIGATION BAR
   ───────────────────────────────────────────────────────────── */
.lab-header {
  background: rgba(12, 18, 32, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1540px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.home-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.lab-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(129, 140, 248, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.home-link:hover .lab-icon {
  transform: scale(1.05);
  border-color: var(--primary);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-lab {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.12);
  color: var(--primary);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.25);
  letter-spacing: 0.05em;
}

.lab-main-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sim-status-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: #10b981;
}

.sim-status-pill.paused {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-ring 1.5s infinite;
}

.sim-status-pill.paused .pulse-dot {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
  animation: none;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
}

.btn-primary {
  background: #0284c7;
  color: #ffffff;
}

.btn-primary:hover {
  background: #0369a1;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-secondary {
  background: rgba(56, 189, 248, 0.12);
  color: var(--primary);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.btn-secondary:hover {
  background: rgba(56, 189, 248, 0.22);
}

/* ─────────────────────────────────────────────────────────────
   2. QUICK PRESETS BAR
   ───────────────────────────────────────────────────────────── */
.presets-bar {
  background: rgba(12, 18, 32, 0.6);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 1.5rem;
}

.presets-container {
  max-width: 1540px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.presets-container::-webkit-scrollbar {
  display: none;
}

.presets-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.presets-list {
  display: flex;
  gap: 0.4rem;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.725rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.preset-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.preset-btn.active {
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

/* ─────────────────────────────────────────────────────────────
   3. MAIN WORKSPACE LAYOUT (2-COLUMN GRID)
   ───────────────────────────────────────────────────────────── */
.lab-main-layout {
  max-width: 1540px;
  width: 100%;
  margin: 1.25rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 1.25rem;
  flex: 1;
}

@media (max-width: 1200px) {
  .lab-main-layout {
    grid-template-columns: 1fr;
  }
}

.left-column, .right-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Standard Panel Card */
.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.panel-header {
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.panel-title svg {
  color: var(--primary);
}

/* Pills & Badges */
.pill {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pill-on {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.pill-off {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.pill-live {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.pill-active {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tag-math {
  background: rgba(167, 139, 250, 0.12);
  color: var(--accent-r2);
  border: 1px solid rgba(167, 139, 250, 0.25);
}

/* ─────────────────────────────────────────────────────────────
   4. CIRCUIT SCHEMATIC & SVG CANVAS
   ───────────────────────────────────────────────────────────── */
.circuit-card {
  position: relative;
}

.circuit-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 780 / 430;
  max-height: 480px;
  background: #080d18;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#circuit-svg {
  width: 100%;
  height: 100%;
  z-index: 2;
  user-select: none;
  display: block;
}

/* Circuit Canvas Background Grid & Elements */
.circuit-board-bg {
  fill: #080d18;
}

.grid-point {
  fill: rgba(255, 255, 255, 0.05);
}

.circuit-wire {
  stroke-width: 3.5px;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.3s ease;
}

.circuit-wire.high-potential {
  stroke: #38bdf8;
  filter: drop-shadow(0 0 4px rgba(56, 189, 248, 0.4));
}

.circuit-wire.mid-potential {
  stroke: #a78bfa;
  filter: drop-shadow(0 0 4px rgba(167, 139, 250, 0.4));
}

.circuit-wire.load-potential {
  stroke: #f59e0b;
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.3));
}

.circuit-wire.ground-potential {
  stroke: #475569;
}

/* Resistor SVG Zigzags */
.resistor-zigzag {
  stroke-width: 4px;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: all 0.25s ease;
}

.resistor-zigzag.r1-color {
  stroke: #38bdf8;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.4));
}

.resistor-zigzag.r2-color {
  stroke: #a78bfa;
  filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.4));
}

.resistor-zigzag.rl-color {
  stroke: #f59e0b;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.4));
}

.resistor-touch-area {
  fill: transparent;
  stroke: transparent;
  stroke-width: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.resistor-touch-area:hover {
  fill: rgba(255, 255, 255, 0.03);
  stroke: rgba(255, 255, 255, 0.15);
}

/* DC Source Group */
.source-circle {
  fill: #0f172a;
  stroke: #38bdf8;
  stroke-width: 3px;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.3));
}

.polarity-label {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: middle;
}

.polarity-label.plus { fill: #38bdf8; }
.polarity-label.minus { fill: #94a3b8; }

/* SVG Labels & Badges */
.comp-label-box {
  fill: #131d33;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 1px;
}

.comp-label-box.resistor-badge {
  fill: rgba(19, 29, 51, 0.95);
  stroke: var(--border-active);
}

.comp-label-box.load-badge {
  stroke: rgba(245, 158, 11, 0.4);
}

.comp-label-text {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: middle;
  fill: var(--text-primary);
}

.r1-text { fill: #7dd3fc; }
.r2-text { fill: #c4b5fd; }
.rl-text { fill: #fcd34d; }

.telemetry-sub-box {
  fill: #0c1220;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1px;
}

.telemetry-sub-text {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: middle;
  fill: #94a3b8;
}

.telemetry-sub-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: middle;
  fill: #64748b;
}

/* Current Flow Arrows */
.current-arrow-line {
  stroke: #38bdf8;
  stroke-width: 2px;
  stroke-dasharray: 4, 3;
}

.current-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  fill: #38bdf8;
  text-anchor: middle;
}

.current-arrow-line.load-arrow {
  stroke: #f59e0b;
}

.current-label.load-label {
  fill: #f59e0b;
}

/* Vout Node */
.node-core-dot {
  fill: #ffffff;
  stroke: #a78bfa;
  stroke-width: 2.5px;
}

.node-tag-box {
  fill: #4c1d95;
  stroke: #a78bfa;
  stroke-width: 1.5px;
}

.node-tag-text {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  fill: #ffffff;
  text-anchor: middle;
  dominant-baseline: middle;
}

/* Switch */
.switch-terminal {
  fill: #475569;
  stroke: #94a3b8;
  stroke-width: 1.5px;
}

.switch-blade-line {
  stroke: #f59e0b;
  transition: all 0.25s ease;
}

.switch-blade-line.open {
  stroke: #94a3b8;
}

.switch-label-svg {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  fill: #94a3b8;
  text-anchor: middle;
}

/* GND Symbol */
.gnd-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  fill: #64748b;
  text-anchor: middle;
}

/* Digital Voltmeter */
.voltmeter-bezel {
  fill: #0c1220;
  stroke: #1e293b;
  stroke-width: 2px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.voltmeter-screen {
  fill: #060911;
  stroke: #0284c7;
  stroke-width: 1.5px;
}

.meter-lcd-header {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  fill: #64748b;
  letter-spacing: 0.05em;
}

.meter-lcd-unit {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  fill: #38bdf8;
  text-anchor: end;
}

.meter-lcd-digits {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 800;
  fill: #38bdf8;
  text-anchor: middle;
  dominant-baseline: middle;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.meter-lcd-sub {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  fill: #94a3b8;
  text-anchor: middle;
}

.probe-wire-red {
  fill: none;
  stroke: #ef4444;
  stroke-width: 2px;
  stroke-dasharray: 4, 3;
}

.probe-wire-black {
  fill: none;
  stroke: #475569;
  stroke-width: 2px;
  stroke-dasharray: 4, 3;
}

/* Circuit Verification Footer Strip */
.circuit-footer-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
  background: var(--bg-card);
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
}

.footer-metric {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.metric-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.metric-val {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ─────────────────────────────────────────────────────────────
   5. LIVE FORMULA & STEP-BY-STEP DERIVATION
   ───────────────────────────────────────────────────────────── */
.formula-engine-card {
  background: var(--bg-card);
}

.formula-body {
  padding: 1.25rem;
}

.formula-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.calc-step-card {
  background: rgba(13, 20, 36, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.calc-step-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.08em;
}

.step-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
}

.step-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.math-display-box {
  background: #080d18;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.math-mini-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.math-val-cyan { color: #38bdf8; font-weight: 700; }
.math-val-purple { color: #c4b5fd; font-weight: 700; }
.math-val-amber { color: #fbbf24; font-weight: 700; }
.math-val-green { color: #34d399; font-weight: 700; }
.math-val-white { color: #ffffff; font-weight: 700; }
.math-val-dim { color: #94a3b8; font-size: 0.7rem; }

/* ─────────────────────────────────────────────────────────────
   6. REAL-TIME TELEMETRY HERO DASHBOARD & METERS QUAD
   ───────────────────────────────────────────────────────────── */
.telemetry-card {
  background: var(--bg-card);
}

.hero-meter-box {
  padding: 1.25rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.06) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}

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

.hero-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge-subtle {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
}

.hero-val-display {
  font-family: var(--font-mono);
  font-size: 2.35rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.unit-large {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  margin-left: 0.25rem;
}

.hero-bar-track {
  width: 100%;
  height: 8px;
  background: #080d18;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.hero-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #38bdf8);
  border-radius: var(--radius-pill);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
  transition: width 0.2s ease;
}

.hero-sub-stats {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.meters-quad-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}

.mini-meter-tile {
  background: var(--bg-card);
  padding: 0.9rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mini-meter-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mini-meter-value {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
}

.mini-meter-sub {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* ─────────────────────────────────────────────────────────────
   7. CIRCUIT CONTROL KNOBS & DIRECT INPUTS PANEL
   ───────────────────────────────────────────────────────────── */
.controls-card {
  background: var(--bg-card);
}

.controls-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.control-row-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

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

.control-label-row label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
}

.label-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.label-badge {
  font-family: var(--font-mono);
  font-size: 0.675rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: var(--radius-sm);
}

.vin-badge { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.r1-badge { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.r2-badge { background: rgba(167, 139, 250, 0.15); color: #a78bfa; }
.rl-badge { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

/* Direct Input Textbox Container */
.direct-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
  transition: all 0.2s ease;
}

.direct-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.numeric-input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  width: 80px;
  text-align: right;
  outline: none;
  padding-right: 4px;
}

.numeric-input::-webkit-inner-spin-button,
.numeric-input::-webkit-outer-spin-button {
  opacity: 0.7;
  cursor: pointer;
}

.input-unit {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
  font-weight: 600;
}

/* Custom Sliders */
.slider-wrapper {
  padding: 0.2rem 0;
}

.styled-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--radius-pill);
  background: #1e293b;
  outline: none;
  cursor: pointer;
  transition: background 0.2s;
}

.styled-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  cursor: pointer;
  border: 2px solid #0284c7;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
  transition: transform 0.15s ease, background 0.15s ease;
}

.styled-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #38bdf8;
}

.styled-slider.slider-vin::-webkit-slider-thumb { border-color: #38bdf8; }
.styled-slider.slider-r1::-webkit-slider-thumb { border-color: #38bdf8; }
.styled-slider.slider-r2::-webkit-slider-thumb { border-color: #a78bfa; }
.styled-slider.slider-rl::-webkit-slider-thumb { border-color: #f59e0b; }
.styled-slider.slider-pot::-webkit-slider-thumb { border-color: #10b981; }

.quick-chips-row {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.chip-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.675rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.chip-btn.active {
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.2);
}

/* Potentiometer & Load Resistor Toggles */
.toggle-mode-container,
.load-resistance-container {
  background: rgba(13, 20, 36, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toggle-mode-row,
.load-toggle-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.toggle-mode-label,
.load-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-grow: 1;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.load-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pot-slider-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 0.25rem;
}

.pot-percent-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.pot-percent-label b {
  color: #10b981;
}

.pot-detail {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.load-controls-expanded {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 0.25rem;
}

/* Switch UI */
.switch-ui {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

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

.slider-switch {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #334155;
  transition: .3s;
  border-radius: 20px;
}

.slider-switch:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.switch-ui input:checked + .slider-switch {
  background-color: #f59e0b;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.5);
}

#chk-pot-mode:checked + .slider-switch {
  background-color: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

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

/* ─────────────────────────────────────────────────────────────
   8. OBSERVATION LOG TABLE
   ───────────────────────────────────────────────────────────── */
.table-card {
  background: var(--bg-card);
}

.table-actions {
  display: flex;
  gap: 0.5rem;
}

.table-scroll-wrap {
  max-height: 220px;
  overflow-y: auto;
}

.lab-obs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  text-align: left;
}

.lab-obs-table th {
  background: rgba(255, 255, 255, 0.03);
  padding: 0.6rem 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.lab-obs-table td {
  padding: 0.5rem 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.empty-table-row td {
  text-align: center;
  color: var(--text-muted);
  padding: 1.5rem;
  font-family: var(--font-main);
  font-style: italic;
}

/* ─────────────────────────────────────────────────────────────
   9. LAB THEORY & EDUCATIONAL SECTION (BOTTOM)
   ───────────────────────────────────────────────────────────── */
.lab-theory-section {
  background: #070b13;
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  margin-top: 2rem;
}

.theory-container {
  max-width: 1540px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.section-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.theory-pill {
  font-family: var(--font-mono);
  font-size: 0.675rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.08em;
}

.section-title-wrap h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.section-title-wrap p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.theory-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.theory-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.theory-card-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theory-icon { font-size: 1.2rem; }

.theory-card-header h3 {
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--text-primary);
}

.theory-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.theory-math {
  background: #080d18;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #e2e8f0;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.theory-math-line { display: block; }

.theory-list {
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.theory-list li {
  font-size: 0.785rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.theory-list li strong { color: var(--text-highlight); }

/* ─────────────────────────────────────────────────────────────
   10. LAB FOOTER
   ───────────────────────────────────────────────────────────── */
.lab-footer {
  background: #05080f;
  border-top: 1px solid var(--border);
  padding: 1.5rem;
}

.footer-container {
  max-width: 1540px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-left p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  font-size: 0.775rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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


/* ─────────────────────────────────────────────────────────────
   10. LIGHT THEME COMPREHENSIVE OVERRIDES
   ───────────────────────────────────────────────────────────── */
[data-theme="light"],
html[data-theme="light"],
html:not(.dark):not([data-theme="dark"]) {
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-alt: #f1f5f9;
  --bg-input: #ffffff;
  --bg-hover: #f1f5f9;

  --border: #e2e8f0;
  --border-subtle: #f1f5f9;
  --border-active: #0284c7;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-highlight: #0284c7;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] body,
html[data-theme="light"] body {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

[data-theme="light"] .lab-header,
html[data-theme="light"] .lab-header {
  background: rgba(255, 255, 255, 0.95) !important;
  border-bottom-color: #e2e8f0 !important;
}

[data-theme="light"] .lab-main-title,
html[data-theme="light"] .lab-main-title {
  color: #0f172a !important;
}

[data-theme="light"] .presets-bar,
html[data-theme="light"] .presets-bar {
  background: #f1f5f9 !important;
  border-bottom-color: #e2e8f0 !important;
}

[data-theme="light"] .preset-btn,
html[data-theme="light"] .preset-btn {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

[data-theme="light"] .preset-btn:hover,
html[data-theme="light"] .preset-btn:hover {
  background: #e0f2fe !important;
  color: #0284c7 !important;
  border-color: #38bdf8 !important;
}

[data-theme="light"] .preset-btn.active,
html[data-theme="light"] .preset-btn.active {
  background: #e0f2fe !important;
  color: #0284c7 !important;
  border-color: #0284c7 !important;
}

[data-theme="light"] .panel-card,
html[data-theme="light"] .panel-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .panel-header,
html[data-theme="light"] .panel-header {
  background: #f8fafc !important;
  border-bottom-color: #e2e8f0 !important;
}

[data-theme="light"] .panel-title,
html[data-theme="light"] .panel-title {
  color: #0f172a !important;
}

/* Light Mode SVG Circuit */
[data-theme="light"] .circuit-wrapper,
html[data-theme="light"] .circuit-wrapper {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] .circuit-board-bg,
html[data-theme="light"] .circuit-board-bg {
  fill: #f8fafc !important;
}

[data-theme="light"] .grid-point,
html[data-theme="light"] .grid-point {
  fill: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .source-circle,
html[data-theme="light"] .source-circle {
  fill: #ffffff !important;
  stroke: #0284c7 !important;
}

[data-theme="light"] .polarity-label.plus,
html[data-theme="light"] .polarity-label.plus {
  fill: #0284c7 !important;
}

[data-theme="light"] .polarity-label.minus,
html[data-theme="light"] .polarity-label.minus {
  fill: #64748b !important;
}

[data-theme="light"] .comp-label-box,
html[data-theme="light"] .comp-label-box {
  fill: #ffffff !important;
  stroke: #cbd5e1 !important;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.06)) !important;
}

[data-theme="light"] .comp-label-box.resistor-badge,
html[data-theme="light"] .comp-label-box.resistor-badge {
  fill: #ffffff !important;
  stroke: #0284c7 !important;
}

[data-theme="light"] .comp-label-box.load-badge,
html[data-theme="light"] .comp-label-box.load-badge {
  fill: #fffbeb !important;
  stroke: #f59e0b !important;
}

[data-theme="light"] .comp-label-text,
html[data-theme="light"] .comp-label-text {
  fill: #0f172a !important;
}

[data-theme="light"] .r1-text,
html[data-theme="light"] .r1-text {
  fill: #0369a1 !important;
}

[data-theme="light"] .r2-text,
html[data-theme="light"] .r2-text {
  fill: #6d28d9 !important;
}

[data-theme="light"] .rl-text,
html[data-theme="light"] .rl-text {
  fill: #b45309 !important;
}

[data-theme="light"] .telemetry-sub-box,
html[data-theme="light"] .telemetry-sub-box {
  fill: #f1f5f9 !important;
  stroke: #cbd5e1 !important;
}

[data-theme="light"] .telemetry-sub-text,
html[data-theme="light"] .telemetry-sub-text {
  fill: #334155 !important;
}

[data-theme="light"] .telemetry-sub-sub,
html[data-theme="light"] .telemetry-sub-sub {
  fill: #64748b !important;
}

[data-theme="light"] .current-label,
html[data-theme="light"] .current-label {
  fill: #0284c7 !important;
}

[data-theme="light"] .current-label.load-label,
html[data-theme="light"] .current-label.load-label {
  fill: #d97706 !important;
}

[data-theme="light"] .node-tag-box,
html[data-theme="light"] .node-tag-box {
  fill: #ede9fe !important;
  stroke: #7c3aed !important;
}

[data-theme="light"] .node-tag-text,
html[data-theme="light"] .node-tag-text {
  fill: #6d28d9 !important;
}

[data-theme="light"] .gnd-label,
html[data-theme="light"] .gnd-label {
  fill: #475569 !important;
}

[data-theme="light"] .voltmeter-bezel,
html[data-theme="light"] .voltmeter-bezel {
  fill: #ffffff !important;
  stroke: #cbd5e1 !important;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.08)) !important;
}

[data-theme="light"] .voltmeter-screen,
html[data-theme="light"] .voltmeter-screen {
  fill: #f8fafc !important;
  stroke: #0284c7 !important;
}

[data-theme="light"] .meter-lcd-header,
html[data-theme="light"] .meter-lcd-header {
  fill: #64748b !important;
}

[data-theme="light"] .meter-lcd-digits,
html[data-theme="light"] .meter-lcd-digits {
  fill: #0284c7 !important;
  text-shadow: none !important;
}

[data-theme="light"] .meter-lcd-sub,
html[data-theme="light"] .meter-lcd-sub {
  fill: #475569 !important;
}

[data-theme="light"] .circuit-footer-strip,
html[data-theme="light"] .circuit-footer-strip {
  background: #f8fafc !important;
  border-top-color: #e2e8f0 !important;
}

[data-theme="light"] .metric-label,
html[data-theme="light"] .metric-label {
  color: #64748b !important;
}

[data-theme="light"] .metric-val,
html[data-theme="light"] .metric-val {
  color: #0f172a !important;
}

/* Light Mode Telemetry Hero & Meters Quad */
[data-theme="light"] .telemetry-card,
html[data-theme="light"] .telemetry-card {
  background: #ffffff !important;
}

[data-theme="light"] .hero-meter-box,
html[data-theme="light"] .hero-meter-box {
  background: linear-gradient(180deg, rgba(2, 132, 199, 0.05) 0%, transparent 100%) !important;
  border-bottom-color: #e2e8f0 !important;
}

[data-theme="light"] .hero-label,
html[data-theme="light"] .hero-label {
  color: #475569 !important;
}

[data-theme="light"] .badge-subtle,
html[data-theme="light"] .badge-subtle {
  background: #e2e8f0 !important;
  color: #334155 !important;
}

[data-theme="light"] .hero-val-display,
html[data-theme="light"] .hero-val-display {
  color: #0f172a !important;
  text-shadow: none !important;
}

[data-theme="light"] .unit-large,
html[data-theme="light"] .unit-large {
  color: #0284c7 !important;
}

[data-theme="light"] .hero-bar-track,
html[data-theme="light"] .hero-bar-track {
  background: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
}

[data-theme="light"] .hero-sub-stats,
html[data-theme="light"] .hero-sub-stats {
  color: #475569 !important;
}

[data-theme="light"] .meters-quad-grid,
html[data-theme="light"] .meters-quad-grid {
  background: #e2e8f0 !important;
}

[data-theme="light"] .mini-meter-tile,
html[data-theme="light"] .mini-meter-tile {
  background: #ffffff !important;
}

[data-theme="light"] .mini-meter-label,
html[data-theme="light"] .mini-meter-label {
  color: #64748b !important;
}

[data-theme="light"] .mini-meter-value,
html[data-theme="light"] .mini-meter-value {
  color: #0f172a !important;
}

[data-theme="light"] .mini-meter-sub,
html[data-theme="light"] .mini-meter-sub {
  color: #475569 !important;
}

/* Light Mode Controls & Direct Input Textboxes */
[data-theme="light"] .controls-card,
html[data-theme="light"] .controls-card {
  background: #ffffff !important;
}

[data-theme="light"] .label-title,
html[data-theme="light"] .label-title {
  color: #0f172a !important;
}

[data-theme="light"] .direct-input-wrap,
html[data-theme="light"] .direct-input-wrap {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .direct-input-wrap:focus-within,
html[data-theme="light"] .direct-input-wrap:focus-within {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2) !important;
}

[data-theme="light"] .numeric-input,
html[data-theme="light"] .numeric-input {
  color: #0f172a !important;
}

[data-theme="light"] .input-unit,
html[data-theme="light"] .input-unit {
  color: #64748b !important;
}

[data-theme="light"] .styled-slider,
html[data-theme="light"] .styled-slider {
  background: #e2e8f0 !important;
}

[data-theme="light"] .chip-btn,
html[data-theme="light"] .chip-btn {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

[data-theme="light"] .chip-btn:hover,
html[data-theme="light"] .chip-btn:hover {
  background: #e0f2fe !important;
  color: #0284c7 !important;
  border-color: #38bdf8 !important;
}

[data-theme="light"] .chip-btn.active,
html[data-theme="light"] .chip-btn.active {
  background: #e0f2fe !important;
  color: #0284c7 !important;
  border-color: #0284c7 !important;
}

[data-theme="light"] .toggle-mode-container,
[data-theme="light"] .load-resistance-container,
html[data-theme="light"] .toggle-mode-container,
html[data-theme="light"] .load-resistance-container {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] .toggle-mode-label,
[data-theme="light"] .load-section-title,
html[data-theme="light"] .toggle-mode-label,
html[data-theme="light"] .load-section-title {
  color: #0f172a !important;
}

[data-theme="light"] .slider-switch,
html[data-theme="light"] .slider-switch {
  background-color: #cbd5e1 !important;
}

/* Light Mode Formula Engine */
[data-theme="light"] .calc-step-card,
html[data-theme="light"] .calc-step-card {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] .step-title,
html[data-theme="light"] .step-title {
  color: #0f172a !important;
}

[data-theme="light"] .step-desc,
html[data-theme="light"] .step-desc {
  color: #475569 !important;
}

[data-theme="light"] .math-display-box,
html[data-theme="light"] .math-display-box {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}

[data-theme="light"] .math-val-white,
html[data-theme="light"] .math-val-white {
  color: #0f172a !important;
}

[data-theme="light"] .math-val-dim,
html[data-theme="light"] .math-val-dim {
  color: #64748b !important;
}

/* Light Mode Observation Table */
[data-theme="light"] .lab-obs-table th,
html[data-theme="light"] .lab-obs-table th {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border-bottom-color: #cbd5e1 !important;
}

[data-theme="light"] .lab-obs-table td,
html[data-theme="light"] .lab-obs-table td {
  border-bottom-color: #f1f5f9 !important;
  color: #1e293b !important;
}

[data-theme="light"] .lab-obs-table tr:hover td,
html[data-theme="light"] .lab-obs-table tr:hover td {
  background: #f8fafc !important;
}

/* Light Mode Theory Section & Cards */
[data-theme="light"] .lab-theory-section,
html[data-theme="light"] .lab-theory-section,
html:not(.dark):not([data-theme="dark"]) .lab-theory-section {
  background: #f1f5f9 !important;
  border-top-color: #e2e8f0 !important;
}

[data-theme="light"] .section-title-wrap h2,
html[data-theme="light"] .section-title-wrap h2,
html:not(.dark):not([data-theme="dark"]) .section-title-wrap h2 {
  color: #0f172a !important;
}

[data-theme="light"] .section-title-wrap p,
html[data-theme="light"] .section-title-wrap p,
html:not(.dark):not([data-theme="dark"]) .section-title-wrap p {
  color: #475569 !important;
}

[data-theme="light"] .theory-pill,
html[data-theme="light"] .theory-pill,
html:not(.dark):not([data-theme="dark"]) .theory-pill {
  color: #0284c7 !important;
}

[data-theme="light"] .theory-card,
html[data-theme="light"] .theory-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .theory-card-header h3,
html[data-theme="light"] .theory-card-header h3 {
  color: #0f172a !important;
}

[data-theme="light"] .theory-card p,
html[data-theme="light"] .theory-card p {
  color: #475569 !important;
}

[data-theme="light"] .theory-math,
html[data-theme="light"] .theory-math {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0284c7 !important;
}

[data-theme="light"] .theory-list li,
html[data-theme="light"] .theory-list li {
  color: #475569 !important;
}

/* Light Theme Footer */
[data-theme="light"] .lab-footer,
html[data-theme="light"] .lab-footer,
html:not(.dark):not([data-theme="dark"]) .lab-footer {
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
  padding: 1.5rem !important;
}

[data-theme="light"] .footer-container,
html[data-theme="light"] .footer-container {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  max-width: 1540px !important;
  margin: 0 auto !important;
  gap: 1rem !important;
}

[data-theme="light"] .footer-brand,
html[data-theme="light"] .footer-brand,
html:not(.dark):not([data-theme="dark"]) .footer-brand {
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

[data-theme="light"] .footer-left p,
html[data-theme="light"] .footer-left p,
html:not(.dark):not([data-theme="dark"]) .footer-left p {
  font-size: 0.75rem !important;
  color: #64748b !important;
  margin-top: 0.25rem !important;
}

[data-theme="light"] .footer-links,
html[data-theme="light"] .footer-links {
  display: flex !important;
  gap: 1.25rem !important;
  flex-wrap: wrap !important;
}

[data-theme="light"] .footer-links a,
html[data-theme="light"] .footer-links a,
html:not(.dark):not([data-theme="dark"]) .footer-links a {
  font-size: 0.775rem !important;
  color: #475569 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  transition: color 0.2s ease !important;
}

[data-theme="light"] .footer-links a:hover,
html[data-theme="light"] .footer-links a:hover,
html:not(.dark):not([data-theme="dark"]) .footer-links a {
  color: #0284c7 !important;
}

