/* ---- tokens/tokens.css ---- */
/* ==========================================================================
   TOKENS: the only place a colour, size or font is written as a value.
   Everything else in ui/ refers to these (test/ui.test.mjs fails on a hex or
   rgb() anywhere else). Two modes: dark (the default, from the Radiant docs
   site) and light. An agency's brand overrides --accent per mode
   (ui/theme.mjs, /brand/<id>.css); every tint of the accent is mixed from it,
   so one colour per mode is all a brand needs.
   ========================================================================== */
/* Accent palettes. "radiant" is the gold of the Radiant splash (branding/radiant-
   dissolve): as drawn on dark; darker in light mode so text on white reads
   (5.5:1). "classic" is the accent before it. Which one: ui/core/accent.mjs
   (one line to roll back). An agency's brand still overrides --accent. */
:root {
  --accent-radiant-dark: #e4ba73;
  --accent-radiant-light: #8a6116;
  --accent-classic-dark: #f08a4b;
  --accent-classic-light: #2b5bd7;
  --accent-pick-dark: var(--accent-radiant-dark);
  --accent-pick-light: var(--accent-radiant-light);
}
:root[data-accent="classic"] {
  --accent-pick-dark: var(--accent-classic-dark);
  --accent-pick-light: var(--accent-classic-light);
}
/* the splash's night sky, behind the animation */
:root { --splash-bg: #04060c; }

:root {
  /* type */
  --font-sans: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --text-xs: 11px; --text-sm: 12.5px; --text-md: 14px; --text-lg: 15px; --text-xl: 22px; --text-2xl: 24px;
  --weight-strong: 600; --weight-heavy: 700;
  /* space */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px;
  /* shape */
  --radius-sm: 6px; --radius-md: 8px; --radius-lg: 10px; --radius-pill: 999px;
  /* layout */
  --side-w: 240px; --rail-w: 56px; --drawer-w: 340px; --ws-tab: 22px; --top-h: 56px; --content-max: 1240px; --ws-list: 300px; --ws-views: 200px; --ws-aside: 250px;
  /* A workspace column's fold tab: 12px down, 26px tall, plus room; the middle column's scroll starts below it. */
  --ws-tab-clear: calc(12px + 26px + 6px);
}

/* dark: the default, from docs.radnt.cc */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15161a;
  --surface: #1c1d22;
  --surface-2: #23252c;
  --ink: #ecebe6;
  --ink-2: #c8c6bf;
  --muted: #8e8c85;
  --line: #2b2d34;
  --line-strong: #3a3d46;
  --accent: var(--accent-pick-dark);
  --on-accent: #15161a;
  --good: #9be0b0;
  /* warn is yellow and fire is red-orange, so neither reads as the orange accent */
  --warn: #e9c84a;
  --bad: #ff8fa8;
  --fire: #ff6a4d;
  --ems: #6cc6d6;
  --insp: #c4b1f5;
  --inverse: #ecebe6;
  --on-inverse: #15161a;
  --shadow: 0 1px 2px #00000040, 0 1px 3px #00000059;
  --tint: 18%;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --ink: #14171f;
  --ink-2: #5b6472;
  --muted: #7d8694;
  --line: #e4e7ec;
  --line-strong: #c4cbd6;
  --accent: var(--accent-pick-light);
  --on-accent: #ffffff;
  --good: #166b3c;
  --warn: #8a5200;
  --bad: #b42318;
  --fire: #a8380b;
  --ems: #1f7a8c;
  --insp: #6941c6;
  --inverse: #1d2939;
  --on-inverse: #ffffff;
  --shadow: 0 1px 2px #1018280f, 0 1px 3px #10182814;
  --tint: 12%;
}

/* tints, mixed from the colours above in either mode */
:root {
  --accent-soft: color-mix(in srgb, var(--accent) var(--tint), var(--surface));
  --good-soft: color-mix(in srgb, var(--good) var(--tint), var(--surface));
  --warn-soft: color-mix(in srgb, var(--warn) var(--tint), var(--surface));
  --bad-soft: color-mix(in srgb, var(--bad) var(--tint), var(--surface));
  --fire-soft: color-mix(in srgb, var(--fire) var(--tint), var(--surface));
  --ems-soft: color-mix(in srgb, var(--ems) var(--tint), var(--surface));
  --insp-soft: color-mix(in srgb, var(--insp) var(--tint), var(--surface));
  --accent-line: color-mix(in srgb, var(--accent) 45%, var(--surface));
  --veil: color-mix(in srgb, var(--bg) 94%, transparent);
}

/* ---- tokens/base.css ---- */
/* BASE: element defaults, from tokens only. */
* { box-sizing: border-box; }
body { margin: 0; font: var(--text-md)/1.45 var(--font-sans); color: var(--ink); background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
h1 { font-size: var(--text-xl); margin: 0 0 2px; }
h3 { margin: 0; font-size: var(--text-lg); }
h4 { margin: 0 0 var(--space-2); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); text-align: left; font-weight: var(--weight-strong); padding: var(--space-2) 10px; border-bottom: 1px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Shown only when the one script is not running (it sets .js on <html>). */
.js .nojs-only { display: none; }

/* ---- atoms/atoms.css ---- */
/* ATOMS: the smallest parts. No layout of their own beyond themselves. */

/* button: .btn, .btn--primary, .btn--ghost, .btn--sm */
.btn { display: inline-block; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: var(--radius-md); padding: 7px 13px; cursor: pointer; font-weight: var(--weight-strong); text-decoration: none; }
.btn:hover { border-color: var(--line-strong); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn--primary:hover { filter: brightness(1.07); }
.btn--ghost { border-color: transparent; background: none; color: var(--accent); }
.btn--sm { padding: var(--space-1) 10px; font-size: var(--text-sm); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* pill: a status. Tones: neutral, good, warn, bad, accent, fire, ems, insp, live */
.pill { font-size: 12px; font-weight: var(--weight-strong); padding: 2px 9px; border-radius: var(--radius-pill); display: inline-block; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); }
/* A neutral pill keeps a hairline so it reads on a raised row (a selected queue row is surface-2 too). */
.pill[class*="pill--"] { box-shadow: none; }
.pill--good { background: var(--good-soft); color: var(--good); }
.pill--warn { background: var(--warn-soft); color: var(--warn); }
.pill--bad { background: var(--bad-soft); color: var(--bad); }
.pill--accent { background: var(--accent-soft); color: var(--accent); }
.pill--fire { background: var(--fire-soft); color: var(--fire); }
.pill--ems { background: var(--ems-soft); color: var(--ems); }
.pill--insp { background: var(--insp-soft); color: var(--insp); }
.pill--live { background: var(--good); color: var(--surface); }

/* badge: a count */
.badge { font-size: 11.5px; font-weight: var(--weight-strong); padding: 1px 7px; border-radius: var(--radius-pill); background: var(--bad-soft); color: var(--bad); }

/* tag: marks a part as staff-only or client-only */
.tag { font-size: var(--text-xs); font-weight: var(--weight-heavy); letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 5px; margin-left: var(--space-2); vertical-align: middle; }
.tag--staff { background: var(--accent-soft); color: var(--accent); }
.tag--client { background: var(--fire-soft); color: var(--fire); }

.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: var(--weight-heavy); font-size: 12px; }
.mark { width: 30px; height: 30px; border-radius: var(--radius-md); display: grid; place-items: center; color: var(--on-accent); background: var(--accent); font-weight: var(--weight-heavy); }

/* controls */
.control { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-2) 10px; background: var(--surface); }
.control:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.control--inline { width: auto; padding: 6px 10px; }
.control:disabled { opacity: .7; }

/* text */
.note { color: var(--ink-2); font-size: var(--text-sm); }
.num { font-variant-numeric: tabular-nums; }
.strong { font-weight: var(--weight-strong); }
.big { font-size: var(--text-2xl); font-weight: var(--weight-heavy); }
.good { color: var(--good); }

/* handles */
/* Always in the layout (it is a grid track), but inert and invisible until the script is there. */
.splitter { display: block; flex: none; background: transparent; position: relative; z-index: 8; visibility: hidden; pointer-events: none; }
.js .splitter { visibility: visible; pointer-events: auto; }
.splitter--x { width: 7px; margin: 0 -3px; cursor: col-resize; }
.splitter--y { height: 7px; margin: -3px 0; cursor: row-resize; }
.splitter::after { content: ""; position: absolute; background: var(--accent); opacity: 0; transition: opacity .15s; }
.splitter--x::after { top: 0; bottom: 0; left: 3px; width: 1px; }
.splitter--y::after { left: 0; right: 0; top: 3px; height: 1px; }
.splitter:hover::after, .splitter:focus-visible::after, .resizing .splitter::after { opacity: 1; }
.splitter:focus-visible { outline: none; }
.resizing, .resizing * { cursor: inherit; user-select: none; }

/* The docs site's edge toggle: a small round chevron straddling the panel's
   edge, just below the top bar. 26x26, so its own size is the hit area. */
.edgetab { position: absolute; top: calc(var(--top-h) + 14px); z-index: 9; width: 26px; height: 26px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 50%; color: var(--ink-2); font-size: 15px; line-height: 1; text-decoration: none; box-shadow: var(--shadow); transition: color .15s, border-color .15s; }
.edgetab span { position: relative; top: -1px; }
/* Above the resize handle it sits on (z 8), with a little more room to hit than it shows. */
.edgetab::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; }
.edgetab:hover, .edgetab:focus-visible { color: var(--accent); border-color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .edgetab, .splitter::after { transition: none; } }
.edgetab--right { right: -13px; }
.edgetab--left { left: -13px; }

/* ---- molecules/molecules.css ---- */
/* MOLECULES: a few atoms working as one. */

/* row: title, sub-line, things on the right */
.row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); color: inherit; }
.row:first-child { border-top: 0; }
.row__main { flex: 1; min-width: 0; }
.row__title { font-weight: var(--weight-strong); }
.row__sub { color: var(--ink-2); font-size: var(--text-sm); }
a.row:hover { background: var(--surface-2); }

/* field: a label over a value or a control */
.field__label { display: block; font-size: var(--text-xs); color: var(--muted); margin-bottom: 2px; letter-spacing: .03em; text-transform: uppercase; }
.field__value { padding: 2px 0 6px; color: var(--ink); font-size: var(--text-lg); }
label.field__label { text-transform: none; letter-spacing: 0; font-size: var(--text-sm); color: var(--ink-2); font-weight: var(--weight-strong); }
.field__hint { font-size: 12px; color: var(--muted); margin-top: 3px; }
.field--wide { grid-column: 1 / -1; }

/* tile: a number that opens what is behind it */
.tile { display: block; padding: 14px var(--space-4); color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
a.tile:hover { border-color: var(--line-strong); }
.tile__label { color: var(--ink-2); font-size: var(--text-sm); }
.tile__value { font-size: var(--text-2xl); font-weight: var(--weight-heavy); margin: 2px 0; }
.tile__sub { font-size: var(--text-sm); color: var(--ink-2); }

/* stat: a figure on a card */
.stat__label { color: var(--ink-2); font-size: var(--text-sm); }

.page-header { margin-bottom: 18px; }
.page-header__lede { color: var(--ink-2); margin: 0; }
.page-header--actions { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.page-header__actions { display: flex; align-items: center; gap: var(--space-2); }
.crumb { font-size: var(--text-sm); color: var(--muted); margin-bottom: 6px; }

.explain { background: var(--bg); border-radius: var(--radius-md); padding: var(--space-2) 10px; color: var(--ink-2); font-size: var(--text-sm); margin-top: var(--space-2); }
.empty { padding: 28px; text-align: center; color: var(--ink-2); }

.inline-form { display: flex; gap: 6px; align-items: center; }
.inline-form--full { width: 100%; margin-bottom: 10px; }
.inline-form--full .control { flex: 1; }

.tabs { display: flex; gap: var(--space-1); flex-wrap: wrap; }
.tabs__tab { border: 1px solid var(--line); background: var(--surface); color: inherit; border-radius: var(--radius-pill); padding: 3px 10px; font-size: var(--text-sm); text-align: center; }
.tabs__tab--on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; margin-bottom: var(--space-3); }
.segmented__item { padding: var(--space-2) var(--space-4); font-weight: var(--weight-strong); color: var(--ink-2); background: var(--surface); }
.segmented__item--on { background: var(--ink); color: var(--bg); }

.stages { display: flex; margin: var(--space-3) 0 var(--space-4); }
.stages__stage { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; font-size: 12px; padding: 6px var(--space-1); border-bottom: 3px solid var(--line); color: var(--muted); }
.stages__stage--done { border-color: var(--accent-line); color: var(--ink-2); }
.stages__stage--done::before { content: "✓ "; color: var(--accent); }
.stages__stage--now { border-color: var(--accent); color: var(--accent); font-weight: var(--weight-heavy); }

.callout { border-radius: var(--radius-lg); padding: var(--space-3) 14px; margin-bottom: 14px; }
.callout b { display: block; }
.callout--warn { background: var(--warn-soft); }
.callout--neutral { background: var(--surface-2); }

.drop { border: 1.5px dashed var(--line-strong); border-radius: var(--radius-lg); padding: 18px; text-align: center; color: var(--ink-2); background: var(--surface-2); flex: 1; }

.prefix { display: flex; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--surface); }
.prefix__label { padding: var(--space-2) 10px; background: var(--bg); color: var(--ink-2); border-right: 1px solid var(--line); font-weight: var(--weight-strong); }
.prefix .control { border: 0; border-radius: 0; }

.theme-toggle { font-size: var(--text-sm); color: var(--ink-2); }
.theme-toggle a { color: var(--accent); }

.check { display: flex; gap: var(--space-2); align-items: center; margin: var(--space-4) 0 0; }
.form-error { color: var(--bad); margin: var(--space-2) 0 0; }
a.segmented__item { color: var(--ink-2); }
a.segmented__item.segmented__item--on { color: var(--bg); }
.segmented__item--off { opacity: .45; }

.linklist { display: grid; gap: 2px; }
.linklist__item { display: flex; justify-content: space-between; gap: var(--space-2); padding: 6px 10px; border-radius: var(--radius-md); color: var(--ink-2); }
.linklist__item:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.linklist__item--on, .linklist__item--on:hover { background: var(--surface); color: var(--ink); font-weight: var(--weight-strong); box-shadow: inset 3px 0 0 var(--accent), 0 0 0 1px var(--line); text-decoration: none; }
.linklist__count { color: var(--muted); font-variant-numeric: tabular-nums; }

.picker__caption { color: var(--muted); font-size: var(--text-sm); }
.picker__select { border-color: transparent; background: var(--surface-2); font-weight: var(--weight-strong); }
.picker__select:hover { border-color: var(--line-strong); }

.split { display: inline-flex; position: relative; }
.split__main { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.split__more > summary { list-style: none; cursor: pointer; }
.split__more > summary::-webkit-details-marker { display: none; }
.split__toggle { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 1px solid var(--veil); padding-left: 8px; padding-right: 8px; }
.split:not(:has(.split__more)) .split__main { border-radius: var(--radius-md); }
.split__menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 11; min-width: 200px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md); box-shadow: var(--shadow); padding: var(--space-1); display: grid; }
.split__item { padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); color: var(--ink); }
.split__item:hover { background: var(--surface-2); }

/* ---- organisms/organisms.css ---- */
/* ORGANISMS: sections of a page. */

/* card */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.card__head { padding: 14px var(--space-4) 0; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.card__aside { color: var(--muted); font-size: var(--text-sm); }
.card__body { padding: var(--space-3) var(--space-4) var(--space-4); }
.card + .card--stack, .card--stack { margin-bottom: var(--space-3); }

/* data table */
.table__num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; max-width: 100%; }
/* In a workspace column every cell stays on one line, rows the same height; long text (wrap) is cut short. Elsewhere tables wrap as usual. */
.workspace .table-wrap th, .workspace .table-wrap td { white-space: nowrap; }
.workspace .table-wrap td.table__wrap { max-width: 16em; overflow: hidden; text-overflow: ellipsis; }
/* In a workspace column every pixel counts: tighter cells. */
.workspace .table-wrap th, .workspace .table-wrap td { padding-left: 8px; padding-right: 8px; }
.workspace .table-wrap th:first-child, .workspace .table-wrap td:first-child { padding-left: 4px; }

/* side navigation */
/* z-index above the top bar (5): sticky makes the menu its own stacking context, so its edge toggle can only sit over the page if the whole menu does. */
/* The menu and the assistant sit above the resize handles (z 8), so their edge toggles take every click on their face. */
.sidenav { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 9; }
.sidenav__brand { padding: var(--space-4) var(--space-4) var(--space-3); display: flex; align-items: center; gap: 10px; }
.sidenav__brand b { display: block; font-size: var(--text-lg); }
.sidenav__brand small { color: var(--muted); font-size: 12px; }
.sidenav__nav { padding: var(--space-1) 10px; overflow: auto; flex: 1; }
.sidenav__section { display: flex; width: 100%; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--radius-md); font-weight: var(--weight-strong); margin-top: 1px; color: inherit; }
.sidenav__section:hover { background: var(--bg); }
.sidenav__icon { width: 18px; display: inline-flex; justify-content: center; color: var(--muted); }
.icon { display: block; flex: none; }
/* The docs site's tree: a small triangle before a group, turned when open. */
/* A small, quiet arrow: it says the section opens, without competing with the label. */
.sidenav__chev { order: -1; width: 0; height: 0; opacity: .45; border-left: 4px solid var(--muted); border-top: 3px solid transparent; border-bottom: 3px solid transparent; font-size: 0; transition: transform .15s; }
.sidenav__group[open] > .sidenav__section .sidenav__chev { transform: rotate(90deg); }
.sidenav__group > summary { list-style: none; cursor: pointer; }
.sidenav__group > summary::-webkit-details-marker { display: none; }
.sidenav__group > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sidenav__closedcount { margin-left: auto; }
.sidenav__group[open] > summary .sidenav__closedcount { display: none; }
.sidenav__section:hover .sidenav__chev { opacity: .8; }
.sidenav__section .badge { margin-left: auto; }
.sidenav__section--on, .sidenav__section--on .sidenav__icon { color: var(--accent); }
.sidenav__section--solo.sidenav__section--on { background: var(--accent-soft); }
.sidenav__items { margin: 1px 0 4px 17px; border-left: 1px solid var(--line); padding-left: 6px; }
.sidenav__item { display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 4px 8px; border-radius: 6px; color: var(--ink-2); }
.sidenav__item:hover { background: var(--surface-2); color: var(--ink); }
.sidenav__item--on, .sidenav__item--on:hover { background: var(--accent-soft); color: var(--accent); font-weight: var(--weight-strong); }
.sidenav__foot { padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-2); display: grid; gap: 6px; }

/* top bar */
.topbar { height: var(--top-h); background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: var(--space-3); padding: 0 20px; position: sticky; top: 0; z-index: 5; }
.topbar__grow { flex: 1; }
.topbar__org { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 5px 10px; font-weight: var(--weight-strong); }

/* banners across the top of the main column */
.banner { padding: 6px 20px; font-size: var(--text-sm); display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.banner--warn { background: var(--surface); color: var(--warn); font-size: var(--text-xs); padding: 3px 20px; border-bottom: 1px solid var(--line); }
.banner--inverse { background: var(--inverse); color: var(--on-inverse); }
.banner--inverse .btn { padding: 3px 10px; }

/* activity log */
.log { margin-top: 10px; }
.log__entry { padding: var(--space-2) 0; border-top: 1px solid var(--line); font-size: var(--text-sm); }
.log__entry:first-child { border-top: 0; }
.log__who { font-weight: var(--weight-strong); }
.log__when { color: var(--muted); }

/* the queue list */
/* tier 1: which list. Set off on the page background. */
.qlist__picker { background: var(--bg); border-bottom: 1px solid var(--line); padding: var(--space-3) 10px; }
.qlist__label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 10px var(--space-2); }
/* tier 2: the open list, named. */
.qlist__open { padding: 14px 14px 10px; display: grid; gap: var(--space-2); border-bottom: 1px solid var(--line); }
.qlist__heading { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); font-size: var(--text-lg); font-weight: var(--weight-heavy); }
.qlist__count { font-size: var(--text-sm); font-weight: normal; color: var(--muted); white-space: nowrap; }
.qlist__tabs { padding-top: 2px; }
.qlist__item { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); color: inherit; }
.qlist__item:hover { background: var(--surface-2); }
.qlist__item--on { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.qlist__title { font-weight: var(--weight-strong); display: flex; justify-content: space-between; gap: 6px; }
.qlist__why { font-size: var(--text-sm); margin-top: 3px; display: flex; gap: var(--space-1); flex-wrap: wrap; }

/* commit bar: actions pinned to the bottom of a record */
.commit { position: sticky; bottom: 0; background: var(--veil); border-top: 1px solid var(--line); padding: var(--space-3) 0; display: flex; justify-content: space-between; align-items: center; margin-top: 20px; gap: var(--space-2); }

/* placeholder for an embed not connected yet */
.sigma-frame { display: block; width: 100%; height: 72vh; min-height: 520px; border: 0; border-radius: var(--radius-lg); background: var(--surface); }
.frame { height: 300px; border-radius: var(--radius-lg); background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 10px, var(--bg) 10px, var(--bg) 20px); display: grid; place-items: center; color: var(--ink-2); }

/* the side navigation as an icon rail */
.sidenav--rail { align-items: center; }
.sidenav--rail .sidenav__brand { padding: var(--space-4) 0 var(--space-3); justify-content: center; }
.sidenav--rail .sidenav__nav { padding: var(--space-1) 6px; width: 100%; }
.sidenav--rail .sidenav__section { justify-content: center; padding: 10px 0; position: relative; }
.sidenav--rail .sidenav__icon { width: auto; }
.sidenav__railfoot { width: 100%; padding: var(--space-2) 6px var(--space-4); border-top: 1px solid var(--line); }
.sidenav--rail .sidenav__icon .icon { width: 19px; height: 19px; }
.sidenav--rail .sidenav__section { padding: 8px 0; }
.sidenav--rail .sidenav__section .badge { position: absolute; top: 2px; right: 2px; margin: 0; font-size: 10px; padding: 0 5px; }
.sidenav--rail .sidenav__section--on { background: var(--surface-2); }
/* Folded: a section opens its pages in a panel over the content, beside the rail, not pinned. */
.sidenav--rail .sidenav__nav { overflow: visible; }
.sidenav__fly { position: relative; }
.sidenav__fly > summary { list-style: none; cursor: pointer; }
.sidenav__fly > summary::-webkit-details-marker { display: none; }
.sidenav__fly[open] > summary { background: var(--tint); }
.sidenav__flyout { position: absolute; left: calc(100% + 10px); top: 0; z-index: 11; min-width: 200px; max-height: calc(100vh - 24px); overflow: auto; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md); box-shadow: var(--shadow); }
.sidenav__flyhead { padding: 6px 10px 8px; font-weight: var(--weight-strong); color: var(--ink); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.sidenav__flyout .sidenav__item { white-space: nowrap; }

/* the list column split: the picker above, the open list below, each scrolling */
.qlist__picker { flex: none; height: var(--qlist-picker-h, auto); max-height: 70%; overflow: auto; }
.qlist__rest { flex: 1; min-height: 0; overflow: auto; }

/* The menu's toggle sits at the bottom of the menu, open or folded, so it never moves; the rail keeps room for it under the icons. */
.sidenav > .edgetab { top: auto; bottom: 18px; }
.sidenav--rail .sidenav__nav { padding-bottom: 52px; }
.qlist__tools { flex: none; padding: var(--space-3) 14px 0; display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }

/* the views column (Attio-style): All, then saved views */
.views { padding: var(--space-3) 10px; display: grid; gap: 2px; }
.views__item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--radius-md); color: var(--ink-2); flex: 1; min-width: 0; border: 1px solid transparent; }
.views__icon { color: var(--muted); display: inline-flex; flex: none; }
.views__name { flex: 1; min-width: 0; line-height: 1.3; }
.views__count { flex: none; font-size: var(--text-xs); color: var(--muted); background: var(--surface-2); border-radius: var(--radius-pill); padding: 1px 7px; font-variant-numeric: tabular-nums; }
.views__group { display: grid; gap: 2px; }
.views__item--on .views__icon, .views__item--on .views__count { color: var(--accent); }
.views__item:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.views__item--all { font-weight: var(--weight-strong); color: var(--ink); }
.views__item--on, .views__row--on .views__item { background: var(--accent-soft); color: var(--accent); font-weight: var(--weight-strong); }
.views__label { font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: var(--space-3) 10px var(--space-1); }
.views__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.views__row { display: flex; align-items: center; gap: 2px; border-radius: var(--radius-sm); }
.views__row.is-dragging { opacity: .5; }
.views__where { padding: var(--space-4) 10px 0; font-size: var(--text-xs); }
.views__row.is-over { box-shadow: inset 0 2px 0 var(--accent); }
.views__grip { color: var(--muted); cursor: grab; font-size: var(--text-xs); padding: 0 2px; visibility: hidden; }
.js .views__grip { visibility: visible; }
.views__move { display: flex; opacity: 0; }
.views__row:hover .views__move, .views__row:focus-within .views__move { opacity: 1; }
.views__move .btn { padding: 0 6px; }
.views__empty { padding: 0 10px; }

/* the filter bar over a list */
/* the demo bar (staff): who and which view, across the top (not the filter bar, below) */
.demobar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: 6px var(--space-5); background: var(--bg); color: var(--ink-2); border-bottom: 1px solid var(--line); font-size: var(--text-sm); }
.demobar__title { color: var(--accent); }
.demobar__title { text-transform: uppercase; letter-spacing: .08em; font-size: var(--text-xs); }
.demobar__field { display: inline-flex; align-items: center; gap: 6px; }
.demobar__field .control { padding: 3px 8px; font-size: var(--text-sm); color: var(--ink); background: var(--surface); border-color: var(--line-strong); }
.demobar__note { margin-left: auto; color: var(--muted); }
.demobar__note b { color: var(--ink-2); }

/* widgets on a configurable page (Home) */
.widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: var(--space-4); align-items: start; }
.widget { min-width: 0; display: grid; gap: 6px; }
.widget--wide { grid-column: 1 / -1; }
.widget--editing { outline: 1px dashed var(--line-strong); outline-offset: 4px; border-radius: var(--radius-lg); }
.widget__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); font-size: var(--text-sm); color: var(--muted); }
.widget__controls { display: flex; gap: 2px; }
.widget-picker { border: 1px dashed var(--accent-line); background: var(--accent-soft); border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-4); display: grid; gap: var(--space-2); }
.widget-picker__head { font-weight: var(--weight-strong); }
.widget-picker__from { margin-top: var(--space-2); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.widget-picker__item { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 6px 0; border-top: 1px solid var(--line); }

/* the list toolbar: view menu, settings, search; sort, filter, chips; unsaved changes */
.lbar { display: grid; gap: var(--space-2); margin-bottom: var(--space-3); }
.lbar__row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.lbar__grow { flex: 1; }
.lbar__drop { position: relative; }
.lbar__btn { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: var(--radius-sm); color: var(--ink-2); font-size: var(--text-sm); white-space: nowrap; }
.lbar__btn::-webkit-details-marker { display: none; }
.lbar__btn:hover, .lbar__drop[open] > .lbar__btn { background: var(--tint); color: var(--ink); }
.lbar__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.lbar__icon { color: var(--muted); display: inline-flex; }
.lbar__chev { color: var(--muted); font-size: 10px; }
.lbar__row:first-child > .lbar__drop:first-child > .lbar__btn { color: var(--ink); font-weight: var(--weight-strong); font-size: var(--text-md); }
.lbar__menu { position: absolute; left: 0; top: calc(100% + 4px); z-index: 11; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-md); box-shadow: var(--shadow); padding: 6px; display: grid; gap: 2px; min-width: 220px; max-width: min(340px, calc(100vw - 32px)); }
.lbar__menu--right { left: auto; right: 0; }
.lbar__menu-head { padding: 6px 8px; color: var(--accent); font-weight: var(--weight-strong); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.lbar__menu-sub { padding: 6px 8px 2px; font-size: var(--text-xs); color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.lbar__menu .inline-form .btn { width: 100%; justify-content: flex-start; }
.lbar__rule { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.lbar__item { display: block; padding: 6px 8px; border-radius: var(--radius-sm); color: var(--ink-2); font-size: var(--text-sm); }
a.lbar__item:hover { background: var(--tint); color: var(--ink); }
.lbar__item--on { color: var(--accent); font-weight: var(--weight-strong); }
.lbar__item--off { color: var(--muted); cursor: default; }
.lbar__form { display: flex; gap: 6px; padding: 2px 4px 6px; }
.lbar__form .control { padding: 4px 8px; font-size: var(--text-sm); }
.lbar__danger { color: var(--bad); }
.lbar__search .control { width: 180px; padding: 4px 8px; font-size: var(--text-sm); }
.lbar__filters { display: grid; gap: 6px; padding: 4px; }
.lbar__field { display: grid; grid-template-columns: 5.5em 1fr; align-items: center; gap: 6px; font-size: var(--text-sm); color: var(--muted); }
.lbar__field .control { width: 100%; padding: 4px 8px; font-size: var(--text-sm); }
.lbar__chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent); border-radius: var(--radius-pill); font-size: var(--text-sm); white-space: nowrap; }
.lbar__chip:hover { border-color: var(--accent); }
.lbar__unsaved { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); justify-content: space-between; padding: 6px 6px 6px 12px; border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: var(--radius-md); font-size: var(--text-sm); }
.lbar__unsaved-actions { display: flex; align-items: center; gap: 4px; }
.lbar__drop--plain > .lbar__btn { color: var(--ink); }
.lbar__drop--plain .lbar__chev { display: none; }

/* the header row over a list or an item */
.dheader { display: flex; align-items: center; gap: var(--space-4); }
.dheader__back { color: var(--ink-2); white-space: nowrap; }
.dheader__back:hover { color: var(--accent); }
.dheader__title { flex: 1; min-width: 0; }
.dheader__title h2 { margin: 0; font-size: var(--text-lg); }
.dheader__actions { display: flex; gap: 6px; }

/* the right drawer: the assistant */
.drawer { position: sticky; top: 0; height: 100vh; background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; z-index: 9; }
.drawer > .edgetab { top: auto; bottom: 18px; }
.drawer--rail { align-items: center; padding-top: var(--space-4); }
.drawer__railmark { color: var(--accent); font-size: var(--text-lg); }
.drawer__head { padding: var(--space-4); border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; }
.drawer__messages { flex: 1; overflow: auto; padding: var(--space-4); display: grid; gap: var(--space-3); align-content: start; }
.drawer__msg { padding: var(--space-2) var(--space-3); border-radius: var(--radius-lg); background: var(--surface-2); color: var(--ink-2); font-size: var(--text-sm); }
.drawer__compose { padding: var(--space-3); border-top: 1px solid var(--line); display: flex; gap: 6px; }

/* the data table's rows open their item */
tr.is-link { cursor: pointer; }
tr.is-link:hover td { background: var(--surface-2); }
tr:target td { background: var(--accent-soft); }

/* a dialog over the page */
.modal { position: fixed; inset: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 70%, transparent); display: grid; place-items: center; padding: var(--space-4); }
.modal__box { position: static; margin: 0; width: min(520px, 100%); background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: var(--space-5); display: grid; gap: var(--space-3); }
.modal__box h2 { margin: 0; font-size: var(--text-lg); }
.modal__form { display: grid; gap: var(--space-3); }
.modal__drop { display: block; cursor: pointer; }
.modal__drop input { margin-top: var(--space-2); }
.modal__actions { display: flex; justify-content: flex-end; gap: var(--space-2); }

/* ---- templates/catalog.css ---- */
/* The design-system catalog (Settings › Design system). */
.catalog__toc { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-4); }
.catalog__entry { margin-bottom: var(--space-4); }
.catalog__meta { color: var(--muted); font-size: var(--text-sm); font-family: var(--font-mono); }
.catalog__variants { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-3); margin-top: var(--space-3); }
.catalog__variants--wide { grid-template-columns: 1fr; }
.catalog__variant { border: 1px dashed var(--line); border-radius: var(--radius-md); padding: var(--space-3); background: var(--bg); min-width: 0; overflow: auto; }
.catalog__label { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); margin-bottom: var(--space-2); }
.catalog__frame { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; max-height: 320px; }
.catalog__frame .shell, .catalog__frame .auth { min-height: 0; }
.catalog__frame .sidenav { position: static; height: auto; }
.catalog__frame--splash .splash { position: relative; inset: auto; height: 280px; z-index: auto; }
.catalog__frame .workspace { height: 220px; flex: none; }
.catalog__frame .shell__main--flush { height: 260px; }
.catalog__variant pre { white-space: pre-wrap; font-family: var(--font-mono); font-size: var(--text-xs); margin: 0; }
.catalog__swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-2); }
.swatch { height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.catalog__handle { position: relative; display: flex; height: 60px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.catalog__handle--x { justify-content: center; }
.catalog__handle--y { flex-direction: column; justify-content: center; }
.catalog__handle .splitter { visibility: visible; }
.catalog__handle .splitter::after { opacity: 1; }
.catalog__edge { position: relative; height: 80px; margin: 0 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.catalog__frame .sidenav { position: relative; }
.catalog__drawer { height: 360px; position: relative; display: flex; justify-content: flex-end; }
.catalog__drawer .drawer { position: relative; height: 100%; width: 300px; }
.catalog__modal { position: relative; height: 320px; }
.catalog__modal .modal { position: absolute; }

/* ---- templates/templates.css ---- */
/* TEMPLATES: page skeletons. */

/* the signed-in shell: side navigation, then the main column */
.shell { display: grid; grid-template-columns: var(--side-w) auto minmax(0, 1fr); min-height: 100vh; }
.shell--rail { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
.shell__main { display: flex; flex-direction: column; min-width: 0; }
/* A flush page (a workspace) fills the window: the page itself never scrolls, only its columns. */
.shell__main--flush { height: 100vh; overflow: hidden; }
.shell__content { padding: 18px var(--space-5) 80px; max-width: var(--content-max); width: 100%; }
.shell__content--flush { padding: 0; max-width: none; flex: 1; min-height: 0; display: flex; }

/* grids */
.grid { display: grid; gap: var(--space-4); align-content: start; }
.grid--2 { grid-template-columns: 1fr 1fr; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2-1 { grid-template-columns: 2fr 1fr; }
.grid--fields { grid-template-columns: 1fr 1fr; gap: 10px 18px; }
.stack > * + * { margin-top: 14px; }
.section { margin-top: 18px; }

/* the three-column workspace: list, record, side panel */
.workspace { display: grid; grid-template-columns: var(--ws-list) auto minmax(0, 1fr) auto var(--ws-aside); flex: 1; min-height: 0; width: 100%; }
.workspace--aside-rail { grid-template-columns: var(--ws-list) auto minmax(0, 1fr) var(--ws-tab); }
/* A list page's left column is only its views: narrower, and sized on its own. */
.workspace--views { grid-template-columns: var(--ws-views) auto minmax(0, 1fr) auto var(--ws-aside); }
.workspace--views.workspace--aside-rail { grid-template-columns: var(--ws-views) auto minmax(0, 1fr) var(--ws-tab); }
/* No right column (a list page): the middle takes the rest, and its scroll starts at the top. */
.workspace--no-aside { grid-template-columns: var(--ws-list) auto minmax(0, 1fr); }
.workspace--views.workspace--no-aside { grid-template-columns: var(--ws-views) auto minmax(0, 1fr); }
.workspace--no-aside .workspace__scroll { margin-top: 0; padding-top: 20px; }
.workspace__list { border-right: 1px solid var(--line); background: transparent; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.workspace__main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.workspace__scroll { flex: 1; min-height: 0; overflow: auto; margin-top: var(--ws-tab-clear); padding: 0 var(--space-5) var(--space-5); }
.workspace__footer { border-top: 1px solid var(--line); background: var(--surface); padding: var(--space-3) var(--space-5); }
.workspace__footer .commit { margin: 0; padding: 0; border: 0; background: none; position: static; }
.workspace__aside { border-left: 1px solid var(--line); background: transparent; position: relative; min-height: 0; display: flex; flex-direction: column; }
.workspace__aside-scroll { flex: 1; min-height: 0; overflow: auto; padding: var(--space-4); }

/* the splash after sign-in: the animation on its night sky */
.splash { position: fixed; inset: 0; background: var(--splash-bg); display: grid; place-items: center; z-index: 30; }
.splash__video, .splash__still { width: 100%; height: 100%; object-fit: contain; background: var(--splash-bg); grid-area: 1 / 1; }
.splash__still[hidden], .splash__video[hidden] { display: none; }
.splash__skip { position: absolute; right: var(--space-5); bottom: var(--space-5); color: var(--muted); font-size: var(--text-sm); }
.splash__skip:hover, .splash__skip:focus-visible { opacity: 1; color: var(--ink); }
/* The dissolve into the app: the splash fades out, the next page fades in from the same sky. */
.splash { transition: opacity .45s ease-in; }
.splash--leaving { opacity: 0; }
html.arriving { background: var(--splash-bg); }
html.arriving body { animation: arrive .9s ease-out both; }
@keyframes arrive { from { opacity: 0; } to { opacity: 1; } }
/* The splash's fades stay with reduced motion: opacity only, nothing moves (remote desktops set reduced motion for every browser). */

/* A top-level page (Home, an overview), set like a website: the same parts at a
   readable size, with room. Only the type and spacing tokens change here, so
   every component follows. */
.shell__content--roomy {
  --text-xs: 12.5px; --text-sm: 14.5px; --text-md: 16.5px; --text-lg: 19px; --text-xl: 34px; --text-2xl: 28px;
  --space-3: 14px; --space-4: 20px; --space-5: 32px; --space-6: 40px;
  font-size: var(--text-md); line-height: 1.55;
  padding: var(--space-6) var(--space-6) 96px;
  max-width: 1320px;
}
/* Figures in a card wrap onto the next line rather than run out of it. */
.shell__content--roomy .grid--3, .shell__content--roomy .grid--2 { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.shell__content--roomy .page-header { margin-bottom: var(--space-5); }
.shell__content--roomy .page-header__lede { font-size: var(--text-lg); max-width: 62ch; }
.shell__content--roomy .card__head { padding: var(--space-4) var(--space-5) 0; }
.shell__content--roomy .card__body { padding: var(--space-3) var(--space-5) var(--space-5); }
.shell__content--roomy .row { padding: 14px 0; }
.shell__content--roomy .widgets { gap: var(--space-5); }

/* a page in two columns (Home: news top right) */
.page-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem); gap: var(--space-5); align-items: start; }
.page-cols__side { display: grid; gap: var(--space-4); }
.page-cols__main > .widgets { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
@media (max-width: 1100px) { .page-cols { grid-template-columns: minmax(0, 1fr); } .page-cols__side { order: -1; } }

/* an item's facts: label beside value */
.facts { display: grid; gap: var(--space-2); }
.facts__title { margin: 0 0 var(--space-1); }
.facts__list { margin: 0; display: grid; }
.facts__row { display: grid; grid-template-columns: minmax(7em, 40%) 1fr; gap: var(--space-3); padding: 9px 0; border-top: 1px solid var(--line); align-items: baseline; }
.facts__row:first-child { border-top: 0; }
.facts__row dt { color: var(--muted); font-size: var(--text-sm); }
.facts__row dd { margin: 0; overflow-wrap: anywhere; }

/* where a fix lives; a check's button jumps here */
.fix { border-top: 1px solid var(--line); padding: var(--space-4) 0; scroll-margin-top: var(--space-5); }
.fix:first-of-type { border-top: 0; }
.fix__title { margin: 0 0 4px; }
.fix:target { background: var(--accent-soft); border-radius: var(--radius-md); padding: var(--space-4); }

/* the sign-in card, alone in the middle */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--space-4); }
.auth__card { width: 100%; max-width: 24rem; padding: var(--space-6); }
.auth__card h1 { margin-bottom: 20px; }
.auth__card .control { margin-bottom: var(--space-1); }
.auth__card .btn { width: 100%; margin-top: var(--space-3); }
.auth__card .explain, .auth__card .theme-toggle { display: block; margin-top: var(--space-4); }
.workspace__aside--rail { padding: 0; position: relative; overflow: visible; }
.workspace__aside--rail .edgetab--left { left: -2px; }
/* Inside the workspace a column starts below the top bar, so its toggles sit near the column's own top: both sides, list and side panel. */
.workspace__list > .edgetab, .workspace__aside > .edgetab { top: 12px; }
.workspace__list { position: relative; }


/* the right drawer (the assistant): open, or folded to a rail */
.shell--drawer { grid-template-columns: var(--side-w) auto minmax(0, 1fr) auto var(--drawer-w); }
.shell--drawer-rail { grid-template-columns: var(--side-w) auto minmax(0, 1fr) var(--rail-w); }
.shell--rail.shell--drawer { grid-template-columns: var(--rail-w) minmax(0, 1fr) auto var(--drawer-w); }
.shell--rail.shell--drawer-rail { grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--rail-w); }

/* the main content area: a header row over the three detail columns */
.workspace-frame { display: flex; flex-direction: column; flex: 1; min-height: 0; width: 100%; }
.workspace-frame__header { flex: none; border-bottom: 1px solid var(--line); background: var(--surface); padding: var(--space-3) var(--space-5); }
.workspace-frame > .workspace { flex: 1; min-height: 0; }
.padded { padding: var(--space-4); display: grid; gap: var(--space-4); align-content: start; }

/* ---- generated: token swatches ---- */
.swatch--bg { background: var(--bg); }
.swatch--surface { background: var(--surface); }
.swatch--surface-2 { background: var(--surface-2); }
.swatch--ink { background: var(--ink); }
.swatch--ink-2 { background: var(--ink-2); }
.swatch--muted { background: var(--muted); }
.swatch--line { background: var(--line); }
.swatch--line-strong { background: var(--line-strong); }
.swatch--accent { background: var(--accent); }
.swatch--on-accent { background: var(--on-accent); }
.swatch--good { background: var(--good); }
.swatch--warn { background: var(--warn); }
.swatch--bad { background: var(--bad); }
.swatch--fire { background: var(--fire); }
.swatch--ems { background: var(--ems); }
.swatch--insp { background: var(--insp); }
.swatch--inverse { background: var(--inverse); }
.swatch--on-inverse { background: var(--on-inverse); }
.swatch--accent-soft { background: var(--accent-soft); }
.swatch--good-soft { background: var(--good-soft); }
.swatch--warn-soft { background: var(--warn-soft); }
.swatch--bad-soft { background: var(--bad-soft); }
.swatch--fire-soft { background: var(--fire-soft); }
.swatch--ems-soft { background: var(--ems-soft); }
.swatch--insp-soft { background: var(--insp-soft); }
.swatch--accent-line { background: var(--accent-line); }
.swatch--veil { background: var(--veil); }
