:root { color-scheme: light; font-family: system-ui, -apple-system, sans-serif; color: #2d3f54; background: #f4f8fb; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 24px; background: #004c94; color: white; }
h1 { margin: 8px 0 0; font-size: 1.5rem; font-weight: 550; }
.back { color: #e0efff; font-size: .9rem; text-decoration: none; }
main { padding: 20px 24px; flex: 1; display: flex; flex-direction: column; gap: 16px; }
button { font: inherit; font-weight: 650; border: 1px solid #c8d5e0; border-radius: 7px; background: white; color: #004c94; padding: 9px 14px; cursor: pointer; }
button:hover:enabled { background: #e9f3fc; }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: #004c94; border-color: #004c94; color: white; }
button.primary:hover:enabled { background: #006ecf; }
button:focus-visible, a:focus-visible, textarea:focus-visible, pre:focus-visible { outline: 3px solid #3c93fa; outline-offset: 2px; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
#status { margin-left: auto; font-size: .9rem; }
.workspace { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; min-height: 65vh; }
.panel { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: white; border: 1px solid #ccd8e3; border-radius: 10px; box-shadow: 0 8px 24px #2d3f5410; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 10px 18px; border-bottom: 1px solid #dce5ed; }
h2 { font-size: 1rem; margin: 0; }
.panel-heading span { font-size: .85rem; color: #52647a; }
textarea, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; line-height: 1.65; tab-size: 4; }
#code { flex: 1; width: 100%; min-height: 360px; resize: none; border: 0; padding: 18px; color: #21384e; background: #fff; white-space: pre; overflow: auto; }
.help, .footnote { font-size: .82rem; line-height: 1.5; color: #52647a; margin: 0; }
.help { padding: 12px 18px; border-top: 1px solid #dce5ed; }
#output { flex: 1; min-height: 260px; max-height: 65vh; margin: 0; padding: 18px; background: #152638; color: #e5edf4; white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; }
.error { color: #ffb2ac; }
.info { color: #8dc8ff; }
.prompt { color: #8ee89b; font-weight: 700; }
.console-entry { display: flex; align-items: flex-start; gap: 10px; padding: 10px 18px 16px; background: #152638; }
.console-entry label { font: 700 15px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding-top: 5px; }
#console-input { flex: 1; min-width: 0; resize: vertical; max-height: 180px; border: 0; border-bottom: 1px solid #52647a; border-radius: 0; padding: 5px; background: #152638; color: #e5edf4; }
#console-input::placeholder { color: #a8bbcd; }
#console-input:disabled { opacity: .5; }
.console-entry button { padding: 6px 10px; font-size: .85rem; }
.inputs { padding: 14px 18px; border-top: 1px solid #dce5ed; }
.inputs label { display: block; font-size: .85rem; margin-bottom: 8px; }
#stdin { width: 100%; resize: vertical; border: 1px solid #c8d5e0; border-radius: 6px; padding: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
#plots-panel[hidden] { display: none; }
#plots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 18px; padding: 18px; }
#plots figure { margin: 0; min-width: 0; text-align: center; }
#plots img { display: block; width: 100%; max-width: 800px; height: auto; margin: 0 auto; }
#plots figcaption { padding: 10px 0; font-size: .85rem; }
#plots a { color: #004c94; }
.has-plots .workspace { flex: none; min-height: 0; }
.has-plots #code { min-height: 240px; }
.has-plots #output { min-height: 100px; max-height: 25vh; }
@media (max-width: 700px) { header { padding: 16px; } main { padding: 16px; } .workspace { grid-template-columns: 1fr; } #status { width: 100%; margin: 0; } h1 { font-size: 1.2rem; } #code { min-height: 320px; } }
