/* Fleetlayer's three faces (web/fonts/, SIL Open Font License): Inter for text, Space Grotesk for headings and
 * numbers, JetBrains Mono for code and addresses. Every service serves them at /_/fonts/ (fleetlayer_web's
 * style_errors layer answers there), so a page never falls back to the system's fonts. Included first wherever
 * web/fleetlayer.css is, and before a service's own stylesheet (pages, the Claude hub).
 */
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("/_/fonts/inter.woff2") format("woff2-variations"), url("/_/fonts/inter.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk Variable"; font-style: normal; font-display: swap; font-weight: 300 700; src: url("/_/fonts/space-grotesk.woff2") format("woff2-variations"), url("/_/fonts/space-grotesk.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono Variable"; font-style: normal; font-display: swap; font-weight: 100 800; src: url("/_/fonts/jetbrains-mono.woff2") format("woff2-variations"), url("/_/fonts/jetbrains-mono.woff2") format("woff2"); }
/* Fleetlayer's shared look: tokens, base, controls, the sign-in card and the app bar.
 * Included (include_str!) by every Fleetlayer web page: the sign-in service and the dashboard. Each keeps only its own
 * components in its own file. Change a token here and every one of them follows.
 *
 * Hallmark · genre: modern-minimal · theme: Cobalt, the same as fleetlayer.ai (site/src/styles/tokens.css): cool
 * engineered paper, charcoal ink, one cobalt signal. Fonts: Inter, Space Grotesk for headings and numbers, JetBrains
 * Mono for addresses, declared in web/fonts.css (included just before this file) and served by every service at
 * /_/fonts/. Never a system font stack: fleetlayer_web::check_page fails a page that names one.
 * states: default · hover · focus · active · disabled · loading · error · success
 */

:root {
  color-scheme: light dark;

  --color-paper: oklch(98.5% 0.004 250);
  --color-surface: oklch(100% 0 0);
  --color-surface-2: oklch(96.6% 0.005 252);
  --color-ink: oklch(24% 0.02 258);
  --color-ink-2: oklch(38% 0.018 257);
  --color-ink-3: oklch(51% 0.016 257);
  --color-rule: oklch(91.5% 0.007 255);
  --color-rule-2: oklch(85% 0.01 255);
  --color-accent: oklch(52% 0.2 258);
  --color-accent-hover: oklch(46% 0.2 260);
  --color-accent-ink: oklch(98.5% 0.004 250);
  --color-accent-soft: oklch(95% 0.028 256);
  --color-focus: oklch(55% 0.2 256);
  --color-ok: oklch(58% 0.13 152);
  --color-ok-soft: oklch(96% 0.03 152);
  --color-warn: oklch(74% 0.14 72);
  --color-warn-ink: oklch(50% 0.11 62);
  --color-warn-soft: oklch(96.5% 0.035 85);
  --color-bad: oklch(54% 0.19 27);
  --color-bad-hover: oklch(48% 0.19 27);
  --color-bad-soft: oklch(96.5% 0.022 27);
  --color-off: oklch(80% 0.01 257);
  --color-backdrop: oklch(20% 0.02 258 / 0.42);
  --shadow-pop: 0 1px 2px oklch(20% 0.04 256 / 0.06), 0 12px 32px -8px oklch(20% 0.04 256 / 0.18);
  --shadow-card: 0 1px 2px oklch(20% 0.04 256 / 0.04);

  --font-sans: "Inter Variable", "Inter", sans-serif;
  --font-display: "Space Grotesk Variable", "Space Grotesk", var(--font-sans);
  --font-mono: "JetBrains Mono Variable", "JetBrains Mono", monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-md: 0.9375rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-2xl: 1.875rem;

  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --control-h: 2.5rem;
  --control-h-sm: 2rem;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --dur-short: 140ms;
  --dur-med: 220ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-paper: oklch(17.5% 0.012 260);
    --color-surface: oklch(20.5% 0.013 260);
    --color-surface-2: oklch(24% 0.015 260);
    --color-ink: oklch(95% 0.006 255);
    --color-ink-2: oklch(81% 0.01 256);
    --color-ink-3: oklch(67% 0.014 257);
    --color-rule: oklch(28.5% 0.016 260);
    --color-rule-2: oklch(35% 0.018 260);
    --color-accent: oklch(72% 0.15 256);
    --color-accent-hover: oklch(78% 0.12 256);
    --color-accent-ink: oklch(17.5% 0.012 260);
    --color-accent-soft: oklch(28% 0.05 258);
    --color-focus: oklch(74% 0.14 256);
    --color-ok: oklch(74% 0.13 152);
    --color-ok-soft: oklch(26% 0.04 152);
    --color-warn: oklch(80% 0.13 78);
    --color-warn-ink: oklch(84% 0.11 80);
    --color-warn-soft: oklch(27% 0.04 75);
    --color-bad: oklch(70% 0.16 25);
    --color-bad-hover: oklch(75% 0.14 25);
    --color-bad-soft: oklch(27% 0.05 25);
    --color-off: oklch(44% 0.016 258);
    --color-backdrop: oklch(5% 0.01 260 / 0.6);
    --shadow-pop: 0 1px 2px oklch(0% 0 0 / 0.3), 0 12px 32px oklch(0% 0 0 / 0.45);
    --shadow-card: none;
  }
}

/* ---------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font: 400 var(--text-md) / 1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; }
button, input { font: inherit; color: inherit; }
a { color: var(--color-accent); }
.mono { font-family: var(--font-mono); }
.num-t { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
svg.i { width: 1rem; height: 1rem; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.wrap { width: 100%; max-width: 64rem; margin: 0 auto; padding: 0 var(--space-sm); }
@media (min-width: 40rem) { .wrap { padding: 0 var(--space-md); } }

/* ---------------------------------------------------------------- controls */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2xs);
  height: var(--control-h); padding: 0 var(--space-sm);
  border: 1px solid var(--color-rule-2); border-radius: var(--radius-sm);
  background: var(--color-surface); color: var(--color-ink);
  font-size: var(--text-sm); font-weight: 550; white-space: nowrap; text-decoration: none;
  cursor: pointer; user-select: none;
  transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-sm { height: var(--control-h-sm); padding: 0 var(--space-xs); }
.btn-block { width: 100%; }
.btn-primary { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); }
.btn-danger { background: var(--color-bad); border-color: var(--color-bad); color: var(--color-accent-ink); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--color-ink-2); }
.btn.is-loading { color: transparent; position: relative; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; inset: 0; margin: auto; width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--color-accent-ink); border-right-color: transparent; animation: spin 700ms linear infinite; }
.btn:not(.btn-primary):not(.btn-danger).is-loading::after { border-color: var(--color-ink-2); border-right-color: transparent; }
@media (hover: hover) {
  .btn:hover { background: var(--color-surface-2); border-color: var(--color-ink-3); }
  .btn-primary:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); }
  .btn-danger:hover { background: var(--color-bad-hover); border-color: var(--color-bad-hover); }
  .btn-ghost:hover { background: var(--color-surface-2); border-color: transparent; color: var(--color-ink); }
}

.icon-btn {
  display: inline-grid; place-items: center; position: relative;
  width: var(--control-h-sm); height: var(--control-h-sm); padding: 0;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--color-ink-2); cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}
.icon-btn::before { content: ""; position: absolute; inset: -6px; }
.icon-btn:active { transform: translateY(1px); }
.icon-btn[aria-expanded="true"] { background: var(--color-surface-2); color: var(--color-ink); }
@media (hover: hover) { .icon-btn:hover { background: var(--color-surface-2); color: var(--color-ink); } }

.label { display: block; margin-bottom: var(--space-2xs); font-size: var(--text-sm); font-weight: 550; color: var(--color-ink); }
.input {
  width: 100%; min-width: 0; height: var(--control-h); padding: 0 var(--space-xs);
  border: 1px solid var(--color-rule-2); border-radius: var(--radius-sm);
  background: var(--color-surface); color: var(--color-ink); font-size: var(--text-md);
  outline: 2px solid transparent; outline-offset: 1px;
  transition: background-color var(--dur-short) var(--ease-out);
}
.input::placeholder { color: var(--color-ink-3); }
.input:focus-visible, .input:focus { outline-color: var(--color-focus); border-color: var(--color-ink-3); }
.input[aria-invalid="true"] { border-color: var(--color-bad); }
.input:disabled { opacity: 0.55; cursor: not-allowed; }
@media (hover: hover) { .input:hover:not(:focus):not(:disabled) { background: var(--color-surface-2); } }
.field-error { margin-top: var(--space-2xs); font-size: var(--text-sm); color: var(--color-bad); }

.spinner { width: 1rem; height: 1rem; flex: none; border-radius: 50%; border: 2px solid var(--color-rule-2); border-top-color: var(--color-accent); animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

/* ---------------------------------------------------------------- login */

.login-body { min-height: 100dvh; display: grid; place-items: center; padding: var(--space-md) var(--space-sm); }
.login { width: 100%; max-width: 22rem; }
.login-brand { display: flex; align-items: center; gap: var(--space-xs); margin-bottom: var(--space-md); }
.login-brand h1 { font-size: var(--text-xl); }
.login-card {
  display: grid; gap: var(--space-sm);
  padding: var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-lg);
  background: var(--color-surface); box-shadow: var(--shadow-card);
}
.login-card .label { margin-bottom: calc(var(--space-sm) * -1 + var(--space-2xs)); }
.login-card .field-error { margin-top: calc(var(--space-sm) * -1 + var(--space-2xs)); }
.login-hint { margin-top: var(--space-sm); font-size: var(--text-sm); color: var(--color-ink-3); text-align: center; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- app bar */

.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in oklch, var(--color-paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--color-rule); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); height: 3.5rem; }
.brand { display: inline-flex; align-items: center; gap: var(--space-2xs); color: var(--color-ink); font-family: var(--font-display); font-weight: 600; font-size: var(--text-lg); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: var(--space-3xs); }
.topbar-actions form { margin: 0; }

/* ---------------------------------------------------------------- page */

main.wrap { padding-top: var(--space-lg); padding-bottom: var(--space-xl); }
.page-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: var(--space-2xs) var(--space-sm); margin-bottom: var(--space-sm); }
.page-head h1 { font-size: var(--text-xl); }
.summary { display: inline-flex; align-items: center; gap: var(--space-2xs); font-size: var(--text-sm); color: var(--color-ink-2); }

.list { border: 1px solid var(--color-rule); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-card); overflow: clip; }

/* ---------------------------------------------------------------- notices */

.notice { display: flex; gap: var(--space-2xs); padding: var(--space-xs); border-radius: var(--radius-md); font-size: var(--text-sm); line-height: 1.45; overflow-wrap: anywhere; }
.notice svg.i { margin-top: 2px; }
.notice.is-warn { background: var(--color-warn-soft); color: var(--color-warn-ink); }
.notice.is-bad { background: var(--color-bad-soft); color: var(--color-bad); }
.notice .notice-text { color: var(--color-ink); }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
  .spinner, .btn.is-loading::after { animation: spin 1.6s linear infinite !important; }
  .skeleton { animation: none !important; }
}

/* A request's detail with several lines (a proposed change's diff and text): line for line as written, in a box that
   scrolls, with a diff's added and removed lines marked. */
.detail-block {
  margin: var(--space-xs) 0 0; padding: var(--space-xs); max-height: 22rem; overflow: auto;
  background: var(--color-surface-2); color: var(--color-ink-2); border-radius: var(--radius-md);
  font-family: var(--font-mono); font-size: var(--text-xs); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere;
  text-align: left;
}
.detail-block .add, .detail-block .del { display: block; }
.detail-block .add { background: var(--color-ok-soft); color: var(--color-ok); }
.detail-block .del { background: var(--color-bad-soft); color: var(--color-bad); }
/* The dashboard's own components, after web/fleetlayer.css (Fleetlayer's shared tokens, base, controls, sign-in card
 * and app bar), which is served first. Only what's the dashboard's, and the few places it differs on purpose.
 *
 * Hallmark · genre: modern-minimal · macrostructure: Workbench (app) · theme: Cobalt, the site's (cool paper, charcoal
 * ink, one cobalt signal) · nav: left sidebar, grouped, a slide-in menu on phones · motion: live ping, button press · icons: Tabler outline (MIT)
 * Colour is for meaning only: cobalt for what's active or yours to act on, amber and red as small marks (a dot, an icon,
 * a word) for waiting and broken, never as washes behind whole rows.
 * Hallmark · pre-emit critique: P4 H5 E4 S4 R5 V4
 */

/* ---------------------------------------------------------------- base, beyond the shared one */

h1, h2, h3 { min-width: 0; overflow-wrap: anywhere; }
a { text-underline-offset: 0.18em; }
code { font-family: var(--font-mono); font-size: 0.9em; }
.sub { font-size: var(--text-xs); color: var(--color-ink-3); }
.is-bad { color: var(--color-bad); }
.nowrap { white-space: nowrap; }
/* A dashboard is wider than the hub's one list. */
.wrap { max-width: 78rem; }

/* ---------------------------------------------------------------- sign-in and full-page messages */

.login-brand img { border-radius: 8px; }
.login-card h2 { font-size: var(--text-lg); }
.login-card p { font-size: var(--text-sm); color: var(--color-ink-2); }
.login-form { display: grid; gap: var(--space-2xs); }
.login-form .btn { margin-top: var(--space-2xs); }

/* ---------------------------------------------------------------- sidebar */

/* The pages down the left, in groups; on a phone a bar with the menu button, and the same list sliding in over the page. */
body.app { display: grid; grid-template-columns: 15rem minmax(0, 1fr); min-height: 100dvh; }
/* The sidebar's column keeps its colour and edge below the sticky sidebar, however long the page. */
@media (min-width: 48rem) {
  body.app { background: linear-gradient(to right, var(--color-surface) calc(15rem - 1px), var(--color-rule) calc(15rem - 1px), var(--color-rule) 15rem, var(--color-paper) 15rem); }
}
.side {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; min-width: 0;
  background: var(--color-surface); border-right: 1px solid var(--color-rule);
}
.side-top { display: flex; align-items: center; height: 3.75rem; padding: 0 1.125rem; flex: none; }
.brand { display: inline-flex; align-items: center; gap: 0.625rem; color: var(--color-ink); font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.brand img { display: block; }
.side-nav { flex: 1; overflow-y: auto; padding: 0.25rem 0.75rem 1rem; scrollbar-width: thin; }
.side-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.nav-label { margin: 1.25rem 0.625rem 0.375rem; font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.02em; color: var(--color-ink-3); }
.side-nav a {
  display: flex; align-items: center; gap: 0.625rem; height: 2.25rem; padding: 0 0.625rem; border-radius: var(--radius-sm);
  color: var(--color-ink-2); text-decoration: none; font-size: var(--text-sm); font-weight: 500; white-space: nowrap;
  transition: color var(--dur-short) var(--ease-out), background-color var(--dur-short) var(--ease-out);
}
.side-nav a svg.i { width: 1.0625rem; height: 1.0625rem; flex: none; color: var(--color-ink-3); transition: color var(--dur-short) var(--ease-out); }
@media (hover: hover) { .side-nav a:hover { color: var(--color-ink); background: var(--color-surface-2); } .side-nav a:hover svg.i { color: var(--color-ink-2); } }
.side-nav a[aria-current="page"] { color: var(--color-ink); background: var(--color-surface-2); font-weight: 600; box-shadow: inset 0 0 0 1px var(--color-rule); }
.side-nav a[aria-current="page"] svg.i { color: var(--color-accent); }
.side-nav a:focus-visible { outline-offset: -2px; }
.side-foot { display: grid; gap: var(--space-2xs); padding: 0.875rem 1.125rem 1rem; border-top: 1px solid var(--color-rule); flex: none; }
.who { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3xs); margin: 0; min-width: 0; }
.who-name { font-size: var(--text-sm); color: var(--color-ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .btn { margin-right: -0.5rem; }
.live { display: inline-flex; align-items: center; gap: 0.4rem; font-size: var(--text-xs); color: var(--color-ink-3); }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-ok); }
.live[data-state="off"] .live-dot { background: var(--color-warn); }
.live[data-state="updated"] .live-dot { animation: ping 900ms var(--ease-out) 1; }
@keyframes ping { from { transform: scale(1.9); opacity: 0.35; } to { transform: scale(1); opacity: 1; } }
.mobilebar, .scrim { display: none; }
@media (max-width: 47.99rem) {
  body.app { display: block; }
  .mobilebar {
    position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; height: 3.25rem; padding: 0 var(--space-sm);
    background: color-mix(in oklch, var(--color-paper) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--color-rule);
  }
  .menu-btn { gap: 0.4rem; margin-right: -0.5rem; }
  .side { position: fixed; z-index: 30; inset: 0 auto 0 0; width: min(17.5rem, 84vw); transform: translateX(-100%); visibility: hidden; transition: transform var(--dur-med, 220ms) var(--ease-out), visibility 0s linear var(--dur-med, 220ms); box-shadow: var(--shadow-card); }
  body[data-nav="open"] .side { transform: none; visibility: visible; transition: transform var(--dur-med, 220ms) var(--ease-out); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 20; background: color-mix(in oklch, var(--color-ink) 28%, transparent); }
  .scrim[hidden] { display: none; }
  body[data-nav="open"] { overflow: hidden; }
}

/* ---------------------------------------------------------------- page */

main.wrap { padding-top: 2.5rem; padding-bottom: 4rem; }
.page-head { display: grid; justify-items: start; gap: 0.375rem; margin-bottom: var(--space-lg); }
.page-head h1 { font-size: var(--text-2xl); line-height: 1.15; letter-spacing: -0.02em; }
/* Flowing text, not flex: a summary can hold code and links, which flex would split into columns. */
.summary { display: block; font-size: var(--text-md); color: var(--color-ink-2); max-width: 46rem; }
.summary > .dot { margin-right: 0.5rem; vertical-align: 0.15em; }
.hint { margin-top: var(--space-2xs); font-size: var(--text-sm); color: var(--color-ink-3); }

section { margin-top: 2.5rem; }
.split-main > section:first-child, .split-side > section:first-child { margin-top: 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); margin-bottom: var(--space-xs); }
.sec-head h2 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; }
.sec-head a { font-size: var(--text-sm); text-decoration: none; }
.sec-head a:hover { text-decoration: underline; }
.count { color: var(--color-ink-3); font-family: var(--font-sans); font-size: var(--text-sm); font-weight: 500; font-variant-numeric: tabular-nums; margin-left: 2px; }

.list { border: 1px solid var(--color-rule); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-card); overflow: clip; }

.notice { display: flex; gap: var(--space-2xs); padding: var(--space-xs) var(--space-sm); margin-bottom: var(--space-md); border-radius: var(--radius-md); font-size: var(--text-sm); line-height: 1.45; overflow-wrap: anywhere; }
.notice svg.i { margin-top: 2px; }
.notice ul { margin: var(--space-3xs) 0 0; padding-left: 1.1em; color: var(--color-ink-2); }
/* The public demo's banner (demo --public), above every page. */
.demo-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-sm); padding: var(--space-xs) var(--space-sm); margin-bottom: var(--space-md); border-radius: var(--radius-md); background: var(--color-accent-soft); font-size: var(--text-sm); line-height: 1.45; }
.demo-banner p { margin: 0; flex: 1 1 18rem; }
.demo-banner .btn { flex: none; }
.notice.is-bad { background: var(--color-bad-soft); color: var(--color-bad); }
.notice.is-ok { background: var(--color-ok-soft); color: var(--color-ok); }
.notice-text { color: var(--color-ink); }

/* The four numbers: one strip, cells divided by hairlines. The number stays ink; a small dot by the label says when one
 * needs a look, so the strip never turns into a row of coloured digits. */
.strip {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 2.5rem;
  border: 1px solid var(--color-rule); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-card); overflow: clip;
}
.cell { position: relative; display: grid; align-content: start; gap: 0.375rem; padding: 1.25rem var(--space-md) 1.125rem; min-width: 0; transition: background-color var(--dur-short) var(--ease-out); }
.cell + .cell { border-left: 1px solid var(--color-rule); }
.cell dt { display: flex; align-items: center; gap: 0.45rem; font-size: var(--text-sm); color: var(--color-ink-2); }
.cell dt a { color: inherit; text-decoration: none; }
.cell dt a::after { content: ""; position: absolute; inset: 0; }
.cell dt a:focus-visible { outline: none; }
.cell.is-warn dt::before, .cell.is-bad dt::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--color-warn); }
.cell.is-bad dt::before { background: var(--color-bad); }
.cell:has(a:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: -2px; border-radius: inherit; }
.cell dd { margin: 0; display: flex; align-items: baseline; gap: 0.5rem; min-width: 0; }
.big { font-family: var(--font-display); font-size: 1.875rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--color-ink); }
.rest { font-size: var(--text-sm); color: var(--color-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (hover: hover) { .cell:hover { background: var(--color-surface-2); } }
@media (max-width: 47.99rem) {
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell { padding: var(--space-sm); }
  .cell:nth-child(3) { border-left: 0; }
  .cell:nth-child(n + 3) { border-top: 1px solid var(--color-rule); }
  .big { font-size: 1.625rem; }
  .cell dd { flex-direction: column; align-items: flex-start; gap: 0.125rem; }
}

/* Main story and the live side column. */
.split { display: grid; gap: 0 var(--space-xl); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 68rem) { .split { grid-template-columns: minmax(0, 1fr) minmax(20rem, 25rem); align-items: start; } }

/* ---------------------------------------------------------------- rows */

.row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0 0.875rem; align-items: start;
  padding: 1.125rem var(--space-md);
}
.row + .row, .list > .row + .empty { border-top: 1px solid var(--color-rule); }
.row-tight { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.row > .dot { margin-top: 0.55rem; margin-inline: 0.6rem; }
.row-body { min-width: 0; padding-top: 0.0625rem; }
.row-title { font-weight: 550; line-height: 1.45; overflow-wrap: anywhere; }
.row-text { font-size: var(--text-sm); line-height: 1.5; color: var(--color-ink); overflow-wrap: anywhere; }
.row-sub { margin-top: 0.1875rem; font-size: var(--text-sm); line-height: 1.5; color: var(--color-ink-3); overflow-wrap: anywhere; }
.row-tight .row-title { font-size: var(--text-sm); }
.row-tight .row-sub { font-size: var(--text-xs); margin-top: 0.125rem; }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-2xs); }
.row-meta { font-size: var(--text-xs); color: var(--color-ink-3); white-space: nowrap; line-height: 1.4rem; }
.row-actions { display: flex; gap: var(--space-2xs); margin: 0; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 40rem) {
  .row { grid-template-columns: auto minmax(0, 1fr); padding: var(--space-sm); }
  .row-end { grid-column: 2; flex-direction: row-reverse; justify-content: flex-end; align-items: center; margin-top: var(--space-xs); }
  .row-end:not(:has(*)) { display: none; }
  .row-end .row-meta { line-height: 1.5; }
}

/* An address (tab@node, a role, a tool): mono, a touch smaller, never louder than the words around it. */
.addr { font-family: var(--font-mono); font-size: 0.86em; font-weight: 500; letter-spacing: -0.02em; color: var(--color-ink); }
.row-sub .addr, .sub .addr, .row-meta .addr, td .addr { font-weight: 400; color: var(--color-ink-2); }

/* Icon tiles: a quiet square holding a line icon. The tone colours the icon, not the square. */
.tile {
  display: inline-grid; place-items: center; flex: none;
  width: 2rem; height: 2rem; border-radius: var(--radius-md);
  background: var(--color-surface-2); border: 1px solid var(--color-rule); color: var(--color-ink-2);
}
.tile svg.i { width: 1rem; height: 1rem; }
.tile.is-warn { color: var(--color-warn-ink); }
.tile.is-bad { color: var(--color-bad); }
.tile.is-accent { color: var(--color-accent); }

/* Dots mean something: a session's state, a machine's health. */
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--color-off); }
.dot.ok { background: var(--color-ok); }
.dot.warn { background: var(--color-warn); }
.dot.bad { background: var(--color-bad); }
.dot.busy { background: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-soft); }

.tag {
  display: inline-block; padding: 0 var(--space-3xs); border-radius: 4px; vertical-align: 1px;
  background: var(--color-surface-2); border: 1px solid var(--color-rule); color: var(--color-ink-2);
  font-size: var(--text-xs); font-weight: 550; line-height: 1.35rem;
}
.tag.is-warn { color: var(--color-warn-ink); }

/* Empty: the hub's, an icon in a soft square, a line, and what puts something here. */
.empty { display: grid; justify-items: center; gap: var(--space-3xs); padding: var(--space-lg) var(--space-md); text-align: center; }
.empty-icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: var(--space-2xs); border-radius: var(--radius-lg); background: var(--color-surface-2); border: 1px solid var(--color-rule); color: var(--color-ink-2); }
.empty-icon svg.i { width: 1.15rem; height: 1.15rem; }
.empty h3 { font-size: var(--text-md); }
.empty p { color: var(--color-ink-2); font-size: var(--text-sm); max-width: 26rem; }

/* ---------------------------------------------------------------- machines */

.mgroup + .mgroup { border-top: 1px solid var(--color-rule); }
.mhead { display: flex; align-items: center; gap: 0.625rem; padding: 1.125rem var(--space-md) 0.25rem; }
.mhead h3 { font-size: var(--text-md); font-weight: 600; }
.mmeta { font-size: var(--text-xs); color: var(--color-ink-3); }
.mstate { margin-left: auto; font-size: var(--text-xs); color: var(--color-ink-3); }
.mgroup.is-off .mstate { color: var(--color-bad); }
.mhead .dot { margin-inline: 0.125rem 0.0625rem; }
.noderow {
  display: grid; align-items: start; gap: var(--space-3xs) var(--space-md);
  grid-template-columns: minmax(0, 9rem) minmax(0, 12rem) minmax(0, 1fr) 3.5rem;
  grid-template-areas: "id sess plug ver";
  padding: 0.625rem var(--space-md) 0.625rem calc(var(--space-md) + 6px + 0.875rem);
}
.noderow:last-child { padding-bottom: 1.25rem; }
.noderow.is-detail { grid-template-columns: minmax(0, 9rem) minmax(0, 12rem) minmax(0, 1fr) 6rem 3.5rem; grid-template-areas: "id sess plug seen ver"; }
.n-id { grid-area: id; display: grid; min-width: 0; }
.n-id .addr { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.n-sess { grid-area: sess; display: grid; gap: 6px; min-width: 0; padding-top: 0.45rem; }
.n-plug { grid-area: plug; display: grid; gap: 1px; min-width: 0; padding-top: 0.15rem; }
.plist { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: -0.02em; color: var(--color-ink-2); line-height: 1.65; overflow-wrap: anywhere; }
.plist b { font-weight: 600; }
.plist b.is-warn { color: var(--color-warn-ink); }
.plist b.is-bad { color: var(--color-bad); }
.n-seen { grid-area: seen; padding-top: 0.2rem; white-space: nowrap; }
.n-ver { grid-area: ver; justify-self: end; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-ink-3); padding-top: 0.2rem; }
.segs { display: flex; gap: 3px; height: 4px; }
.segs i { flex: 1; max-width: 1.5rem; border-radius: 2px; background: var(--color-rule-2); }
.segs i.seg-working { background: var(--color-accent); }
.segs i.seg-blocked { background: var(--color-warn); }
@media (max-width: 52rem) {
  .noderow, .noderow.is-detail {
    grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "id ver" "sess sess" "plug plug";
    padding-left: var(--space-md); gap: var(--space-2xs) var(--space-sm);
  }
  .noderow.is-detail { grid-template-areas: "id ver" "sess sess" "plug plug" "seen seen"; }
  .n-sess { padding-top: 0; }
}
@media (max-width: 40rem) {
  .mhead { padding: var(--space-xs) var(--space-sm) 0; }
  .noderow, .noderow.is-detail { padding-left: var(--space-sm); padding-right: var(--space-sm); }
}

/* ---------------------------------------------------------------- filters, tables, meters */

.filters { display: flex; flex-wrap: wrap; gap: var(--space-3xs); margin: calc(-1 * var(--space-2xs)) 0 var(--space-md); }
.filters a {
  display: inline-flex; gap: 0.35rem; align-items: center; height: var(--control-h-sm); padding: 0 var(--space-xs);
  border: 1px solid var(--color-rule-2); border-radius: var(--radius-sm); background: var(--color-surface);
  color: var(--color-ink-2); font-size: var(--text-sm); font-weight: 520; text-decoration: none; white-space: nowrap;
}
.filters a:hover { color: var(--color-ink); border-color: var(--color-ink-3); }
.filters a[aria-current="page"] { background: var(--color-accent-soft); border-color: transparent; color: var(--color-accent); font-weight: 600; }
.filters a[aria-current="page"] .count { color: inherit; opacity: 0.7; }
.filters a.filter-on { color: var(--color-ink); border-color: var(--color-ink-3); font-weight: 600; }
.filters a.filter-on svg.i { width: 0.875rem; height: 0.875rem; color: var(--color-ink-3); }

.search { display: flex; gap: var(--space-2xs); margin: 0 0 var(--space-sm); max-width: 36rem; }
.search input[type="search"] {
  flex: 1; min-width: 0; height: var(--control-h-sm); padding: 0 var(--space-xs);
  border: 1px solid var(--color-rule-2); border-radius: var(--radius-sm); background: var(--color-surface);
  color: var(--color-ink); font: inherit; font-size: var(--text-sm);
}
.search-hits { list-style: none; margin: 0 0 var(--space-md); padding: 0; }
.search-hits li { padding: var(--space-xs) 0; border-bottom: 1px solid var(--color-rule); }
.search-hits .hit-where { margin: 0; font-weight: 600; font-size: var(--text-sm); }
.search-hits .hit-where time { margin-left: var(--space-2xs); color: var(--color-ink-3); font-weight: 400; }
.search-hits .hit-text { margin: var(--space-3xs) 0; overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
th { text-align: left; font-weight: 550; color: var(--color-ink-3); font-size: var(--text-xs); padding: 0.625rem var(--space-md); border-bottom: 1px solid var(--color-rule); white-space: nowrap; background: var(--color-surface-2); }
td { padding: 0.75rem var(--space-md); vertical-align: top; }
tbody tr + tr td { border-top: 1px solid var(--color-rule); }
code.json { font-size: var(--text-xs); color: var(--color-ink-2); overflow-wrap: anywhere; }

.meters { display: grid; gap: 3px; min-width: 12rem; max-width: 22rem; }
.meter { display: grid; grid-template-columns: 5.5rem minmax(3rem, 1fr) 2.5rem; align-items: center; gap: 6px; font-size: var(--text-xs); color: var(--color-ink-3); }
.meter > span:first-child { font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; }
.bar { height: 4px; border-radius: 2px; background: var(--color-rule); overflow: clip; }
.bar > i { display: block; height: 100%; width: var(--pct, 0%); border-radius: inherit; background: var(--color-ink-3); }
.meter.is-warn .bar > i { background: var(--color-warn); }
.meter.is-bad .bar > i { background: var(--color-bad); }
.meter .pct { text-align: right; font-family: var(--font-mono); color: var(--color-ink-2); }

/* ---------------------------------------------------------------- capacity */

.cap-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); padding: 0.375rem var(--space-md) 1.25rem calc(var(--space-md) + 6px + 0.875rem); }
.cap-meters { max-width: none; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 6px var(--space-lg); }
.cap-meters .meter { grid-template-columns: minmax(4.5rem, 7.5rem) minmax(3rem, 1fr) 2.5rem; }
.cap-meters .meter > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cap-body > * { min-width: 0; }
.cap-group .mhead { flex-wrap: wrap; row-gap: 2px; }
.cap-group .mhead h3 { overflow-wrap: normal; }
.use-spend { margin-top: var(--space-2xs); }
.use-spend .meter > span:first-child { font-family: var(--font-sans); }
.cap-why { color: var(--color-warn-ink); }
.cap-inside { margin-top: var(--space-3xs); }
.cap-inside summary { cursor: pointer; width: fit-content; font-size: var(--text-sm); color: var(--color-ink-2); }
.cap-inside summary:hover { color: var(--color-ink); }
.cap-inside .table-wrap { margin-top: var(--space-2xs); border: 1px solid var(--color-rule); border-radius: var(--radius-md); }
.cap-inside td .dot { vertical-align: 0.15em; margin-right: 0.25rem; }
.cap-offline { margin-top: var(--space-sm); }
.cap-offline > summary { cursor: pointer; width: fit-content; font-size: var(--text-sm); color: var(--color-ink-2); }
.cap-offline > summary:hover { color: var(--color-ink); }
.cap-offline > .list { margin-top: var(--space-2xs); }
@media (max-width: 40rem) {
  .cap-body { padding-left: var(--space-sm); padding-right: var(--space-sm); }
  .cap-meters { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- usage */

/* Each allowance with its reset time beside it. */
.use-meters { max-width: 38rem; gap: 5px; margin-top: var(--space-2xs); }
.use-meters .meter { grid-template-columns: minmax(5rem, 8rem) minmax(4rem, 1fr) 2.5rem minmax(0, 7.5rem); }
.use-meters .meter > span:first-child { font-family: var(--font-sans); color: var(--color-ink-2); }
.use-meters .when { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 40rem) {
  .use-meters .meter { grid-template-columns: minmax(4.5rem, 6.5rem) minmax(3rem, 1fr) 2.5rem; }
  .use-meters .when { grid-column: 2 / -1; margin-top: -2px; }
}

/* ---------------------------------------------------------------- the graph */

.legend { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-md); margin-top: var(--space-sm); font-size: var(--text-xs); color: var(--color-ink-3); }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend-line { display: inline-block; width: 1.25rem; border-top: 1.5px dashed var(--color-accent); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

/* ---------------------------------------------------------------- people, teams and rules (admin.rs) */

/* A form spread over a row's grid: its fields in the body, its button at the end. */
.add-form { display: contents; }
.form-fields { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-md); }
.field { display: grid; gap: 2px; align-content: start; min-width: 0; flex: 1 1 12rem; max-width: 20rem; }
.field .label { margin-bottom: 0; }
/* The form's button lines up with its inputs: an empty label line above it, spaced like a field's. */
.add-form .row-end { gap: 2px; }
.form-spacer { margin-bottom: 0; }
select.input { appearance: auto; }
.row-end-inline { flex-direction: row; align-items: center; }
.invite-link { display: block; margin-top: var(--space-3xs); overflow-wrap: anywhere; user-select: all; }
.policy-text { margin: 0; padding: var(--space-sm) var(--space-md); overflow-x: auto; font-size: var(--text-xs); line-height: 1.6; }
/* Guests (admin.rs guests): a guest's notes are outside data, shown in a box that says so, only when opened. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.guest-decline { align-items: center; min-width: 0; }
.guest-decline .input { width: 15rem; min-width: 0; }
@media (max-width: 40rem) {
  .guest-decline { width: 100%; }
  .guest-decline .input { flex: 1 1 auto; width: auto; }
}
.guest-notes { margin-top: var(--space-3xs); }
.guest-notes > summary { cursor: pointer; width: fit-content; font-size: var(--text-sm); color: var(--color-ink-2); }
.guest-notes > summary:hover { color: var(--color-ink); }
.outside-data { margin-top: var(--space-2xs); padding: var(--space-xs) var(--space-sm); border: 1px dashed var(--color-warn); border-radius: var(--radius-md); }
.outside-data-head { display: flex; gap: var(--space-2xs); align-items: flex-start; margin: 0 0 var(--space-2xs); font-size: var(--text-xs); color: var(--color-warn-ink); }
.outside-data ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-2xs); }
.guest-note { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--text-sm); }
@media (max-width: 40rem) {
  .row-end-inline { flex-wrap: wrap; justify-content: flex-start; }
  .field { max-width: none; }
  .form-spacer { display: none; }
}

/* ---------------------------------------------------------------- usage trend (trend.rs) */

.trend-pool { display: grid; gap: var(--space-sm); margin-block: var(--space-sm) var(--space-lg); }
.trend-pool h3 { font-size: var(--text-md); margin: 0; }
.trend-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: var(--space-xs); }
.trend-tile { display: grid; gap: 2px; padding: var(--space-xs) var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-sm); background: var(--color-surface); }
.trend-tile b { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 600; color: var(--color-ink); font-variant-numeric: tabular-nums; }
.trend-tile span { font-size: var(--text-xs); color: var(--color-ink-3); }
.trend-forecast { margin: 0; font-size: var(--text-sm); color: var(--color-ink-2); }
.trend-forecast.is-warn::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--color-warn); margin-right: 0.5em; vertical-align: middle; }
.trend-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: var(--space-md); }
.trend-chart { margin: 0; display: grid; gap: 4px; min-width: 0; }
.trend-chart figcaption { font-size: var(--text-sm); font-weight: 600; color: var(--color-ink); }
.trend-legend { display: flex; gap: var(--space-sm); margin: 0; font-size: var(--text-xs); color: var(--color-ink-3); }
.trend-key { display: inline-flex; align-items: center; gap: 6px; }
.trend-key i { display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--color-accent); }
.trend-key i.k-avg { border-top: 2px dashed var(--color-ink-3); }
.trend-plot { position: relative; display: grid; gap: 2px; }
.trend-plot svg { display: block; width: 100%; height: 7.5rem; overflow: visible; }
.trend-top { font-size: var(--text-xs); color: var(--color-ink-3); font-family: var(--font-mono); }
.trend-axis { display: flex; justify-content: space-between; font-size: var(--text-xs); color: var(--color-ink-3); }
.t-base { stroke: var(--color-rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.t-main { fill: none; stroke: var(--color-accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.t-avg { fill: none; stroke: var(--color-ink-3); stroke-width: 2; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.t-hover rect { fill: transparent; }
@media (hover: hover) { .t-hover rect:hover { fill: color-mix(in oklch, var(--color-accent) 12%, transparent); } }
.trend-account { display: flex; flex-wrap: wrap; align-items: center; gap: 4px var(--space-sm); margin-top: 4px; font-size: var(--text-xs); }
.trend-spark { width: 7.5rem; height: 1.5rem; overflow: visible; }
.trend-spark path { fill: none; stroke: var(--color-accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.is-warn-text { color: var(--color-ink-2); }
.is-warn-text::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--color-warn); margin-right: 0.4em; vertical-align: middle; }

/* ---------------------------------------------------------------- one session's page */

.crumbs { margin-bottom: var(--space-2xs); font-size: var(--text-sm); color: var(--color-ink-3); }
.row-link { color: inherit; text-decoration: none; }
@media (hover: hover) { .row-link:hover { text-decoration: underline; } }
.session-sentence { max-width: 46rem; margin-bottom: var(--space-sm); line-height: 1.55; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--space-3xs) var(--space-sm); margin: 0 0 var(--space-lg); font-size: var(--text-sm); }
.facts dt { color: var(--color-ink-3); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.pager { display: flex; gap: var(--space-sm); margin: 0 0 var(--space-sm); font-size: var(--text-sm); }

/* The conversation: one column of turns, people's words set apart by a rule, tool calls as one quiet line. */
.timeline { list-style: none; margin: 0 0 var(--space-md); padding: 0; max-width: 52rem; }
.item { padding: var(--space-2xs) 0; }
.item + .item { border-top: 1px solid var(--color-rule); }
.item-head { display: flex; align-items: baseline; gap: var(--space-2xs); margin: 0; font-size: var(--text-sm); min-width: 0; }
.item-head time { margin-left: auto; color: var(--color-ink-3); font-size: var(--text-xs); white-space: nowrap; }
.item-who { font-weight: 600; }
.item-text { margin-top: var(--space-3xs); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.item.is-user, .item.is-peer { padding-left: var(--space-sm); box-shadow: inset 2px 0 0 var(--color-accent); }
.item.is-tool .item-head, .item.is-result summary { color: var(--color-ink-2); }
.item-call { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item.is-result .item-text, .item.is-thought .item-text { font-size: var(--text-sm); color: var(--color-ink-2); }
.item.is-result .item-text { font-family: var(--font-mono); font-size: var(--text-xs); }
.item details > summary { cursor: pointer; list-style-position: inside; }
.item details > summary .item-head { display: inline-flex; width: calc(100% - 1.5rem); }
.item-notice { margin: 0; font-size: var(--text-sm); color: var(--color-ink-3); font-style: italic; display: flex; gap: var(--space-2xs); }
.item-notice time { margin-left: auto; font-style: normal; font-size: var(--text-xs); }

/* The Share pane (share.rs): the current shares as rows, the form behind a Share button that works without script. */
.sharing { margin-bottom: var(--space-lg); }
.sharing .list { margin-bottom: var(--space-sm); }
.sharing .row-title .row-meta { margin-left: 0.25rem; font-weight: 400; }
.share-none { margin: 0 0 var(--space-sm); }
.share-pane > summary { list-style: none; width: fit-content; }
.share-pane > summary::-webkit-details-marker { display: none; }
.share-pane[open] > summary { background: var(--color-surface-2); }
.share-form {
  display: grid; gap: var(--space-sm); max-width: 36rem; margin-top: var(--space-sm); padding: var(--space-md);
  border: 1px solid var(--color-rule); border-radius: var(--radius-lg); background: var(--color-surface); box-shadow: var(--shadow-card);
}
.share-form > .field { max-width: none; }
.notify-form { display: grid; gap: var(--space-md); max-width: 36rem; }
.notify-form .choices .hint, .notify-reset { justify-self: start; margin: 0; }
.choices { display: grid; gap: var(--space-2xs); margin: 0; padding: 0; border: 0; min-width: 0; }
.choice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2xs); align-items: start; cursor: pointer; }
.choice input { margin-top: 0.3rem; accent-color: var(--color-accent); }
.choice-title { display: block; font-size: var(--text-sm); font-weight: 550; color: var(--color-ink); }
.choice .sub, .share-form .label .sub { display: block; font-size: var(--text-sm); font-weight: 400; color: var(--color-ink-3); line-height: 1.45; }
.share-form .label .sub { display: inline; }
/* Agents read only: with Chat chosen, the box fades (the control plane refuses chat with agents). */
.share-form:has(input[name="verb"][value="chat"]:checked) .choice-agents { opacity: 0.5; }
.share-actions { display: flex; justify-content: flex-end; }
@media (max-width: 40rem) {
  .share-form { padding: var(--space-sm); }
  .share-actions .btn { width: 100%; }
}
/* The Architecture page's diagrams (plugins/dashboard/src/arch). Also embedded in every exported SVG, so it holds
 * everything a diagram needs and depends on nothing else: each theme is a set of variables on the diagram's root. */

.arch {
  --a-bg: #ffffff; --a-panel: #f8fafc; --a-card: #ffffff; --a-line: #e2e8f0; --a-strong: #cbd5e1;
  --a-ink: #0f172a; --a-ink2: #334155; --a-mute: #64748b; --a-accent: #2f5bd3; --a-accent-bg: #eef2fd;
  --a-agents: #3b82f6; --a-agents-bg: #eff6ff; --a-signed: #16a34a; --a-secret: #d97706; --a-link: #64748b;
  --a-out: #94a3b8; --a-disc: #ffffff; --a-deny: #dc2626; --a-some: #2563eb;
  font-family: Inter, sans-serif;
}
.arch.t-dark {
  --a-bg: #0b0d12; --a-panel: #11141b; --a-card: #151922; --a-line: #1f2430; --a-strong: #2a3140;
  --a-ink: #e6e8ec; --a-ink2: #b6becb; --a-mute: #8b94a3; --a-accent: #8aa6f0; --a-accent-bg: #151b2e;
  --a-agents: #60a5fa; --a-agents-bg: #111a2b; --a-signed: #22c55e; --a-secret: #f59e0b; --a-link: #7d8696;
  --a-out: #556072; --a-disc: #e6e8ec; --a-deny: #f87171; --a-some: #60a5fa;
}
@media (prefers-color-scheme: dark) {
  .arch.t-auto {
    --a-bg: #0b0d12; --a-panel: #11141b; --a-card: #151922; --a-line: #1f2430; --a-strong: #2a3140;
    --a-ink: #e6e8ec; --a-ink2: #b6becb; --a-mute: #8b94a3; --a-accent: #8aa6f0; --a-accent-bg: #151b2e;
    --a-agents: #60a5fa; --a-agents-bg: #111a2b; --a-signed: #22c55e; --a-secret: #f59e0b; --a-link: #7d8696;
    --a-out: #556072; --a-disc: #e6e8ec; --a-deny: #f87171; --a-some: #60a5fa;
  }
}
.arch text { font-family: Inter, sans-serif; fill: var(--a-ink); }
.arch .a-bg { fill: var(--a-bg); }
.arch .a-title { font-size: 22px; font-weight: 650; }
.arch .a-sub, .arch .a-meta { font-size: 11.5px; fill: var(--a-mute); }
.arch .a-sub { font-size: 12.5px; }
.arch .a-meta-s { font-size: 10px; fill: var(--a-mute); }
.arch .a-small { font-size: 12px; fill: var(--a-ink2); }
.arch .a-name { font-size: 13.5px; font-weight: 600; }
.arch .a-group-t { font-size: 12.5px; font-weight: 600; fill: var(--a-ink2); }
.arch .a-col { font-size: 10.5px; font-weight: 650; letter-spacing: .08em; fill: var(--a-mute); }
.arch .a-legend-head { font-size: 13.5px; font-weight: 600; }
.arch .a-mono-s, .arch .a-chip-t { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; fill: var(--a-ink2); }
.arch .a-chip-t { font-size: 9.5px; }
.arch .a-th { font-size: 12px; font-weight: 650; }
.arch .a-td { font-size: 12px; fill: var(--a-ink2); }
.arch .a-zone-t { font-size: 10.5px; font-weight: 650; letter-spacing: .06em; fill: var(--a-bg); }
.arch .a-num-t { font-size: 11px; font-weight: 700; fill: var(--a-bg); }

.arch .a-card, .arch .a-tile { fill: var(--a-card); stroke: var(--a-strong); stroke-width: 1.2; }
.arch .a-group { fill: var(--a-panel); stroke: var(--a-strong); stroke-width: 1.4; }
.arch .a-group.a-dashed { fill: none; stroke-dasharray: 5 4; }
.arch .a-group.a-machine { fill: none; }
.arch .a-badge { fill: var(--a-mute); stroke: none; }
.arch .a-badge.a-machine { fill: var(--a-ink2); }
.arch .a-badge .a-logo-ink, .arch .a-badge + g .a-logo-ink { fill: var(--a-bg); }
.arch .a-tile.a-agents { fill: var(--a-agents-bg); stroke: var(--a-agents); }
.arch .a-off { opacity: .45; }
.arch .a-dim { fill: var(--a-panel); }
.arch .a-cp { fill: var(--a-accent-bg); stroke: var(--a-accent); stroke-width: 2; }
.arch .a-chip { fill: var(--a-card); stroke: var(--a-strong); }
.arch .a-logo-disc, .arch .a-node-disc { fill: var(--a-card); stroke: var(--a-strong); stroke-width: 1.4; }
.arch .a-zone { fill: none; stroke: var(--a-ink); stroke-width: 1; }
.arch .a-zone-tag, .arch .a-num { fill: var(--a-ink); }
.arch .a-rule { stroke: var(--a-line); stroke-width: 1; }
.arch .a-rule-strong { stroke: var(--a-strong); stroke-width: 2; }
.arch .a-ring-guide { fill: none; stroke: var(--a-line); stroke-width: 1.5; stroke-dasharray: 3 5; }
.arch .a-pip { fill: var(--a-mute); }
.arch .a-pip.a-agents { fill: var(--a-agents); }
.arch .a-mark { fill: var(--a-mute); stroke: none; }
.arch .a-mark.e-signed { fill: var(--a-signed); }
.arch .a-mark.e-secret { fill: var(--a-secret); }
.arch .a-mark.e-link { fill: var(--a-link); }
.arch .a-mark.e-out { fill: var(--a-out); }
.arch .a-dot.e-signed { fill: var(--a-signed); }
.arch .a-dot.e-secret { fill: var(--a-secret); }

.arch .a-logo-ink { fill: var(--a-ink); }
.arch .a-glyph { fill: none; stroke: var(--a-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.arch .a-glyph-accent { stroke: var(--a-accent); }

.arch .e { fill: none; stroke-width: 2; stroke-linejoin: round; }
.arch .e-signed { stroke: var(--a-signed); stroke-width: 2.4; }
.arch .e-secret { stroke: var(--a-secret); stroke-width: 2.4; }
.arch .e-link { stroke: var(--a-link); stroke-width: 1.4; }
.arch .e-out { stroke: var(--a-out); stroke-width: 1.3; stroke-dasharray: 4 4; }
.arch .e-off { stroke-dasharray: 3 4; opacity: .6; }
.arch .a-lock rect { fill: var(--a-signed); }
.arch .a-lock path { fill: none; stroke: var(--a-signed); stroke-width: 1.8; }
.arch .a-ring { fill: var(--a-bg); stroke: var(--a-secret); stroke-width: 2; }

/* The page around the diagram (not in an export). */
.arch-bar { display: flex; flex-wrap: wrap; gap: var(--space-2xs, .5rem); align-items: center; margin: 0 0 var(--space-xs, .75rem); }
.arch-gap { flex: 1; }
.arch-seg { display: inline-flex; border: 1px solid var(--color-rule-2); border-radius: var(--radius-sm); overflow: hidden; }
.arch-seg a { padding: .4rem .7rem; font-size: var(--text-sm); color: var(--color-ink-2); text-decoration: none; border-right: 1px solid var(--color-rule-2); }
.arch-seg a:last-child { border-right: 0; }
.arch-seg a[aria-current] { background: var(--color-surface-2); color: var(--color-ink); font-weight: 600; }
.arch-panel { padding: 0; overflow: hidden; }
.arch-scroll { overflow-x: auto; }
.arch-scroll .arch { display: block; width: 100%; min-width: 60rem; height: auto; }

/* Access: the matrix's cells, each a state. */
.arch .a-stripe { fill: var(--a-panel); }
.arch .a-mark.a-agents { fill: var(--a-agents); }
.arch .a-mark.c-denied { fill: var(--a-deny); }
.arch .a-cell { fill-opacity: .12; stroke-opacity: .55; stroke-width: 1; }
.arch .a-cell.c-allowed { fill: var(--a-signed); stroke: var(--a-signed); }
.arch .a-cell.c-ask { fill: var(--a-secret); stroke: var(--a-secret); }
.arch .a-cell.c-some { fill: var(--a-some); stroke: var(--a-some); }
.arch .a-cell.c-denied { fill: var(--a-deny); stroke: var(--a-deny); }
.arch .a-cell-t { font-size: 11.5px; font-weight: 650; }
.arch .a-cell-t.c-allowed { fill: var(--a-signed); }
.arch .a-cell-t.c-ask { fill: var(--a-secret); }
.arch .a-cell-t.c-some { fill: var(--a-some); }
.arch .a-cell-t.c-denied { fill: var(--a-deny); }

/* Secrets: sealed deliveries through the control plane. */
.arch .a-mono { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; font-weight: 600; }
.arch .e-sealed { stroke: var(--a-accent); stroke-width: 2.2; }
.arch .e-ask { stroke: var(--a-secret); stroke-width: 2.2; stroke-dasharray: 6 4; }
.arch .a-seal .a-lock rect { fill: var(--a-accent); }
.arch .a-seal .a-lock path { stroke: var(--a-accent); }
.arch .a-dot.d-sealed { fill: var(--a-accent); stroke: none; }
.arch .a-dot.d-ask { fill: var(--a-secret); stroke: none; }
