* { box-sizing: border-box; }
html { color-scheme: light dark; }
html, body { height: 100%; }
body { margin: 0; display: flex; flex-direction: column; color: var(--ink); background: var(--bg); font: var(--text-base)/1.5 var(--font-sans); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
#bar { height: 52px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 14px; }
.pill { display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 12px 0 8px; border-radius: 10px; text-decoration: none; color: inherit; font-weight: 600; }
.pill:hover { background: var(--surface); }
.mark { width: 22px; height: 22px; }
.desc { color: var(--ink-3); font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.live { font: 500 var(--text-mono) var(--font-mono); letter-spacing: var(--tracking-mono); text-transform: uppercase; color: var(--pos); }
#body { flex: 1; min-height: 0; display: flex; }
#rail { width: 76px; flex: none; display: flex; flex-direction: column; gap: 6px; padding: 8px 6px; overflow-y: auto; }
#rail button { all: unset; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 10px; font-size: 11.5px; text-align: center; color: var(--ink-2); overflow-wrap: anywhere; }
#rail button:focus-visible { outline: 2px solid var(--accent); }
#rail .ico { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--surface); font-size: 16px; }
#rail button[aria-current="true"] { color: var(--ink); }
#rail button[aria-current="true"] .ico { background: var(--accent); color: var(--accent-ink); }
#stage { flex: 1; min-width: 0; position: relative; margin: 0 8px 8px 0; border-radius: 14px; overflow: hidden; background: var(--bg-1); box-shadow: var(--glass-shadow); }
#rail[hidden] + #stage { margin-left: 8px; }
#stage iframe, #stage .out { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--bg-1); }
.out { display: grid; place-items: center; padding: 24px; text-align: center; }
.page { position: absolute; inset: 0; overflow-y: auto; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 44px 28px 80px; }
.wrap.narrow { max-width: 620px; }
.eyebrow { font: 500 var(--text-mono) var(--font-mono); letter-spacing: var(--tracking-mono); text-transform: uppercase; color: var(--accent-text); margin: 0 0 6px; }
h1 { font-size: var(--text-xl); font-weight: 600; letter-spacing: -0.01em; margin: 0 0 8px; }
h2 { font-size: var(--text-md); font-weight: 600; margin: 0 0 12px; }
.lead { color: var(--ink-2); max-width: 66ch; margin: 0 0 26px; }
.muted { color: var(--ink-3); font-size: var(--text-sm); margin: 0 0 10px; }
.surface { background: var(--surface); box-shadow: var(--glass-shadow); border-radius: 14px; }
.pane { padding: 18px 20px; margin-top: 16px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two .pane { margin-top: 0; }
@media (max-width: 780px) { .two { grid-template-columns: 1fr; } #rail { width: 62px; } .wrap { padding: 28px 16px 60px; } .desc { display: none; } }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 26px; }
.card { display: block; padding: 14px 16px; border-radius: 14px; background: var(--surface); box-shadow: var(--glass-shadow); text-decoration: none; color: inherit; }
.card:hover { box-shadow: var(--glass-shadow), 0 0 0 1px var(--accent-glow); }
.card .t { font-weight: 600; }
.card .d { color: var(--ink-2); font-size: var(--text-sm); }
.code { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--bg-1); border: 1px solid var(--border); font: var(--text-mono)/1.6 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.primary { height: 34px; padding: 0 16px; border: none; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 600; cursor: pointer; }
.primary:disabled { opacity: .5; cursor: default; }
.link-btn { display: inline-flex; align-items: center; text-decoration: none; }
.ghost { height: 34px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; background: transparent; cursor: pointer; white-space: nowrap; }
.ghost:hover { border-color: var(--border-strong); }
.quiet { color: var(--ink-3); font-size: var(--text-sm); }
.field { display: block; width: 100%; min-width: 0; height: 36px; padding: 0 12px; margin-bottom: 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-1); outline: none; }
.field:focus { border-color: var(--accent); }
.row-form { display: flex; gap: 8px; margin-top: 10px; }
.row-form .field { margin: 0; }
.row-form .short { max-width: 150px; }
.group { font: 500 var(--text-mono) var(--font-mono); letter-spacing: var(--tracking-mono); text-transform: uppercase; color: var(--ink-3); margin: 14px 0 4px; }
.group:first-child { margin-top: 0; }
.tool { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); }
.group + .tool, #b-picked .tool:first-child { border-top: none; }
.tool .ico { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--bg-2); }
.tool .text { flex: 1; min-width: 0; }
.tool .name { font-weight: 600; }
.tool .what { color: var(--ink-2); font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini { width: 28px; height: 28px; flex: none; border-radius: 8px; border: 1px solid var(--border); background: transparent; cursor: pointer; }
.mini:disabled { opacity: .35; cursor: default; }
.mini.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.bad { color: var(--neg); }
.good { color: var(--pos); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
