:root {
  color-scheme:dark;
  --bg:#121319;
  --sheet:#191a23;
  --chrome:#1f202a;
  --code:#12151b;
  --inset:#15161f;
  --stroke:#30313d;
  --stroke-strong:#414250;
  --hover:#272833;
  --text:#f1eff4;
  --muted:#adafbe;
  --subtle:#9396a8;
  --accent:#ff967a;
  --accent-ink:#ffc1b1;
  --accent-border:#5d4146;
  --soft-accent:#30262d;
  --coral-on:#241612;
  --warn:#f7bc78;
  --green:#83ddbc;
  --sans:Inter, 'Segoe UI', system-ui, sans-serif;
  --mono:'IBM Plex Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}
*,*::before,*::after { box-sizing:border-box; }
[hidden] { display:none!important; }
body { margin:0; background:var(--bg); color:var(--text); font:1rem/1.5 var(--sans); }
h1,h2,h3,p { margin:0; }
a { color:inherit; }
button,input,select,textarea { font:inherit; color:inherit; }
button { cursor:pointer; }
button:disabled { opacity:.48; cursor:default; }
:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
code,pre,kbd { font-family:var(--mono); }
.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; }
.skip { position:fixed; z-index:200; top:8px; left:8px; padding:8px; background:var(--bg); transform:translateY(-150%); }
.skip:focus { transform:none; }
.header-content,.page { width:min(1580px,calc(100% - 76px)); margin-inline:auto; }
.brand { display:flex; align-items:center; gap:9px; font-size:1.125rem; font-weight:730; letter-spacing:-.025em; white-space:nowrap; text-decoration:none; }
.brand img { flex:none; }
.brand-for { color:var(--muted); font-weight:520; }
.button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:35px; padding:5px 11px; border:1px solid transparent; text-decoration:none; border-radius:6px; background:transparent; font-size:.875rem; font-weight:630; line-height:1.2; white-space:nowrap; }
.button:hover:not(:disabled) { filter:brightness(1.16); }
.button.quiet { background:var(--chrome); border-color:var(--stroke-strong); color:var(--text); }
.button.secondary { color:var(--accent-ink); background:var(--soft-accent); border-color:var(--accent-border); }
.button.primary { color:var(--coral-on); background:var(--accent); border-color:var(--accent); }
.button.compact { min-height:30px; padding-inline:8px; font-size:.8125rem; }
.button kbd { border:1px solid var(--stroke-strong); padding:1px 4px; border-radius:4px; font:.69rem var(--mono); color:var(--muted); }
.search-icon { display:inline-block; position:relative; width:11px; height:11px; border:1.5px solid currentColor; border-radius:50%; margin-right:3px; }
.search-icon::after { position:absolute; content:''; transform:rotate(46deg); width:5px; height:1.5px; right:-4px; bottom:-2px; background:currentColor; }
.workbench { border:1px solid var(--stroke-strong); background:var(--sheet); border-radius:10px; overflow:hidden; box-shadow:0 16px 50px #0a090da0; }
.bench-head { background:var(--chrome); display:flex; align-items:center; justify-content:space-between; gap:10px; border-bottom:1px solid var(--stroke); padding:0 13px 0 7px; }
.view-tabs,.dock-tabs { display:flex; align-items:stretch; min-width:0; gap:2px; }
.view-tabs button,.dock-tabs button { position:relative; border:0; background:transparent; color:var(--muted); white-space:nowrap; font-size:.875rem; font-weight:630; min-height:43px; padding:0 12px; }
.view-tabs button:hover,.dock-tabs button:hover { color:var(--text); background:var(--hover); }
.view-tabs button[aria-selected="true"],.dock-tabs button[aria-selected="true"] { color:var(--accent-ink); }
.view-tabs button[aria-selected="true"]::after,.dock-tabs button[aria-selected="true"]::after { position:absolute; content:''; height:2px; background:var(--accent); bottom:0; left:10px; right:10px; }
.tab-glyph { font-family:var(--mono); color:var(--accent-ink); margin-right:4px; }
.bench-foot,.engine-status { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:.78rem; }
.status-dot { display:inline-block; flex:none; width:7px; height:7px; background:var(--green); border-radius:50%; }
.bench-body { display:grid; grid-template-columns:230px minmax(0,1fr); }
.workspace-main { min-width:0; background:var(--code); }
.explorer { background:var(--sheet); padding:12px 9px 8px; border-right:1px solid var(--stroke); }
.explorer-head { display:flex; align-items:center; justify-content:space-between; gap:3px; padding:2px 5px 10px; }
.explorer h2,.inspector-title h2 { font-size:.9375rem; font-weight:690; }
#progress-text { color:var(--muted); font:.72rem var(--mono); }
.explorer-section { border-block:1px solid var(--stroke); padding:9px 0 10px; }
.section-label { padding:1px 6px 4px; color:var(--muted); font-size:.8125rem; font-weight:630; }
.scenario-list { display:grid; gap:2px; }
.scenario,.file-node { display:flex; align-items:center; justify-content:flex-start; gap:7px; width:100%; text-align:left; border:1px solid transparent; border-radius:5px; color:var(--muted); background:transparent; min-height:34px; padding:3px 6px; }
.scenario { font-size:.829rem; }
.scenario:hover,.file-node:hover { color:var(--text); background:var(--hover); }
.scenario[aria-current="true"],.file-node[aria-current="true"] { background:var(--soft-accent); color:var(--accent-ink); border-color:var(--accent-border); }
.scenario-bullet { color:var(--subtle); font:.75rem var(--mono); }
.scenario-bullet.done { color:var(--green); }
.project-files { margin-top:9px; }
.project-files summary,.tree-group summary { padding:3px 6px; cursor:pointer; font-size:.82rem; color:var(--muted); }
.project-files > summary { font-weight:650; color:var(--text); }
.tree-group { margin-left:7px; }
.tree-group summary { padding-block:5px; }
.file-node { min-height:27px; font:.74rem var(--mono); padding-left:14px; }
.file-node .file-node-label { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.file-icon { color:#c7b5fb; font:600 .68rem var(--mono); flex:none; }
.file-icon.source { color:var(--green); }
#file-tree { max-height:350px; overflow:auto; scrollbar-width:thin; }
.sql-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(248px,304px); min-height:560px; }
.edit-stack { min-width:0; }
.editor-context,.dock-head,.inspector-title,.bench-foot { display:flex; align-items:center; justify-content:space-between; gap:7px; }
.file-strip { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:7px; min-height:44px; padding-right:7px; background:var(--chrome); border-bottom:1px solid var(--stroke); }
#file-tabs { display:flex; align-self:stretch; overflow-x:auto; overflow-y:hidden; scrollbar-width:thin; }
.file-tab { flex:0 0 auto; position:relative; display:flex; align-items:center; min-width:0; max-width:100%; background:var(--sheet); border-right:1px solid var(--stroke); }
.file-tab.selected { background:var(--chrome); }
.file-tab.selected::after { position:absolute; content:''; height:2px; inset:0 0 auto; background:var(--accent); }
.file-tab button { display:flex; align-items:center; gap:6px; border:0; background:transparent; color:var(--muted); min-height:43px; padding:0 7px 0 10px; font:.77rem var(--mono); }
.file-tab [data-file] { min-width:0; }
.file-tab-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.file-tab.selected button { color:var(--text); }
.file-tab button:hover { background:var(--hover); }
.file-tab button:focus-visible { outline-offset:-2px; }
.file-tab .close-file { flex:none; min-height:29px; padding:0 7px; margin-right:4px; border-radius:4px; color:var(--subtle); font-size:.94rem; }
.run-button { min-height:32px; color:#baf2db; background:#1b3a37; border-color:#365e57; flex:none; }
.run-icon { font-size:.74rem; }
.editor-context { min-height:40px; border-bottom:1px solid var(--stroke); padding:4px 8px 4px 12px; background:var(--inset); }
.file-path { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font:.75rem var(--mono); color:var(--muted); }
.editor-context-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:5px; min-width:0; }
#suggest:not(:disabled) { color:var(--coral-on); background:var(--accent); border-color:var(--accent); }
.editor-host { --editor-background:var(--code); --editor-foreground:var(--text); --editor-cursor:var(--accent); height:clamp(290px,42vh,435px); background:var(--editor-background); }
.editor-loading { display:grid; place-items:center; height:100%; padding:12px; color:var(--muted); font-family:var(--mono); font-size:.87rem; }
.dock { background:var(--inset); border-top:1px solid var(--stroke-strong); }
.dock-head { border-bottom:1px solid var(--stroke); background:var(--chrome); padding-right:7px; }
.dock-tabs button { min-height:38px; font-size:.81rem; padding-inline:9px; }
.count { display:inline-grid; place-items:center; min-width:17px; height:17px; background:#49372e; color:#ffd997; border-radius:9px; font:.68rem var(--mono); padding-inline:3px; }
.dock-panel { height:176px; overflow:auto; scrollbar-width:thin; padding:9px 11px 11px; }
.dock-empty,.query-note { color:var(--muted); font-size:.86rem; }
.dock-empty { display:flex; flex-direction:column; gap:5px; padding:7px 1px; }
.dock-empty strong { color:var(--text); }
.query-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0 0 8px; font-size:.81rem; color:var(--muted); }
.query-toolbar strong { color:var(--text); }
.query-toolbar .metrics { display:flex; gap:7px; flex-wrap:wrap; }
.query-toolbar .metrics span { background:var(--chrome); border:1px solid var(--stroke-strong); border-radius:4px; padding:2px 5px; }
.baseline-compare { margin:0 0 7px; padding:5px 7px; border-left:2px solid var(--accent); background:var(--soft-accent); color:var(--muted); font-size:.84rem; }
.result-table { min-width:100%; border-collapse:collapse; text-align:left; white-space:nowrap; font:.77rem/1.5 var(--mono); color:var(--text); }
.result-table caption { text-align:left; }
.result-table th,.result-table td { min-width:70px; border:1px solid var(--stroke); padding:4px 7px; }
.result-table thead { position:sticky; top:-10px; background:var(--chrome); color:var(--text); }
.result-table tbody tr:nth-child(even) { background:var(--sheet); }
.result-table td.null { color:var(--muted); font-style:italic; }
.problem-row { width:100%; display:flex; gap:7px; align-items:start; text-align:left; background:var(--chrome); border:1px solid var(--stroke-strong); border-radius:5px; padding:7px; margin:0 0 6px; line-height:1.43; color:var(--text); font-size:.84rem; }
.problem-row:hover { background:var(--hover); }
.problem-row.warn { border-color:#645449; color:#ffe0b4; background:#2d292a; }
.problem-icon { font:650 .8rem var(--mono); color:var(--warn); flex:none; margin-top:2px; }
.problem-row small { display:block; color:var(--muted); margin-top:3px; font:.75rem var(--mono); }
.query-error { color:#ffd0cd; border:1px solid #6b4653; border-left-width:3px; border-radius:5px; padding:8px 10px; background:#302633; font-size:.87rem; overflow-wrap:anywhere; }
.inspector { border-left:1px solid var(--stroke); background:var(--sheet); min-width:0; }
.inspector-title { justify-content:flex-start; min-height:44px; padding:5px 11px; border-bottom:1px solid var(--stroke); background:var(--chrome); }
.inspector-title img { border-radius:4px; background:var(--chrome); }
#analysis-status { margin-left:auto; color:var(--green); font:.71rem var(--mono); }
.inspector-content { padding:12px; overflow:auto; max-height:560px; scrollbar-width:thin; overflow-wrap:anywhere; }
.inspector-content h3 { font-size:.95rem; margin:0 0 4px; }
.panel-title { font-size:.99rem; }
.panel-copy { color:var(--muted); font-size:.86rem; line-height:1.5; }
.task-card { background:var(--soft-accent); border:1px solid var(--accent-border); border-radius:6px; padding:10px; margin:0 0 13px; }
.task-card .task-state { display:flex; gap:7px; align-items:center; color:var(--accent-ink); font-size:.76rem; margin-bottom:4px; }
.task-card .check { color:var(--green); }
.panel-actions { display:flex; flex-wrap:wrap; gap:5px; margin-top:9px; }
.inspector .panel-actions button { font-size:.76rem; }
.pill { display:inline-flex; color:#acebd1; background:#1d3838; border:1px solid #416464; font-weight:630; font-size:.76rem; border-radius:4px; padding:2px 6px; margin:2px 0 6px; }
.pill.warning { color:#f9d4a1; background:#382d2d; border-color:#6c5344; }
.expression { display:block; color:var(--text); background:var(--code); border:1px solid var(--stroke-strong); border-radius:5px; font-size:.75rem; padding:7px 8px; white-space:pre-wrap; }
.stats { margin:8px 0; border-block:1px solid var(--stroke); padding:4px 0; }
.stats div { display:flex; justify-content:space-between; align-items:baseline; gap:6px; padding:4px 0; font-size:.83rem; }
.stats dt { color:var(--muted); }
.stats dd { margin:0; text-align:right; font:.76rem var(--mono); color:var(--text); }
.panel-details { border-top:1px solid var(--stroke); margin-top:9px; padding-top:7px; font-size:.83rem; }
.panel-details summary,.test-skips summary { cursor:pointer; }
.panel-details p { color:var(--muted); margin-top:5px; }
.model-columns { padding:0; margin:8px 0; list-style:none; }
.model-columns li { display:flex; justify-content:space-between; gap:6px; border-bottom:1px solid var(--stroke); padding:5px 0; font:.74rem var(--mono); }
.model-columns span { color:var(--muted); }
.bench-foot { justify-content:flex-start; background:var(--chrome); border-top:1px solid var(--stroke); min-height:32px; padding:5px 9px; }
.status-file { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.editor-position { margin-left:auto; flex:none; font:.73rem var(--mono); }
#view-mode { flex:none; border-left:1px solid var(--stroke-strong); padding-left:7px; }
#file-dialog { width:min(620px,calc(100vw - 26px)); border:1px solid var(--stroke-strong); border-radius:9px; background:var(--sheet); color:var(--text); padding:13px; box-shadow:0 22px 65px #0009; }
#file-dialog::backdrop { background:#0b0b10c2; }
.dialog-head { display:flex; justify-content:space-between; gap:8px; align-items:center; margin-bottom:10px; }
.dialog-head h2 { font-size:1rem; }
#file-search, .tests-controls select { color:var(--text); background:var(--inset); border:1px solid var(--stroke-strong); border-radius:5px; padding:7px 9px; width:100%; }
.file-options { overflow:auto; max-height:280px; margin-top:8px; }
.file-option { width:100%; text-align:left; display:flex; gap:8px; align-items:center; border:0; border-bottom:1px solid var(--stroke); background:var(--chrome); padding:7px 8px; min-height:38px; }
.file-option:hover { background:var(--soft-accent); }
.file-option strong { font:.81rem var(--mono); overflow-wrap:anywhere; }
.file-option small { color:var(--muted); margin-left:auto; text-align:right; font-size:.74rem; }
.tests-view { padding:18px; min-height:560px; }
.tests-heading h2 { font-size:1.26rem; margin-bottom:3px; }
.tests-heading p,.test-note { color:var(--muted); font-size:.87rem; }
.tests-controls { display:flex; flex-wrap:wrap; gap:9px; margin:13px 0; }
.tests-controls label { display:grid; gap:3px; color:var(--text); font-size:.86rem; }
.tests-controls select { max-width:270px; }
.tests-grid { display:grid; grid-template-columns:minmax(0,.95fr) minmax(0,1.2fr); gap:10px; align-items:start; }
.test-column { min-width:0; padding:11px; border:1px solid var(--stroke); border-radius:7px; background:var(--sheet); }
.test-column h3 { margin:0 0 4px; font-size:.95rem; }
.test-candidate { display:flex; align-items:start; gap:8px; margin:7px 0; padding:8px; background:var(--hover); border:1px solid var(--stroke-strong); border-radius:5px; cursor:pointer; }
.test-candidate input { margin-top:4px; accent-color:var(--accent); }
.test-candidate code,.test-skips code { display:block; color:var(--text); font:.77rem/1.45 var(--mono); overflow-wrap:anywhere; }
.test-candidate .test-note { display:block; margin-top:3px; font-size:.78rem; }
.test-skips { padding-top:8px; margin-top:8px; border-top:1px solid var(--stroke); }
.test-skips p { margin:6px 0; }
.test-skips b { color:var(--warn); font-size:.81rem; }
.yaml-heading { display:flex; justify-content:space-between; align-items:center; gap:5px; }
.yaml-code { margin:6px 0 0; padding:9px; background:var(--inset); border:1px solid var(--stroke-strong); border-radius:5px; color:var(--text); font:.78rem/1.5 var(--mono); overflow:auto; max-height:340px; tab-size:2; }
.dock pre { max-height:126px; }
@media(max-width:1250px) {
  .header-content,.page { width:calc(100% - 36px); }
  .bench-body { grid-template-columns:191px minmax(0,1fr); }
  .sql-layout { grid-template-columns:minmax(0,1fr) 255px; }
}
@media(max-width:1030px) {
  .bench-body { grid-template-columns:164px minmax(0,1fr); }
  .sql-layout { grid-template-columns:minmax(0,1fr) 224px; }
  .editor-context-actions .button { font-size:.73rem; }
  .inspector-content { padding:9px; }
}
@media(max-width:800px) {
  .header-content,.page { width:calc(100% - 23px); }
  .shortcut-trigger kbd { display:none; }
  .bench-body { grid-template-columns:1fr; }
  .explorer { border-right:0; border-bottom:1px solid var(--stroke); padding:6px 8px; }
  .explorer-head,.section-label,.project-files { display:none; }
  .explorer-section { padding:0; border:0; }
  .scenario-list { display:flex; overflow:auto; padding:2px; }
  .scenario { width:auto; flex:none; white-space:nowrap; }
}
@media(max-width:620px) {
  .brand img { width:27px; height:27px; }
  .brand { font-size:1rem; gap:6px; }
  .view-tabs button { padding-inline:7px; font-size:.81rem; min-height:38px; }
  .tab-glyph { display:none; }
  .sql-layout,.tests-grid { grid-template-columns:1fr; }
  .editor-host { height:330px; }
  .inspector { border-left:0; border-top:1px solid var(--stroke); }
  .inspector-content { max-height:none; }
  .editor-context { flex-wrap:wrap; }
  .editor-context-actions { margin-left:auto; }
  .file-path { font-size:.69rem; }
  .dock-panel { height:158px; }
  .engine-status { display:none; }
}
