:root {
    color-scheme: light;
    --page: #f6f8fb;
    --panel: #ffffff;
    --panel-muted: #f1f4f8;
    --editor: #ffffff;
    --text: #172033;
    --muted: #5f6878;
    --faint: #8b96a7;
    --line: #dce2ec;
    --line-strong: #b9c7dc;
    --blue: #2155a5;
    --blue-hover: #173d78;
    --blue-soft: #eaf1fc;
    --green: #2f745e;
    --green-soft: #e7f3ed;
    --red: #c92f3d;
    --red-soft: #ffebee;
    --orange: #c45f32;
    --shadow: 0 20px 52px rgba(45, 68, 102, 0.14);
    --sidebar-width: 284px;
    --results-height: 250px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --page: #08111b;
    --panel: #0d1a27;
    --panel-muted: #122231;
    --editor: #0c1723;
    --text: #edf3fa;
    --muted: #a2afbf;
    --faint: #718296;
    --line: #24394d;
    --line-strong: #36536d;
    --blue: #79a9ef;
    --blue-hover: #a5c6f6;
    --blue-soft: #142d4b;
    --green: #6bc4a0;
    --green-soft: #123329;
    --red: #ff7d86;
    --red-soft: #3b1e25;
    --orange: #efa170;
    --shadow: 0 22px 58px rgba(0, 0, 0, 0.34);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-width: 320px;
    min-height: 100%;
    background: var(--page);
}

body {
    height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--page) 70%, transparent), color-mix(in srgb, var(--page) 90%, transparent)),
        url("/assets/nova-scotia-coast.webp") center / cover fixed no-repeat;
    overflow: hidden;
}

button,
select,
textarea,
input {
    font: inherit;
}

button,
select,
input[type="checkbox"] {
    cursor: pointer;
}

button:focus-visible,
select:focus-visible,
textarea:focus-visible,
input:focus-visible,
a:focus-visible,
[role="separator"]:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: -2px;
}

svg {
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.playground-shell {
    display: grid;
    grid-template-rows: 68px minmax(0, 1fr);
    width: 100%;
    height: 100vh;
    min-height: 540px;
    background: transparent;
}

.app-header,
.ide-toolbar,
.status-bar {
    position: relative;
    z-index: 5;
}

.app-header {
    display: grid;
    grid-template-columns: 1fr auto 38px;
    align-items: center;
    min-width: 0;
    gap: 24px;
    padding: 0 clamp(18px, 3vw, 42px);
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--page) 88%, transparent);
    backdrop-filter: blur(18px) saturate(135%);
}

.playground-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
    color: var(--text);
    font-size: 15px;
    font-weight: 740;
    letter-spacing: -0.015em;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    padding: 4px;
    flex: 0 0 auto;
    border: 1px solid #29475e;
    border-radius: 10px;
    background: #071018;
}

.brand-mark img,
.boot-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.playground-nav,
.playground-nav a,
.workspace-boundary,
.toolbar-actions,
.example-picker,
.run-button,
.status-bar > div,
.status-item,
.status-state,
.local-badge {
    display: flex;
    align-items: center;
}

.playground-nav {
    gap: 26px;
}

.playground-nav a,
.icon-button {
    color: var(--muted);
    border: 0;
    background: transparent;
}

.playground-nav a {
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}

.playground-nav a:hover,
.playground-nav a:focus-visible,
.playground-nav a.active,
.icon-button:hover {
    color: var(--blue);
}

.playground-nav a.playground-link {
    padding: 9px 14px;
    color: #ffffff;
    border-radius: 9px;
    background: var(--blue);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--blue) 24%, transparent);
}

.playground-nav a.playground-link:hover,
.playground-nav a.playground-link:focus-visible {
    color: #ffffff;
    background: var(--blue-hover);
}

.playground-nav .support-link {
    padding: 6px 9px;
    color: var(--red);
    border: 1px solid color-mix(in srgb, var(--red) 34%, var(--line));
    border-radius: 999px;
    background: var(--red-soft);
}

.playground-nav .support-link:hover,
.playground-nav .support-link:focus-visible {
    color: var(--text);
    border-color: var(--red);
}

.icon-button {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--panel);
}

.icon-button svg {
    width: 18px;
    height: 18px;
}

:root[data-theme="dark"] .theme-moon,
:root:not([data-theme="dark"]) .theme-sun {
    display: none;
}

.playground-frame {
    display: grid;
    grid-template-rows: 46px minmax(0, 1fr) 27px;
    width: min(1500px, calc(100% - 36px));
    height: calc(100% - 28px);
    min-width: 0;
    min-height: 0;
    margin: 14px auto;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.ide-toolbar {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    min-width: 0;
    border-bottom: 1px solid var(--line-strong);
    background:
        linear-gradient(90deg, color-mix(in srgb, var(--panel-muted) 96%, transparent), color-mix(in srgb, var(--panel-muted) 84%, transparent)),
        url("/assets/nova-scotia-coast.webp") center 48% / cover no-repeat;
}

.workspace-boundary {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 9px;
    padding: 5px 15px;
}

.workspace-boundary a,
.workspace-boundary > div {
    display: grid;
    gap: 1px;
    min-width: 0;
    padding: 4px 7px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: color-mix(in srgb, var(--panel) 82%, transparent);
    text-decoration: none;
}

.workspace-boundary a:hover,
.workspace-boundary a:focus-visible {
    border-color: var(--blue);
}

.workspace-boundary span {
    color: var(--blue);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.workspace-boundary strong {
    color: var(--text);
    font-size: 9px;
    font-weight: 650;
    white-space: nowrap;
}

.workspace-boundary b {
    color: var(--muted);
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
}

.toolbar-actions {
    min-width: 0;
    gap: 10px;
    padding: 5px 9px;
}

.example-picker {
    gap: 7px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

select {
    min-height: 32px;
    padding: 0 28px 0 9px;
    color: var(--text);
    border: 1px solid var(--line-strong);
    border-radius: 7px;
    background: var(--panel);
    font-size: 11px;
    text-transform: none;
}

.run-button {
    gap: 7px;
    min-height: 34px;
    padding: 0 11px;
    color: #fff;
    border: 0;
    border-radius: 7px;
    background: var(--blue);
    font-size: 11px;
    font-weight: 740;
}

.run-button:hover:not(:disabled) {
    background: var(--blue-hover);
}

.run-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.run-button svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    stroke: none;
}

.run-button kbd {
    padding-left: 7px;
    color: rgba(255, 255, 255, 0.72);
    border-left: 1px solid rgba(255, 255, 255, 0.24);
    font-family: inherit;
    font-size: 9px;
    font-weight: 600;
}

.ide-workspace {
    display: grid;
    grid-template-rows: minmax(0, 1fr) 5px var(--results-height);
    min-width: 0;
    min-height: 0;
    background: var(--panel);
}

.ide-top {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) 5px var(--sidebar-width);
    min-width: 0;
    min-height: 0;
}

.editor-pane,
.authority-pane,
.results-pane {
    min-width: 0;
    min-height: 0;
}

.editor-pane,
.results-pane {
    display: flex;
    flex-direction: column;
}

.editor-tab-strip,
.pane-title,
.result-tabs {
    flex: 0 0 auto;
    min-height: 36px;
    border-bottom: 1px solid var(--line);
    background: var(--panel-muted);
}

.editor-tab-strip {
    display: flex;
    align-items: stretch;
    padding-left: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.editor-tab {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    color: var(--muted);
    border-right: 1px solid var(--line);
}

.editor-tab-select,
.editor-tab-close {
    display: flex;
    align-items: center;
    align-self: stretch;
    padding: 0;
    color: inherit;
    border: 0;
    background: transparent;
}

.editor-tab-select {
    min-width: 0;
    gap: 7px;
    padding: 0 9px 0 12px;
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
}

.editor-tab-select > span {
    overflow: hidden;
    max-width: 170px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.editor-tab-close {
    justify-content: center;
    width: 27px;
    color: var(--faint);
}

.editor-tab-close svg {
    width: 13px;
    height: 13px;
}

.editor-tab-add {
    position: sticky;
    right: 0;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 36px;
    flex: 0 0 36px;
    color: var(--muted);
    border: 0;
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
    background: var(--panel-muted);
    box-shadow: -7px 0 12px color-mix(in srgb, var(--panel-muted) 88%, transparent);
}

.editor-tab-add:hover,
.editor-tab-add:focus-visible {
    color: var(--blue);
    background: var(--blue-soft);
}

.editor-tab-add:disabled {
    color: var(--faint);
    cursor: not-allowed;
}

.editor-tab-add svg {
    width: 15px;
    height: 15px;
}

.editor-tab:not(.active):hover,
.editor-tab:not(.active):focus-within {
    color: var(--text);
    background: var(--blue-soft);
}

.editor-tab-close:hover {
    color: var(--red);
}

.editor-tab.active {
    color: var(--text);
    background: var(--editor);
}

.editor-tab.active::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 2px;
    background: var(--blue);
    content: "";
}

.editor-tab-select b {
    color: var(--blue);
    font-size: 9px;
}

.editor-stage {
    position: relative;
    flex: 1;
    min-height: 0;
    background: var(--editor);
}

.fallback-editor,
.monaco-host {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.fallback-editor {
    z-index: 1;
    resize: none;
    padding: 14px 18px;
    color: var(--text);
    border: 0;
    background: var(--editor);
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 13px;
    line-height: 1.65;
    tab-size: 4;
}

.monaco-host {
    z-index: 2;
    visibility: hidden;
}

.editor-ready .fallback-editor {
    visibility: hidden;
}

.editor-ready .monaco-host {
    visibility: visible;
}

.authority-pane {
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--line);
    background: var(--panel);
}

.pane-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 13px;
    color: var(--text);
    font-size: 11px;
    font-weight: 720;
}

.local-badge {
    gap: 5px;
    color: var(--green);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.local-badge i,
.status-state i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.authority-content {
    min-height: 0;
    padding: 13px;
    overflow: auto;
}

.example-description {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.native-profile-card {
    padding: 10px;
    border: 1px solid color-mix(in srgb, var(--green) 30%, var(--line));
    border-radius: 7px;
    background: var(--green-soft);
}

.workspace-card {
    margin-top: 9px;
    padding: 9px 10px;
    border: 1px solid color-mix(in srgb, var(--blue) 25%, var(--line));
    border-radius: 7px;
    background: var(--blue-soft);
}

.workspace-card > span,
.workspace-card > strong {
    display: block;
}

.workspace-card > span {
    color: var(--blue);
    font-size: 8px;
    font-weight: 760;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.workspace-card > strong {
    margin-top: 4px;
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
}

.workspace-card > p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
}

.workspace-card .workspace-import-status {
    margin-top: 8px;
    padding-top: 7px;
    color: var(--green);
    border-top: 1px solid color-mix(in srgb, var(--blue) 22%, var(--line));
    font-weight: 650;
}

.workspace-card .workspace-import-status.failure {
    color: var(--red);
}

.native-profile-card > span,
.native-profile-card > strong {
    display: block;
}

.native-profile-card > span {
    color: var(--green);
    font-size: 8px;
    font-weight: 760;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.native-profile-card > strong {
    margin-top: 5px;
    color: var(--text);
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
}

.native-profile-card > p,
.latency-note {
    color: var(--muted);
    font-size: 9px;
    line-height: 1.45;
}

.native-profile-card > p {
    margin: 6px 0 0;
}

.latency-note {
    margin: 12px 1px 0;
}

.capabilities {
    display: grid;
    gap: 7px;
    margin: 16px 0 0;
    padding: 0;
    border: 0;
}

.capabilities legend,
.budget-control > span {
    color: var(--text);
    font-size: 10px;
    font-weight: 760;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.capabilities > p {
    margin: -3px 0 3px;
    color: var(--faint);
    font-size: 9px;
}

.capabilities label {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel-muted);
}

.capabilities label:hover {
    border-color: var(--line-strong);
}

.capabilities input {
    width: 14px;
    height: 14px;
    margin: 2px 0 0;
    accent-color: var(--blue);
}

.capabilities strong,
.capabilities small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.capabilities strong {
    color: var(--text);
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 9px;
    font-weight: 650;
}

.capabilities small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.budget-control {
    display: grid;
    gap: 7px;
    margin-top: 16px;
}

.budget-control select {
    width: 100%;
}

.sandbox-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 14px;
    padding: 9px;
    color: var(--blue);
    border: 1px solid color-mix(in srgb, var(--blue) 25%, var(--line));
    border-radius: 7px;
    background: var(--blue-soft);
}

.sandbox-note svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.sandbox-note p {
    margin: 0;
}

.sandbox-note strong,
.sandbox-note span {
    display: block;
}

.sandbox-note strong {
    color: var(--text);
    font-size: 9px;
}

.sandbox-note span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
}

.resize-handle {
    position: relative;
    z-index: 4;
    display: grid;
    place-items: center;
    background: var(--panel-muted);
    touch-action: none;
    user-select: none;
}

.resize-handle::after {
    position: absolute;
    background: var(--blue);
    content: "";
    opacity: 0;
    transition: opacity 120ms ease;
}

.resize-handle:hover::after,
.resize-handle.dragging::after,
.resize-handle:focus-visible::after {
    opacity: 1;
}

.resize-handle.vertical {
    cursor: col-resize;
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.resize-handle.vertical::after {
    inset-block: 0;
    width: 2px;
}

.resize-handle.horizontal {
    cursor: row-resize;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.resize-handle.horizontal::after {
    inset-inline: 0;
    height: 2px;
}

.resize-handle span {
    width: 2px;
    height: 22px;
    border-radius: 2px;
    background: var(--line-strong);
}

.resize-handle.horizontal span {
    width: 22px;
    height: 2px;
}

.results-pane {
    background: var(--panel);
}

.result-tabs {
    display: flex;
    align-items: stretch;
    min-width: 0;
    padding: 0 8px;
}

.result-tabs button {
    position: relative;
    min-width: max-content;
    padding: 0 11px;
    color: var(--muted);
    border: 0;
    background: transparent;
    font-size: 10px;
    font-weight: 650;
}

.result-tabs button:hover {
    color: var(--text);
}

.result-tabs button.active {
    color: var(--text);
}

.result-tabs button.active::after {
    position: absolute;
    right: 10px;
    bottom: 0;
    left: 10px;
    height: 2px;
    background: var(--blue);
    content: "";
}

.tab-count {
    display: inline-grid;
    place-items: center;
    min-width: 16px;
    height: 16px;
    margin-left: 5px;
    padding: 0 4px;
    color: var(--red);
    border-radius: 8px;
    background: var(--red-soft);
    font-size: 8px;
}

.result-status {
    align-self: center;
    margin-left: auto;
    padding: 3px 7px;
    border: 1px solid currentColor;
    border-radius: 9px;
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 8px;
    letter-spacing: 0.03em;
}

.success {
    color: var(--green);
}

.failure {
    color: var(--red);
}

.result-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    background: var(--panel);
}

.result-view {
    min-height: 100%;
}

.result-view[hidden] {
    display: none;
}

.inspection-view {
    min-height: 100%;
}

.inspection-view .execution-layout {
    min-height: 0;
}

.pipeline-map {
    display: grid;
    grid-template-columns: repeat(5, minmax(100px, 1fr));
    gap: 1px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: var(--line);
}

.pipeline-map li {
    position: relative;
    min-width: 0;
    padding: 9px 11px;
    background: var(--panel);
}

.pipeline-map li:not(:last-child)::after {
    position: absolute;
    top: 50%;
    right: -5px;
    z-index: 2;
    width: 9px;
    height: 9px;
    border-top: 1px solid var(--line-strong);
    border-right: 1px solid var(--line-strong);
    background: var(--panel);
    transform: translateY(-50%) rotate(45deg);
    content: "";
}

.pipeline-map span,
.pipeline-map strong,
.pipeline-map small {
    display: block;
}

.pipeline-map span {
    margin-bottom: 4px;
    color: var(--faint);
    font-size: 8px;
    font-weight: 800;
}

.pipeline-map strong {
    color: var(--text);
    font-size: 10px;
}

.pipeline-map small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
}

.pipeline-map li.current,
.pipeline-map li.running {
    background: var(--blue-soft);
}

.pipeline-map li.current span,
.pipeline-map li.running span {
    color: var(--blue);
}

.pipeline-map li.complete {
    background: var(--green-soft);
}

.pipeline-map li.complete span,
.pipeline-map li.complete strong {
    color: var(--green);
}

.pipeline-map li.failed {
    background: var(--red-soft);
}

.pipeline-map li.failed span,
.pipeline-map li.failed strong {
    color: var(--red);
}

.inspection-note {
    max-width: 720px;
    margin: 0;
    padding: 15px 18px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.terminal-view {
    height: 100%;
}

.terminal {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100%;
    min-height: 180px;
    color: #dce9f7;
    background: #07111c;
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

.terminal-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 13px;
    color: #8fa5ba;
    border-bottom: 1px solid #1d3449;
    background: #0b1926;
    font-size: 9px;
}

.terminal-banner span {
    color: #72d0ac;
    font-weight: 760;
    letter-spacing: 0.04em;
}

.terminal-transcript {
    min-height: 0;
    padding: 9px 13px;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 11px;
    line-height: 1.55;
}

.terminal-line {
    min-height: 1.55em;
}

.terminal-line.command {
    color: #a9c9ee;
}

.terminal-line.command::before {
    color: #72d0ac;
    content: "/workspace › ";
}

.terminal-line.error {
    color: #ff8d96;
}

.terminal-line.system {
    color: #8fa5ba;
}

.terminal-command {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 28px;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 5px 13px;
    border-top: 1px solid #1d3449;
    background: #091623;
}

.terminal-command label {
    color: #72d0ac;
    font-size: 11px;
}

.terminal-command b {
    color: #a9c9ee;
}

.terminal-command input {
    width: 100%;
    padding: 3px 0;
    color: #f2f7fb;
    border: 0;
    outline: 0;
    background: transparent;
    cursor: text;
    font-family: inherit;
    font-size: 11px;
}

.terminal-command input:disabled {
    color: #6d8296;
    cursor: wait;
}

.terminal-command button {
    display: grid;
    place-items: center;
    width: 28px;
    height: 26px;
    padding: 0;
    color: #a9c9ee;
    border: 1px solid #29475e;
    border-radius: 5px;
    background: #102337;
}

.terminal-command button:hover,
.terminal-command button:focus-visible {
    color: #ffffff;
    border-color: #527ca2;
}

.terminal-command:has(input:disabled) button {
    opacity: 0.45;
    pointer-events: none;
}

.running-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    min-height: 100%;
    padding: 24px;
    color: var(--muted);
}

.running-state p,
.running-state strong,
.running-state span {
    display: block;
}

.running-state p {
    margin: 0;
    font-size: 11px;
    line-height: 1.55;
}

.running-state strong {
    color: var(--text);
}

.activity-ring {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    border: 2px solid var(--line-strong);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: activity-spin 800ms linear infinite;
}

@keyframes activity-spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    display: grid;
    place-content: center;
    justify-items: center;
    min-height: 100%;
    padding: 24px;
    color: var(--faint);
    text-align: center;
}

.empty-state svg,
.empty-state > span {
    width: 27px;
    height: 27px;
    margin-bottom: 8px;
    color: var(--line-strong);
    font-size: 25px;
}

.empty-state svg {
    fill: currentColor;
    stroke: none;
}

.empty-state p {
    max-width: 360px;
    margin: 0;
    font-size: 11px;
    line-height: 1.5;
}

.empty-state.success > span {
    color: var(--green);
}

.channel-heading {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px 5px;
    color: var(--faint);
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.channel-heading.diagnostic {
    margin-top: 7px;
    border-top: 1px solid var(--line);
}

.console-output,
.bytecode-output {
    margin: 0;
    padding: 6px 15px 18px;
    color: var(--text);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 11px;
    line-height: 1.55;
}

.console-output.diagnostic {
    color: var(--red);
}

.bytecode-output {
    color: var(--muted);
    white-space: pre;
    overflow-wrap: normal;
}

.diagnostic-list {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 10px 12px;
    list-style: none;
}

.diagnostic-list button {
    display: grid;
    gap: 5px;
    width: 100%;
    padding: 9px 11px;
    color: var(--text);
    border: 1px solid color-mix(in srgb, var(--red) 30%, var(--line));
    border-left: 3px solid var(--red);
    border-radius: 5px;
    background: var(--red-soft);
    text-align: left;
}

.diagnostic-list button:not(:disabled):hover {
    border-color: var(--red);
}

.diagnostic-list button:disabled {
    cursor: default;
}

.diagnostic-list button > span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.diagnostic-list code,
.diagnostic-list small,
.diagnostic-list em {
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 8px;
}

.diagnostic-list code {
    color: var(--red);
}

.diagnostic-list small,
.diagnostic-list em {
    color: var(--muted);
}

.diagnostic-list strong {
    font-size: 10px;
    font-weight: 600;
}

.diagnostic-list em {
    font-style: normal;
}

.execution-layout {
    display: grid;
    grid-template-columns: minmax(340px, 1fr) minmax(220px, 0.7fr) minmax(220px, 0.9fr);
    min-height: 100%;
}

.native-execution-layout {
    grid-template-columns: minmax(460px, 1.45fr) minmax(250px, 0.75fr);
}

.execution-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
}

.execution-grid div {
    padding: 12px 14px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.execution-grid dt,
.capability-evidence h3,
.digest span {
    margin-bottom: 5px;
    color: var(--faint);
    font-size: 8px;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.execution-grid dd {
    margin: 0;
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
}

.capability-evidence,
.digest {
    padding: 12px 14px;
    border-right: 1px solid var(--line);
}

.capability-evidence h3:not(:first-child) {
    margin-top: 13px;
}

.none-label {
    margin: 0;
    color: var(--faint);
    font-size: 9px;
}

.inline-capabilities {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.inline-capabilities li {
    padding: 3px 5px;
    color: var(--green);
    border: 1px solid color-mix(in srgb, var(--green) 35%, var(--line));
    border-radius: 4px;
    background: var(--green-soft);
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 8px;
}

.digest code {
    display: block;
    color: var(--blue);
    font-size: 8px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.digest span:not(:first-child) {
    display: block;
    margin-top: 12px;
}

.wasm-note {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.45;
}

.status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    padding: 0 10px;
    color: #d8e6f5;
    background: #173d78;
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 9px;
}

:root[data-theme="dark"] .status-bar {
    background: #102b48;
}

.status-bar > div {
    min-width: 0;
    gap: 12px;
}

.status-item,
.status-state {
    min-width: 0;
    gap: 5px;
    white-space: nowrap;
}

.status-state {
    color: #b9d5fa;
}

.status-state.success {
    color: #9de2b8;
}

.status-state.failure {
    color: #ffb1aa;
}

.status-state.running {
    color: #ffe0a6;
}

.status-item svg {
    width: 12px;
    height: 12px;
}

.boot-screen {
    display: grid;
    place-content: center;
    min-height: 100vh;
    color: var(--muted);
    text-align: center;
    font-size: 12px;
}

.boot-mark {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0 auto 16px;
    padding: 6px;
    border: 1px solid #29475e;
    border-radius: 13px;
    background: #071018;
}

.not-found {
    max-width: 700px;
    margin: 15vh auto;
    padding: 30px;
}

.not-found a {
    color: var(--blue);
}

.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;
}

#playground-error-ui {
    position: fixed;
    right: 16px;
    bottom: 38px;
    left: 16px;
    z-index: 1000;
    display: block;
    padding: 13px 48px 13px 15px;
    color: #fff;
    border-radius: 7px;
    background: #b42318;
    box-shadow: var(--shadow);
    font-size: 12px;
}

#playground-error-ui[hidden] {
    display: none;
}

#playground-error-ui .reload {
    margin-left: 10px;
    color: inherit;
    font-weight: 700;
}

#playground-error-ui .dismiss {
    position: absolute;
    top: 4px;
    right: 8px;
    color: inherit;
    border: 0;
    background: transparent;
    font-size: 24px;
}

@media (max-width: 1120px) {
    .playground-nav {
        gap: 15px;
    }
}

@media (max-width: 900px) {
    .playground-nav a:not(.support-link):not(.playground-link):not(.project-progress-link) {
        display: none;
    }
}

@media (max-width: 780px) {
    body {
        height: auto;
        overflow: auto;
    }

    .playground-shell {
        grid-template-rows: 62px auto;
        height: auto;
        min-height: 100vh;
    }

    .app-header {
        gap: 10px;
        padding: 0 12px;
    }

    .playground-nav {
        gap: 8px;
    }

    .playground-frame {
        grid-template-rows: auto auto 28px;
        width: calc(100% - 16px);
        height: auto;
        margin: 8px auto;
        border-radius: 12px;
    }

    .toolbar-actions {
        justify-content: space-between;
        width: 100%;
        padding: 7px 9px;
    }

    .workspace-boundary {
        display: none;
    }

    .example-picker {
        min-width: 0;
    }

    .example-picker select {
        min-width: 0;
        max-width: 44vw;
    }

    .run-button kbd {
        display: none;
    }

    .ide-workspace {
        display: block;
        min-height: 0;
    }

    .ide-top {
        display: flex;
        flex-direction: column;
    }

    .editor-pane {
        height: min(62vh, 600px);
        min-height: 420px;
    }

    .authority-pane {
        border-top: 1px solid var(--line-strong);
        border-left: 0;
    }

    .authority-content {
        overflow: visible;
    }

    .capabilities {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .capabilities legend,
    .capabilities > p {
        grid-column: 1 / -1;
    }

    .resize-handle {
        display: none;
    }

    .results-pane {
        height: 360px;
        border-top: 1px solid var(--line-strong);
    }

    .execution-layout {
        grid-template-columns: 1fr;
    }

    .pipeline-map {
        grid-template-columns: repeat(5, minmax(82px, 1fr));
        overflow-x: auto;
    }

    .capability-evidence,
    .digest {
        border-top: 1px solid var(--line);
        border-right: 0;
    }

    .status-bar {
        position: sticky;
        bottom: 0;
    }
}

@media (max-width: 560px) {
    .playground-shell {
        grid-template-rows: 56px auto;
    }

    .app-header {
        padding: 0 9px;
    }

    .brand-mark {
        width: 35px;
        height: 35px;
        border-radius: 9px;
    }

    .playground-brand > span:not(.brand-mark),
    .playground-nav .project-progress-link {
        display: none;
    }

    .playground-nav .support-link,
    .playground-nav .playground-link {
        padding: 7px 9px;
        font-size: 11px;
    }

    .icon-button {
        width: 35px;
        height: 35px;
    }

    .toolbar-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 7px;
        padding: 6px 8px;
    }

    .example-picker,
    .example-picker select {
        width: 100%;
    }

    .example-picker > span {
        display: none;
    }

    .example-picker select {
        max-width: none;
        min-height: 38px;
    }

    .run-button {
        width: auto;
        min-height: 38px;
        padding-inline: 12px;
        justify-content: center;
    }

    .editor-pane {
        height: min(54svh, 500px);
        min-height: 350px;
    }

    .authority-content {
        padding: 10px;
    }

    .example-description {
        margin-bottom: 10px;
    }

    .capabilities {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 5px;
    }

    .capabilities label {
        padding: 7px;
    }

    .capabilities label:last-of-type {
        grid-column: 1 / -1;
    }

    .capabilities small {
        display: none;
    }

    .budget-control,
    .sandbox-note {
        margin-top: 10px;
    }

    .sandbox-note {
        padding: 7px;
    }

    .results-pane {
        height: 320px;
    }

    .execution-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .result-tabs {
        padding-inline: 4px;
        overflow-x: auto;
    }

    .result-tabs button {
        padding-inline: 8px;
    }

    .result-status,
    .wide-only {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
