:root {
  color-scheme: dark;
  --background: #0b0e11;
  --surface: #0f1419;
  --raised: #141b22;
  --ink: #d8e0e7;
  --muted: #93a0ad;
  --line: #29333e;
  --green: #a3e077;
  --cyan: #84c9e9;
  --yellow: #e8be68;
  --red: #ef7d88;
  --magenta: #e7a2f8;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --selection-background: #344d33;
  --selection-foreground: #f0f8eb;
  --control-border: #42505e;
  --switch-border: #65717e;
  --switch-active-border: #709750;
  --switch-active-background: #273e22;
  --scrollbar: #34404e;
  --accent-border: #395338;
  --result-foreground: #edf3f7;
  --trace-background: #121c17;
  --trace-muted: #9fb49e;
  --error-background: #25171d;
  --error-foreground: #f29aa4;
  --composer-background: #11191c;
  --input-selection: #46705080;
  --completion-border: #4d6151;
  --completion-background: #151d24;
  --completion-selected: #253529;
  --focus-line: #4c6544;
  --run-border: #64894c;
  --run-background: #23351e;
  --run-foreground: #c2f1a4;
  --run-hover-background: #304827;
  --stop-foreground: #f2ce8b;
  --stop-background: #332b1c;
  --stop-border: #8e7040;
  --key-foreground: #bcc8d3;
  --example-hover: #17221a;
  --example-foreground: #c5cfd8;
  --filter-background: #1b291c;
  --filter-border: #364e32;
  --link-hover: #c6f5a9;
  --toast-border: #405238;
  --toast-background: #1a251b;
  --toast-foreground: #d0edc0;
  --separator-foreground: #b5c0cd;
  --invalid-underline: #9a5660;
}
:root[data-theme="dracula"] {
  --background: #282a36;
  --surface: #21222c;
  --raised: #303241;
  --ink: #f8f8f2;
  --muted: #adb2c8;
  --line: #44475a;
  --green: #50fa7b;
  --cyan: #8be9fd;
  --yellow: #f1fa8c;
  --red: #ff5555;
  --magenta: #bd93f9;
  --selection-background: #44475a;
  --selection-foreground: #f8f8f2;
  --control-border: #6272a4;
  --switch-border: #adb2c8;
  --switch-active-border: #50fa7b;
  --switch-active-background: #304339;
  --scrollbar: #6272a4;
  --accent-border: #506e5a;
  --result-foreground: #f8f8f2;
  --trace-background: #2c3437;
  --trace-muted: #b5c9bd;
  --error-background: #402d3b;
  --error-foreground: #ff9a9e;
  --composer-background: #2d303e;
  --input-selection: #6272a480;
  --completion-border: #6272a4;
  --completion-background: #21222c;
  --completion-selected: #44475a;
  --focus-line: #6272a4;
  --run-border: #50fa7b;
  --run-background: #304339;
  --run-foreground: #50fa7b;
  --run-hover-background: #3d5445;
  --stop-foreground: #ffb86c;
  --stop-background: #40372e;
  --stop-border: #ffb86c;
  --key-foreground: #d2d5e5;
  --example-hover: #343746;
  --example-foreground: #f8f8f2;
  --filter-background: #304339;
  --filter-border: #506e5a;
  --link-hover: #8be9fd;
  --toast-border: #506e5a;
  --toast-background: #304339;
  --toast-foreground: #f8f8f2;
  --separator-foreground: #d2d5e5;
  --invalid-underline: #ff5555;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); font: 13px/1.6 var(--mono); -webkit-font-smoothing: antialiased; }
button, input, select, code, kbd, pre { font-family: inherit; }
button, input, select { font-size: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--green); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
[hidden] { display: none !important; }
::selection { background: var(--selection-background); color: var(--selection-foreground); }
.page-shell { max-width: 1500px; margin: 0 auto; padding: 0 32px; }
.site-header { height: 74px; display: flex; align-items: center; gap: 22px; border-bottom: 1px solid var(--line); }
.wordmark { margin: 0; font-size: 22px; font-weight: 600; line-height: 1; letter-spacing: -1px; }
.wordmark a { display: inline-flex; align-items: center; gap: 14px; }
.brand-dots { display: inline-flex; align-items: center; gap: 5px; }
.brand-dots i { width: 7px; height: 7px; background: var(--green); border-radius: 50%; }
.brand-dots i:nth-child(2) { background: var(--yellow); }
.brand-dots i:nth-child(3) { background: var(--red); }
.header-note { color: var(--muted); font-size: 12px; }
.source-link { margin-left: auto; color: var(--muted); font-size: 11px; }
.source-link span { color: var(--green); margin-left: 5px; }
main { padding-top: 24px; }
.playground-grid { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 20px; align-items: start; }
.repl { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.repl-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; min-height: 48px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--raised); }
.session-label { display: flex; align-items: center; gap: 7px; font-size: 11px; white-space: nowrap; }
.mini-prompt { margin-right: 4px; font-size: 17px; color: var(--green); }
.muted { color: var(--muted); }
.runtime-status { display: inline-flex; gap: 7px; align-items: center; margin-left: auto; font-size: 10px; color: var(--muted); }
.status-dot { width: 6px; height: 6px; background: var(--yellow); border-radius: 50%; flex-shrink: 0; animation: pulse 1.5s infinite; }
.runtime-status.ready .status-dot { background: var(--green); animation: none; }
.runtime-status.error .status-dot { background: var(--red); animation: none; }
.runtime-status.running .status-dot { background: var(--yellow); }
.toolbar-actions { display: flex; align-items: center; gap: 12px; }
.toolbar-button { background: none; border: 0; padding: 4px 0; font-size: 11px; color: var(--muted); }
.toolbar-button:hover { color: var(--ink); }
.toolbar-button span { margin-right: 3px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 30px; height: 30px; padding: 0; border: 1px solid var(--line); border-radius: 3px; background: transparent; color: var(--muted); }
.icon-button:hover { color: var(--green); border-color: var(--control-border); background: var(--surface); }
.toolbar-divider { height: 12px; border-left: 1px solid var(--control-border); }
.transcript { height: clamp(330px, calc(100dvh - 320px), 650px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--scrollbar) transparent; padding: 22px 22px 10px; }
.repl-footer { display: flex; justify-content: flex-end; align-items: center; min-height: 34px; padding: 0 21px 10px; }
.execution-status { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 5px 16px; color: var(--muted); font-size: 11px; line-height: 22px; font-variant-numeric: tabular-nums; }
.engine-timing { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.execution-status img { display: block; flex-shrink: 0; object-fit: contain; }
.verification-status { white-space: nowrap; }
.verification-match { color: var(--green); }
.verification-mismatch, .verification-error { color: var(--error-foreground); }
.verification-note { margin: 12px 0 0 25px; padding: 10px 14px; border-left: 2px solid var(--red); color: var(--error-foreground); background: var(--error-background); font-size: 11px; }
.python-result { margin: 7px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.welcome { min-height: 100%; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 0 10px 25px; }
.welcome-prompt { font-size: 28px; color: var(--green); margin-bottom: 20px; }
.welcome h3 { font-size: 14px; font-weight: 500; margin: 0 0 10px; }
.welcome p { color: var(--muted); font-size: 12px; line-height: 1.9; margin: 0; }
.entry { padding: 0 0 25px; }
.entry + .entry { border-top: 1px dashed var(--line); padding-top: 22px; }
.entry-command { display: flex; align-items: baseline; gap: 13px; font-size: 14px; line-height: 1.9; overflow-wrap: anywhere; }
.entry-prompt { color: var(--green); font-size: 20px; flex-shrink: 0; }
.command-code { white-space: pre-wrap; min-width: 0; }
.entry-badge { margin-left: auto; border: 1px solid var(--accent-border); border-radius: 3px; padding: 1px 6px; color: var(--green); font-size: 9px; line-height: 1.6; }
.entry-output { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 12px 0 12px 25px; }
.result { font-size: 23px; font-weight: 400; line-height: 1.6; color: var(--result-foreground); margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.copy-result { flex-shrink: 0; margin-top: 5px; padding: 3px 6px; background: none; border: 0; color: var(--muted); font-size: 10px; opacity: 0; }
.entry:hover .copy-result, .copy-result:focus-visible { opacity: 1; }
.entry-meta { display: flex; align-items: center; gap: 10px; padding-left: 25px; color: var(--muted); font-size: 10px; }
.jelly-code { font-size: 12px; color: var(--cyan); letter-spacing: 1px; overflow-wrap: anywhere; }
.meta-divider { color: var(--muted); }
.trace { margin: 18px 0 0 25px; font-size: 11px; }
.trace summary { color: var(--muted); cursor: pointer; user-select: none; width: fit-content; }
.trace summary:hover { color: var(--green); }
.trace-content { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 17px 18px; border-left: 2px solid var(--accent-border); background: var(--trace-background); }
.trace-label { font-size: 9px; color: var(--trace-muted); margin-bottom: 10px; }
.trace-step { display: grid; grid-template-columns: minmax(25px, auto) 16px minmax(0, 1fr); gap: 10px; padding: 5px 0; font-size: 12px; line-height: 1.7; }
.trace-step span { overflow-wrap: anywhere; }
.trace-step > span:first-child { color: var(--cyan); }
.trace-step .step-arrow { color: var(--muted); }
.trace-tree { margin: 0; overflow-x: auto; font-size: 13px; line-height: 1.6; color: var(--green); }
.chain-info { font-size: 10px; line-height: 1.8; color: var(--trace-muted); margin-top: 10px; }
.error-entry .error-message { margin: 12px 0 0 25px; border-left: 2px solid var(--red); background: var(--error-background); padding: 10px 14px; color: var(--error-foreground); font-size: 12px; overflow-wrap: anywhere; }
.composer { position: relative; border-bottom: 1px solid var(--line); padding: 16px 21px 14px; background: var(--composer-background); }
.composer-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; }
.syntax-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-left: auto; font-size: 9px; }
.eyebrow { margin: 0; font-size: 10px; font-weight: 400; line-height: 1.5; color: var(--muted); }
.input-row { position: relative; display: flex; align-items: center; gap: 12px; margin: 8px 0 12px; }
.input-prompt { font-size: 26px; line-height: 1; color: var(--green); }
.expression-editor { position: relative; flex: 1; min-width: 0; font-size: 15px; line-height: 1.7; }
#expression { position: relative; z-index: 1; display: block; width: 100%; min-width: 0; margin: 0; padding: 8px 0; font: inherit; color: var(--ink); caret-color: var(--ink); background: transparent; border: 0; border-radius: 0; outline: none; }
.expression-highlight { display: none; position: absolute; inset: 0; margin: 0; padding: 8px 0; font: inherit; white-space: pre; overflow: hidden; pointer-events: none; }
.expression-highlight > span { display: inline-block; }
.highlighted .expression-highlight { display: block; }
.highlighted #expression { color: transparent; -webkit-text-fill-color: transparent; }
.highlighted #expression::selection { color: transparent; background: var(--input-selection); }
.autocomplete { position: absolute; top: 100%; left: 0; right: 0; z-index: 20; border: 1px solid var(--completion-border); border-radius: 4px; background: var(--completion-background); box-shadow: 0 8px 24px #0008; overflow: hidden; }
#keyword-suggestions { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); max-height: min(320px, 42svh, var(--completion-space, 320px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--scrollbar) transparent; }
.suggestion { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 8px 10px; border-left: 2px solid transparent; cursor: pointer; }
.suggestion.active, .suggestion:hover { background: var(--completion-selected); border-left-color: var(--green); }
.suggestion-word { font-size: 12px; overflow-wrap: anywhere; }
.suggestion-atom { flex-shrink: 0; font-size: 12px; }
.autocomplete-help { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; border-top: 1px solid var(--line); padding: 7px 11px; color: var(--muted); font-size: 9px; }
.input-row:focus-within { box-shadow: 0 1px 0 var(--focus-line); }
.converted-preview { display: flex; align-items: center; gap: 14px; max-width: 38%; min-width: 0; padding: 0 2px 0 8px; }
.conversion-arrow { flex-shrink: 0; color: var(--muted); font-size: 16px; }
#converted-expression { min-width: 0; color: var(--cyan); font-size: 24px; line-height: 1.6; text-align: right; overflow-wrap: anywhere; }
.run-button { display: flex; align-items: center; gap: 18px; padding: 8px 15px; border: 1px solid var(--run-border); border-radius: 3px; background: var(--run-background); color: var(--run-foreground); font-size: 12px; font-weight: 500; flex-shrink: 0; }
.run-button:hover:enabled { background: var(--run-hover-background); border-color: var(--green); }
.run-button.running { color: var(--stop-foreground); background: var(--stop-background); border-color: var(--stop-border); }
.live-mode .run-button:not(.running), .live-mode .entry-command, .live-mode .live-entry .entry-meta:not(.pending) { display: none; }
#run-icon { font-size: 18px; font-weight: 400; line-height: 1; }
.input-help { display: flex; justify-content: space-between; gap: 10px; font-size: 10px; color: var(--muted); }
kbd { font-size: inherit; color: var(--key-foreground); }
.help-dot { margin: 0 6px; color: var(--muted); }
#input-state { white-space: nowrap; color: var(--green); }
.examples-panel { padding: 17px 17px 0; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.aside-heading h2 { margin: 0; font-size: 13px; font-weight: 500; color: var(--cyan); }
.aside-heading h2::before { content: "# "; color: var(--muted); }
.aside-description { margin: 8px 0 16px; font-size: 10px; color: var(--muted); }
.example-list { display: grid; }
.example { text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 15px 0; width: 100%; }
.example:hover { background: var(--example-hover); }
.example-top { display: flex; justify-content: space-between; gap: 8px; }
.example-name { font-size: 11px; color: var(--example-foreground); }
.example-arrow { color: var(--muted); font-size: 12px; }
.example code { display: block; font-size: 10px; line-height: 1.8; margin-top: 7px; color: var(--green); }
.syntax-note { display: flex; align-items: center; gap: 20px; padding: 19px 0; border-bottom: 1px solid var(--line); }
.syntax-title { font-size: 11px; color: var(--cyan); }
.syntax-title::before { content: "# "; color: var(--muted); }
.syntax-note > p { margin: 0; font-size: 10px; color: var(--muted); }
.syntax-note code { color: var(--ink); }
.syntax-example { display: flex; align-items: center; gap: 13px; margin-left: auto; font-size: 11px; white-space: nowrap; color: var(--ink); }
.syntax-example b { font-weight: 400; color: var(--muted); }
.syntax-result { color: var(--green); }
.wordbook { padding: 24px 0; }
.wordbook-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordbook h2 { font-size: 14px; font-weight: 500; margin: 0; color: var(--cyan); }
.wordbook h2::before { content: "# "; color: var(--muted); }
.search-box { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 3px; padding: 6px 11px; background: var(--surface); width: 290px; }
.search-box > span { color: var(--muted); font-size: 20px; line-height: 1; }
#word-search { border: 0; background: transparent; outline: none; width: 100%; min-width: 0; font-size: 11px; color: var(--ink); padding: 3px 0; }
#word-search::placeholder { color: var(--muted); }
.search-box:focus-within { border-color: var(--green); }
.wordbook-controls { display: flex; align-items: center; justify-content: space-between; margin-top: 17px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.word-filters { display: flex; gap: 5px; }
.filter { font-size: 10px; background: transparent; border: 1px solid transparent; padding: 4px 9px; color: var(--muted); border-radius: 3px; }
.filter.active { color: var(--green); background: var(--filter-background); border-color: var(--filter-border); }
.filter:hover { color: var(--ink); background: var(--raised); }
.filter span { margin-left: 4px; font-size: 9px; color: var(--muted); }
.word-count { font-size: 10px; color: var(--muted); }
.word-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.word { min-width: 0; padding: 16px 17px 15px 0; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); }
.word:not(:nth-child(4n + 1)) { padding-left: 18px; border-left: 1px solid var(--line); }
.word:hover { background: var(--raised); }
.word-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.word-name { font-size: 12px; color: var(--green); overflow-wrap: anywhere; }
.word-atom { font-size: 13px; color: var(--cyan); }
.word-description { display: block; color: var(--muted); font-size: 10px; line-height: 1.7; margin-top: 7px; }
.wordbook-footer { display: flex; justify-content: space-between; gap: 15px; padding-top: 16px; font-size: 10px; color: var(--muted); }
.text-button { border: 0; background: none; font-size: 10px; color: var(--green); padding: 0; }
.text-button:hover { color: var(--link-hover); }
.empty-words { grid-column: 1 / -1; text-align: center; padding: 30px; color: var(--muted); }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding: 21px 0 25px; font-size: 10px; color: var(--muted); }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .brand-dots { gap: 4px; }
.footer-brand .brand-dots i { height: 5px; width: 5px; }
.site-footer > div { display: flex; gap: 22px; }
.site-footer a:hover { color: var(--green); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 11px 20px; border: 1px solid var(--toast-border); background: var(--toast-background); color: var(--toast-foreground); border-radius: 3px; font-size: 11px; max-width: calc(100% - 32px); text-align: center; z-index: 10; }
.skip-link { position: fixed; top: 8px; left: 8px; padding: 10px; color: var(--background); background: var(--green); z-index: 20; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.noscript { position: fixed; inset: auto 0 0; margin: 0; padding: 15px; background: var(--raised); color: var(--ink); text-align: center; }
.token-monadic { color: var(--green); }
.token-dyadic { color: var(--cyan); }
.token-quick { color: var(--magenta); }
.token-niladic, .token-argument { color: var(--yellow); }
.token-separators { color: var(--separator-foreground); }
.token-unknown { color: var(--red); text-decoration: underline dotted var(--invalid-underline); text-underline-offset: 4px; }
.settings-dialog, .challenges-dialog { width: min(440px, calc(100vw - 32px)); max-height: calc(100svh - 32px); padding: 22px; overflow-y: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--control-border); border-radius: 5px; box-shadow: 0 16px 60px #0006; }
.settings-dialog::backdrop, .challenges-dialog::backdrop { background: #0009; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 6px; }
.dialog-heading h2 { margin: 0; font-size: 14px; font-weight: 500; color: var(--cyan); }
.dialog-heading h2::before { content: "# "; color: var(--muted); }
.dialog-close { font-size: 23px; line-height: 1; }
.browse-challenges { display: flex; justify-content: space-between; align-items: center; gap: 18px; width: 100%; margin-top: 18px; padding: 11px; border: 1px solid var(--line); border-radius: 3px; background: var(--raised); color: var(--cyan); font-size: 11px; }
.browse-challenges:hover { border-color: var(--control-border); }
.browse-challenges kbd { font-size: 9px; color: var(--muted); }
.challenges-dialog { width: min(780px, calc(100vw - 32px)); }
.challenge-search { display: block; width: 100%; margin: 16px 0 12px; padding: 10px 12px; border: 1px solid var(--control-border); border-radius: 3px; background: var(--raised); color: var(--ink); font-size: 12px; }
.challenge-search::placeholder { color: var(--muted); }
.challenge-summary { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 10px; color: var(--muted); font-size: 9px; }
.challenge-list { height: min(500px, 50svh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 5px; margin: 0 -5px; }
.challenge-item { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.challenge-option { display: block; width: 100%; padding: 15px 10px 9px; text-align: left; border: 0; border-radius: 2px; background: none; }
.challenge-sample-source { display: block; width: fit-content; margin: 0 10px 4px; font-size: 9px; color: var(--cyan); }
.challenge-option:hover, .challenge-option:focus-visible { background: var(--raised); }
.challenge-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 5px 12px; }
.challenge-title { font-size: 12px; }
.challenge-tags { margin-left: auto; color: var(--muted); font-size: 9px; text-align: right; }
.challenge-expression { display: block; margin-top: 9px; font-size: 11px; line-height: 1.9; overflow-wrap: anywhere; }
.challenge-empty { margin: 24px 0; color: var(--muted); font-size: 11px; text-align: center; }
.challenges-help { margin: 17px 0 10px; font-size: 10px; color: var(--muted); }
.challenges-source { font-size: 10px; color: var(--cyan); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 0; border-bottom: 1px solid var(--line); }
label.setting-row { cursor: pointer; }
.setting-label { font-size: 12px; }
.setting-row small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.setting-row input { appearance: none; position: relative; flex-shrink: 0; width: 30px; height: 17px; margin: 0; border: 1px solid var(--switch-border); border-radius: 10px; background: var(--raised); cursor: pointer; }
.setting-row input::before { content: ""; position: absolute; top: 3px; left: 3px; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.setting-row input:checked { border-color: var(--switch-active-border); background: var(--switch-active-background); }
.setting-row input:checked::before { transform: translateX(13px); background: var(--green); }
.setting-row select { min-width: 104px; padding: 8px; border: 1px solid var(--control-border); border-radius: 3px; background: var(--raised); color: var(--ink); font-size: 11px; }
.settings-note, .presentation-note { margin: 18px 0 0; color: var(--muted); font-size: 10px; line-height: 1.8; }
.presentation-note { display: none; }
.examples-hidden .examples-panel, .keywords-hidden .wordbook { display: none; }
.examples-hidden .playground-grid { grid-template-columns: minmax(0, 1fr); }
.viewport-fit .page-shell { display: flex; flex-direction: column; height: 100dvh; }
.viewport-fit .site-header, .viewport-fit .site-footer, .viewport-fit .syntax-note,
.viewport-fit .repl-toolbar, .viewport-fit .composer, .viewport-fit .repl-footer { flex-shrink: 0; }
.viewport-fit main { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.viewport-fit .playground-section { flex: 1; min-height: 0; }
.viewport-fit .playground-grid { height: 100%; grid-template-rows: minmax(0, 1fr); }
.viewport-fit .repl { height: 100%; min-height: 0; }
.viewport-fit .transcript { flex: 1; min-height: 0; height: auto; }
.presentation-mode .site-header, .presentation-mode .examples-panel, .presentation-mode .wordbook, .presentation-mode .syntax-note, .presentation-mode .site-footer,
.presentation-mode .toolbar-actions, .presentation-mode .syntax-legend, .presentation-mode .input-help, .presentation-mode .copy-result, .presentation-mode .entry-meta .meta-divider, .presentation-mode .entry-meta .timing { display: none; }
.presentation-mode .page-shell { display: flex; flex-direction: column; justify-content: center; width: 100%; min-height: 100svh; max-width: 1140px; padding: 24px; }
.presentation-mode main { width: 100%; padding-top: 0; }
.presentation-mode .playground-grid { grid-template-columns: minmax(0, 1fr); }
.presentation-mode .transcript { height: clamp(240px, 60svh, 620px); }
.presentation-mode .expression-editor { font-size: 20px; }
.presentation-mode #converted-expression { font-size: 28px; }
.presentation-mode .entry-command { font-size: 16px; }
.presentation-mode .result { font-size: 28px; }
.presentation-mode .presentation-note { display: block; }
@keyframes pulse { 50% { opacity: .35; } }
@media (max-width: 1100px) {
  .page-shell { padding: 0 24px; }
  .playground-grid { grid-template-columns: minmax(0, 1fr) 250px; gap: 16px; }
  .session-label .muted { display: none; }
  .syntax-example { display: none; }
}
@media (max-width: 800px) {
  .page-shell { padding: 0 18px; }
  .site-header { height: 62px; }
  main { padding-top: 18px; }
  .playground-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .transcript { height: clamp(280px, calc(100svh - 280px), 440px); }
  .examples-panel { padding: 15px 16px 0; }
  .example-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .example { padding: 12px 10px; }
  .example:nth-child(odd) { border-right: 1px solid var(--line); padding-left: 0; }
  .aside-description { margin-bottom: 13px; }
  .syntax-note { gap: 14px; }
  .word-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .word:not(:nth-child(4n + 1)) { border-left: 0; padding-left: 0; }
  .word:not(:nth-child(3n + 1)) { border-left: 1px solid var(--line); padding-left: 15px; }
}
@media (max-width: 520px) {
  .page-shell { padding: 0 12px; }
  .site-header { gap: 14px; height: 58px; }
  .wordmark { font-size: 20px; }
  .header-note { display: none; }
  .source-link { font-size: 10px; }
  main { padding-top: 12px; }
  .repl-toolbar { flex-wrap: wrap; gap: 7px 12px; padding: 10px 13px; }
  .session-label { font-size: 10px; }
  .toolbar-actions { gap: 10px; }
  .toolbar-button { font-size: 10px; }
  .runtime-status { font-size: 9px; gap: 5px; }
  .runtime-status:not(.ready) { order: 3; margin-left: 0; flex-basis: 100%; }
  .toolbar-actions { margin-left: auto; }
  .transcript { height: clamp(240px, calc(100svh - 285px), 420px); padding: 18px 13px 8px; }
  .repl-footer { padding-right: 13px; }
  .entry-command { gap: 9px; font-size: 12px; }
  .entry-output, .entry-meta { padding-left: 20px; }
  .result { font-size: 21px; }
  .copy-result { opacity: 1; }
  .trace { margin-left: 20px; }
  .trace-content { grid-template-columns: 1fr; gap: 20px; padding: 12px; }
  .trace-step { font-size: 11px; }
  .composer { padding: 14px 13px; }
  .input-row { gap: 7px; }
  .converted-preview { gap: 8px; padding-left: 0; }
  #converted-expression { font-size: 20px; }
  .expression-editor { font-size: 16px; }
  .syntax-legend { flex-basis: 100%; gap: 10px; margin-left: 0; }
  .run-button { padding: 9px 10px; gap: 9px; font-size: 11px; }
  .input-help { font-size: 9px; }
  .help-dot { margin: 0 3px; }
  #input-state { display: none; }
  .example code { font-size: 9px; }
  .syntax-note { flex-wrap: wrap; gap: 5px 15px; padding: 17px 0; }
  .syntax-note > p { font-size: 10px; }
  .wordbook-heading { flex-direction: column; align-items: stretch; gap: 14px; }
  .search-box { width: 100%; padding: 7px 10px; }
  #word-search { font-size: 16px; }
  .word-filters { gap: 1px; }
  .filter { font-size: 9px; padding: 4px 6px; }
  .filter span { font-size: 8px; margin-left: 2px; }
  .word-count { font-size: 9px; }
  .word-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .word:not(:nth-child(3n + 1)) { border-left: 0; padding-left: 0; }
  .word:nth-child(even) { border-left: 1px solid var(--line); padding-left: 13px; }
  .word { padding-right: 11px; }
  .wordbook-footer { font-size: 9px; flex-wrap: wrap; }
  .site-footer { align-items: flex-start; flex-direction: column; gap: 13px; }
  .site-footer > div { gap: 22px; }
  .settings-dialog, .challenges-dialog { padding: 18px; }
  .challenge-search { font-size: 16px; }
  .challenge-heading { flex-direction: column; gap: 5px; }
  .challenge-tags { margin-left: 0; text-align: left; }
  .setting-row { gap: 14px; }
  .presentation-mode .page-shell { padding: 12px; }
  .presentation-mode .expression-editor { font-size: 16px; }
  .presentation-mode #converted-expression { font-size: 24px; }
  .presentation-mode .entry-command { font-size: 13px; }
  .presentation-mode .result { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .highlighted .expression-highlight { display: none; } .highlighted #expression { color: CanvasText; -webkit-text-fill-color: CanvasText; } }
