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

:root {
            --bg-dark: #11111b;
            --bg-panel: #1e1e2e;
            --bg-input: #313244;
            --text-main: #cdd6f4;
            --text-muted: #a6adc8;
            --accent-blue: #89b4fa;
            --accent-pink: #f38ba8;
            --accent-green: #a6e3a1;
            --accent-yellow: #f9e2af;
            --border-color: #45475a;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background-color: var(--bg-dark);
            color: var(--text-main);
            margin: 0;
            padding: 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        h1 {
            color: var(--accent-blue);
            margin-bottom: 5px;
            text-align: center;
        }

        .subtitle {
            color: var(--text-muted);
            margin-bottom: 20px;
            font-size: 15px;
            text-align: center;
        }

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

        .panel {
            background-color: var(--bg-panel);
            padding: 20px;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
            border: 1px solid var(--bg-input);
        }

        .controls-panel {
            flex: 1;
            min-width: 340px;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

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

        label {
            color: var(--accent-green);
            font-weight: bold;
            font-size: 14px;
            display: flex;
            justify-content: space-between;
        }

        input[type="text"] {
            padding: 10px;
            border-radius: 6px;
            border: 1px solid var(--border-color);
            background-color: var(--bg-dark);
            color: var(--text-main);
            font-family: monospace;
            font-size: 14px;
        }

        input[type="range"] {
            width: 100%;
            cursor: pointer;
            accent-color: var(--accent-blue);
        }

        button {
            padding: 12px;
            background-color: var(--accent-blue);
            color: var(--bg-dark);
            border: none;
            border-radius: 6px;
            font-weight: bold;
            cursor: pointer;
            transition: background-color 0.2s;
            font-size: 14px;
            margin-top: 5px;
        }

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

        .metrics-box {
            background-color: var(--bg-dark);
            padding: 15px;
            border-radius: 8px;
            font-size: 15px;
            line-height: 1.6;
            border-left: 4px solid var(--accent-blue);
            margin-top: auto;
        }

        .highlight {
            color: var(--accent-pink);
            font-weight: bold;
        }

        .highlight-stable {
            color: var(--accent-green);
            font-weight: bold;
            font-size: 18px;
        }

        .highlight-unstable {
            color: var(--accent-pink);
            font-weight: bold;
            font-size: 18px;
        }

        .visual-panel {
            flex: 2;
            display: flex;
            gap: 20px;
            min-width: 650px;
            justify-content: center;
            align-items: center;
            flex-wrap: wrap;
        }

        .canvas-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
            background-color: var(--bg-dark);
            padding: 15px;
            border-radius: 8px;
            border: 1px solid var(--border-color);
        }

        .canvas-title {
            font-weight: bold;
            color: #cba6f7;
        }

        canvas {
            background-color: var(--bg-dark);
            border-radius: 4px;
        }

        .arrow {
            font-size: 30px;
            color: var(--border-color);
        }




/* 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;
}

/* ── SCROLL & HOME-BTN FIX ── */
body {
  padding: 72px 20px 20px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  height: auto !important;
  font-family: var(--font-sans) !important;
  background: var(--bg) !important;
  color: var(--text-primary) !important;
}
h1 { color: var(--cyan) !important; font-family: var(--font-mono) !important; }
.panel {
  background: var(--panel) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-panel) !important;
}
canvas { max-width: 100% !important; }
@media (max-width: 900px) {
  .dashboard { flex-direction: column !important; }
  .controls-panel { min-width: 0 !important; width: 100% !important; }
}

