/* The runner's region: one pane at a time (the page's tabs pick it). KiteRooms' light palette; text ≥ 4.5:1, marks ≥ 3:1. */
:root {
  --bg1: #fbfafd; --bg2: #ffffff; --bg3: #efedf4; --line: #e3e0ea; --edge: #8a8596;
  --t1: #1f2125; --t2: #34373c; --t3: #50545c; --t4: #5f636b;
  --accent: #6a4fae; --accent-soft: #ede7f9; --ok: #23683f; --bad: #b0322a;
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
  --ui: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg1); color: var(--t2); font: 13px/1.45 var(--ui); overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--t4); }
.grow { flex: 1; display: flex; }
.runner { height: 100%; }
.pane { display: none; height: 100%; min-height: 0; }
.runner[data-show=preview] .preview, .runner[data-show=request] .request, .runner[data-show=terminal] .terminal { display: grid; }
.preview { grid-template-rows: 38px minmax(0, 1fr); }
.address { display: flex; align-items: center; gap: 2px; padding: 0 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--t3); cursor: pointer; }
.icon-btn:hover { background: var(--bg3); color: var(--t1); }
.icon-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.url { flex: 1; display: flex; height: 26px; padding: 0 9px; border: 1px solid var(--edge); border-radius: 13px; background: var(--bg2); }
.url input { flex: 1; border: 0; outline: 0; background: transparent; font: 12px var(--mono); }
.frame-wrap { position: relative; margin: 0 8px 8px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
#frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.empty { position: absolute; inset: 0; display: grid; place-content: center; gap: 2px; text-align: center; background: var(--bg2); color: var(--t3); }
.empty p { margin: 0; }
.runner.serving .empty { display: none; }
.request { grid-template-rows: auto auto auto minmax(0, 1fr); gap: 8px; padding: 10px; }
.req-line { display: flex; gap: 6px; }
.req-line select, .req-line input, #req-body { width: 100%; font: 12px var(--mono); border: 1px solid var(--edge); border-radius: 6px; background: var(--bg2); outline: 0; }
.req-line select { height: 28px; padding: 0 6px; font-weight: 700; color: #5a3f9e; }
.req-line input { height: 28px; padding: 0 8px; }
#req-body { height: 84px; padding: 8px; resize: vertical; display: block; }
.btn { height: 28px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--t1); background: var(--t1); color: #fff; font-weight: 600; cursor: pointer; }
.req-meta { display: flex; gap: 10px; font-size: 12px; }
#req-status.ok { color: var(--ok); font-weight: 650; } #req-status.bad { color: var(--bad); font-weight: 650; }
.req-response { margin: 0; padding: 10px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--bg2); font: 12px/1.55 var(--mono); white-space: pre-wrap; word-break: break-word; }
.terminal { padding: 6px 0 0 12px; background: #fff; }
#terminal { height: 100%; min-width: 0; overflow: hidden; }
#terminal .xterm { height: 100%; }
#terminal .xterm-viewport { background: transparent !important; }
#terminal .xterm-rows .xterm-dim { color: #5f636b !important; }
.blocked { color: var(--bad); }
.runner.blocked-preview #blocked { display: grid; }
.runner.blocked-preview .empty:not(.blocked) { display: none; }
