:root {
  color-scheme:dark;
  --bg:#151719; --panel:#1b1d20; --editor:#191b1e; --raised:#25282c;
  --line:#303338; --text:#e0e1e3; --muted:#a0a6ae; --subtle:#7d8691;
  --accent:#e6bb6f; --green:#8bc9a3; --code:#d4d9df;
  --selection:#6686b34d; --syntax-comment:#929aa5; --syntax-keyword:#c7a0e8;
  --syntax-type:#e6c384; --syntax-function:#8bc8ed; --syntax-string:#a6cf9c;
  --syntax-number:#e8ad87; --syntax-hole:#eda7c3;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:15px;
}
:root[data-theme=light] {
  color-scheme:light;
  --bg:#f2f1ec; --panel:#faf9f5; --editor:#fffefa; --raised:#e9e7df;
  --line:#d9d7cf; --text:#282c31; --muted:#657079; --subtle:#727b83;
  --accent:#93601a; --green:#327a4a; --code:#303b47;
  --selection:#6b91c34d; --syntax-comment:#68756c; --syntax-keyword:#7945a8;
  --syntax-type:#865b16; --syntax-function:#176c99; --syntax-string:#35733a;
  --syntax-number:#a84e21; --syntax-hole:#ad3467;
}
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--text); }
button,input,textarea { font:inherit; }
button,a { touch-action:manipulation; }
button { color:inherit; cursor:pointer; }
a { color:inherit; text-decoration:none; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible {
  outline:2px solid var(--accent); outline-offset:-2px;
}
button:hover { filter:brightness(1.12); }
[hidden] { display:none!important; }
.playground { min-height:100dvh; display:flex; flex-direction:column; }
.topbar { height:64px; flex:none; padding:0 26px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); }
.brand { display:flex; align-items:center; gap:12px; font-size:26px; font-weight:650; letter-spacing:-1px; }
.brand-mark { display:grid; place-items:center; background:var(--accent); color:#171a1d; font:bold 25px Georgia,serif; width:30px; height:34px; border-radius:7px; transform:rotate(-7deg); margin-right:3px; }
.brand-sub { font-size:15px; font-weight:400; letter-spacing:0; color:var(--muted); border-left:1px solid var(--line); padding-left:16px; margin-left:7px; }
.top-actions { display:flex; gap:16px; align-items:center; }
.icon-button { border:1px solid var(--line); background:transparent; border-radius:6px; width:36px; height:36px; font-size:22px; display:grid; place-items:center; }
.github-link img { display:block; width:21px; height:21px; filter:invert(1); opacity:.85; }
[data-theme=light] .github-link img { filter:none; }
.toolbar { height:64px; flex:none; display:flex; align-items:center; justify-content:space-between; padding:0 24px; border-bottom:1px solid var(--line); gap:12px; }
.workspace-label { display:flex; gap:14px; align-items:center; color:var(--subtle); font-size:11px; letter-spacing:1.2px; }
.workspace-label strong { font-size:14px; letter-spacing:0; font-weight:450; color:var(--text); }
.execution-controls { display:flex; align-items:center; gap:10px; min-width:0; }
.entry-label { font-size:13px; color:var(--muted); }
.button { border:1px solid var(--line); border-radius:6px; padding:8px 13px; min-height:36px; background:transparent; font-size:14px; white-space:nowrap; }
.button.subtle { border-color:transparent; color:var(--muted); }
.button.primary { background:var(--accent); color:#242019; border:0; font-weight:650; padding:9px 17px; display:flex; gap:20px; align-items:center; }
.button kbd { font-size:12px; opacity:.65; }
.workbench { flex:1; display:grid; grid-template-columns:240px minmax(0,1.15fr) minmax(0,1fr); }
.sidebar { display:flex; flex-direction:column; min-width:0; padding:24px 16px; background:var(--panel); border-right:1px solid var(--line); }
.section-label { display:flex; justify-content:space-between; font-size:11px; letter-spacing:1.5px; font-weight:600; color:var(--muted); padding:0 9px; margin-bottom:12px; }
.section-label span { letter-spacing:0; font-weight:400; color:var(--subtle); }
.examples { margin-bottom:28px; }
.examples .section-label { padding:0; }
.picker { min-width:0; }
.picker-trigger { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; min-height:39px; padding:9px 12px; background:var(--editor); color:var(--text); border:1px solid var(--line); border-radius:6px; font-size:13px; text-align:left; }
.picker-trigger>span:first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.picker-chevron { color:var(--muted); flex:none; transition:transform .12s; }
.picker-trigger[aria-expanded=true] { border-color:var(--accent); }
.picker-trigger[aria-expanded=true] .picker-chevron { transform:rotate(180deg); }
.entry-picker { width:190px; }
.entry-picker .picker-trigger { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; }
.picker-options { position:fixed; z-index:100; overflow:auto; overscroll-behavior:contain; padding:6px; background:var(--panel); border:1px solid var(--line); border-radius:9px; box-shadow:0 12px 38px #0005; scrollbar-width:thin; }
.picker-group-label { font-size:11px; color:var(--subtle); font-weight:600; letter-spacing:.5px; padding:13px 10px 7px; }
.picker-options [role=group]+[role=group] { border-top:1px solid var(--line); margin-top:5px; }
.picker-option { position:relative; display:block; width:100%; border:0; border-radius:5px; background:transparent; text-align:left; padding:10px 30px 10px 11px; font-size:14px; line-height:1.4; color:var(--text); overflow-wrap:anywhere; }
.picker-option:hover,.picker-option:focus-visible { background:var(--raised); filter:none; }
.picker-option[aria-selected=true] { color:var(--accent); background:var(--raised); }
.picker-option[aria-selected=true]::after { content:''; position:absolute; right:12px; top:13px; width:6px; height:10px; border-right:2px solid var(--accent); border-bottom:2px solid var(--accent); transform:rotate(45deg); }
.file-list { flex:1; min-height:100px; overflow:auto; margin-bottom:18px; }
.file-list .picker-option { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:13px; margin-bottom:4px; }
.file-create { display:flex; gap:7px; border-top:1px solid var(--line); padding-top:14px; }
.file-create input { min-width:0; width:100%; background:transparent; border:1px solid var(--line); border-radius:5px; color:var(--text); padding:8px; font-size:12px; }
.file-create .icon-button { flex:none; }
.remove-file { color:var(--subtle); font-size:12px; border:0; padding:10px 0; text-align:left; }
.editor-pane { min-width:0; min-height:0; background:var(--editor); display:flex; flex-direction:column; border-right:1px solid var(--line); }
.pane-heading { height:49px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); padding:0 20px; flex:none; }
.file-heading { display:flex; align-items:center; gap:10px; min-width:0; overflow:hidden; font:13px ui-monospace,SFMono-Regular,Consolas,monospace; }
.file-glyph { font:italic 21px Georgia; color:var(--accent); }
.copy-button { font-size:13px; }
.editor-wrap { flex:1; display:flex; height:0; min-height:0; padding-top:22px; position:relative; overflow:hidden; }
#line-numbers { width:52px; margin:0; padding:0 14px 30px 0; overflow:hidden; text-align:right; color:var(--subtle); user-select:none; font:15px/1.75 ui-monospace,SFMono-Regular,Consolas,monospace; flex:none; }
.editor-surface { position:relative; flex:1; min-width:0; }
#source-highlight,#source-editor { position:absolute; inset:0; width:100%; height:100%; font:15px/1.75 ui-monospace,SFMono-Regular,Consolas,monospace; font-variant-ligatures:none; font-weight:400; letter-spacing:normal; tab-size:2; white-space:pre; padding:0 22px 30px 0; margin:0; border:0; text-align:left; }
#source-highlight { overflow:hidden; pointer-events:none; user-select:none; color:var(--code); }
#source-editor { z-index:1; min-width:0; resize:none; background:transparent; color:var(--code); caret-color:var(--text); outline:none; overflow:auto; }
.highlight-ready #source-editor { color:transparent; -webkit-text-fill-color:transparent; }
.highlight-ready #source-editor::selection { background:var(--selection); color:transparent; }
.syntax-comment { color:var(--syntax-comment); }.syntax-keyword { color:var(--syntax-keyword); }.syntax-type { color:var(--syntax-type); }.syntax-function { color:var(--syntax-function); }.syntax-string { color:var(--syntax-string); }.syntax-number { color:var(--syntax-number); }.syntax-hole { color:var(--syntax-hole); text-decoration:underline dotted; }
.editor-footer { height:32px; display:flex; align-items:center; gap:17px; color:var(--subtle); font-size:11px; border-top:1px solid var(--line); padding:0 16px; flex:none; }
.editor-footer span:last-child { margin-left:auto; }
.results-pane { background:var(--panel); display:flex; flex-direction:column; min-width:0; min-height:0; }
.result-tabs { height:49px; border-bottom:1px solid var(--line); display:flex; padding:0 20px; gap:22px; flex:none; }
.result-tabs button { font-size:14px; border:0; border-bottom:2px solid transparent; background:transparent; padding:0 2px; color:var(--muted); white-space:nowrap; }
.result-tabs button[aria-selected=true] { color:var(--accent); border-bottom-color:var(--accent); }
[role=tabpanel] { padding:25px; overflow:auto; flex:1; min-height:0; }
[role=tabpanel] pre { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; color:var(--code); font:15px/1.75 ui-monospace,SFMono-Regular,Consolas,monospace; }
.statusbar { height:32px; flex:none; display:flex; align-items:center; gap:22px; padding:0 18px; border-top:1px solid var(--line); color:var(--muted); font-size:11px; }
.statusbar>div { display:flex; align-items:center; gap:8px; }
.statusbar>span:nth-child(2) { margin-left:auto; }
.dot { display:inline-block; width:6px; height:6px; border-radius:50%; background:var(--green); flex:none; }
#boot-status { padding:10px 20px; background:var(--raised); color:var(--accent); margin:0; font-size:13px; }
@media(min-width:901px) { .workbench { height:calc(100dvh - 160px); min-height:480px; flex:none; } }
@media(min-width:1600px) { .workbench { grid-template-columns:260px minmax(0,1.15fr) minmax(0,1fr); } }
@media(max-width:1100px) { .workbench { grid-template-columns:210px minmax(0,1.1fr) minmax(0,1fr); }.workspace-label { display:none; }.execution-controls { margin-left:auto; } }
@media(max-width:900px) {
  .workbench { grid-template-columns:190px minmax(0,1fr); }
  .editor-pane { min-height:480px; }.results-pane { grid-column:1/-1; min-height:300px; border-top:1px solid var(--line); }
  .sidebar { padding:22px 12px; }.toolbar { padding:0 16px; }.topbar { padding:0 18px; }
}
@media(max-width:600px) {
  .workbench { grid-template-columns:1fr; }.sidebar { max-height:320px; border-bottom:1px solid var(--line); border-right:0; }
  .examples { margin-bottom:18px; }.file-list { min-height:45px; flex:1; margin-bottom:8px; }
  .file-create { padding-top:8px; }.remove-file { padding:6px 0; min-height:28px; }
  .editor-pane { min-height:440px; }.editor-wrap { padding-top:16px; }
  .brand-sub { font-size:13px; padding-left:10px; margin-left:0; }.brand { font-size:24px; }.top-actions { gap:8px; }
  .toolbar { padding:0 12px; }.execution-controls { width:100%; gap:5px; }.entry-label { display:none; }.entry-picker { width:auto; min-width:0; flex:1; }
  .button { padding:8px; font-size:13px; }.button.primary { padding:9px 12px; }.button kbd { display:none; }
  .result-tabs { gap:22px; }#line-numbers { width:42px; padding-right:12px; }
}
@media(forced-colors:active) {
  #source-highlight { display:none; }.highlight-ready #source-editor { color:CanvasText; -webkit-text-fill-color:CanvasText; caret-color:CanvasText; }
  .highlight-ready #source-editor::selection { color:HighlightText; background:Highlight; }
  .picker-option[aria-selected=true] { outline:1px solid Highlight; }.picker-options { border-color:CanvasText; }
}
.language-switch{display:flex;align-items:center;border:1px solid var(--line);border-radius:6px;padding:3px;gap:2px}
.language-switch button{border:0;background:transparent;border-radius:4px;color:var(--muted);padding:5px 8px;font-size:12px;min-height:28px;white-space:nowrap}
.language-switch button[aria-pressed=true]{background:var(--raised);color:var(--text)}
@media(max-width:600px){.brand-sub{display:none}.top-actions{gap:8px}.language-switch button{padding:5px 6px}}
