/* Shared design system loaded via shared.css */

body {
                              font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
                              background-color: #1e1e2e;
                              color: #cdd6f4;
                              margin: 0;
                              padding: 20px;
                              display: flex;
                              flex-direction: column;
                              align-items: center;
                    }

                    h1 {
                              color: #89b4fa;
                              margin-bottom: 5px;
                    }

                    .subtitle {
                              color: #a6adc8;
                              margin-bottom: 20px;
                              font-size: 14px;
                    }

                    .dashboard {
                              display: flex;
                              gap: 20px;
                              max-width: 1200px;
                              width: 100%;
                              flex-wrap: wrap;
                    }

                    .controls-panel {
                              background-color: #313244;
                              padding: 20px;
                              border-radius: 12px;
                              box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
                              flex: 1;
                              min-width: 300px;
                              display: flex;
                              flex-direction: column;
                              gap: 15px;
                    }

                    .input-group {
                              display: flex;
                              flex-direction: column;
                              gap: 5px;
                    }

                    label {
                              color: #a6e3a1;
                              font-weight: bold;
                              font-size: 14px;
                    }

                    input[type="text"] {
                              padding: 10px;
                              border-radius: 6px;
                              border: 1px solid #45475a;
                              background-color: #11111b;
                              color: #cdd6f4;
                              font-family: monospace;
                    }

                    input[type="range"] {
                              width: 100%;
                              margin-top: 5px;
                    }

                    .radio-group {
                              display: flex;
                              gap: 15px;
                              background-color: #11111b;
                              padding: 10px;
                              border-radius: 6px;
                              border: 1px solid #45475a;
                    }

                    button {
                              padding: 10px;
                              background-color: #89b4fa;
                              color: #11111b;
                              border: none;
                              border-radius: 6px;
                              font-weight: bold;
                              cursor: pointer;
                              transition: background-color 0.2s;
                              margin-top: 10px;
                    }

                    button:hover {
                              background-color: #74c7ec;
                    }

                    .charts-panel {
                              flex: 2;
                              display: flex;
                              flex-direction: column;
                              gap: 20px;
                              min-width: 500px;
                    }

                    .chart-container {
                              background-color: #11111b;
                              border: 2px solid #45475a;
                              border-radius: 8px;
                              padding: 15px;
                              position: relative;
                              height: 350px;
                              width: 100%;
                    }

                    .highlight-val {
                              color: #fab387;
                              font-weight: bold;
                    }

                    .formula {
                              font-family: monospace;
                              color: #f38ba8;
                              background: #181825;
                              padding: 10px;
                              border-radius: 6px;
                              text-align: center;
                    }




/* Ensure the body allows absolute positioning */



/* ================================================================
   DESIGN SYSTEM OVERRIDE — Applied via shared.css variables
   These overrides unify all pages to the shared dark-lab aesthetic
   ================================================================ */

/* Reset old colors to use CSS variables from shared.css */
body {
  font-family: var(--font-sans) !important;
  background-color: var(--bg) !important;
  color: var(--text-primary) !important;
  padding-top: 72px !important;
}

h1, h2, h3 {
  font-family: var(--font-mono) !important;
}

h1 { color: var(--text-primary) !important; }
h2 { color: var(--cyan) !important; }

/* Panel backgrounds */
.controls-panel, .panel, .dashboard > *, .grid-container > *,
.info-panel, .visualizer-panel, aside, section.panel {
  background: var(--panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-panel) !important;
  color: var(--text-primary) !important;
}

.panel-header, header.panel-header {
  background: var(--panel-2) !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 12px 16px !important;
}

/* Inputs */
input[type="text"], input[type="number"], select, textarea {
  background: var(--bg-2) !important;
  border: 1px solid var(--border-2) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-mono) !important;
  border-radius: var(--radius-sm) !important;
}

label {
  color: var(--text-secondary) !important;
  font-family: var(--font-mono) !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
}

/* Buttons */
button {
  font-family: var(--font-mono) !important;
  border-radius: var(--radius-sm) !important;
}

/* Canvas containers */
.canvas-container, .canvas-wrapper {
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden;
}

/* Metrics / data boxes */
.metrics-box, .data-box, .explanation-panel,
.instruction-box, .dynamic-explanation {
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-secondary) !important;
  font-size: 0.85rem !important;
}

/* Highlights */
.highlight, .highlight-k { color: var(--amber) !important; }
span[style*="color: #89b4fa"], .text-blue { color: var(--cyan) !important; }

/* Subtitles */
.subtitle, .page-subtitle, p.subtitle {
  color: var(--text-secondary) !important;
  font-family: var(--font-mono) !important;
  font-size: 0.82rem !important;
}

/* Fix dashboard flex → still works but adds top padding spacing */
.dashboard {
  padding-top: 8px;
}

/* ── DARK THEME + SCROLL + HOME-BTN FIX ── */
body {
  padding: 72px 20px 20px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  font-family: var(--font-sans) !important;
  background: var(--bg) !important;
  color: var(--text-primary) !important;
}
h1, h2 { color: var(--cyan) !important; font-family: var(--font-mono) !important; }
.controls-panel {
  background: var(--panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
}
.canvas-panel {
  background: var(--panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
}
input[type="text"], input[type="range"] {
  background: var(--bg-2) !important;
  border: 1px solid var(--border-2) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-mono) !important;
}
label { color: var(--text-secondary) !important; font-family: var(--font-mono) !important; }
button {
  background: var(--panel-2) !important;
  color: var(--cyan) !important;
  border: 1px solid var(--border-2) !important;
  font-family: var(--font-mono) !important;
}
button:hover { background: var(--cyan) !important; color: var(--bg) !important; }
canvas { max-width: 100% !important; }
@media (max-width: 900px) {
  .dashboard { flex-direction: column !important; }
}

