:root {
  color-scheme: dark;
  --bg: #090e19; --surface: #111a29; --raised: #172337; --ink: #e4ecf8;
  --muted: #91a4bd; --line: #2a3b52; --cyan: #74e6e3; --pink: #dd9ac8; --warn: #f1c68a;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 14px; line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); min-height: 100vh; }
body:has(.workstation-shell) { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
.player-desktop { display: flex; flex-direction: column; height: 100dvh; min-height: 0; }
.join-gate { flex: 1; overflow: auto; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(ellipse at top, #172a3a, var(--bg) 65%); }
.join-card { width: min(100%, 400px); padding: 2rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 24px 80px #0005; }
.join-card > .brand-mark { margin-bottom: 1.5rem; }
.join-card > p { color: var(--muted); }
.join-card .primary { width: 100%; margin-top: .6rem; }
.join-card #join-status { margin: 1rem 0 0; min-height: 1.5em; }
button, input, textarea, select { font: inherit; }
button { color: var(--ink); background: #19273a; border: 1px solid #354960; border-radius: 5px; padding: .45rem .75rem; min-height: 34px; cursor: pointer; font-size: .82rem; }
button:hover:not(:disabled) { background: #24364e; border-color: #65819c; }
button:disabled { opacity: .48; cursor: not-allowed; }
button.primary { background: var(--cyan); border-color: var(--cyan); color: #092729; font-weight: 700; }
button.primary:hover:not(:disabled) { background: #a3fffa; }
button.danger-quiet { color: #eaa4ac; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
input[type="text"], textarea, select { width: 100%; color: var(--ink); background: #0b1321; border: 1px solid #3a4e67; border-radius: 5px; padding: .65rem .75rem; margin-bottom: .6rem; }
input::placeholder, textarea::placeholder { color: #7d90a9; opacity: 1; }
textarea { resize: vertical; min-height: 5rem; max-height: 36rem; font-family: var(--mono); font-size: .85rem; line-height: 1.6; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--cyan); }
label, legend { display: block; margin: 0 0 .35rem; font-size: .83rem; }
fieldset { margin: .7rem 0; border: 1px solid var(--line); border-radius: 5px; }
.radio { display: inline-flex; align-items: center; gap: .5rem; margin-right: 1rem; }
h1, h2, h3, p, pre { margin-top: 0; }
h1 { font-size: 1.7rem; line-height: 1.2; letter-spacing: -.04em; }
h2 { margin: 0; font-size: .84rem; font-weight: 600; }
h3 { margin-bottom: .7rem; font-size: 1.02rem; line-height: 1.45; }
p { margin-bottom: .85rem; }
code, pre { font-family: var(--mono); }
code { font-size: .88em; color: #c6e8ec; }
small, .help, .muted { color: var(--muted); }
.help { font-size: .77rem; }
.eyebrow, .section-label { font-family: var(--mono); font-size: .65rem; letter-spacing: .12em; color: var(--muted); }
.badge { display: inline-block; font: .59rem var(--mono); letter-spacing: .07em; padding: .3rem .4rem; border: 1px solid #3b536d; color: #b3ccde; border-radius: 3px; white-space: nowrap; }
.badge.locked { color: var(--warn); border-color: #705c41; }
.button-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: .7rem 0; }
.build-note { padding: .65rem .8rem; border-left: 2px solid #6f617e; color: #b8abc6; font-size: .76rem; background: #261f322e; }
summary { cursor: pointer; color: #9eb8cb; font-size: .8rem; padding: .65rem 0; }
details[open] > summary { color: var(--cyan); }
details > p { font-size: .78rem; color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
[hidden] { display: none !important; }
.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; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 10000; background: var(--surface); color: var(--cyan); padding: .8rem; }
.skip-link:focus { top: .5rem; }

/* Shell: a single viewport, not a document-length dashboard. */
.system-bar { flex: none; height: 52px; display: flex; align-items: center; gap: 1.3rem; padding: 0 1rem; background: #0d1421; border-bottom: 1px solid var(--line); z-index: 2; }
.system-brand { display: flex; align-items: center; gap: .7rem; border: 0; background: transparent; padding: 0; letter-spacing: .1em; font-size: .83rem; }
.brand-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid #528e98; color: var(--cyan); font: 700 1.1rem var(--mono); background: #142a33; border-radius: 4px; }
.mission-name { display: flex; align-items: center; gap: .6rem; font-size: .77rem; flex: 1; min-width: 0; white-space: nowrap; }
.status-dot { flex: none; width: 6px; height: 6px; background: var(--cyan); border-radius: 50%; box-shadow: 0 0 8px #74e6e34d; }
.round-stats { display: flex; align-items: center; gap: 1.2rem; }
.round-stats > span:not(.practice-badge), .round-stats > button { display: flex; align-items: center; gap: .6rem; }
.round-stats button { padding: 0; border: none; background: none; }
.round-stats small { font: .58rem var(--mono); letter-spacing: .07em; }
.round-stats strong { font: 500 .9rem var(--mono); }
.round-stats em { color: var(--muted); font-size: .7rem; font-style: normal; }
.practice-badge { color: var(--warn); border: 1px solid #65533e; border-radius: 3px; padding: .25rem .45rem; font: .57rem var(--mono); }
.user-menu { display: flex; gap: .6rem; align-items: center; border: 0; background: none; max-width: 180px; }
#desktop-user { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.user-avatar { color: var(--pink); font-size: 1.2rem; }
.workstation-shell { display: flex; flex: 1; min-height: 0; }
.launcher { flex: none; width: 78px; padding: .8rem .4rem; display: flex; flex-direction: column; gap: .25rem; align-items: stretch; background: #0d1522; border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: thin; }
.launcher button { position: relative; display: flex; flex-direction: column; align-items: center; gap: .18rem; min-height: 58px; padding: .4rem .15rem; background: none; border: 1px solid transparent; color: #97abc3; font-size: .62rem; }
.launcher button:hover:not(:disabled) { background: #19263a; }
.launcher button[data-open="true"]::before { content: ''; position: absolute; left: -5px; top: 22px; height: 13px; width: 3px; border-radius: 3px; background: #5b8f9b; }
.launcher button[data-active="true"] { color: var(--cyan); background: #17303b; border-color: #30505b; }
.app-icon { display: grid; place-items: center; width: 28px; height: 26px; font: 1.75rem var(--mono); line-height: 1; color: #b2c8dd; }
.terminal-icon { font-size: 1.13rem; color: var(--cyan); }
.agent-icon { color: var(--pink); }
.launcher-divider { margin: .35rem .6rem; height: 1px; background: var(--line); }
.launcher-spacer { flex: 1; min-height: 12px; }
.workstation { display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; padding: 0; }
.workspace-toolbar { flex: none; height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0 1rem; background: #101929; border-bottom: 1px solid #283a504d; }
.workspace-toolbar > div:first-child { display: flex; align-items: center; gap: .9rem; }
#desktop-mode { color: #829bb5; font-size: .7rem; }
.layout-controls { display: flex; gap: .4rem; min-width: 0; max-width: 100%; overflow-x: auto; }
.layout-controls button { flex: none; white-space: nowrap; }
.layout-controls button { min-height: 26px; padding: .22rem .6rem; font-size: .68rem; background: transparent; border-color: #35455b; }
.layout-controls button[aria-pressed="true"] { color: var(--cyan); border-color: #4b7b84; background: #142c35; }
.desktop { position: relative; flex: 1; min-height: 0; isolation: isolate; overflow: hidden; background: radial-gradient(ellipse at 90% 15%, #39304666, transparent 60%), radial-gradient(ellipse at 35% 80%, #0c465459, transparent 60%), #0b1220; }
.desktop-wallpaper { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.cityglow { position: absolute; bottom: 0; left: 0; width: 100%; height: 48%; opacity: .23; background: repeating-linear-gradient(90deg,#427795 0 2px,transparent 2px 25px), repeating-linear-gradient(0deg,#2e5272 0 2px,#101b2c 2px 23px); clip-path: polygon(0 30%,6% 30%,6% 60%,12% 60%,12% 20%,17% 20%,17% 50%,25% 50%,25% 35%,30% 35%,30% 10%,35% 10%,35% 60%,44% 60%,44% 30%,51% 30%,51% 0,57% 0,57% 60%,63% 60%,63% 40%,70% 40%,70% 15%,77% 15%,77% 50%,85% 50%,85% 30%,93% 30%,93% 10%,97% 10%,97% 40%,100% 40%,100% 100%,0 100%); }
.wallpaper-label { position: absolute; right: 6%; bottom: 10%; text-align: right; color: #738bab; }
.wallpaper-label > span { display: block; font: .65rem var(--mono); letter-spacing: .18em; }
.wallpaper-label strong { display: block; font: 700 clamp(2rem,5vw,5rem) var(--mono); letter-spacing: -.07em; color: #aec7e429; margin: .5rem 0; }
.wallpaper-label strong span { color: #74e6e35c; }
.desktop-shortcuts { display: flex; flex-direction: column; gap: 1rem; padding: 2rem; align-items: flex-start; }
.desktop-shortcuts button { display: flex; flex-direction: column; align-items: center; gap: .4rem; width: 100px; border-color: transparent; background: none; color: #adc3d9; font-size: .7rem; }
.desktop-shortcuts button span { color: #76bbc8; font: 2.2rem var(--mono); }
.window-taskbar { display: flex; flex: none; gap: .3rem; height: 37px; padding: .25rem .65rem; overflow-x: auto; background: #101929; border-top: 1px solid var(--line); scrollbar-width: thin; }
.window-taskbar button { min-height: 26px; flex: 0 0 auto; min-width: 90px; padding: .25rem .7rem; border: 0; background: #182337; font-size: .7rem; border-bottom: 2px solid transparent; border-radius: 3px 3px 0 0; }
.window-taskbar button[aria-pressed="true"] { background: #213a47; color: var(--cyan); border-bottom-color: var(--cyan); }
.window-taskbar button[data-minimized="true"] { opacity: .55; }
.system-status { display: flex; align-items: center; gap: .6rem; padding: .3rem .8rem; min-height: 27px; flex: none; border-top: 1px solid #233145; color: var(--muted); background: #090f19; font-size: .65rem; }
#status { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#status[data-error="true"] { color: var(--warn); }
.status-build { font: .56rem var(--mono); letter-spacing: .07em; white-space: nowrap; }
.noscript-message { position: fixed; inset: 25%; z-index: 9999; padding: 2rem; background: var(--surface); border: 1px solid var(--warn); }

/* Application windows preserve their DOM and running work when minimized. */
.app-window { position: absolute; display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid #354a63; border-radius: 7px; background: #111b2a; box-shadow: 0 12px 35px #0006; overflow: hidden; }
.app-window[data-front="true"] { border-color: #607d98; box-shadow: 0 16px 42px #0008,0 0 0 1px #7395b51a; }
.window-bar { display: flex; gap: .6rem; align-items: center; flex: none; height: 38px; padding: 0 .65rem 0 .85rem; background: linear-gradient(#1c2a3d,#192538); border-bottom: 1px solid #304159; cursor: grab; touch-action: none; user-select: none; }
.window-bar:active { cursor: grabbing; }
.window-bar h2 { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.window-bar h2 > span { margin-right: .5rem; color: #a4c7d8; }
.window-controls { display: flex; margin-left: auto; gap: .2rem; }
.window-controls button { min-height: 26px; height: 26px; width: 28px; padding: 0; border: 0; background: none; color: #a9bdd1; font: 1rem var(--mono); }
.window-controls button:hover:not(:disabled) { background: #33475f; }
.window-body { flex: 1; min-height: 0; padding: 1rem; overflow: auto; scrollbar-width: thin; scrollbar-color: #3a526b transparent; }
.window-body > :last-child { margin-bottom: 0; }
.window-resize { position: absolute; bottom: 1px; right: 1px; width: 18px; height: 18px; min-height: 0; padding: 0; border: 0; border-radius: 0; background: linear-gradient(135deg,transparent 55%,#637e9366 55%,#637e9366 60%,transparent 60%,transparent 72%,#637e9366 72%,#637e9366 77%,transparent 77%); cursor: nwse-resize; touch-action: none; z-index: 3; }
.app-window[data-maximized="true"] .window-resize { display: none; }
.app-toolbar { display: flex; flex: none; align-items: center; flex-wrap: wrap; gap: .45rem; padding: .5rem .7rem; border-bottom: 1px solid var(--line); background: #142032; }
.app-toolbar button { min-height: 28px; font-size: .72rem; padding: .3rem .6rem; }
.app-toolbar > .help { margin: 0; font-size: .68rem; }
.toolbar-spacer { flex: 1; }
.address-bar { flex: 1; background: #0b1523; border: 1px solid #2d4259; border-radius: 4px; padding: .28rem .6rem; }
.app-status { flex: none; color: var(--muted); font: .68rem/1.5 var(--mono); padding: .45rem .75rem; margin: 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; max-height: 4rem; overflow: auto; }
.usage-notes { margin-top: .6rem; }
.usage-notes > summary { font-size: .69rem; color: #8099af; padding: .4rem 0; }
.usage-notes p { color: #8ea3b9; line-height: 1.6; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem 1.2rem; color: var(--muted); }
.empty-state h3 { color: #c7d7e8; font-size: .96rem; font-weight: 500; margin: .8rem 0 .5rem; }
.empty-state p { font-size: .8rem; max-width: 32rem; }
.empty-icon { display: block; font: 3rem var(--mono); color: #547b99; }
.empty-card { padding: 1rem; background: #0e1725; border: 1px solid var(--line); border-radius: 6px; margin: 1rem 0; }
.empty-card strong { font-size: .87rem; }
.empty-card a { display: inline-block; color: var(--cyan); padding: .45rem 0; text-underline-offset: .2em; }
.empty-card p { color: var(--muted); font-size: .8rem; margin: .5rem 0; }
.view-heading { margin-bottom: 1.5rem; }
.view-heading h3 { font-size: 1.4rem; }
.view-heading p:not(.eyebrow) { color: var(--muted); font-size: .86rem; }
.login-heading { margin-bottom: 1.2rem; }
.login-heading .brand-mark { margin-bottom: 1rem; width: 44px; height: 44px; }
.login-heading p:not(.eyebrow) { color: var(--muted); font-size: .85rem; }
.login-heading .eyebrow { margin-bottom: .5rem; }
.session-body { padding: 1.6rem; }
#join-button { width: 100%; margin-top: .5rem; display: flex; justify-content: space-between; }
#event-code { font-family: var(--mono); letter-spacing: .25em; font-size: 1.2rem; }
.player-name { color: var(--cyan); font-size: 1.25rem; }
.metadata { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .45rem .8rem; font: .75rem var(--mono); }
dt { color: var(--muted); } dd { margin: 0; overflow-wrap: anywhere; }
.capabilities { padding-left: 1.2rem; font-size: .76rem; color: var(--muted); }

/* File manager and source viewer. */
.files-body { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.files-layout { display: grid; grid-template-columns: minmax(150px,30%) minmax(0,1fr); flex: 1; min-height: 0; }
.file-browser { min-width: 0; padding: .6rem; overflow: auto; border-right: 1px solid var(--line); background: #0d1726; }
.section-label { display: block; padding: .2rem .25rem .6rem; }
.evidence-list { list-style: none; margin: 0; padding: 0; }
.evidence-list li { padding: .1rem 0; }
.evidence-list button { width: 100%; text-align: left; background: none; border-color: transparent; font: .71rem/1.6 var(--mono); padding: .4rem; overflow-wrap: anywhere; }
.evidence-list button::before { content: '▱ '; color: #6898ae; }
.evidence-list button[aria-pressed="true"] { background: #173443; border-color: #33586b; color: #a7faf4; }
.evidence-list small { display: none; }
.file-viewer { min-width: 0; overflow: auto; padding: .8rem; }
#evidence-preview { min-width: 0; }
#preview-title { font: .82rem var(--mono); color: var(--cyan); overflow-wrap: anywhere; }
#preview-range { font: .66rem/1.6 var(--mono); }
#evidence-preview:not([hidden]) ~ .file-placeholder { display: none; }
.file-placeholder { height: 100%; }
.evidence-text { white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid #2c3e54; border-radius: 4px; background: #0a1320; padding: .8rem; font: .77rem/1.65 var(--mono); tab-size: 4; max-height: 32rem; overflow: auto; }
.file-content { min-height: 8rem; max-height: none; }
.event-payload { white-space: pre-wrap; overflow-wrap: anywhere; font: .73rem/1.6 var(--mono); max-height: 25rem; overflow: auto; }
.files-body > .usage-notes { flex: none; padding: 0 .75rem; margin: 0; max-height: 10rem; overflow: auto; }

.challenge-instructions { margin: 0 0 .8rem; padding: .2rem 1rem; border: 1px solid var(--line); border-radius: 6px; background: #14212e; }
.challenge-instructions > summary { color: var(--cyan); font-size: .9rem; font-weight: 600; }
.instruction-content { font-size: .88rem; line-height: 1.7; overflow-wrap: anywhere; padding-bottom: .7rem; }
.instruction-content h3, .instruction-content h4 { color: var(--ink); margin-top: .7rem; }
.instruction-content pre { white-space: pre-wrap; font: .8rem/1.6 var(--mono); padding: .75rem; background: var(--bg); }
#files-instructions:not(:empty) ~ .file-placeholder { height: auto; min-height: 160px; }

/* A terminal stays mounted while the window moves, resizes or minimizes. */
.terminal-body { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.terminal-body .app-toolbar code { font-size: .68rem; }
.terminal-viewport { flex: 1; min-height: 80px; background: #090f1c; overflow: hidden; }
#terminal-screen { height: 100%; width: 100%; padding: .5rem; min-width: 0; overflow: hidden; }
#terminal-screen:empty { display: none; }
#terminal-screen:not(:empty) + .terminal-placeholder { display: none; }
.terminal-placeholder { height: 100%; padding: .8rem; }
.terminal-placeholder p { margin-bottom: .4rem; }
.terminal-prompt { color: var(--cyan); font: 1.8rem var(--mono); }
.cursor-block { display: inline-block; height: 1.35rem; width: .7rem; margin-left: .5rem; background: #74e6e352; vertical-align: middle; }
.terminal-body > .usage-notes { flex: none; margin: 0; padding: 0 .75rem; max-height: 8rem; overflow: auto; }

/* Contextual agent, notebook and question editor. */
.agent-heading { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.agent-heading strong { font-size: .9rem; }
.agent-heading small { display: block; font: .65rem/1.7 var(--mono); color: #9aabc6; }
.agent-orb { display: grid; place-items: center; color: var(--pink); width: 38px; height: 38px; border: 1px solid #68537a; border-radius: 10px; background: #292039; font-size: 1.4rem; }
.agent-context { display: grid; grid-template-columns: 1fr auto; gap: .3rem .5rem; padding: .6rem .7rem; background: #0d1725; border: 1px solid var(--line); border-radius: 5px; margin-bottom: 1rem; }
.agent-context small { grid-column: 1/-1; font: .58rem var(--mono); letter-spacing: .08em; }
#agent-context-question { font-size: .72rem; align-self: center; overflow-wrap: anywhere; }
.agent-context button { font-size: .62rem; min-height: 25px; padding: .2rem .4rem; }
.workflow-switch { display: flex; gap: .15rem; border: 1px solid var(--line); background: #0c1524; padding: .2rem; border-radius: 5px; margin: 0 0 1rem; }
.workflow-switch label { flex: 1; position: relative; margin: 0; }
.workflow-switch input { position: absolute; opacity: 0; }
.workflow-switch span { display: block; padding: .45rem .2rem; text-align: center; color: var(--muted); border-radius: 3px; font-size: .68rem; cursor: pointer; }
.workflow-switch input:checked + span { background: #273349; color: #ede3fa; }
.workflow-switch input:focus-visible + span { outline: 2px solid var(--cyan); }
.workflow-switch input:disabled + span { opacity: .5; cursor: not-allowed; }
.agent-body textarea { min-height: 4rem; font-size: .77rem; }
.evidence-composer { padding: 0 .6rem; border: 1px solid var(--line); border-radius: 4px; }
.agent-actions { gap: .35rem; }
.agent-actions button { font-size: .7rem; padding: .4rem .5rem; }
.run-state { color: #9fcbd1; font-size: .76rem; overflow-wrap: anywhere; line-height: 1.6; }
.agent-answer:empty { display: none; }
.agent-answer { white-space: pre-wrap; font-family: inherit; font-size: .83rem; line-height: 1.8; border-left: 2px solid #9172a3; }
.history-list { display: grid; gap: .4rem; margin: .6rem 0; }
.history-list button { text-align: left; overflow-wrap: anywhere; font-size: .7rem; }
.notebook-body { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.editor-label { padding: .75rem 1rem .5rem; margin: 0; font: .65rem var(--mono); color: #b4c9df; }
.editor-label span { display: block; font: .65rem/1.8 var(--mono); color: var(--muted); }
.notebook-editor { border: 0; border-top: 1px solid #26374c; border-radius: 0; margin: 0; flex: 1; min-height: 5rem; max-height: none; padding: 1rem 1.25rem; resize: none; background: repeating-linear-gradient(transparent,transparent 25px,#2a3b5020 25px,#2a3b5020 26px),#0e1725; line-height: 26px; }
.questions-body { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.questions-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 150px minmax(0,1fr); }
.question-browser { padding: .8rem; background: #0d1726; border-right: 1px solid var(--line); overflow: auto; }
#question-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .35rem; margin: .4rem 0 1rem; }
#question-list button { font: .65rem/1.5 var(--mono); min-height: 37px; padding: .3rem .15rem; background: #172336; }
#question-list button[aria-pressed="true"] { color: var(--cyan); border-color: #5a9ba5; background: #1b3a46; }
.question-browser .build-note { padding: .5rem; font-size: .68rem; }
.question-page { padding: 1.2rem; overflow: auto; min-width: 0; }
#question-title { color: #dce8f8; font-size: 1.03rem; }
#question-prompt { font-size: .87rem; color: #b8c9dc; }
.clue { background: #172937; border-left: 2px solid #548191; padding: 0 .8rem; margin: .9rem 0; }
#question-fields { display: grid; grid-template-columns: 1fr; gap: .2rem; margin: 1rem 0 .5rem; }
#question-fields input { font-family: var(--mono); font-size: .8rem; }
#question-sources { font-size: .77rem; }
.recovery-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: .65rem; }
.recovery-steps > div { padding: .8rem; background: #172538; border: 1px solid var(--line); border-radius: 5px; }
.recovery-steps span { display: block; color: #6b8da8; font: 1.2rem var(--mono); margin-bottom: .5rem; }
.recovery-steps strong { display: block; font-size: .78rem; }
.recovery-steps small { font-size: .7rem; }
.tutorial-section { border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 1.5rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.score-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin: 1.5rem 0; }
.score-summary dt { font-size: .73rem; margin-bottom: .4rem; }
.score-summary dd { font: 1.8rem var(--mono); color: #b9d8e6; }
.score-summary small { font-size: .8rem; }
.score-question-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); gap: .5rem; list-style: none; padding: 0; }
.score-question-list li { padding: .65rem; border: 1px solid var(--line); border-radius: 4px; color: var(--cyan); font: .75rem var(--mono); }
#question-result:empty { display: none; }
.demo-tour { padding-left: 1.1rem; color: var(--muted); font-size: .8rem; }
.demo-tour li { margin: .7rem 0; }
.demo-tour button { min-height: 25px; padding: .2rem .4rem; }
.timeline { padding-left: 1.5rem; }
.timeline li { padding: .65rem .2rem; border-bottom: 1px solid var(--line); }
.event-heading { display: block; color: var(--cyan); font-size: .78rem; }
.event-meta { display: block; color: var(--muted); font: .65rem/1.6 var(--mono); }
.findings, .supporting-links { list-style: none; margin: 0; padding: 0; }
.findings > li { border-left: 2px solid var(--pink); background: #251f334d; padding: .7rem; margin: .6rem 0; }
.supporting-links button { text-align: left; overflow-wrap: anywhere; }
.supporting-links small { display: block; font-size: .67rem; overflow-wrap: anywhere; }
.empty { color: var(--muted); font-size: .8rem; }
.histogram-table-wrap { overflow: auto; }
.histogram-table { width: 100%; border-collapse: collapse; font: .75rem var(--mono); }
.histogram-table th, .histogram-table td { text-align: left; border-bottom: 1px solid var(--line); padding: .5rem; }
.histogram-table caption { text-align: left; padding: .6rem; color: var(--muted); }

@media (max-width: 1150px) { .mission-name .muted { display: none; } .round-stats { gap: .7rem; } .system-bar { gap: .8rem; } .status-build { display: none; } }
@media (max-width: 900px), (max-height: 560px) {
  .app-window { inset: 6px !important; width: auto !important; height: auto !important; border-radius: 5px; }
  .app-window:not([data-front="true"]) { display: none; }
  .window-resize, .window-maximize { display: none; }
  .window-bar { cursor: default; touch-action: auto; }
  .workspace-toolbar .eyebrow { display: none; }
  .practice-badge, .mission-name { display: none; }
  .round-stats { margin-left: auto; }
  .layout-controls button { font-size: .64rem; }
}
@media (max-width: 600px) {
  :root { font-size: 13px; }
  .system-bar { padding: 0 .6rem; height: 47px; }
  .system-brand strong { font-size: .7rem; }
  .brand-mark { width: 26px; height: 26px; font-size: .9rem; }
  .user-menu { max-width: 85px; padding: .2rem; }
  .user-avatar, .round-stats > span:not(.practice-badge), #desktop-mode { display: none; }
  .launcher { width: 59px; padding: .5rem .2rem; }
  .launcher button { min-height: 53px; font-size: .58rem; }
  .app-icon { font-size: 1.5rem; height: 23px; }
  .terminal-icon { font-size: .95rem; }
  .workspace-toolbar { justify-content: flex-end; padding: 0 .5rem; }
  .files-layout { grid-template-columns: minmax(105px,32%) minmax(0,1fr); }
  .file-browser { padding: .3rem; }
  .file-viewer { padding: .6rem; }
  .file-viewer .button-row button { width: 100%; }
  .questions-layout { grid-template-columns: 1fr; }
  .question-browser { border-right: none; border-bottom: 1px solid var(--line); padding: .45rem; }
  .question-browser > p, .question-browser > .section-label { display: none; }
  #question-list { display: flex; overflow-x: auto; margin: 0; }
  #question-list button { min-width: 47px; flex: none; }
  .question-page { padding: .8rem; }
  .recovery-steps, .form-grid, .score-summary { grid-template-columns: 1fr; }
  .session-body { padding: 1.2rem; }
  .window-bar .badge { font-size: .5rem; }
  .window-controls button { width: 32px; min-height: 30px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
