/* IaCBoard — cool graphite, cyan accent; Inter for the interface, JetBrains Mono for code. */

@font-face { font-family: "Inter"; font-weight: 100 900; font-style: normal; font-display: swap; src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2-variations"), url(/fonts/inter-latin-wght-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 100 800; font-style: normal; font-display: swap; src: url(/fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2-variations"), url(/fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2"); }

:root {
  --bg: #0a0d10; --canvas: #0d1115; --surface: #12171c; --surface-2: #182027; --surface-3: #1e2731;
  --border: #222b34; --border-strong: #2e3945;
  --text: #e6edf3; --muted: #93a1ae; --faint: #7b8895;
  --accent: #38bdf8; --accent-soft: rgba(56,189,248,.12); --accent-line: rgba(56,189,248,.5); --accent-solid: #0284c7;
  --good: #4ade80; --good-soft: rgba(74,222,128,.12); --warn: #fbbf24; --warn-soft: rgba(251,191,36,.12); --bad: #f87171; --bad-soft: rgba(248,113,113,.12);
  --edge: #4a5866;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px rgba(0,0,0,.45);
  --float: 0 16px 48px rgba(0,0,0,.55);
  color-scheme: dark;
  font-family: var(--sans); font-size: 13px; color: var(--text); background: var(--bg);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f6f8; --canvas: #f8fafb; --surface: #ffffff; --surface-2: #f0f3f6; --surface-3: #e8edf1;
    --border: #dde3e9; --border-strong: #c8d1da; --text: #14191f; --muted: #55616d; --faint: #6a7682;
    --accent: #0277b5; --accent-soft: rgba(2,119,181,.1); --accent-line: rgba(2,119,181,.45); --accent-solid: #0369a1;
    --good: #15803d; --good-soft: rgba(21,128,61,.1); --warn: #a16207; --warn-soft: rgba(161,98,7,.1); --bad: #c62828; --bad-soft: rgba(198,40,40,.08);
    --edge: #9aa7b4; --shadow: 0 1px 2px rgba(16,24,40,.06), 0 6px 16px rgba(16,24,40,.08); --float: 0 16px 40px rgba(16,24,40,.18);
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { display: flex; flex-direction: column; overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code, .mono { font-family: var(--mono); }
code { font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.spacer, .grow { flex: 1; }
.empty { color: var(--faint); font-size: 12.5px; margin: 8px 0; }
a { color: var(--accent); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 12.5px; font-weight: 500; color: var(--text); text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.primary { background: var(--accent-solid); border-color: transparent; color: #fff; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.small { height: 28px; padding: 0 10px; font-size: 12px; }
.btn.danger:hover { background: var(--bad-soft); color: var(--bad); }
.icon-btn { width: 28px; height: 28px; display: inline-grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted); flex-shrink: 0; }
.icon-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.link { border: 0; background: none; color: var(--accent); font-weight: 500; padding: 0; }
.seg { display: inline-flex; padding: 2px; gap: 2px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button { height: 24px; padding: 0 9px; border: 0; border-radius: 5px; background: transparent; font-size: 12px; font-weight: 500; color: var(--muted); }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border-strong); }
select { height: 30px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface); padding: 0 8px; font-size: 12.5px; color: var(--text); }

/* ---------- top bar ---------- */
.topbar { flex-shrink: 0; min-height: 46px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 0 10px 0 14px; background: var(--bg); border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--text); text-decoration: none; }
.brand svg { color: var(--accent); }
.crumb { color: var(--border-strong); }
.project-name input { width: 150px; height: 28px; padding: 0 6px; border: 1px solid transparent; border-radius: 5px; background: transparent; font-weight: 500; }
.project-name input:hover { border-color: var(--border); }
.project-name input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.engine-pill { height: 22px; padding: 0 8px; border-radius: 4px; border: 1px solid var(--border); background: transparent; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.engine-pill:hover { color: var(--text); border-color: var(--border-strong); }
.views { display: flex; align-self: stretch; margin-left: 14px; }
.views button { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; }
.views button:hover { color: var(--text); }
.views button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tab-badge { padding: 0 5px; border-radius: 4px; background: var(--warn-soft); color: var(--warn); font-family: var(--mono); font-size: 10.5px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.problems-btn .ok { color: var(--good); display: inline-flex; gap: 5px; align-items: center; }
.problems-btn .warn { color: var(--warn); display: inline-flex; gap: 5px; align-items: center; }
.problems-btn .bad { color: var(--bad); display: inline-flex; gap: 5px; align-items: center; }

/* ---------- body: rail, side panel, views ---------- */
.body { flex: 1; min-height: 0; display: flex; }
.rail { flex: 0 0 48px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0; background: var(--bg); border-right: 1px solid var(--border); }
.rail button { width: 36px; height: 36px; border: 0; border-radius: 8px; display: grid; place-items: center; background: transparent; color: var(--muted); }
.rail button:hover { color: var(--text); background: var(--surface-2); }
.rail button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.side { flex: 0 0 240px; min-height: 0; overflow: auto; padding: 10px 8px 16px; background: var(--surface); border-right: 1px solid var(--border); }
.side-head { display: flex; align-items: center; gap: 6px; padding: 0 6px 8px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.side-head > :last-child { margin-left: auto; letter-spacing: 0; text-transform: none; }
.side-lead { display: block; padding: 0 6px; margin: 0 0 10px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.side-section { padding: 6px 6px 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.side-section .side-lead { padding: 0; }
.side-label { font-size: 12px; color: var(--muted); }
.filter { display: flex; align-items: center; gap: 6px; margin: 0 4px 8px; padding: 0 8px; height: 30px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--faint); }
.filter input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 12.5px; color: var(--text); }
.filter input:focus { outline: none; }
.filter:focus-within { border-color: var(--accent); }
.tree { display: flex; flex-direction: column; gap: 1px; }
.tree-row { all: unset; cursor: pointer; display: flex; align-items: center; gap: 6px; min-height: 26px; padding: 3px 8px; border-radius: 5px; font-size: 12.5px; color: var(--text); overflow: hidden; }
.tree-row:hover { background: var(--surface-2); }
.tree-row:focus-visible { outline: 2px solid var(--accent); }
.tree-row.current { background: var(--accent-soft); }
.tree-row.child { padding-left: 28px; }
.tree-row .mono { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-row.file { color: var(--muted); }
.tree-row.file.current { color: var(--text); }
.tree-group { margin: 12px 8px 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.dot { width: 6px; height: 6px; border-radius: 3px; margin-left: auto; flex-shrink: 0; }
.dot.error { background: var(--bad); } .dot.warning { background: var(--warn); }
.count { color: var(--accent); font-family: var(--mono); font-size: 11px; font-weight: 600; }
.tile { --tint: #9aa7b4; display: inline-grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 6px; color: var(--tint); background: color-mix(in srgb, var(--tint) 15%, transparent); }
.tile.small { width: 20px; height: 20px; border-radius: 4px; }
.tile.tiny { width: 18px; height: 18px; border-radius: 4px; }
.tpl-list { display: flex; flex-direction: column; gap: 6px; padding: 0 4px; }
.tpl { all: unset; cursor: pointer; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: start; padding: 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); }
.tpl:hover, .tpl:focus-visible { border-color: var(--accent-line); outline: none; }
.tpl b { font-size: 13px; }
.tpl > span:not(.tile) { grid-column: 1 / -1; font-size: 12px; color: var(--muted); line-height: 1.45; margin-top: 3px; }
.tpl .tile + b { align-self: center; }

.views-host { position: relative; flex: 1; min-width: 0; min-height: 0; }
.view { position: absolute; inset: 0; visibility: hidden; pointer-events: none; }
.view.active { visibility: visible; pointer-events: auto; }

/* ---------- map ---------- */
.viewport { position: absolute; inset: 0; overflow: hidden; background: var(--canvas); background-image: radial-gradient(circle, color-mix(in srgb, var(--border) 90%, transparent) 1px, transparent 1.2px); background-size: 22px 22px; cursor: default; touch-action: none; }
.viewport.panning { cursor: grabbing; }
.world { position: absolute; left: 0; top: 0; transform-origin: 0 0; user-select: none; -webkit-user-select: none; }
.world > * { position: absolute; }
.measure { position: absolute; left: -10000px; top: 0; visibility: hidden; }
.measure > * { position: relative !important; margin-bottom: 4px; }
.band { top: 0; border-left: 1px solid color-mix(in srgb, var(--border) 50%, transparent); border-right: 1px solid color-mix(in srgb, var(--border) 50%, transparent); background: color-mix(in srgb, var(--surface) 18%, transparent); border-radius: 12px; }
.band-head { position: absolute; left: 14px; right: 10px; top: 10px; display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.add-lane, .add-in { margin-left: auto; width: 22px; height: 22px; display: grid; place-items: center; border: 1px dashed var(--border-strong); border-radius: 5px; background: transparent; color: var(--muted); }
.add-lane:hover, .add-in:hover { border-color: var(--accent); color: var(--accent); border-style: solid; }

.region { border: 1px dashed var(--border-strong); border-radius: 12px; background: color-mix(in srgb, var(--accent) 2.5%, transparent); }
.region.inner { border-color: var(--border); background: color-mix(in srgb, var(--surface) 25%, transparent); }
.region.selected { border-color: var(--accent); border-style: solid; box-shadow: 0 0 0 2px var(--accent-soft); }
.region.linked { border-color: var(--accent-line); }
.region-tab { position: absolute; left: 12px; top: -11px; display: flex; align-items: center; gap: 6px; height: 22px; padding: 0 3px 0 4px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border-strong); font-size: 11.5px; color: var(--muted); white-space: nowrap; cursor: grab; }
.region-tab b { color: var(--text); font-weight: 600; }
.region-tab .mono { font-size: 10.5px; color: var(--faint); }
.region-tab .add-in { width: 18px; height: 18px; margin-left: 2px; }
.region.selected .region-tab { border-color: var(--accent); }
.region-chips { position: absolute; left: 14px; right: 14px; top: 18px; display: flex; flex-wrap: wrap; gap: 4px; }

.card { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); box-shadow: var(--shadow); color: var(--text); cursor: grab; transition: border-color .12s, box-shadow .12s; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border-strong)); }
.card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow); }
.card.linked { border-color: var(--accent-line); }
.card.dragging, .region.dragging { cursor: grabbing; box-shadow: 0 18px 40px rgba(0,0,0,.55), 0 0 0 2px var(--accent-soft); z-index: 5; transition: none; }
.dragging-box .card:not(.dragging) { transition: none; }
.card.internet { cursor: default; }
.card.unhinted .tile { opacity: .75; }
.card.has-error { border-color: color-mix(in srgb, var(--bad) 70%, transparent); }
.card.has-warning { border-color: color-mix(in srgb, var(--warn) 55%, transparent); }
.card-body { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.35; }
.kind { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.card strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.card.big strong { font-size: 15.5px; }
.addr { font-family: var(--mono); font-size: 10.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tag { display: inline-flex; align-items: center; height: 19px; padding: 0 6px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border); font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
button.tag { cursor: pointer; }
button.tag:hover { color: var(--text); border-color: var(--border-strong); }
.tag.selected { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.flag { margin-left: auto; display: inline-flex; }
.flag.error { color: var(--bad); } .flag.warning { color: var(--warn); }
.edges { left: 0; top: 0; pointer-events: none; }
.edge { fill: none; stroke-width: 2; }
.edge.ref { stroke: var(--edge); stroke-dasharray: 5 5; }
.edge.traffic { stroke: var(--good); }
.edge.hl { stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: none; }
.edge-flow { fill: none; stroke: var(--good); stroke-width: 2.5; stroke-dasharray: 2 18; stroke-linecap: round; animation: flow 1.4s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -40; } }
@media (prefers-reduced-motion: reduce) { .edge-flow { display: none; } }
.edge-label rect { fill: var(--surface); stroke: var(--border-strong); }
.edge-label text { font: 500 10.5px var(--mono); fill: var(--muted); }

.zoom-controls { position: absolute; left: 14px; bottom: 14px; z-index: 6; display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.zoom-controls .icon-btn { color: var(--text); }
.zoom-pct { min-width: 52px; height: 28px; border: 0; border-radius: 5px; background: transparent; font-family: var(--mono); font-size: 12px; color: var(--text); }
.zoom-pct:hover { background: var(--surface-2); }
.zoom-controls .sep { width: 1px; height: 18px; background: var(--border); margin: 0 3px; }
.snap { height: 28px; padding: 0 8px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.snap[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.minimap { position: absolute; right: 14px; bottom: 14px; z-index: 6; width: 170px; height: 98px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; cursor: pointer; }
.mm-world { position: absolute; inset: 0; }
.mm-world i { position: absolute; border-radius: 2px; background: var(--border-strong); }
.mm-world i.z { background: transparent; border: 1px solid var(--border-strong); }
.mm-world i.s { background: var(--accent); }
.mm-view { position: absolute; border: 1.5px solid var(--accent); border-radius: 3px; background: color-mix(in srgb, var(--accent) 7%, transparent); pointer-events: none; }
.empty-state { position: absolute; inset: 0; display: grid; place-items: center; z-index: 4; pointer-events: none; }
.empty-state > div { pointer-events: auto; text-align: center; padding: 22px 26px; border-radius: 12px; border: 1px dashed var(--border-strong); background: var(--surface); }
.empty-state p { margin: 6px 0 14px; color: var(--muted); }
body[data-view="diagram"] .inspector:not([hidden]) ~ .zoom-controls { left: 14px; }

/* ---------- inspector ---------- */
.inspector { position: absolute; top: 12px; right: 12px; bottom: 124px; z-index: 7; width: 360px; max-width: calc(100% - 24px); display: flex; flex-direction: column; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--float); overflow: hidden; }
body[data-view="order"] .inspector { bottom: 12px; }
.inspector-body { flex: 1; min-height: 0; overflow: auto; }
.inspector-open { position: absolute; top: 12px; right: 12px; z-index: 7; }
.insp-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 14px; background: var(--surface); border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.insp-head { display: flex; align-items: flex-start; gap: 10px; padding: 12px 10px 0 14px; }
.insp-head .tile { width: 32px; height: 32px; border-radius: 7px; }
.insp-title { flex: 1; min-width: 0; }
.res-kind { font-size: 11.5px; color: var(--muted); }
.res-name { width: 100%; height: 30px; margin: 1px 0 0 -6px; padding: 0 6px; border: 1px solid transparent; border-radius: 5px; background: transparent; font-size: 16px; font-weight: 600; }
.res-name:hover { border-color: var(--border); }
.res-name:focus { outline: none; border-color: var(--accent); background: var(--bg); }
.res-name.static { margin: 0; padding: 0; height: auto; }
.res-type { font-family: var(--mono); font-size: 11px; color: var(--faint); overflow-wrap: anywhere; }
.insp-tabs { position: sticky; top: 0; z-index: 2; display: flex; gap: 2px; padding: 8px 8px 0; background: var(--surface); border-bottom: 1px solid var(--border); }
.insp-tabs button { height: 32px; padding: 0 10px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.insp-tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.panel-body { padding: 14px 14px 18px; }
.panel-body h3 { margin: 0 0 8px; font-size: 14px; font-weight: 600; }
.panel-body h4 { display: flex; align-items: center; gap: 6px; margin: 18px 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.lead { margin: 0 0 12px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.snippet { margin: 0 0 12px; padding: 10px 0; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); font: 11.5px/1.65 var(--mono); overflow: auto; white-space: pre; }
.snippet .ln { display: inline-block; width: 34px; padding-right: 10px; text-align: right; color: var(--faint); user-select: none; }
.summary { margin: 6px 0 14px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.summary li { position: relative; padding-left: 14px; font-size: 12.5px; line-height: 1.5; }
.summary li::before { content: ""; position: absolute; left: 1px; top: 8px; width: 5px; height: 5px; border-radius: 1px; background: var(--accent); }
.summary b { font-weight: 600; }
.steps { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 10px; }
.steps li { counter-increment: step; position: relative; padding-left: 26px; font-size: 12.5px; color: var(--muted); }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 4px; background: var(--surface-2); color: var(--muted); font: 600 11px var(--mono); display: grid; place-items: center; }
.cmd { display: flex; align-items: center; gap: 4px; margin-top: 4px; padding: 3px 3px 3px 9px; border-radius: 6px; font-family: var(--mono); font-size: 11.5px; background: var(--bg); border: 1px solid var(--border); color: var(--text); }
.cmd span { flex: 1; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.cmd .icon-btn { width: 24px; height: 24px; }
.tip { display: flex; gap: 6px; font-size: 12px; color: var(--muted); background: var(--surface-2); padding: 10px 12px; border-radius: 8px; line-height: 1.5; margin: 0; }
.tip svg, .provider-note svg, .notice svg { flex-shrink: 0; margin-top: 2px; }
.provider-note { display: flex; gap: 6px; font-size: 12px; color: var(--muted); margin: 0 0 12px; line-height: 1.5; }
.provider-note b { color: var(--text); }
.notice { display: flex; gap: 8px; padding: 10px 12px; margin: 0 0 12px; border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: 12.5px; line-height: 1.5; }
.notice span { color: var(--text); }
.notice.danger { background: var(--bad-soft); color: var(--bad); }
.problems { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; }
.problem { all: unset; cursor: pointer; display: flex; gap: 8px; align-items: flex-start; padding: 7px 10px; border-radius: 7px; font-size: 12.5px; line-height: 1.45; border: 1px solid transparent; }
.problem:hover { border-color: var(--border-strong); }
.problem:focus-visible { outline: 2px solid var(--accent); }
.problem.error { background: var(--bad-soft); } .problem.warning { background: var(--warn-soft); } .problem.info { background: var(--accent-soft); }
.problem svg { flex-shrink: 0; margin-top: 2px; }
.problem.error svg { color: var(--bad); } .problem.warning svg { color: var(--warn); } .problem.info svg { color: var(--accent); }
.problem .where { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.problem .problem-layer { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }

/* fields */
.field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 11px; font-size: 12px; color: var(--muted); }
.field input, .field textarea, .field select { width: 100%; min-width: 0; height: 30px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--bg); font-size: 12.5px; color: var(--text); }
.field textarea { height: auto; padding: 6px 8px; font-family: var(--mono); font-size: 12px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input.mono, .field textarea.mono { font-family: var(--mono); font-size: 12px; }
.field small { color: var(--faint); font-size: 11px; }
.field .lbl { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.field .req { color: var(--bad); font-size: 10.5px; }
.field .expr-tag { margin-left: auto; font: 600 10px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.field.err input, .field.err textarea { border-color: var(--bad); }
.field .msg { color: var(--bad); font-size: 11.5px; }
.field .msg.warning { color: var(--warn); }
.field-row { display: flex; gap: 6px; align-items: center; }
.add-arg { margin: 4px 0 10px; }
.add-arg select { width: 100%; border-style: dashed; color: var(--muted); }
fieldset.nested { margin: 4px 0 12px; padding: 4px 10px 2px; border: 1px solid var(--border); border-radius: 8px; min-width: 0; }
fieldset.nested fieldset.nested { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
fieldset.nested legend { display: flex; align-items: center; gap: 4px; padding: 0 4px; font-family: var(--mono); font-size: 11.5px; color: var(--text); }
.toggle { display: flex; align-items: flex-start; gap: 10px; margin: 2px 0; cursor: pointer; font-size: 12.5px; color: var(--text); }
.toggle input { position: absolute; opacity: 0; }
.toggle .switch { flex-shrink: 0; width: 32px; height: 18px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .15s; margin-top: 1px; }
.toggle .switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle input:checked + .switch { background: var(--accent-solid); }
.toggle input:checked + .switch::after { transform: translateX(14px); }
.toggle input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle small { display: block; color: var(--muted); font-size: 11.5px; }
.refs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.ref { all: unset; cursor: pointer; display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); font: 11px var(--mono); color: var(--text); }
.ref:hover, .ref:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
.res-actions { display: flex; gap: 6px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.badge { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 4px; font-size: 10.5px; font-weight: 600; }
.badge.starter { background: var(--warn-soft); color: var(--warn); }
.badge.export { background: var(--good-soft); color: var(--good); }
.badge.custom { background: var(--accent-soft); color: var(--accent); }
.badge.muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.row-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* plan */
.plan-badge { display: inline-grid; place-items: center; min-width: 18px; height: 16px; padding: 0 4px; border-radius: 4px; font: 700 11px var(--mono); }
.plan-badge.create { background: var(--good-soft); color: var(--good); }
.plan-badge.update { background: var(--warn-soft); color: var(--warn); }
.plan-badge.replace, .plan-badge.delete { background: var(--bad-soft); color: var(--bad); }
.plan-badge.read { background: var(--accent-soft); color: var(--accent); }
.card.plan-create, .region.plan-create { border-color: color-mix(in srgb, var(--good) 75%, transparent); }
.card.plan-create { background: color-mix(in srgb, var(--good) 6%, var(--surface)); }
.card.plan-update, .region.plan-update { border-color: color-mix(in srgb, var(--warn) 75%, transparent); }
.card.plan-update { background: color-mix(in srgb, var(--warn) 6%, var(--surface)); }
.card.plan-replace, .region.plan-replace { border-color: color-mix(in srgb, var(--bad) 80%, transparent); border-style: dashed; }
.card.plan-replace { background: color-mix(in srgb, var(--bad) 6%, var(--surface)); }
.card.plan-no-op { opacity: .45; }
.tag.plan-create { color: var(--good); } .tag.plan-update { color: var(--warn); } .tag.plan-replace, .tag.plan-delete { color: var(--bad); }
.plan-counts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 4px 0 12px; }
.pc { padding: 8px 10px; border-radius: 8px; font-size: 11.5px; display: flex; flex-direction: column; }
.pc b { font: 600 20px var(--mono); line-height: 1.15; }
.pc.add { background: var(--good-soft); } .pc.add b { color: var(--good); }
.pc.change { background: var(--warn-soft); } .pc.change b { color: var(--warn); }
.pc.destroy { background: var(--bad-soft); } .pc.destroy b { color: var(--bad); }
.changes { display: flex; flex-direction: column; gap: 4px; }
.change { all: unset; cursor: pointer; display: flex; gap: 8px; align-items: flex-start; padding: 7px 9px; border-radius: 7px; border: 1px solid var(--border); }
.change:hover, .change.open { border-color: var(--border-strong); background: var(--surface-2); }
.change .plan-badge { margin-top: 1px; }
.change-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.change-addr { font: 11.5px var(--mono); overflow-wrap: anywhere; }
.diff { font: 11px var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.diff b { color: var(--text); font-weight: 600; }
.diff.forces { color: var(--bad); }
.diff em { font-style: normal; font-family: var(--sans); font-size: 10.5px; }
.diff i { color: var(--accent); }

/* ---------- code view ---------- */
#view-code { display: flex; }
.code-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.code-bar { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 14px; border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: 12px; color: var(--muted); flex-shrink: 0; }
.code-bar #code-crumb { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-bar .seg, .code-bar .btn { font-family: var(--sans); }
.editor { flex: 1; min-height: 0; overflow: hidden; display: flex; }
.editor .cm-editor { flex: 1; min-width: 0; height: 100%; font-size: 12.5px; background: var(--bg); color: var(--text); }
.editor .cm-editor.cm-focused { outline: none; }
.editor .cm-scroller { font-family: var(--mono); line-height: 1.65; }
.editor .cm-content { padding: 10px 0; caret-color: var(--accent); }
.editor .cm-gutters { background: var(--bg); border-right: 0; color: var(--faint); }
.editor .cm-lineNumbers .cm-gutterElement { padding: 0 6px 0 14px; min-width: 40px; }
.editor .cm-activeLine { background: transparent; }
.editor .cm-focused .cm-activeLine { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.editor .cm-activeLineGutter { background: transparent; color: var(--muted); }
.editor .cm-selectionBackground, .editor .cm-focused .cm-selectionBackground, .editor ::selection { background: color-mix(in srgb, var(--accent) 24%, transparent) !important; }
.editor .cm-linked { background: color-mix(in srgb, var(--accent) 8%, transparent); box-shadow: inset 2px 0 0 var(--accent); }
.editor .cm-lint-marker-error, .editor .cm-lint-marker-warning { content: none; }
.editor .cm-lintRange-error { background-image: none; text-decoration: underline wavy var(--bad); text-underline-offset: 3px; }
.editor .cm-lintRange-warning { background-image: none; text-decoration: underline wavy var(--warn); text-underline-offset: 3px; }
.editor .cm-lintRange-info { background-image: none; text-decoration: underline dotted var(--accent); text-underline-offset: 3px; }
.editor .cm-tooltip { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: var(--shadow); color: var(--text); font-family: var(--sans); }
.editor .cm-diagnostic-error { border-left-color: var(--bad); } .editor .cm-diagnostic-warning { border-left-color: var(--warn); }
.editor .cm-foldGutter .cm-gutterElement { color: var(--faint); padding: 0 4px; }
.tok-keyword { color: #c4b5fd; } .tok-string { color: #86efac; } .tok-propertyName { color: #7dd3fc; }
.tok-number, .tok-atom, .tok-bool { color: #fdba74; } .tok-comment { color: var(--faint); font-style: italic; }
.tok-variableName { color: var(--text); } .tok-bracket, .tok-operator, .tok-punctuation { color: var(--faint); }
@media (prefers-color-scheme: light) { .tok-keyword { color: #7c3aed; } .tok-string { color: #15803d; } .tok-propertyName { color: #0369a1; } .tok-number, .tok-atom, .tok-bool { color: #c2410c; } }
.bottom-panel { flex: 0 0 auto; max-height: 34%; display: flex; flex-direction: column; border-top: 1px solid var(--border); background: var(--surface); }
.bp-tabs { display: flex; padding: 0 8px; border-bottom: 1px solid var(--border); }
.bp-tabs button { height: 30px; padding: 0 10px; border: 0; border-bottom: 2px solid var(--accent); background: transparent; font-size: 12px; font-weight: 500; }
.bp-body { overflow: auto; padding: 6px 8px; }
.bp-body .problems { margin: 0; }
.mini { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; background: var(--canvas); }
.split-handle { flex: 0 0 7px; margin: 0 -3px; position: relative; z-index: 3; cursor: col-resize; touch-action: none; }
.split-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 1px; background: var(--border); transition: background .12s, width .12s, left .12s; }
.split-handle:hover::before, .split-handle.dragging::before, .split-handle:focus-visible::before { left: 2px; width: 3px; background: var(--accent); }
.split-handle:focus-visible { outline: none; }
body.resizing, body.resizing * { cursor: col-resize !important; user-select: none !important; }
.mini-tools { display: inline-flex; gap: 2px; margin-left: auto; }
.mini-tools .icon-btn { width: 24px; height: 24px; }
.mini-hint { margin: 0; padding: 6px 12px 8px; font-size: 11.5px; color: var(--faint); border-top: 1px solid var(--border); }
.mini-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.mini-head .link { margin-left: 6px; letter-spacing: 0; text-transform: none; font-size: 12px; }
.mini-world-wrap { position: relative; flex: 1; overflow: hidden; cursor: grab; touch-action: none; }
.mini-world-wrap.panning { cursor: grabbing; }
.mini-world .card, .mini-world .region-tab, .mini-world [data-select] { cursor: pointer; }
.mini-world .card:hover { border-color: var(--accent-line); }
.mini-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: auto; }
.mini-world > * { position: absolute; }
.mini-world .measure { display: none; }
.mini-world .card.linked { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- creation order ---------- */
#view-order { overflow: auto; background: var(--canvas); }
.order { position: relative; padding: 24px 400px 32px 32px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 230px); gap: 0 44px; align-items: start; min-height: 100%; }
.order .wave { display: flex; flex-direction: column; gap: 8px; position: relative; z-index: 1; }
.order .wave-head { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.order .wave-head span { display: block; text-transform: none; letter-spacing: 0; font-weight: 400; }
.order-card { flex-direction: column; gap: 1px; padding: 8px 11px; cursor: pointer; }
.order-card strong { font-size: 13px; }
.order-card.dim { opacity: .4; }
.order-card.chain { border-color: var(--accent-line); }
.order > svg { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.order .kind svg { flex-shrink: 0; }

/* ---------- status bar ---------- */
.statusbar { flex-shrink: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; min-height: 26px; padding: 3px 12px; background: var(--bg); border-top: 1px solid var(--border); font-family: var(--mono); font-size: 11px; color: var(--muted); }
.statusbar span { display: inline-flex; align-items: center; gap: 5px; }
.statusbar .ok { color: var(--good); } .statusbar .bad { color: var(--bad); }
.statusbar .link { font-family: var(--mono); font-size: 11px; }

/* ---------- dialogs ---------- */
dialog { border: 1px solid var(--border-strong); border-radius: 12px; padding: 0; width: min(640px, calc(100vw - 32px)); background: var(--surface); color: var(--text); box-shadow: var(--float); }
dialog.wide { width: min(780px, calc(100vw - 32px)); }
dialog.page { width: min(1180px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
dialog::backdrop { background: rgba(5, 8, 11, .55); backdrop-filter: blur(2px); }
.dialog-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.dialog-body h2 { margin: 0; font-size: 16px; font-weight: 600; flex: 1; }
.dialog-head { display: flex; align-items: center; gap: 8px; }
#import-text { width: 100%; min-height: 220px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--bg); font: 12.5px var(--mono); resize: vertical; color: var(--text); }
#import-text:focus, #picker-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#picker-search { width: 100%; height: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--bg); font-size: 13.5px; color: var(--text); }
.import-error { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--bad-soft); color: var(--bad); font-size: 12.5px; }
.dialog-actions { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.dialog-actions .spacer { flex: 1; }
.file-btn { position: relative; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.picker-list { max-height: min(56vh, 520px); overflow: auto; display: flex; flex-direction: column; gap: 14px; padding-right: 4px; }
.picker-group h3 { margin: 0 0 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.picker-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.pick { all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); }
.pick:hover, .pick:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.pick svg { color: var(--muted); flex-shrink: 0; }
.pick span { min-width: 0; }
.pick b { display: block; font-size: 12.5px; font-weight: 600; }
.pick small { display: block; font: 10.5px var(--mono); color: var(--muted); overflow-wrap: anywhere; }
.lib { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.lib-list { flex: 1 1 280px; display: flex; flex-direction: column; gap: 5px; max-width: 100%; }
.lib-group { margin: 10px 0 2px; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.lib-row { all: unset; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); }
.lib-row:hover { border-color: var(--border-strong); }
.lib-row.chosen { border-color: var(--accent); background: var(--accent-soft); }
.lib-row .grow { flex: 1; min-width: 0; }
.lib-row b { display: block; font-size: 13px; }
.lib-row small { display: block; font: 11px var(--mono); color: var(--muted); }
.lib-row .side { text-align: right; font-size: 11px; flex: none; padding: 0; background: none; border: 0; overflow: visible; }
.lib-detail { flex: 999 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.lib-card { padding: 14px 16px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface-2); }
.lib-card h3 { margin: 0 0 2px; font-size: 17px; }
.lib-layers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.layer { padding: 11px 13px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.layer h4 { margin: 0; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.layer p { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.layer .state { font-size: 12px; color: var(--text); }
.drop-zone { padding: 14px; border-radius: 10px; border: 1px dashed var(--border-strong); display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 12.5px; line-height: 1.5; }
.drop-zone p { flex: 1 1 360px; margin: 0; color: var(--muted); }
.templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.res-type + .lead { margin-top: 8px; }

#toast { position: fixed; bottom: 40px; left: 50%; transform: translate(-50%, 10px); opacity: 0; pointer-events: none; z-index: 50; background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--text); padding: 8px 14px; border-radius: 8px; font-size: 12.5px; box-shadow: var(--shadow); transition: opacity .15s, transform .15s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
.drop-overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, transparent); backdrop-filter: blur(2px); pointer-events: none; }
.drop-overlay div { padding: 18px 26px; border-radius: 12px; border: 2px dashed var(--accent); background: var(--surface); color: var(--accent); font-weight: 600; }

/* ---------- small screens ---------- */
@media (max-width: 1100px) {
  .side { position: absolute; z-index: 9; top: 0; bottom: 0; left: 48px; width: min(260px, calc(100vw - 64px)); box-shadow: var(--float); }
  .body { position: relative; }
  .mini, .split-handle { display: none; }
}
@media (max-width: 760px) {
  .topbar { padding: 6px 10px; }
  .views { order: 9; width: 100%; margin: 0; overflow-x: auto; }
  .views button { height: 36px; }
  .top-actions { margin-left: auto; }
  .top-actions .btn.ghost:not(.problems-btn) { display: none; }
  .engine-pill, .crumb { display: none; }
  .project-name input { width: 110px; }
  .rail { flex-basis: 44px; }
  .inspector { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 55%; }
  .minimap { display: none; }
  .statusbar span:not(:first-child) { display: none; }
}

/* deployed (state) */
.plan-badge.deployed { background: var(--good-soft); color: var(--good); }
.live { display: flex; flex-direction: column; gap: 3px; margin: 0 0 10px; padding: 8px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); }
.live-row { display: flex; gap: 10px; align-items: baseline; font-size: 12px; color: var(--muted); }
.live-row span { flex: 0 0 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-row code { flex: 1; min-width: 0; background: none; padding: 0; color: var(--text); overflow-wrap: anywhere; }

/* environment picker */
.env-pick { display: inline-flex; align-items: center; gap: 0; height: 24px; border: 1px solid var(--border); border-radius: 5px; overflow: hidden; font-size: 11.5px; color: var(--muted); }
.env-pick span { padding: 0 7px; border-right: 1px solid var(--border); font-family: var(--mono); font-size: 11px; height: 100%; display: inline-flex; align-items: center; }
.env-pick select { height: 22px; border: 0; border-radius: 0; background: transparent; padding: 0 6px; font-family: var(--mono); font-size: 11px; color: var(--text); cursor: pointer; }
.env-pick.empty select { color: var(--muted); }
.env-pick:hover { border-color: var(--border-strong); }
.live-row .link { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--faint); white-space: nowrap; }
@media (max-width: 760px) { .env-pick span { display: none; } }

/* export menu */
.menu-wrap { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 250px; padding: 4px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--float); display: flex; flex-direction: column; }
.menu button { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 6px; }
.menu button:hover, .menu button:focus-visible { background: var(--surface-2); }
.menu b { font-size: 12.5px; font-weight: 600; }
.menu small { font-size: 11.5px; color: var(--muted); }
/* in an exported picture the map has no zoom transform and no cursor hints */
.export-root .world { transform-origin: 0 0; }
.export-root .card, .export-root .region-tab { cursor: default; }
.edge.dep { stroke: var(--accent-line); }

/* footer: links and version */
.statusbar .foot-links a, .statusbar .foot-links .link { color: var(--muted); text-decoration: none; font-family: var(--mono); font-size: 11px; }
.statusbar .foot-links a:hover, .statusbar .foot-links .link:hover { color: var(--text); text-decoration: underline; }
.statusbar .version { color: var(--faint); }

/* usage statistics banner */
.consent { position: fixed; left: 60px; bottom: 40px; z-index: 40; width: min(380px, calc(100vw - 24px)); padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--float); }
.consent h2 { margin: 0 0 6px; font-size: 13.5px; font-weight: 600; }
.consent p { margin: 0 0 12px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.consent-actions { display: flex; justify-content: flex-end; gap: 6px; }
.consent-actions .btn { min-width: 84px; justify-content: center; }
@media (max-width: 760px) { .consent { left: 12px; bottom: 36px; } .statusbar .version, .statusbar .foot-links { display: inline-flex !important; } }

/* loading screen until the first diagram is drawn */
.boot { position: fixed; top: 46px; bottom: 26px; left: 0; right: 0; z-index: 45; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 24px; background: var(--canvas); background-image: radial-gradient(circle, color-mix(in srgb, var(--border) 90%, transparent) 1px, transparent 1.2px); background-size: 22px 22px; transition: opacity .25s ease; }
.boot.done { opacity: 0; pointer-events: none; }
.boot-lanes { display: flex; gap: 40px; align-items: flex-start; width: min(900px, 100%); }
.boot-lane { flex: 1; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.boot-lane.wide { flex: 1.6; }
.sk-region { display: flex; flex-direction: column; gap: 14px; padding: 22px 16px 16px; border: 1px dashed var(--border-strong); border-radius: 12px; }
.sk { display: block; border-radius: 9px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 40%, var(--surface) 80%); background-size: 300% 100%; animation: shimmer 1.4s ease-in-out infinite; border: 1px solid var(--border); }
.sk-head { height: 10px; width: 45%; border: 0; border-radius: 4px; }
.sk-card { height: 64px; }
.sk-card.short { height: 46px; width: 80%; }
.boot-text { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13px; color: var(--muted); }
.boot-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sk, .boot-spin { animation: none; } }
@media (max-width: 760px) { .boot-lanes { gap: 12px; } .boot-lane:not(.wide) { display: none; } }

/* without JavaScript */
.noscript { position: fixed; inset: 46px 0 26px; z-index: 60; display: grid; place-items: center; padding: 24px; background: var(--bg); color: var(--muted); font-size: 15px; text-align: center; }
