:root {
  color-scheme: dark;
  --bg: #151617;
  --tile: #1c1e20;
  --raised: #25282b;
  --surface: #17191b;
  --border: #363b41;
  --text: #eceef1;
  --muted: #a8b0ba;
  --accent: #a9c6e8;
  --accent-dim: #273241;
  --accent-border: #516681;
  --on-accent: #182330;
  --accent-hover: #bdd5ef;
  --border-strong: #616a75;
  --success: #95c7a6;
  --warn: #efc174;
  --danger: #f0a19d;
  --grid-fine: rgb(225 232 240 / 1.6%);
  --grid-coarse: rgb(225 232 240 / 2.5%);
  --mono: "Cascadia Code", Consolas, monospace;
  --sans: Geologica, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, var(--grid-fine) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-fine) 1px, transparent 1px),
    linear-gradient(to right, var(--grid-coarse) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-coarse) 1px, transparent 1px);
  background-size: 34px 34px, 34px 34px, 170px 170px, 170px 170px;
  color: var(--text);
  font: 14px/1.5 var(--sans);
}
button, select, input, textarea { font: inherit; }
button, select, summary { cursor: pointer; }
button:disabled, select:disabled { cursor: default; opacity: .46; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.icon { display: inline-block; flex: none; inline-size: 16px; block-size: 16px; vertical-align: middle; }
.muted { color: var(--muted); }

.workspace-shell { width: min(1512px, calc(100% - 64px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--border); background: #191b1d; }
.site-header-inner { min-height: 63px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; gap: 10px; align-items: center; font-size: 20px; font-weight: 660; }
.brand-icon { display: block; flex: none; }
.site-header nav { align-self: stretch; display: flex; align-items: center; gap: 26px; font-size: 12px; }
.site-header nav a { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.site-header nav [aria-current="page"] { align-self: stretch; color: var(--text); border-bottom: 2px solid var(--accent); padding-top: 2px; }
.site-header nav .icon { width: 14px; height: 14px; }
.nav-workspace .icon { display: none; }

.tile { min-width: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--tile); }
.btn, .select, .input { min-inline-size: 0; min-height: 34px; padding: 5px 10px; color: var(--text); border: 1px solid var(--border); border-radius: 6px; background: var(--raised); font-size: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; font-weight: 520; }
.btn:hover:not(:disabled), .select:hover:not(:disabled) { border-color: var(--border-strong); }
.btn.active, .btn[aria-pressed="true"] { color: var(--accent); background: var(--accent-dim); border-color: var(--accent-border); }
.btn.primary { color: var(--on-accent); background: var(--accent); border-color: var(--accent); font-weight: 650; }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn.danger { color: var(--danger); }
.icon-btn { width: 34px; padding: 0; }

@media (max-width: 950px) {
  .workspace-shell { width: calc(100% - 36px); }
}
@media (max-width: 720px) {
  :root {
    --grid-fine: rgb(225 232 240 / 1.2%);
    --grid-coarse: rgb(225 232 240 / 1.8%);
  }
}
@media (max-width: 420px) {
  .workspace-shell { width: calc(100% - 24px); }
  .site-header nav { gap: 16px; }
  .site-header nav a { min-width: 44px; justify-content: center; }
  .nav-workspace .icon { display: inline-block; }
  .nav-workspace span, .nav-docs span { display: none; }
}
