:root {
  color-scheme: dark;
  --background: #07101b;
  --foreground: #eff7fc;
  --muted-foreground: #a2b3c5;
  --border: #263a4d;
  --viz-series-1: #7bb7ff;
  --viz-series-2: #ffb653;
  --viz-series-3: #f380ae;
  --viz-series-4: #d8dd72;
  --viz-series-5: #b39af5;
  --viz-series-6: #5ce0ca;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; padding: 18px 14px; background: #050b13; color: var(--foreground); }
body.is-embedded { padding: 0; }
button, input, select { font: inherit; }
button, a, input, select, canvas { -webkit-tap-highlight-color: transparent; }
.science-lab { width: min(1380px, 100%); min-width: 0; margin: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--background); overflow: hidden; box-shadow: 0 20px 60px #0005; }
.is-embedded .science-lab { width: 100%; border: 0; border-radius: 0; box-shadow: none; }
.lab-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 20px; background: #0a1523; border-bottom: 1px solid var(--border); }
.lab-brand { min-width: 0; }
.lab-kicker { margin: 0 0 5px; color: var(--viz-series-6); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(20px, 3vw, 27px); font-weight: 650; line-height: 1.2; }
.lab-top-actions, .lab-model-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lab-button { padding: 9px 14px; min-height: 40px; border: 1px solid #3c536b; border-radius: 6px; color: var(--foreground); background: #152439; cursor: pointer; font-size: 13px; font-weight: 600; }
.lab-button:hover { background: #223751; border-color: #6c91ac; }
.lab-button.primary { color: #032820; background: var(--viz-series-6); border-color: var(--viz-series-6); }
.lab-button.primary:hover { background: #a2f4e5; }
:focus-visible { outline: 3px solid var(--viz-series-1); outline-offset: 3px; }
.lab-detail { padding: 12px 20px 0; color: var(--muted-foreground); font-size: 13px; line-height: 1.5; }
.lab-metrics { display: flex; gap: 10px 24px; flex-wrap: wrap; padding: 10px 20px 13px; font-size: 12px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.lab-value { color: var(--foreground); font-weight: 650; }
.lab-canvas { display: block; width: 100%; height: clamp(350px, 48vw, 550px); background: var(--background); touch-action: none; cursor: crosshair; }
[data-lab="inverse"] .lab-canvas { height: clamp(420px, 55vw, 580px); }
.lab-controls-area { border-top: 1px solid var(--border); background: #0a1523; padding: 17px 20px; }
.lab-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 17px 24px; }
.lab-control { display: block; min-width: 0; font-size: 12px; }
.lab-control-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 9px; }
.lab-control-value { color: var(--viz-series-6); font-variant-numeric: tabular-nums; white-space: nowrap; }
input[type="range"] { display: block; width: 100%; margin: 0; height: 23px; cursor: pointer; accent-color: var(--viz-series-6); }
input:disabled { opacity: .4; cursor: not-allowed; }
select { display: block; width: 100%; height: 36px; padding: 0 8px; border: 1px solid #3c536b; border-radius: 5px; color: var(--foreground); background: #152439; }
.lab-model-actions { margin-top: 16px; }
.lab-footer { border-top: 1px solid var(--border); padding: 12px 20px 15px; font-size: 12px; line-height: 1.6; color: var(--muted-foreground); }
.lab-hint { margin: 0 0 4px; color: #d9e9f4; }
.lab-caveat { margin: 0; }
.lab-legacy { margin: 7px 0 0; }
.lab-legacy a { color: var(--viz-series-6); text-underline-offset: 3px; }
.lab-keyboard { margin: 5px 0 0; font-size: 11px; }
.lab-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 600px) {
  body { padding: 8px; }
  .lab-header { align-items: flex-start; flex-direction: column; padding: 15px; }
  .lab-detail, .lab-metrics { padding-left: 15px; padding-right: 15px; }
  .lab-metrics { gap: 8px 15px; }
  .lab-controls-area, .lab-footer { padding: 15px; }
  .lab-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .lab-control-head { flex-wrap: wrap; gap: 3px 8px; }
  .lab-control-value { margin-left: auto; }
}
@media (max-width: 370px) { .lab-controls { grid-template-columns: 1fr; } }
