/* ── base.css — the shared MFE skin: tokens, boot card, shell chrome, buttons, spinner ──
   Every app-plane MFE (prism, appstore, …) carried these 37 lines VERBATIM in its own
   index.html; a token tweak had to be made N times and silently missed N-1. Link this as
   ./mfe-common/base.css (DOCUMENT-relative — a root-absolute /mfe-common/ would escape a
   path-mounted app, the same bug the import law forbids) BEFORE the app's own <style>, so an
   app can still override any token. App-specific tokens (sunburst stage, store tones) stay in
   the app. Palette --k-* colours the ontology layers, outermost first. */
:root{
  /* ── THE FIRST PAINT IS THE SETTLED PAINT ────────────────────────────────────────────────────────────────────────
     Everything from here to the end of the alias list is design-tokens.mjs's own output for the platform theme, so
     the frame the browser paints before lib/design.mjs appends <style id="design-tokens"> is the frame it keeps.
     Before this, these were literals written by hand: the brand still carried the pre-2026-11-04 brown while the
     generator had moved to the n.watch warm grey, 15 roles the rules below READ were declared nowhere at all (a bare
     var() with no declaration is invalid at computed-value time, so cards lost their ground, hairlines fell back to
     currentColor and radii collapsed to 0), and 24 aliases disagreed with the role they alias.

     THE SHAPE IS THE GENERATOR'S, NOT A COPY OF ITS VALUES: a ROLE carries the literal, an ALIAS is var(--<role>) —
     exactly what cssVarsOf emits. So an alias cannot drift from its role again, and the dark block below re-values
     only the roles: every alias re-resolves through it, because a custom property substitutes where it is USED.
     Keep it that way. If a role's value changes, it changes in design-tokens.mjs and is copied here, never the
     reverse (scripts/design/ and tests/unit-design-contrast.test.mjs group C hold this to account). */

  /* roles — design-tokens.mjs ROLES, light */
  --bg-primary:#f6f4ef;--bg-card:#fffdf8;--bg-card-hover:#f3eee4;--bg-card-2:rgba(0,0,0,.04);--bg-input:#fffdf8;
  --border:#e7dece;--border-strong:#d6c8ae;--brand:#8a8078;--brand-2:#a08a68;--brand-bg:#ece9e4;
  --brand-soft:rgba(138,128,120,.12);--brand-hover:#6f665e;--brand-ink:#ffffff;--brand-ring:rgba(138,128,120,.18);
  --text-primary:#241a10;--text-secondary:#68573a;--text-tertiary:#776445;--error:#c0392b;--error-bg:#fbeae7;
  --success:#42703a;--success-bg:#e9f3ec;--warning:#8d5f14;--warning-bg:#f6ecd8;
  --shadow-float:0 6px 20px rgba(60,44,28,.10);
  --shadow-card:0 1px 2px rgba(36,26,16,.05), 0 2px 10px rgba(36,26,16,.05);--card-border:transparent;
  /* the filled control's resolved pair (design-tokens.mjs controlPair): a hand-written control cannot reach a ramp */
  --brand-control:#6c645d;--brand-control-ink:#fffdf8;
  /* the chosen tab's underline (design-tokens.mjs tabLineOf): the brand where it holds 3:1 on the card, else the ink */
  --tab-line:#8a8078;

  /* aliases — the plane's hand-grown vocabulary, each pointing AT ITS ROLE (design-tokens.mjs ALIASES). Every one is
     still declared: shell.css and the views read these names, and nothing is renamed or removed here. */
  --bg:var(--bg-primary);--panel:var(--bg-card);--surface:var(--bg-card);--card:var(--bg-card);--paper:var(--bg-card);
  --muted-bg:var(--bg-card-hover);--bg-2:var(--bg-card-hover);--card-2:var(--bg-card-2);--line:var(--border);
  --line2:var(--border-strong);--accent:var(--brand);--go:var(--brand);--accent2:var(--brand-2);
  --accent-2:var(--brand-2);--go-bg:var(--brand-bg);--accent-soft:var(--brand-soft);--accent-ink:var(--brand-ink);
  --ink:var(--text-primary);--muted:var(--text-secondary);--ink-3:var(--text-tertiary);--danger:var(--error);
  --err:var(--error);--gap:var(--error);--gap-bg:var(--error-bg);--ok:var(--success);--ok-bg:var(--success-bg);
  --warn:var(--warning);--warn-bg:var(--warning-bg);--float:var(--shadow-float);

  --mono:ui-monospace,"IBM Plex Mono","SF Mono",Menlo,Consolas,monospace;
  --font-sans:"Plex","IBM Plex Sans",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  --font-brand:"Plex",var(--font-sans);
  /* the brand WORDMARK face (rounded-geometric, Neutrino) — Quicksand 700 is bundled inline in fonts.css; scoped to
     the wordmark (.brandname) so headings/stats keep the UI face. Mirrors the theme's wordmark_font token. */
  /* the generator's DEFAULT_WORDMARK_FONT verbatim, not ...,"Plex",var(--font-sans): the rendered face was always
     Quicksand (bundled inline in fonts.css) so the old tail never showed, but it made the first paint and the settled
     paint differ on one property, which is exactly what this block exists to prevent. */
  --wordmark-font:'Quicksand','Varela Round',ui-rounded,'Plex',system-ui,sans-serif;
  --k-kernel:#3a2718;--k-platform:#5a3c22;--k-fabric:#7c552e;--k-app:#9e703c;--k-surface:#bf8f56;--k-realization:#d8b07d;--k-instances:#eed6ac;
  /* THE TYPE SCALE (design-tokens.mjs typeScaleOf / TYPE_SCALE_CSS): fallbacks until the token block lands, the same
     derivation from --font-size. Body 16 · secondary 14 · caption 13 (the smallest text anywhere) · 18 · 22; titles 28 · 22 · 18; the display 36 (the home greeting) */
  --font-size:16px;--line-height:1.5;--lh-heading:1.35;
  --fs-xs:max(13px,calc(var(--font-size) - 3px));--fs-sm:calc(var(--font-size) - 2px);--fs-md:var(--font-size);
  --fs-lg:calc(var(--font-size) + 2px);--fs-xl:calc(var(--font-size) + 6px);
  --fs-h1:calc(var(--font-size) + 12px);--fs-h2:calc(var(--font-size) + 6px);--fs-h3:calc(var(--font-size) + 2px);
  --fs-display:calc(var(--font-size) + 20px);
  --fs-figure:var(--fs-h1);--fs-table:var(--fs-sm);   /* a key figure on a tile · a table's cells and heads */
  /* --radius-md is read BARE nine times in this file, so without a fallback here every one of those corners was
     square until the token block landed (border-radius falls to its initial 0, not to something near-right). The rest
     of the generated scale is safe without a declaration because each use carries its own inline fallback —
     var(--control-h,38px), var(--motion-fast,180ms), var(--radius-lg,14px) — which is why only the radii are added. */
  --radius-sm:8px;--radius-md:10px;--radius-lg:14px;--radius-pill:999px;   /* the pill: every control's shape (design-tokens PILL_RADIUS) */
  --agent-pinned-w:400px;   /* the assistant's column when it is pinned beside the page (views/assistant.mjs sets it while pinned) */
  /* The spacing scale, for the same reason as the radii: `.rt-detail-head` reads gap:var(--space-sm) var(--space-md)
     bare, and an undeclared length collapses a gap to 0 rather than to something near-right. The whole set is
     declared, not only the two read today — the radii were added for exactly this and the next bare use arrived two
     commits later (scaleOf: space_unit 4, comfortable steps 1·2·4·6·8). */
  --space-xs:4px;--space-sm:8px;--space-md:16px;--space-lg:24px;--space-xl:32px;
  /* --shadow is the ONE role the generator deliberately does not emit (design-tokens.mjs cssVarsOf: it is the login
     card's lift, which the login page reads from the answer directly, and the plane is flat), so this value is the
     plane's own and is NOT a drift: in-page surfaces carry no shadow; only floating layers lift (--float). */
  --shadow:none;
}
:root[data-mode="dark"]{
  /* THE ROLES, RE-VALUED FOR A DARK GROUND — design-tokens.mjs ROLES, dark (Mantine's dark scale with the brand
     lifted for contrast). The generated block still wins by order; these are what a first visit with no cached block
     paints, and they now match it exactly.

     ONLY THE ROLES ARE HERE. Every alias above is var(--<role>), and a custom property substitutes where it is used,
     so each one re-resolves through this block on its own — the pattern this file already relied on for --surface and
     --brand. Repeating the aliases here is what let thirteen of them drift from their role's dark value.

     Status hues are LIFTED rather than inverted: #c0392b on #242424 is barely legible, and a warning nobody can read
     is a worse failure than a warning that is the wrong shade. */
  --bg-primary:#242424;--bg-card:#2e2e2e;--bg-card-hover:#3b3b3b;--bg-card-2:rgba(255,255,255,.05);--bg-input:#2e2e2e;
  --border:#424242;--border-strong:#696969;--brand:#b9afa5;--brand-2:#cdbfae;--brand-bg:rgba(185,175,165,.16);
  --brand-soft:rgba(185,175,165,.24);--brand-hover:#cdc4bb;--brand-ink:#1f1f1f;--brand-ring:rgba(185,175,165,.32);
  --text-primary:#C9C9C9;--text-secondary:#a9a9a9;--text-tertiary:#9a9a9a;--error:#ff6b6b;
  --error-bg:rgba(255,107,107,.14);--success:#51cf66;--success-bg:rgba(81,207,102,.14);--warning:#fcc419;
  --warning-bg:rgba(252,196,25,.14);--shadow-float:0 6px 20px rgba(0,0,0,.55);--shadow-card:none;
  --card-border:#3b3b3b;
  /* the filled control in the dark: a PALE ground with DARK ink — Phase 2's decision, and the reason the label is not
     white here (design-tokens.mjs controlPair + autoContrast). Do not swap these back. */
  --brand-control:#aea8a3;--brand-control-ink:#241a10;
  --tab-line:#b9afa5;
  --shadow:none;   /* not emitted by the generator; see the light block */
}
/* ── THE FRAME CONTRACT — one set of numbers every app lines up with ──
   The shell draws one frame: a header row (--shell-header-h) that runs from the rail's logo cell across the top bar with
   one continuous bottom border, the rail (--shell-rail-w) under its logo cell, and the footer band. An app that has its
   own side panel puts it flush against the rail at --shell-panel-w, on the chrome ground (--shell-chrome-bg), with one
   divider (--shell-divider) on its right; its page area pads by --shell-gutter (sides) and --shell-gutter-y (top), and the
   side panel's top padding is the same --shell-gutter-y, so the panel's title and the page's title share a line.
   --shell-content-h is the height between the header and the footer band (a sticky panel's height).
   The components that apply it: views/page.mjs — Page, PageHeader, CardGrid, PanelLayout, SideLink — and app-nav.mjs AppNav. An app
   that draws its own panel reads these variables instead of numbers of its own. shell.mjs HEADER_H is --shell-header-h. */
:root{
  --shell-header-h:56px;--shell-rail-w:80px;--shell-rail-pad:16px;--shell-panel-w:248px;
  --shell-gutter:16px;--shell-gutter-y:16px;--page-max:1600px;--page-gap:16px;
  --shell-chrome-bg:var(--bg-card);--shell-divider:1px solid var(--border);
  --shell-content-h:calc(100dvh - var(--shell-header-h) - var(--footer-band, 48px));
  --ease-out:cubic-bezier(.2,.7,.2,1);
}
@media (min-width:768px){:root{--shell-gutter:24px;--shell-gutter-y:24px;--page-gap:20px}}
@media (min-width:1280px){:root{--shell-gutter:32px;--page-gap:24px}}
*{box-sizing:border-box}html,body,#root{height:100%;margin:0}
/* A CARD LIFTS, CONTROLS STAY FLAT: the runtime's Paper wears data-card; the dark mode's hairline rides --card-border */
[data-card="true"]{border:1px solid var(--card-border);background:var(--bg-card)}   /* Mantine's Paper paints --mantine-color-body (the GROUND) — a card is the card colour */
body{font:var(--fs-md)/var(--line-height) var(--font-sans);background:var(--bg);color:var(--ink);-webkit-font-smoothing:antialiased}
/* a bold word is the title weight, never the browser's 700 (the wordmark, .brandname, keeps its own) */
b,strong{font-weight:600}
.mono{font-family:var(--mono);font-variant-numeric:tabular-nums}

/* ── login / boot card ── */
.center{display:grid;place-items:center;height:100%;gap:10px;color:var(--muted)}
.card{width:min(440px,92vw);background:var(--panel);border:1px solid var(--line);border-radius:12px;overflow:hidden}
.band{height:2px;background:color-mix(in srgb,var(--accent) 45%,transparent)}
.pad{padding:26px}.brand{display:flex;align-items:center;gap:12px}
/* the app mark: a flat tonal tile in the accent, not a gradient block */
.dot{width:40px;height:40px;border-radius:10px;background:color-mix(in srgb,var(--accent) 14%,transparent);display:grid;place-items:center;color:var(--accent)}
.dot svg{width:22px;height:22px}
.card h1{font-family:var(--font-brand);font-size:var(--fs-h2);margin:18px 0 6px;letter-spacing:-.01em}
.lede{color:var(--muted);margin:0 0 20px}
/* ── BUTTONS ARE THE COMPONENT RUNTIME'S: IconButton renders Mantine's ActionIcon/Button with our variants (subtle ·
   light · error) and the theme's component defaults carry the size and radius. What remains here is the raw `.btn` a
   few views still write by hand, styled like the runtime's `default` button through the same tokens. ── */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:var(--control-h,30px);padding:0 11px;background:transparent;color:var(--text-primary);border:1px solid var(--border);border-radius:var(--radius-md,8px);font:inherit;font-size:var(--fs-md);font-weight:500;cursor:pointer;line-height:1;white-space:nowrap}
.btn:hover{background:var(--bg-card-hover)}
.btn:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.btn:disabled,.btn[disabled]{opacity:.45;cursor:default;pointer-events:none}
.btn-primary:not(.ib){background:var(--brand-bg);color:var(--brand-hover);border-color:transparent}
.btn-danger:not(.ib){color:var(--error);border-color:color-mix(in srgb,var(--error) 35%,transparent)}
.ib .ib-text{font-size:var(--fs-sm);font-weight:500}
.err{background:var(--warning-bg);color:var(--warning);border:1px solid var(--line2);border-radius:10px;padding:10px 12px;margin:0 0 14px;font-size:var(--fs-sm)}
.spin{width:15px;height:15px;border:2px solid var(--line2);border-top-color:var(--accent);border-radius:50%;display:inline-block;animation:s .7s linear infinite;vertical-align:-2px;margin-right:9px}@keyframes s{to{transform:rotate(360deg)}}
/* ── shell ── */
/* width:100% — #root keeps its boot-time .center (a centering grid), which would shrink the
   mounted shell to its content width. */
/* The bar is a row of intrinsically-sized things (mark, brand, an app's own controls, who, two icon buttons). On a
   phone their sum passes 390px, and a non-wrapping flex row answers that by widening the DOCUMENT — every element
   below it then measures 450px and the page scrolls sideways. It wraps instead, and every child may shrink. */
/* THE FRAME IS MANTINE'S AppShell (views/shell.mjs). Its bands take the roles: the header and the navbar are the card ground, the borders the hairline. Nothing
   below lays the frame out — AppShell does; this maps its variables onto the design tokens. */
/* THE SHELL FILLS ITS PARENT. #root carries `.center` for the boot spinner — display:grid,
   place-items:center — and a centred grid item is SHRINK-TO-FIT. With an MFE inside, the shell's content has an
   intrinsic width and all is well; with a FRAMED app the content is an iframe, whose intrinsic width is the HTML
   default 300px, so the whole plane became 300px wide inside a 390px phone and every framed tool looked like a
   fixed narrow column. Both `width:100%` here and justify-items:stretch on #root are applied — this one does not depend
   on knowing which rule centred it. */
.shell{--app-shell-border-color:var(--border);width:100%;
  --shell-content-h:calc(100dvh - var(--shell-header-h) - var(--footer-band, 48px))}   /* re-resolved here: a phone's band is the shell's */
/* ONE FRAME: the header and the rail are one chrome ground; the header's bottom border and the rail logo cell's bottom
   border are the same 1 px line at the same height, so the top row reads as one bar from the left edge to the right */
.shell-header,.shell-navbar{background:var(--shell-chrome-bg)}
.shell-header-row{padding-inline:var(--shell-gutter)}
.shell-header-row>*{min-width:0}
/* THE BRAND BLOCK (shell.mjs BrandBlock), the header's left end on a laptop, the same on every page: the name where the
   app panel's content starts (its 12 px padding + its head's 10 px), beside the full-height rail that carries the mark.
   In an app the breadcrumb follows on the same line (Brand › App › Place), at the same size, so the header is one trail
   from one left edge whatever columns the page below draws (a panel, a tree, a dashboard). */
.shell-header-row.has-brand{padding-inline-start:0;gap:8px}   /* the row's own gap, held here (Mantine's Group is layered) */
.shell-brand{display:flex;align-items:center;align-self:stretch;flex:0 1 auto;min-width:6ch;max-width:32ch;text-decoration:none;color:var(--text-primary)}
.shell-brand-name{min-width:0;padding-inline-start:22px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.2}
.shell-header-row .shell-trail-sep{margin:0 2px}
.shell-header-row .bc-list{font-size:var(--fs-md)}
/* the full-height rail's top cell: the brand mark in the rows' 48 px icon column, as tall as the header with the same
   bottom border, so the header's line runs on across the rail and the rail's edge runs up through the header */
.nav-brand{height:var(--shell-header-h);flex:0 0 var(--shell-header-h);padding-inline:var(--shell-rail-pad);border-bottom:1px solid var(--app-shell-border-color);
  display:flex;align-items:center;text-decoration:none;cursor:pointer}
.nav-brand .nav-brand-mark{width:48px;flex:0 0 auto;display:flex;align-items:center;justify-content:center;color:var(--brand);line-height:0}
.nav-brand:focus-visible{outline:2px solid var(--brand);outline-offset:-2px;border-radius:var(--radius-md)}
/* the mark alone: the organisation's name is the header's, beside it */
.nav-brand{gap:0;color:var(--text-primary);background:none;border-radius:0;width:100%}
.brandname{font-family:var(--wordmark-font);font-weight:700;font-size:15px;letter-spacing:-.01em}
.sp{flex:1}.who{font-size:var(--fs-sm);color:var(--muted)}

.ghost{background:none;border:1px solid var(--line);border-radius:var(--radius-md,8px);height:var(--control-h,36px);padding:0 11px;cursor:pointer;color:var(--ink);font-size:var(--fs-md)}
.ghost:hover {border-color:color-mix(in srgb,var(--accent) 45%,var(--line));color:var(--brand-hover);background:color-mix(in srgb,var(--accent) 6%,transparent)}
/* ── the app launcher (hamburger → one page; "All apps" → the sheet) ── */
.launcher{position:relative}
.lch-menu{position:absolute;top:44px;left:0;z-index:40;min-width:260px;max-width:min(360px,92vw);background:var(--panel);border:1px solid var(--line);border-radius:10px;box-shadow:var(--float);padding:6px;display:flex;flex-direction:column;gap:2px}
.lch-row{display:flex;align-items:center;gap:10px;width:100%;text-align:left;background:none;border:0;border-radius:10px;padding:8px 10px;cursor:pointer;color:var(--ink);font:inherit}
.lch-row:hover,.lch-row.now{background:color-mix(in srgb,var(--accent) 9%,transparent)}
.lch-row.now .lch-name{font-weight:600}
.lch-more{border-top:1px solid var(--line);border-radius:0 0 10px 10px;margin-top:4px;padding-top:10px;color:var(--muted)}
.lch-name{flex:1;font-size:var(--fs-md);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lch-count{font-size:var(--fs-xs);color:var(--muted)}.lch-pinmark{font-size:var(--fs-xs);color:var(--brand-hover)}
.lch-ic{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;flex:none;background:color-mix(in srgb,var(--accent) 14%,transparent);color:var(--brand-hover);font-size:var(--fs-sm)}
.lch-empty{padding:12px;color:var(--muted);font-size:var(--fs-sm)}
.lch-sheet{position:fixed;inset:0;z-index:50;background:color-mix(in srgb,var(--text-primary) 38%,transparent);display:grid;place-items:center;padding:24px}
.lch-panel{width:min(760px,100%);max-height:min(80vh,720px);overflow:auto;background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:var(--float);padding:16px}
.lch-head{display:flex;gap:8px;align-items:center;margin-bottom:8px}
/* SUBTLE SEARCH, ONE BOX: the input is `unstyled`, so Mantine draws nothing and the pill below is the only visible box.
   font-size 16px is not a
   style choice: a smaller field makes iOS ZOOM THE PAGE on focus ("clicking out zooms in"), and a zoomed viewport pushed
   the bottom bar off-screen. No inline X — the drawer has its grab handle and a touch outside; the laptop modal keeps one. */
.lch-search input{-webkit-appearance:none;appearance:none;border:none;background:var(--muted-bg);border-radius:999px;color:var(--ink);font-size:max(16px,var(--fs-md));height:40px;padding:0 16px 0 38px}
.lch-search input:focus{outline:none;box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 22%,transparent)}
.lch-search .mantine-Input-section,.lch-search [data-position="left"]{color:var(--muted);pointer-events:none}
/* MANY APPS: the grid scrolls inside the drawer; keep the
   search pinned at the top of that scroll so it is always one reach away, however long the list is. */
.lch-sheet-drawer .lch-head{position:sticky;top:0;z-index:2;background:var(--panel);padding-bottom:8px}
/* the slide-over's grab handle: the native-sheet affordance at the top, and the touch target that closes it */
.lch-grab{display:flex;align-items:center;justify-content:center;width:100%;padding:0 0 10px;background:none;border:0;cursor:pointer;-webkit-tap-highlight-color:transparent}
/* NO FOCUS RING ON THE HANDLE. The Drawer traps focus and lands it on the first focusable — this handle — on open; Chromium draws nothing, but iOS
   Safari paints its native focus ring as a full-width rounded rectangle at the top, only on the first open. The handle is
   a redundant affordance (a touch outside or Escape also closes), so it carries no visible focus ring; the apps below it
   keep theirs. Higher specificity than Mantine's .mantine-focus-auto:focus-visible so it actually wins. */
.lch-sheet-drawer .lch-grab:focus,.lch-sheet-drawer .lch-grab:focus-visible{outline:none;box-shadow:none}
.lch-grab-bar{width:40px;height:4px;border-radius:999px;background:var(--line2)}
.lch-sec{font-size:var(--fs-xs);font-weight:600;letter-spacing:.02em;color:var(--muted);margin:10px 4px 6px}
/* JUST ICONS AND NAMES: the sheet's apps are a dense wrapping grid of centred icon-over-name tiles — no bordered card and
   no oversized icon chip eating the vertical — so many apps read at a glance and the slide-over stops being a long scroll
   of big cards. ~100px tiles give three columns on a phone, more on the laptop modal. The now/hover state is a quiet
   fill, not a border, and the pin star sits faint until it matters. */
.lch-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:4px}
.lch-tile{position:relative;border-radius:14px;background:transparent;transition:background .12s}
.lch-tile:hover{background:var(--bg)}.lch-tile.now{background:var(--brand-bg)}
.lch-tile.pinned{cursor:grab}.lch-tile.dragging{opacity:.5}
.lch-tile-btn{display:flex;flex-direction:column;align-items:center;gap:8px;width:100%;padding:14px 8px;background:none;border:0;cursor:pointer;color:var(--ink);font:inherit;text-align:center}
.lch-tile-btn .lch-ic{width:42px;height:42px;border-radius:12px}
.lch-tile-btn span{font-size:var(--fs-sm);font-weight:600;line-height:1.2;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:normal;word-break:keep-all;
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}   /* two lines: "Identity & access" whole, not cut */
.lch-pin{position:absolute;top:6px;right:6px;background:none;border:0;cursor:pointer;color:var(--muted);font-size:var(--fs-md);line-height:1;opacity:.5}
.lch-pin.on,.lch-pin:hover{color:var(--accent);opacity:1}
@media (pointer:coarse){.lch-pin{top:0;right:0;width:44px;height:44px;display:grid;place-items:center}}
@media (max-width:640px){.lch-sheet{padding:0}.lch-panel{width:100%;max-height:100vh;height:100vh;border-radius:0}.lch-menu{min-width:220px}}

/* ── SPOTLIGHT — the universal search, anchored top-centre like the platform's own command bar.
   Reuses the launcher sheet's scrim weight and panel treatment so the two overlays read as one
   family rather than two designers. Full-screen under 640px, where a centred dialog is a worse
   phone experience than a page. */
/* the wrap and the scrim are the runtime's Modal (views/spotlight.mjs); the box inside keeps its look */
.spot{background:var(--panel);overflow:hidden}
.spot-bar{display:flex;gap:10px;align-items:center;padding:12px 14px;border-bottom:1px solid var(--line)}
.spot-input{flex:1;font:inherit;font-size:max(16px,var(--fs-lg));padding:6px 2px;border:0;background:none;color:var(--ink)}
.spot-input:focus{outline:none}
.spot-spin{width:14px;height:14px}
.spot-body{max-height:min(58vh,520px);overflow:auto;padding:6px}
.spot-sec-name{font-size:var(--fs-xs);font-weight:600;color:var(--muted);margin:10px 10px 4px}
.spot-hit{display:flex;align-items:baseline;gap:10px;width:100%;padding:9px 10px;border:0;border-radius:10px;
  background:none;color:var(--ink);font:inherit;text-align:left;cursor:pointer}
.spot-hit-on{background:color-mix(in srgb,var(--accent) 12%,var(--bg))}
.spot-hit:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.spot-hit-label{flex:1;font-size:var(--fs-md);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.spot-hit-kind{font-size:var(--fs-xs);color:var(--muted);flex:none}
.spot-more,.spot-note{font-size:var(--fs-sm);color:var(--muted);padding:6px 10px 10px}
.spot-note.err{color:var(--danger)}
.spot-hit{flex-wrap:wrap}
.spot-hit-snippet{flex-basis:100%;font-size:var(--fs-sm);color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}
.spot-mark{background:color-mix(in srgb,var(--accent) 22%,transparent);color:inherit;border-radius:3px;padding:0 1px}
.spot-group{font-size:var(--fs-xs);color:var(--muted);margin:6px 10px 2px}
.spot-more a{color:var(--brand-hover);text-decoration:none}
.spot-peek{padding:12px 14px;display:grid;gap:8px}
.spot-peek-head{display:flex;justify-content:space-between;align-items:center}
.spot-peek-kind{font-size:var(--fs-sm);color:var(--muted)}
.spot-peek-values{display:grid;grid-template-columns:minmax(110px,max-content) minmax(0,1fr);gap:4px 14px;margin:0;font-size:var(--fs-sm)}
.spot-peek-values dt{color:var(--muted)}.spot-peek-values dd{margin:0;overflow-wrap:anywhere}
.spot-foot{font-size:var(--fs-xs);color:var(--muted);padding:8px 14px;border-top:1px solid var(--line)}
@media (max-width:640px){.spot-foot{display:none}}
@media (max-width:640px){.spot{height:100%}
  .spot-body{max-height:calc(100vh - 58px)}}

/* ── a stage: one representation at a time ── */
.stage{display:flex;flex-direction:column;gap:10px;min-height:0;flex:1}

/* ── tables and fields: generic primitives every app shares ── */
.table{width:100%;border-collapse:collapse;font-size:var(--fs-md)}
.table th{text-align:left;font-size:var(--fs-sm);color:var(--muted);font-weight:600;padding:8px 10px;border-bottom:1px solid var(--line)}
.table td{padding:7px 8px;border-bottom:1px solid var(--line);vertical-align:top;overflow-wrap:anywhere}
.table td .btn,.table td .chip,.table th{white-space:nowrap}
/* A SIMULATED row says so wherever it renders. Warn-toned, not error-toned: it is not wrong,
   it is not real — and both themes must read it, so it is tokens only (unit-theme-tokens). */
.chip.sim{background:var(--warn-bg);color:var(--warn);border-color:color-mix(in srgb,var(--warn) 45%,transparent);font-weight:600;letter-spacing:.03em}
.table td:last-child{width:1%;white-space:nowrap}
.table tr.clickable{cursor:pointer}.table tr.clickable:hover td{background:color-mix(in srgb,var(--accent) 6%,transparent)}

/* RAW inputs a view still writes by hand: the runtime's `default`
   input look through the same tokens, so a raw field and a TextInput beside it cannot be told apart. The runtime's own
   inputs carry `.input/.select/.textarea` as class hooks too — the rules below must stay LAYOUT-NEUTRAL for them. */
input.input,select.select,textarea.textarea{font:inherit;font-size:var(--fs-md);min-height:var(--control-h,30px);padding:4px 10px;border:1px solid var(--border);border-radius:var(--radius-md,8px);background:var(--bg-input);color:var(--text-primary);width:100%}
input.input:focus,select.select:focus,textarea.textarea:focus{outline:none;border-color:var(--brand)}
input.input.xs{font-size:var(--fs-sm);padding:2px 7px;min-height:24px}
textarea.textarea{min-height:76px;font-family:var(--mono);font-size:var(--fs-sm)}

.note.warn{color:var(--ink);background:var(--warn-bg);border-radius:8px;padding:8px 10px}
.note.ok{color:var(--ok)}

/* The connection light beside the account. An INDICATOR, not a control: no focus ring, no pointer,
   and its meaning lives in the tooltip/aria-label rather than the colour, so it still reads for
   anyone who does not separate red and green. Amber pulses because "coming back" is a live state;
   green and red are still, because they are settled ones. */
.conn-dot{width:8px;height:8px;border-radius:50%;flex:0 0 auto;margin-left:2px;pointer-events:none;
  box-shadow:0 0 0 2px color-mix(in srgb,var(--bg) 70%,transparent)}
.conn-ok{background:var(--success)}
.conn-warn{background:var(--warning);animation:conn-pulse 1.6s ease-in-out infinite}
.conn-down{background:var(--error)}
@keyframes conn-pulse{0%,100%{opacity:1}50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){.conn-warn{animation:none}}

/* The empty landing shell: the brand, centred, so a surface with nothing on it still says whose
   platform it is and that it loaded. Quiet — it is a resting state, not a hero. */
.landing{min-height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:48px 24px;text-align:center}
.landing-mark{opacity:.5;line-height:0}
.landing-name{margin:0;font-size:var(--fs-h2);font-weight:600;letter-spacing:.01em;color:var(--ink)}
.landing .sub{margin:0;color:var(--text-tertiary);max-width:34ch}

/* The thin bottom bar. Baseline-aligned on one row: whose this is on the left, what it runs on and
   which build on the right. tabular-nums so the version does not jitter between builds. */
.footerbar{display:flex;align-items:center;justify-content:center;gap:12px;padding:0 14px;
  font-size:var(--fs-xs);line-height:1.4;color:var(--text-tertiary);white-space:nowrap;overflow:hidden}
.footerbar .sp{flex:1 1 auto;min-width:0}
.fb-item{white-space:nowrap}

/* the signature: the mark in the brand's warm accent, its neutrino orbiting; the name a shade stronger than the words */
.fb-sign{display:inline-flex;align-items:center;gap:7px;letter-spacing:.02em;transition:color .2s ease}
.fb-sign b{font-weight:600;color:var(--text-secondary)}
.fb-version{font-variant-numeric:tabular-nums;color:var(--text-tertiary)}
.fb-mark{display:inline-flex;color:var(--accent);opacity:.9;transition:opacity .2s ease,transform .3s ease}
.fb-sign:hover{color:var(--text-secondary)}
.fb-sign:hover .fb-mark{opacity:1;transform:scale(1.08)}
@media (prefers-reduced-motion:reduce){.fb-mark{transition:none}.fb-sign:hover .fb-mark{transform:none}}
.footerbar .mono{font-variant-numeric:tabular-nums}

/* MOBILE: three short facts stop being legible well before they stop fitting, so below 560px the bar
   centres and wraps onto two rows instead of squeezing — and the flexible spacer collapses, or it
   would push the right-hand pair off on its own. */
@media (max-width:560px){
  .footerbar{justify-content:center;gap:8px;padding:0 12px;text-align:center}
  .footerbar .sp{display:none}
}

/* MOBILE, the shell. The top bar keeps its controls reachable rather than shrinking them below a
   thumb: the brand wordmark is what gives way, since the mark beside it already identifies the app.
   The empty landing scales its mark down so the brand + line still sit above the fold on a phone. */
@media (max-width:560px){
  .shell-header-row{gap:6px;padding-left:8px;padding-right:8px}
  .shell-header-row .brandname{display:none}
  .who{max-width:12ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .landing{padding:32px 16px;gap:10px}
  .landing-mark svg{width:44px;height:44px}
  .landing-name{font-size:var(--fs-xl)}
}

/* The account: the only thing on the right of the bar besides search and the light. Theme and sign
   out live behind it — two rarely-used controls should not sit permanently beside the one people
   look for. Initials when there is no avatar image, so the slot never renders empty. */
.account{display:flex;align-items:center}
.avatar{display:flex;align-items:center;justify-content:center;border-radius:50%;line-height:0}
.avatar:focus-visible{outline:none;box-shadow:0 0 0 3px var(--brand-ring)}
.account-who{padding:6px 10px 8px;font-size:var(--fs-sm);color:var(--text-tertiary);
  border-bottom:1px solid var(--line);margin-bottom:4px;overflow:hidden;text-overflow:ellipsis}

@media (max-width:560px){ .account-menu{right:-4px;min-width:170px} }

/* The shell's slot: fill what is left between the two bars, and impose nothing else. An app brings
   its own layout (most bring a `.body` grid of rail + view), so the slot must not be a grid itself —
   nesting one inside another crushed the App Store's content column to a word per line. */
/* THE MAIN fills what is left between the bands: AppShell pads it by the header, navbar and footer offsets; it is at least a
   viewport tall and GROWS with a tall page, so a long form never runs under the footer. */
/* THE NAVBAR'S APPS fill the full width. On a laptop the
   example's single column of 50 px squares; on a phone, where AppShell opens the navbar at full width, a wrapping
   grid so the width carries five icons a row instead of one. auto-fill, so the column count is the screen's answer
   and not a number written here. */
.nav-col{display:flex;flex-direction:column;gap:0}
.nav-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:6px}
.nav-tile{display:flex;align-items:center;gap:10px;width:100%;min-height:52px;padding:8px 10px;border-radius:var(--radius-md);color:var(--text-primary);background:transparent;text-align:left}
.nav-tile[data-active]{background:var(--brand-bg);color:var(--brand-hover)}   /* the two roles the square already uses — no colour is invented here */
.nav-tile-name{font-size:var(--fs-md);line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* THE PHONE'S BOTTOM BAR. On a phone the footer band
   IS the apps — four fixed tabs and More, each a glyph over a short label, spread evenly across the width in thumb
   reach. It is AppShell's own fixed Footer (height BOTTOMBAR_H), so the Main is already padded to clear it; nothing here
   is position:fixed by hand. Colour: tertiary at rest, the full ink (and 600) when active — a greyish brand read as switched off. */
.app-bottombar{display:flex;align-items:stretch;justify-content:space-around;gap:0;padding:0;background:var(--bg-card);border-top:1px solid var(--line)}
.bb-tab{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:6px 4px;border:0;background:none;color:var(--text-tertiary);cursor:pointer;text-decoration:none}
.bb-tab .bb-ic{line-height:0}
.bb-tab .bb-name{font-size:var(--fs-xs);line-height:1.1;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* five tabs share 360 px: a name of several words (Identity & access) takes two lines rather than an ellipsis; a word
   is never cut in the middle */
@media (max-width:560px){.bb-tab{padding:4px 2px}.bb-tab .bb-name{white-space:normal;overflow-wrap:normal;word-break:keep-all;
  text-align:center;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}
  .bb-tab .bb-name.one{display:block;white-space:nowrap;text-overflow:ellipsis;letter-spacing:-.01em}}   /* one long word (Configuration): an ellipsis, never a word cut without one */
.bb-tab[data-active],.bb-tab.now{color:var(--text-primary)}
.bb-tab[data-active] .bb-name,.bb-tab.now .bb-name{font-weight:600}
.bb-tab:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--brand-ring)}

/* THE SLIDE-OVER'S BODY — shared by the laptop Modal and the phone bottom Drawer the More tab opens. The search head and
   the app grid are the sheet's own `.lch-*`; a phone adds a foot (Change account + the build line) under a divider, since
   the bottom bar is apps-only and those lived on the navbar foot on a laptop. */
.lch-body{display:flex;flex-direction:column}
.lch-foot-extra{margin-top:12px;padding-top:10px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:2px}
.lch-build{font-size:var(--fs-xs);color:var(--text-tertiary);font-variant-numeric:tabular-nums;text-align:center;padding:6px 0 2px}

.shell-main{display:flex;flex-direction:column;min-height:100dvh}

/* THE FIXED FOOTER'S BAND, AND WHY EVERY SCROLLER RESERVES IT.
   The footer is `position:fixed` over the bottom 32 px of the viewport (shell.mjs FOOTER_H; the
   unit test unit-footer-band keeps these two numbers equal). A scroll that stops at the BOTTOM
   EDGE would land a control underneath it — for Tab, for an anchor, and for an automated click.
   `scroll-padding-bottom` tells
   every scroll container to stop short of the band, which is the one line that fixes it for a
   person and for a spec alike. */
:root{--footer-band:48px}
html,body,.shell-main,.detail,.datatable-wrap,.view {scroll-padding-bottom:var(--footer-band)}
/* ON A PHONE WITH THE BOTTOM BAR the band is taller (BOTTOMBAR_H, not the thin 32 px bar), so a control scrolled to the
   bottom still clears the apps. Scoped to the shell that has both a rail and a phone width — every scroll container that
   matters is inside it, so it inherits the taller band; the no-apps landing keeps the thin one. */
@media (max-width:560px){ .shell[data-rail="1"][data-phone="1"]{--footer-band:60px} }
/* the phone's bottom bar height (views/shell.mjs sets it on the root while the bar shows): the Main clears the bar and the
   device's home indicator, and floating controls sit above it */
:root{--shell-bottom-bar-h:0px}
.shell[data-rail="1"][data-phone="1"] .shell-main{padding-bottom:calc(var(--shell-bottom-bar-h, 0px) + env(safe-area-inset-bottom, 0px))}
.shell-main > *{flex:1 1 auto;min-height:0}

/* The brand mark in the bar: the hexagon itself, not a tinted tile behind it. The same mark the empty landing
   shows, at bar size — one mark, one geometry, two sizes. */
.brandmark{display:flex;align-items:center;justify-content:center;flex:0 0 auto;color:var(--brand);line-height:0}
.brandmark svg{display:block}
/* THE LIVE MARK — the system standard. The mark holds its shape (a scale on a thin-stroked mark re-encodes as shimmer
   on a screen share); one
   neutrino orbits the outer shell, inside the SVG itself (util.Mark), so every surface that draws the mark is alive the
   same way — the bar, the empty landing, the boot card, the apex page, the login page. Reduced-motion stops it. */
.mark-live .neutrino{animation:nb-orbit 7s linear infinite;transform-box:view-box;transform-origin:12px 12px}
@keyframes nb-orbit{to{transform:rotate(360deg)}}
/* …and when the mark is ACTIVE the shells turn too, to say the system is working: the assistant thinking, the rail
   entry you are on. Resting, they hold still and only the neutrino moves. They turn as ONE GROUP: five hexagons on
   five different clocks stop nesting the moment they are off a 60° multiple, and the mark becomes a rosette. */
.mark-live .nx-shells{transform-box:view-box;transform-origin:12px 12px;animation:nb-orbit 28s linear infinite;animation-play-state:paused}
.mark-live[data-active=true] .nx-shells{animation-play-state:running}
@media (prefers-reduced-motion:reduce){.mark-live .neutrino,.mark-live .nx-shells{animation:none}}

/* ── THE PAGE LOADER (views/page-loader.mjs): the one sign that the page is working — the mark, turning, at the centre of
   the content. Fixed over the content only (between the header, the rail or an app's panel, and the footer), clicks pass
   through, no backdrop; it fades in after the busy delay. Before the shell exists (the boot, the slot) it fills its box. */
.page-loader{position:fixed;z-index:180;top:var(--app-shell-header-offset,0px);bottom:var(--app-shell-footer-offset,0px);
  left:var(--app-shell-navbar-offset,0px);right:var(--app-shell-aside-offset,0px);display:grid;place-items:center;pointer-events:none;
  color:var(--brand,var(--accent));animation:pl-in .2s ease-out both}
.page-loader-fill{position:static;inset:auto;width:100%;height:100%;min-height:160px}
@media (min-width:768px){.shell:has(.panel-layout>.side-panel) .page-loader{left:calc(var(--app-shell-navbar-offset,0px) + var(--shell-panel-w))}}
.page-loader-mark{display:grid;place-items:center;width:64px;height:64px}
.page-loader .mark-live .neutrino{animation-duration:1.4s}
.page-loader .mark-live .nx-shells{animation-duration:8s}
@keyframes pl-in{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){.page-loader{animation:none}.page-loader .mark-live .neutrino,.page-loader .mark-live .nx-shells{animation:none}}
.busy-hold{display:block}
.vh{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}

/* ── THE NAVBAR (views/rail.mjs) IS MANTINE'S MINIMAL NAVBAR: --shell-rail-w COLLAPSED, the mark in the header row's cell
   on top, one NavLink row per app, radius md; hover a tint of the card ground, the ACTIVE one the primary colour's light
   variant (the same two roles the resolver hands Mantine — nothing of ours tints an icon). IT NEVER WIDENS: each row is
   its glyph in a fixed 48 px column, centred in the rail (80 − 2 × 16 = 48), and its name is a tooltip beside it.
   Tokens only. ── */
.nav-main{padding:12px var(--shell-rail-pad) 0}
.nav-col{gap:4px}
/* the account cell IS the footer's band on the rail: the same height and top line, the avatar on the footer's centre line */
.nav-foot{min-height:var(--footer-band);box-sizing:border-box;background:var(--bg);padding:0 var(--shell-rail-pad);border-top:1px solid var(--app-shell-border-color)}
.nav-foot .nav-link{height:calc(var(--footer-band) - 8px)}
.nav-link{width:50px;height:50px;border-radius:var(--radius-md);display:flex;align-items:center;justify-content:center;
  color:var(--text-secondary);margin:0 auto}
.nav-link:hover{background:var(--bg-card-hover)}
.nav-link[data-active]{background:var(--brand-bg);color:var(--brand-hover)}   /* = Mantine's primary light variant: the resolver maps --mantine-primary-color-light(-color) onto these two roles */
.nav-ic{display:flex;line-height:0}.nav-ic svg{width:20px;height:20px}
.nav-profile .avatar-img{pointer-events:none}

/* THE RAIL: --shell-rail-w of icons, the same width always (no hover or focus widens it). */
.shell-navbar{width:var(--shell-rail-w);overflow-x:hidden}
/* a row: the glyph in a fixed 48 px column; the name is kept for a screen reader (aria-label) and shown as a tooltip */
.nav-row{border-radius:var(--radius-md);min-height:44px;padding:0;color:var(--text-secondary);transition:background-color var(--motion-fast,180ms) ease,color var(--motion-fast,180ms) ease}
.nav-row:hover{color:var(--text-primary)}
.nav-row[data-active]{color:var(--brand-hover)}
.nav-row .nav-row-section{width:48px;min-width:48px;margin-inline-end:0;display:flex;align-items:center;justify-content:center}
.nav-row .nav-row-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500}
.nav-row .avatar-img{pointer-events:none}
.shell-navbar .nav-row{justify-content:center}
.shell-navbar .nav-row .nav-row-body{display:none}
.lch-sheet-modal .lch-head{margin-bottom:10px}
/* a rail beside a two-pane app (tree left · detail right): the app's own grid keeps its columns; only the gutter moves */
/* THE ONE LIST IS BOUNDED BY ITS CONTAINER: a grid cell's min-width is its content's, so without this the datatable's
   own ScrollArea never gets a width to scroll in and the page widens sideways */
.datatable,.datatable-wrap{min-width:0;max-width:100%}
.datatable-wrap{overflow-x:auto}

/* The assistant waiting at the right edge: it docks clear of the bottom bar, leans out when pointed at, and steps
   out on a click before the panel opens. The mark it draws is views/mark.mjs — the same one the rail, the sign-in
   card and the front door carry; what it has to say is whether the assistant is working, which it says by turning. */
.as-dock{position:fixed;right:0;bottom:calc(max(14px, var(--shell-bottom-bar-h, 0px) + 8px) + env(safe-area-inset-bottom, 0px));z-index:150;display:flex;align-items:flex-end;pointer-events:none}
.as-peek{pointer-events:auto;position:relative;width:64px;height:64px;padding:0;margin:0 10px 0 0;border:0;border-radius:50%;cursor:pointer;display:grid;place-items:center;
  color:var(--brand-hover);background:var(--bg-card, #fff);box-shadow:var(--shadow-float, 0 8px 24px rgba(0,0,0,.12));border:1px solid var(--border, #e3e6eb);
  transform:translateX(18%);transition:transform .22s var(--ease-out, ease-out)}
.as-peek[data-state=near]{transform:translateX(0)}
.as-peek[data-state=out]{transform:translateX(0) scale(.94);transition-duration:.32s}
.as-peek:focus-visible{outline:var(--focus-ring, 3px) solid var(--brand);outline-offset:4px}
.as-say{pointer-events:none;margin:0 -4px 76px 0;max-width:220px;padding:8px 12px;border-radius:14px 14px 4px 14px;background:var(--bg-card, #fff);color:var(--text-primary);
  border:1px solid var(--border, #e3e6eb);box-shadow:var(--shadow-float, 0 8px 24px rgba(0,0,0,.12));font-size:var(--fs-sm);line-height:1.35;animation:as-say .3s ease-out}
.as-hello{animation:as-say .4s ease-out}
@keyframes as-say{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media (max-width:600px){.as-peek{width:54px;height:54px}}
@media (prefers-reduced-motion:reduce){.as-peek,.as-peek *,.as-say,.as-hello{animation:none!important;transition:none!important}}

/* a device's look: its picture or its 3D model, on a soft ground of the brand's colour */
.model-view{background:radial-gradient(120% 90% at 50% 20%, var(--bg-card, #fff) 0%, var(--brand-bg, #f4efe8) 100%);border:1px solid var(--border, #e3e6eb)}
.model-view-note,.model-view-hint{position:absolute;left:0;right:0;text-align:center;font-size:var(--fs-sm);color:var(--text-secondary)}
.model-view-note{top:50%;transform:translateY(-50%);padding:0 16px}
.model-view-hint{bottom:8px;pointer-events:none;opacity:.85}
.model-view canvas:focus-visible{outline:var(--focus-ring, 3px) solid var(--brand);outline-offset:-3px}

/* ── THE PAGE (views/page.mjs) — every app's content area uses the width: fluid up to --page-max, centred beyond it,
   padded by the gutters (16 phone · 24 tablet · 32 desktop). It is a size container, so a grid inside answers to the
   page's own width (beside a side panel it is narrower than the window). ── */
.page{width:100%;max-width:var(--page-max);margin-inline:auto;padding:var(--shell-gutter-y) var(--shell-gutter) calc(var(--shell-gutter-y) + 8px);
  display:flex;flex-direction:column;gap:var(--page-gap);min-width:0;container-type:inline-size;container-name:page}
.page[data-width="full"]{max-width:none}
.page[data-width="text"]{max-width:calc(960px + 2 * var(--shell-gutter))}
.page>*{min-width:0}
/* the page head: title and intro on the left, the page's actions on the right; they wrap under the title on a narrow page */
/* seen by screen readers only (a page's title: the breadcrumb names the page for everyone else) */
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;white-space:nowrap!important;border:0!important}
.page-head-quiet{display:contents}
.page-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:12px 24px}
.page-head-text{flex:1 1 320px;min-width:0;display:flex;flex-direction:column;gap:4px}
.page-head-title{margin:0;font-size:var(--fs-h1);line-height:1.25;font-weight:600;letter-spacing:-.015em;color:var(--text-primary);overflow-wrap:anywhere}
/* a record's fields: sections 24px apart, their heading in the menu's section style, fields in columns (16px rows, 24px
   columns), each a label over its value */
.rt-fields{display:flex;flex-direction:column;gap:24px;min-width:0}
.rt-fields-section{display:flex;flex-direction:column;gap:12px;min-width:0}
.rt-fields-title{margin:0;font-size:var(--fs-xs);font-weight:600;line-height:1.4;letter-spacing:.04em;text-transform:uppercase;color:var(--text-secondary)}
.rt-fields-grid{display:grid;gap:16px 24px}
.rt-field{display:flex;flex-direction:column;gap:2px;min-width:0}
.page-head-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;max-width:100%;min-width:0}
@media (max-width:560px){.page-head-title{font-size:var(--fs-h2)}.page-head-actions{width:100%}.page-head-actions>.nb-seg{width:100%}}
/* CARDS IN A GRID: as many columns of at least --card-min as the page holds; data-cols="2" caps it at two (one on a
   narrow page). A card that needs the row whole spans it (.span-all). */
.card-grid{--card-min:340px;display:grid;gap:var(--page-gap);grid-template-columns:repeat(auto-fill,minmax(min(100%,var(--card-min)),1fr));align-items:stretch;min-width:0}
.card-grid>*{min-width:0}
.card-grid[data-align="start"]{align-items:start}
.card-grid[data-cols="2"],.card-grid[data-cols="3"]{grid-template-columns:minmax(0,1fr)}
@container page (min-width:880px){.card-grid[data-cols="2"],.card-grid[data-cols="3"]{grid-template-columns:repeat(2,minmax(0,1fr))}}
@container page (min-width:1280px){.card-grid[data-cols="3"]{grid-template-columns:repeat(3,minmax(0,1fr))}}
.card-grid>.span-all{grid-column:1/-1}

/* A FORM'S FIELDS in columns: two or three across a wide page, one on a phone; a field that needs the row spans it */
.form-grid{display:grid;gap:12px 16px;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr));align-items:start}
.form-grid>*{min-width:0}
.form-grid>.span-all{grid-column:1/-1}

/* ── A SIDE PANEL BESIDE THE PAGE (PanelLayout + AppNav): flush against the rail on the chrome ground, one divider on its
   right, sticky under the header and as tall as the space between the bands; its top padding is the page's, so the two
   titles share a line. Below 768 px the panel gives way to the app's phone navigation above the page. ── */
.panel-layout{display:grid;grid-template-columns:minmax(0,1fr);min-height:var(--shell-content-h);min-width:0}
.panel-layout>*{min-width:0}
.side-panel{display:none}
.panel-phone-nav{display:block;padding:12px var(--shell-gutter);background:var(--shell-chrome-bg);border-bottom:var(--shell-divider)}
@media (min-width:768px){
  .panel-layout{grid-template-columns:var(--shell-panel-w) minmax(0,1fr)}
  .side-panel{display:flex;flex-direction:column;gap:2px;position:sticky;top:var(--shell-header-h);align-self:start;height:var(--shell-content-h);
    overflow-y:auto;overscroll-behavior:contain;background:var(--shell-chrome-bg);border-inline-end:var(--shell-divider);padding:var(--shell-gutter-y) 12px 12px}
  .panel-phone-nav{display:none}
}
.side-panel-head{display:flex;flex-direction:column;gap:2px;padding:0 10px 12px;min-width:0}
.side-panel-title{margin:0;font-size:var(--fs-h3);line-height:1.3;font-weight:600;color:var(--text-primary);overflow-wrap:anywhere}
.side-panel-section{font-size:var(--fs-xs);font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--text-tertiary);padding:14px 10px 4px}
.side-panel-foot{margin-top:auto;padding-top:12px;display:flex;flex-direction:column;gap:2px}
.side-link{display:flex;align-items:center;gap:10px;min-height:40px;padding:8px 10px;border-radius:var(--radius-md);color:var(--text-primary);
  text-decoration:none;line-height:1.3;min-width:0;cursor:pointer;background:transparent;border:0;font:inherit;font-size:var(--fs-md);text-align:left;width:100%;
  transition:background-color var(--motion-fast,180ms) ease,color var(--motion-fast,180ms) ease}
.side-link:hover{background:var(--bg-card-hover)}
.side-link[aria-current="page"]{background:var(--brand-bg);color:var(--brand-hover);font-weight:600}
.side-link:focus-visible{outline:2px solid var(--brand);outline-offset:-2px}
.side-link-ic{display:inline-flex;flex:none;line-height:0;color:inherit;opacity:.85}
.side-link-text{flex:1 1 auto;min-width:0;display:flex;flex-direction:column}
.side-link-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.side-link-out{display:inline-flex;flex:none;line-height:0;opacity:.6}
.side-link-badge{flex:none;min-width:20px;padding:0 6px;border-radius:999px;background:var(--bg-card-2);color:var(--text-secondary);font-size:var(--fs-xs);font-weight:600;text-align:center;line-height:20px}
/* the page beside a panel keeps the full width to its right; it is a Page with no max-width of its own */
.panel-layout .page{max-width:none}

/* ── ONE APP NAVIGATION (views/app-nav.mjs): every app's panel, its phone bar and sheet, and the breadcrumb ──
   The panel: the app's name, the company under it, tools, the places under plain sentence-case headings, a footnote at
   the foot. On a phone: one bar above the page naming the place open now; it opens the same panel as a sheet from the
   bottom edge. The breadcrumb sits in the shell's header: Company › App › Section › Item, the last one where you are. */
.app-nav-head{gap:4px}
.app-nav-tools{display:flex;flex-direction:column;gap:8px;padding:0 0 8px;min-width:0}
.app-nav-tools>*{width:100%;margin:0}
.app-nav-group{display:flex;flex-direction:column;gap:2px;min-width:0}
.side-panel-section{text-transform:none;letter-spacing:0;color:var(--text-secondary)}
.app-nav-group+.app-nav-group>.side-panel-section{padding-top:18px}
.app-nav-foot{padding:16px 10px 0;font-size:var(--fs-sm);line-height:1.45;color:var(--text-secondary);overflow-wrap:anywhere}
.app-nav-foot>.side-link{margin-inline:-10px;width:calc(100% + 20px)}
.app-nav-bar{display:flex;align-items:center;gap:8px;min-width:0}
.app-nav-bar-btn{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:10px;min-height:44px;padding:6px 12px;border-radius:var(--radius-md);
  border:1px solid var(--line);background:var(--surface);color:var(--text-primary);text-align:left;transition:border-color var(--motion-fast,180ms) ease}
.app-nav-bar-btn:hover,.app-nav-bar-btn[aria-expanded="true"]{border-color:var(--brand)}
.app-nav-bar-btn:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.app-nav-bar-ic{display:inline-flex;flex:none;line-height:0;color:var(--brand)}
.app-nav-bar-text{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;line-height:1.25}
.app-nav-bar-app{font-size:var(--fs-xs);color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.app-nav-bar-here{font-size:var(--fs-md);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.app-nav-bar-caret{display:inline-flex;flex:none;line-height:0;color:var(--text-tertiary)}
.app-nav-bar-extra{display:flex;flex:none;align-items:center;gap:4px}
.app-nav-sheet-content{height:auto!important;max-height:85dvh;flex:0 0 auto}
.app-nav-sheet-body{padding:0}
.side-panel.app-nav-sheet{display:flex;flex-direction:column;gap:2px;position:static;height:auto;border:0;background:var(--shell-chrome-bg);
  padding:8px 12px calc(16px + env(safe-area-inset-bottom,0px))}
.app-nav-grip{align-self:center;width:36px;height:4px;border-radius:999px;background:var(--line);margin:0 0 12px}
/* the breadcrumb: one line, the company and the app give way first, every crumb ellipsised with its whole name in its title */
.bc{flex:1 1 auto;min-width:0;overflow:hidden}
.bc-list{display:flex;align-items:center;min-width:0;margin:0;padding:0;list-style:none;white-space:nowrap;font-size:var(--fs-sm);line-height:1.3}
.bc-item{display:inline-flex;align-items:center;min-width:0;flex:0 1 auto;max-width:28ch}
.bc-item[data-kind="company"]{flex-shrink:4;min-width:4ch}
.bc-item[data-kind="app"]{flex-shrink:3;min-width:4ch}
.bc-item[data-current="true"]{flex-shrink:1;min-width:6ch;max-width:40ch}
.bc-sep{display:inline-flex;flex:none;line-height:0;margin:0 6px;color:var(--text-tertiary)}
.bc-link,.bc-plain{display:inline-flex;min-width:0;align-items:center;min-height:32px;border-radius:6px}
.bc-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bc-link{color:var(--text-secondary);text-decoration:none;transition:color var(--motion-fast,180ms) ease}
.bc-link:hover{color:var(--text-primary)}
.bc-link:hover .bc-text{text-decoration:underline;text-underline-offset:3px}
.bc-link:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.bc-plain{color:var(--text-secondary)}
.bc-plain[aria-current="page"]{color:var(--text-primary);font-weight:600}
/* on a phone the trail is one step: the place above, a chevron before it. It is the way back there as everywhere (no page
   draws a back link of its own); the place open is the page's own and the app's bar below the header. */
@media (max-width:560px){
  .shell-header-row .shell-trail-sep,.shell-header-row .bc-item,.shell-header-row .bc-sep{display:none}
  .shell-header-row .bc-item:has(>.bc-link):has(+.bc-item[data-current="true"]){display:inline-flex;max-width:100%}
  .shell-header-row .bc-link::before{content:"";flex:none;width:18px;height:18px;margin-inline-end:2px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") center/18px no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 18-6-6 6-6'/%3E%3C/svg%3E") center/18px no-repeat}
}

/* ── EVERY CONTROL IS RESPONSIVE (the theme's nb-* hooks, design-tokens.mjs) ──
   A button is never wider than its row and ellipsises a long label; on a touch screen every button, icon button, tab,
   segmented choice and input is at least 40 px tall; a segmented control or a tab list scrolls inside itself rather than
   widening the page; a dialog takes the phone's width. Hover, press and focus are quiet tints with short transitions. */
/* --button-height is Mantine's: every button re-declares it for its size; the root value only names it for the sweeps */
:root{--button-height:38px}
/* the usual control is --control-h tall (38 px: room for the 15 px body); Mantine's own sizes stay for xs and compact */
.nb-btn{--button-height-sm:var(--control-h,38px);--nb-btn-h:var(--button-height);height:var(--nb-btn-h);max-width:100%;
  transition:background-color var(--motion-fast,180ms) ease,border-color var(--motion-fast,180ms) ease,color var(--motion-fast,180ms) ease,box-shadow var(--motion-fast,180ms) ease}
.nb-btn-inner{min-width:0}
.nb-btn-label{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:calc(var(--nb-btn-h) - 2px);text-box-trim:none}
.nb-icon-btn{transition:background-color var(--motion-fast,180ms) ease,color var(--motion-fast,180ms) ease}
.nb-seg{max-width:100%;overflow-x:auto;scrollbar-width:none;background-color:var(--bg-card-2)}
.nb-seg::-webkit-scrollbar{display:none}
.nb-seg-label{white-space:nowrap}
/* a tab and a segment read alike: 14 px, 500, the chosen one 600 (a nav row: 400, the open one 600) */
.nb-seg-label{font-weight:500}.nb-seg-label[data-active]{font-weight:600}
.nb-tab[data-active]{font-weight:600}
/* the chosen tab reads as chosen whatever the brand: the words at full strength, the underline in --tab-line (the brand
   only where it has the contrast); a filled pill keeps the ink Mantine gives its ground */
.nb-tab[data-active]:not([data-variant="pills"]){color:var(--text-primary)}
.nb-tab[data-active][data-variant="default"]{border-color:var(--tab-line)}
.nb-tabs-list{max-width:100%}
.nb-tab{font-weight:500;transition:background-color var(--motion-fast,180ms) ease,color var(--motion-fast,180ms) ease}
.nb-navlink{transition:background-color var(--motion-fast,180ms) ease,color var(--motion-fast,180ms) ease}
.nb-input{--input-height-sm:var(--control-h,38px)}
/* THE TABLE: every cell and column head at --fs-table (the secondary size), so a cell's words never differ from the
   words beside them; figures line up in columns (tabular); a head is semi-bold like every other label, never bold.
   Mantine's own tables (.nb-table) and the lists (DataTable, .datatable-wrap) read alike. */
.nb-table,.datatable-wrap table{font-size:var(--fs-table);font-variant-numeric:tabular-nums;
  --mantine-font-size-md:var(--fs-table)}   /* a <Text> in a cell with no size of its own reads at the table's size too */
.nb-table thead th,.datatable-wrap thead th{font-size:var(--fs-table);font-weight:600}
/* A KEY FIGURE: the number a tile is about (a count, a version, a share), the same size and weight on every page */
.nb-figure{display:block;margin:0;font-size:var(--fs-figure);font-weight:600;line-height:1.15;letter-spacing:-.01em;
  font-variant-numeric:tabular-nums;color:var(--text-primary);overflow-wrap:anywhere}
@media (max-width:560px){.nb-figure{font-size:var(--fs-h2)}}
.nb-input-field{transition:border-color var(--motion-fast,180ms) ease,box-shadow var(--motion-fast,180ms) ease}
.nb-input-field:focus,.nb-input-field:focus-within{box-shadow:0 0 0 3px var(--brand-ring)}
.nb-menu-item{min-height:36px;font-size:var(--fs-md)}
@media (pointer:coarse){
  .nb-btn{--nb-btn-h:max(var(--button-height),44px)}
  .nb-icon-btn{min-width:44px;min-height:44px}
  .nb-seg-label{min-height:44px;display:flex;align-items:center;justify-content:center}
  .nb-tab{min-height:44px}
  .nb-input{--input-height-xs:44px;--input-height-sm:44px;--input-height-md:44px}
  .nb-input-field{font-size:max(16px,var(--fs-md))}   /* a smaller field makes iOS zoom the page on focus */
  .nb-menu-item{min-height:44px}
  .side-link{min-height:44px}
  /* the top bar's own: home, search, the bell and the account each take a whole fingertip */
  .shell-header-row .brandmark,.shell-header-row .avatar,.shell-header-row .nb-icon-btn{min-width:44px;min-height:44px}
  /* the breadcrumb's places and a contact's phone numbers are links a finger taps too */
  .bc-link,.bc-plain{min-height:44px}
  .ct-tel{display:inline-flex;align-items:center;min-height:44px}
}
@media (max-width:560px){
  .nb-modal-inner{--modal-inner-x-offset:8px;--modal-inner-y-offset:8px}
  .nb-modal-content{--modal-content-max-height:calc(100dvh - 16px)}
  /* a page's row of actions shares the width: each button grows to fill its line instead of stranding a small one */
  .page-head-actions>.nb-btn,.actions-row>.nb-btn{flex:1 1 auto}
}
/* a row of buttons that wraps; on a phone each one takes its share of the line */
.actions-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;min-width:0}
/* a badge in a table keeps its words whole ("10 years 2 months"): the table scrolls sideways inside itself instead */
td .nb-badge{min-width:max-content}
/* a list's filter panel (views/list-toolbar.mjs) never runs off a short screen: it scrolls inside itself */
.nb-lt-pop{max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain}

/* THE CARD STYLE: one radius, one lift, a hover lift only where the card is a link */
[data-card="true"]{transition:box-shadow var(--motion-fast,180ms) ease,border-color var(--motion-fast,180ms) ease}
a[data-card="true"]:hover,[data-card="true"][role="button"]:hover{box-shadow:var(--shadow-float)}
/* REDUCED MOTION: transitions settle at once (the existing rules above stop the animations they own) */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{transition-duration:.01ms!important;scroll-behavior:auto!important}
}
/* the designed app's menu rows (views/app-runtime.mjs): the side panel's hover */
.side-link-rt{transition:background-color var(--motion-fast,180ms) ease}
.side-link-rt:not([aria-current="page"]):hover{background:var(--bg-card-hover)!important}

/* THE PERSON'S SETTINGS: a small window — the sections on the left, the chosen one on the right, plain blocks divided by
   a hairline (no full-width cards). The avatar menu opens it over the page; /account shows it centred. */
.acc-settings{display:grid;grid-template-columns:200px minmax(0,1fr);grid-template-rows:minmax(0,1fr);height:min(720px,calc(100dvh - 120px));min-height:0}
.acc-nav{display:flex;flex-direction:column;gap:2px;padding:14px 10px;min-height:0;overflow-y:auto;border-inline-end:1px solid var(--border);background:var(--bg)}
.acc-who{display:flex;flex-direction:column;gap:1px;padding:4px 10px 12px;min-width:0}
.acc-nav-row{display:flex;align-items:center;gap:10px;min-height:36px;padding:0 10px;border:0;border-radius:8px;background:none;color:var(--text-primary);font:inherit;font-size:var(--fs-md);text-align:start;cursor:pointer}
.acc-nav-row:hover{background:color-mix(in srgb,var(--text-primary) 6%,transparent)}
.acc-nav-row[aria-current="page"]{background:color-mix(in srgb,var(--brand) 14%,transparent);font-weight:600}
.acc-nav-row svg{color:var(--text-secondary);flex:none}
.acc-nav-row:focus-visible{outline:2px solid var(--brand);outline-offset:1px}
.acc-body{padding:18px 24px 24px;overflow-y:auto;overscroll-behavior:contain;min-width:0;min-height:0;display:flex;flex-direction:column}
.acc-body-title{margin-bottom:4px}
.acc-block{padding:16px 0;border-bottom:1px solid var(--border)}
.acc-block:last-child{border-bottom:0}
.acc-block[data-tone="danger"] .mantine-Title-root{color:var(--error)}
.acc-danger{margin-top:12px;padding-top:12px}
.acc-memory-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;border:1px solid var(--border);border-radius:10px;overflow:hidden}
.acc-memory-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;min-width:0}
.acc-memory-row+.acc-memory-row{border-top:1px solid var(--border)}
/* the shell's passkey offer (views/passkey-offer.mjs): above the page and the phone's bottom bar, centred, phone-wide at most */
.passkey-offer{position:fixed;inset-inline:16px;bottom:calc(var(--shell-bottom-bar-h, 0px) + 16px);margin-inline:auto;max-width:420px;z-index:300}
.acc-memory-text{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
/* /account: the settings as an app (AppLayout); the page scrolls as every page does */
.acc-settings.acc-settings-page{display:block;height:auto;min-height:0}
.acc-body.acc-body-page{padding:0;overflow:visible}
@media (max-width:640px){.acc-settings{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);height:calc(100dvh - 96px)}.acc-nav{flex-direction:row;overflow-x:auto;border-inline-end:0;border-bottom:1px solid var(--border)}.acc-who{display:none}.acc-nav-row{flex:none}.acc-nav{padding-inline-end:52px;scrollbar-width:none}.acc-nav::-webkit-scrollbar{display:none}}
.settings-close{position:absolute;top:10px;inset-inline-end:10px;z-index:2;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border:0;border-radius:8px;background:transparent;color:var(--text-secondary);cursor:pointer}
.settings-close:hover{background:color-mix(in srgb,var(--text-primary) 7%,transparent);color:var(--text-primary)}

/* ── STATES (views/states.mjs): skeletons, an empty state, a notice, a disclosure, toasts ── */
.sk{display:block;min-width:0}
.sk-bar{display:block;height:12px;border-radius:6px;background:var(--bg-card-2,rgba(0,0,0,.06))}
.sk-thin{height:10px}.sk-big{height:30px;width:40%}
.sk-w40{width:40%}.sk-w60{width:60%}.sk-w80{width:80%}.sk-w100{width:100%}
.sk-rows{background:var(--bg-card);border:1px solid var(--line);border-radius:var(--radius-lg,12px);overflow:hidden}
.sk-row{display:flex;align-items:center;gap:12px;min-height:56px;padding:8px 14px;border-top:1px solid var(--line)}
.sk-row:first-child{border-top:0}
.sk-dot{flex:none;width:28px;height:28px;border-radius:8px;background:var(--bg-card-2,rgba(0,0,0,.06))}
.sk-row-text{flex:1 1 auto;display:flex;flex-direction:column;gap:7px}
.sk-grid{display:grid;gap:14px;grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr))}
.sk-card{display:flex;flex-direction:column;gap:12px;min-height:118px;padding:16px;background:var(--bg-card);border:1px solid var(--line);border-radius:var(--radius-lg,12px)}
.sk-lines{display:flex;flex-direction:column;gap:9px}
/* the placeholders hold still: the one sign of loading is the page loader (.page-loader) */
.st-empty{display:flex;flex-direction:column;align-items:center;gap:8px;padding:36px 20px;text-align:center;background:var(--bg-card);border:1px solid var(--line);border-radius:var(--radius-lg,12px);min-width:0}
.st-empty[data-compact="true"]{padding:20px 16px;gap:6px}
.st-empty-mark{width:52px;height:52px;border-radius:15px;display:grid;place-items:center;background:var(--brand-bg);color:var(--brand);margin-bottom:4px}
.st-empty[data-compact="true"] .st-empty-mark{width:40px;height:40px;border-radius:12px}
.st-empty-title{font-size:var(--fs-lg);font-weight:600;color:var(--text-primary);overflow-wrap:anywhere}
.st-empty-text{margin:0;max-width:52ch;color:var(--text-secondary);font-size:var(--fs-md);overflow-wrap:anywhere}
.st-empty-act{margin-top:8px;display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
.st-notice{display:flex;align-items:flex-start;gap:10px;padding:12px 14px;border-radius:var(--radius-lg,12px);background:var(--bg-card);border:1px solid var(--line);min-width:0}
.st-notice[data-tone="bad"]{background:color-mix(in srgb,var(--danger) 7%,var(--bg-card));border-color:color-mix(in srgb,var(--danger) 28%,var(--line))}
.st-notice[data-tone="warn"]{background:var(--warn-bg);border-color:color-mix(in srgb,var(--warn) 25%,var(--line))}
.st-notice[data-tone="ok"]{background:var(--ok-bg);border-color:color-mix(in srgb,var(--ok) 25%,var(--line))}
.st-notice-ic{flex:none;display:inline-flex;margin-top:1px;color:var(--text-secondary)}
.st-notice[data-tone="bad"] .st-notice-ic{color:var(--danger)}.st-notice[data-tone="warn"] .st-notice-ic{color:var(--warn)}.st-notice[data-tone="ok"] .st-notice-ic{color:var(--ok)}
.st-notice-body{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:2px;font-size:var(--fs-md);overflow-wrap:anywhere}
.st-notice-title{font-weight:600;color:var(--text-primary)}
.st-notice-text{color:var(--text-primary)}
.st-notice-remedy{color:var(--text-secondary);font-size:var(--fs-sm)}
.st-notice-act{flex:none;display:flex;gap:8px;align-items:center}
@media (max-width:560px){.st-notice{flex-wrap:wrap}.st-notice-act{width:100%;padding-left:28px}}
.st-disc{display:flex;flex-direction:column;min-width:0}
.st-disc-row{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 4px;border:0;background:none;font:inherit;font-size:var(--fs-md);color:var(--text-primary);text-align:left;cursor:pointer;border-radius:10px;width:100%}
.st-disc-row:focus-visible{outline:2px solid var(--brand);outline-offset:-2px}
.st-disc-chev{flex:none;display:inline-flex;color:var(--text-secondary);transition:transform var(--motion-fast,180ms) ease}
.st-disc[data-open="true"] .st-disc-chev{transform:rotate(90deg)}
.st-disc-summary{flex:1 1 auto;min-width:0;font-weight:600;overflow-wrap:anywhere}
.st-disc-meta{flex:none;color:var(--text-secondary);font-size:var(--fs-sm)}
.st-disc-panel{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--motion-base,320ms) cubic-bezier(.32,.72,0,1)}
.st-disc[data-open="true"] .st-disc-panel{grid-template-rows:1fr}
.st-disc-inner{overflow:hidden;min-height:0;min-width:0}
.st-toasts{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(max(20px, var(--shell-bottom-bar-h, 0px) + 12px) + env(safe-area-inset-bottom, 0px));z-index:1600;display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:none;width:min(440px,calc(100vw - 32px))}
.st-toast{pointer-events:auto;display:flex;align-items:center;gap:10px;min-height:44px;max-width:100%;padding:6px 8px 6px 14px;border-radius:14px;background:var(--text-primary);color:var(--bg-card);box-shadow:var(--float);font-size:var(--fs-md);animation:st-toast-in var(--motion-base,320ms) cubic-bezier(.32,.72,0,1)}
.st-toast[data-tone="bad"] .st-toast-ic{color:#f2a49b}
.st-toast-ic{flex:none;display:inline-flex;opacity:.9}
.st-toast-text{flex:1 1 auto;min-width:0;overflow-wrap:anywhere;padding:6px 0}
.st-toast-act{flex:none;min-height:36px;padding:0 12px;border:0;border-radius:10px;background:color-mix(in srgb,var(--bg-card) 16%,transparent);color:inherit;font:inherit;font-weight:600;cursor:pointer}
.st-toast-act:focus-visible{outline:2px solid var(--bg-card);outline-offset:1px}
@keyframes st-toast-in{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:none}}

/* ── A BACK LINK a view draws inside itself (a record opened in a host's strip): a chevron and where it leads ── */
.page-back{flex:1 0 100%;display:inline-flex;align-items:center;gap:0;align-self:flex-start;min-height:32px;margin-left:-6px;max-width:100%;color:var(--brand-hover);text-decoration:none;font-size:var(--fs-md);border-radius:8px;width:max-content;flex-basis:auto}
.page-back span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.page-back:hover span{text-decoration:underline;text-underline-offset:3px}
.page-back:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.page-back:active{opacity:.6}

/* ── SHEETS (views/form.mjs Sheet, ConfirmSheet): from the right on a wide screen, from the bottom on a phone ── */
/* EVERY DRAWER AND DIALOG: ITS TITLE BAR SITS FLUSH AT THE TOP. Their content is a Mantine Paper, so the theme's card
   padding (Paper p="lg", written inline) lands on the box that scrolls, and a sticky title bar stops 24 px below its top
   edge with the scrolling content showing through the gap. The edges belong to the header and the body (the
   Drawer's or Modal's `padding`), so the content box has none. The bar wears the surface it sits on, and a hairline
   under it once something has scrolled beneath it (always, where a browser cannot tell). */
.nb-drawer-content,.nb-modal-content{padding:0!important}
.nb-drawer-content>header,.nb-modal-content>header{top:0;background-color:inherit;box-shadow:0 1px 0 var(--border)}
@keyframes nb-head-divide{from{box-shadow:0 1px 0 transparent}to{box-shadow:0 1px 0 var(--border)}}
@supports (animation-timeline:scroll()){
  .nb-drawer-content>header,.nb-modal-content>header{box-shadow:none;animation:nb-head-divide linear both;animation-timeline:scroll(nearest block);animation-range:0 12px}
}
/* a sheet over a page (Configuration's alarm): its tabs stay under its title bar, so where you are in it is one reach
   away however far you scrolled; --sheet-head-h is the bar's height (explorer.mjs measures it) */
.ex-sheet-drawer .nb-drawer-content{--sheet-head-h:0px}
.ex-sheet-drawer [data-testid="rt-tabs"]:not([data-testid="rt-tabs"] *)>[data-testid="rt-tabs-bar"]{position:sticky;top:var(--sheet-head-h);z-index:3;background:var(--bg-card)}
.nb-sheet-grab{display:flex;justify-content:center;padding:8px 0 2px;cursor:grab}
.nb-sheet-grab span{width:38px;height:5px;border-radius:3px;background:color-mix(in srgb,var(--text-secondary) 35%,transparent)}
.nb-sheet-head{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:8px;padding:0 0 12px;min-height:44px}
.nb-sheet-back{display:inline-flex!important;align-items:center;gap:0;min-height:44px;max-width:100%;overflow:hidden;white-space:nowrap;color:var(--brand,var(--accent));font-size:var(--fs-md)}
.nb-sheet-back span{overflow:hidden;text-overflow:ellipsis}
.nb-sheet-back:active{opacity:.6}
.nb-sheet-title{outline:none;margin:0;font-size:var(--fs-lg);line-height:22px;font-weight:600;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nb-sheet-close{display:inline-grid!important;place-items:center;width:44px;height:44px;border-radius:22px;color:var(--text-secondary)}
.nb-sheet-close:hover{background:var(--bg-card-2)}
.nb-sheet-page{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:22px;padding-bottom:16px}
.nb-sheet-page[data-dir="push"]{animation:nb-push var(--motion-base,320ms) cubic-bezier(.32,.72,0,1)}
.nb-sheet-page[data-dir="pop"]{animation:nb-pop var(--motion-base,320ms) cubic-bezier(.32,.72,0,1)}
@keyframes nb-push{from{opacity:.4;transform:translateX(28%)}to{opacity:1;transform:none}}
@keyframes nb-pop{from{opacity:.4;transform:translateX(-18%)}to{opacity:1;transform:none}}
.nb-confirm{display:flex;flex-direction:column;gap:8px}
.nb-confirm-words{display:flex;flex-direction:column;gap:6px;padding:20px 20px 16px;text-align:center;background:var(--bg-card);border-radius:14px}
.nb-confirm-title{margin:0;outline:none;font-size:var(--fs-lg);font-weight:600;line-height:1.3;color:var(--text-primary)}
.nb-confirm-text{margin:0;color:var(--text-secondary);font-size:var(--fs-md)}
.nb-confirm-subject{margin:0;color:var(--text-primary);font-size:var(--fs-md);font-weight:600;overflow-wrap:anywhere}
.nb-confirm-acts{display:flex;flex-direction:column;gap:8px}
.nb-confirm-btn{min-height:50px;border:0;border-radius:14px;background:var(--bg-card);font:inherit;font-size:var(--fs-lg);font-weight:600;color:var(--brand-hover);cursor:pointer;transition:background-color var(--motion-fast,180ms) ease}
.nb-confirm-btn[data-danger="true"]{color:var(--danger)}
.nb-confirm-btn:hover{background:color-mix(in srgb,var(--bg-card) 90%,var(--text-primary))}
.nb-confirm-btn:active{background:var(--bg-card-2)}
.nb-confirm-btn:focus-visible{outline:2px solid var(--brand);outline-offset:-2px}
.nb-confirm-btn:disabled{opacity:.6;cursor:default}
.nb-confirm-cancel{color:var(--text-primary);font-weight:500}
.nb-confirm-modal .nb-modal-content{background:var(--bg);padding:8px!important}
.nb-confirm-modal .nb-confirm-acts{flex-direction:row-reverse}
.nb-confirm-modal .nb-confirm-btn{flex:1 1 0;min-height:44px;font-size:var(--fs-md)}
.nb-confirm-modal .nb-confirm-words{background:transparent;padding:16px 12px 8px}
/* a typed-in row's placeholder reads as a hint, never as a value */
.form-input input::placeholder{color:var(--text-tertiary);font-weight:400;opacity:1}
/* a row that opens something answers a press */
.form-row{transition:background-color var(--motion-fast,180ms) ease}
a.form-row:hover,button.form-row:hover:not(:disabled){background:var(--bg-card-hover,rgba(0,0,0,.025))}
a.form-row:active,button.form-row:active:not(:disabled){background:var(--bg-card-2)}
/* a row of an explorer's overview (latest, recently opened): opens a place */
.ex-home-row{transition:background-color var(--motion-fast,180ms) ease}
button.ex-home-row:hover{background:var(--bg-card-hover)}
button.ex-home-row:active{background:var(--bg-card-2)}
button.ex-home-row:focus-visible{outline:2px solid var(--brand);outline-offset:-2px}

/* ── SORTABLE LISTS (views/sortable-list.mjs): on a mouse the handle and the "…" show with the row's hover or focus ── */
.sortable-handle,.sortable-more{flex:none;width:32px;height:32px;display:inline-grid!important;place-items:center;border:0;border-radius:8px;background:transparent;color:var(--text-secondary);touch-action:none;transition:opacity var(--motion-fast,180ms) ease,background-color var(--motion-fast,180ms) ease}
.sortable-handle[data-off="true"]{opacity:.35}
.sortable-handle:focus-visible,.sortable-more:focus-visible{outline:2px solid var(--brand);outline-offset:-2px}
.sortable-more:hover,.sortable-handle:hover{background:var(--bg-card-2)}
@media (hover:hover) and (pointer:fine){
  .sortable-row .sortable-handle,.sortable-row .sortable-more{opacity:0}
  .sortable-row:hover .sortable-handle:not([data-off="true"]),.sortable-row:focus-within .sortable-handle:not([data-off="true"]),.sortable-row[data-lifted="true"] .sortable-handle,
  .sortable-row:hover .sortable-more,.sortable-row:focus-within .sortable-more,.sortable-more[aria-expanded="true"]{opacity:1}
}
@media (pointer:coarse){.sortable-handle,.sortable-more{width:44px;height:44px}}

/* ── TOUCH: on a touch screen every control of the shared views is at least 44 px ── */
@media (pointer:coarse){
  .nb-sheet .nb-btn,.nb-sheet .nb-icon-btn{--nb-btn-h:max(var(--button-height),44px);min-height:44px;min-width:44px}
  .nb-sheet .nb-input{--input-height-xs:44px;--input-height-sm:44px}
  .page-back{min-height:44px}
}
@media (prefers-reduced-motion:reduce){
  .sk-bar,.sk-dot,.st-toast,.nb-sheet-page{animation:none!important}
  .st-disc-panel{transition:none}
}

/* ── THE ASSISTANT'S TOOLS (views/assistant.mjs) under the message: icons for attach, a website and a new conversation (their
   names in the tooltip and for screen readers), Send with its word; one row that never cuts a word, 44 px on a phone ── */
.as-tools{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.as-tools-start{display:flex;align-items:center;gap:2px;min-width:0}
.as-tool{color:var(--text-secondary)!important}
.as-tool:hover:not(:disabled){color:var(--brand,var(--accent))!important}
.as-tool[aria-pressed="true"]{color:var(--brand,var(--accent))!important}
.as-send{flex:none}
@media (max-width:767px),(pointer:coarse){
  .as-tool{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important}
  .as-send{min-height:44px}
}

/* ── THE FRONT DOOR (views/home.mjs) — the page at "/" after sign-in: the mark, a question, an input. Nothing else: the
   shell draws this page in the same frame as every app (the rail, the header, no breadcrumb).
   One centred column on the ground; the mark large until the conversation starts, then small beside the greeting so
   the conversation gets the room. ── */
/* exactly the room between the shell's fixed top bar and footer: the conversation scrolls inside, the input stays on screen */
.dh{height:calc(100dvh - var(--app-shell-header-offset,0px) - var(--app-shell-footer-offset,0px));flex:none;min-height:0;display:flex;justify-content:center;overflow:hidden;
  background:radial-gradient(ellipse 60% 48% at 50% 34%,color-mix(in srgb,var(--brand-bg,color-mix(in srgb,var(--brand) 12%,var(--bg))) 75%,transparent),transparent 72%),var(--bg)}
.dh-col{width:min(760px,100%);height:100%;min-height:0;display:flex;flex-direction:column;padding:clamp(14px,4vh,48px) var(--shell-gutter) clamp(12px,3vh,32px)}
.dh-hero{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:clamp(6px,1.6vh,16px)}
.dh-figure{line-height:0;display:block;color:var(--brand)}
.dh-figure svg{width:clamp(76px,15vh,112px);height:auto;overflow:visible}
.dh-words{display:flex;flex-direction:column;gap:4px;min-width:0}
.dh-greet{margin:0;font-family:var(--font-brand);font-size:var(--fs-display);line-height:1.12;font-weight:600;letter-spacing:-.02em;color:var(--text-primary,var(--ink));text-wrap:balance}
.dh-question{margin:0;font-size:var(--fs-lg);line-height:1.4;color:var(--text-secondary,var(--muted))}
.dh[data-talked] .dh-hero{flex:none;flex-direction:row;justify-content:flex-start;text-align:start;gap:14px;padding-bottom:6px}
.dh[data-talked] .dh-figure svg{width:52px}
.dh[data-talked] .dh-greet{font-size:var(--fs-xl)}
.dh[data-talked] .dh-question{font-size:var(--fs-md)}
.dh-talk{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:14px;padding:10px 2px 16px;scrollbar-width:thin}
.dh:not([data-talked]) .dh-talk{flex:0 0 0;padding:0;overflow:hidden}
/* before the first word the greeting and the input are one group, held a little above the middle: nothing else is on
   the page, so the input sits right under the question instead of at the foot of an empty screen */
.dh:not([data-talked]) .dh-hero{flex:none;margin-top:auto}
.dh:not([data-talked]) .dh-bottom{margin-bottom:auto;padding-top:clamp(20px,4.5vh,40px);padding-bottom:clamp(16px,7vh,72px)}
.dh-line{max-width:min(88%,620px);font-size:var(--fs-md);line-height:1.55;color:var(--text-primary,var(--ink));overflow-wrap:anywhere;animation:dh-rise .28s var(--ease-out) both}
.dh-you{align-self:flex-end;background:var(--brand-bg,color-mix(in srgb,var(--brand) 12%,var(--bg)));padding:9px 15px;border-radius:20px 20px 6px 20px}
.dh-agent{align-self:flex-start;display:flex;gap:10px;align-items:flex-start}
.dh-agent .mark-live{margin-top:3px;color:var(--brand)}
.dh-agent-text{min-width:0;padding-top:2px}
.dh-agent-text p{margin:0 0 6px}.dh-agent-text p:last-child{margin-bottom:0}
.dh-thinking{align-items:center;color:var(--text-tertiary,var(--muted));font-size:var(--fs-sm)}
.dh-bottom{flex:none;display:flex;flex-direction:column;align-items:stretch;gap:clamp(12px,2.4vh,20px);padding-top:4px}
.dh-ask{display:flex;align-items:center;gap:8px;min-height:56px;padding:6px 6px 6px 22px;background:var(--bg-card,var(--panel));border:1px solid var(--border,var(--line2));border-radius:999px;
  box-shadow:0 14px 34px -24px color-mix(in srgb,var(--text-primary,var(--ink)) 55%,transparent);transition:border-color var(--motion-fast,180ms) ease,box-shadow var(--motion-fast,180ms) ease}
.dh-ask:focus-within{border-color:var(--brand);box-shadow:0 0 0 4px var(--brand-ring),0 14px 34px -24px color-mix(in srgb,var(--text-primary,var(--ink)) 55%,transparent)}
.dh-input{flex:1;min-width:0;height:44px;border:0;outline:0;background:none;font:inherit;font-size:var(--fs-lg);color:var(--text-primary,var(--ink))}
.dh-input::placeholder{color:var(--text-tertiary,var(--muted));opacity:1}
/* the one hand-written FILLED control: it wears the same resolved pair the component runtime paints
   (design-tokens.mjs controlPair -> --brand-control / --brand-control-ink), never the brand plus a fixed ink —
   white on the brand itself was 3.80:1 in the light, and the brand's dark value took it lower still */
.dh-send{flex:none;width:44px;height:44px;border-radius:50%;border:0;display:grid;place-items:center;cursor:pointer;background:var(--brand-control,var(--brand));color:var(--brand-control-ink,var(--accent-ink));
  transition:background-color var(--motion-fast,180ms) ease,transform .12s ease}
.dh-send:hover:not(:disabled){background:var(--brand-hover,var(--brand))}
.dh-send:active:not(:disabled){transform:scale(.94)}
.dh-send:disabled{background:var(--brand-bg,color-mix(in srgb,var(--brand) 12%,var(--bg)));color:var(--text-tertiary,var(--muted));cursor:default}
.dh-send:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
.dh-none{margin:0;text-align:center;color:var(--text-secondary,var(--muted));font-size:var(--fs-md)}
.dh-fresh{align-self:center;border:0;background:none;padding:4px 10px;border-radius:999px;font:inherit;font-size:var(--fs-sm);color:var(--text-tertiary,var(--muted));cursor:pointer}
.dh-fresh:hover{color:var(--text-primary,var(--ink));background:var(--bg-card-hover,var(--accent-soft))}
.dh-fresh:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.dh-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
/* "Shared with me" (views/shared-with-me.mjs): under the input on the lean Home, under the panels on a Home dashboard.
   On the lean Home the column never scrolls, so the list scrolls inside its own room. */
.shared{display:flex;flex-direction:column;gap:8px;min-width:0}
.shared-title{margin:0;font-size:var(--fs-sm);font-weight:600;color:var(--text-secondary,var(--muted))}
.shared-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px;min-width:0}
.dh .shared-list{max-height:clamp(120px,24vh,240px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.shared-row{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 12px;min-height:44px;padding:10px 14px;box-sizing:border-box;
  background:var(--bg-card,var(--panel));border:1px solid var(--border,var(--line2));border-radius:12px;color:var(--text-primary,var(--ink));text-decoration:none;min-width:0}
a.shared-row:hover{background:var(--bg-card-hover,var(--accent-soft))}
a.shared-row:focus-visible{outline:2px solid var(--brand);outline-offset:2px}
.shared-name{font-weight:600;overflow-wrap:anywhere;min-width:0}
.shared-meta{display:flex;flex-wrap:wrap;gap:4px 10px;font-size:var(--fs-sm);color:var(--text-secondary,var(--muted));min-width:0}
.shared-access{color:var(--text-primary,var(--ink))}
@media (max-width:560px){
  .dh-col{padding:clamp(12px,3vh,28px) 16px 14px}
  .dh-greet{font-size:var(--fs-h1)}
  .dh-ask{min-height:52px;padding-left:18px}
  .dh-input{font-size:var(--fs-md)}
}
@media (max-height:620px){ .dh-figure svg{width:68px} .dh-greet{font-size:var(--fs-h1)} }
@media (prefers-reduced-motion:reduce){ .dh *,.dh *::before{animation:none!important;transition:none!important} }
/* the way back to the agent: the rail's first row (his face) and the brand mark, in the rail and in the phone's header */
/* the rule between rail bands. It is drawn where the DATA changes band (shell.app-group), never after the Nth icon:
   a position would be a second place the order lives, and the two would drift. */
/* A 22px hairline with 7px of air read as a list with a speck in it, not as two bands — the grouping was there in
   the DOM and invisible on screen. A band break needs SPACE first and a rule second: the gap is what the eye reads,
   the line only confirms it. */
.nav-band{width:28px;margin:16px auto;border:0;border-top:1px solid var(--border, var(--line2));opacity:.9}
.nav-grid .nav-band{display:none}   /* the phone grid wraps; a rule across a wrapped grid means nothing */
.nav-home{display:flex;line-height:0;color:var(--brand-hover)}.nav-home svg{width:26px;height:auto;overflow:visible}
.bb-tab .nav-home svg{width:26px}
a.shell-brand:focus-visible,a.brandmark:focus-visible{outline:2px solid var(--brand);outline-offset:-2px;border-radius:var(--radius-md)}
a.brandmark{text-decoration:none;border-radius:8px}

/* ── the system mark (views/mark.mjs) ────────────────────────────────────────────────────────────────────────────
   Nested rings turning against each other with agents going round them. MOTION MARKS WHERE YOU ARE: the rings turn
   on the active icon and under the pointer, and are still everywhere else — seven turning icons is a distraction in
   a room where somebody is handling a burglary. prefers-reduced-motion stops it dead, which matters at 3am. */

/* ── THE DIRECTORY (apps/directory, views/directory-tree.mjs) — the containment tree down the left, the thing on the
   right. The rails are a BORDER, not a colour: depth is structure, and colour in this product means state. */
.dir{display:flex;min-height:0;height:100%}
.dir-tree{flex:0 0 clamp(220px,22vw,320px);min-width:0;overflow:auto;padding:10px 6px 24px;border-right:1px solid var(--border,var(--line2))}
.dir-node{min-width:0}
.dir-row{display:flex;align-items:center;gap:2px;border-radius:8px;padding:1px 4px}
.dir-row.now{background:var(--brand-bg,color-mix(in srgb,var(--brand) 12%,var(--bg)))}
.dir-row:hover:not(.now){background:var(--bg-card-hover,var(--panel))}
.dir-twist{flex:none;width:22px;height:26px;display:grid;place-items:center;color:var(--text-tertiary,var(--muted));border-radius:6px}
.dir-name{flex:1;min-width:0;text-align:start;padding:3px 4px;color:var(--text-primary,var(--ink))}
.dir-row.now .dir-name{color:var(--brand-hover);font-weight:600}
.dir-kids{margin-left:11px;padding-left:10px;border-left:1px solid var(--border,var(--line2))}
.dir-wait{padding:4px 8px}
/* the blank right-hand side carries the mark, STILL: nothing is happening, so nothing turns. It is a held breath,
   not an instruction — "pick something on the left" told people what they could already see. */
.dir-blank{height:100%;display:grid;place-items:center;color:var(--border,var(--line2))}
.dir-body{flex:1;min-width:0;overflow:auto}
@media (max-width:860px){.dir-tree{flex-basis:100%;border-right:0}.dir[data-open] .dir-tree{display:none}}

/* The one form that makes and changes a thing: groups on the left, fields beside them, Save pinned below. */
.crud{display:flex;flex-direction:column;gap:14px;min-width:0}
.crud-tabs{display:flex;gap:18px;min-width:0;align-items:flex-start}
.crud-rail{width:200px;flex:0 0 200px;gap:2px}
.crud-panel{flex:1 1 auto;min-width:0}
.crud-wrong{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;border-radius:50%;font-size:var(--fs-sm);font-weight:600;background:var(--gap-bg);color:var(--danger)}
.crud-empty{margin:0;color:var(--text-secondary)}
@media (max-width:767px){
  .crud-tabs{flex-direction:column;gap:10px}
  .crud-rail{max-width:none;min-width:0;overflow-x:auto;flex-wrap:nowrap}
}
.crud-problems{margin:0;padding-left:18px;color:var(--danger);font-size:var(--fs-sm)}

/* A form with a rail opens as a centred modal: the rail and the fields need width beside each other. */
.crud-modal{display:flex;flex-direction:column;min-height:0;flex:1 1 auto;padding:16px}
.crud-modal-inline{display:flex;flex-direction:column;background:var(--bg-card);border:1px solid var(--border);border-radius:14px}
.crud-modal-head{display:flex;align-items:center;gap:12px;padding:0 0 12px}
.crud-modal-title{margin:0;flex:1 1 auto;min-width:0;font-size:var(--fs-lg);font-weight:600;letter-spacing:-.01em}
.crud-modal-close{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:0;border-radius:8px;background:none;color:var(--text-secondary);cursor:pointer}
.crud-modal-close:hover{background:var(--bg-card-hover)}
.crud-modal-close:focus-visible{outline:2px solid var(--brand);outline-offset:-2px}
/* THE DIALOG DOES NOT RESIZE WHEN A GROUP IS CHOSEN. The groups hold different numbers of fields, so a body that
   grows to fit would make the whole modal jump every time the rail is clicked, and the rail would move out from
   under the pointer. The body keeps one height and scrolls inside it. */
.crud-modal-body{flex:0 0 auto;height:clamp(240px,52dvh,460px);overflow:auto}
.crud-note{margin:0 0 4px;font-size:var(--fs-sm);color:var(--text-secondary);max-width:70ch}

/* ── a thing's page: its tabs, its head, the tools a tab carries, several rows ticked ─────────────────────────────── */
/* the tabs read as the page's sections: more room, a clear line under the open one in the brand colour, a soft hover */
.page-tabs .mantine-Tabs-list{gap:2px;border-bottom:1px solid var(--line)}
.page-tabs .mantine-Tabs-list::before{border-bottom-color:var(--line)}
.page-tabs .mantine-Tabs-tab{padding:10px 16px;font-size:var(--fs-md);font-weight:500;color:var(--text-secondary,var(--muted));border-bottom:3px solid transparent;margin-bottom:-1px;
  border-radius:var(--radius-sm,6px) var(--radius-sm,6px) 0 0;transition:background-color .15s ease,color .15s ease,border-color .15s ease}
.page-tabs .mantine-Tabs-tab:hover{background:color-mix(in srgb,var(--accent) 7%,transparent);color:var(--ink);border-bottom-color:color-mix(in srgb,var(--accent) 30%,transparent)}
.page-tabs .mantine-Tabs-tab[data-active]{color:var(--ink);font-weight:600;border-bottom-color:var(--brand);background:color-mix(in srgb,var(--accent) 5%,transparent)}
.page-tabs .mantine-Tabs-tab[data-active] .mantine-Tabs-tabSection{color:var(--brand)}
.page-tabs .mantine-Tabs-tab:focus-visible{outline:2px solid var(--brand);outline-offset:-2px}
.rt-detail-head{display:flex;align-items:center;gap:var(--space-sm) var(--space-md);flex-wrap:wrap;min-width:0}
.rt-head-actions{margin-left:auto;display:flex;gap:var(--space-xs,6px);flex-wrap:wrap;align-items:center}
/* a tab row with something at its end (PriorityTabs `end`: a page's marks and actions): right-aligned, centred on the
   strip, the line under the tabs running beneath it; the tabs fit in what it leaves */
.tabs-row{display:flex;align-items:stretch;min-width:0;width:100%}
.tabs-end{flex:0 1 auto;min-width:0;max-width:70%;display:flex;align-items:center;justify-content:flex-end;padding:2px 0 2px 8px;border-bottom:1px solid var(--line)}
.tabs-row[data-variant="pills"]>.tabs-end{border-bottom:0}
.tabs-end>.rt-detail-head{justify-content:flex-end;gap:var(--space-xs,6px) var(--space-sm)}
/* on the tab row the thing's own actions are one group set apart from the tabs, led by what the thing is ("Site") */
.rt-head-actions[data-owner]{flex-wrap:nowrap;padding-left:var(--space-sm);border-left:1px solid var(--line);min-width:0}
.rt-head-owner{font-size:var(--fs-sm);font-weight:600;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:16ch;margin-right:2px}
/* a page with one tab: its name and the page's actions on one row */
.rt-lone-tab-head{display:flex;align-items:center;gap:var(--space-sm);flex-wrap:wrap;margin-bottom:8px;min-width:0}
.rt-lone-tab-head>.rt-detail-head{margin-left:auto}
.rt-tab-tools{display:flex;justify-content:flex-end;gap:6px;margin-bottom:8px}
/* what the header does not carry, at the top of the first tab: Move, other actions, the careful ones */
.rt-page-tools{flex-wrap:wrap;justify-content:flex-start}
/* who a thing is shared with, on its Contacts tab: one row each, Stop sharing at its end */
.rt-shared-list{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-direction:column}
.rt-shared-list>li{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;padding:2px 0;border-top:1px solid var(--line)}
.rt-shared-list>li>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* a tab's own actions in its toolbar; the main one (Trigger a test alarm) with what the site's receivers say before it */
span.rt-tab-home{display:inline-flex;gap:8px;align-items:center;flex-wrap:wrap}
.rt-tab-primary{display:inline-flex;align-items:center;gap:8px}

/* A FEED'S TOOLBAR (views/site-feeds.mjs FilterBar): finding on the left (search, period, Filters), the list's own tools
   and its main action at the right end, last and filled. The two groups wrap as wholes, the end group staying right.
   On a phone: the search, the period, then the same icons at the right end, the main action last. */
.feed-bar{display:flex;flex-wrap:wrap;gap:8px 16px;align-items:center;min-width:0}
.feed-bar-find{display:flex;flex-wrap:wrap;gap:8px;align-items:center;flex:1 1 0;min-width:min(100%,520px)}
.feed-bar-search{flex:1 1 180px;min-width:150px;max-width:300px}
.feed-bar-end{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:flex-end;margin-left:auto}
.feed-bar-narrow{flex-direction:column;align-items:stretch;flex-wrap:nowrap;gap:8px}

/* THE EVENTS LIST: one line per event on a laptop. When it came, what it means (its code quieter after), its type,
   zone, what came of it (the alarm as a link, else a quiet dash), where it came from; long words end in "…" with the
   whole on hover. Day headings stay in view under the header while their day scrolls (the frame clips sideways
   instead of scrolling, so it is no scroll box of its own). */
.nb-list-frame.feed-frame{overflow:clip;container-type:inline-size}
.feed-table{width:100%}
.feed-table th,.feed-table td{white-space:nowrap;padding-left:12px;padding-right:12px}
.feed-table td{vertical-align:middle}
/* the event takes what the other columns leave, never less than its own minimum, and clips inside itself: nothing in
   it is ever drawn over the type beside it */
.feed-table td.feed-ev{width:100%;max-width:0;min-width:200px;overflow:hidden}
.feed-c-type>*{min-width:max-content}
.feed-row{cursor:pointer}
.feed-row[data-open]{background:var(--brand-bg)}
.feed-time{font-variant-numeric:tabular-nums;color:var(--text-secondary)}
.feed-ev-line{display:flex;align-items:center;gap:8px;min-width:0}
.feed-ev-text{flex:0 1 auto;font-weight:600;color:var(--text-primary);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.feed-ev-wrap{white-space:normal;overflow-wrap:anywhere}
/* its code is part of the same line of words, so it is cut with them, never drawn past the cell */
.feed-ev-code{margin-left:6px;font-weight:400;font-size:var(--fs-xs);color:var(--text-tertiary);font-variant-numeric:tabular-nums}
.feed-ev-note{flex:0 1000 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;font-size:var(--fs-xs);color:var(--text-secondary)}
.feed-clip{display:block;max-width:180px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.feed-c-handled .feed-clip{max-width:130px}
.feed-none{color:var(--text-tertiary)}
.feed-alarm{display:inline-flex;align-items:center;gap:4px;font-weight:600;white-space:nowrap;max-width:100%;min-width:0}
.feed-alarm>svg{flex:none}
/* the workflow that handled an event's alarm, by name with its mark: opens the run over the page */
.feed-run{display:inline-flex;align-items:center;gap:4px;white-space:nowrap;color:var(--brand-hover);max-width:100%;min-width:0}
.feed-run>svg{flex:none}
.feed-run>.feed-clip{max-width:140px}
.feed-run:hover{text-decoration:underline;text-underline-offset:2px}
.feed-day td{position:sticky;top:var(--shell-header-h,56px);z-index:1;background:var(--muted-bg);padding-top:6px;padding-bottom:6px}
.feed-day-label{font-size:var(--fs-xs);font-weight:600;color:var(--text-secondary)}
/* as the list narrows (a laptop with an event open beside it, a tablet), the quieter columns fold away first: the
   type, where it came from, who handled it, the customer (the site stays) */
@container (max-width:1360px){.feed-c-type{display:none}}
@container (max-width:1240px){.feed-clip{max-width:140px}.feed-run>.feed-clip{max-width:110px}}
@container (max-width:1100px){.feed-c-from,.feed-c-handled{display:none}}
@container (max-width:900px){.feed-c-cust{display:none}}
@container (max-width:760px){.feed-c-zone{display:none}.feed-clip,.feed-run>.feed-clip{max-width:100px}.feed-table td.feed-ev{min-width:140px}}
.feed-cards{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.feed-day-card{position:sticky;top:var(--shell-header-h,56px);z-index:1;background:var(--bg);padding:8px 2px 4px}
.feed-card{box-sizing:border-box;width:100%;cursor:pointer;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:8px 10px;min-height:44px;
  border-radius:var(--radius-md,8px);border:1px solid var(--border);background:var(--bg-card)}
.feed-card[data-open]{background:var(--brand-bg)}
.rt-bulk-row{display:flex;justify-content:flex-end;align-items:center;min-height:36px}
/* PLAIN TABLES: one value per cell, on one line, cut with "…" and whole on hover (views/cell.mjs); the details of a
   row in its panel (the Event log's, beside the list on a wide screen, a sheet on a phone) */
.nb-cell1{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;min-width:0}
.nb-cell1-dim{color:var(--text-secondary)}
.nb-cell1.feed-refused{color:var(--danger);font-weight:600}
.nb-cell1.feed-cw{max-width:200px}
.feed-table td.feed-c-act{width:100%;max-width:0}
.feed-act{display:flex;align-items:center;gap:8px;min-width:0}
.feed-act>.nb-cell1{flex:0 1 auto}
.feed-row[data-refused] td:first-child{box-shadow:inset 3px 0 0 var(--danger)}
.feed-card-line{display:flex;align-items:center;gap:8px;min-width:0}
.feed-card-line>.nb-cell1{flex:0 1 auto;font-size:var(--fs-xs)}
.feed-card-line>.nb-cell1.feed-cell-main{font-size:var(--fs-sm);font-weight:600;color:var(--text-primary)}
@container (max-width:1040px){.nb-cell1.feed-cw{max-width:150px}}
@container (max-width:800px){.nb-cell1.feed-cw{max-width:110px}}
.feed-facts{display:grid;grid-template-columns:minmax(80px,34%) minmax(0,1fr);gap:8px 12px;margin:0}
.feed-facts dt{font-size:var(--fs-sm);color:var(--text-secondary)}
.feed-facts dd{margin:0;font-size:var(--fs-sm);overflow-wrap:anywhere;min-width:0}
.rt-app-tabs{display:flex;flex-direction:column;min-width:0}
.rt-app-tabs-bar{padding:var(--shell-gutter-y,12px) var(--shell-gutter,16px) 0}

/* the Filters popover of a list: each filter takes the popover's width */
.list-filters-pop > * { max-width: none !important; flex: none !important; }

/* a quiet icon button that cannot be used now is simply faint, never drawn as if pressed */
.nb-icon-btn[data-variant="subtle"]:disabled, .nb-icon-btn[data-variant="subtle"][data-disabled] { background: transparent; opacity: .35; }

/* THE HEAD OF A LIST (views/list-head.mjs): the name and its hint take the room left and wrap their words; the tools
   stay right-aligned at the top, never pushed onto a line of their own by a long hint. Only where the list itself is
   narrower than 720px do they go under the name, still right-aligned, the main action right-most. */
.nb-list-head{container-type:inline-size;container-name:listhead;min-width:0}
.nb-list-head-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:nowrap}
.nb-list-head-text{flex:1 1 auto;min-width:0;overflow-wrap:break-word}
.nb-list-head-tools{flex:0 0 auto;max-width:70%;display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:10px}
@container listhead (max-width: 720px){
  .nb-list-head-row{flex-wrap:wrap}
  .nb-list-head-tools{flex-basis:100%;max-width:100%;justify-content:flex-end}
}

/* THE TOOLS OF EVERY LIST (views/list-toolbar.mjs): Filter, Columns, Refresh, Export as one quiet cluster of icon
   buttons of one size; a count sits on Filter while filters are in use. Finger-sized (44px) on a phone. */
.nb-lt{display:inline-flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px;min-width:0;max-width:100%;margin-left:auto}
.nb-lt-slot,.nb-lt-filter{position:relative;display:inline-flex}
.nb-lt-count{position:absolute;top:-4px;right:-4px;pointer-events:none;min-width:18px;height:18px;padding:0 4px;font-size:var(--fs-xs)}

/* EVERY ICON BUTTON IS THE SAME (lib/mantine-core.mjs ActionIcon; IconButton, ActionButton, AddButton, IconAction, the
   list tools): the icon alone at one size, 36 px with an 18 px glyph; no filled or tinted ground and never the accent;
   a quiet tint on hover, on focus and while it is pressed or its menu is open. A delete turns red on hover only. 44 px
   on a phone and a touch screen, the glyph the same. A `compact` one (a chevron in a tree row) keeps its size. */
.nb-icon{flex:none}
.nb-icon:not(.nb-icon-compact) svg[data-icon]{width:18px;height:18px}
.nb-icon.on,.nb-icon[aria-pressed="true"],.nb-icon[aria-expanded="true"],.nb-icon:focus-visible{background-color:var(--bg-card-hover);color:var(--text-primary)}
@media (hover:hover){.nb-icon.nb-icon-danger:not(:disabled):not([data-disabled]):hover{color:var(--error)}}
.nb-icon.nb-icon-danger:focus-visible{color:var(--error)}
@media (max-width:700px),(pointer:coarse){.nb-icon:not(.nb-icon-compact){min-width:44px;min-height:44px}}
.nb-act-slot{position:relative;display:inline-flex}

/* THE LIST FRAME: every list of rows in every app (a DataTable, a children tab, the call list, the events) sits in
   the same box: one hairline border, the theme's corners, a tinted head row with quiet column names, no line under
   the last row. Its head (views/list-head.mjs) sits above it. An overview's table uses it too, inside its card. */
.datatable-wrap,.nb-list-frame{border:1px solid var(--border);border-radius:var(--radius-md);
  overflow-x:auto;background:var(--bg-card)}
.datatable-wrap thead tr,.datatable-wrap thead th,.nb-list-frame thead tr{background:var(--muted-bg)}
.datatable-wrap thead th,.nb-list-frame thead th{color:var(--text-secondary);white-space:nowrap}
.datatable-wrap tbody tr:last-child td,.nb-list-frame tbody tr:last-child td{border-bottom:0}
/* a list drawn as rows of a grid (the alarm queue) has the same head row as a table's */
.nb-row-head{background:var(--muted-bg);border-bottom:1px solid var(--border)}
.nb-col-head{font-size:var(--fs-table);font-weight:600;color:var(--text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* a designed list's column heads sort on a click: the arrow is quiet, shown on the sorted column and while pointing at
   (or tabbing to) a head, so a row of heads does not read as a row of arrows */
.rt-sort-arrow{display:inline-flex;opacity:0;transition:opacity var(--motion-fast,180ms) ease}
.rt-sort-arrow[data-on]{opacity:.8}
th:hover .rt-sort-arrow:not([data-on]),button:focus-visible .rt-sort-arrow:not([data-on]){opacity:.4}
@media (pointer:coarse){.rt-sort-arrow:not([data-on]){opacity:.25}}
/* bulk.mjs: the tools for several ticked rows — "N selected", icon actions, the dustbin with its count, clear */
.nb-bulk{display:inline-flex;align-items:center;gap:4px;flex-wrap:nowrap;min-width:0}
.nb-bulk-n{white-space:nowrap;margin-right:2px}
.nb-bulk-del{position:relative;display:inline-flex}
.nb-bulk-count{position:absolute;top:-4px;right:-4px;pointer-events:none;min-width:16px;height:16px;padding:0 3px;font-size:var(--fs-sm)}
.nb-bulk-names{margin:4px 0 0;padding-left:18px;font-size:var(--fs-sm)}
.nb-bulk-names li{overflow-wrap:anywhere}
/* a plain table: one line a cell, cut with …, the whole value on hover (title) */
.nb-cell1{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;min-width:0}
.datatable-wrap td .nb-cell1{max-width:28rem}
.datatable-wrap td .nb-cell1 > *{white-space:nowrap}
