:root { color-scheme: light; font: 14px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ds-foreground); background: var(--ds-background); --muted: var(--ds-foreground-muted); --border: var(--ds-border); --accent: var(--ds-accent); --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.dark { color-scheme: dark; }
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
* { scrollbar-width: thin; scrollbar-color: var(--ds-border-hover) transparent; }
*::-webkit-scrollbar { width: var(--ds-spacing-2); height: var(--ds-spacing-2); }
*::-webkit-scrollbar-track, *::-webkit-scrollbar-corner { background: transparent; }
*::-webkit-scrollbar-thumb {
  border: var(--ds-spacing-0-5) solid transparent;
  border-radius: var(--ds-radius-full);
  background: var(--ds-border-hover);
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background-color: var(--ds-foreground-muted); }
*::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
button, select, summary { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .4; }
button, a, input, textarea, select, summary, pre[tabindex] { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--accent); }
a { color: inherit; }
.topbar { min-height: 76px; padding: 0 3.5%; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); background: #141e21; }
.brand { display: flex; gap: 13px; align-items: center; text-decoration: none; font-size: 16px; letter-spacing: -.4px; }
.brand strong { color: var(--muted); font-weight: 400; margin-left: 5px; }
.brand-mark { display: grid; place-content: center; position: relative; width: 35px; height: 35px; border: 1px solid #638f7c; border-radius: 9px; color: var(--accent); font: bold 23px var(--mono); }
.brand-mark span { position: absolute; right: 3px; bottom: 2px; font-size: 16px; }
.local-badge, .intro-note { color: var(--muted); font-size: 12px; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 8px; }
main { max-width: 1800px; margin: auto; padding: 30px 3.5% 18px; }
.intro { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 26px; }
.eyebrow { color: var(--accent); font-size: 10px; font-weight: 650; letter-spacing: 1.7px; }
h1 { font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -1.2px; font-weight: 550; margin: 7px 0 6px; line-height: 1.2; color: #f0f6f4; }
.intro p { margin: 0; color: var(--muted); font-size: 13px; }
.intro-note { padding-bottom: 3px; font-family: var(--mono); }
.intro-note span { margin: 0 8px; color: #709b88; }
.toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 13px; }
.example-picker { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
select { border: 1px solid var(--border); border-radius: 7px; padding: 9px 28px 9px 12px; background: #1b272b; color: #e0e9e7; font-size: 13px; }
.run-controls { display: flex; gap: 8px; align-items: center; }
kbd { font: 10px var(--mono); padding: 3px 4px; border: 1px solid #35464a; border-radius: 4px; }
.button { padding: 9px 16px; border-radius: 7px; border: 1px solid var(--border); font-size: 12px; font-weight: 650; min-height: 38px; }
.button span { margin-right: 6px; font-size: 10px; }
.primary { background: var(--accent); border-color: var(--accent); color: #10281f; }
.primary:hover:not(:disabled) { background: #b3f5d7; }
.secondary { background: #1b272b; color: #c3d0d0; }
.secondary:hover:not(:disabled) { border-color: #718b90; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; }
.pane { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #141e21; min-width: 0; display: flex; flex-direction: column; height: clamp(430px, 58vh, 740px); }
.pane-header { display: flex; justify-content: space-between; align-items: center; min-height: 49px; padding: 0 16px; border-bottom: 1px solid var(--border); background: #1b272b; }
h2 { font-size: 12px; font-weight: 550; display: flex; gap: 9px; align-items: center; margin: 0; }
.file-icon { color: var(--accent); font: 9px var(--mono); border: 1px solid #476859; border-radius: 3px; padding: 2px 3px; }
.console-icon { color: var(--muted); font: 13px var(--mono); }
.pane-actions { display: flex; align-items: center; gap: 14px; }
.source-pane .pane-actions { margin-left: auto; }
#draft-state { font-size: 10px; color: var(--muted); }
.text-button { background: transparent; border: 0; color: #a6babc; font-size: 11px; padding: 6px 0; }
.text-button:hover { color: var(--accent); }
.editor { display: flex; flex: 1; min-height: 0; overflow: hidden; background: #141e21; }
#line-numbers, #highlight, #source { font: 13px/23px var(--mono); tab-size: 2; margin: 0; padding-top: 20px; padding-bottom: 20px; }
#line-numbers { flex: 0 0 48px; color: #657d83; text-align: right; padding-right: 12px; overflow: hidden; user-select: none; border-right: 1px solid #233034; }
.code-area { position: relative; flex: 1; min-width: 0; }
#highlight, #source { position: absolute; inset: 0; width: 100%; height: 100%; padding-left: 16px; padding-right: 20px; white-space: pre; overflow: auto; border: 0; letter-spacing: 0; border-radius: 0; }
#highlight { visibility: hidden; pointer-events: none; color: #d2dfe1; scrollbar-width: none; }
#highlight::-webkit-scrollbar { display: none; }
#source { resize: none; background: transparent; color: #d2dfe1; caret-color: #e5f6ee; }
#source::selection { background: #41685888; }
#source:focus-visible { outline: 0; box-shadow: inset 0 0 0 1px #91e4bf55; }
.token-keyword { color: #beaeed; }
.token-string { color: #aed29f; }
.token-number { color: #e5bd89; }
.token-comment { color: #799093; font-style: italic; }
.token-system { color: #8fcedc; }
.run-status { display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #26363a; color: #a6babc; font-size: 11px; }
#status::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #acb8c1; margin-right: 8px; }
#status[data-state="ready"]::before, #status[data-state="success"]::before { background: var(--accent); }
#status[data-state="error"]::before { background: #f39691; }
#status[data-state="running"]::before, #status[data-state="loading"]::before { background: #e9c786; box-shadow: 0 0 0 3px #e9c78612; }
#elapsed { font-family: var(--mono); }
#output { flex: 1; min-height: 100px; margin: 0; padding: 16px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.8 var(--mono); color: #bbcdd0; }
#output:empty::before { content: "Console cleared. Build and run to see new output."; color: #718b90; }
.artifacts { border-top: 1px solid var(--border); padding: 13px 16px; background: #182326; max-height: 150px; overflow: auto; }
.artifacts-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
h3 { font-size: 11px; font-weight: 550; margin: 0; }
.artifacts-heading span { font-size: 10px; color: var(--muted); }
#downloads { display: flex; flex-wrap: wrap; gap: 7px; }
.settings { border: 1px solid var(--border); border-radius: 9px; margin-top: 16px; background: #172225; }
summary { display: flex; align-items: center; gap: 18px; padding: 14px 16px; list-style: none; font-size: 12px; }
summary::-webkit-details-marker { display: none; }
.settings-summary { font-size: 11px; color: var(--muted); }
.chevron { margin-left: auto; color: var(--muted); }
details[open] .chevron { transform: rotate(180deg); }
.settings-grid { padding: 8px 16px 20px; display: grid; grid-template-columns: 1fr 1fr 160px; gap: 20px; }
.settings-grid label { display: flex; flex-direction: column; gap: 8px; font-size: 11px; position: relative; }
.settings-grid textarea, .settings-grid input { width: 100%; background: #10191c; border: 1px solid #35464a; color: #d9e3e4; border-radius: 6px; padding: 10px; font: 12px/1.5 var(--mono); }
.settings-grid textarea { resize: vertical; min-height: 59px; }
.field-help { color: var(--muted); font-size: 10px; }
.unit { position: absolute; right: 0; color: var(--muted); }
.file-field { grid-column: 1 / -1; }
input[type="file"]::file-selector-button { background: #283b3f; color: #dbe5e3; border: 0; border-radius: 4px; padding: 5px 10px; margin-right: 12px; cursor: pointer; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 950px) { .intro-note { display: none; } .workspace { grid-template-columns: 1fr; } .pane { height: 460px; } .output-pane { height: 370px; } .settings-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 550px) { .topbar { min-height: 64px; } .local-badge { display: none; } main { padding-top: 24px; } .toolbar { align-items: stretch; flex-direction: column; } .run-controls { justify-content: flex-end; } .example-picker select { flex: 1; } .pane-actions { gap: 8px; } #draft-state { display: none; } .settings-grid { grid-template-columns: 1fr; } .settings-summary { display: none; } .artifacts-heading span { display: none; } }
@media (forced-colors: active) { #source { color: CanvasText; -webkit-text-fill-color: CanvasText; } #highlight { display: none; } }

.code-area.highlighted #highlight { visibility: visible; }
.code-area.highlighted #source { color: transparent; -webkit-text-fill-color: transparent; }
.code-area.highlighted.selecting #highlight { visibility: hidden; }
.code-area.highlighted.selecting #source { color: var(--ds-foreground); -webkit-text-fill-color: var(--ds-foreground); }
@media (forced-colors: active) { .code-area.highlighted #source { color: CanvasText; -webkit-text-fill-color: CanvasText; } }

.waveforms { margin-top: 16px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #141e21; }
.waveform-toolbar { display: flex; align-items: center; gap: 18px; padding: 12px 16px; background: #1b272b; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.waveform-toolbar aesir-dropdown { width: min(220px, 100%); }
.waveform-toolbar aesir-dropdown aesir-button { width: 100%; --aesir-button-width: 100%; }
.waveform-toolbar aesir-dropdown aesir-button span { min-width: 0; flex: 1; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.waveform-actions { display: flex; gap: var(--ds-spacing-2); margin-left: auto; }
.waveform-status { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px 16px; font-size: 11px; color: var(--muted); }
.waveform-status a { color: #a6babc; }
.waveforms[data-state="error"] [role="status"] { color: #f39691; }
.waveforms:not([hidden]) { display: flex; min-height: 0; flex-direction: column; }
.waveform-host { min-height: 0; height: auto; flex: 1; }
.waveform-host iframe { width: 100%; height: 100%; display: block; border: 0; }
@media (max-width: 550px) { .waveform-toolbar { gap: 10px; } .waveform-actions { margin-left: 0; width: 100%; justify-content: space-between; } }


.coverage-host { min-height: 0; height: auto; flex: 1; }
.coverage-host iframe { display: block; width: 100%; height: 100%; border: 0; background: white; }

/* Aesir application skin */
:root {
  --mono: var(--ds-font-family-mono, "SFMono-Regular", Consolas, monospace);
  --muted: var(--ds-foreground-muted);
  --border: var(--ds-border);
  --accent: var(--ds-accent);
  --app-panel: color-mix(in oklch, var(--ds-background-secondary) 76%, var(--ds-background));
  --app-code: color-mix(in oklch, var(--ds-background) 96%, var(--ds-foreground));
  --app-border-subtle: color-mix(in oklch, var(--ds-border) 72%, transparent);
  font: var(--ds-font-size-sm)/var(--ds-font-line-height-base) var(--ds-font-family-sans);
  color: var(--ds-foreground);
  background: var(--ds-background);
}

html { min-width: 320px; background: var(--ds-background); }
body { min-height: 100vh; background: radial-gradient(circle at 50% -20%, color-mix(in oklch, var(--ds-accent-surface) 55%, transparent), transparent 42%), var(--ds-background); }
:focus-visible { outline: 0; box-shadow: 0 0 0 var(--ds-spacing-0-5) var(--ds-accent-ring); }

.topbar {
  min-height: var(--ds-spacing-16);
  padding-inline: clamp(var(--ds-spacing-4), 3.5vw, var(--ds-spacing-12));
  border-color: var(--app-border-subtle);
  background: color-mix(in oklch, var(--ds-background) 78%, transparent);
  backdrop-filter: blur(var(--ds-filter-backdrop-blur-lg));
}
.brand { gap: var(--ds-spacing-3); font-weight: var(--ds-font-weight-semibold); letter-spacing: var(--ds-font-letter-spacing-tight); }
.brand strong { color: var(--ds-foreground-muted); font-weight: var(--ds-font-weight-normal); margin-left: var(--ds-spacing-1); }
.brand-mark { width: var(--ds-spacing-9); height: var(--ds-spacing-9); border-color: var(--ds-accent-border); border-radius: var(--ds-radius-lg); color: var(--ds-accent-text); background: var(--ds-accent-surface); }
.local-status { display: inline-flex; align-items: center; color: var(--ds-foreground-muted); font-size: var(--ds-font-size-xs); white-space: nowrap; }
.dot { width: var(--ds-spacing-1-5); height: var(--ds-spacing-1-5); background: var(--ds-green-700); margin-right: var(--ds-spacing-2); box-shadow: 0 0 0 var(--ds-spacing-1) color-mix(in oklch, var(--ds-green-700) 12%, transparent); }

main { width: min(calc(100% - clamp(var(--ds-spacing-8), 7vw, var(--ds-spacing-24))), 1800px); max-width: none; padding: var(--ds-spacing-10) 0 var(--ds-spacing-5); }
.intro { gap: var(--ds-spacing-6); margin-bottom: var(--ds-spacing-8); }
.eyebrow { color: var(--ds-accent-text); font-size: var(--ds-font-size-xxs); font-weight: var(--ds-font-weight-semibold); letter-spacing: .16em; }
h1 { max-width: 760px; margin: var(--ds-spacing-2) 0 var(--ds-spacing-1); color: var(--ds-foreground); font-size: clamp(var(--ds-font-size-3xl), 3.2vw, var(--ds-font-size-5xl)); line-height: 1.06; letter-spacing: -.045em; font-weight: var(--ds-font-weight-medium); }
.intro p { max-width: 680px; color: var(--ds-foreground-muted); font-size: var(--ds-font-size-sm); }
.intro-note { display: flex; align-items: center; gap: var(--ds-spacing-2); color: var(--ds-foreground-muted); font: var(--ds-font-size-xs) var(--mono); white-space: nowrap; }
.intro-note aesir-icon { color: var(--ds-accent-text-muted); }
.runtime-node { padding: var(--ds-spacing-1-5) var(--ds-spacing-2-5); border: var(--ds-spacing-px) solid var(--app-border-subtle); border-radius: var(--ds-radius-md); background: color-mix(in oklch, var(--ds-surface) 66%, transparent); }

.toolbar { align-items: end; gap: var(--ds-spacing-4); margin-bottom: var(--ds-spacing-3); }
.example-picker { display: grid; gap: var(--ds-spacing-1-5); color: var(--ds-foreground-muted); font-size: var(--ds-font-size-xs); }
.example-picker aesir-dropdown { width: 210px; }
.example-picker aesir-button { width: 100%; --aesir-button-width: 100%; }
.example-picker aesir-button span { flex: 1; overflow: hidden; text-align: left; text-overflow: ellipsis; }
select { min-height: var(--ds-spacing-9); border-color: var(--ds-border); border-radius: var(--ds-radius-lg); padding: var(--ds-spacing-2) var(--ds-spacing-8) var(--ds-spacing-2) var(--ds-spacing-3); background: var(--ds-background-secondary); color: var(--ds-foreground); font-size: var(--ds-font-size-sm); }
select:hover { border-color: var(--ds-border-hover); background-color: var(--ds-surface-hover); }
.run-controls { gap: var(--ds-spacing-2); }
.button { display: inline-flex; min-height: var(--ds-spacing-9); align-items: center; justify-content: center; gap: var(--ds-spacing-2); padding: var(--ds-spacing-2) var(--ds-spacing-4); border-radius: var(--ds-radius-lg); font-size: var(--ds-font-size-sm); font-weight: var(--ds-font-weight-medium); transition: background-color var(--ds-motion-duration-fast) var(--ds-motion-easing-subtle), border-color var(--ds-motion-duration-fast) var(--ds-motion-easing-subtle), transform var(--ds-motion-duration-fast) var(--ds-motion-easing-out); }
.button:active:not(:disabled) { transform: scale(.97); }
.primary { background: var(--ds-accent); border-color: color-mix(in oklch, var(--ds-background) 24%, transparent); color: var(--ds-accent-foreground); }
.primary:hover:not(:disabled) { background: var(--ds-accent-hover); }
.secondary { background: var(--ds-background-secondary); border-color: var(--ds-border); color: var(--ds-foreground); }
.secondary:hover:not(:disabled) { background: var(--ds-surface-hover); border-color: var(--ds-border-hover); }

.build-config { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 160px; gap: var(--ds-spacing-4); margin-bottom: var(--ds-spacing-4); }
.build-config label, .toolbar-files { position: relative; display: grid; align-content: start; gap: var(--ds-spacing-2); color: var(--ds-foreground-muted); font-size: var(--ds-font-size-xs); }
.build-config textarea, .build-config input { width: 100%; min-height: var(--ds-spacing-16); padding: var(--ds-spacing-2-5); border: var(--ds-spacing-px) solid var(--ds-border); border-radius: var(--ds-radius-md); background: var(--app-code); color: var(--ds-foreground); font: var(--ds-font-size-xs)/1.5 var(--mono); resize: vertical; }
.build-config .memory-field input { min-height: var(--ds-spacing-10); }
.toolbar-files { min-width: min(420px, 48vw); }
.toolbar-files input { color: var(--ds-foreground-muted); font-size: var(--ds-font-size-xs); }
.workspace { grid-template-columns: 1fr; gap: var(--ds-spacing-4); }
.source-pane { height: clamp(420px, 52vh, 680px); }
.output-pane { height: clamp(300px, 38vh, 480px); }
.pane { border-color: var(--ds-border); border-radius: var(--ds-radius-xl); background: var(--app-panel); box-shadow: 0 24px 70px color-mix(in oklch, black 22%, transparent); }
.pane-header { min-height: var(--ds-spacing-12); padding-inline: var(--ds-spacing-4); border-color: var(--app-border-subtle); background: var(--ds-background-secondary); }
h2 { gap: var(--ds-spacing-2); font-size: var(--ds-font-size-sm); font-weight: var(--ds-font-weight-medium); }
.file-icon { color: var(--ds-accent-text); font: var(--ds-font-size-xxs) var(--mono); border-color: var(--ds-accent-border); border-radius: var(--ds-radius-sm); padding: var(--ds-spacing-0-5) var(--ds-spacing-1); }
.console-icon { color: var(--ds-foreground-muted); }
.pane-actions { gap: var(--ds-spacing-3); }
#draft-state { color: var(--ds-foreground-muted); font-size: var(--ds-font-size-xxs); }
.text-button { display: inline-flex; align-items: center; gap: var(--ds-spacing-1-5); min-height: var(--ds-spacing-8); padding: var(--ds-spacing-1) var(--ds-spacing-2); border-radius: var(--ds-radius-md); color: var(--ds-foreground-muted); font-size: var(--ds-font-size-xs); }
.text-button:hover { color: var(--ds-foreground); background: var(--ds-surface-hover); }

.editor, #output { background: var(--app-code); }
/* Keep the scrollbar clear of the overlapping panel resize handle and grip. */
.editor { padding-right: var(--ds-spacing-4); }
#line-numbers, #highlight, #source { font: var(--ds-font-size-sm)/23px var(--mono); }
#line-numbers { color: var(--ds-foreground-muted); border-color: var(--app-border-subtle); }
#highlight, #source { color: var(--ds-foreground); }
#source { caret-color: var(--ds-accent); }
#source::selection { background: var(--ds-accent-surface-active); }
#source:focus-visible { box-shadow: inset 0 0 0 var(--ds-spacing-px) var(--ds-accent-border); }
.token-keyword { color: var(--ds-purple-800); }
.token-string { color: var(--ds-green-800); }
.token-number { color: var(--ds-orange-800); }
.token-comment { color: var(--ds-foreground-muted); }
.token-system { color: var(--ds-cyan-800); }

.run-status {
  min-height: var(--ds-spacing-7);
  align-items: center;
  padding: var(--ds-spacing-1-5) var(--ds-spacing-3);
  border-color: var(--app-border-subtle);
  color: var(--ds-foreground-muted);
  font-size: var(--ds-font-size-xxs);
}
#status::before { width: var(--ds-spacing-1-5); height: var(--ds-spacing-1-5); margin-right: var(--ds-spacing-2); background: var(--ds-gray-700); }
#status[data-state="ready"]::before, #status[data-state="success"]::before { background: var(--ds-green-700); }
#status[data-state="error"]::before { background: var(--ds-red-700); }
#status[data-state="running"]::before, #status[data-state="loading"]::before { background: var(--ds-orange-700); box-shadow: 0 0 0 var(--ds-spacing-1) color-mix(in oklch, var(--ds-orange-700) 12%, transparent); }
#output { color: var(--ds-foreground); }
#output:empty::before { color: var(--ds-foreground-muted); }
.artifacts { border-color: var(--app-border-subtle); background: var(--ds-background-secondary); }
.artifacts-heading span { color: var(--ds-foreground-muted); }

.settings, .waveforms { border-color: var(--ds-border); border-radius: var(--ds-radius-xl); background: var(--app-panel); }
summary:hover { background: var(--ds-surface-hover); }
.settings-summary, .field-help, .chevron, .waveform-status { color: var(--ds-foreground-muted); }
.chevron { transition: transform var(--ds-motion-duration-fast) var(--ds-motion-easing-out); }
.settings-grid { border-top: var(--ds-spacing-px) solid var(--app-border-subtle); }
.settings-grid textarea, .settings-grid input { background: var(--app-code); border-color: var(--ds-border); color: var(--ds-foreground); border-radius: var(--ds-radius-md); }
input[type="file"]::file-selector-button { background: var(--ds-surface); color: var(--ds-foreground); border-radius: var(--ds-radius-md); }
.waveform-toolbar { background: var(--ds-background-secondary); border-color: var(--app-border-subtle); }
.waveforms[data-state="error"] [role="status"] { color: var(--ds-foreground-red); }


@media (max-width: 550px) {
  main { width: calc(100% - var(--ds-spacing-4)); padding-top: var(--ds-spacing-6); }
}
@media (max-width: 760px) {
  .local-status { display: none; }
  .build-config { grid-template-columns: 1fr; }
  .toolbar-files { min-width: 0; }
  .example-picker aesir-dropdown { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .button, .chevron { transition-duration: var(--ds-motion-duration-instant); }
  .button:active:not(:disabled) { transform: none; }
}

/* Full-viewport workspace shell */
html, body { width: 100%; height: 100%; overflow: hidden; }
body { display: flex; flex-direction: column; }
.app-navbar { display: flex; width: 100%; min-height: var(--ds-spacing-12); flex: 0 0 auto; align-items: center; justify-content: space-between; padding-inline: var(--ds-spacing-3); border-bottom: var(--ds-spacing-px) solid var(--ds-border); background: var(--ds-background); }
.app-navbar a { display: inline-flex; align-items: center; gap: var(--ds-spacing-2); text-decoration: none; font-size: var(--ds-font-size-sm); }
.app-navbar .brand-mark { width: var(--ds-spacing-8); height: var(--ds-spacing-8); }
main { display: flex; width: 100%; min-height: 0; margin: 0; flex: 1; flex-direction: column; overflow: hidden; padding: var(--ds-spacing-3); }
.intro { flex: 0 0 auto; align-items: center; margin: 0 0 var(--ds-spacing-3); padding-inline: var(--ds-spacing-1); }
.intro .eyebrow, .intro-note { display: none; }
h1 { margin: 0 0 var(--ds-spacing-1); font-size: var(--ds-font-size-lg); line-height: var(--ds-font-line-height-lg); letter-spacing: var(--ds-font-letter-spacing-tight); font-weight: var(--ds-font-weight-semibold); }
.intro p { font-size: var(--ds-font-size-xs); }
#simulation { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.toolbar { flex: 0 0 auto; align-items: end; margin-bottom: var(--ds-spacing-3); padding: var(--ds-spacing-2) var(--ds-spacing-3); border: var(--ds-spacing-px) solid var(--app-border-subtle); border-radius: var(--ds-radius-lg); background: var(--ds-background-secondary); }
.toolbar-files { min-width: min(360px, 42vw); }
.build-config { flex: 0 0 auto; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 150px; margin-bottom: var(--ds-spacing-3); }
.build-config textarea { min-height: var(--ds-spacing-12); height: var(--ds-spacing-12); resize: none; }
.build-config .memory-field input { min-height: var(--ds-spacing-9); height: var(--ds-spacing-9); }
.workspace { min-height: 0; flex: 1; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: var(--ds-spacing-2); }
.pane, .source-pane, .output-pane { height: auto; min-height: 0; border-radius: var(--ds-radius-lg); box-shadow: none; }
.settings { flex: 0 0 auto; margin-top: var(--ds-spacing-2); border-radius: var(--ds-radius-lg); }
.settings summary { padding-block: var(--ds-spacing-2); }
.waveforms { position: fixed; inset: var(--ds-spacing-14) var(--ds-spacing-3) var(--ds-spacing-3); z-index: var(--aesir-overlay-z-dialog); margin: 0; box-shadow: 0 24px 80px color-mix(in oklch, black 50%, transparent); }

@media (max-width: 900px) {
  html, body { width: 100%; height: 100dvh; min-height: 0; overflow: hidden; }
  body { display: flex; }
  main { min-height: 0; }
  .workspace { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .build-config { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-files { min-width: 0; }
}

/* IDE layout */
.app-navbar { min-height: var(--ds-spacing-12); }
.navbar-tools { display: flex; align-items: center; gap: var(--ds-spacing-2); }
.navbar-tools #theme-toggle { flex: none; }
.navbar-label { color: var(--ds-foreground-muted); font-size: var(--ds-font-size-xs); }
.navbar-tools aesir-dropdown { min-width: 176px; }
main { padding: 0; }
#simulation { overflow: hidden; }
.workspace { display: block; width: 100%; height: 100%; min-height: 0; }
.left-pane { height: 100%; min-height: 0; overflow: hidden; }
.right-pane { height: 100%; min-height: 0; overflow: hidden; }
.editor-split, .console-split, .editor-region, .build-region, .console-region { width: 100%; height: 100%; min-height: 0; }
.editor-region, .console-region { display: flex; flex-direction: column; overflow: hidden; }
.build-region { overflow: auto; background: var(--ds-background-secondary); }
.left-pane .pane, .right-pane .pane { height: 100%; border-block: 0; border-radius: 0; }
.left-pane .pane { border-left: 0; }
.right-pane .pane { border-right: 0; }
.build-config { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 132px; gap: var(--ds-spacing-2); margin: 0; padding: var(--ds-spacing-3); border-top: var(--ds-spacing-px) solid var(--ds-border); background: var(--ds-background-secondary); }
.build-config textarea { height: var(--ds-spacing-14); min-height: var(--ds-spacing-14); }
.build-config .file-field { grid-column: 1 / -1; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.build-config .file-field input { min-height: 0; padding: 0; border: 0; background: transparent; }
.build-config .file-field .field-help { text-align: right; }
.left-pane .settings { margin: 0; border-width: var(--ds-spacing-px) 0 0; border-radius: 0; }
.console-actions { display: flex; align-items: center; gap: var(--ds-spacing-1); }
.console-actions .button { min-height: var(--ds-spacing-8); padding: var(--ds-spacing-1-5) var(--ds-spacing-3); }

@media (max-width: 760px) {
  .navbar-label, .local-status, .text-button aesir-icon { display: none; }
  .navbar-tools aesir-dropdown { min-width: 0; }
  .build-config { grid-template-columns: 1fr; }
  .build-config .file-field { grid-column: auto; grid-template-columns: 1fr; }
}

.navbar-tools { display: flex; align-items: center; gap: var(--ds-spacing-2); }
.navbar-tools aesir-dropdown { width: auto; min-width: 0; }
.navbar-tools aesir-dropdown aesir-button { width: auto; --aesir-button-width: auto; }
.navbar-tools aesir-dropdown aesir-button span { min-width: 0; flex: 1; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.antmicro-brand { display: flex; width: 108px; height: var(--ds-spacing-8); align-items: center; overflow: hidden; }
.antmicro-brand img { display: block; width: 100%; max-width: 100%; height: 100%; max-height: 100%; object-fit: contain; }
:root:not(.dark) .antmicro-brand img { filter: brightness(0); }

.left-pane { min-height: 0; }
.pane-header,
.output-pane .pane-header { height: var(--ds-spacing-12); min-height: var(--ds-spacing-12); flex-wrap: nowrap; }
.pane-header h2 { line-height: var(--ds-font-line-height-sm); }
.pane-header h2 > aesir-icon {
  display: grid;
  width: var(--ds-spacing-6);
  height: var(--ds-spacing-6);
  flex: none;
  line-height: 0;
  place-items: center;
}
.output-pane { container-type: inline-size; }
.console-region #output { min-height: 0; }
.console-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-end; flex-wrap: nowrap; gap: var(--ds-spacing-1); }
.console-actions aesir-button { flex: none; }

.build-config { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ds-spacing-2); }
.build-config > aesir-input { min-width: 0; }
.build-config > #options,
.simulation-config { grid-column: 1 / -1; }
.simulation-config { display: grid; min-width: 0; grid-template-columns: 1fr; gap: var(--ds-spacing-2); }
.simulation-config > aesir-input { min-width: 0; }
.build-config .file-field { display: grid; min-width: 0; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr); gap: var(--ds-spacing-1-5); }
.build-config aesir-file-upload {
  min-width: 0;
  --aesir-file-upload-dropzone-min-height: var(--ds-spacing-14);
  --aesir-file-upload-dropzone-padding: var(--ds-spacing-2);
  --aesir-file-upload-item-gap: var(--ds-spacing-2);
  --aesir-file-upload-item-padding: var(--ds-spacing-2);
  --aesir-file-upload-list-max-height: 132px;
  --aesir-file-upload-size-display: none;
}
.build-config .file-field .field-help { overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }

.cache-popover { display: grid; width: min(380px, calc(100vw - var(--ds-spacing-8))); gap: var(--ds-spacing-4); padding: var(--ds-spacing-4); text-align: left; }
.cache-trigger { display: block; width: var(--ds-spacing-8); height: var(--ds-spacing-8); --aesir-button-width: var(--ds-spacing-8); }
.cache-heading,
.cache-footer { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-spacing-3); }
.cache-heading strong { font-size: var(--ds-font-size-sm); font-weight: var(--ds-font-weight-semibold); }
.info-trigger { display: grid; width: var(--ds-spacing-7); height: var(--ds-spacing-7); place-items: center; border-radius: var(--ds-radius-md); color: var(--ds-foreground-muted); }
.info-trigger:hover { color: var(--ds-foreground); background: var(--ds-surface-hover); }
.info-trigger:focus-visible { box-shadow: 0 0 0 var(--ds-spacing-0-5) var(--ds-accent-ring); }
.cache-setting { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-spacing-4); color: var(--ds-foreground); font-size: var(--ds-font-size-sm); font-weight: var(--ds-font-weight-medium); }
.cache-setting > span { min-width: 0; }
.cache-setting aesir-quantity-stepper { width: auto; flex: none; }
.cache-footer { padding-top: var(--ds-spacing-3); border-top: var(--ds-spacing-px) solid var(--ds-border); }
.cache-footer p { margin: 0; color: var(--ds-foreground-muted); font-size: var(--ds-font-size-xs); }

.artifacts { height: 100%; max-height: none; padding: var(--ds-spacing-3); overflow: auto; }
.artifacts h3 { color: var(--ds-foreground); font-size: var(--ds-font-size-sm); font-weight: var(--ds-font-weight-semibold); }
.artifacts-heading span { font-size: var(--ds-font-size-xs); }
#downloads { display: grid; gap: var(--ds-spacing-2); margin-top: var(--ds-spacing-2); }
.artifact-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-spacing-3);
  padding: var(--ds-spacing-2);
  border: var(--ds-spacing-px) solid var(--app-border-subtle);
  border-radius: var(--ds-radius-lg);
  background: var(--ds-background);
}
.artifact-file { display: flex; min-width: 0; align-items: center; gap: var(--ds-spacing-2); color: var(--ds-foreground-muted); }
.artifact-file strong { overflow: hidden; color: var(--ds-foreground); font-size: var(--ds-font-size-sm); font-weight: var(--ds-font-weight-medium); text-overflow: ellipsis; white-space: nowrap; }
.artifact-actions { display: flex; flex: none; align-items: center; gap: var(--ds-spacing-2); }
.artifact-actions aesir-button { display: block; height: var(--ds-spacing-8); align-self: center; }

@container (max-width: 580px) {
}

@container (max-width: 390px) {
  .output-pane .pane-header { height: auto; min-height: var(--ds-spacing-12); flex-wrap: wrap; padding-block: var(--ds-spacing-1-5); }
  .output-pane .console-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
}

@media (max-width: 760px) {
  .navbar-tools aesir-dropdown { min-width: 0; }
  .left-pane { min-height: 0; }
  .build-config { grid-template-columns: 1fr; }
  .build-config > #options,
  .simulation-config,
  .build-config .file-field { grid-column: auto; }
  .simulation-config { grid-template-columns: 1fr; }
  .build-config { max-height: min(42dvh, 46%); overflow-y: auto; }
  .cache-setting { align-items: flex-start; flex-direction: column; gap: var(--ds-spacing-2); }
  .cache-footer { align-items: flex-start; flex-direction: column; }
}

.build-config .file-field #file-summary { white-space: normal; }
.input-file { display: flex; align-items: center; gap: var(--ds-spacing-2); min-width: 0; }
.input-file-view { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; padding: var(--ds-spacing-1); border: 0; background: transparent; color: var(--ds-foreground); font: inherit; text-decoration: underline; cursor: pointer; }
.input-file-view:focus-visible { outline: 2px solid var(--ds-accent-ring); outline-offset: 2px; }
#file-preview { --ds-sizing-lg: 70rem; }
#file-preview-source { display: block; width: 100%; height: min(65dvh, 42rem); resize: none; padding: var(--ds-spacing-3); border: 1px solid var(--ds-border); border-radius: var(--ds-radius-md); background: var(--ds-background); color: var(--ds-foreground); font: 12px/1.5 monospace; }
#file-preview-status { color: var(--ds-foreground-muted); font-size: var(--ds-font-size-sm); }

#build-progress { padding: var(--ds-spacing-2) var(--ds-spacing-3); font-size: var(--ds-font-size-sm); color: var(--ds-foreground-muted); border-bottom: 1px solid var(--ds-border); overflow-wrap: anywhere; }

#run { width: 118px; flex: 0 0 118px; }
