/* Mind design system: tokens. Look: "Still" (Sam's pick, Nov 19 2026), built on Desk:
   white and soft grey, hairlines, a black primary button, signal orange as the one accent
   for meaning (needs you, active, out of range), the blue square mark, tabular figures.
   Charts get their own colour set (Sam: "charts need more colour"). Light is the default;
   dark (warm graphite) follows Windows unless the page sets data-theme on <html>.
   No font file ships: Windows' own Segoe UI Variable, else Inter or the system face.
   The older Desk names (--canvas, --side, --muted, ...) are kept as aliases so every part
   that uses them takes the new look without a rewrite. */

:root {
  color-scheme: light;
  --sans: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", Inter, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, ui-monospace, "SF Mono", Menlo, monospace;

  /* type (px): 11 label, 12 meta, 13 ui, 15 chat, 17 title, 24 figure, 34 big, 48 hero */
  --t-label: 11px; --t-meta: 12px; --t-ui: 13px; --t-chat: 15px;
  --t-title: 17px; --t-fig: 24px; --t-big: 34px; --t-hero: 48px;

  /* space (px): 4 8 12 16 24 32 48 64 */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;

  /* radius: 6 small controls, 8 buttons and rows, 14 wells and cards, 18 message box */
  --r-sm: 6px; --r-md: 8px; --r-lg: 14px; --r-xl: 18px; --r-full: 999px;

  /* layout */
  --rail-w: 252px; --pane-w: 344px; --read-w: 680px; --head-h: 56px; --gutter: 40px;

  /* motion: about 100 ms on controls, all of it zero with reduced motion */
  --ease: cubic-bezier(.2, 0, 0, 1);
  --t-fast: 100ms; --t-pane: 160ms; --t-card: 220ms;

  /* colour, light: warm daylight neutrals */
  --bg: #FFFFFF;          /* chat, pages, floating surfaces */
  --rail: #F6F6F4;        /* left column */
  --pane: #FBFBFA;        /* the pane beside the chat */
  --well: #F5F5F3;        /* a figure in the chat (no border) */
  --fill: #EFEFEC;        /* soft buttons, your messages, tracks */
  --hover: #ECECE9;       /* hover and selected rows */
  --ink: #18181A;         /* text, primary button */
  --ink-2: #57575A;       /* secondary text */
  --ink-3: #78786F;       /* meta (4.5:1 on white) */
  --ink-4: #B4B4AE;       /* faint: dotted underline, empty tracks */
  --line: #ECECE9;        /* hairline */
  --line-2: #DEDEDA;      /* control border */
  --on-ink: #FFFFFF;
  --signal: #E85B37;      /* the one accent: needs you, active, out of range */
  --signal-ink: #C2410C;
  --signal-soft: #FDF0EA;
  --good: #2F7D4A;        /* the checked mark */
  --good-soft: #E9F4EC;
  --bad: #B42318;         /* real failures only */
  --bad-soft: #FEF0EE;

  /* charts: one colour per kind of figure, the same on every screen */
  --c-cash: #2F64D6;      /* cash in bank, the projection */
  --c-in: #1E9A7A;        /* money in, revenue, deals */
  --c-out: #D98A1E;       /* money out, spending */
  --c-owe: #7A5BD0;       /* what we owe, pipeline */
  --c-work: #0E8FB8;      /* work: projects and tasks */
  --c-deal: #C0408E;      /* deals and pipeline */
  --c-mute: #D6D6D1;      /* other bars */
  --band: #F1F1EE;        /* usual range */
  --area-a: .10;          /* how strong an area under a line is */

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-float: 0 2px 4px -2px rgba(0, 0, 0, .08), 0 8px 12px -6px rgba(0, 0, 0, .07), 0 20px 28px -14px rgba(0, 0, 0, .08);
  --stroke-float: rgba(0, 0, 0, .07);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #151514; --rail: #1A1A19; --pane: #181817; --well: #1E1E1C; --fill: #252523; --hover: #2A2A28;
    --ink: #EDEDEA; --ink-2: #A8A8A3; --ink-3: #8A8A84; --ink-4: #555551;
    --line: #252523; --line-2: #33332F; --on-ink: #151514;
    --signal: #F06A43; --signal-ink: #F59072; --signal-soft: #2E1C16;
    --good: #6CC28A; --good-soft: #17271D; --bad: #F2867A; --bad-soft: #2E1715;
    --c-cash: #6E9BF5; --c-in: #4CC7A3; --c-out: #F0AE4E; --c-owe: #A88DF0; --c-work: #4EC0E2; --c-deal: #E27BBE; --c-mute: #3A3A37;
    --band: #212120; --area-a: .16;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-float: 0 2px 4px -2px rgba(0, 0, 0, .5), 0 8px 12px -6px rgba(0, 0, 0, .45), 0 24px 36px -14px rgba(0, 0, 0, .6);
    --stroke-float: rgba(255, 255, 255, .07);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151514; --rail: #1A1A19; --pane: #181817; --well: #1E1E1C; --fill: #252523; --hover: #2A2A28;
  --ink: #EDEDEA; --ink-2: #A8A8A3; --ink-3: #8A8A84; --ink-4: #555551;
  --line: #252523; --line-2: #33332F; --on-ink: #151514;
  --signal: #F06A43; --signal-ink: #F59072; --signal-soft: #2E1C16;
  --good: #6CC28A; --good-soft: #17271D; --bad: #F2867A; --bad-soft: #2E1715;
  --c-cash: #6E9BF5; --c-in: #4CC7A3; --c-out: #F0AE4E; --c-owe: #A88DF0; --c-work: #4EC0E2; --c-deal: #E27BBE; --c-mute: #3A3A37;
  --band: #212120; --area-a: .16;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-float: 0 2px 4px -2px rgba(0, 0, 0, .5), 0 8px 12px -6px rgba(0, 0, 0, .45), 0 24px 36px -14px rgba(0, 0, 0, .6);
  --stroke-float: rgba(255, 255, 255, .07);
}
@media (prefers-reduced-motion: reduce) { :root { --t-fast: 0ms; --t-pane: 0ms; --t-card: 0ms; } }

/* the Desk names, kept as aliases */
:root {
  --font-ui: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", Inter, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif; --font-display: var(--font-ui); --font-mono: var(--mono);
  --text-xs: 11px; --text-sm: 12px; --text-md: 13px; --text-lg: 15px; --text-xl: 17px; --text-2xl: 24px; --text-3xl: 34px;
  --weight-regular: 400; --weight-medium: 500; --weight-semibold: 600; --leading: 1.5; --tracking-tight: -0.02em;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 20px; --space-6: 24px; --space-7: 28px; --space-8: 32px;
  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 10px; --radius-xl: 14px; --radius-full: 999px;
  --rail-width: var(--rail-w); --panel-width: var(--pane-w); --header-height: var(--head-h); --reading-width: var(--read-w);
  --fast: var(--t-fast); --slow: var(--t-pane);
  --canvas: var(--bg); --side: var(--rail); --sub: var(--pane); --muted: var(--fill);
  --signal-text: var(--signal-ink); --focus: var(--signal);
  --bar: var(--c-mute); --bar-strong: var(--ink); --range: var(--band);
  --shadow-sm: var(--shadow-xs); --shadow-md: var(--shadow-xs), 0 4px 14px -4px rgba(0, 0, 0, .10);
}

/* Mind design system: base. Plain elements look right with no class at all. */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--canvas);
  color: var(--ink);
  font: var(--weight-regular) var(--text-md)/var(--leading) var(--font-ui);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: var(--weight-semibold); line-height: 1.25; }
h1 { font-size: var(--text-xl); }
h2 { font-size: var(--text-lg); }
h3 { font-size: var(--text-md); }
p { margin: 0 0 var(--space-2); }
small { font-size: var(--text-sm); }
code, kbd, samp { font-family: var(--font-mono); font-size: .92em; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 2px; }
a:hover { color: var(--signal-text); text-decoration-color: currentColor; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--space-4) 0; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--signal-soft); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); }

/* buttons: one black primary per view, the rest plain */
button, .btn {
  font: inherit; color: var(--ink); cursor: pointer;
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 5px 12px; border-radius: var(--radius-md);
  border: 1px solid var(--line-2); background: var(--canvas);
  text-decoration: none; line-height: 1.4;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
button:hover, .btn:hover { background: var(--hover); color: var(--ink); }
button:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: default; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: var(--ink); color: var(--on-ink); opacity: .88; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--hover); }
.btn-sm { padding: 3px 9px; font-size: var(--text-sm); }
.btn-icon { width: 28px; height: 28px; padding: 0; justify-content: center; border-color: transparent; background: transparent; color: var(--ink-2); }

/* inputs */
input[type="text"], input[type="password"], input[type="search"], input:not([type]), select, textarea {
  font: inherit; color: var(--ink);
  background: var(--canvas); border: 1px solid var(--line-2); border-radius: var(--radius-md);
  padding: 6px 10px;
}
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
::placeholder { color: var(--ink-3); }
label { display: block; font-size: var(--text-sm); color: var(--ink-2); margin-bottom: var(--space-1); }

/* tables: hairlines, no zebra, figures right-aligned */
table { border-collapse: collapse; width: 100%; font-size: var(--text-sm); }
th, td { padding: 7px var(--space-3); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-weight: var(--weight-medium); color: var(--ink-3); font-size: var(--text-xs); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
tbody tr:hover td { background: var(--sub); }

/* definition lists: the record screen */
dl { display: grid; grid-template-columns: 170px 1fr; gap: var(--space-1) var(--space-3); margin: 0; font-size: var(--text-md); }
dt { color: var(--ink-2); }
dd { margin: 0; }

/* Mind design system: components. Look: "Desk" (D26).
   Rules: flat, not boxed (no card inside a card); hairlines, not heavy borders; one black
   primary button per view; orange only for meaning; every number that opens to rows is a
   .num-link. No JavaScript is needed for any of these: folding uses <details>. */

/* ------------------------------------------------------------------ shell */
.shell { display: grid; grid-template-rows: auto 1fr; height: 100vh; min-height: 560px; }
.shell-cols { display: grid; grid-template-columns: var(--rail-width) minmax(0, 1fr) var(--panel-width); min-height: 0; }
.shell-cols.no-panel { grid-template-columns: var(--rail-width) minmax(0, 1fr); }
.shell-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--canvas); }
.shell-scroll { flex: 1; overflow: auto; }
@media (max-width: 1100px) {
  .shell-cols { grid-template-columns: var(--rail-width) minmax(0, 1fr); }
  .shell-cols > .panel { display: none; }
}
@media (max-width: 760px) {
  .shell-cols, .shell-cols.no-panel { grid-template-columns: 1fr; }
  .shell-cols > .rail { display: none; }
}

/* optional title bar for a frameless window; the drag area is the bar itself */
.titlebar {
  display: flex; align-items: center; gap: var(--space-2); height: 40px; padding-left: var(--space-3);
  background: var(--side); border-bottom: 1px solid var(--line); font-size: var(--text-sm); color: var(--ink-2);
  -webkit-app-region: drag; user-select: none;
}
.titlebar button, .titlebar a, .titlebar input { -webkit-app-region: no-drag; }
.titlebar-crumb { font-weight: var(--weight-medium); color: var(--ink); }
.titlebar-crumb span { color: var(--ink-3); font-weight: var(--weight-regular); }
/* the logo: Demo's square mark (web/style/logo.svg), drawn inline by logo() so it needs no
   request and is never recoloured. A hairline ring in dark keeps the navy square's edge visible. */
.mark { width: 18px; height: 18px; flex: none; display: inline-block; line-height: 0; border-radius: 16%; }
.mark svg { width: 100%; height: 100%; display: block; }
.mark-md { width: 22px; height: 22px; }
.mark-lg { width: 40px; height: 40px; }
:root[data-theme="dark"] .mark { box-shadow: 0 0 0 1px var(--line-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mark { box-shadow: 0 0 0 1px var(--line-2); } }
.jump {
  margin-left: auto; width: 300px; height: 26px; display: flex; align-items: center; gap: var(--space-2);
  padding: 0 var(--space-2); border: 1px solid var(--line-2); border-radius: var(--radius-md);
  background: var(--canvas); color: var(--ink-3); font-size: var(--text-sm); text-decoration: none;
}
.kbd { font: var(--weight-medium) 10.5px/1 var(--font-ui); padding: 3px 5px; border-radius: var(--radius-sm); background: var(--muted); color: var(--ink-2); }

/* ------------------------------------------------------------------ left column */
.rail { background: var(--side); border-right: 1px solid var(--line); padding: 10px var(--space-2); display: flex; flex-direction: column; min-height: 0; overflow: auto; }
.seg { display: flex; background: var(--muted); border-radius: 7px; padding: 2px; margin: 2px var(--space-1) 10px; }
.seg-item { flex: 1; text-align: center; padding: 4px 0; border-radius: 5px; font-size: var(--text-sm); color: var(--ink-2); text-decoration: none; }
.seg-item:hover { color: var(--ink); }
.seg-item[aria-current="true"] { background: var(--canvas); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: var(--weight-medium); }
.count { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; margin-left: var(--space-1); border-radius: var(--radius-full); background: var(--signal); color: #fff; font-size: 12px; font-weight: var(--weight-semibold); }
.rail-title { margin: var(--space-3) var(--space-2) var(--space-1); font: var(--weight-semibold) var(--text-xs)/1 var(--font-ui); color: var(--ink-3); display: flex; justify-content: space-between; }
.nav-item { display: flex; align-items: center; gap: 9px; padding: 6px var(--space-2); border-radius: var(--radius-md); color: var(--ink); text-decoration: none; position: relative; }
.nav-item:hover { background: var(--hover); color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--hover); }
.nav-item[aria-current="page"]::before { content: ""; position: absolute; left: calc(-1 * var(--space-2)); top: 8px; bottom: 8px; width: 3px; border-radius: 0 2px 2px 0; background: var(--signal); }
.nav-item.is-later { color: var(--ink-3); }
.nav-item .icon { width: 16px; height: 16px; color: var(--ink-2); flex: none; }
.nav-item .hint { margin-left: auto; font-size: var(--text-xs); color: var(--ink-3); }

.agent-row { align-items: flex-start; }
.agent-row .agent-text { min-width: 0; flex: 1; }
.agent-row .agent-name { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); font-weight: var(--weight-semibold); }
.agent-row .agent-time { font-weight: var(--weight-regular); color: var(--ink-3); font-size: var(--text-xs); }
.agent-row .agent-last { margin: 0; font-size: var(--text-sm); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-row.is-off { color: var(--ink-3); }
.agent-row.is-off .agent-last { color: var(--ink-3); }

.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--ink); color: var(--on-ink); font: var(--weight-semibold) 11.5px/1 var(--font-ui); }
.avatar.is-person { background: var(--muted); color: var(--ink-2); }
.avatar.is-off { background: var(--muted); color: var(--ink-3); }
.avatar-sm { width: 22px; height: 22px; font-size: 12px; }
.avatar-wrap { position: relative; flex: none; }
.presence { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 2px var(--side); }
.presence.is-idle { background: var(--ink-3); }
.presence.is-off { background: var(--side); box-shadow: inset 0 0 0 1.5px var(--ink-3), 0 0 0 2px var(--side); }

.badge { display: inline-flex; align-items: center; gap: var(--space-1); font-size: 12px; font-weight: var(--weight-semibold); border-radius: var(--radius-sm); padding: 1px 6px; white-space: nowrap; }
.badge-needs { color: var(--signal-text); background: var(--signal-soft); }
.badge-good { color: var(--good); background: var(--good-soft); }
.badge-bad { color: var(--bad); background: var(--bad-soft); }
.badge-plain { color: var(--ink-2); background: var(--muted); }

.rail-foot { margin-top: auto; display: flex; align-items: center; gap: 9px; padding: 10px var(--space-2) var(--space-1); border-top: 1px solid var(--line); font-size: var(--text-sm); }
.rail-foot small { display: block; color: var(--ink-3); font-size: var(--text-xs); }
.rail-foot form { margin-left: auto; }

/* ------------------------------------------------------------------ view header */
.view-head { display: flex; align-items: center; gap: 10px; padding: 0 var(--space-5); min-height: var(--header-height); border-bottom: 1px solid var(--line); }
.view-head h1 { font-size: var(--text-lg); }
.view-head .meta { font-size: var(--text-sm); color: var(--ink-3); }
.view-head .actions { margin-left: auto; display: flex; gap: 2px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: var(--radius-full); font-size: var(--text-xs); font-weight: var(--weight-medium); white-space: nowrap; }
.chip-good { background: var(--good-soft); color: var(--good); }
.chip-bad { background: var(--bad-soft); color: var(--bad); }
.chip-plain { background: var(--muted); color: var(--ink-2); }

/* banners: verification state, read-only notices */
.banner { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); border-radius: var(--radius-lg); font-size: var(--text-sm); margin: 0 0 var(--space-4); }
.banner-good { background: var(--good-soft); color: var(--good); }
.banner-bad { background: var(--bad-soft); color: var(--bad); font-weight: var(--weight-semibold); }
.banner-plain { background: var(--muted); color: var(--ink-2); }

/* ------------------------------------------------------------------ chat */
.thread { flex: 1; overflow: auto; padding: var(--space-5) var(--space-5) var(--space-2); }
.reading { max-width: var(--reading-width); margin: 0 auto; }
.day-rule { display: flex; align-items: center; gap: 10px; font-size: var(--text-xs); color: var(--ink-3); margin: 0 0 14px; }
.day-rule::before, .day-rule::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.msg { display: flex; gap: 10px; margin: 0 0 var(--space-4); }
.msg .avatar { width: 26px; height: 26px; font-size: 12px; }
.msg-body { flex: 1; min-width: 0; }
.msg-who { font-size: var(--text-sm); color: var(--ink-3); margin-bottom: 2px; }
.msg-who b { color: var(--ink); font-weight: var(--weight-semibold); margin-right: 6px; }
.msg-text { font-size: var(--text-lg); line-height: 1.55; white-space: pre-wrap; }
.msg-text p { margin: 0 0 var(--space-2); }
.msg-you .avatar { background: var(--muted); color: var(--ink-2); }
.msg-cites { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--space-1) 0 var(--space-2); }
.cite { font-size: var(--text-xs); color: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-full); padding: 2px 9px; text-decoration: none; }
.cite:hover { border-color: var(--line-2); color: var(--ink); }

/* a number that opens to its rows */
a.num-link { color: inherit; font-weight: var(--weight-semibold); text-decoration: none; background: linear-gradient(transparent 62%, var(--signal-soft) 62%); padding: 0 1px; white-space: nowrap; }
a.num-link:hover { color: var(--signal-text); }
.value-hidden { color: var(--bad); font-weight: var(--weight-semibold); }

/* the folded "worked for" line: <details class="worked"><summary>...</summary><ol>...</ol></details> */
.worked { margin: 2px 0 var(--space-2); font-size: var(--text-sm); color: var(--ink-3); }
.worked > summary { list-style: none; display: inline-flex; align-items: center; gap: var(--space-2); cursor: pointer; border: 1px solid var(--line); border-radius: 7px; padding: 4px 9px; background: var(--sub); }
.worked > summary::-webkit-details-marker { display: none; }
.worked > summary:hover { border-color: var(--line-2); color: var(--ink-2); }
.worked > summary b { font-weight: var(--weight-medium); color: var(--ink-2); }
.worked > summary .tick { color: var(--good); }
.worked > summary .fail { color: var(--bad); font-weight: var(--weight-medium); }
.worked > summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform var(--fast) var(--ease); }
.worked[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.worked ol { list-style: none; margin: 6px 0 0 var(--space-1); padding: 0 0 0 var(--space-3); border-left: 1px solid var(--line-2); }
.worked li { padding: 2px 0; display: flex; gap: var(--space-2); }
.worked li .time { margin-left: auto; color: var(--ink-3); }

/* inline figure: a chart or table inside an answer, or on a page */
.figure { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-3) 14px 10px; margin: var(--space-1) 0 10px; background: var(--canvas); }
.figure-head { display: flex; align-items: center; gap: 10px; }
.figure-head h4 { margin: 0; font-size: 12.5px; font-weight: var(--weight-semibold); }
.figure-total { margin-left: auto; font: var(--weight-semibold) var(--text-xl)/1 var(--font-display); letter-spacing: var(--tracking-tight); }
.figure-sub { font-size: 12px; color: var(--ink-3); margin: 3px 0 var(--space-2); }
.figure-foot { display: flex; align-items: center; gap: var(--space-2); margin-top: 6px; padding-top: var(--space-2); border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.figure-foot .push { margin-left: auto; }
.figure table { margin: 0 -14px; width: calc(100% + 28px); }
.figure table th:first-child, .figure table td:first-child { padding-left: 14px; }
.figure table th:last-child, .figure table td:last-child { padding-right: 14px; }

/* bar chart (svg from web/style/chart.ts) */
.bar-chart { width: 100%; height: auto; overflow: visible; }
.bar-chart .bar { fill: var(--bar); }
.bar-chart .bar.is-strong { fill: var(--bar-strong); }
.bar-chart a:hover .bar { fill: var(--signal); }
.bar-chart .grid { stroke: var(--line); stroke-width: 1; }
.bar-chart .axis { fill: var(--ink-3); font: 11px var(--font-ui); }
.bar-chart .value { fill: var(--ink-2); font: var(--weight-medium) 11px var(--font-ui); }

/* small trend line on a tile */
.spark { width: 72px; height: 26px; }
.spark path { fill: none; stroke: var(--ink-3); stroke-width: 1.5; }

/* ------------------------------------------------------------------ decisions */
/* docked above the message box: <div class="dock"><div class="dock-peek"></div><article class="decision">...</article></div>
   .dock-peek shows that more cards wait behind the front one; leave it out for one card. */
.dock { max-width: var(--reading-width); margin: 0 auto; width: 100%; position: relative; padding-top: var(--space-2); }
.dock-peek { position: absolute; left: 3%; right: 3%; top: 0; height: 20px; border-radius: var(--radius-xl) var(--radius-xl) 0 0; background: var(--sub); border: 1px solid var(--line); border-bottom: 0; }
.decision { position: relative; background: var(--canvas); border: 1px solid var(--line-2); border-radius: var(--radius-xl); box-shadow: var(--shadow-float); padding: var(--space-3) 14px; animation: rise var(--slow) var(--ease); }
.decision.is-flat { box-shadow: none; border: 0; border-radius: 0; animation: none; }
.decision-head { display: flex; align-items: center; gap: var(--space-2); font-size: 12px; color: var(--ink-3); }
.decision-head .of { margin-left: auto; }
.decision-title { margin: var(--space-2) 0; font-size: 15px; font-weight: var(--weight-semibold); line-height: 1.3; }
.change { margin-bottom: 10px; font-size: 12.5px; }
.change td { padding: 4px 0; border-top: 1px solid var(--line); border-bottom: 0; }
.change td:first-child { color: var(--ink-2); }
.change td.num { width: 110px; }
.decision.is-flat .change td.num { width: auto; padding-left: var(--space-2); }
.decision.is-flat .change td.arrow { width: 16px; }
.change td.arrow { width: 28px; text-align: center; color: var(--ink-3); }
.change td.after { font-weight: var(--weight-semibold); }
.change tbody tr:hover td { background: none; }
.decision-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.decision-actions .note { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.decision-done { font-size: var(--text-sm); color: var(--ink-2); display: flex; gap: var(--space-2); align-items: center; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ message box */
.composer { padding: 10px var(--space-5) var(--space-4); }
.composer-box { max-width: var(--reading-width); margin: 0 auto; border: 1px solid var(--line-2); border-radius: var(--radius-xl); padding: 10px var(--space-3) var(--space-2); background: var(--canvas); transition: border-color var(--fast) var(--ease); }
.composer-box:focus-within { border-color: var(--ink-3); }
.composer-box textarea, .composer-box input[type="text"] { width: 100%; border: 0; padding: 0 0 10px; background: transparent; resize: none; font-size: var(--text-lg); outline: none; }
.composer-row { display: flex; align-items: center; gap: var(--space-1); color: var(--ink-3); font-size: 12px; }
.composer-row .push { margin-left: auto; }
.send { width: 28px; height: 28px; padding: 0; justify-content: center; border-radius: var(--radius-md); border: 0; background: var(--ink); color: var(--on-ink); }
.send:hover { background: var(--ink); color: var(--on-ink); opacity: .88; }
.dock + .composer-box { margin-top: 10px; }

/* ------------------------------------------------------------------ team panel */
.panel { border-left: 1px solid var(--line); background: var(--sub); overflow: auto; min-height: 0; }
.panel-tabs { display: flex; gap: var(--space-4); padding: 0 var(--space-4); height: var(--header-height); align-items: center; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.panel-tabs a { color: var(--ink-3); text-decoration: none; height: 100%; display: flex; align-items: center; }
.panel-tabs a:hover { color: var(--ink); }
.panel-tabs a[aria-current="true"] { color: var(--ink); font-weight: var(--weight-semibold); box-shadow: inset 0 -2px 0 var(--ink); }
.panel-section { padding: 14px var(--space-4); border-bottom: 1px solid var(--line); }
.panel-section:last-child { border-bottom: 0; }
.panel-title { margin: 0 0 var(--space-2); font: var(--weight-semibold) var(--text-xs)/1 var(--font-ui); color: var(--ink-3); display: flex; justify-content: space-between; }
.panel-note { font-size: var(--text-xs); color: var(--ink-3); margin: var(--space-2) 0 0; }

/* tile: a pinned number with its source line */
.tile { display: grid; grid-template-columns: 1fr auto; align-items: end; color: inherit; text-decoration: none; padding: 9px 10px; margin: 0 -10px; border-radius: 7px; }
.tile:hover { background: var(--hover); color: inherit; }
.tile-title { font-size: var(--text-sm); color: var(--ink-2); }
.tile-value { font: var(--weight-semibold) var(--text-2xl)/1.2 var(--font-display); letter-spacing: var(--tracking-tight); }
.tile-source { grid-column: 1 / 3; font-size: 12px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--good); display: inline-block; flex: none; }
.dot.is-bad { background: var(--bad); }
.dot.is-quiet { background: var(--ink-3); }

/* scheduled job with a pause switch (a real checkbox, styled) */
.job { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 12.5px; }
.job-text { flex: 1; min-width: 0; }
.job-text small { display: block; color: var(--ink-3); font-size: 12px; }
.switch { appearance: none; -webkit-appearance: none; width: 26px; height: 15px; margin: 0; border-radius: 8px; background: var(--line-2); position: relative; flex: none; cursor: pointer; border: 0; padding: 0; transition: background var(--fast) var(--ease); }
.switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--canvas); box-shadow: var(--shadow-sm); transition: transform var(--fast) var(--ease); }
.switch:checked { background: var(--ink); }
.switch:checked::after { transform: translateX(11px); }
.switch:disabled { opacity: .5; cursor: default; }

.person { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-1) 0; font-size: 12.5px; }
.person .level { margin-left: auto; color: var(--ink-3); font-size: 12px; }

/* ------------------------------------------------------------------ cards and pages */
.page { padding: 22px var(--space-7) 40px; max-width: 1180px; }
.page-narrow { max-width: 860px; }
.card { border: 1px solid var(--line); border-radius: var(--radius-xl); background: var(--canvas); min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); margin: 0; padding: var(--space-3) 14px; font-size: 12.5px; font-weight: var(--weight-semibold); border-bottom: 1px solid var(--line); }
.card-head small { font-weight: var(--weight-regular); color: var(--ink-3); font-size: 12px; }
.card-body { padding: var(--space-3) 14px; }

/* Pulse */
.pulse-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-4); }
.span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
@media (max-width: 1000px) { .span-4, .span-6, .span-8 { grid-column: span 12; } }
.kpi { padding: 14px; }
.kpi-top { display: flex; justify-content: space-between; font-size: var(--text-sm); color: var(--ink-2); }
.kpi-value { display: block; font: var(--weight-semibold) var(--text-3xl)/1.2 var(--font-display); letter-spacing: var(--tracking-tight); margin: var(--space-1) 0 var(--space-2); color: inherit; text-decoration: none; }
a.kpi-value:hover { color: var(--signal-text); }
.kpi-foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); }
.state-ok { color: var(--good); font-weight: var(--weight-medium); }
.state-off { color: var(--signal-text); font-weight: var(--weight-medium); }
.state-none { color: var(--ink-3); }

/* usual range: <div class="range"><i style="left:6%;width:44%"></i><b style="left:22%"></b></div> */
.range { height: 6px; border-radius: 3px; background: var(--muted); position: relative; margin: var(--space-1) 0 6px; }
.range i { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--range); }
.range b { position: absolute; top: -3px; width: 3px; height: 12px; border-radius: 2px; background: var(--ink); margin-left: -1px; }
.range.is-off b { background: var(--signal); }

/* the brief: one line per fact, each opening to its rows */
.brief { list-style: none; margin: 0; padding: 0; }
.brief li { display: flex; gap: var(--space-3); align-items: baseline; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: var(--text-md); }
.brief li:last-child { border-bottom: 0; }
.brief .time { font-size: 12px; color: var(--ink-3); width: 38px; flex: none; }
.brief .src { margin-left: auto; font-size: 12px; color: var(--ink-3); white-space: nowrap; }

/* agent runs strip */
.runs { display: flex; align-items: center; gap: 10px; padding: var(--space-3) 14px; font-size: 12.5px; color: var(--ink-2); }
.runs-bars { display: flex; gap: 2px; margin-left: auto; }
.runs-bars i { width: 4px; height: 14px; border-radius: 1px; background: var(--line-2); }
.runs-bars i.is-asked { background: var(--signal); }
.runs-bars i.is-failed { background: var(--bad); }

/* proposed tile */
.proposal { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 14px; }
.proposal-text { flex: 1; }
.proposal-text small { display: block; color: var(--ink-3); }

/* record screen: picture, rows, record */
.crumbs { display: flex; gap: 6px; font-size: var(--text-sm); color: var(--ink-3); margin-bottom: var(--space-3); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.evidence { border: 1px dashed var(--line-2); border-radius: var(--radius-lg); padding: var(--space-3); font-size: var(--text-sm); color: var(--ink-2); }

/* ------------------------------------------------------------------ states */
.empty { text-align: center; padding: 48px var(--space-6); color: var(--ink-2); }
.empty h3 { color: var(--ink); margin-bottom: var(--space-1); }
.empty p { max-width: 360px; margin: 0 auto var(--space-3); font-size: var(--text-md); }
.skeleton { display: block; height: 12px; border-radius: var(--radius-sm); background: linear-gradient(90deg, var(--muted) 0%, var(--hover) 50%, var(--muted) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; animation-delay: 300ms; }
@keyframes shimmer { to { background-position: -200% 0; } }
.error-line { display: flex; gap: var(--space-2); align-items: flex-start; color: var(--bad); font-size: var(--text-sm); }

/* sign-in */
.signin { max-width: 360px; margin: 14vh auto; padding: var(--space-6); background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-md); }
.signin h1 { display: flex; align-items: center; gap: 10px; margin-bottom: var(--space-4); }
.signin input, .signin select { width: 100%; margin-bottom: var(--space-3); }
.signin .btn-primary { width: 100%; justify-content: center; padding: 8px 12px; }

/* helpers */
.muted { color: var(--ink-2); }
.quiet { color: var(--ink-3); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Mind design system: keyboard pieces (Sam, Nov 18: "add the keyboard extras too").
   Ctrl K to jump anywhere, @ to pull in a number, / for commands, single keys on decision
   cards. Every key is shown on screen next to the thing it does, and every one has a
   button or a click that does the same. Behaviour: keys.js. */

/* a key shown inside a button or a hint: <span class="key">A</span> */
.key {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: var(--radius-sm); border: 1px solid var(--line-2); border-bottom-width: 2px;
  background: var(--canvas); color: var(--ink-2);
  font: var(--weight-medium) 10.5px/1 var(--font-ui);
}
.btn-primary .key { background: transparent; border-color: color-mix(in srgb, var(--on-ink) 35%, transparent); color: var(--on-ink); }
.key-hints { display: flex; flex-wrap: wrap; gap: var(--space-3); font-size: 12px; color: var(--ink-3); }
.key-hints span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.composer-row { flex-wrap: wrap; }

/* ------------------------------------------------------------------ Ctrl K: jump anywhere */
/* <dialog class="palette"> opened by the title bar's jump box, or Ctrl K */
.palette {
  width: min(560px, calc(100vw - 32px)); max-height: min(520px, calc(100vh - 120px)); margin: 12vh auto auto;
  padding: 0; border: 1px solid var(--line-2); border-radius: var(--radius-xl);
  background: var(--canvas); color: var(--ink); box-shadow: var(--shadow-float);
  display: none; flex-direction: column; overflow: hidden;
}
.palette[open] { display: flex; animation: rise var(--slow) var(--ease); }
.palette::backdrop { background: rgba(0, 0, 0, .18); }
:root[data-theme="dark"] .palette::backdrop { background: rgba(0, 0, 0, .5); }
.palette-search { display: flex; align-items: center; gap: var(--space-2); padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.palette-search input { flex: 1; border: 0; padding: 14px 0; font-size: 15px; background: transparent; outline: none; }
.palette-list { overflow: auto; padding: 6px; }
.palette-group { margin: 8px 8px 4px; font: var(--weight-semibold) var(--text-xs)/1 var(--font-ui); color: var(--ink-3); }
.palette-foot { border-top: 1px solid var(--line); padding: 8px 14px; background: var(--sub); }

/* one row in the palette or a menu */
.option {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: var(--radius-md);
  color: var(--ink); text-decoration: none; cursor: pointer; font-size: var(--text-md);
}
.option:hover { color: var(--ink); }
.option[aria-selected="true"] { background: var(--hover); }
.option .opt-icon { width: 22px; height: 22px; border-radius: var(--radius-md); display: grid; place-items: center; background: var(--muted); color: var(--ink-2); font-size: 12px; font-weight: var(--weight-semibold); flex: none; }
.option .opt-sub { color: var(--ink-3); font-size: var(--text-sm); }
.option .opt-end { margin-left: auto; color: var(--ink-2); font-size: var(--text-sm); white-space: nowrap; }
.option mark { background: none; color: var(--ink); font-weight: var(--weight-semibold); }
.option .key { margin-left: var(--space-1); }
.option-empty { padding: 18px 8px; color: var(--ink-3); text-align: center; font-size: var(--text-sm); }

/* ------------------------------------------------------------------ @ and / in the message box */
/* .composer-box gets position:relative; the menu sits above it */
.composer-box { position: relative; }
.menu {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 5;
  max-height: 280px; overflow: auto; padding: 6px;
  background: var(--canvas); border: 1px solid var(--line-2); border-radius: var(--radius-xl); box-shadow: var(--shadow-float);
}
.menu[hidden] { display: none; }
.menu-title { display: flex; justify-content: space-between; margin: 4px 8px 6px; font: var(--weight-semibold) var(--text-xs)/1 var(--font-ui); color: var(--ink-3); }
.menu-title .key-hints { font-weight: var(--weight-regular); }
.composer-row .tool { display: inline-flex; align-items: center; gap: 5px; padding: 3px 7px; border: 0; background: transparent; color: var(--ink-3); font-size: 12px; border-radius: var(--radius-md); }
.composer-row .tool:hover { background: var(--hover); color: var(--ink); }
/* a number pulled into a sent message */
.mention { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; border-radius: var(--radius-sm); background: var(--muted); font-weight: var(--weight-medium); text-decoration: none; color: var(--ink); white-space: nowrap; }
.mention::before { content: "@"; color: var(--ink-3); }
.command { font-family: var(--font-mono); font-size: .92em; color: var(--ink-2); }

/* ------------------------------------------------------------------ single keys on a decision */
/* The card takes focus (tabindex="0"). Keys act only while focus is inside the card and never
   while typing in a text field. A (or a click on Approve) only arms the approval; Enter or a
   second click on "Yes, approve" confirms; Esc or 6 seconds disarm. */
.decision:focus-within { border-color: var(--ink-3); }
.decision .key { margin-left: 2px; }
.decision-keys { margin-top: var(--space-2); }
.decision.is-armed { border-color: var(--ink); }
.confirm { display: none; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin-top: 10px; padding: var(--space-2) 10px; border-radius: var(--radius-lg); background: var(--muted); font-size: var(--text-sm); }
.decision.is-armed .confirm { display: flex; animation: rise var(--fast) var(--ease); }
.decision.is-armed .decision-actions { display: none; }
.confirm .push { margin-left: auto; }
.confirm-timer { height: 2px; flex-basis: 100%; background: var(--line-2); border-radius: 1px; overflow: hidden; }
.confirm-timer i { display: block; height: 100%; width: 100%; background: var(--ink-3); transform-origin: left; animation: drain 10s linear forwards; }
.is-held .confirm-timer i { animation-play-state: paused; }
@keyframes drain { to { transform: scaleX(0); } }
.decision-done .key { margin-left: 2px; }

@media (prefers-reduced-motion: reduce) {
  .confirm-timer i { animation: none; }
}

/* The app's screens, look "Still" (Sam's pick, Nov 19 2026). Chat is home; everything else is a
   page in the same frame or a pane beside it. Flat, not boxed: group with space and one hairline,
   never a card inside a card. One shadow for what floats. Red only for real failures; orange
   for "needs you" and out of range. Loaded last, so it wins over components.css. */

/* ================================================================ base */
html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 var(--t-ui)/1.5 var(--sans); font-feature-settings: "cv11", "ss01"; font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: var(--r-sm); }
.soft { color: var(--ink-3); }
.unver { color: var(--bad); font-weight: 600; }
.backup-warn { color: var(--signal-ink); font-weight: 600; }
.kbd { display: inline-block; font: 500 10.5px/1 var(--sans); padding: 3px 5px; border-radius: 4px; background: var(--fill); color: var(--ink-3); border: 0; }

/* ================================================================ frame */
.frame { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); height: 100vh; min-height: 560px; overflow: hidden; background: var(--bg); }
.frame.has-pane { grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--pane-w); }
.frame.has-pane.pane-off { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
.frame.pane-off > .pane { display: none; }
@media (max-width: 1100px) {
  .frame.has-pane { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
  .frame.has-pane > .pane { position: fixed; right: 0; top: 0; bottom: 0; width: var(--pane-w); z-index: 5; box-shadow: 0 0 0 1px var(--stroke-float), var(--shadow-float); }
}
@media (max-width: 760px) {
  .frame, .frame.has-pane { grid-template-columns: minmax(0, 1fr); height: auto; overflow: visible; }
  .frame > .rail { display: none; }
}

/* ================================================================ left column */
.frame > .rail { background: var(--rail); display: flex; flex-direction: column; min-height: 0; padding: 0 var(--s3) var(--s3); border-right: 1px solid var(--line); overflow: hidden; gap: 0; }
.rail .brand { display: flex; align-items: center; gap: 10px; height: var(--head-h); padding: 0 0 0 6px; flex: none; }
.rail .brand .home { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.rail .brand .mark { width: 24px; height: 24px; border-radius: 6px; overflow: hidden; }
.rail .brand b { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.rail .brand .icon-btn { margin-left: auto; }
.rail .search { display: flex; align-items: center; gap: var(--s2); width: 100%; height: 32px; padding: 0 var(--s2); margin: 0 0 var(--s2); border: 0; border-radius: var(--r-md); background: transparent; color: var(--ink-3); font: inherit; cursor: pointer; text-align: left; flex: none; }
.rail .search:hover { background: var(--hover); color: var(--ink-2); }
.rail .search .kbd { margin-left: auto; }
.rail .nav { display: flex; flex-direction: column; gap: 1px; flex: none; }
.rail .nav-item { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 var(--s2); border-radius: var(--r-md); color: var(--ink-2); text-decoration: none; position: relative; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.rail .nav-item::before { display: none; }
.rail .nav-item svg { flex: none; }
.rail .nav-item:hover { background: var(--hover); color: var(--ink); }
.rail .nav-item .count { margin-left: auto; }
.rail [aria-current="page"].nav-item, .rail [aria-current="page"].agent, .rail [aria-current="page"].rail-link { background: var(--bg); color: var(--ink); box-shadow: var(--shadow-xs), 0 0 0 1px var(--line); font-weight: 500; }
.rail-h { display: flex; align-items: center; justify-content: space-between; margin: var(--s5) var(--s2) 6px; font-size: var(--t-label); font-weight: 600; color: var(--ink-3); letter-spacing: .01em; flex: none; }
.rail-note { margin: 0 var(--s2); font-size: var(--t-meta); color: var(--ink-3); }
.count { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 5px; margin: 0; border-radius: var(--r-full); background: var(--signal); color: #fff; font-size: 12px; font-weight: 600; line-height: 1; }

/* agents, each with the person's own chats nested under it */
.rail .agents { flex: 1; min-height: 0; overflow: auto; margin: 0 calc(-1 * var(--s1)); padding: 0 var(--s1) var(--s2); }
.agent-group + .agent-group { margin-top: var(--s2); }
.rail .agent { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 var(--s2); border-radius: var(--r-md); color: var(--ink); text-decoration: none; transition: background var(--t-fast) var(--ease); }
.rail .agent:hover { background: var(--hover); }
.rail .agent .name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.glyph { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: none; background: var(--ink); color: var(--on-ink); }
.glyph.sm { width: 20px; height: 20px; border-radius: 6px; }
.glyph.sm svg { width: 12px; height: 12px; }
.frame .presence { position: static; width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--good); box-shadow: none; }
.frame .presence.quiet { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.frame .presence.off { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-4); }
.threads { position: relative; margin: 2px 0 0 19px; padding-left: 10px; border-left: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 1px; }
.thread-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--s2); height: 30px; padding: 0 var(--s2); border-radius: var(--r-md); color: var(--ink-2); text-decoration: none; transition: background var(--t-fast) var(--ease); }
.thread-row .title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread-row .when { font-size: var(--t-label); color: var(--ink-3); }
.thread-row:hover { background: var(--hover); color: var(--ink); }
.thread-row[aria-current="page"] { background: var(--bg); color: var(--ink); font-weight: 500; box-shadow: var(--shadow-xs), 0 0 0 1px var(--line); }
.thread-new, .thread-more { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 var(--s2); border-radius: var(--r-md); color: var(--ink-3); font-size: var(--t-meta); text-decoration: none; }
.thread-new:hover, .thread-more:hover { background: var(--hover); color: var(--ink); }
.thread-new svg { width: 12px; height: 12px; }
.thread-new[aria-current="page"] { background: var(--bg); color: var(--ink); box-shadow: var(--shadow-xs), 0 0 0 1px var(--line); }

.rail-link { flex: none; display: flex; align-items: center; gap: 10px; margin: var(--s2) 0 0; padding: 8px var(--s2); border-radius: var(--r-md); color: var(--ink-3); font-size: var(--t-meta); line-height: 1.35; text-decoration: none; }
.rail-link svg { flex: none; width: 14px; height: 14px; }
.rail-link b { display: block; color: var(--ink-2); font-weight: 500; }
a.rail-link:hover { background: var(--hover); }
a.rail-link:hover b { color: var(--ink); }
/* the Update row (shell.ts updateRow): hidden unless the Windows app has an update ready */
.rail .rail-update[hidden] { display: none; }
.rail .rail-update { flex: none; display: flex; align-items: center; gap: 10px; margin: var(--s2) 0 0; padding: 8px var(--s2); border-radius: var(--r-md); background: var(--signal-soft); color: var(--signal-text); font-size: var(--t-meta); line-height: 1.35; text-decoration: none; cursor: pointer; }
.rail .rail-update svg { flex: none; width: 14px; height: 14px; }
.rail .rail-update b { display: block; color: var(--ink); font-weight: 600; }
.rail .rail-update:hover { box-shadow: 0 0 0 1px var(--signal) inset; }
.rail .rail-update:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.rail .rail-update[aria-busy="true"] { cursor: progress; opacity: .8; box-shadow: none; }
.rail .me { flex: none; display: flex; align-items: center; gap: 6px; margin-top: var(--s2); padding: var(--s3) 0 0 var(--s1); border-top: 1px solid var(--line); }
.rail .me .who { flex: 1; min-width: 0; line-height: 1.3; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail .me .who small { display: block; color: var(--ink-3); font-size: var(--t-meta); font-weight: 400; }
.rail .me form { margin: 0; }
.rail .me .icon-btn[aria-current="page"] { background: var(--bg); color: var(--ink); box-shadow: var(--shadow-xs), 0 0 0 1px var(--line); }
.face { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--fill); color: var(--ink-2); font-size: var(--t-label); font-weight: 600; margin-right: 4px; }

/* ================================================================ buttons */
.icon-btn { width: 30px; height: 30px; padding: 0; border: 0; border-radius: var(--r-sm); display: inline-grid; place-items: center; background: transparent; color: var(--ink-3); cursor: pointer; flex: none; text-decoration: none; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.icon-btn:hover { background: var(--hover); color: var(--ink); opacity: 1; }
.frame button, body > main button, .signin button { font: 500 var(--t-ui)/1 var(--sans); height: 32px; padding: 0 14px; border-radius: var(--r-md); border: 0; background: var(--ink); color: var(--on-ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.frame button:hover, body > main button:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); color: var(--on-ink); opacity: 1; }
.frame button:active { transform: scale(.98); }
.frame button.quiet, .frame button.soft, body > main button.quiet { background: var(--fill); color: var(--ink); }
.frame button.quiet:hover, .frame button.soft:hover, body > main button.quiet:hover { background: var(--hover); color: var(--ink); }
.frame button.ghost { background: transparent; color: var(--ink-2); padding: 0 10px; }
.frame button.ghost:hover { background: var(--hover); color: var(--ink); }
.frame button.icon-btn { width: 30px; height: 30px; padding: 0; background: transparent; color: var(--ink-3); }
.frame button.icon-btn:hover { background: var(--hover); color: var(--ink); }
.frame button:disabled { opacity: .45; cursor: default; }
.frame button .key, .frame button .kbd { background: color-mix(in srgb, var(--on-ink) 18%, transparent); color: inherit; border: 0; }
.frame button.quiet .key, .frame button.soft .key { background: var(--bg); color: var(--ink-3); }

/* inputs */
.frame input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]), .frame select, .frame textarea {
  font: inherit; font-size: var(--t-ui); color: var(--ink); background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 7px 10px; transition: border-color var(--t-fast) var(--ease);
}
.frame input:focus, .frame select:focus, .frame textarea:focus { outline: none; border-color: var(--ink-3); }

/* ================================================================ main and head */
.frame > .main { display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; background: var(--bg); }
.head { display: flex; align-items: center; gap: var(--s3); height: var(--head-h); padding: 0 var(--s5); flex: none; border-bottom: 1px solid transparent; }
.head .crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; font-size: 14px; color: var(--ink-3); white-space: nowrap; }
.head .crumbs a { color: var(--ink-3); text-decoration: none; }
.head .crumbs a:hover { color: var(--ink); }
.head .crumbs .sep { color: var(--ink-4); }
.head .crumbs b { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.head .crumbs .sub { color: var(--ink-3); font-size: var(--t-ui); overflow: hidden; text-overflow: ellipsis; }
.head .crumbs .just { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: var(--t-meta); }
.head .tools { margin-left: auto; display: flex; align-items: center; gap: var(--s2); }
.head .tools .icon-btn[aria-pressed="false"] { color: var(--ink-4); }

.checked { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 8px; border-radius: var(--r-full); font-size: var(--t-meta); color: var(--ink-2); background: var(--bg); box-shadow: 0 0 0 1px var(--line); white-space: nowrap; }
.checked i { width: 14px; height: 14px; border-radius: 50%; background: var(--good); display: grid; place-items: center; flex: none; }
.checked i::after { content: ""; width: 5px; height: 3px; border: solid var(--bg); border-width: 0 0 1.6px 1.6px; transform: translate(0, -.5px) rotate(-45deg); }
.checked.failed { color: var(--signal-ink); box-shadow: 0 0 0 1px var(--signal-soft); background: var(--signal-soft); }
.checked.failed i { background: var(--signal); }
.checked.failed i::after { width: 1.6px; height: 6px; border: 0; background: var(--bg); transform: none; border-radius: 1px; }

/* a page: one gutter, one column; the Pulse is wide */
.frame .page { flex: 1; min-height: 0; overflow: auto; padding: var(--s2) var(--gutter) var(--s7); max-width: none; }
.frame .page-col { max-width: 920px; }
.frame .page.is-wide .page-col { max-width: 1240px; }
.frame .page h1 { margin: 0 0 var(--s2); font-size: 28px; font-weight: 500; letter-spacing: -.025em; line-height: 1.15; }
.frame .page h2 { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin: var(--s6) 0 var(--s3); padding-top: var(--s4); border-top: 1px solid var(--line); font-size: 14px; font-weight: 600; letter-spacing: -.005em; }
.frame .page h2 small { font-size: var(--t-meta); font-weight: 400; color: var(--ink-3); }
.frame .page h3 { font-size: var(--t-ui); font-weight: 600; margin: var(--s4) 0 var(--s2); }
.frame .page > .page-col > p:first-child { font-size: var(--t-meta); color: var(--ink-3); margin: 0 0 6px; }
.frame .page > .page-col > p:first-child a { color: var(--ink-3); text-decoration: none; }
.frame .page > .page-col > p:first-child a:hover { color: var(--ink); }
.frame .page p { margin: 0 0 var(--s2); }
.frame .page .means, .frame .page h1 + p { font-size: var(--t-chat); color: var(--ink-2); max-width: 64ch; }
.frame a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.frame a:hover { color: var(--ink); text-decoration-color: var(--signal); }
.frame code { font: 12px var(--mono); background: var(--fill); padding: 1px 5px; border-radius: 4px; }

/* tables: flat rows, one hairline */
.frame table { width: 100%; border-collapse: collapse; font-size: var(--t-ui); margin: var(--s2) 0; }
.frame th { text-align: left; font-size: var(--t-label); font-weight: 500; color: var(--ink-3); padding: 0 var(--s3) var(--s2) 0; border-bottom: 1px solid var(--line); text-transform: none; letter-spacing: 0; background: none; }
.frame td { padding: 9px var(--s3) 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.frame tr:last-child td { border-bottom: 0; }
.frame tbody tr:hover td { background: var(--hover); }
.frame td.n, .frame th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.frame tfoot td, .frame tbody tr:has(th) th { font-weight: 600; color: var(--ink); border-top: 1px solid var(--line-2); }

/* label and value pairs, no boxes */
.frame dl { display: grid; grid-template-columns: 170px 1fr; column-gap: var(--s5); row-gap: 10px; margin: var(--s4) 0; font-size: var(--t-ui); }
.frame dt { color: var(--ink-3); }
.frame dd { margin: 0; }

/* the verification line */
.frame .banner { display: flex; align-items: center; gap: var(--s2); padding: 8px 12px; margin: var(--s3) 0; border-radius: var(--r-md); background: var(--good-soft); color: var(--good); font-size: var(--t-meta); }
.frame .banner small { color: inherit; opacity: .85; }
.frame .banner.bad { display: block; background: var(--signal-soft); color: var(--signal-ink); font-weight: 600; }
.frame .banner.bad small { font-weight: 400; }

/* the line under a number: where it came from. One quiet line; the whole of it on hover. */
.prov { font-size: var(--t-label); line-height: 1.45; color: var(--ink-3); margin-top: 4px; }
.prov b { color: var(--bad); font-weight: 600; }

/* folds */
.frame details > summary { cursor: pointer; color: var(--ink-2); list-style: none; }
.frame details > summary::-webkit-details-marker { display: none; }
.frame details > summary:hover { color: var(--ink); }

/* ================================================================ the chat */
.thread-scroll { flex: 1; min-height: 0; overflow: auto; padding: var(--s3) var(--s5) var(--s4); }
.col { max-width: var(--read-w); margin: 0 auto; }
.frame .msg { display: block; margin: 0 0 var(--s5); max-width: none; gap: 0; }
.frame .msg .by { display: flex; align-items: center; gap: var(--s2); margin-bottom: 6px; font-size: var(--t-meta); color: var(--ink-3); }
.frame .msg .by { white-space: nowrap; }
.frame .msg .by b { color: var(--ink); font-weight: 600; font-size: 13px; }
.frame .msg .body { white-space: pre-wrap; font-size: var(--t-chat); line-height: 1.6; color: var(--ink); max-width: 64ch; }
.frame .msg.me { display: flex; flex-direction: column; align-items: flex-end; }
.frame .msg.me .by { display: none; }
.frame .msg.me .body { max-width: 78%; background: var(--fill); padding: 9px 15px; border-radius: var(--r-xl); line-height: 1.5; }
.frame .msg .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--s3) 0 0; }
.frame .msg .chips a { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-full); font-size: var(--t-meta); color: var(--ink-2); text-decoration: none; box-shadow: inset 0 0 0 1px var(--line-2); border: 0; background: transparent; }
.frame .msg .chips a:hover { background: var(--hover); color: var(--ink); }
.frame .msg .chips a.see-rows { color: var(--ink); font-weight: 500; box-shadow: none; padding: 0 8px 0 0; }
.frame .msg .chips a.see-rows::after { content: "›"; color: var(--ink-3); }
.frame .msg .prov { margin-top: var(--s2); max-width: 64ch; }
.frame .msg .wait { color: var(--ink-3); }
.frame .msg details.fix { margin-top: 6px; font-size: var(--t-meta); }
.frame .msg details.fix > summary { display: inline-flex; color: var(--ink-3); padding: 2px 6px; margin-left: -6px; border-radius: var(--r-sm); }
.frame .msg details.fix > summary:hover { background: var(--hover); color: var(--ink-2); }
.frame form.correct { display: flex; gap: 6px; margin-top: var(--s2); max-width: 520px; opacity: 1; }
.frame form.correct input { flex: 1; }

/* the empty conversation: a greeting and four things to try */
.hello { padding: 5vh 0 var(--s4); }
.hello .glyph { width: 44px; height: 44px; border-radius: 12px; margin-bottom: var(--s5); }
.hello .glyph svg { width: 22px; height: 22px; }
.hello h1 { margin: 0; font-size: 34px; font-weight: 600; letter-spacing: -.03em; line-height: 1.15; }
.hello h1 span { display: block; color: var(--ink-4); }
.hello .now { display: flex; align-items: center; gap: var(--s3); margin: var(--s4) 0 var(--s6); font-size: var(--t-ui); color: var(--ink-3); }
.hello .now a { color: var(--ink); font-weight: 600; text-decoration: underline dotted var(--ink-4); text-underline-offset: 4px; }
.hello .try-h { font-size: var(--t-meta); color: var(--ink-3); margin-bottom: var(--s2); }
.try { display: flex; flex-wrap: wrap; gap: var(--s2); }
.frame .try button { height: 38px; padding: 0 16px; border-radius: var(--r-full); background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 400; font-size: 14px; }
.frame .try button:hover { background: var(--hover); color: var(--ink); }

/* the decision dock: what waits for this person, above the message box */
.dock { flex: none; padding: 0 var(--s5); }
.dock-line { max-width: var(--read-w); margin: var(--s2) auto 0; display: flex; align-items: center; gap: var(--s3); padding: 10px 14px; border-radius: var(--r-lg); background: var(--bg); box-shadow: 0 0 0 1px var(--stroke-float), var(--shadow-float); font-size: var(--t-ui); text-decoration: none; color: var(--ink); }
.dock-line b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.dock-line .more { color: var(--ink-3); white-space: nowrap; }
.dock-line .open { margin-left: auto; color: var(--ink-2); white-space: nowrap; }
.dock-line:hover .open { color: var(--ink); }
.needs { display: inline-flex; align-items: center; gap: 6px; color: var(--signal-ink); font-weight: 600; font-size: var(--t-meta); white-space: nowrap; padding: 2px 8px 2px 6px; border-radius: var(--r-full); background: var(--signal-soft); }
.needs::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); }

/* the message box */
.frame .composer { flex: none; padding: var(--s3) var(--s5) var(--s4); }
.frame form.ask { max-width: var(--read-w); margin: 0 auto; display: block; }
.frame .composer-box { max-width: none; margin: 0; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-xl); padding: 12px 12px 10px 16px; box-shadow: var(--shadow-xs); }
.frame .composer-box:focus-within { border-color: var(--ink-3); }
.frame .composer-box textarea { width: 100%; border: 0 !important; padding: 2px 0 10px !important; background: transparent !important; font-size: var(--t-chat) !important; line-height: 1.5; resize: none; outline: none; box-shadow: none; }
.frame .composer-row { display: flex; align-items: center; gap: var(--s1); margin-left: -6px; color: var(--ink-3); font-size: var(--t-meta); }
.frame .composer-row .tool { height: 28px; padding: 0 8px; background: transparent; color: var(--ink-2); font-weight: 400; font-size: var(--t-meta); border-radius: var(--r-sm); }
.frame .composer-row .tool:hover { background: var(--hover); color: var(--ink); }
.frame .composer-row .tool .key { background: none; border: 0; padding: 0; color: var(--ink); font-weight: 600; margin: 0 2px 0 0; }
.frame .composer-row .push { margin-left: auto; }
.frame .composer-box .send { width: 32px; height: 32px; padding: 0; border-radius: 50%; background: var(--ink); color: var(--on-ink); }
.frame form.ask > .key-hints { display: none; }
.frame form.ask > .key-hints .key { font-size: 12px; }
.composer .privacy { max-width: var(--read-w); margin: 8px auto 0; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: var(--t-label); color: var(--ink-3); text-align: center; }
.composer .privacy svg { flex: none; }

/* the head of a chat: its title, the agent, "just you", a rename */
.head details.rename { position: relative; }
.head details.rename > summary { width: 26px; height: 26px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--ink-4); }
.head details.rename > summary:hover { background: var(--hover); color: var(--ink); }
.head details.rename > summary svg { width: 13px; height: 13px; }
.head details.rename[open] > form { position: absolute; top: 32px; left: 0; z-index: 10; display: flex; gap: 6px; padding: 10px; width: 380px; background: var(--bg); border-radius: var(--r-lg); box-shadow: 0 0 0 1px var(--stroke-float), var(--shadow-float); }
.head details.rename form input { flex: 1; }

/* ================================================================ the pane */
.frame > .pane { background: var(--pane); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; padding: 0; }
.pane-head { display: flex; align-items: center; gap: var(--s2); height: var(--head-h); padding: 0 var(--s3) 0 var(--s5); flex: none; }
.pane-head .crumbs { display: flex; align-items: baseline; gap: 6px; font-size: var(--t-meta); color: var(--ink-3); min-width: 0; margin: 0; }
.pane-head .crumbs b { color: var(--ink); font-weight: 600; font-size: 14px; }
.pane-head .icon-btn { margin-left: auto; }
.pane-body { flex: 1; min-height: 0; overflow: auto; padding: 0 var(--s5) var(--s5); }
.pane-sec { padding: var(--s5) 0; border-top: 1px solid var(--line); }
.pane-sec:first-child { border-top: 0; padding-top: var(--s1); }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 var(--s3); font-size: var(--t-label); font-weight: 600; color: var(--ink-3); letter-spacing: .01em; }
.sec-h a { font-weight: 500; color: var(--ink-2); text-decoration: none; }
.sec-h a:hover { color: var(--ink); }
.pane-note { font-size: var(--t-meta); color: var(--ink-3); margin: var(--s2) 0 0; }
.pane p { font-size: var(--t-meta); }

/* a pinned figure in the pane: label, big figure, one quiet line, a sparkline */
.ptile { display: block; padding: var(--s3) var(--s3) var(--s3); margin: 0 calc(-1 * var(--s3)); border-radius: var(--r-md); color: inherit; text-decoration: none; transition: background var(--t-fast) var(--ease); }
.ptile + .ptile { margin-top: 2px; }
.ptile:hover { background: var(--hover); color: inherit; }
.ptile .lab { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); font-size: var(--t-ui); color: var(--ink-2); }
.ptile .lab::after { content: "›"; color: var(--ink-4); transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.ptile:hover .lab::after { color: var(--ink); transform: translateX(2px); }
.ptile .row { display: flex; align-items: flex-end; gap: var(--s3); margin-top: 2px; }
.ptile .v { font-size: 28px; font-weight: 500; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ptile .v .unver { font-size: 15px; letter-spacing: 0; }
.ptile .sp { margin-left: auto; width: 100px; flex: none; padding-bottom: 4px; }
.ptile .x { font-size: var(--t-meta); color: var(--ink-3); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.ptile .x.tie::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
.ptile .x.tie.off::before { background: var(--signal); }
.ptile .prov { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-4); }
.ptile:hover .prov, .ptile:focus-visible .prov { white-space: normal; color: var(--ink-3); }

/* jobs: a dot, the name, its state, the time */
.jobs { list-style: none; margin: 0; padding: 0; }
.jobs li { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; column-gap: var(--s2); align-items: baseline; padding: 6px 0; font-size: var(--t-ui); border: 0; }
.jobs li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--good); transform: translateY(-1px); }
.jobs li.paused::before, .jobs li.off::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.jobs li.bad::before { background: var(--bad); }
.jobs li b { font-weight: 500; }
.jobs li .what { grid-column: 2 / -1; color: var(--ink-3); font-size: var(--t-meta); }
.jobs li .t { color: var(--ink-3); font-size: var(--t-meta); white-space: nowrap; }
.jobs li form { grid-column: 2 / -1; margin: 4px 0 0; }
.frame .jobs li form button { height: 24px; padding: 0 10px; font-size: var(--t-meta); }

.people-list { display: flex; flex-direction: column; gap: 8px; font-size: var(--t-ui); }
.people-list div { display: flex; align-items: center; gap: var(--s2); }
.people-list .face { width: 22px; height: 22px; font-size: 12px; margin: 0; }
.people-list .lvl { margin-left: auto; color: var(--ink-3); font-size: var(--t-meta); }
.skill { font-size: var(--t-ui); padding: 4px 0; }
.skill small { color: var(--ink-3); }
.frame .pane form { margin: 6px 0; }
.frame .pane form.card, .frame .pane .card { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; margin: 6px 0; background: var(--bg); }
.frame .pane .upload { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--line); }
.frame .pane .upload:first-of-type { border-top: 0; }
.frame .pane .upload div { color: var(--ink-2); font-size: var(--t-meta); }
.frame .pane .upload input[type="file"] { font-size: var(--t-meta); max-width: 100%; }
.frame .pane .upload button { align-self: flex-start; height: 28px; font-size: var(--t-meta); }
.frame .pane details.fold > summary { display: flex; align-items: center; justify-content: space-between; font-size: var(--t-ui); color: var(--ink-2); }
.frame .pane details.fold > summary::after { content: "›"; color: var(--ink-4); transition: transform var(--t-fast) var(--ease); }
.frame .pane details.fold[open] > summary::after { transform: rotate(90deg); }
.frame .pane details.fold > :not(summary) { margin-top: var(--s2); }

/* ================================================================ charts (inline SVG, one recipe, colours by kind) */
.frame svg.chart, .frame .bar-chart { width: 100%; max-width: 640px; height: auto; overflow: visible; margin: var(--s3) 0; }
.chart text, .bar-chart text, .trend text, .inout text { font-family: var(--sans); font-size: 12px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.chart .grid, .bar-chart .grid, .trend .grid, .inout .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .bar, .bar-chart .bar { fill: var(--c-mute); transition: fill var(--t-fast) var(--ease); }
.chart .bar.is-strong, .bar-chart .bar.is-strong { fill: var(--c-out); }
.chart a:hover .bar, .bar-chart a:hover .bar { fill: var(--ink-3); }
.chart .value, .bar-chart .value { fill: var(--ink-2); font-weight: 500; }
.spark { width: 100%; height: 34px; display: block; overflow: visible; }
.spark path { fill: none; stroke: var(--c, var(--ink)); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark path.area { fill: var(--c, var(--ink)); fill-opacity: var(--area-a); stroke: none; }
.spark circle { fill: var(--c, var(--ink)); stroke: none; }
.c-cash { --c: var(--c-cash); } .c-in { --c: var(--c-in); } .c-out { --c: var(--c-out); } .c-owe { --c: var(--c-owe); } .c-work { --c: var(--c-work); } .c-deal { --c: var(--c-deal); }

/* ================================================================ sign in (Crew's, in Still tokens) */
body:has(> .signin-wrap) { background: var(--rail); }
.signin-wrap { min-height: 100vh; display: grid; place-items: center; padding: var(--s5); }
.frame + .signin, .signin { max-width: 380px; width: 100%; margin: 0; padding: var(--s6) var(--s6) var(--s5); background: var(--bg); border: 0; border-radius: var(--r-xl); box-shadow: 0 0 0 1px var(--stroke-float), var(--shadow-float); }
.signin .signin-brand { display: flex; align-items: center; gap: 12px; margin-bottom: var(--s6); font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.signin .signin-brand .mark { width: 32px; height: 32px; border-radius: 8px; overflow: hidden; }
.signin h1 { margin: 0 0 4px; font-size: 24px; font-weight: 600; letter-spacing: -.02em; display: block; }
.signin .lead { margin: 0 0 var(--s5); color: var(--ink-3); font-size: 14px; }
.signin label { display: block; margin: 0 0 var(--s4); font-size: var(--t-meta); color: var(--ink-2); }
.signin input, .signin select { display: block; width: 100%; height: 40px; margin: 6px 0 0; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--bg); color: var(--ink); font: inherit; font-size: 14px; }
.signin input:focus, .signin select:focus { outline: none; border-color: var(--ink-3); }
.signin button { width: 100%; height: 40px; margin-top: var(--s2); font-size: 14px; }
.signin .foot { margin: var(--s5) 0 0; padding-top: var(--s4); border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; font-size: var(--t-meta); color: var(--ink-3); }
.signin .foot svg { flex: none; }
.signin .unver { margin: 0 0 var(--s4); padding: 8px 12px; border-radius: var(--r-md); background: var(--signal-soft); color: var(--signal-ink); font-size: var(--t-meta); }

/* pages outside the frame (not allowed, not found, done) */
body > main { max-width: 640px; margin: 12vh auto; padding: var(--s6); }
body > main h1 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 var(--s3); }

/* ================================================================ pages kept from Desk, in Still tokens (restyled screen by screen) */
.frame ul.pulse { list-style: none; padding: 0; margin: var(--s4) 0; max-width: var(--read-w); }
.frame ul.pulse li { padding: 10px 0 12px; border-bottom: 1px solid var(--line); font-size: var(--t-chat); line-height: 1.5; }
.frame ul.pulse .src { font-size: var(--t-label); margin-left: 6px; color: var(--ink-3); }

.frame .page .decision { margin: var(--s3) 0; max-width: 820px; animation: none; border: 0; border-radius: var(--r-lg); padding: var(--s4) var(--s5); background: var(--bg); box-shadow: 0 0 0 1px var(--stroke-float), var(--shadow-float); }
.frame .page .decision > p { margin: var(--s2) 0; }
.frame .page .decision .by { font-size: var(--t-meta); color: var(--ink-3); }
.frame .page .decision dl { font-size: var(--t-meta); grid-template-columns: 140px 1fr; gap: 4px 12px; padding: var(--s2) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.frame .choices { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 10px 0 var(--s2); }
.frame .choices form { margin: 0; display: inline-flex; gap: 6px; align-items: center; }
.frame .page .decision details { margin-top: var(--s2); font-size: var(--t-meta); }
.frame form.change { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: end; padding: var(--s2) 0; }
.frame form.change label { display: inline-flex; flex-direction: column; gap: 3px; font-size: var(--t-label); color: var(--ink-3); margin: 0; }
.frame form.change label:has(input[type="checkbox"]) { flex-direction: row; align-items: center; color: var(--ink-2); font-size: var(--t-meta); }
.frame ul:has(> li.decision-done) { list-style: none; padding: 0; }
.frame li.decision-done { padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.frame form.inline { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; }
.frame .decision.is-armed .choices > form:first-child { flex: 1 1 100%; }
.frame .decision.is-armed .choices > form:first-child .confirm { flex: 1; margin-top: 0; }
.frame .decision.is-flat { box-shadow: none; padding: 0; }

.frame .page form.card { padding: var(--s3) var(--s4); margin: var(--s2) 0; max-width: 820px; border: 1px solid var(--line); border-radius: var(--r-lg); }
.frame .page form.card p { margin: 0 0 var(--s2); }
.frame .page textarea { width: 100%; max-width: 100%; }
.frame .page button[style] { background: var(--fill); color: var(--ink); height: 28px; font-size: var(--t-meta); }
.frame .page button[style]:hover { background: var(--hover); color: var(--ink); }
.frame .page .tile { display: block; padding: var(--s4) 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; }
.frame .page .tile:hover { background: none; }
.frame .page .tile .t { font-size: var(--t-meta); color: var(--ink-2); }
.frame .page .tile .v { font-size: var(--t-big); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; }
.frame .page .tile .x { margin-top: 3px; font-size: var(--t-meta); color: var(--ink-3); }
.frame .page dl dd { line-height: 1.5; }
.frame .page label[style*="block"] { padding: 3px 0; }

body > main .heard { font-size: var(--t-title); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: var(--s3) var(--s4); }
body > main .check { padding-left: var(--s5); }
body > main .check li { font-size: var(--t-chat); margin: 6px 0; }

/* sign in: Crew's two halves, in Still tokens */
body:has(> .signin-split) { background: var(--rail); }
.signin-split { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 8px; }
.signin-side { display: grid; place-items: center; background: var(--bg); border-radius: var(--r-lg); box-shadow: 0 0 0 1px var(--line); padding: var(--s6) var(--s5); }
.signin-split .signin { box-shadow: none; padding: 0; max-width: 340px; background: transparent; }
.signin .signin-brand { margin-bottom: var(--s7); }
.signin .signin-brand .mark { width: 28px; height: 28px; }
.signin h1 { font-size: 30px; letter-spacing: -.03em; }
.signin .lead { font-size: 14px; color: var(--ink-2); }
.signin button .kbd { background: color-mix(in srgb, var(--on-ink) 18%, transparent); color: inherit; }
.signin .foot { border: 0; justify-content: center; padding: 0; margin-top: var(--s4); }
.signin-art { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s6); border-radius: var(--r-lg); background: var(--pane); box-shadow: 0 0 0 1px var(--line); padding: var(--s6); }
.signin-art .orbit { width: min(400px, 90%); height: auto; overflow: visible; }
.orbit .ring { fill: none; stroke: var(--line-2); stroke-width: 1; }
.orbit .ring.faint { stroke-dasharray: 2 4; }
.orbit .node { fill: var(--bg); stroke: var(--line-2); }
.orbit .node.p { fill: var(--bg); }
.orbit .ico { color: var(--ink); }
.orbit .ini { font: 600 12px var(--sans); fill: var(--ink-2); }
.orbit .lbl { font: 500 12px var(--sans); fill: var(--ink-2); }
.signin-art p { margin: 0; text-align: center; font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.signin-art p span { display: block; color: var(--ink-3); }
@media (max-width: 900px) { .signin-split { grid-template-columns: 1fr; } .signin-art { display: none; } }

/* in a chat the verification line is quiet: the checked mark in the head says the same */
.thread-scroll .banner { justify-content: center; background: none; padding: 0; margin: 0 0 var(--s4); color: var(--ink-3); font-size: var(--t-label); }
.thread-scroll .banner::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--good); flex: none; }
.thread-scroll .banner.bad { display: block; text-align: left; background: var(--signal-soft); color: var(--signal-ink); padding: 10px 14px; font-size: var(--t-meta); }
.thread-scroll .banner.bad::before { display: none; }
.hello .now .sp { width: 100px; }
/* rows in a chat answer, drawn as a table (Nov 20) */
.frame .msg .body .rows-wrap { overflow-x: auto; margin: 10px 0; max-width: min(100%, 92ch); white-space: normal; }
.frame .msg .body .rows-table { border-collapse: collapse; font-size: var(--t-ui); line-height: 1.4; }
.frame .msg .body .rows-table th, .frame .msg .body .rows-table td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.frame .msg .body .rows-table th { font-weight: 600; color: var(--ink-2, var(--ink)); }
.frame .msg .body .rows-table tbody tr:nth-child(even) td { background: var(--well, transparent); }
.frame .msg .body .rows-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.p4-card .plain-meaning, .decision .plain-meaning { font-size: var(--t-chat, 15px); line-height: 1.55; color: var(--ink); margin: 6px 0 4px; max-width: 70ch; }
.frame .msg .body:has(.rows-wrap) { max-width: none; }
.frame .msg .body .rows-wrap { max-width: 100%; }
.frame .msg .body .rows-table { width: 100%; }
.frame .msg .body .rows-table td:first-child, .frame .msg .body .rows-table td:nth-child(2) { white-space: nowrap; }
.ask.is-sending .composer-box { opacity: .6; }
/* charts in a chat answer (Nov 20, Sam: "make the graphs colourful") */
:root { --cc-0: #3B6FE0; --cc-1: #12A594; --cc-2: #8B5CF6; --cc-3: #E8930C; --cc-4: #E0457B; --cc-5: #2FA84F; --cc-6: #0EA5E9; --cc-7: #C2410C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --cc-0: #6B95F2; --cc-1: #2CC8B4; --cc-2: #A78BFA; --cc-3: #F5AE3D; --cc-4: #F0739F; --cc-5: #4ACB6C; --cc-6: #38BDF8; --cc-7: #F0763A; } }
:root[data-theme="dark"] { --cc-0: #6B95F2; --cc-1: #2CC8B4; --cc-2: #A78BFA; --cc-3: #F5AE3D; --cc-4: #F0739F; --cc-5: #4ACB6C; --cc-6: #38BDF8; --cc-7: #F0763A; }
.frame .msg .body .chat-chart { white-space: normal; display: grid; gap: 10px; margin: 12px 0; padding: 16px 18px; background: var(--well); border-radius: var(--r-xl, 14px); max-width: 640px; }
.frame .msg .body .cc-row { display: grid; grid-template-columns: minmax(80px, max-content) 1fr auto; align-items: center; gap: 12px; font-size: var(--t-ui); }
.frame .msg .body .cc-label { color: var(--ink); }
.frame .msg .body .cc-track { height: 14px; border-radius: 7px; background: color-mix(in srgb, var(--ink) 6%, transparent); overflow: hidden; }
.frame .msg .body .cc-bar { display: block; height: 100%; border-radius: 7px; }
.frame .msg .body .cc-value { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); white-space: nowrap; }
.frame .msg .body .cc-0 { background: var(--cc-0); } .frame .msg .body .cc-1 { background: var(--cc-1); } .frame .msg .body .cc-2 { background: var(--cc-2); } .frame .msg .body .cc-3 { background: var(--cc-3); }
.frame .msg .body .cc-4 { background: var(--cc-4); } .frame .msg .body .cc-5 { background: var(--cc-5); } .frame .msg .body .cc-6 { background: var(--cc-6); } .frame .msg .body .cc-7 { background: var(--cc-7); }
.frame .msg .body .chat-pre { white-space: pre; overflow-x: auto; background: var(--well); padding: 12px 14px; border-radius: var(--r-md); font: 13px/1.5 ui-monospace, monospace; }
/* the rail in colour (Nov 20, Sam: "it needs to look more inviting"): each place its own emblem colour */
.rail .nav-item svg, .rail .rail-link svg { transition: color var(--t-fast) var(--ease); }
.rail .tone-pulse svg { color: var(--cc-3); }
.rail .tone-projections svg { color: var(--cc-0); }
.rail .tone-cards svg { color: var(--cc-4); }
.rail .tone-subscriptions svg { color: var(--cc-2); }
.rail .tone-promises svg { color: var(--cc-1); }
.rail .tone-course svg { color: var(--cc-7); }
.rail .tone-cra svg { color: var(--cc-5); }
.rail .tone-review svg { color: var(--cc-6); }
.rail .search svg { color: var(--ink-2); }
/* each agent its own colour, wherever its glyph shows */
.glyph.glyph-books { background: var(--cc-5); color: #fff; }
.glyph.glyph-revenue { background: var(--cc-3); color: #fff; }
.glyph.glyph-work { background: var(--cc-0); color: #fff; }
/* the side panel, quieter (Nov 20): one line for the check, jobs folded away */
.checked-line { display: flex; align-items: center; gap: 8px; font-size: var(--t-ui); color: var(--ink); }
.checked-line::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cc-5); flex: none; }
.checked-line.off::before { background: var(--signal); }
/* Settings (Nov 20): a line each for where things stand */
.rail .tone-settings svg { color: var(--ink-2); }
.settings-page { max-width: 760px; margin: 0 auto; padding: var(--s6, 32px) var(--s5, 24px); }
.settings-page h1 { margin: 0 0 var(--s5, 24px); }
.settings-page h2 { font-size: var(--t-ui); text-transform: none; color: var(--ink-2); font-weight: 600; margin: var(--s6, 32px) 0 var(--s2, 8px); }
.settings-page .st-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.settings-page .st-row { display: grid; grid-template-columns: 14px minmax(140px, 220px) 1fr; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.settings-page .st-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cc-5); }
.settings-page .st-warn .st-dot { background: var(--signal); }
.settings-page .st-off .st-dot { background: var(--line); }
.settings-page .st-what { color: var(--ink); font-weight: 500; }
.settings-page .st-state { color: var(--ink-2); }
.settings-page .st-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.settings-page .st-links a { display: block; padding: 14px 16px; border-radius: var(--r-xl, 14px); background: var(--well); color: var(--ink); text-decoration: none; }
.settings-page .st-links a:hover { background: var(--hover); }
.settings-page .st-links b { display: block; margin-bottom: 4px; }
.settings-page .st-links span { color: var(--ink-2); font-size: var(--t-ui); }
@media (max-width: 640px) { .settings-page .st-row { grid-template-columns: 14px 1fr; } .settings-page .st-state { grid-column: 2; } }
.glyph.glyph-mind { background: var(--cc-2); color: #fff; }

/* Still look, part 2: this part's own screens. Add rules here, not in app.css, so the parts merge cleanly. */

/* ================================================================ the Pulse as a dashboard */
.board { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--s6); row-gap: var(--s5); margin-top: var(--s2); }
.board .span-4 { grid-column: span 4; } .board .span-8 { grid-column: span 8; } .board .span-12 { grid-column: span 12; }
.board-off { padding: var(--s4); border-radius: var(--r-md); background: var(--signal-soft); color: var(--signal-ink); font-weight: 600; }

/* four figures across, split by hairlines, no boxes */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border-bottom: 1px solid var(--line); padding-bottom: var(--s5); }
.kpi { display: flex; flex-direction: column; min-width: 0; padding: var(--s2) var(--s5) 0; border-left: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.kpi:first-child { border-left: 0; padding-left: 0; }
.frame a.kpi:hover { color: var(--ink); }
.kpi .lab { display: flex; justify-content: space-between; font-size: var(--t-ui); font-weight: 500; color: var(--ink); }
.kpi .lab::after { content: "›"; color: var(--ink-4); transition: transform var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.kpi:hover .lab::after { color: var(--ink); transform: translateX(2px); }
.kpi .val { margin-top: 6px; font-size: var(--t-big); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi.is-hero .val { font-size: 42px; letter-spacing: -.035em; }
.kpi .viz { margin-top: auto; padding-top: var(--s3); }
.kpi .viz .spark { height: 40px; }
.kpi .viz .mbars { width: 100%; height: 40px; display: block; }
.kpi .foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px var(--s2); margin-top: 6px; font-size: var(--t-label); color: var(--ink-3); white-space: nowrap; }
.kpi .foot b.off, .board .off { color: var(--signal-ink); font-weight: 600; }

/* the range bar: the usual span, and a marker for now */
.board .range { position: relative; height: 6px; border-radius: var(--r-full); background: var(--fill); margin: var(--s3) 0 0; }
.board .range i { position: absolute; top: 0; bottom: 0; border-radius: var(--r-full); background: var(--band); box-shadow: inset 0 0 0 1px var(--line-2); }
.board .range b { position: absolute; top: -4px; width: 3px; height: 14px; margin-left: -1.5px; border-radius: 2px; background: var(--c, var(--ink)); box-shadow: 0 0 0 2px var(--bg); }
.board .range.is-off b { background: var(--signal); }

/* a section of the board: a title line and its chart, no box */
.card-x { min-width: 0; }
.card-x .card-h { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px var(--s3); margin-bottom: var(--s2); }
.card-x h3 { white-space: nowrap; }
.card-x h3 { margin: 0; font-size: var(--t-ui); font-weight: 600; }
.card-x h3 small { margin-left: 6px; font-weight: 400; color: var(--ink-3); font-size: var(--t-meta); }
.card-x .card-h a { font-size: var(--t-meta); color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.card-x .card-h a:hover { color: var(--ink); }
.card-x .card-h a.fig { font-weight: 600; color: var(--ink); text-decoration: underline dotted var(--ink-4); text-underline-offset: 4px; }
.card-x .warn { display: inline-block; margin-top: 4px; font-size: var(--t-meta); color: var(--signal-ink); font-weight: 600; }
.legend { display: flex; align-items: center; gap: var(--s3); font-size: var(--t-meta); color: var(--ink-3); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .k { display: inline-block; width: 14px; height: 0; border-top: 2px solid var(--c, var(--ink)); }
.legend .k.dash { border-top-style: dashed; }
.legend .k.band { height: 8px; border: 0; background: var(--band); box-shadow: inset 0 0 0 1px var(--line-2); border-radius: 2px; }
.legend .k.floor { border-top: 2px dashed var(--signal); }

/* cash behind and ahead */
.cashahead { width: 100%; height: auto; display: block; overflow: visible; }
.cashahead text { font-family: var(--sans); font-size: 12px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.cashahead .grid { stroke: var(--line); stroke-dasharray: 2 3; }
.cashahead .usual { fill: var(--band); }
.cashahead .area { fill: var(--c); fill-opacity: var(--area-a); }
.cashahead .line { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cashahead .ahead { fill: none; stroke: var(--c); stroke-width: 2; stroke-dasharray: 4 4; stroke-linecap: round; opacity: .85; }
.cashahead .pband { fill: var(--c); fill-opacity: calc(var(--area-a) * .8); }
.cashahead .floor { stroke: var(--signal); stroke-width: 1.5; stroke-dasharray: 5 4; }
.cashahead .floor-l { fill: var(--signal-ink); font-weight: 600; }
.cashahead .today { stroke: var(--line-2); stroke-dasharray: 2 3; }
.cashahead .today-l { fill: var(--ink); font-weight: 600; }
.cashahead .end { fill: var(--c); stroke: var(--bg); stroke-width: 2; }
.cashahead .end-l { fill: var(--ink); font-weight: 600; }
.cashahead .cross { fill: var(--signal); stroke: var(--bg); stroke-width: 2; }

/* bars by month: the month that matters in colour */
.mbars, .num-fig svg.chart { width: 100%; height: auto; display: block; overflow: visible; }
.mbars text, .num-fig svg.chart text { font-family: var(--sans); font-size: 12px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.mbars text.val, .num-fig svg.chart text.val { fill: var(--ink-2); font-weight: 500; }
.mbars text.on, .num-fig svg.chart text.on { fill: var(--ink); font-weight: 600; }
.mbars .base, .num-fig svg.chart .base { stroke: var(--line-2); }
.mbars .bar, .num-fig svg.chart .bar { fill: var(--c, var(--ink)); fill-opacity: .32; transition: fill-opacity var(--t-fast) var(--ease); }
.mbars .bar.on, .num-fig svg.chart .bar.on { fill-opacity: 1; }
.mbars a:hover .bar, .num-fig svg.chart a:hover .bar { fill-opacity: .7; }

/* split bars, largest first */
.hbars { display: flex; flex-direction: column; }
.hbar { display: grid; grid-template-columns: minmax(70px, 1fr) 2fr auto; align-items: center; gap: var(--s3); padding: 9px 0; border-bottom: 1px solid var(--line); font-size: var(--t-ui); color: var(--ink); text-decoration: none; }
.hbar:last-child { border-bottom: 0; }
.frame a.hbar:hover { color: var(--ink); background: var(--hover); }
.hbar .l { text-transform: capitalize; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { height: 6px; border-radius: var(--r-full); background: var(--fill); overflow: hidden; }
.hbar .track i { display: block; height: 100%; border-radius: var(--r-full); background: var(--c, var(--ink)); }
.hbar .v { font-variant-numeric: tabular-nums; font-weight: 500; text-align: right; }

/* small figures (Work) and short lists */
.minis { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
.mini { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.mini .lab { font-size: var(--t-meta); color: var(--ink-2); }
.mini .v { font-size: var(--t-fig); font-weight: 500; letter-spacing: -.02em; }
.mini .foot { display: flex; justify-content: space-between; margin-top: 6px; font-size: var(--t-label); color: var(--ink-3); }
.board ul.list { list-style: none; margin: var(--s3) 0 0; padding: 0; }
.board ul.list li { border-top: 1px solid var(--line); font-size: var(--t-ui); }
.board ul.list li > span, .board ul.list li > a { display: flex; justify-content: space-between; gap: var(--s3); padding: 9px 0; color: var(--ink); text-decoration: none; }
.board ul.list li .off { white-space: nowrap; font-size: var(--t-meta); }
.board ul.list.since li > span { justify-content: flex-start; padding-left: 16px; position: relative; color: var(--ink-2); }
.board ul.list.since li > span::before { content: ""; position: absolute; left: 0; top: 15px; width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.board ul.list.since li.needs-you > span { color: var(--ink); }
.board ul.list.since li.needs-you > span::before { background: var(--signal); box-shadow: none; }

/* the runs strip */
.strip { display: flex; align-items: center; gap: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); font-size: var(--t-ui); color: var(--ink-3); }
.strip a { color: var(--ink-3); text-decoration: none; white-space: nowrap; }
.strip a b { color: var(--ink); font-weight: 600; text-decoration: underline dotted var(--ink-4); text-underline-offset: 3px; }
.strip .bad { color: var(--bad); }
.strip .ticks { display: flex; gap: 2px; flex: 1; min-width: 0; overflow: hidden; }
.strip .ticks i { width: 3px; height: 14px; border-radius: 1px; background: var(--line-2); flex: none; }
.strip .ticks i.asked { background: var(--signal); }
.strip .ticks i.failed { background: var(--bad); }
.strip .agents { display: flex; gap: var(--s4); white-space: nowrap; }
.strip .who { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 500; }
.strip .who small { color: var(--ink-3); font-weight: 400; }

/* below the board: the words, the brief, the usual numbers, in two columns */
.board-more { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--s7); margin-top: var(--s4); }
@media (max-width: 1180px) { .board { column-gap: var(--s5); } .board .span-8, .board .span-4 { grid-column: span 12; } .board-more { grid-template-columns: minmax(0, 1fr); } }

/* ================================================================ a number's page (Helm's, in Still) */
.num-top { display: flex; align-items: flex-start; gap: var(--s6); margin-top: var(--s2); }
.num-top > div:first-child { flex: 1; min-width: 0; }
.frame .page .num-top h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.num-top h1 .pill { margin-left: 8px; vertical-align: 3px; }
.pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--r-full); background: var(--fill); color: var(--ink-2); font-size: var(--t-label); font-weight: 500; letter-spacing: 0; }
.pill.off { background: var(--signal-soft); color: var(--signal-ink); }
.num-hero { margin-top: 6px; font-size: 52px; font-weight: 500; letter-spacing: -.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.num-hero .unver { font-size: 22px; letter-spacing: 0; }
.num-under { margin-top: 6px; font-size: var(--t-meta); color: var(--ink-3); }
.num-under .tie { display: inline-flex; align-items: center; gap: 6px; }
.num-under .tie::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--good); }
.num-under .tie.off::before { background: var(--signal); }
.num-side { display: flex; gap: var(--s5); padding-top: var(--s5); flex: 0 1 auto; max-width: 46%; }
.num-side .stat { min-width: 0; padding-left: var(--s5); border-left: 1px solid var(--line); }
.num-side .stat:first-child { border-left: 0; padding-left: 0; }
.num-side .l { font-size: var(--t-meta); color: var(--ink-2); }
.num-side .v { margin-top: 2px; font-size: 19px; font-weight: 500; letter-spacing: -.02em; line-height: 1.3; font-variant-numeric: tabular-nums; }
.num-side .v .hi { color: var(--signal-ink); }
.num-side .v .delta { font-size: 15px; letter-spacing: 0; }
.num-side .n { font-size: var(--t-label); color: var(--ink-3); }
.num-side .off { color: var(--signal-ink); }
.frame .page .num-top + .means { margin: var(--s4) 0 0; padding-bottom: var(--s5); border-bottom: 1px solid var(--line); }
.num-fig { margin-top: var(--s5); }
.fig-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--s2); }
.fig-h h3 { margin: 0; font-size: var(--t-meta); font-weight: 600; color: var(--ink-2); }
.fig-h span { font-size: var(--t-label); color: var(--ink-3); }
.frame .page h2 + table td:first-child, .frame .page h2 + table td:nth-child(2) { white-space: nowrap; }
.num-fig .fig-note { color: var(--ink-3); font-size: var(--t-meta); }
.frame .num-fig svg.chart { max-width: none; margin: 0; }
.delta { font-size: var(--t-meta); color: var(--ink-3); }
.delta.is-good { color: var(--good); }
.delta.is-bad { color: var(--signal-ink); }

/* the trend line, in the figure's colour, with its usual range as a band */
.trend { width: 100%; height: auto; display: block; overflow: visible; }
.trend text { font-family: var(--sans); font-size: 12px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.trend .grid { stroke: var(--line); stroke-dasharray: 2 3; }
.trend .usual { fill: var(--band); }
.trend .area { fill: var(--c, var(--ink)); fill-opacity: var(--area-a); }
.trend .line { fill: none; stroke: var(--c, var(--ink)); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend .dot { fill: var(--c, var(--ink)); stroke: var(--bg); stroke-width: 2; }
.trend .floor { stroke: var(--signal); stroke-dasharray: 5 4; }
.trend .floor-label { fill: var(--signal-ink); }

/* the pane: details, then the ask box at its foot */
.facts { display: grid; grid-template-columns: auto 1fr; column-gap: var(--s4); row-gap: 8px; margin: 0 0 var(--s2); font-size: var(--t-ui); }
.frame .pane dl.facts { grid-template-columns: auto 1fr; margin: 0 0 var(--s2); }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; text-align: right; }
.pane .prov { white-space: normal; }
.pane-ask { flex: none; padding: var(--s3) var(--s5) var(--s4); border-top: 1px solid var(--line); background: var(--pane); }
.ask-here { display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 14px; border: 1px solid var(--line-2); border-radius: var(--r-xl); background: var(--bg); }
.ask-here:focus-within { border-color: var(--ink-3); }
.frame .ask-here input[name="q"] { flex: 1; min-width: 0; border: 0; padding: 6px 0; background: transparent; font-size: 14px; }
.frame .ask-here input[name="q"]:focus { outline: none; }
.frame .ask-here .send { width: 30px; height: 30px; padding: 0; border-radius: 50%; flex: none; }
.pane-ask .pane-note { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.answers .msg { margin-bottom: var(--s4); }
.frame .answers .msg .body { font-size: var(--t-ui); line-height: 1.55; }
.frame .answers .msg.me .body { font-size: var(--t-ui); padding: 7px 12px; }
.answers .prov { display: none; }
.answers .go-chat { font-size: var(--t-meta); color: var(--ink-2); text-decoration: none; }
.answers .go-chat:hover { color: var(--ink); }
@media (max-width: 1180px) { .num-top { flex-direction: column; gap: var(--s3); } .num-side { padding-top: 0; } }
.frame .answers .msg .chips a { height: auto; min-height: 26px; padding: 4px 10px; white-space: normal; border-radius: 12px; line-height: 1.4; }
.frame .page h2 + table td { overflow-wrap: anywhere; }
.frame .page h2 + table td:first-child, .frame .page h2 + table td:nth-child(2) { overflow-wrap: normal; }

/* Still look, part 3: this part's own screens. Add rules here, not in app.css, so the parts merge cleanly. */
/* 07 a record with every client beside it, 08 an entry, 09 Projections with what-if sliders. Every class starts with p3-. */

/* ---------------------------------------------------------------- shared */
.head .p3-head-av { width: 30px; height: 30px; flex: none; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg); display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--ink-2); letter-spacing: .02em; }
.head .p3-crumbs { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.25; }
.head .p3-crumbs b { font-size: 14px; }
.head .p3-crumbs .sub { font-size: var(--t-meta); }
.frame .p3-sec { margin-top: var(--s6); }
.frame .page .p3-sec h2 { margin-top: 0; }
.frame .page .p3-sec h2 small { margin-left: auto; }
.p3-note { font-size: var(--t-meta) !important; color: var(--ink-3); margin: 0 0 var(--s3) !important; }
.p3-kchip { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: var(--r-sm); background: var(--fill); font-size: var(--t-meta); font-weight: 500; color: var(--ink); white-space: nowrap; }
.p3-kchip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.p3-av { width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--fill); color: var(--ink-2); display: inline-grid; place-items: center; font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.p3-av.sm { width: 28px; height: 28px; border-radius: 50%; font-size: 12px; }
.p3-av.lg { width: 56px; height: 56px; border-radius: 14px; background: var(--ink); color: var(--on-ink); font-size: 18px; font-weight: 600; }
.p3-ok, .p3-bad { display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-meta); font-weight: 500; color: var(--good); }
.p3-bad { color: var(--bad); }
.p3-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg); color: var(--ink) !important; font-size: var(--t-ui); font-weight: 500; text-decoration: none !important; white-space: nowrap; transition: background var(--t-fast) var(--ease); }
.p3-btn:hover { background: var(--hover); }
.p3-dl { display: grid; grid-template-columns: minmax(120px, 180px) 1fr; gap: 0; margin: 0; font-size: var(--t-ui); }
.p3-dl dt { color: var(--ink-3); padding: 7px 0; border-bottom: 1px solid var(--line); margin: 0; font-weight: 400; }
.p3-dl dd { padding: 7px 0; border-bottom: 1px solid var(--line); margin: 0; min-width: 0; overflow-wrap: anywhere; }
.p3-fold { margin-top: var(--s3); }
.p3-fold > summary { font-size: var(--t-ui); font-weight: 500; color: var(--ink-2); }
.p3-fold[open] > summary { margin-bottom: var(--s3); color: var(--ink); }
.p3-inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: var(--t-ui); }
.p3-set { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--t-ui); }
.frame .p3-pane .pane-sec .sec-h span { font-weight: 500; color: var(--ink-3); }

/* the ask box: one line, rounded, black send (the chat's message box, small) */
.p3-asks { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--s6) 0 var(--s2); }
.p3-chip-form { margin: 0; }
.frame button.p3-chip { height: 28px; padding: 0 10px; border-radius: var(--r-full); border: 1px solid var(--line-2); background: var(--bg); color: var(--ink-2); font-weight: 400; font-size: var(--t-meta); }
.frame button.p3-chip:hover { background: var(--hover); color: var(--ink); }
.p3-ask { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--bg); box-shadow: var(--shadow-xs); }
.p3-ask:focus-within { border-color: var(--ink-3); }
.p3-ask-glyph { width: 28px; height: 28px; flex: none; border-radius: 8px; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--ink-2); }
.frame .p3-ask textarea { flex: 1; min-width: 0; border: 0 !important; padding: 4px 0 !important; resize: none; background: transparent !important; font-size: 14px !important; line-height: 1.45; height: 28px; }
.p3-ask-only { display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-meta); color: var(--ink-3); white-space: nowrap; }
.frame button.p3-send { width: 30px; height: 30px; padding: 0; border-radius: 50%; flex: none; }
.p3-pane .p3-ask { padding: 6px 6px 6px 8px; flex-wrap: wrap; border-radius: 14px; }
.p3-pane .p3-ask .p3-ask-only { display: none; }
.p3-pane .p3-chip-form { margin-bottom: var(--s2); }
.p3-pane .p3-ask-glyph { width: 24px; height: 24px; }

/* ---------------------------------------------------------------- 07 a record, the list beside it */
.p3-split { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: var(--s7); align-items: start; }
.frame .page:has(.p3-split) { padding-left: var(--s4); }
.p3-list { position: sticky; top: 0; max-height: calc(100vh - var(--head-h) - 24px); display: flex; flex-direction: column; min-height: 0; padding: var(--s1) 0 var(--s3); }
.p3-list-h { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px var(--s3); }
.p3-list-h b { font-size: var(--t-title); font-weight: 600; letter-spacing: -.01em; }
.p3-seg { display: flex; gap: 2px; padding: 3px; margin: 0 4px var(--s3); border-radius: var(--r-md); background: var(--fill); }
.p3-seg-i { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 26px; border-radius: 6px; font-size: var(--t-meta); font-weight: 500; color: var(--ink-2) !important; text-decoration: none !important; white-space: nowrap; }
.p3-seg-i span { color: var(--ink-3); font-weight: 400; }
.p3-seg-i:hover { color: var(--ink) !important; }
.p3-seg-i[aria-current="true"] { background: var(--bg); color: var(--ink) !important; box-shadow: var(--shadow-xs); }
.p3-find { display: flex; align-items: center; gap: 8px; margin: 0 4px var(--s2); padding: 0 10px; height: 32px; border-radius: var(--r-md); border: 1px solid var(--line); color: var(--ink-3); }
.p3-find:focus-within { border-color: var(--ink-3); }
.frame .p3-find input { flex: 1; min-width: 0; border: 0 !important; padding: 0 !important; background: transparent !important; height: 30px; font-size: var(--t-ui); }
.p3-rows { overflow: auto; min-height: 0; flex: 1; padding: 0 2px; }
.p3-group { font-size: var(--t-label); font-weight: 600; color: var(--ink-3); padding: var(--s3) 8px 4px; letter-spacing: .01em; }
.p3-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; color: var(--ink) !important; text-decoration: none !important; transition: background var(--t-fast) var(--ease); }
.p3-row:hover { background: var(--hover); }
.p3-row.is-on { background: var(--bg); box-shadow: 0 0 0 1px var(--line-2), var(--shadow-xs); }
.p3-row.is-on .p3-av { background: var(--ink); color: var(--on-ink); }
.p3-row[hidden] { display: none; }
.p3-row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.p3-row-t b { font-size: var(--t-ui); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p3-row-t span { font-size: var(--t-meta); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p3-row-e { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.p3-row-e .when { font-size: var(--t-meta); color: var(--ink-3); }
.p3-pip { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
.p3-none { font-size: var(--t-meta); color: var(--ink-3); padding: 8px; }

.p3-split-main { min-width: 0; padding-top: var(--s2); container-type: inline-size; }
.p3-rec { max-width: 760px; }
.p3-rec-top { display: flex; align-items: center; gap: var(--s4); }
.frame .page .p3-rec-top h1 { margin: 0 0 6px; font-size: 26px; }
.p3-rec-name { min-width: 0; }
.p3-rec-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: var(--t-ui); color: var(--ink-3); }
.p3-gone { margin: var(--s3) 0 0 !important; font-size: var(--t-ui); color: var(--bad); }

.p3-figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); margin-top: var(--s5); }
.p3-fig { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: var(--r-xl); border: 1px solid var(--line-2); background: var(--bg); color: var(--ink) !important; text-decoration: none !important; min-width: 0; transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.p3-fig.is-link:hover { border-color: var(--ink-4); box-shadow: var(--shadow-xs), 0 4px 14px -6px rgba(0, 0, 0, .12); }
.p3-fig .lab { display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-meta); color: var(--ink-2); }
.p3-fig .lab svg { color: var(--ink-4); transition: transform var(--t-fast) var(--ease); }
.p3-fig.is-link:hover .lab svg { transform: translateX(2px); color: var(--ink-2); }
.p3-fig .val { font-size: 26px; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p3-fig .val small, .p3-hero small, .p3-entry-amt small { color: var(--ink-3); font-size: .62em; letter-spacing: -.01em; }
.p3-fig .val .none { color: var(--ink-3); font-size: 17px; letter-spacing: 0; }
.p3-fig .val .small { font-size: 15px; letter-spacing: 0; }
.p3-fig .foot { font-size: var(--t-meta); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p3-fig .late { color: var(--signal-ink); font-weight: 500; }
.p3-steps { display: flex; gap: 4px; }
.p3-steps i { flex: 1; height: 4px; border-radius: 2px; background: var(--fill); }
.p3-steps i.on { background: var(--c-in); }

/* the timeline: date, a dot on a thin line, what happened */
.p3-tl { position: relative; }
.p3-ev { position: relative; display: grid; grid-template-columns: 56px 30px minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 9px 8px; border-radius: 10px; color: var(--ink) !important; text-decoration: none !important; }
a.p3-ev:hover { background: var(--well); }
.p3-ev::before { content: ""; position: absolute; left: 88px; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.p3-tl > .p3-ev:first-child::before { top: 20px; }
.p3-tl > .p3-ev:last-child::before { bottom: calc(100% - 20px); }
.p3-ev .d { font-size: var(--t-meta); color: var(--ink-3); padding-top: 6px; font-variant-numeric: tabular-nums; }
.p3-ev .dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--bg); display: grid; place-items: center; color: var(--ink-2); }
.p3-ev.is-hist .dot { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.p3-ev.is-undone .dot { background: var(--fill); color: var(--ink-3); border-color: var(--line-2); }
.p3-ev .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 3px; }
.p3-ev .t b { font-size: var(--t-ui); font-weight: 500; }
.p3-ev .t > span { font-size: var(--t-meta); color: var(--ink-3); }
.p3-ev .t .act { font-family: var(--mono); font-size: 12px; font-weight: 500; }
.p3-ev .t .who { font-weight: 400; color: var(--ink-2); }
.p3-ev .t .ev { line-height: 1.5; overflow-wrap: anywhere; }
.p3-ev .t .undone { color: var(--ink-2); }
.p3-ev.is-undone .t b { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--ink-4); }
.p3-ev .go { color: var(--ink-4); padding-top: 6px; }
.p3-undo > summary { display: inline-flex; align-items: center; gap: 4px; font-size: var(--t-meta); color: var(--ink-3); }
.p3-undo[open] form { display: flex; gap: 6px; margin-top: 6px; }

.p3-prow { display: flex; align-items: center; gap: 10px; padding: 8px 6px; margin: 0 -6px; border-radius: 8px; color: var(--ink) !important; text-decoration: none !important; }
.p3-prow:hover { background: var(--hover); }
.p3-prow .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.p3-prow .t b { font-size: var(--t-ui); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p3-prow .t span { font-size: var(--t-meta); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p3-prow .amt { font-size: var(--t-ui); font-weight: 500; font-variant-numeric: tabular-nums; border-bottom: 1.5px dotted var(--ink-4); }
.p3-prow svg { color: var(--ink-4); flex: none; }
.p3-counted { font-size: var(--t-meta); color: var(--ink-3); margin: 0; line-height: 1.6; }

@container (max-width: 560px) {
  .frame .page .p3-split-main .p3-rec-top h1 { font-size: 22px; }
  .p3-split-main .p3-av.lg { width: 44px; height: 44px; border-radius: 12px; font-size: 15px; }
  .p3-split-main .p3-figs { grid-template-columns: 1fr; gap: 0; border: 1px solid var(--line-2); border-radius: var(--r-xl); overflow: hidden; }
  .p3-split-main .p3-fig { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "lab val" "foot val" "x x"; align-items: center; gap: 2px 12px; border: 0; border-radius: 0; border-top: 1px solid var(--line); padding: 12px 14px; }
  .p3-split-main .p3-fig:first-child { border-top: 0; }
  .p3-split-main .p3-fig .lab { grid-area: lab; }
  .p3-split-main .p3-fig .val { grid-area: val; font-size: 22px; text-align: right; }
  .p3-split-main .p3-fig .foot { grid-area: foot; }
  .p3-split-main .p3-fig .p3-steps { grid-area: x; margin-top: 6px; }
  .p3-split-main .p3-fig.is-link:hover { box-shadow: none; background: var(--well); }
  .p3-split-main .p3-dl { grid-template-columns: 110px minmax(0, 1fr); }
}
@media (max-width: 1180px) { .p3-split { grid-template-columns: 240px minmax(0, 1fr); gap: var(--s5); } }
@media (max-width: 900px) {
  .p3-split { grid-template-columns: 1fr; }
  .p3-list { position: static; max-height: 280px; }
  .p3-figs { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- 08 an entry */
.p3-entry { max-width: 780px; }
.p3-entry-top { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: var(--s6); align-items: start; }
.p3-entry-top:not(:has(.p3-receipt)) { grid-template-columns: minmax(0, 1fr); }
.p3-entry-kicker { display: flex; align-items: center; gap: 10px; font-size: var(--t-meta); color: var(--ink-3); margin: var(--s1) 0 var(--s3); }
.frame .page .p3-entry h1 { font-size: 20px; font-weight: 600; letter-spacing: -.015em; margin: 0; }
.p3-entry-amt { font-size: 52px; font-weight: 500; letter-spacing: -.035em; line-height: 1.1; margin: 4px 0 var(--s4); font-variant-numeric: tabular-nums; }
.p3-entry-amt .none { font-size: 22px; color: var(--ink-3); letter-spacing: 0; }
.p3-tchips { display: flex; flex-wrap: wrap; gap: 8px; }
.p3-tchip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--r-md); border: 1px solid var(--line-2); font-size: var(--t-meta); color: var(--ink-2); }
.p3-tchip svg { color: var(--ink-3); }
.p3-undo-line { display: flex; align-items: center; gap: 8px; margin-top: var(--s4); font-size: var(--t-meta); color: var(--ink-3); }
.p3-undo-line svg { flex: none; }
.p3-undo-line.is-done { color: var(--ink-2); }
.p3-receipt { display: flex; flex-direction: column; gap: 8px; color: var(--ink) !important; text-decoration: none !important; }
.p3-paper { display: block; aspect-ratio: 3 / 4; border-radius: 10px; border: 1px solid var(--line-2); background: var(--well); padding: 10px; overflow: hidden; transition: box-shadow var(--t-fast) var(--ease); }
.p3-receipt:hover .p3-paper { box-shadow: var(--shadow-xs), 0 6px 16px -8px rgba(0, 0, 0, .2); }
.p3-paper img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.p3-paper-lines { display: flex; flex-direction: column; gap: 9px; height: 100%; padding: 10px; border-radius: 4px; background: var(--bg); box-shadow: var(--shadow-xs); }
.p3-paper-lines b { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.p3-paper-lines i { height: 4px; border-radius: 2px; background: var(--fill); }
.p3-paper-lines i.s { width: 55%; }
.p3-paper-lines em { margin-top: auto; font-style: normal; font-size: 12px; font-weight: 600; text-align: right; }
.p3-receipt-foot { display: flex; justify-content: space-between; font-size: var(--t-meta); color: var(--ink-3); }
.p3-receipt-foot span:last-child { display: inline-flex; align-items: center; gap: 3px; color: var(--ink); font-weight: 500; }
.p3-receipt-foot span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 90px; }
.frame table.p3-lines { width: 100%; border: 1px solid var(--line-2); border-radius: var(--r-xl); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.frame .p3-lines th { background: var(--bg); padding: 10px 16px; font-size: var(--t-meta); font-weight: 500; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.frame .p3-lines td { padding: 10px 16px; vertical-align: top; }
.frame .p3-lines td b { display: block; font-weight: 500; }
.frame .p3-lines td small { display: block; font-size: var(--t-meta); color: var(--ink-3); }
.frame .p3-lines td.n { font-variant-numeric: tabular-nums; font-size: 14px; }
.frame .p3-lines tfoot td { border-top: 1px solid var(--line-2); border-bottom: 0; font-weight: 600; }
.frame .p3-lines tfoot td.n b { display: inline; border-bottom: 3px double var(--ink-3); }
.p3-steps-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); list-style: none; margin: 0; padding: 0; position: relative; }
.p3-steps-row li { position: relative; display: flex; flex-direction: column; gap: 2px; font-size: var(--t-meta); color: var(--ink-3); min-width: 0; }
.p3-steps-row li::after { content: ""; position: absolute; left: 36px; right: -6px; top: 14px; height: 1px; background: var(--line-2); }
.p3-steps-row li:last-child::after { display: none; }
.p3-steps-row .dot { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--bg); display: grid; place-items: center; color: var(--ink-2); margin-bottom: 8px; }
.p3-steps-row li.is-ok .dot { background: var(--good-soft); color: var(--good); border-color: transparent; }
.p3-steps-row li.is-quiet .dot { color: var(--ink-4); border-style: dashed; }
.p3-steps-row b { font-size: var(--t-ui); font-weight: 500; color: var(--ink); }
.p3-steps-row span { overflow-wrap: anywhere; }
.p3-evlist { margin: 0; padding-left: 18px; font-size: var(--t-ui); line-height: 1.7; overflow-wrap: anywhere; }
.p3-memo { white-space: pre-wrap; font-size: var(--t-ui); background: var(--well); border-radius: var(--r-xl); padding: var(--s4); }
.p3-count { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; margin-bottom: 8px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--bg); color: var(--ink) !important; text-decoration: none !important; border-left: 3px solid currentColor; }
.p3-count.c-cash { border-left-color: var(--c-cash); } .p3-count.c-in { border-left-color: var(--c-in); } .p3-count.c-out { border-left-color: var(--c-out); } .p3-count.c-owe { border-left-color: var(--c-owe); } .p3-count.c-work { border-left-color: var(--c-work); }
.p3-count:hover { border-color: var(--line-2); }
.p3-count .lab { font-size: var(--t-meta); color: var(--ink-2); }
.p3-count .v { font-size: 20px; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.p3-count .foot { font-size: var(--t-meta); color: var(--ink-3); }
.p3-bank { border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--bg); padding: 10px 12px; font-size: var(--t-ui); }
.p3-bank .r { display: flex; justify-content: space-between; gap: 8px; }
.p3-bank .r b { font-variant-numeric: tabular-nums; }
.p3-bank .r.foot { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: var(--t-meta); color: var(--ink-3); }
@media (max-width: 900px) { .p3-entry-top { grid-template-columns: 1fr; } .p3-receipt { max-width: 150px; } .p3-steps-row { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------------- 09 projections */
.p3-proj { max-width: 860px; }
.p3-hero { display: flex; align-items: flex-end; gap: var(--s5); flex-wrap: wrap; margin: var(--s2) 0 var(--s4); }
.p3-hero .lab { display: block; font-size: var(--t-meta); color: var(--ink-3); margin-bottom: 2px; }
.p3-hero .fig { font-size: 22px; font-weight: 500; letter-spacing: -.02em; color: var(--ink) !important; text-decoration: none !important; border-bottom: 1.5px dotted var(--ink-4); font-variant-numeric: tabular-nums; }
.p3-hero .fig:hover { border-bottom: 1.5px solid var(--signal); }
.p3-hero .arrow { color: var(--ink-4); padding-bottom: 8px; }
.p3-hero .big { font-size: 48px; font-weight: 500; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.p3-hero .side { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: var(--t-ui); color: var(--ink-3); padding-bottom: 4px; }
.p3-hero .side b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.p3-whatif-out .up { color: var(--good); font-weight: 500; }
.p3-whatif-out .down { color: var(--signal-ink); font-weight: 500; }
.p3-chart { position: relative; }
.p3-cash { display: block; width: 100%; height: auto; overflow: visible; font-variant-numeric: tabular-nums; }
.p3-cash text { font-size: 12px; fill: var(--ink-3); font-family: var(--sans); }
.p3-cash .g { stroke: var(--line); stroke-width: 1; }
.p3-cash .g.zero { stroke: var(--line-2); }
.p3-cash .base { stroke: var(--line-2); stroke-width: 1; }
.p3-cash .band { fill: var(--c-cash); fill-opacity: var(--area-a); stroke: none; }
.p3-cash .mid { fill: none; stroke: var(--c-cash); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.p3-cash .start { fill: var(--bg); stroke: var(--c-cash); stroke-width: 2; }
.p3-cash .end { fill: var(--c-cash); stroke: var(--bg); stroke-width: 2; }
.p3-cash .endl { fill: var(--ink); font-weight: 600; font-size: 12px; }
.p3-cash .rl { fill: var(--ink-3); }
.p3-cash .xl.last { fill: var(--ink); font-weight: 600; }
.p3-cash .floor { stroke: var(--signal); stroke-width: 1.25; stroke-dasharray: 5 4; }
.p3-cash .floor-l { fill: var(--signal-ink); font-weight: 500; }
.p3-cash .risk { fill: var(--signal); stroke: var(--bg); stroke-width: 2; }
.p3-cash .band2 { fill: var(--ink); fill-opacity: .045; stroke: none; }
.p3-cash .mid2 { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 6 4; stroke-linejoin: round; }
.p3-cash .mid2.ideas { stroke: var(--c-in); }
.p3-cash .end2 { fill: var(--ink); stroke: var(--bg); stroke-width: 2; }
.p3-cash .end2.ideas { fill: var(--c-in); }
.p3-cash .endl2 { fill: var(--ink-2); font-weight: 600; font-size: 12px; }
.p3-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: var(--t-meta); color: var(--ink-3); margin: var(--s2) 0 0; }
.p3-legend .i { display: inline-block; width: 14px; height: 8px; margin-right: -8px; border-radius: 2px; vertical-align: middle; }
.p3-legend .i.mid { height: 2px; background: var(--c-cash); }
.p3-legend .i.band { background: color-mix(in srgb, var(--c-cash) 18%, transparent); }
.p3-legend .i.floor { height: 0; border-top: 1.5px dashed var(--signal); border-radius: 0; }
.p3-legend .i.whatif { height: 0; border-top: 2px dashed var(--ink); border-radius: 0; }
.p3-legend .i.ideas { height: 0; border-top: 2px dashed var(--c-in); border-radius: 0; }

.p3-whatif { margin-top: var(--s5); padding: var(--s4) var(--s5) var(--s5); border-radius: var(--r-xl); background: var(--well); }
.p3-whatif-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: var(--s4); }
.p3-whatif-h b { font-size: 14px; font-weight: 600; }
.p3-whatif-h span { font-size: var(--t-meta); color: var(--ink-3); flex: 1; min-width: 220px; }
.p3-reset { font-size: var(--t-meta); font-weight: 500; color: var(--ink-2) !important; }
.p3-sliders { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.p3-slider { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.p3-slider .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.p3-slider .k { font-size: var(--t-ui); color: var(--ink-2); }
.p3-slider output { white-space: nowrap; font-size: 17px; font-weight: 500; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.p3-slider .foot { font-size: var(--t-meta); color: var(--ink-3); }
.p3-slider input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 20px; background: transparent; margin: 0; cursor: pointer; }
.p3-slider input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: var(--line-2); }
.p3-slider input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line-2); }
.p3-slider input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--ink); }
.p3-slider input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--ink); box-shadow: var(--shadow-xs); }
.p3-slider input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--ink); }
.p3-slider input[type="range"]:focus-visible { outline: none; }
.p3-slider input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 35%, transparent); }

.p3-achs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s4); }
.p3-ach { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: var(--r-xl); border: 1px solid var(--line-2); min-width: 0; }
.p3-ach .k { font-size: var(--t-meta); color: var(--ink-2); }
.p3-ach .v { font-size: 18px; font-weight: 500; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.p3-ach .v small { font-size: var(--t-meta); color: var(--ink-3); font-weight: 400; margin-left: 4px; letter-spacing: 0; }
.p3-ach .src { font-size: var(--t-meta); color: var(--ink-3); }
.p3-ach.is-guess .src::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; border: 1.5px solid var(--ink-3); vertical-align: 0; }
.p3-ach.is-set { border-color: var(--ink-4); }
.p3-ach.is-set .src { color: var(--ink); }
.p3-parts { font-size: var(--t-ui); padding-left: 18px; line-height: 1.6; }
.frame table.p3-weeks { font-size: var(--t-meta); width: 100%; margin-top: var(--s3); }
.p3-hatch { margin-top: var(--s5); padding: var(--s6); border-radius: var(--r-xl); background: repeating-linear-gradient(135deg, var(--well) 0 8px, var(--bg) 8px 16px); border: 1px solid var(--line-2); }
.p3-hatch p { font-size: var(--t-ui); color: var(--ink-2); margin: var(--s3) 0 0 !important; }

/* the pane: ideas as switches, past forecasts, the course */
.p3-ideas .p3-idea { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.p3-ideas .p3-idea .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.p3-ideas .p3-idea b { font-size: var(--t-ui); font-weight: 500; }
.p3-ideas .p3-idea span span, .p3-ideas .p3-idea .t > span { font-size: var(--t-meta); color: var(--ink-3); }
.p3-ideas em { font-style: normal; font-weight: 600; }
.p3-ideas em.up { color: var(--good); }
.p3-ideas em.down { color: var(--signal-ink); }
.p3-ideas button { margin-top: var(--s3); height: 28px; }
.p3-switch { -webkit-appearance: none; appearance: none; flex: none; width: 30px; height: 18px; border-radius: 9px; background: var(--line-2); position: relative; cursor: pointer; margin: 2px 0 0; transition: background var(--t-fast) var(--ease); }
.p3-switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); box-shadow: var(--shadow-xs); transition: transform var(--t-fast) var(--ease); }
.p3-switch:checked { background: var(--ink); }
.p3-switch:checked::after { transform: translateX(12px); }
.p3-score { display: flex; align-items: baseline; gap: 8px; }
.p3-score b { font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.p3-score span { font-size: var(--t-meta); color: var(--ink-3); }
.p3-pips { display: flex; gap: 4px; margin-top: 8px; }
.p3-pips i { width: 18px; height: 4px; border-radius: 2px; background: var(--good); }
.p3-pips i.out { background: var(--signal); }
.p3-dest { font-size: var(--t-ui); margin: 0 0 var(--s3); }
.p3-meter { height: 6px; border-radius: 3px; background: var(--fill); overflow: hidden; }
.p3-meter i { display: block; height: 100%; background: var(--ink); border-radius: 3px; }
.p3-meter-l { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: var(--t-meta); color: var(--ink-3); }

@media (max-width: 900px) {
  .p3-sliders, .p3-achs { grid-template-columns: 1fr 1fr; }
  .p3-hero .side { margin-left: 0; align-items: flex-start; }
}
@media (max-width: 560px) { .p3-sliders, .p3-achs { grid-template-columns: 1fr; } }

/* Still look, part 4: this part's own screens. Add rules here, not in app.css, so the parts merge cleanly.
   Decisions (/cards), Rules (/course), a team's page (/team/<team>), the owner's review of
   people's chats (/review), the door (/door), voice (/voice), and the chat box a page carries.
   Tokens only (tokens.css); flat, one hairline, one floating shadow for what floats. */

/* ------------------------------------------------------------------ shared */
.p4-page { max-width: var(--read-w); margin: 0 auto; padding-top: var(--s5); }
.frame .page.is-wide .p4-page.p4-team { max-width: 1120px; }
.frame .page .p4-page h1 { font-size: var(--t-big); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; margin: 0 0 var(--s2); }
.p4-lead { font-size: 17px; line-height: 1.5; color: var(--ink-2); max-width: 60ch; margin: 0 0 var(--s4); }
.frame .page .p4-lead { margin-bottom: var(--s4); }
.p4-text { white-space: pre-wrap; line-height: 1.6; }
.p4-note { font-size: var(--t-meta); color: var(--ink-3); margin: var(--s3) 0 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.frame .page .p4-note { margin: var(--s3) 0 0; }
.p4-note code { font-size: 12px; }
.p4-error { padding: 8px 12px; border-radius: var(--r-md); background: var(--bad-soft); color: var(--bad); font-size: var(--t-ui); }
.sec-label { display: flex; align-items: center; gap: var(--s2); margin: var(--s6) 0 var(--s3); font-size: var(--t-label); font-weight: 600; color: var(--ink-3); letter-spacing: .01em; }
.sec-label:first-child { margin-top: var(--s2); }
.sec-label .n { margin-left: auto; font-weight: 500; }
.sec-label .count.is-zero { background: var(--fill); color: var(--ink-3); }
.p4-empty { display: grid; gap: 4px; padding: var(--s5) 0; color: var(--ink-3); font-size: var(--t-ui); }
.p4-empty b { color: var(--ink); font-weight: 600; font-size: 14px; }
.p4-btn { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: var(--r-md); background: var(--ink); color: var(--on-ink) !important; font-size: var(--t-ui); font-weight: 500; text-decoration: none !important; white-space: nowrap; transition: transform var(--t-fast) var(--ease); }
.p4-btn:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.p4-btn:active { transform: scale(.98); }
.p4-tool { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: var(--r-md); background: var(--fill); color: var(--ink) !important; font-size: var(--t-ui); font-weight: 500; text-decoration: none !important; }
.p4-tool:hover { background: var(--hover); }
.p4-tool svg { width: 14px; height: 14px; }

/* a figure tile: label, big figure with a grey tail, a small drawing, two labels below */
.p4-stat { padding: var(--s4) var(--s5) var(--s4) 0; min-width: 0; }
.p4-stat .lab { font-size: var(--t-ui); color: var(--ink-2); }
.p4-stat .fig { font-size: var(--t-big); font-weight: 500; letter-spacing: -.03em; line-height: 1.2; margin: 4px 0 var(--s3); font-variant-numeric: tabular-nums; }
.p4-stat .fig span { font-size: 15px; letter-spacing: 0; color: var(--ink-3); font-weight: 400; margin-left: 8px; }
.p4-stat .foot, .p4-goal .foot { display: flex; justify-content: space-between; gap: var(--s2); margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.p4-stat.is-flat { padding: 0 0 var(--s4); border-bottom: 1px solid var(--line); margin-bottom: var(--s4); }
.legend { justify-content: flex-start !important; gap: var(--s4) !important; }
.legend i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.p4-track { height: 6px; border-radius: var(--r-full); background: var(--fill); overflow: hidden; }
.p4-track i { display: block; height: 100%; border-radius: inherit; background: var(--ink); }
.p4-track i.is-over { background: var(--signal); }
.p4-split { display: flex; gap: 2px; height: 6px; }
.p4-split i { display: block; height: 100%; border-radius: 2px; min-width: 0; }
.p4-split i:first-child { border-top-left-radius: var(--r-full); border-bottom-left-radius: var(--r-full); }
.p4-split i:last-child { border-top-right-radius: var(--r-full); border-bottom-right-radius: var(--r-full); }
.p4-split .a, .legend i.a { background: var(--ink); }
.p4-split .b, .legend i.b { background: color-mix(in srgb, var(--ink) 45%, var(--bg)); }
.p4-split .c, .legend i.c { background: var(--c-mute); }

/* ------------------------------------------------------------------ the chat box on a page */
.page-chat { margin: var(--s7) 0 var(--s4); padding-top: var(--s5); border-top: 1px solid var(--line); }
.page-chat .pc-head { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s3); font-size: var(--t-ui); color: var(--ink-3); flex-wrap: wrap; }
.page-chat .pc-head b { color: var(--ink); font-weight: 600; }
.page-chat .pc-try { margin-bottom: var(--s3); }
.frame .page-chat .try button { height: 32px; font-size: var(--t-ui); padding: 0 12px; }
.frame .page-chat form.ask { max-width: none; }
.page-chat .pc-to { margin: 0 0 var(--s2); }
.page-chat .pc-to label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-meta); color: var(--ink-3); }
.page-chat .pc-to svg { width: 13px; height: 13px; }
.frame .page-chat .pc-to select { height: 28px; padding: 0 8px; font-size: var(--t-meta); border-radius: var(--r-sm); max-width: 340px; }
.page-chat .privacy { display: flex; align-items: center; gap: 6px; margin: var(--s2) 0 0; font-size: var(--t-label); color: var(--ink-3); }
.page-chat.is-off p { display: flex; align-items: center; gap: 6px; font-size: var(--t-ui); color: var(--ink-3); }

/* ------------------------------------------------------------------ decisions */
.p4-stack { display: grid; gap: var(--s3); }
.frame .page .p4-card { margin: 0; padding: var(--s5); max-width: none; }
.frame .page .p4-card:first-child { padding-bottom: var(--s5); }
.frame .page .p4-card:not(:first-child) { box-shadow: none; border-radius: 0; border-top: 1px solid var(--line); padding: var(--s4) 0; background: none; }
.frame .page .p4-card:focus-visible { outline: 2px solid var(--signal); outline-offset: 4px; }
.frame .page .p4-card .by { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; font-size: var(--t-meta); color: var(--ink-3); }
.frame .page .p4-card .by b a { color: var(--ink); font-weight: 600; text-decoration: none; font-size: 13px; }
.frame .page .p4-card .by b a:hover { text-decoration: underline; }
.p4-card .by .looking { color: var(--signal-ink); }
.p4-card .by .of { margin-left: auto; }
.p4-card .by .of.is-long { color: var(--signal); font-weight: 500; }
.p4-card .by .of.is-long::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); margin-right: 6px; vertical-align: 1px; }
.frame .page .p4-card .d-title { margin: var(--s3) 0 4px; font-size: var(--t-title); font-weight: 600; letter-spacing: -.01em; line-height: 1.3; }
.frame .page .p4-card .why { margin: 0 0 var(--s2); color: var(--ink-2); font-size: var(--t-ui); }
.p4-card .needs-line { margin: 0 0 var(--s2); color: var(--signal-ink); font-size: var(--t-ui); font-weight: 500; }
.frame .page .p4-card dl { grid-template-columns: minmax(110px, 30%) 1fr; font-size: var(--t-ui); border: 0; padding: var(--s2) 0; gap: 6px 16px; }
.frame .page .p4-card dl dt { color: var(--ink-2); }
.frame .page .p4-card dl dd { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.frame .page .p4-card .evidence { font-size: var(--t-meta); color: var(--ink-3); padding: var(--s2) 0 0; margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; }
.p4-card .evidence a { color: var(--ink-2); }
.frame .p4-card .choices { margin-top: var(--s4); }
.frame .p4-card .choices input[name="note"] { height: 32px; font-size: var(--t-ui); }
.p4-card .undoable { margin-left: auto; font-size: var(--t-meta); color: var(--ink-3); }
.p4-card:not(:first-child) .choices button:not([data-confirm]):not(.quiet) { background: var(--fill); color: var(--ink); }
.frame .page .p4-card details > summary { color: var(--ink-2); }
.p4-done { list-style: none; padding: 0; margin: 0; }
.frame .p4-done li.decision-done { display: grid; grid-template-columns: 24px 1fr auto; gap: 0 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.p4-done .d-mark { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line-2); position: relative; }
.p4-done .is-ok .d-mark::after { content: ""; position: absolute; left: 7px; top: 5px; width: 6px; height: 9px; border: solid var(--ink-2); border-width: 0 1.5px 1.5px 0; transform: rotate(40deg); }
.p4-done .is-off .d-mark::before, .p4-done .is-off .d-mark::after { content: ""; position: absolute; left: 10px; top: 5px; width: 1.5px; height: 12px; background: var(--ink-3); transform: rotate(45deg); }
.p4-done .is-off .d-mark::after { transform: rotate(-45deg); }
.p4-done .d-what { min-width: 0; font-size: var(--t-ui); }
.p4-done .d-what b { font-weight: 500; }
.p4-done .d-what small { color: var(--ink-3); font-size: var(--t-meta); }
.p4-done .d-line { display: block; color: var(--ink-3); font-size: var(--t-meta); margin-top: 2px; }
.p4-done .d-line a { color: var(--ink-2); }
.p4-done form.inline { display: inline-flex; gap: 6px; align-items: center; }
.frame .p4-done form.inline input { height: 28px; font-size: var(--t-meta); width: 140px; }
.frame .p4-done form.inline button { height: 28px; font-size: var(--t-meta); }
.p4-foot { margin-top: var(--s4); font-size: var(--t-meta); color: var(--ink-3); max-width: 64ch; }

/* ------------------------------------------------------------------ a team's page */
.p4-agent { display: flex; align-items: center; gap: var(--s5); margin-bottom: var(--s6); }
.p4-agent > .glyph { width: 64px; height: 64px; border-radius: 18px; }
.p4-agent > .glyph svg { width: 26px; height: 26px; }
.p4-agent .who { flex: 1; min-width: 0; }
.frame .page .p4-agent h1 { font-size: 40px; letter-spacing: -.035em; margin: 0 0 6px; }
.frame .page .p4-agent p { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; font-size: var(--t-ui); color: var(--ink-2); }
.p4-agent .sep { color: var(--ink-4); }
.presence-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); flex: none; }
.presence-dot.quiet { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.presence-dot.off { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-4); }
.p4-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.p4-stats .p4-stat + .p4-stat { border-left: 1px solid var(--line); padding-left: var(--s5); }
.p4-hours { display: block; width: 100%; height: 32px; }
.p4-hours .hb { fill: var(--c-mute); }
.p4-hours .hb.is-none { fill: var(--fill); }
.p4-hours .hb.is-asked { fill: var(--signal); }
.p4-cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--s7); }
.frame .p4-jobs { width: 100%; font-size: var(--t-ui); }
.frame .p4-jobs th { font-size: var(--t-label); }
.frame .p4-jobs td { padding: 10px 8px; vertical-align: middle; }
.frame .p4-jobs td small { display: block; color: var(--ink-3); font-size: var(--t-meta); margin-top: 2px; }
.p4-jobs td.sw { width: 44px; padding-left: 0; }
.p4-jobs td.sw form { margin: 0; }
.frame button.p4-switch { width: 32px; height: 18px; padding: 0; border-radius: var(--r-full); background: var(--line-2); position: relative; }
.frame button.p4-switch.is-on { background: var(--ink); }
.p4-switch i { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); transition: transform var(--t-fast) var(--ease); }
.p4-switch.is-on i { transform: translateX(14px); }
.p4-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--good); margin-left: 12px; }
.p4-dot.is-paused { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.p4-dot.is-off { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-4); }
.p4-people, .p4-skills { list-style: none; padding: 0; margin: 0; }
.p4-people li { display: flex; align-items: center; gap: var(--s3); padding: 8px 0; border-bottom: 1px solid var(--line); }
.p4-people li .face { width: 32px; height: 32px; }
.p4-people li > span:not(.face) { flex: 1; min-width: 0; display: grid; font-size: var(--t-ui); }
.p4-people li small, .p4-people li em { color: var(--ink-3); font-size: var(--t-meta); font-style: normal; }
.p4-skills li { display: flex; gap: var(--s3); justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--t-ui); }
.p4-skills li small { color: var(--ink-3); font-size: var(--t-meta); }

/* ------------------------------------------------------------------ Rules */
.p4-meta { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; font-size: var(--t-meta); color: var(--ink-3); margin-bottom: var(--s3); }
.p4-meta .pill { padding: 2px 8px; border-radius: var(--r-full); background: var(--fill); color: var(--ink-2); font-weight: 500; }
.p4-meta .p4-sep { color: var(--ink-4); }
.frame .page .p4-rules h1 { font-size: 40px; letter-spacing: -.035em; }
.p4-effect { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: var(--t-ui); color: var(--ink-2); padding-bottom: var(--s5); border-bottom: 1px solid var(--line); }
.p4-effect i { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); flex: none; transform: translateY(-1px); }
.p4-effect.is-ok i { background: var(--good); }
.p4-effect a { color: var(--ink); text-underline-offset: 3px; }
.p4-sec { padding: var(--s2) 0 var(--s5); border-bottom: 1px solid var(--line); }
.frame .page .p4-sec h2 { justify-content: flex-start; border: 0; padding: 0; margin: var(--s5) 0 var(--s3); font-size: var(--t-title); font-weight: 500; letter-spacing: -.01em; }
.p4-goal { margin-top: var(--s4); max-width: 360px; }
.p4-goal .lab { font-size: var(--t-ui); color: var(--ink-2); }
.p4-goal .fig { font-size: var(--t-big); font-weight: 500; letter-spacing: -.03em; margin: 2px 0 var(--s2); font-variant-numeric: tabular-nums; }
.p4-goal .fig span { font-size: 17px; color: var(--ink-3); letter-spacing: 0; margin-left: 6px; font-weight: 400; }
.frame .page .p4-parts { display: grid; grid-template-columns: 180px 1fr; gap: 0; margin: 0; border: 0; }
.frame .page .p4-parts dt { padding: 12px 0; border-top: 1px solid var(--line); font-size: var(--t-meta); font-weight: 500; color: var(--ink-3); }
.frame .page .p4-parts dd { margin: 0; padding: 12px 0; border-top: 1px solid var(--line); font-size: var(--t-chat); line-height: 1.55; }
.frame .page .p4-parts dt:first-of-type, .frame .page .p4-parts dt:first-of-type + dd { border-top: 0; }
.p4-parts .empty { color: var(--ink-3); font-size: var(--t-ui); }
.p4-history { list-style: none; padding: 0; margin: 0; }
.p4-history li { display: flex; gap: var(--s3); padding: 8px 0; border-bottom: 1px solid var(--line); font-size: var(--t-ui); }
.p4-history li span { color: var(--ink-3); }
.p4-write { margin-top: var(--s6); }
.frame .page .p4-write > summary { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: var(--r-md); background: var(--fill); color: var(--ink); font-size: var(--t-ui); font-weight: 500; }
.frame .page .p4-write > summary:hover { background: var(--hover); }
.p4-write[open] > summary { margin-bottom: var(--s4); }
.p4-field { display: grid; gap: 4px; margin: 0 0 var(--s4); }
.p4-field b { font-size: var(--t-ui); font-weight: 600; }
.p4-field small { font-size: var(--t-meta); color: var(--ink-3); }
.frame .p4-field textarea { width: 100%; min-height: 64px; font-size: var(--t-ui); line-height: 1.5; }
.p4-inline { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; font-size: var(--t-ui); color: var(--ink-2); }
.p4-inline label { display: inline-flex; gap: 6px; align-items: center; }
.sec-h.is-needs { color: var(--signal); }
.sec-h.is-needs::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); margin-right: 6px; align-self: center; }
.sec-h.is-needs { justify-content: flex-start; }
.sec-h span { font-weight: 500; }
.p4-reading { max-height: 300px; overflow: auto; white-space: pre-wrap; font-size: var(--t-ui); line-height: 1.6; color: var(--ink); }
.p4-answer { font-size: var(--t-ui); color: var(--ink-2); margin-top: var(--s3); }
.p4-confirm { margin-top: var(--s4); display: grid; gap: var(--s2); }
.frame .p4-confirm textarea { width: 100%; font-size: var(--t-ui); }
.p4-confirm .row { display: flex; gap: var(--s2); flex-wrap: wrap; }
.p4-list { margin: 0; padding: 0 0 0 16px; font-size: var(--t-ui); color: var(--ink-2); line-height: 1.5; }
.p4-list li + li { margin-top: 6px; }
.p4-steps { list-style: none; margin: 0; padding: 0; }
.p4-steps li { position: relative; display: flex; justify-content: space-between; gap: var(--s3); padding: 0 0 14px 22px; font-size: var(--t-ui); }
.p4-steps li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.p4-steps li:not(:last-child)::after { content: ""; position: absolute; left: 5.5px; top: 16px; bottom: 0; width: 1px; background: var(--line-2); }
.p4-steps li.is-now::before { background: var(--signal); }
.p4-steps li.is-later::before { background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.p4-steps li b { font-weight: 500; }
.p4-steps li span { color: var(--ink-3); font-size: var(--t-meta); white-space: nowrap; }

/* ------------------------------------------------------------------ the door */
.p4-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: var(--s5) 0; }
.p4-fact { display: flex; gap: 10px; align-items: flex-start; padding: var(--s4) var(--s3) var(--s4) 0; }
.p4-fact + .p4-fact { border-left: 1px solid var(--line); padding-left: var(--s4); }
.p4-fact svg { flex: none; margin-top: 2px; color: var(--ink-2); }
.p4-fact span { display: grid; font-size: var(--t-ui); }
.p4-fact b { font-weight: 600; }
.p4-fact small { color: var(--ink-3); font-size: var(--t-meta); }
.p4-door .p4-intro { color: var(--ink-2); font-size: var(--t-ui); max-width: 64ch; }
.p4-make { display: flex; align-items: flex-end; gap: var(--s2); margin: var(--s5) 0 0; }
.p4-make label { flex: 1; display: grid; gap: 4px; font-size: var(--t-meta); color: var(--ink-3); }
.frame .p4-make input { width: 100%; height: 34px; }
.frame .p4-make button { height: 34px; }
.p4-make button svg { width: 14px; height: 14px; margin-right: 2px; }
.p4-keys { list-style: none; padding: 0; margin: 0; }
.p4-key { display: grid; grid-template-columns: 32px 1fr 130px 110px; gap: var(--s3); align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.p4-key.is-new { background: var(--hover); border-radius: var(--r-md); box-shadow: inset 2px 0 0 var(--signal); }
.p4-key .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--ink); color: var(--on-ink); }
.p4-key .name, .p4-key .used { display: grid; min-width: 0; font-size: var(--t-ui); }
.p4-key b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p4-key .used b { font-weight: 500; }
.p4-key small { color: var(--ink-3); font-size: var(--t-meta); }
.p4-key .act { text-align: right; }
.p4-key .act form { margin: 0; }
.frame .p4-key .act button { height: 28px; font-size: var(--t-meta); }
.p4-key.is-revoked { opacity: .55; }
.p4-key.is-revoked .ic { background: var(--fill); color: var(--ink-3); }
.p4-newkey { display: grid; margin-bottom: var(--s3); }
.p4-newkey b { font-size: var(--t-title); font-weight: 600; }
.p4-newkey small { color: var(--ink-3); font-size: var(--t-meta); }
.p4-token { display: flex; gap: var(--s2); align-items: center; padding: var(--s3); border-radius: var(--r-lg); background: var(--well); }
.frame .p4-token input { flex: 1; min-width: 0; font-family: var(--mono); font-size: var(--t-meta); background: transparent; border: 0; padding: 0; height: 28px; }
.frame .p4-token button { height: 28px; font-size: var(--t-meta); background: var(--bg); }
.p4-warn { margin-top: var(--s3); font-size: var(--t-meta); color: var(--signal-ink); font-weight: 500; }
.p4-never { list-style: none; padding: 0; margin: 0; font-size: var(--t-ui); }
.p4-never li { padding: 6px 0 6px 22px; position: relative; color: var(--ink-2); }
.p4-never li::before { content: "×"; position: absolute; left: 4px; color: var(--ink-3); }

/* ------------------------------------------------------------------ voice */
.p4-steps-row { display: flex; align-items: center; gap: var(--s3); list-style: none; padding: 0; margin: 0 0 var(--s4); font-size: var(--t-meta); color: var(--ink-3); }
.p4-steps-row li { display: inline-flex; align-items: center; gap: 6px; }
.p4-steps-row li::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-4); }
.p4-steps-row li + li::after { order: -1; content: ""; width: 28px; height: 1px; background: var(--line-2); margin-right: 6px; }
.p4-steps-row li.is-on { color: var(--ink); font-weight: 500; }
.p4-steps-row li.is-on::before, .p4-steps-row li.is-done::before { background: var(--ink); }
.p4-rec { display: flex; align-items: center; gap: var(--s4); margin: var(--s6) 0 var(--s4); position: relative; }
.frame button.p4-mic { width: 88px; height: 88px; border-radius: 50%; padding: 0; font-size: var(--t-ui); font-weight: 600; justify-content: center; padding-top: 30px; }
.p4-mic-ic { position: absolute; left: 33px; top: 22px; color: var(--on-ink); pointer-events: none; }
.frame button.p4-mic.is-rec { background: var(--signal); box-shadow: 0 0 0 8px var(--signal-soft); }
.p4-rec [role="status"] { font-size: var(--t-ui); }
.p4-heard { padding: var(--s5); border-radius: var(--r-lg); background: var(--well); margin: var(--s4) 0; }
.p4-heard .lab { font-size: var(--t-meta); color: var(--ink-3); margin-bottom: 6px; }
.frame .page .p4-heard .heard { margin: 0; font-size: 24px; line-height: 1.4; letter-spacing: -.015em; color: var(--ink); }
.p4-say { color: var(--ink-2); font-size: var(--t-chat); }
.frame .p4-check { list-style: none; padding: 0; margin: var(--s3) 0; display: grid; gap: 0; }
.frame .p4-check li { display: flex; align-items: baseline; gap: var(--s2); padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--t-chat); }
.p4-check li .k { width: 72px; color: var(--ink-3); font-size: var(--t-ui); flex: none; }
.p4-check li b { font-weight: 600; text-decoration: underline dotted var(--ink-4) 1.5px; text-underline-offset: 4px; }
.p4-check li.is-amount b { font-size: var(--t-fig); font-weight: 500; letter-spacing: -.02em; }
.p4-check li small { color: var(--ink-3); font-size: var(--t-meta); }
.p4-ring { width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-3); flex: none; }
.p4-actions { display: flex; gap: var(--s2); margin: var(--s4) 0; }
.p4-actions form { margin: 0; }
.frame .p4-actions button { height: 38px; padding: 0 18px; font-size: 14px; }
.p4-fix { margin-top: var(--s2); }
.frame .page .p4-fix > summary { color: var(--ink-2); font-size: var(--t-ui); display: inline-flex; padding: 4px 8px; margin-left: -8px; border-radius: var(--r-sm); }
.frame .page .p4-fix > summary:hover { background: var(--hover); }
.p4-fix form { display: grid; gap: var(--s2); margin-top: var(--s2); justify-items: start; }

/* ------------------------------------------------------------------ people's chats (the owner's review) */
.p4-person { margin-top: var(--s5); }
.p4-person-h { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-ui); padding-bottom: 6px; }
.p4-person-h b { font-weight: 600; }
.p4-person-h small { color: var(--ink-3); font-size: var(--t-meta); }
.p4-person-h .n { margin-left: auto; color: var(--ink-3); font-size: var(--t-meta); }
.p4-agent-h { display: flex; align-items: center; gap: 8px; margin: var(--s3) 0 4px 36px; font-size: var(--t-label); font-weight: 600; color: var(--ink-3); }
.p4-agent-h .glyph.sm { width: 16px; height: 16px; border-radius: 4px; }
.p4-agent-h .glyph.sm svg { width: 10px; height: 10px; }
.p4-convs { list-style: none; padding: 0; margin: 0 0 0 28px; }
.p4-convs a { display: grid; grid-template-columns: 1fr auto auto; gap: var(--s3); align-items: baseline; padding: 7px 8px; border-radius: var(--r-md); color: var(--ink); text-decoration: none; font-size: var(--t-ui); }
.p4-convs a:hover { background: var(--hover); }
.p4-convs li[aria-current="page"] a { background: var(--bg); box-shadow: 0 0 0 1px var(--stroke-float), var(--shadow-xs); font-weight: 500; }
.p4-convs .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p4-convs .m, .p4-convs .when { color: var(--ink-3); font-size: var(--t-meta); white-space: nowrap; }
.p4-review-pane .p4-person:first-child { margin-top: 0; }
.p4-review-pane .p4-convs .m { display: none; }
.p4-review-one { max-width: var(--read-w); margin: 0 auto; padding-top: var(--s4); }
.frame .page .p4-who { font-size: var(--t-meta); color: var(--ink-3); margin-bottom: var(--s5); }
.p4-readonly { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s6); padding: 12px 12px 12px 16px; border-radius: var(--r-lg); background: var(--well); font-size: var(--t-ui); color: var(--ink-2); }
.p4-readonly b { color: var(--ink); }
.p4-readonly span { flex: 1; }
.p4-readonly a { flex: none; height: 30px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: var(--r-md); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink); text-decoration: none; font-size: var(--t-meta); font-weight: 500; }
.p4-readonly a:hover { background: var(--hover); }

/* ------------------------------------------------------------------ narrow windows */
@media (max-width: 900px) {
  .p4-stats, .p4-facts { grid-template-columns: 1fr; }
  .p4-stats .p4-stat + .p4-stat, .p4-fact + .p4-fact { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .p4-cols { grid-template-columns: 1fr; gap: var(--s4); }
  .frame .page .p4-parts { grid-template-columns: 1fr; }
  .frame .page .p4-parts dd { border-top: 0; padding-top: 0; }
  .p4-key { grid-template-columns: 32px 1fr auto; }
  .p4-key .used { display: none; }
  .p4-agent { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .p4-switch i, .p4-btn { transition: none; }
}
.p4-team .page-chat { max-width: var(--read-w); }

/* fix (Nov 19 2026): nothing in a card may widen the reading column. Long words (a bank
   reference, an id) wrap; the grid's columns may shrink; the stack never outgrows the page. */
.p4-page { min-width: 0; }
.p4-stack, .frame .page .p4-card { min-width: 0; max-width: 100%; }
.p4-stack { grid-template-columns: minmax(0, 1fr); }
.frame .page .p4-card { overflow-wrap: anywhere; }
.frame .page .p4-card dl { grid-template-columns: minmax(96px, 30%) minmax(0, 1fr); }
.frame .page .p4-card dl dd { min-width: 0; overflow-wrap: anywhere; }
.p4-card .evidence { overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ decisions, grouped (step 2) */
.p4-cap { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin: 0 0 var(--s4); font-size: var(--t-meta); color: var(--ink-3); }
.p4-cap .cap-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; max-width: none; }
.frame .p4-cap input { height: 28px; width: 84px; font-size: var(--t-meta); }
.frame .p4-cap button { height: 28px; font-size: var(--t-meta); }
.p4-cap a { margin-left: auto; color: var(--ink-2); }
.p4-cap .cap-note { flex-basis: 100%; margin: 0; }
.p4-group { margin: 0 0 var(--s6); }
.frame .page .p4-group .g-head { display: grid; gap: var(--s2); margin: 0 0 var(--s3); padding: 0; max-width: none; background: none; box-shadow: none; border: 0; border-radius: 0; animation: none; }
.frame .page .p4-group .g-head h2 { margin: 0; font-size: var(--t-ui); font-weight: 600; color: var(--ink); letter-spacing: 0; }
.p4-group .g-form { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.p4-group .g-form .confirm { flex-basis: 100%; margin-top: 0; }
.p4-group .g-note { margin: 0; font-size: var(--t-meta); color: var(--ink-3); }
.frame .page .p4-card .made-by { margin: var(--s2) 0 0; font-size: var(--t-meta); color: var(--ink-3); }
.p4-card .made-by a { color: var(--ink-2); }
.u-day { margin: var(--s3) 0 var(--s1); font-size: var(--t-meta); color: var(--ink-3); font-weight: 500; }
.p4-unfiled { list-style: none; padding: 0; margin: 0; }
.frame .p4-unfiled li { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.p4-unfiled .u-what { display: grid; min-width: 0; flex: 1 1 260px; font-size: var(--t-ui); }
.p4-unfiled .u-what b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p4-unfiled .u-what small { color: var(--ink-3); font-size: var(--t-meta); }
.p4-unfiled form.inline { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.frame .p4-unfiled select, .frame .p4-unfiled button { height: 28px; font-size: var(--t-meta); max-width: 200px; }
.p4-vendor h2 { font-size: var(--t-ui); font-weight: 600; margin: var(--s5) 0 var(--s2); }
.p4-vendor h2 small { color: var(--ink-3); font-weight: 400; margin-left: 6px; }

/* Agents made as rows (Nov 20): the owner's text glyph, and the add-or-change form */
.glyph.glyph-text { font: 600 11px/1 var(--sans, inherit); letter-spacing: -0.02em; }
.glyph.glyph-text.sm { font-size: 12px; }
.ag-form { display: grid; gap: 10px; max-width: 640px; margin: 12px 0 24px; }
.ag-form label { display: grid; gap: 4px; }
.ag-form fieldset { border: 1px solid var(--line, #DEDEDA); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.ag-form .ag-check { display: flex; gap: 8px; align-items: center; }
.ag-form .ag-group { display: grid; gap: 4px; margin-bottom: 6px; }
tr.off td { opacity: 0.6; }

/* Colourful charts (Nov 20): the chat's categorical palette, light and dark (--cc-0 to --cc-7) */
.pal-0 { fill: var(--cc-0); background: var(--cc-0); } .pal-1 { fill: var(--cc-1); background: var(--cc-1); }
.pal-2 { fill: var(--cc-2); background: var(--cc-2); } .pal-3 { fill: var(--cc-3); background: var(--cc-3); }
.pal-4 { fill: var(--cc-4); background: var(--cc-4); } .pal-5 { fill: var(--cc-5); background: var(--cc-5); }
.pal-6 { fill: var(--cc-6); background: var(--cc-6); } .pal-7 { fill: var(--cc-7); background: var(--cc-7); }
svg.colour-chart { width: 100%; max-width: 560px; height: auto; overflow: visible; display: block; }
svg.colour-chart text { font-family: var(--sans); font-size: 12px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
svg.colour-chart .value { fill: var(--ink-2); font-weight: 600; }
svg.colour-chart .grid { stroke: var(--line); stroke-width: 1; stroke-dasharray: 2 3; }
svg.colour-line .line { fill: none; stroke: var(--cc-0); stroke-width: 2; stroke-linejoin: round; }
svg.colour-line .area { fill: var(--cc-0); fill-opacity: var(--area-a); stroke: none; }
svg.colour-line circle { stroke: var(--bg); stroke-width: 1.5; }
.colour-pie { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.colour-pie svg.colour-chart { width: 180px; flex: none; }
.colour-pie svg path, .colour-pie svg circle { stroke: var(--bg); stroke-width: 1.5; }
.pie-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: var(--t-ui, 13px); }
.pie-legend li { display: grid; grid-template-columns: 12px 1fr auto auto; gap: 8px; align-items: center; }
.pie-legend .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.pie-legend small { color: var(--ink-3); }
.frame .msg .chat-figure { margin: 12px 0; padding: 14px 16px; background: var(--well); border-radius: var(--r-xl, 14px); max-width: 640px; }
.frame .msg .chat-figure .cf-h { font-weight: 600; margin-bottom: 6px; }
.frame .msg .chat-figure .cf-foot { display: flex; gap: 10px; align-items: center; margin-top: 8px; font-size: var(--t-meta, 12px); color: var(--ink-3); }
.ptile .colour-chart { margin-top: 6px; }

/* Subscriptions (/subscriptions): subscription watch, Nov 20. This page's own rules, in the
   Still look: tokens only (tokens.css), flat, one hairline. Colours of a figure come from
   colourOf() in web/app.ts (the --c a .c-* class sets). */

.sub-page { max-width: 860px; margin: 0 auto; padding-top: var(--s5); }
.frame .page .sub-page h1 { font-size: var(--t-big); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; margin: 0 0 var(--s2); }
.sub-lead { font-size: 15px; line-height: 1.55; color: var(--ink-2); max-width: 64ch; margin: 0 0 var(--s5); }
.sub-small { font-size: var(--t-meta); line-height: 1.5; color: var(--ink-3); margin: var(--s2) 0; max-width: 72ch; }

/* the year's total */
.sub-total { padding: 0 0 var(--s4); border-bottom: 1px solid var(--line); margin-bottom: var(--s2); }
.sub-total .lab { font-size: var(--t-ui); color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.sub-total .lab::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--ink)); }
.sub-total .fig { font-size: var(--t-hero); font-weight: 500; letter-spacing: -.035em; line-height: 1.1; margin: 4px 0 var(--s2); font-variant-numeric: tabular-nums; }
.sub-total .fig a { color: inherit; text-decoration: none; }
.sub-total .fig a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.sub-total .fig small { font-size: .5em; color: var(--ink-3); letter-spacing: 0; }
.sub-total .foot { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); font-size: var(--t-meta); color: var(--ink-3); }

/* chips */
.sub-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: var(--r-full); background: var(--signal-soft); color: var(--signal-text); font-size: 12px; font-weight: 600; white-space: nowrap; }
.sub-chip.is-quiet { background: var(--fill); color: var(--ink-3); font-weight: 500; }
.sub-chip.is-flag { background: var(--signal-soft); color: var(--signal-text); }
.sub-chip.is-late, .sub-chip.is-possible-trial { background: var(--fill); color: var(--ink-2); }
.sub-chip.is-stopped, .sub-chip.is-to-cancel { background: var(--fill); color: var(--ink-3); }

/* what is flagged */
.sub-flags { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.sub-flag { display: grid; grid-template-columns: 136px 1fr auto; align-items: baseline; gap: var(--s3); padding: 10px 0; border-bottom: 1px solid var(--line); font-size: var(--t-ui); line-height: 1.45; }
.sub-flag .sub-chip { justify-self: start; }
.sub-flag .go { font-size: var(--t-meta); color: var(--ink-3); white-space: nowrap; }
.sub-flag.is-missed .sub-chip, .sub-flag.is-stopped .sub-chip, .sub-flag.is-rhythm .sub-chip, .sub-flag.is-trial .sub-chip { background: var(--fill); color: var(--ink-2); }
.sub-flag.is-after_cancel .sub-chip { background: var(--bad-soft); color: var(--bad); }
.sub-flags.is-inner { border-top: 0; margin-bottom: var(--s2); }
.sub-flags.is-inner .sub-flag { grid-template-columns: 136px 1fr; }

/* the list */
.sub-head, .sub > summary { display: grid; grid-template-columns: minmax(0, 1fr) 132px 96px 104px 112px; align-items: center; gap: var(--s3); }
.sub-head { padding: 0 0 6px; font-size: 12px; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.sub-head .l, .sub-head .y { text-align: right; }
.sub { border-bottom: 1px solid var(--line); }
.sub > summary { list-style: none; cursor: pointer; padding: 12px 0; }
.sub > summary::-webkit-details-marker { display: none; }
.sub > summary:hover { background: color-mix(in srgb, var(--hover) 60%, transparent); }
.sub > summary .n { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sub > summary .n b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub > summary .chips { display: flex; flex-wrap: wrap; gap: 4px; }
.sub > summary .c { font-size: var(--t-meta); color: var(--ink-2); }
.sub > summary .sp { display: block; width: 96px; }
.sub > summary .sp .spark { height: 28px; }
.sub > summary .l, .sub > summary .y { text-align: right; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.sub > summary .y { font-weight: 600; }
.sub > summary .l small, .sub > summary .y small { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.sub > summary s { color: var(--ink-3); font-weight: 400; }
.sub[open] > summary { padding-bottom: var(--s2); }
.sub-body { padding: 0 0 var(--s4); }

/* the rows behind it */
.sub-rows { width: 100%; border-collapse: collapse; font-size: var(--t-meta); margin: var(--s2) 0; }
.sub-rows th { text-align: left; font-weight: 500; color: var(--ink-3); padding: 4px 8px 4px 0; border-bottom: 1px solid var(--line); }
.sub-rows td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.sub-rows tr:last-child td { border-bottom: 0; }
.sub-rows .d { white-space: nowrap; width: 88px; }
.sub-rows .a { white-space: nowrap; width: 112px; font-variant-numeric: tabular-nums; }
.sub-rows .e { white-space: nowrap; text-align: right; }
.sub-rows tr.is-extra td { color: var(--ink-2); }

/* the owner's marks */
.sub-marklog { list-style: none; margin: var(--s2) 0; padding: 0; font-size: var(--t-meta); }
.sub-marklog li { display: flex; align-items: center; gap: var(--s2); padding: 3px 0; flex-wrap: wrap; }
.sub-marklog li .t { font-weight: 600; }
.sub-marklog li.is-undone .t { text-decoration: line-through; color: var(--ink-3); font-weight: 400; }
.sub-own { margin-top: var(--s3); }
.sub-choose { display: flex; flex-wrap: wrap; gap: 6px; }
.frame .sub-choose button { height: 30px; padding: 0 12px; border-radius: var(--r-md); background: var(--fill); color: var(--ink); border: 0; font-size: var(--t-ui); font-weight: 500; cursor: pointer; }
.frame .sub-choose button:hover { background: var(--hover); }
.frame .sub-choose button.is-on { background: var(--ink); color: var(--on-ink); }
.sub-inline { display: inline-flex; align-items: center; gap: 6px; margin: 4px 8px 4px 0; }
.frame .sub-inline input { height: 28px; padding: 0 8px; font-size: var(--t-meta); border-radius: var(--r-sm); min-width: 0; width: 220px; }
.sub-fold { margin-top: var(--s2); font-size: var(--t-meta); }
.sub-fold > summary { cursor: pointer; color: var(--ink-3); }
.sub-fold.is-section { margin-top: var(--s5); border-top: 1px solid var(--line); padding-top: var(--s3); font-size: var(--t-ui); }
.sub-fold.is-section > summary { font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: var(--s2); }

@media (max-width: 760px) {
  .sub-head { display: none; }
  .sub > summary { grid-template-columns: minmax(0, 1fr) auto; }
  .sub > summary .c, .sub > summary .sp, .sub > summary .l { display: none; }
  .sub-flag { grid-template-columns: 1fr; gap: 4px; }
}

/* A readable page per customer and job: the summary at the top of a record. Every class starts with sm-. */
/* Colours come from the tokens only, so light and dark both follow tokens.css. */
.sm-box { margin-top: var(--s5); padding: var(--s4) var(--s4) var(--s3); border-radius: var(--r-lg); background: var(--well); }
.sm-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s3); margin-bottom: var(--s2); }
.frame .page .sm-h h2 { margin: 0; padding: 0; border: 0; font-size: var(--t-title); font-weight: 600; }
.sm-meta { font-size: var(--t-meta); color: var(--ink-3); }
.sm-acts { margin-left: auto; display: inline-flex; gap: var(--s2); align-items: flex-start; }
.sm-acts > details > summary { list-style: none; cursor: pointer; font-size: var(--t-ui); font-weight: 500; color: var(--ink-2); padding: 3px 10px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg); }
.sm-acts > details > summary::-webkit-details-marker { display: none; }
.sm-acts > details > summary:hover { background: var(--hover); color: var(--ink); }
.sm-acts > details[open] > summary { color: var(--ink); }
.sm-edit[open] { flex-basis: 100%; }
.sm-acts:has(.sm-edit[open]) { flex-basis: 100%; flex-wrap: wrap; justify-content: flex-end; }
.sm-edit form, .sm-undo form { margin-top: var(--s3); display: grid; gap: var(--s3); }
.sm-field { display: grid; gap: 4px; font-size: var(--t-meta); color: var(--ink-3); }
.frame .sm-field textarea { width: 100%; min-height: 52px; font: inherit; font-size: var(--t-ui); color: var(--ink); background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 8px 10px; resize: vertical; }
.sm-lines { display: grid; gap: 2px; }
.sm-line, .sm-note { display: block; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: var(--t-ui); line-height: 1.5; }
.sm-line:last-child { border-bottom: 0; }
.sm-k { display: block; margin-bottom: 1px; color: var(--ink-3); font-size: var(--t-label); font-weight: 500; letter-spacing: .02em; text-transform: uppercase; }
.sm-line p, .sm-note p { margin: 0; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.sm-quote { font-style: italic; color: var(--ink-2); quotes: "\201C" "\201D"; }
.sm-tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; margin-left: 6px; border-radius: var(--r-sm); font-size: var(--t-label); font-weight: 500; vertical-align: 1px; background: var(--fill); color: var(--ink-2); }
.sm-tag.is-mail { background: var(--signal-soft); color: var(--signal-ink); }
.sm-tag.is-person { background: var(--good-soft); color: var(--good); }
.sm-refs { display: inline-flex; gap: 3px; margin-left: 4px; vertical-align: 1px; }
.sm-refs a { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 4px; background: var(--fill); color: var(--ink-3) !important; font-size: 12px; text-decoration: none !important; }
.sm-refs a:hover { background: var(--hover); color: var(--ink) !important; }
.sm-notes { display: grid; gap: var(--s2); margin-bottom: var(--s3); }
.sm-note { padding: var(--s2) var(--s3); border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--bg); }
.sm-note-do { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }
.sm-note-do form { margin: 0; }
.sm-msg { margin: 0 0 var(--s2); font-size: var(--t-ui); color: var(--good); }
.sm-foot { margin: var(--s2) 0 0; font-size: var(--t-meta); color: var(--ink-3); }
@media (max-width: 720px) {
  .sm-box { padding: var(--s3); }
}

/* Tax and year end (step 5, Nov 19 2026): the HST return, month close, loans, assets, the
   year-end pack and the dates. Flat, hairlines, figures right-aligned and tabular. */

.cra h1 { margin-bottom: var(--s2); }
.cra .lead { color: var(--ink-2); margin: 0 0 var(--s4); }
.cra h2 { display: flex; align-items: center; gap: var(--s2); margin: var(--s6) 0 var(--s3); font-size: var(--t-title); }
.cra h3 { margin: var(--s5) 0 var(--s2); font-size: var(--t-ui); color: var(--ink-2); }
.cra table { width: 100%; border-collapse: collapse; margin: 0 0 var(--s4); font-size: var(--t-ui); }
.cra th, .cra td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cra thead th { font-size: var(--t-label); font-weight: 600; color: var(--ink-3); }
.cra td.num, .cra th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cra tr.is-key th, .cra tr.is-key td { font-weight: 600; border-bottom-color: var(--ink-3); }
.cra tr.cra-sub th { padding-top: var(--s4); color: var(--ink-2); font-size: var(--t-label); }
.cra tr.is-past td { color: var(--ink-3); }
.cra-small { font-size: var(--t-meta); }
.cra-note { margin-top: var(--s6); color: var(--ink-3); font-size: var(--t-meta); }

.cra-tabs { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 0 var(--s5); padding-bottom: var(--s2); border-bottom: 1px solid var(--line); }
.cra-tabs a { padding: 5px 10px; border-radius: var(--r-md); color: var(--ink-2); text-decoration: none; font-size: var(--t-ui); }
.cra-tabs a:hover { background: var(--fill); color: var(--ink); }
.cra-tabs a[aria-current="page"] { background: var(--fill); color: var(--ink); font-weight: 600; }
.cra-tabs .count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: var(--r-full); background: var(--signal-soft); color: var(--signal-ink); font-size: var(--t-label); text-align: center; }

.chip.cra-todo { background: var(--signal-soft); color: var(--signal-ink); text-decoration: none; }
.chip.cra-todo:hover { color: var(--signal-ink); text-decoration: underline; }

.cra-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px var(--s4); margin: 0 0 var(--s4); font-size: var(--t-ui); }
.cra-facts dt { color: var(--ink-3); }
.cra-facts dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.cra-gst td.cra-line { width: 52px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink-2); }

.cra-month { padding: var(--s3) 0 var(--s4); border-bottom: 1px solid var(--line); }
.cra-month h2 { margin-top: var(--s2); }
.cra-month.is-closed h2 { color: var(--ink-2); }
.cra-check { list-style: none; padding: 0; margin: 0 0 var(--s3); display: grid; gap: 6px; font-size: var(--t-ui); }
.cra-check li { display: flex; gap: var(--s2); align-items: baseline; }
.cra-check .mark { width: 18px; height: 18px; flex: none; display: inline-grid; place-items: center; border-radius: var(--r-full); font-size: 12px; font-weight: 700; }
.cra-check li.ok .mark { background: var(--good-soft); color: var(--good); }
.cra-check li.no .mark { background: var(--bad-soft); color: var(--bad); }
.cra-reopen { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: end; font-size: var(--t-ui); }
.cra-reopen input { min-width: 260px; }
.cra-month button[disabled] { opacity: .5; cursor: not-allowed; }

.cra-loan table tr.cra-decide td { background: var(--well); }
.cra-watch { margin-bottom: var(--s5); }

.cra-setting { padding: var(--s3) 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px; font-size: var(--t-ui); }
.cra-setting-h { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.cra-confirm { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-top: 4px; }
.cra-confirm select, .cra-confirm input { max-width: 100%; }

.cra-hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--s2); padding: 0; list-style: none; }
.cra-hub a { display: block; padding: var(--s3); border-radius: var(--r-md); background: var(--well); color: var(--ink); text-decoration: none; }
.cra-hub a:hover { background: var(--hover); }
.cra-actions { display: flex; gap: var(--s3); align-items: center; }
.cra-pack-sec { break-inside: avoid-page; }

@media print {
  .rail, .head, .pane, .cra-tabs, .cra-actions { display: none !important; }
  .frame, .main, .page, .page-col { display: block !important; width: auto !important; max-width: none !important; margin: 0 !important; padding: 0 !important; overflow: visible !important; height: auto !important; }
  body { background: #fff; color: #000; }
  .cra-pack-sec { break-before: auto; }
}

/* Trust (Nov 20, UX review P0 1 and 3): backup incidents and disputed matches. web/trust-cards.ts. */

/* the three dated statuses: local copy, off-site copy, restore drill */
.tr-parts { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.tr-part { display: grid; grid-template-columns: 10px 9rem 1fr; align-items: baseline; gap: 10px; font-size: 14px; color: var(--ink); }
.tr-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); align-self: center; }
.tr-ok .tr-dot { background: var(--good); }
.tr-warn .tr-dot { background: var(--signal); }
.tr-bad .tr-dot { background: var(--bad); }
.tr-label { font-weight: 600; }
.tr-words { color: var(--ink-2); }

/* one incident */
.tr-incident { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 10px; background: var(--pane); }
.tr-is-active { border-left: 3px solid var(--bad); }
.tr-is-recovered { border-left: 3px solid var(--signal); }
.tr-inc-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: 15px; }
.tr-since { color: var(--ink-3); font-size: 13px; }
.tr-badge { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--well); color: var(--ink-2); }
.tr-badge.tr-bad { background: var(--bad-soft); color: var(--bad); }
.tr-badge.tr-warn { background: var(--signal-soft); color: var(--signal-text); }
.tr-badge.tr-ok { background: var(--good-soft); color: var(--good); }
.tr-problem, .tr-step, .tr-cleared { margin: 8px 0 0; font-size: 14px; color: var(--ink); }
.tr-note { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
.tr-ack { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tr-diag { margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.tr-diag > summary { cursor: pointer; color: var(--ink-2); }
.tr-diag ul { margin: 6px 0 0; padding-left: 18px; }
.tr-diag code { font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; word-break: break-word; }
.tr-page section { margin-bottom: 20px; }

/* a card that needs context first */
.tr-nc-tag { display: inline-block; margin-left: 8px; font-size: 13px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--signal-soft); color: var(--signal-text); vertical-align: middle; }
.tr-nc { margin: 10px 0; padding: 10px 12px; border-radius: 8px; background: var(--well); font-size: 14px; color: var(--ink); }
.tr-nc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .tr-nc-cols { grid-template-columns: 1fr; } }
.tr-nc-col h4 { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.tr-nc-col ul { margin: 0; padding-left: 18px; }
.tr-nc-agree li::marker { color: var(--good); }
.tr-nc-needs li::marker { color: var(--signal); }
.tr-nc-why, .tr-nc-effect, .tr-nc-link { margin: 8px 0 0; }
.tr-nc-entry { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.tr-q-links { margin: 8px 0; padding: 8px 12px; border-left: 3px solid var(--signal); background: var(--well); font-size: 14px; }
.tr-q-links p { margin: 4px 0; }

/* Area 3 (Nov 20 review): numbers, the Pulse, and what "checked" means. Rules here, not in app.css.
   Green only for a named check that passed; amber when an input or check is still needed;
   red for a real failure. Tokens only (tokens.css). */

:root { --need: #9A5B00; --need-soft: #FBF1E1; --need-dot: #D98A1E; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --need: #F0B860; --need-soft: #2B2215; --need-dot: #F0AE4E; } }
:root[data-theme="dark"] { --need: #F0B860; --need-soft: #2B2215; --need-dot: #F0AE4E; }

.t-ok-ink { color: var(--good); }
.t-need-ink { color: var(--need); font-weight: 600; }
.t-bad-ink { color: var(--bad); font-weight: 600; }

/* ------------------------------------------------------------------ the labels */
ul.trust { list-style: none; margin: var(--s3) 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--t-ui); color: var(--ink-2); }
ul.trust li { display: inline-flex; align-items: baseline; gap: 6px; min-width: 0; }
ul.trust li i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex: none; transform: translateY(-1px); }
ul.trust li b { color: var(--ink); font-weight: 600; white-space: nowrap; }
ul.trust li.t-ok i { background: var(--good); }
ul.trust li.t-ok b { color: var(--good); }
ul.trust li.t-need i { background: var(--need-dot); }
ul.trust li.t-need b { color: var(--need); }
ul.trust li.t-bad i { background: var(--bad); }
ul.trust li.t-bad b { color: var(--bad); }
ul.trust li.t-plain i { background: var(--ink); }
ul.trust.is-compact { flex-direction: column; gap: 6px; margin: 0; }
ul.trust.is-compact li { display: grid; grid-template-columns: 8px auto; column-gap: 8px; }
ul.trust.is-compact li span { grid-column: 2; }
.trust-banner { padding: 10px 14px; border-radius: var(--r-md); background: var(--need-soft); }
.trust-found summary { font-size: var(--t-ui); }
.trust-details { margin-top: var(--s3); }
.trust-details .prov { font-size: var(--t-meta); color: var(--ink-2); margin-top: 6px; }

/* the header badge: amber when a check is still needed */
.checked.need { color: var(--need); background: var(--need-soft); box-shadow: 0 0 0 1px color-mix(in srgb, var(--need-dot) 40%, transparent); }
.checked.need i { background: var(--need-dot); }
.checked.need i::after { width: 1.6px; height: 6px; border: 0; background: var(--bg); transform: none; border-radius: 1px; }
.checked:focus-visible { outline: 2px solid var(--focus, var(--signal)); outline-offset: 2px; }

/* a tag beside a chart heading */
.t-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; margin-left: 6px; border-radius: var(--r-full); background: var(--fill); color: var(--ink-2); font-size: var(--t-meta); font-weight: 500; letter-spacing: 0; vertical-align: 2px; white-space: nowrap; }
.t-tag.t-need { background: var(--need-soft); color: var(--need); }
.t-tag.t-bad { background: var(--bad-soft); color: var(--bad); }

/* ------------------------------------------------------------------ a number's page */
.num-trust { margin-top: var(--s3); }
.num-under .see-rows { font-weight: 600; }
.num-rows { margin-top: var(--s4); }
.num-rows h2 { margin-top: 0; }
.fig-low { display: flex; flex-direction: column; gap: 2px; padding: var(--s3) 0; margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.fig-low span { font-size: var(--t-ui); font-weight: 400; color: var(--ink-2); }
table.rows-t td.d, .p3-dl dd { font-variant-numeric: tabular-nums; }
table.rows-t td.d { white-space: nowrap; }
td.memo { color: var(--ink-2); }
td.memo.is-imported, .p3-desc.is-imported, .p3-memo.is-imported { color: var(--ink-3); font-style: italic; }
.memo-k { font-style: normal; font-size: var(--t-meta); font-weight: 600; color: var(--ink-3); text-transform: none; margin-right: 4px; }
.p3-desc { margin: 4px 0 var(--s2); font-size: 15px; color: var(--ink-2); max-width: 62ch; }
.ev-k { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: var(--r-full); background: var(--fill); color: var(--ink-2); font-size: var(--t-meta); font-weight: 600; }
.ev-k.is-ok { background: var(--good-soft); color: var(--good); }
.p3-evrefs { list-style: none; padding: 0; margin: 6px 0 0; font-size: var(--t-meta); color: var(--ink-2); }

/* ------------------------------------------------------------------ the Pulse's opening */
.pulse-trust { margin: 0 0 var(--s4); }
.pulse-open { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: var(--s6); margin-bottom: var(--s6); }
@media (max-width: 1180px) { .pulse-open { grid-template-columns: minmax(0, 1fr); } }
.po-h { display: flex; align-items: baseline; gap: var(--s3); margin-bottom: var(--s2); }
.frame .page .po-h h2 { margin: 0; font-size: var(--t-title); font-weight: 600; }
.po-h .when { font-size: var(--t-ui); color: var(--ink-2); }
.act-list { list-style: none; margin: 0; padding: 0; }
.act-list li { border-top: 1px solid var(--line); font-size: 14px; }
.act-list li > a, .act-list li > span { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding: 10px 0 10px 16px; position: relative; color: var(--ink); text-decoration: none; }
.act-list li > a::before, .act-list li > span::before { content: ""; position: absolute; left: 0; top: 17px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); }
.act-list li.is-need > a::before, .act-list li.is-need > span::before { background: var(--need-dot); }
.act-list li.is-bad > a::before, .act-list li.is-bad > span::before { background: var(--bad); }
.act-list li > a b { white-space: nowrap; font-weight: 600; color: var(--ink); }
.act-list li > a:hover, .act-list li > a:focus-visible { background: var(--hover); outline: none; }
.act-list li > a:focus-visible { box-shadow: 0 0 0 2px var(--focus, var(--signal)); }
.po-cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--s5); }
@media (max-width: 760px) { .po-cols { grid-template-columns: minmax(0, 1fr); } }
.frame .page .po-cols h3 { margin: 0; font-size: 14px; font-weight: 600; }
.po-period { margin: 2px 0 var(--s2); font-size: var(--t-ui); color: var(--ink-2); }
.po-cols ul.pulse { margin: 0; }
.po-rolling p { font-size: 14px; }

/* operating health, folded under one line */
.ops-health { margin-top: var(--s6); border-top: 1px solid var(--line); padding-top: var(--s3); }
.ops-health > summary { display: flex; gap: var(--s3); align-items: baseline; cursor: pointer; font-size: 14px; }
.ops-health > summary .k { font-weight: 600; color: var(--ink); }
.ops-health > summary .v { color: var(--ink-2); }
.ops-body { padding-top: var(--s3); }
.frame .page .ops-body h3 { font-size: 14px; font-weight: 600; margin: var(--s4) 0 var(--s2); }
.ops-body .strip { border-top: 0; padding-top: 0; flex-wrap: wrap; }

/* the board: a span of half, low-data words, labelled bases, and clearer hover and focus */
.board .span-6 { grid-column: span 6; }
@media (max-width: 1180px) { .board .span-6 { grid-column: span 12; } }
.low-data { display: block; padding: 10px 0 4px; font-size: var(--t-ui); font-weight: 600; color: var(--ink-2); }
.card-basis { margin: 2px 0 var(--s2); font-size: var(--t-ui); color: var(--ink-2); }
.card-h h3 small { font-weight: 400; color: var(--ink-2); }
.frame a.kpi { border-radius: var(--r-md); transition: background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.frame a.kpi:hover { background: var(--well); box-shadow: 0 0 0 1px var(--line-2); }
.frame a.kpi:hover .lab::after { color: var(--ink); transform: translateX(2px); }
.frame a.kpi:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus, var(--signal)); background: var(--well); }
.board .card-x a:focus-visible, .board svg a:focus-visible { outline: 2px solid var(--focus, var(--signal)); outline-offset: 2px; border-radius: 4px; }
.board svg a:hover rect, .board svg a:focus rect { filter: brightness(.9); }
.board svg a { cursor: pointer; }

/* ------------------------------------------------------------------ Projections */
.p3-lead { align-items: flex-start; }
.p3-lead .to { display: flex; flex-direction: column; gap: 4px; }
.p3-lead .lab { font-size: var(--t-ui); color: var(--ink-2); }
.p3-lead .rng { font-size: 14px; color: var(--ink-2); }
.p3-lead .rng b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.p3-lead .calib { display: block; font-size: var(--t-ui); color: var(--need); }
.p3-lead .side .from { font-size: 14px; color: var(--ink-2); }
.p3-lead .side .drivers { font-size: var(--t-ui); color: var(--ink-2); max-width: 40ch; text-align: right; }
.p3-slider .exact { display: inline-flex; align-items: baseline; gap: 2px; }
.p3-slider .exact input { width: 92px; height: 30px; padding: 0 8px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.p3-slider .exact input:focus-visible { outline: 2px solid var(--focus, var(--signal)); outline-offset: 1px; }
.p3-slider .exact .u { font-size: 14px; color: var(--ink-2); }
.p3-slider .bounds { display: flex; justify-content: space-between; font-size: var(--t-meta); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.p3-slider .foot { color: var(--ink-2); }
.p3-floor-state { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: var(--s2) 0 var(--s4); font-size: 14px; }
.p3-floor-state .k { color: var(--ink-2); }
.p3-floor-state .k::after { content: " ·"; }
.p3-floor-state .p3-floor-set { flex-basis: auto; }
.p3-floor-state .p3-floor-set > summary { font-weight: 600; }
.p3-floor-state .p3-floor-set[open] { flex-basis: 100%; }
.p3-amt-scope { margin: 4px 0 var(--s2); font-size: var(--t-ui); color: var(--ink-2); }

/* Area 4 of the Nov 20 UX fix (docs/UX-FIX-PLAN-2026-11-20.md): chats, the left column,
   Search and Records. Kept in its own file so the six areas do not collide in app.css.
   The Still look: quiet lines, few accents, no new tiny text. */

/* ------------------------------------------------------------------ Search (Ctrl K) */
/* filtering sets `hidden`, and .option says display:flex: hidden must win (the review's bug) */
.palette .option[hidden], .palette .palette-group[hidden], .palette .option-empty[hidden], .menu .option[hidden], .menu .option-empty[hidden] { display: none !important; }
.palette .option-empty { display: flex; flex-direction: column; gap: 4px; padding: 18px 8px; font-size: var(--t-ui); color: var(--ink-2); }
.palette .option-empty b { color: var(--ink); font-weight: 600; }
.palette .option-empty a { color: var(--ink); }

/* ------------------------------------------------------------------ the left column */
.rail .brand .compose-to { display: inline-flex; align-items: center; gap: 6px; max-width: 58%; height: 28px; padding: 0 9px; border-radius: var(--r-md); color: var(--ink-2); font-size: var(--t-meta); text-decoration: none; box-shadow: inset 0 0 0 1px var(--line-2); white-space: nowrap; }
.rail .brand .compose-to span { overflow: hidden; text-overflow: ellipsis; }
.rail .brand .compose-to b { color: var(--ink); font-weight: 500; }
.rail .brand .compose-to:hover { background: var(--hover); color: var(--ink); }
.rail .brand .compose-to svg { flex: none; width: 14px; height: 14px; }
.rail .agent-line { display: flex; align-items: center; gap: 2px; }
.rail .agent-line .agent { flex: 1; min-width: 0; }
.rail .team-activity { flex: none; padding: 3px 6px; border-radius: var(--r-sm); color: var(--ink-3); font-size: var(--t-meta); text-decoration: none; white-space: nowrap; }
.rail .team-activity:hover, .rail .team-activity:focus-visible { background: var(--hover); color: var(--ink); }
.rail .team-activity[aria-current="page"] { color: var(--ink); background: var(--bg); box-shadow: var(--shadow-xs), 0 0 0 1px var(--line); }
.thread-fold { display: flex; flex-direction: column; gap: 1px; }
.thread-fold > summary { list-style: none; cursor: pointer; }
.thread-fold > summary::-webkit-details-marker { display: none; }
.thread-fold > summary::after { content: "›"; margin-left: 2px; transition: transform var(--fast, .12s) var(--ease, ease); }
.thread-fold[open] > summary::after { transform: rotate(90deg); }
.thread-row:focus-visible, .thread-more:focus-visible, .thread-new:focus-visible, .rail .agent:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.rail .agents [aria-current="page"] { scroll-margin: 40px 0; }

/* the footer icons: their plain names on hover and keyboard focus */
.rail .me [data-tip] { position: relative; }
.rail .me [data-tip]::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  padding: 5px 8px; border-radius: var(--r-sm); background: var(--ink); color: var(--on-ink);
  font: 500 var(--t-meta)/1.2 var(--sans); white-space: nowrap; pointer-events: none; opacity: 0; z-index: 10;
  transition: opacity var(--fast, .12s) var(--ease, ease);
}
.rail .me form:last-child [data-tip]::after, .rail .me > [data-tip]:last-child::after { left: auto; right: 0; transform: none; }
.rail .me [data-tip]:hover::after, .rail .me [data-tip]:focus-visible::after { opacity: 1; }
.rail .me .icon-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.rail .me .icon-btn.is-off { color: var(--ink-4); }

/* ------------------------------------------------------------------ the head of a chat */
.head .crumbs .chat-title { min-width: 0; flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.head .crumbs .chat-meta { flex: none; display: inline-flex; align-items: center; gap: 8px; }
.head .crumbs .rename > summary { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: var(--r-sm); color: var(--ink-3); font-size: var(--t-meta); cursor: pointer; list-style: none; }
.head .crumbs .rename > summary::-webkit-details-marker { display: none; }
.head .crumbs .rename > summary:hover, .head .crumbs .rename > summary:focus-visible { background: var(--hover); color: var(--ink); }
.head .crumbs .rename > summary svg { width: 13px; height: 13px; }

/* ------------------------------------------------------------------ a question's state */
.frame .msg .ask-state { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; font-size: var(--t-ui); color: var(--ink-2); }
.frame .msg.me .ask-state { align-self: flex-end; justify-content: flex-end; text-align: right; }
.frame .msg .ask-state > i { width: 8px; height: 8px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.frame .msg .ask-state.is-working > i { background: var(--good); box-shadow: none; animation: ask-pulse 1.4s ease-in-out infinite; }
.frame .msg .ask-state.is-failed { color: var(--ink); }
.frame .msg .ask-state.is-failed > i { background: var(--bad); box-shadow: none; }
.frame .msg .ask-state form { margin: 0; }
.frame .msg .ask-state a { color: var(--ink); }
@keyframes ask-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .frame .msg .ask-state.is-working > i { animation: none; } }
.ask-note { margin: 6px 0 0; font-size: var(--t-ui); color: var(--ink-2); }
.ask-note.is-bad { color: var(--bad); }

/* ------------------------------------------------------------------ answers */
/* no sideways scroll: long cells and links wrap inside the reading column */
.frame .msg .body .rows-wrap { overflow-x: visible; max-width: 100%; }
.frame .msg .body .rows-table { width: 100%; table-layout: auto; }
.frame .msg .body .rows-table td, .frame .msg .body .rows-table th { overflow-wrap: anywhere; word-break: normal; }
.frame .msg .body .words { overflow-wrap: anywhere; }
.frame .msg .body .ext-link { text-decoration: underline dotted var(--ink-4); text-underline-offset: 3px; }
/* the one button an answer may hold: add "What needs me today" to the reader's own menu */
.chat-act { display: inline; margin: 0; }
.chat-act button { font: 500 var(--t-meta)/1 var(--sans); height: 26px; padding: 0 10px; border-radius: var(--r-full); vertical-align: baseline; }
.frame .msg .table-tools { display: flex; justify-content: flex-end; margin-bottom: 4px; }
.chip-btn { font: 500 var(--t-meta)/1 var(--sans) !important; height: 26px !important; padding: 0 10px !important; border-radius: var(--r-full) !important; background: transparent !important; color: var(--ink-2) !important; box-shadow: inset 0 0 0 1px var(--line-2); }
.chip-btn:hover, .chip-btn:focus-visible { background: var(--hover) !important; color: var(--ink) !important; }
.frame .msg .chat-figure .cf-foot { flex-wrap: wrap; }
.frame .msg .chat-figure .cf-foot .chip-link { color: var(--ink); font-weight: 500; text-decoration: none; }
.frame .msg .chat-figure .cf-foot .chip-link::after { content: " ›"; color: var(--ink-3); }
.frame .msg .chat-figure .cf-src { margin-left: auto; color: var(--ink-3); }

/* the tasks an answer used, from their typed fields; stacked, so it never scrolls sideways */
.frame .msg .record-facts { margin: var(--s3) 0 0; padding: 10px 12px; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line); max-width: 92ch; }
.frame .msg .record-facts .rf-h { font-size: var(--t-ui); font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.frame .msg .record-facts .rf-h small { font-weight: 400; color: var(--ink-3); margin-left: 6px; font-size: var(--t-meta); }
.frame .msg .record-facts ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.frame .msg .record-facts li { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr)); gap: 4px 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: var(--t-ui); }
.frame .msg .record-facts li:first-child { border-top: 0; }
.frame .msg .record-facts .rf-title { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.frame .msg .record-facts .rf-f { color: var(--ink-2); }
.frame .msg .record-facts .rf-f .k { display: none; }
.frame .msg .record-facts .none { color: var(--ink-3); }
@media (max-width: 900px) {
  .frame .msg .record-facts li { grid-template-columns: 1fr 1fr 1fr; }
  .frame .msg .record-facts .rf-title { grid-column: 1 / -1; }
  .frame .msg .record-facts .rf-f .k { display: block; color: var(--ink-3); font-size: var(--t-meta); }
}
.frame .msg .chips a { max-width: 100%; }

/* what a correction does */
.frame .msg .fix .fix-note { margin: 6px 0 0; max-width: 70ch; font-size: var(--t-meta); line-height: 1.45; color: var(--ink-2); }

/* the start of a chat: browse actions, a stable zero in words */
.hello .browse { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--s4); }
.hello .browse a { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: var(--r-full); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); font-size: var(--t-ui); text-decoration: none; }
.hello .browse a::after { content: " ›"; margin-left: 4px; color: var(--ink-3); }
.hello .browse a:hover { background: var(--hover); color: var(--ink); }
.hello .now .zero { color: var(--ink-2); }

/* ------------------------------------------------------------------ Records */
.p3-seg.p3-seg-5 { flex-wrap: wrap; }
.p3-seg.p3-seg-5 .p3-seg-i { flex: 1 0 auto; padding: 0 6px; }
.p3-list-h a { color: inherit; text-decoration: none; }
.p3-group .n { color: var(--ink-4); font-weight: 400; margin-left: 4px; }
.p3-records { max-width: 72ch; }
.p3-records h1 { margin: 0 0 var(--s2); }
.p3-rxs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s3); margin-top: var(--s4); }
.p3-rx { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: var(--r-lg); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; }
.p3-rx b { font-size: 15px; font-weight: 600; }
.p3-rx b span { color: var(--ink-3); font-weight: 400; margin-left: 4px; }
.p3-rx small { color: var(--ink-2); font-size: var(--t-ui); }
.p3-rx:hover { background: var(--hover); }
.p3-rx.is-on { box-shadow: inset 0 0 0 1.5px var(--ink-3); }

/* ------------------------------------------------------------------ People's chats */
.review-index { width: 100%; max-width: 72ch; border-collapse: collapse; margin: var(--s3) 0 var(--s5); font-size: var(--t-ui); }
.review-index th, .review-index td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); font-weight: 400; vertical-align: middle; }
.review-index thead th { color: var(--ink-3); font-size: var(--t-meta); font-weight: 600; }
.review-index tbody th { color: var(--ink); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.review-index tbody th small { color: var(--ink-3); font-weight: 400; }
.review-index .n { text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ Voice off, the door */
.voice-type { margin-top: var(--s4); max-width: 64ch; }
.voice-type label { display: block; margin-bottom: 6px; font-size: var(--t-ui); color: var(--ink); }
.voice-type label small { color: var(--ink-3); font-size: var(--t-meta); }
.voice-type textarea { width: 100%; }
.door-setup { margin-top: var(--s5); max-width: 72ch; }
.door-example { margin: 8px 0; padding: 10px 12px; border-radius: var(--r-md); background: var(--fill); font: 12.5px/1.5 var(--mono, monospace); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Decisions, Unfiled mail and Vendor memory (Nov 20 UX review, area 2). Still look: matte
   surfaces, few accents. Amber (signal) only where a person must look; good for what agrees. */

.a2-tabs { display: flex; gap: var(--s1, 4px); margin: 0 0 var(--s4); border-bottom: 1px solid var(--line); }
.a2-tab { padding: var(--s2) var(--s3); font-size: var(--t-ui); color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.a2-tab:hover { color: var(--ink); background: var(--hover); }
.a2-tab:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.a2-tab.is-on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.a2-tab .count { margin-left: 4px; }
.a2-tab .count.is-zero { background: var(--fill); color: var(--ink-3); }

.a2-summary { margin: 0 0 var(--s4); font-size: var(--t-ui); color: var(--ink-2); }
.a2-summary a { color: var(--ink); }
.a2-lede { max-width: 70ch; color: var(--ink-2); font-size: var(--t-ui); }
.a2-readonly { max-width: 70ch; font-size: var(--t-ui); color: var(--ink-2); border-left: 2px solid var(--line-2); padding-left: var(--s3); }
.a2-hint { font-size: var(--t-meta); color: var(--ink-2); }

.a2-done { margin: 0 0 var(--s4); padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--well); font-size: var(--t-ui); }
.a2-done:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

.a2-lane { margin: var(--s5) 0 var(--s6); }
.a2-lane-top { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.frame .page .a2-lane-h { margin: 0 0 var(--s3); font-size: var(--t-ui); font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: var(--s2); }
.a2-lane-h .count.is-zero { background: var(--fill); color: var(--ink-3); }
.frame .page .g-title { margin: 0; font-size: var(--t-ui); font-weight: 600; color: var(--ink-2); }

.a2-limit { margin-left: auto; font-size: var(--t-meta); color: var(--ink-2); }
.a2-limit summary { cursor: pointer; list-style: none; }
.a2-limit summary::-webkit-details-marker { display: none; }
.a2-limit summary:hover { color: var(--ink); text-decoration: underline; }
.a2-limit[open] .cap-form { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; margin-top: var(--s2); }

/* the bank side next to the books side */
.a2-sides { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); margin: var(--s3) 0 var(--s2); }
@media (max-width: 720px) { .a2-sides { grid-template-columns: 1fr; } }
.a2-side { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s3); }
.a2-side-h { display: block; font-size: var(--t-meta); font-weight: 600; color: var(--ink-2); margin-bottom: var(--s1, 4px); }
.frame .page .p4-card .a2-side dl { display: grid; grid-template-columns: 76px 1fr; padding: 0; gap: 2px 10px; }
.a2-agree { margin: 0 0 var(--s3); font-size: var(--t-ui); color: var(--ink-2); }
.a2-agree b { color: var(--good, var(--ink)); }
.a2-agree.is-off b:last-of-type { color: var(--signal-ink); }

.a2-review { color: var(--signal-ink); display: inline-flex; gap: var(--s2); align-items: center; }
.a2-review .inline { display: inline; }

.a2-evidence, .a2-askhere, .a2-change { margin: var(--s2) 0; font-size: var(--t-ui); }
.a2-evidence > summary, .a2-askhere > summary { cursor: pointer; color: var(--ink-2); }
.a2-evidence[open] { border-left: 2px solid var(--line-2); padding-left: var(--s3); }
.a2-refs { font-size: var(--t-meta); color: var(--ink-3); }
.a2-refs code { font-size: var(--t-meta); }

.a2-ask-q { display: inline-flex; flex-direction: column; gap: 2px; }
.a2-effect { font-size: var(--t-meta); color: var(--ink-2); font-weight: 400; }
.a2-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.a2-chooser input { min-width: 22ch; }
.a2-change-go { display: inline-flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.a2-preview { margin: var(--s3) 0; padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--well); }
.a2-preview.is-off { border-color: var(--signal); }
.a2-ba { border-collapse: collapse; font-size: var(--t-ui); margin-bottom: var(--s2); }
.a2-ba caption { text-align: left; font-weight: 600; margin-bottom: 4px; }
.a2-ba th, .a2-ba td { text-align: left; padding: 4px 12px 4px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.a2-ba thead th { color: var(--ink-2); font-weight: 500; }

.a2-askhere .ask-here { display: flex; gap: var(--s2); margin: var(--s2) 0; }
.a2-askhere .ask-here input[name="q"] { flex: 1; min-width: 0; }

/* unfiled mail */
.a2-sender { margin: var(--s4) 0; padding-top: var(--s3); border-top: 1px solid var(--line); }
.a2-sender-h { display: flex; gap: var(--s3); align-items: baseline; flex-wrap: wrap; }
.frame .page .a2-sender-h h2 { margin: 0; font-size: var(--t-ui); font-weight: 600; }
.a2-sender-h .soft { font-size: var(--t-meta); }
.a2-file-all { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; margin: var(--s2) 0; }
.a2-suggest { font-size: var(--t-ui); color: var(--ink-2); }
.a2-thread > summary { cursor: pointer; font-size: var(--t-ui); padding: 4px 0; }
.a2-lists { margin-top: var(--s5); }
.a2-lists > summary { cursor: pointer; color: var(--ink-2); font-size: var(--t-ui); }

/* vendor memory */
.a2-vendor { margin: var(--s4) 0; padding-top: var(--s3); border-top: 1px solid var(--line); }
.a2-vendor-h { display: flex; gap: var(--s3); align-items: baseline; flex-wrap: wrap; }
.frame .page .a2-vendor-h h2 { margin: 0; font-size: var(--t-ui); font-weight: 600; }
.a2-vendor-h small { color: var(--ink-2); font-size: var(--t-meta); }
.a2-map { margin: 4px 0; font-size: var(--t-ui); }
.a2-vendor.is-mixed .a2-map b { color: var(--signal-ink); }
.a2-history-fold > summary { cursor: pointer; font-size: var(--t-ui); color: var(--ink-2); }
.a2-forget { font-size: var(--t-meta); margin-left: auto; }

/* Mind design system: the pixel art kit (Sam's approved kit, design/pixel-kit/, Nov 20 2026).
   Small accents only, in the quiet Still look: the agents' icons, a status mark beside its
   words, the art in an empty slot, the boot stages. Drawn by web/style/pixel-art.ts, which
   draws each piece twice (light and dark palettes); this file shows the one that fits.

   Sizes: one art pixel is a whole number of screen pixels at 125% (Sam's Windows scaling),
   150% and 200%, so edges stay crisp (shape-rendering: crispEdges does the rest). */

/* kit:start */
@keyframes pxTilt { 0%,100%{transform:rotate(-4deg)} 50%{transform:rotate(4deg)} }
@keyframes pxHop { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-2px)} }
@keyframes pxBlink { 0%,100%{opacity:1} 50%{opacity:0.25} }
@keyframes pxSteam { 0%{transform:translateY(0);opacity:0.9} 100%{transform:translateY(-3px);opacity:0.15} }
.px-tilt { transform-origin: 24px 10px; animation: pxTilt 2.0s steps(4, end) infinite; }
.px-hop  { animation: pxHop 1.0s steps(2, end) infinite; }
.px-hop2 { animation: pxHop 1.0s steps(2, end) 0.25s infinite; }
.px-hop3 { animation: pxHop 1.0s steps(2, end) 0.5s infinite; }
.px-blink { animation: pxBlink 0.8s steps(2, end) infinite; }
.px-steam { animation: pxSteam 1.1s steps(3, end) infinite; }
@media (prefers-reduced-motion: reduce) {
  .px-tilt, .px-hop, .px-hop2, .px-hop3, .px-blink, .px-steam { animation: none !important; }
}
/* kit:end */

/* screen pixels per art pixel: --pxu icons and status marks, --pxu-sm small icons,
   --pxu-xs the smallest, --pxu-lg a chat's greeting; empty slots and boot stages --pxu-art (4px is whole at 100%, 125%, 150%, 200%) */
:root { --pxu: 1.5px; --pxu-sm: 1.25px; --pxu-xs: 1px; --pxu-lg: 3px; --pxu-art: 4px; --pxu-art-sm: 2px; }
@media (min-resolution: 1.2dppx) and (max-resolution: 1.3dppx) { :root { --pxu: 1.6px; --pxu-sm: 1.6px; --pxu-xs: .8px; --pxu-lg: 3.2px; --pxu-art-sm: 1.6px; } }
@media (min-resolution: 1.45dppx) and (max-resolution: 1.55dppx) { :root { --pxu: 1.3333px; --pxu-sm: 1.3333px; --pxu-xs: .6667px; --pxu-lg: 2.6667px; } }
@media (min-resolution: 1.9dppx) { :root { --pxu: 1.5px; --pxu-sm: 1.5px; --pxu-xs: 1px; --pxu-lg: 3px; } }

.px { display: inline-flex; flex: none; line-height: 0; vertical-align: middle; --u: var(--pxu); --pw: 16; --ph: 16; }
.px-ic { --pw: 16; --ph: 16; }
.px-emo { --pw: 12; --ph: 12; }
.px-slot { --pw: 26; --ph: 16; --u: var(--pxu-art); }
.px-chat { --pw: 22; --ph: 15; --u: var(--pxu-art); }
.px-boot { --pw: 48; --ph: 23; --u: var(--pxu-art); }
span.px > svg.px-l, span.px > svg.px-d { display: block; width: calc(var(--pw) * var(--u)); height: calc(var(--ph) * var(--u)); shape-rendering: crispEdges; }
span.px > svg.px-d, g.px > svg.px-d { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) span.px > svg.px-l, :root:not([data-theme="light"]) g.px > svg.px-l { display: none; }
  :root:not([data-theme="light"]) span.px > svg.px-d, :root:not([data-theme="light"]) g.px > svg.px-d { display: block; }
}
:root[data-theme="dark"] span.px > svg.px-l, :root[data-theme="dark"] g.px > svg.px-l { display: none; }
:root[data-theme="dark"] span.px > svg.px-d, :root[data-theme="dark"] g.px > svg.px-d { display: block; }
.px-still * { animation: none !important; }

/* the agents: the pixel icon stands in the glyph's place, with no circle of its own */
.glyph.glyph-px { background: none; width: auto; height: auto; border-radius: 0; }
.glyph.glyph-px.sm .px { --u: var(--pxu-sm); }
.hello .glyph.glyph-px .px { --u: var(--pxu-lg); }
.p4-agent > .glyph.glyph-px .px { --u: 4px; }
.p4-agent-h .glyph.glyph-px.sm .px, .p4-convs .glyph.glyph-px.sm .px { --u: var(--pxu-xs); }
/* the Mind keeps the Demo mark */
.glyph.glyph-logo { background: none; overflow: hidden; }
.glyph.glyph-logo svg { width: 100%; height: 100%; display: block; }

/* status marks beside their words */
.checked > .px { margin-left: -2px; }
.unver > .px { margin-right: 4px; vertical-align: -3px; }
.tr-badge > .px { margin-right: 4px; vertical-align: -3px; }
.dock-line > .px { margin-right: -2px; }
.frame .msg .ask-state > .px { margin: -2px 0; }

/* an empty slot: the art, then its words */
.px-empty { display: flex; align-items: center; gap: var(--s4); padding: var(--s4) 0; color: var(--ink-3); font-size: var(--t-ui); }
.px-empty .px { opacity: .9; }
.px-empty-t { display: grid; gap: 2px; min-width: 0; }
.px-empty-t b { color: var(--ink); font-weight: 600; font-size: var(--t-ui); }
.pane .px-empty { padding: var(--s2) 0; gap: var(--s3); font-size: var(--t-meta); }
.pane .px-empty .px-slot { --u: var(--pxu-art-sm); }
.hello .px-chat { margin-bottom: var(--s5); }

/* a boot stage: the art over its words */
.px-boot-stage { display: grid; justify-items: center; gap: var(--s3); text-align: center; }
.px-boot-stage p { margin: 0; display: grid; gap: 2px; color: var(--ink-3); font-size: var(--t-ui); }
.px-boot-stage p b { color: var(--ink); font-weight: 600; }

/* Mind design system: the Sharp Modern set (design/pixel-kit/modern-preview.html, Nov 20 2026),
   the second visual style a person can pick in Settings. Drawn by web/style/modern-art.ts
   through the router (web/style/visual-pack.ts), in the same slots as the pixel art: a piece
   of this set carries the class px-mod beside px, and keeps px.css's light and dark switch.
   Its own keyframes sit between the markers; MODERN_ART_CSS reads them for the desktop app. */
/* kit:start */
@keyframes modDash { 0%{stroke-dashoffset:60} 100%{stroke-dashoffset:0} }
@keyframes modPulse { 0%,100%{opacity:0.35;transform:scale(0.92)} 50%{opacity:1;transform:scale(1.06)} }
@keyframes modTilt { 0%,100%{transform:rotate(-4.5deg)} 50%{transform:rotate(3.5deg)} }
@keyframes modFloat { 0%,100%{transform:translateY(0px)} 50%{transform:translateY(-3.5px)} }
@keyframes modFill { 0%{transform:scaleY(0.15)} 65%,90%{transform:scaleY(1)} 100%{transform:scaleY(0.15)} }
@keyframes modSteam { 0%{transform:translateY(2px);opacity:0} 45%{opacity:0.7} 100%{transform:translateY(-5px);opacity:0} }
@keyframes modDot { 0%,80%,100%{transform:translateY(0);opacity:0.35} 40%{transform:translateY(-2.5px);opacity:1} }
.mod-dash { stroke-dasharray: 12 48; animation: modDash 1.6s linear infinite; }
.mod-dash2 { stroke-dasharray: 12 48; animation: modDash 1.6s linear 0.55s infinite; }
.mod-pulse { transform-box: fill-box; transform-origin: center; animation: modPulse 1.8s ease-in-out infinite; }
.mod-tilt { transform-origin: 110px 38px; animation: modTilt 3.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite; }
.mod-float { animation: modFloat 2.6s ease-in-out infinite; }
.mod-fill { transform-origin: 110px 79px; animation: modFill 3.2s ease-in-out infinite; }
.mod-steam1 { animation: modSteam 2.0s ease-in-out infinite; }
.mod-steam2 { animation: modSteam 2.0s ease-in-out 0.6s infinite; }
.mod-dot1 { animation: modDot 1.2s ease-in-out infinite; }
.mod-dot2 { animation: modDot 1.2s ease-in-out 0.2s infinite; }
.mod-dot3 { animation: modDot 1.2s ease-in-out 0.4s infinite; }
@media (prefers-reduced-motion: reduce) {
  .mod-dash, .mod-dash2, .mod-pulse, .mod-tilt, .mod-float, .mod-fill,
  .mod-steam1, .mod-steam2, .mod-dot1, .mod-dot2, .mod-dot3 { animation: none !important; }
}
/* kit:end */
/* the same slots as the pixel art, drawn smooth: the width follows pixel.css, the height its own shape */
span.px.px-mod > svg.px-l, span.px.px-mod > svg.px-d { shape-rendering: auto; }
span.px.px-mod.px-slot > svg.px-l, span.px.px-mod.px-slot > svg.px-d,
span.px.px-mod.px-chat > svg.px-l, span.px.px-mod.px-chat > svg.px-d,
span.px.px-mod.px-boot > svg.px-l, span.px.px-mod.px-boot > svg.px-d { height: auto; }

/* UX fixes, area 5 (Nov 20): Subscriptions, Promises, record pages, team pages and runs.
   Still look: tokens only (tokens.css), flat, one hairline. Secondary text at --t-meta, never
   smaller than the label size, and at ink-2 where it carries meaning. */

/* ---------------------------------------------------------------- Subscriptions */
.a5-asof { margin: 0 0 var(--s2); font-size: var(--t-ui); color: var(--ink-2); line-height: 1.5; max-width: 72ch; }
.a5-asof b { color: var(--ink); font-weight: 600; }
.a5-basis { margin: var(--s2) 0 0; font-size: var(--t-meta); color: var(--ink-2); line-height: 1.5; max-width: 72ch; }
.a5-fgroup { margin: var(--s3) 0 var(--s4); }
.frame .page .a5-fgroup h3 { margin: 0 0 6px; font-size: var(--t-ui); font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
table.a5-flags { width: 100%; border-collapse: collapse; font-size: var(--t-ui); }
.a5-flags th { text-align: left; font-size: var(--t-meta); font-weight: 500; color: var(--ink-2); padding: 0 var(--s2) 6px 0; border-bottom: 1px solid var(--line); }
.a5-flags td { padding: 9px var(--s2) 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.45; }
.a5-flags .a { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.a5-flags td.a small { display: block; font-size: var(--t-meta); color: var(--ink-3); }
.a5-flags td.v { width: 26%; }
.a5-flags td.v a { font-weight: 600; color: var(--ink); }
.a5-flags tr.is-after_cancel td.v a { color: var(--bad); }
.a5-inferred { display: block; font-size: var(--t-meta); color: var(--ink-2); font-style: italic; }
.sub-chip.a5-inferred { display: inline-flex; font-style: italic; }
details.a5-why { margin-top: 2px; }
details.a5-why summary { cursor: pointer; font-size: var(--t-meta); color: var(--ink-2); list-style: none; }
details.a5-why summary::-webkit-details-marker { display: none; }
details.a5-why summary::before { content: "+ "; color: var(--ink-3); }
details.a5-why[open] summary::before { content: "- "; }
details.a5-why p { margin: 4px 0 0; font-size: var(--t-meta); color: var(--ink-2); max-width: 64ch; }
.a5-state { display: flex; flex-wrap: wrap; align-items: center; gap: 6px var(--s3); padding: var(--s2) var(--s3); border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--bg); margin-bottom: var(--s2); }
.a5-state b { font-weight: 600; font-size: var(--t-ui); }
.a5-state small { font-size: var(--t-meta); color: var(--ink-2); }
.a5-cancelled label { font-size: var(--t-meta); color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.a5-cancelled input[type=date] { font: inherit; font-size: var(--t-meta); padding: 2px 6px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--bg); color: var(--ink); }
.sub-chip.is-cancelled { background: var(--fill); color: var(--ink-2); }

/* ---------------------------------------------------------------- Promises */
.pr-page { max-width: 860px; }
.pr-note { color: var(--ink-2); font-size: var(--t-meta); line-height: 1.5; margin: 2px 0 18px; max-width: 72ch; }
.pr-sum { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 22px; }
.pr-sum div { background: var(--canvas); box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--r-md); padding: 10px 14px; min-width: 140px; }
.pr-sum b { display: block; font-size: 22px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.pr-sum span { color: var(--ink-2); font-size: var(--t-meta); }
.pr-h { display: flex; align-items: baseline; gap: 8px; margin: 26px 0 8px; font-size: 15px; font-weight: 600; color: var(--ink); }
.pr-h .n { color: var(--ink-3); font-weight: 400; font-size: var(--t-meta); }
.pr-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.pr-item { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; }
.pr-item > *:not(.pr-subj):not(.pr-when) { grid-column: 1 / -1; }
.pr-subj { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.pr-subj b { font-weight: 600; color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }
.pr-when { text-align: right; font-size: var(--t-meta); white-space: nowrap; }
.pr-when .due { color: var(--ink); font-weight: 600; }
.pr-when .late { color: var(--bad); font-weight: 600; }
.pr-who { font-size: var(--t-ui); color: var(--ink); }
.pr-who a { color: inherit; }
.pr-ways { font-size: var(--t-meta); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.pr-next { font-size: var(--t-ui); color: var(--ink); }
.pr-next .lab, .pr-quote .lab { font-size: var(--t-label); font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; margin-right: 4px; }
.pr-item.is-verify .pr-next { color: var(--signal-text); }
.pr-back { font-size: var(--t-meta); color: var(--ink-2); padding: 4px 8px; border-radius: var(--r-sm); background: var(--fill); justify-self: start; }
.pr-quote { margin: 2px 0 0; padding: 2px 0 2px 10px; border-left: 2px solid var(--line-2); color: var(--ink-2); font-size: var(--t-ui); line-height: 1.5; overflow-wrap: anywhere; }
.pr-quote b { color: var(--ink); font-weight: 600; }
.pr-duephrase { font-size: var(--t-meta); color: var(--ink-2); }
.pr-verify { font-size: var(--t-meta); color: var(--signal-text); }
.pr-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--ink-2); font-size: var(--t-meta); align-items: center; }
.pr-meta a { color: var(--ink-2); }
.pr-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.pr-acts form { display: inline-flex; gap: 4px; align-items: center; margin: 0; }
.pr-acts button, .pr-snooze > summary, .pr-flash button { font: inherit; font-size: var(--t-meta); padding: 3px 10px; border-radius: var(--r-full); border: 0; box-shadow: inset 0 0 0 1px var(--line-2); background: transparent; color: var(--ink-2); cursor: pointer; }
.pr-acts button:hover, .pr-snooze > summary:hover { background: var(--hover); color: var(--ink); }
.pr-acts button.is-done { box-shadow: inset 0 0 0 1px var(--good); color: var(--good); }
.pr-acts button.is-noreply { box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); }
.pr-acts button.is-notpromise { box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); font-style: italic; }
.pr-acts button small { color: var(--ink-3); margin-left: 4px; }
.pr-snooze { position: relative; }
.pr-snooze > summary { list-style: none; display: inline-block; }
.pr-snooze > summary::-webkit-details-marker { display: none; }
.pr-snooze-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.pr-pick label { font-size: var(--t-meta); color: var(--ink-2); display: inline-flex; align-items: center; gap: 4px; }
.pr-acts input[type=date] { font: inherit; font-size: var(--t-meta); padding: 1px 4px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: transparent; color: var(--ink-2); }
.pr-state { font-size: var(--t-label); font-weight: 600; padding: 2px 8px; border-radius: var(--r-full); background: var(--fill); color: var(--ink-2); }
.pr-state.is-done { background: var(--good-soft); color: var(--good); }
.pr-state.is-no_reply { background: var(--fill); color: var(--ink-2); }
.pr-state.is-not_promise { background: var(--fill); color: var(--ink-3); font-style: italic; }
.pr-state.is-snoozed { background: var(--signal-soft); color: var(--signal-text); }
.pr-state small { font-weight: 400; }
.pr-flash { display: flex; align-items: center; gap: var(--s3); padding: 8px 12px; margin: 0 0 var(--s3); border-radius: var(--r-md); background: var(--well); font-size: var(--t-ui); color: var(--ink); }
.pr-flash form { margin: 0; }
.pr-empty { color: var(--ink-2); padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; font-size: var(--t-ui); }
.pr-tag { font-size: var(--t-label); padding: 1px 7px; border-radius: var(--r-full); background: var(--muted); color: var(--ink-2); }
details.pr-fold { margin-top: 26px; }
details.pr-fold summary { cursor: pointer; color: var(--ink-2); font-size: var(--t-ui); }

/* ---------------------------------------------------------------- record pages */
.rh { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: var(--s3) 0 var(--s2); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--line); overflow: hidden; }
.rh-cell { background: var(--bg); padding: 10px 12px; display: grid; gap: 3px; min-width: 0; }
.rh-cell .lab { font-size: var(--t-label); font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; }
.rh-cell .val { font-size: var(--t-ui); color: var(--ink); overflow-wrap: anywhere; line-height: 1.4; }
.rh-cell .val small { display: block; font-size: var(--t-meta); color: var(--ink-2); }
.rh-cell .none { color: var(--ink-2); }
.rh-cell .late { color: var(--bad); }
.rh-rel { display: flex; flex-wrap: wrap; gap: 4px var(--s4); margin: 0 0 var(--s3); font-size: var(--t-meta); color: var(--ink-2); }
.rh-rel a { color: var(--ink); }
.rh-rel small { color: var(--ink-3); }
@media (max-width: 720px) { .rh { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* the summary: an edit per part, the version history, chips that say what they open */
.sm-line .sm-k { display: flex; align-items: center; gap: 8px; }
.sm-edit1 > summary { list-style: none; cursor: pointer; font-size: var(--t-label); font-weight: 500; color: var(--ink-2); text-transform: none; letter-spacing: 0; padding: 0 6px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--bg); }
.sm-edit1 > summary::-webkit-details-marker { display: none; }
.sm-edit1 > summary:hover { color: var(--ink); background: var(--hover); }
.sm-edit1[open] { flex-basis: 100%; text-transform: none; letter-spacing: 0; font-weight: 400; }
.sm-line .sm-k:has(.sm-edit1[open]) { flex-wrap: wrap; }
.sm-edit1 form { margin: var(--s2) 0; display: grid; gap: var(--s2); }
.sm-line.is-empty p { color: var(--ink-2); }
.sm-refs a { position: relative; }
.sm-refs a[data-tip]:hover::after, .sm-refs a[data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 4px); z-index: 5; white-space: nowrap; padding: 4px 8px; border-radius: var(--r-sm); background: var(--ink); color: var(--on-ink); font-size: var(--t-meta); box-shadow: var(--shadow-sm); }
.sm-add, .sm-history { margin-top: var(--s3); }
.sm-add > summary, .sm-history > summary { cursor: pointer; font-size: var(--t-meta); color: var(--ink-2); }
.sm-history .n { color: var(--ink-3); }
.sm-vlist { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; gap: var(--s2); }
.sm-v { padding: var(--s2) 0; border-top: 1px solid var(--line); }
.sm-v-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--s2); font-size: var(--t-meta); color: var(--ink-2); }
.sm-v-h b { color: var(--ink); font-weight: 600; }
.sm-vundo { margin: 0 0 0 auto; }
.sm-v-parts { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.sm-v-parts li { font-size: var(--t-meta); }
.sm-v-parts p { margin: 0; color: var(--ink-2); }
.sm-v-parts form { margin: 2px 0 0; }

/* ---------------------------------------------------------------- team pages */
.a5-lead { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: var(--s4) 0 4px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--line); overflow: hidden; }
.a5-cell { background: var(--bg); padding: 12px 14px; display: grid; gap: 4px; min-width: 0; }
.a5-cell .lab { font-size: var(--t-label); font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; }
.a5-cell .val { font-size: var(--t-ui); color: var(--ink); line-height: 1.4; }
.a5-cell .val small { display: block; font-size: var(--t-meta); color: var(--ink-2); }
.a5-cell.is-act .val a { color: var(--bad); font-weight: 600; }
.a5-clock { margin: 0 0 var(--s4); font-size: var(--t-meta); color: var(--ink-2); }
.a5-auth { display: inline-flex; padding: 1px 8px; border-radius: var(--r-full); font-size: var(--t-label); font-weight: 600; background: var(--fill); color: var(--ink-2); white-space: nowrap; }
.a5-auth.is-prepares { background: var(--signal-soft); color: var(--signal-text); }
.a5-auth.is-acts { background: var(--good-soft); color: var(--good); }
.a5-swl { display: block; font-size: var(--t-label); color: var(--ink-2); margin-top: 2px; text-align: center; }
@media (max-width: 720px) { .a5-lead { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- runs */
.a5-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: var(--s3) 0; }
.a5-tabs a { padding: 4px 10px; border-radius: var(--r-full); font-size: var(--t-meta); color: var(--ink-2); text-decoration: none; box-shadow: inset 0 0 0 1px var(--line-2); }
.a5-tabs a span { color: var(--ink-3); margin-left: 4px; font-variant-numeric: tabular-nums; }
.a5-tabs a[aria-current] { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.a5-tabs a[aria-current] span { color: var(--on-ink); }
.a5-filters { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: center; margin: 0 0 var(--s3); font-size: var(--t-meta); color: var(--ink-2); }
.a5-filters label { display: inline-flex; gap: 6px; align-items: center; }
.a5-filters select, .a5-filters input { font: inherit; font-size: var(--t-meta); padding: 2px 6px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--bg); color: var(--ink); }
.a5-runtable small { font-size: var(--t-meta); }
.a5-out { font-size: var(--t-label); font-weight: 600; padding: 1px 8px; border-radius: var(--r-full); background: var(--fill); color: var(--ink-2); white-space: nowrap; }
.a5-out.is-failed { background: var(--bad-soft); color: var(--bad); }
.a5-out.is-needs { background: var(--signal-soft); color: var(--signal-text); }
.a5-out.is-answered, .a5-out.is-did { background: var(--good-soft); color: var(--good); }
.a5-out.is-running { background: var(--signal-soft); color: var(--signal-ink); }
.a5-pager { display: flex; gap: var(--s3); align-items: center; margin: var(--s3) 0; font-size: var(--t-meta); color: var(--ink-2); }
.a5-count { font-size: var(--t-meta); }
.a5-weeks { margin-top: var(--s4); }
.a5-weeks > summary { cursor: pointer; font-size: var(--t-ui); color: var(--ink-2); }
dl.a5-runsum { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px var(--s4); margin: var(--s3) 0 var(--s4); padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--well); font-size: var(--t-ui); }
dl.a5-runsum dt { color: var(--ink-3); font-weight: 600; font-size: var(--t-meta); }
dl.a5-runsum dd { margin: 0; color: var(--ink); }
dl.a5-runsum dd small { color: var(--ink-2); }
.msg .by .run-link { font-size: var(--t-meta); color: var(--ink-2); }

/* Area 6 of the Nov 20 UX fixes: tax and year end, Settings and Rules, receipts, the desktop
   quick ask. Same tokens as the rest; no new colours. Body text at --t-ui or larger. */

/* ---- receipts: one way in, a real drop target */
.a6-drop { display: grid; gap: var(--s2); margin: 0 0 var(--s3); }
.a6-drop-zone { position: relative; display: grid; gap: 2px; padding: var(--s4); border: 1.5px dashed var(--line-2); border-radius: var(--r-md); background: var(--bg); cursor: pointer; font-size: var(--t-ui); color: var(--ink-2); text-align: center; }
.a6-drop-zone b { color: var(--ink); font-size: var(--t-ui); }
.a6-drop-zone u { color: var(--ink); }
.a6-drop-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.a6-drop-zone:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.a6-drop.is-over .a6-drop-zone { border-color: var(--ink); background: var(--fill); }
.a6-drop.has-file .a6-drop-zone { border-style: solid; border-color: var(--good); }
.a6-drop-name { color: var(--ink); font-weight: 600; min-height: 1em; }
.a6-drop-help { margin: 0; font-size: var(--t-meta); color: var(--ink-2); }
.a6-drop button { justify-self: start; }
.a6-drop-quiet .a6-drop-zone { background: transparent; }
.a6-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--s4); margin: var(--s4) 0; }
.a6-receipts .a6-lead { color: var(--ink-2); }
.a6-sec { margin: var(--s5) 0; }
.a6-sec h2 { font-size: var(--t-title); margin: 0 0 var(--s3); }
.a6-recs, .a6-misses { list-style: none; padding: 0; margin: 0; }
.a6-rec, .a6-miss { padding: var(--s3) 0; border-bottom: 1px solid var(--line); font-size: var(--t-ui); }
.a6-rec-h, .a6-miss-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2); }
.a6-rec-s { margin-top: 4px; }
.a6-sub { font-size: var(--t-meta); color: var(--ink-2); margin-top: 2px; }
.a6-miss .a6-drop { margin-top: var(--s2); max-width: 420px; }
.a6-attach { margin: var(--s4) 0; padding: var(--s4); border: 1px solid var(--line-2); border-radius: var(--r-md); }
.a6-attach h2 { margin: 0 0 var(--s1); font-size: var(--t-title); }
.a6-attach p { margin: 0 0 var(--s3); color: var(--ink-2); font-size: var(--t-ui); }
.a6-done { max-width: var(--read-w); margin: var(--s7) auto; padding: 0 var(--s4); font-size: var(--t-ui); }

/* a state a person can act on: done (good), needs you (signal), in progress (plain), failed (bad) */
.a6-state { display: inline-block; padding: 1px 8px; border-radius: var(--r-full); font-size: var(--t-meta); font-weight: 600; background: var(--fill); color: var(--ink-2); white-space: nowrap; }
.a6-state.is-ok { background: var(--good-soft); color: var(--good); }
.a6-state.is-act { background: var(--signal-soft); color: var(--signal-ink); }
.a6-state.is-bad { background: var(--bad-soft); color: var(--bad); }

/* ---- tax and year end */
.a6-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s3); margin: 0 0 var(--s5); }
.a6-tile { display: grid; gap: 4px; padding: var(--s4); border: 1px solid var(--line-2); border-radius: var(--r-md); color: var(--ink); text-decoration: none; background: var(--bg); }
.a6-tile:hover { background: var(--hover); }
.a6-tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.a6-tile .lab { font-size: var(--t-meta); color: var(--ink-2); font-weight: 600; }
.a6-tile .big { font-size: var(--t-title); font-weight: 600; }
.a6-tile .foot { font-size: var(--t-meta); color: var(--ink-2); }
.a6-strip { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s4); padding: var(--s3); border-radius: var(--r-md); background: var(--well); font-size: var(--t-ui); align-items: center; }
.a6-strip b { margin-right: var(--s1); }
.a6-draft { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin: 0 0 var(--s4); font-size: var(--t-ui); }
.a6-contents { columns: 2; margin: 0 0 var(--s5); padding-left: var(--s5); font-size: var(--t-ui); }
.a6-next { padding: var(--s4); border: 1px solid var(--line-2); border-radius: var(--r-md); margin: 0 0 var(--s5); }
.a6-next h2 { margin-top: 0 !important; }
.a6-later { list-style: none; padding: 0; margin: 0 0 var(--s4); font-size: var(--t-ui); }
.a6-later li { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.a6-blockers { margin: 4px 0 0; padding-left: var(--s4); font-size: var(--t-meta); color: var(--ink-2); }
.a6-balance { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s3); margin: 0 0 var(--s3); }
.a6-balance div { padding: var(--s3); border-radius: var(--r-md); background: var(--well); }
.a6-balance .lab { font-size: var(--t-meta); color: var(--ink-2); }
.a6-balance .v { font-size: var(--t-title); font-weight: 600; font-variant-numeric: tabular-nums; }
.a6-find { margin: 0 0 var(--s2); padding: 6px 10px; border: 1px solid var(--line-2); border-radius: var(--r-md); font: inherit; font-size: var(--t-ui); width: min(100%, 320px); background: var(--bg); color: var(--ink); }
.a6-group { margin: var(--s5) 0; }
.a6-group > h2 { border-bottom: 1px solid var(--line); padding-bottom: var(--s2); }
.a6-effect { font-size: var(--t-meta); color: var(--ink-2); }
.a6-effect.is-books { color: var(--signal-ink); font-weight: 600; }
.a6-basis summary { cursor: pointer; font-size: var(--t-meta); color: var(--ink-2); }
.a6-basis p { margin: 4px 0 0; font-size: var(--t-meta); color: var(--ink-2); }
.a6-guess { display: inline-block; margin-left: var(--s1); padding: 0 6px; border-radius: var(--r-full); background: var(--signal-soft); color: var(--signal-ink); font-size: var(--t-meta); font-weight: 600; }

/* ---- Settings */
.a6-settings section { margin: 0 0 var(--s6); }
.a6-settings h2 { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); font-size: var(--t-title); border-bottom: 1px solid var(--line); padding-bottom: var(--s2); }
.a6-settings h2 a { font-size: var(--t-ui); font-weight: 400; }
.a6-conn { list-style: none; padding: 0; margin: 0; }
.a6-conn li { display: grid; grid-template-columns: minmax(120px, 180px) 1fr; gap: 2px var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--line); font-size: var(--t-ui); }
.a6-conn .what { font-weight: 600; display: flex; gap: var(--s2); align-items: baseline; }
.a6-conn .dot { width: 8px; height: 8px; border-radius: var(--r-full); background: var(--good); flex: none; transform: translateY(-1px); }
.a6-conn .is-warn .dot { background: var(--signal); }
.a6-conn .is-off .dot { background: var(--ink-4); }
.a6-conn .is-bad .dot { background: var(--bad); }
.a6-conn .todo { grid-column: 2; font-size: var(--t-meta); color: var(--ink-2); }
.a6-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px var(--s4); font-size: var(--t-ui); margin: 0 0 var(--s3); }
.a6-dl dt { color: var(--ink-2); }
.a6-dl dd { margin: 0; }
[data-desktop-shortcut-state][data-state="ok"] { color: var(--good); font-weight: 600; }
[data-desktop-shortcut-state][data-state="conflict"], [data-desktop-shortcut-state][data-state="bad"] { color: var(--bad); font-weight: 600; }
.a6-rebind { display: grid; gap: var(--s2); margin: var(--s3) 0; max-width: 520px; font-size: var(--t-ui); }
.a6-rebind input { padding: 6px 10px; border: 1px solid var(--line-2); border-radius: var(--r-md); font: inherit; background: var(--bg); color: var(--ink); }
.a6-rebind input:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.a6-rebind .row { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }

/* ---- Rules */
.a6-stages { display: flex; flex-wrap: wrap; gap: var(--s1); list-style: none; padding: 0; margin: 0 0 var(--s4); font-size: var(--t-ui); }
.a6-stages li { padding: 4px 12px; border-radius: var(--r-full); background: var(--fill); color: var(--ink-2); }
.a6-stages li.is-done { background: var(--good-soft); color: var(--good); }
.a6-stages li.is-now { background: var(--signal-soft); color: var(--signal-ink); font-weight: 600; }
.a6-count { position: sticky; top: 0; z-index: 1; display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; padding: var(--s2) var(--s3); margin: 0 0 var(--s3); border-radius: var(--r-md); background: var(--well); font-size: var(--t-ui); }
.a6-count .bar { flex: 1 1 160px; height: 6px; border-radius: var(--r-full); background: var(--fill); overflow: hidden; }
.a6-count .bar i { display: block; height: 100%; background: var(--good); }
.a6-count.is-over .bar i { background: var(--signal); }
.a6-count.is-over b { color: var(--signal-ink); }
.p4-field.is-clipped textarea { border-color: var(--signal); background: var(--signal-soft); }
.p4-field .a6-clip { display: none; font-size: var(--t-meta); color: var(--signal-ink); font-weight: 600; }
.p4-field.is-clipped .a6-clip { display: block; }
.a6-actions { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin-top: var(--s3); }
.a6-actions p { flex-basis: 100%; margin: 0; font-size: var(--t-meta); color: var(--ink-2); }
.a6-diff { font-size: var(--t-ui); }
.a6-diff dt { font-weight: 600; margin-top: var(--s3); }
.a6-diff dd { margin: 4px 0 0; display: grid; gap: 4px; }
.a6-diff del { background: var(--bad-soft); color: var(--ink); text-decoration: line-through; padding: 2px 4px; border-radius: var(--r-sm); white-space: pre-wrap; }
.a6-diff ins { background: var(--good-soft); color: var(--ink); text-decoration: none; padding: 2px 4px; border-radius: var(--r-sm); white-space: pre-wrap; }

/* Tax and year end, round 2 (UX review 2, R2-07): where a deliverable stands. One strip per
   page from the one readiness function: the state, four conditions (a failed one reads as a
   blocker), and three dates kept apart (period end, report cutoff, most recent posted item). */
.tx2-ready { margin: 0 0 var(--s4); padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--well); font-size: var(--t-ui); display: grid; gap: var(--s2); }
.tx2-head { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.tx2-state { font-size: var(--t-title); margin-right: var(--s1); }
.tx2-ready.is-projected .tx2-state, .tx2-ready.is-draft .tx2-state { color: var(--signal-ink); }
.tx2-ready.is-ready .tx2-state { color: var(--good); }
.tx2-conds { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.tx2-conds li { display: flex; gap: var(--s2); align-items: baseline; min-width: 0; }
.tx2-conds li > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.tx2-conds .mark { width: 18px; height: 18px; flex: none; display: inline-grid; place-items: center; border-radius: var(--r-full); font-size: 12px; font-weight: 700; }
.tx2-conds li.ok .mark { background: var(--good-soft); color: var(--good); }
.tx2-conds li.no .mark { background: var(--bad-soft); color: var(--bad); }
.tx2-conds li.no a { font-weight: 600; }
.tx2-dates { list-style: none; padding: var(--s2) 0 0; margin: 0; border-top: 1px solid var(--line-2); display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); color: var(--ink-2); font-size: var(--t-meta); }
.tx2-sum { font-size: var(--t-ui); }
.tx2-101.is-issue { color: var(--signal-ink); }
.tx2-gifi-note { max-width: var(--read-w); }
.tx2-out, .tx2-acct { font-size: var(--t-meta); }
@media (max-width: 640px) {
  .tx2-ready { padding: var(--s3); }
  .tx2-dates { flex-direction: column; }
}
@media print {
  .tx2-ready { background: none; border: 1px solid #999; }
}

/* Decisions, round 2 (Nov 20 2026, area 1): the treatment gate on a card, the owner's override,
   mail filing by counterparty with checked rows, Needs action now before Recovered, and the
   chat dock's decision line. Still look: one accent where a person must act. */

/* the gate: "Resolve payment source" first, before anything else a person can do */
.d2-gate { margin: var(--s3) 0; padding: var(--s3); border: 1px solid var(--signal); border-radius: var(--r-md); background: var(--signal-soft); }
.d2-next { margin: 0 0 var(--s2); font-size: var(--t-ui); color: var(--ink); max-width: 70ch; }
.d2-first { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.d2-resolve { display: inline-flex; align-items: center; gap: var(--s2); padding: 6px 12px; border-radius: var(--r-sm); background: var(--ink); color: var(--on-ink); font: inherit; font-size: var(--t-ui); font-weight: 600; text-decoration: none; border: 0; cursor: pointer; }
.frame .page .d2-gate .d2-resolve, .frame .page .d2-gate .d2-resolve:visited { color: var(--on-ink); background: var(--ink); text-decoration: none; }
.d2-resolve:hover { opacity: .9; }
.d2-resolve:focus-visible, .d2-link:focus-visible, .d2-override summary:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.d2-resolve .key { background: transparent; color: inherit; border-color: currentColor; }
.d2-link { font-size: var(--t-ui); color: var(--ink); }
.d2-hint { font-size: var(--t-ui); color: var(--ink-2); margin: var(--s2) 0 0; max-width: 70ch; }

/* the owner's override: its own path, folded, clearly labelled, a reason and a check */
.d2-override { margin-top: var(--s3); font-size: var(--t-ui); }
.d2-override > summary { cursor: pointer; color: var(--ink-2); }
.d2-override[open] > summary { color: var(--ink); font-weight: 600; }
.d2-override-form { display: grid; gap: var(--s2); margin-top: var(--s2); max-width: 60ch; }
.d2-override-form textarea { font: inherit; font-size: var(--t-ui); width: 100%; box-sizing: border-box; }
.d2-check { display: flex; gap: var(--s2); align-items: flex-start; }
.d2-override-go { justify-self: start; background: var(--bg); color: var(--signal-ink); border: 1px solid var(--signal); border-radius: var(--r-sm); padding: 6px 12px; font: inherit; font-size: var(--t-ui); cursor: pointer; }
.d2-blocked { margin: var(--s2) 0 0; font-size: var(--t-ui); color: var(--ink); }
.d2-blocked b { color: var(--signal-ink); }

/* Needs action now, then Recovered to acknowledge */
.frame .page .d2-sub-h { margin: var(--s4) 0 var(--s2); font-size: var(--t-ui); font-weight: 600; color: var(--ink-2); display: flex; gap: var(--s2); align-items: center; }
.d2-recovered { margin-top: var(--s5); }
.d2-recovered .tr-incident { opacity: 1; }

/* mail filing: checked rows, the outside party, a preview, item-by-item status */
.d2-file { margin: var(--s2) 0 var(--s3); }
.d2-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.d2-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s3); align-items: start; padding: var(--s2) 0; border-top: 1px solid var(--line); font-size: var(--t-ui); }
.d2-row label { display: contents; }
.d2-row .d2-subj { min-width: 0; overflow-wrap: anywhere; }
.d2-row .d2-subj small { display: block; color: var(--ink-2); font-size: var(--t-ui); }
.d2-party { color: var(--ink); font-size: var(--t-ui); white-space: nowrap; }
.d2-party.is-mixed { color: var(--signal-ink); }
.d2-file-go { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; margin-top: var(--s2); }
.d2-preview { margin: var(--s3) 0; padding: var(--s3); border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--well); font-size: var(--t-ui); }
.d2-preview ul { margin: var(--s2) 0; padding-left: var(--s4); }
.d2-status { list-style: none; margin: 0 0 var(--s4); padding: var(--s3); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--well); font-size: var(--t-ui); }
.d2-status li { padding: 2px 0; }
.d2-status .is-ok::before { content: "Filed · "; color: var(--good); font-weight: 600; }
.d2-status .is-off::before { content: "Not filed · "; color: var(--signal-ink); font-weight: 600; }
.d2-status .is-left::before { content: "Left unfiled · "; color: var(--ink-2); font-weight: 600; }
.d2-mixed { font-size: var(--t-ui); color: var(--ink-2); margin: var(--s2) 0; }

@media (max-width: 720px) {
  .d2-row { grid-template-columns: auto minmax(0, 1fr); }
  .d2-party { grid-column: 2; white-space: normal; }
}

/* UX round 2, area 2: Projections and Pulse (R2-03, R2-10, Nov 20 2026). Loaded after visual.css. */

/* ================================================================ Projections: the three inputs
   One grid per row: label, the exact field with a fixed slot for its unit before and after,
   the slider, its bounds, a refusal line and a foot line. The three rows line up. */
.p3-sliders { align-items: start; }
.p2-in { display: grid; grid-template-rows: auto auto auto auto auto auto; gap: 6px; }
.p2-in > .k { font-size: var(--t-ui); color: var(--ink-2); line-height: 1.3; min-height: 1.3em; }
.p2-exact { display: grid; grid-template-columns: 14px minmax(0, 1fr) 14px; align-items: center; gap: 4px; max-width: 200px; }
.p2-exact .u { font-size: 14px; color: var(--ink-2); text-align: center; }
.p2-exact input { width: 100%; height: 34px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--bg); color: var(--ink); font: inherit; font-size: 15px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.p2-exact input:focus-visible { outline: 2px solid var(--focus, var(--ink)); outline-offset: 1px; }
.p2-exact input[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
.p2-in .p2-err { font-size: var(--t-meta); color: var(--bad); line-height: 1.35; }
.p2-in .p2-err:empty { display: none; }
.p2-in .foot { font-size: var(--t-meta); color: var(--ink-3); line-height: 1.4; }
.p2-in [data-billed] { color: var(--ink-2); font-weight: 500; }
.p2-rule { margin: var(--s3) 0 0; font-size: var(--t-meta); color: var(--ink-3); }
.p2-refused { margin: 0 0 var(--s3); padding: 10px 14px; border-radius: var(--r-md); background: var(--bad-soft); color: var(--bad); font-size: var(--t-ui); }

/* ================================================================ Projections: the side pane
   Nothing runs past the pane's edge: the ask box sits in the flow (not stuck over its own
   heading), and the conversation picker fits the pane. */
.frame .pane .p3-pane .pane-sec { min-width: 0; }
.frame .pane .page-chat { margin: var(--s2) 0 0; padding-top: 0; border-top: 0; }
.frame .pane .page-chat form.ask { position: static; padding: 0; }
.frame .pane .page-chat .pc-to label { display: flex; max-width: 100%; }
.frame .pane .page-chat .pc-to select { max-width: 100%; min-width: 0; flex: 1 1 auto; }
.frame .pane .page-chat .try { flex-wrap: wrap; }
.frame .pane .page-chat .try button { max-width: 100%; white-space: normal; height: auto; min-height: 32px; text-align: left; }
.page-chat .pc-note { margin: 0 0 var(--s3); padding: 8px 10px; border-radius: var(--r-md); background: var(--well); font-size: var(--t-meta); color: var(--ink-2); line-height: 1.45; }
.page-chat .pc-note b { color: var(--ink); font-weight: 600; }

/* a question asked from a scenario: where it came from, and the way back */
.msg .p2-origin { margin: 6px 0 0; font-size: var(--t-meta); color: var(--ink-3); }
.msg.me .p2-origin { text-align: right; }
.msg .p2-origin a { color: var(--ink-2); font-weight: 500; }

/* ================================================================ Pulse: the first fold */
.p2-open { display: block; margin-bottom: var(--s6); }
.p2-fold { margin-bottom: var(--s6); }
.p2-fold-h { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.frame .page .p2-fold-h h2 { margin: 0; font-size: var(--t-title); font-weight: 600; }
.p2-fold-h .when { font-size: var(--t-ui); color: var(--ink-2); }

.p2-lead { display: grid; gap: var(--s2); padding: var(--s4) var(--s5); border-radius: var(--r-lg, 12px); background: var(--well); box-shadow: inset 4px 0 0 var(--ink-4); }
.p2-lead.is-bad { background: var(--bad-soft); box-shadow: inset 4px 0 0 var(--bad); }
.p2-lead.is-need { background: var(--need-soft); box-shadow: inset 4px 0 0 var(--need-dot); }
.p2-lead > .k { font-size: var(--t-meta); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-2); }
.p2-lead.is-bad > .k { color: var(--bad); }
.p2-lead.is-need > .k { color: var(--need); }
.p2-lead-main { display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; }
.p2-lead-words { flex: 1 1 320px; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s3); }
.p2-lead-words b { font-size: 17px; font-weight: 600; color: var(--ink); }
.p2-lead-words .amt { font-size: 26px; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.p2-lead-words p { flex-basis: 100%; margin: 4px 0 0; font-size: 14px; color: var(--ink-2); max-width: 72ch; }
.frame .page a.p2-go, a.p2-go { flex: none; display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: var(--r-md); background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 600; text-decoration: none; }
.p2-go:hover { opacity: .9; }
.p2-go:focus-visible { outline: 2px solid var(--focus, var(--ink)); outline-offset: 2px; }
.p2-routine { justify-self: start; font-size: 14px; color: var(--ink-2); text-decoration: none; }
.p2-routine b { color: var(--ink); font-weight: 600; }
.p2-routine:hover b, .p2-routine:focus-visible b { text-decoration: underline; }

.p2-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); margin: var(--s4) 0 0; }
.p2-nums.is-off { display: block; }
.p2-num { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: var(--s3) var(--s4); border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; }
.p2-num:hover { background: var(--hover); }
.p2-num:focus-visible { outline: 2px solid var(--focus, var(--ink)); outline-offset: 1px; }
.p2-num .lab { font-size: var(--t-ui); color: var(--ink-2); }
.p2-num .val { font-size: 24px; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.p2-num .foot { font-size: var(--t-meta); color: var(--ink-3); line-height: 1.4; }
.p2-num.is-bad { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 45%, transparent); }

.p2-lines { list-style: none; margin: var(--s3) 0 0; padding: 0; }
.p2-lines li { border-top: 1px solid var(--line); font-size: 14px; }
.p2-lines li > a, .p2-lines li > span { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding: 9px 0 9px 16px; position: relative; color: var(--ink); text-decoration: none; }
.p2-lines li > a::before, .p2-lines li > span::before { content: ""; position: absolute; left: 0; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); }
.p2-lines li.is-need > a::before { background: var(--need-dot); }
.p2-lines li.is-bad > a::before { background: var(--bad); }
.p2-lines li .go { white-space: nowrap; font-weight: 600; }
.p2-lines li > a:hover { background: var(--hover); }
.p2-lines small.soft { font-size: 14px; }

/* what changed: the brief's own time beside the live one, the rest folded, one Sources list */
.p2-changed .po-cols { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.p2-asof { color: var(--ink-2); font-weight: 500; }
.p2-changed li.is-need { padding-left: 0; }
.p2-more, .p2-sources { margin-top: var(--s2); font-size: 14px; }
.p2-more summary, .p2-sources summary { cursor: pointer; color: var(--ink-2); font-weight: 500; }
.p2-sources .n { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--fill); font-size: var(--t-meta); text-align: center; }
.p2-sources ul { margin: var(--s2) 0 0; padding-left: 18px; columns: 2 220px; font-size: var(--t-ui); }

@media (max-width: 1100px) {
  .p2-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* the brief narrows: the rolling counts go under it */
@media (max-width: 1000px) {
  .p2-changed .po-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .p2-nums { grid-template-columns: minmax(0, 1fr); }
}

/* the icon rail of a narrow window (761 to 1100 px) lives in visual.css, loaded last, so its
   width is never overridden by the full rail's (Sam, Nov 24: "the rail looks like crap") */

/* ================================================================ Pulse: one screen, no scrolling
   Sam, Nov 20: "No scrolling there; just a very simple place to look for a pulse of the
   business." At desktop size the page is the window's height: the Needs you line and the figures
   take what they need, the charts share the rest and scale to fit. Below 900 px it stacks. */
@media (min-width: 901px) {
  .frame .page:has(> .page-col > .pulse-dash) { overflow: hidden; display: flex; flex-direction: column; padding-bottom: var(--s4); }
  .frame .page:has(> .page-col > .pulse-dash) > .page-col { flex: 1; min-height: 0; max-width: none; }
  .pulse-dash { height: 100%; }
}
.pulse-dash { display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: var(--s3); min-height: 0; }
.pd-needs { margin: 0; font-size: 14px; color: var(--ink-2); display: flex; gap: var(--s2); flex-wrap: wrap; align-items: baseline; }
.pd-needs b { font-weight: 600; color: var(--ink); }
.pd-needs.is-on b::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; border-radius: 50%; background: var(--need-dot); vertical-align: 1px; }
.pd-needs a { color: var(--ink); font-weight: 500; }

.pd-figs { --n: 8; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s3); }
.pd-fig { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 14px; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; container-type: inline-size; }
.pd-fig:hover { background: var(--hover); }
.pd-fig .lab { font-size: var(--t-ui); color: var(--ink-2); }
/* a money figure is never cut (Nov 24 2026: "We owe $13,449..." at 957 px): the server gives
   its length as --n, and the type gets smaller until the whole figure fits the tile's width */
.pd-fig .val { --fit: calc(100cqi / (var(--n, 8) * .62)); font-size: min(24px, var(--fit)); font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* the foot line wraps between words, never inside a figure ("Range $947 to $1,292") */
.pd-fig .foot { font-size: var(--t-meta); color: var(--ink-3); white-space: normal; }
.pd-fig .foot .off, .pd-fig .foot b.off { color: var(--bad); font-weight: 600; }
.pd-fig.is-bad { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 45%, transparent); }

.pd-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: var(--s3); min-height: 0; }
.pd-card { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; padding: 12px 14px 10px; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line); }
.pd-wide { grid-column: span 7; }
.pd-side { grid-column: span 5; }
.pd-third { grid-column: span 4; }
.no-books .pd-third { grid-column: span 6; }
.pd-h { display: flex; align-items: baseline; gap: var(--s2) var(--s3); flex-wrap: wrap; margin-bottom: 6px; }
.pd-h > a { color: var(--ink); text-decoration: none; }
.pd-h > a:hover h2 { text-decoration: underline; }
.frame .page .pd-h h2 { margin: 0; padding: 0; border: 0; font-size: 14px; font-weight: 600; display: inline; }
.pd-h small { font-size: var(--t-meta); color: var(--ink-3); }
.pd-legend { margin-left: auto; display: inline-flex; gap: 10px; align-items: center; font-size: var(--t-meta); color: var(--ink-3); }
.pd-legend span { display: inline-flex; align-items: center; gap: 4px; }
.pd-legend .k { display: inline-block; width: 14px; height: 0; border-top: 2px solid var(--c, var(--ink)); }
.pd-legend .k.dash { border-top-style: dashed; }
.pd-legend .k.floor { border-top: 2px dashed var(--signal); }
.pd-legend .k.in { height: 8px; border: 0; background: var(--c-in); border-radius: 2px; width: 10px; }
.pd-legend .k.out { height: 8px; border: 0; background: var(--c-out); border-radius: 2px; width: 10px; }
.pd-legend .off { color: var(--bad); font-weight: 600; }
.pd-viz { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pd-draw { flex: 1; min-height: 0; display: flex; }
.pd-viz svg { width: 100%; height: 100%; min-height: 0; }
.inout rect.in { fill: var(--c-in); }
.inout rect.out { fill: var(--c-out); }
.pd-viz .px-empty { padding: var(--s2) 0; gap: var(--s3); font-size: var(--t-meta); }
.pd-viz .px-empty .px-slot { --u: var(--pxu-art-sm); }
.pd-minis { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.pd-mini { display: flex; flex-direction: column; padding: 8px 10px; border-radius: var(--r-sm); background: var(--well); color: var(--ink); text-decoration: none; }
.pd-mini .lab { font-size: var(--t-meta); color: var(--ink-2); }
.pd-mini .v { font-size: 22px; font-weight: 500; font-variant-numeric: tabular-nums; }
.pd-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: var(--t-ui); }
.pd-list a { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.pd-list .off { color: var(--bad); white-space: nowrap; }
.pd-card .board-off { font-size: 14px; color: var(--ink-2); }

/* a short window: the figures lose their foot lines first */
@media (min-width: 901px) and (max-height: 760px) {
  .pd-fig { padding: 8px 12px; }
  .pd-fig .val { font-size: min(21px, var(--fit)); }
}
/* below about 900 px: one column, each chart its own height, and the page scrolls */
@media (max-width: 900px) {
  .pd-grid { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .pd-wide, .pd-side, .pd-third, .no-books .pd-third { grid-column: auto; }
  .pd-viz { height: 220px; flex: none; }
}

/* Round 2, area 4 (Nov 20 2026): Desktop settings, the agents form, the Rules budget and
   audit preview, Voice "Type instead" and the Door steps. Only s2- classes; nothing shared. */

/* Settings, Desktop: one list of what you have, what is offered and what to do */
.s2-dl dd { display: grid; gap: 4px; justify-items: start; }
.s2-row { display: flex; flex-wrap: wrap; gap: var(--s2); }
.s2-row [hidden] { display: none; }
.s2-state[data-state="ready"], .s2-state[data-state="conflict"], .s2-state[data-state="failed"], .s2-state[data-state="bad"] { color: var(--signal-text); font-weight: 600; }
.s2-state[data-state="ok"] { color: var(--good); font-weight: 600; }
.s2-supports { margin: 0 0 var(--s3); padding-left: 18px; font-size: var(--t-ui); display: grid; gap: 4px; }

/* Agents: by objective and team, three distinct columns, the summary before Save */
.s2-obj { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s3); margin: 0 0 var(--s3); }
.s2-obj > h3 { margin: 0 0 4px; font-size: var(--t-ui); }
.s2-obj > p { margin: 0 0 var(--s2); }
.s2-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.s2-cols > div { display: grid; gap: 4px; align-content: start; }
.s2-cols h4 { margin: 0 0 2px; font-size: var(--t-ui); color: var(--ink-2); }
.s2-who { margin: 0; padding-left: 18px; font-size: var(--t-ui); }
.s2-access { width: 100%; border-collapse: collapse; font-size: var(--t-ui); margin: 0 0 var(--s3); }
.s2-access th, .s2-access td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.s2-access .is-you td { font-weight: 600; }
.s2-summary { background: var(--well); border-radius: var(--r-md); padding: var(--s3); margin: 0 0 var(--s3); font-size: var(--t-ui); }
.s2-summary h2, .s2-summary h3 { margin: 0 0 var(--s2); }
.s2-summary dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px var(--s4); margin: 0; }
.s2-summary dt { color: var(--ink-2); }
.s2-summary dd { margin: 0; }
.s2-actions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }

/* Rules: what the agents get now, and what this draft would give them */
.s2-budget { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin: 0 0 var(--s2); font-size: var(--t-ui); }
.s2-budget b { font-variant-numeric: tabular-nums; }
.s2-audit { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s3); margin: var(--s3) 0; font-size: var(--t-ui); }
.s2-audit h3 { margin: 0 0 var(--s2); font-size: var(--t-ui); }
.s2-audit ul { margin: 0 0 var(--s2); padding-left: 18px; display: grid; gap: 4px; }

/* Voice and the Door */
.s2-type-instead { display: inline-flex; margin: 0 0 var(--s3); }
.s2-steps { margin: 0 0 var(--s3); padding-left: 0; list-style: none; display: grid; gap: var(--s2); font-size: var(--t-ui); }
.s2-steps b { display: block; }

@media (max-width: 720px) {
  .s2-cols { grid-template-columns: 1fr; }
  .s2-summary dl, .s2-dl { grid-template-columns: 1fr; }
  .s2-access { display: block; overflow-x: auto; }
}

/* Settings, Visual style: each choice with a sample of its art */
.s2-visual fieldset { border: 0; padding: 0; margin: 0 0 var(--s3); display: flex; flex-wrap: wrap; gap: var(--s3); }
.s2-visual legend { font-size: var(--t-ui); color: var(--ink-2); margin-bottom: var(--s2); padding: 0; }
.s2-pack { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: var(--s2); align-items: center; border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s3); min-width: 200px; cursor: pointer; }
.s2-pack:has(input:checked) { border-color: var(--ink); }
.s2-pack input { grid-row: span 2; }
.s2-pack-art { display: inline-flex; gap: var(--s2); align-items: center; }
.s2-pack b { font-size: var(--t-ui); }
/* Visual style: whether the choice was saved (Nov 24 2026, the three atmospheres) */
.s2-visual-note { margin: var(--s2) 0 0; font-size: var(--t-meta); color: var(--ink-2); }
.s2-visual-note.is-bad { color: var(--bad); }
.s2-pack { flex: 1 1 0; min-width: 200px; }
.s2-pack .cra-small { grid-column: 2 / 3; }
.s2-pack:has(input:focus-visible) { outline: 2px solid var(--focus-ring, var(--ink)); outline-offset: 2px; }
/* Visual style (Nov 24 review): the radios in the page's own ink, not the browser's blue; the
   style in use is marked, and "Use this style" shows only once another one is picked (where the
   browser cannot tell, the button stays, so nothing is ever out of reach) */
.s2-pack input[type="radio"] { accent-color: var(--ink); }
.s2-now { margin-left: 6px; padding: 1px 6px; border-radius: var(--r-full); background: var(--fill); color: var(--ink-2); font-size: var(--t-label); font-weight: 500; vertical-align: 1px; }
@supports selector(:has(a)) {
  .s2-visual:has(input[data-now]:checked) .s3-usestyle { display: none; }
}

/* Round 2, area 3 (Nov 20): Promises, Subscriptions, Records, Deals. Loaded after the
   shared files; new classes only, prefixed r2- where they are not part of a page's own set. */

/* Promises: the two pieces of evidence, each set apart in the quote and named below it */
.pr-quote mark.pr-span { background: none; color: inherit; padding: 0 1px; border-radius: 2px; }
.pr-quote mark.is-promise { box-shadow: inset 0 -2px 0 var(--c-deal); font-weight: 600; }
.pr-quote mark.is-date { box-shadow: inset 0 -2px 0 var(--signal); font-weight: 600; }
.pr-quote mark.is-ask { box-shadow: inset 0 -2px 0 var(--c-deal); font-weight: 600; }
.pr-spans { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; font-size: var(--t-meta); color: var(--ink-2); }
.pr-spans .lab { display: inline-block; min-width: 64px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; font-size: var(--t-label); }
.pr-verify.is-ok { color: var(--good); }
.pr-acts .pr-review { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--bg); color: var(--ink); font-weight: 600; text-decoration: none; }
.pr-acts .pr-review:hover { background: var(--hover); }
.pr-acts .pr-review:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pr-acts button.is-confirm { font-weight: 600; }

/* Records: Deals kept at zero, a refused list said out loud */
.r2-none { display: block; padding: var(--s3); color: var(--ink-2); font-size: var(--t-ui); }
.r2-none a { color: var(--ink); }
.r2-deals-empty { margin: var(--s3) 0; padding: var(--s3) var(--s4); border: 1px dashed var(--line-2); border-radius: var(--r-md); background: var(--well); }
.r2-deals-empty b { display: block; font-size: var(--t-ui); margin-bottom: 4px; }
.r2-deals-empty p { margin: 0; color: var(--ink-2); font-size: var(--t-ui); }
.r2-refused { margin: var(--s3) 0; }

/* the record header: a source link beside a date; the 2 by 2 grid when four cells do not fit */
.rh-src { color: var(--ink-2); font-size: var(--t-meta); }
@container (max-width: 640px) { .rh { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rh-cell .val span[title] { display: inline; }

/* Details: where a label and its value cannot share a row, the label sits above its value */
@container (max-width: 480px) {
  .p3-dl.r2-meta { grid-template-columns: minmax(0, 1fr); }
  .p3-dl.r2-meta dt { border-bottom: 0; padding-bottom: 0; }
}
.r2-nolinks { margin-top: var(--s2); }
.p3-ev .r2-fields { display: block; color: var(--ink-2); font-size: var(--t-meta); }

/* Summary: a sentence written earlier says its day; one the record moved past says so */
.sm-tag.is-old { color: var(--ink-2); border-color: var(--line-2); }
.r2-drift { display: block; margin: 4px 0 0; padding: 6px 10px; border-left: 3px solid var(--signal); background: var(--signal-soft); color: var(--ink); font-size: var(--t-meta); border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* Subscriptions: the equation, expected and feed dates, the schedule apart from usage */
.r2-eq { margin: 6px 0 0; font-size: var(--t-meta); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sub .l .r2-expected { display: block; color: var(--ink-2); font-size: var(--t-meta); }
.sub-chip.is-unconfirmed { background: var(--signal-soft); color: var(--signal-text); }
.r2-ch { margin: var(--s3) 0 4px; font-size: var(--t-ui); font-weight: 600; }
.r2-ch small { font-weight: 400; color: var(--ink-2); font-size: var(--t-meta); margin-left: 6px; }
.r2-cancel { margin-top: var(--s2); }
.r2-cancel > summary { cursor: pointer; font-weight: 600; color: var(--ink); min-height: 32px; display: inline-flex; align-items: center; }
.r2-cancel-form { display: grid; gap: 8px; margin-top: 6px; padding: var(--s3); border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--bg); max-width: 520px; }
.r2-cancel-form label { display: grid; gap: 4px; font-size: var(--t-ui); }
.r2-cancel-form label span { font-weight: 600; }
.r2-cancel-form button { justify-self: start; }

/* Round 2, area 6 (Nov 20): health, evidence and chat. Same tokens as the rest, no new colours.
   Body text at 13 px or larger; the evidence rows read at table contrast, not faint grey. */

.e2-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- the evidence object: small labelled rows (web/evidence-view.ts) */
ul.e2-ev { list-style: none; margin: var(--s3) 0; padding: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px var(--s4); font-size: var(--t-ui); color: var(--ink-2); }
ul.e2-ev li { display: contents; }
ul.e2-ev li b { display: inline-flex; align-items: baseline; gap: 6px; color: var(--ink); font-weight: 600; }
ul.e2-ev li > i { display: none; }
ul.e2-ev li b::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex: none; transform: translateY(-1px); }
ul.e2-ev li.t-ok b { color: var(--good); }
ul.e2-ev li.t-ok b::before { background: var(--good); }
ul.e2-ev li.t-need b::before { background: var(--signal); }
ul.e2-ev li.t-bad b { color: var(--bad); }
ul.e2-ev li.t-bad b::before { background: var(--bad); }
ul.e2-ev li span { color: var(--ink-2); min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 640px) { ul.e2-ev { grid-template-columns: minmax(0, 1fr); } ul.e2-ev li span { margin: 0 0 4px 14px; } }
.e2-tag { white-space: nowrap; }

/* ---- a chart's values as text */
details.e2-values { margin: var(--s2) 0 0; font-size: var(--t-ui); }
details.e2-values > summary { cursor: pointer; color: var(--ink-2); width: max-content; }
details.e2-values > summary:hover, details.e2-values > summary:focus-visible { color: var(--ink); }
details.e2-values table caption { text-align: left; color: var(--ink-2); padding: 4px 0; font-size: var(--t-ui); }
details.e2-values th[scope=row] { font-weight: 500; text-align: left; }

/* ---- the runs list: sections, recovery and diagnostics */
.e2-secwords { margin: 0 0 var(--s2); font-size: var(--t-ui); color: var(--ink-2); }
.e2-recline { margin-top: 4px; font-size: var(--t-ui); color: var(--ink-2); }
.e2-rec { display: inline-block; font-size: var(--t-meta); font-weight: 600; padding: 0 7px; border-radius: var(--r-full); background: var(--fill); color: var(--ink-2); }
.e2-rec.is-ok { background: var(--good-soft); color: var(--good); }
.e2-rec.is-bad { background: var(--bad-soft); color: var(--bad); }
/* a past failure that recovered stays loud in history; today's list stays quiet */
tr.e2-in-history.is-failed td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
tr.e2-in-recovered td:first-child { box-shadow: inset 3px 0 0 var(--signal); }
details.e2-diag { margin-top: 4px; font-size: var(--t-ui); }
details.e2-diag > summary { cursor: pointer; color: var(--ink-2); }
details.e2-diag code { display: block; margin-top: 4px; font-family: var(--mono); font-size: var(--t-meta); white-space: pre-wrap; word-break: break-word; color: var(--ink); }

/* ---- a team's jobs: Last observed, Next due, State */
.e2-jobs details.e2-how { margin-top: 2px; font-size: var(--t-ui); }
.e2-jobs details.e2-how > summary { cursor: pointer; color: var(--ink-2); width: max-content; }
.e2-jobs details.e2-how p { margin: 4px 0 0; max-width: 60ch; color: var(--ink-2); line-height: 1.45; }
.e2-state { display: inline-block; font-size: var(--t-meta); font-weight: 600; padding: 1px 8px; border-radius: var(--r-full); background: var(--fill); color: var(--ink-2); white-space: nowrap; }
.e2-state.is-healthy, .e2-state.is-ondemand { background: var(--good-soft); color: var(--good); }
.e2-state.is-running, .e2-state.is-due, .e2-state.is-unreported { background: var(--signal-soft); color: var(--signal-text); }
.e2-state.is-overdue, .e2-state.is-failing { background: var(--bad-soft); color: var(--bad); }
.e2-jobs td small { display: block; font-size: var(--t-meta); color: var(--ink-2); }

/* ---- the left column: the team's name never shortens; activity is a fixed-size icon */
.rail .agent-line .agent .name { flex: 0 1 auto; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; line-height: 1.2; }
.rail .agent-line .agent { gap: 8px; }
.rail .agent-line .agent .count { flex: none; }
.rail .team-activity.e2-act { flex: none; width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--ink-3); }
.rail .team-activity.e2-act svg { width: 14px; height: 14px; }
/* idle is a hollow ring; processing is filled and breathes; off is a faint ring */
.frame .presence.e2-presence { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; flex: none; }
.frame .presence.e2-presence.is-idle { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.frame .presence.e2-presence.is-off { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-4); }
.frame .presence.e2-presence.is-processing { background: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); animation: e2-breathe 1.6s ease-in-out infinite; }
@keyframes e2-breathe { 50% { box-shadow: 0 0 0 1px var(--signal-soft); } }
@media (prefers-reduced-motion: reduce) { .frame .presence.e2-presence.is-processing { animation: none; } }

/* ---- a chat's head: the title and one actions menu, on one row */
.head.e2-chathead .crumbs { flex: 1 1 auto; min-width: 0; }
.head.e2-chathead .crumbs { overflow: visible; }
.head.e2-chathead .crumbs .chat-title { flex: 0 1 auto; min-width: 6em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.e2-more { position: relative; flex: none; }
details.e2-more > summary { list-style: none; cursor: pointer; width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--ink-2); }
details.e2-more > summary::-webkit-details-marker { display: none; }
details.e2-more > summary:hover, details.e2-more > summary:focus-visible { background: var(--hover); color: var(--ink); }
details.e2-more[open] > .e2-menu { position: absolute; top: 34px; left: 0; z-index: 20; display: grid; gap: var(--s2); padding: var(--s3); width: min(380px, 80vw); white-space: normal; background: var(--bg); border-radius: var(--r-lg); box-shadow: 0 0 0 1px var(--stroke-float), var(--shadow-float); }
.e2-menu-who { margin: 0; display: grid; gap: 2px; font-size: var(--t-ui); color: var(--ink-2); }
.e2-menu-who b { color: var(--ink); }
.e2-menu-who span { display: inline-flex; align-items: center; gap: 4px; }
.e2-menu form.e2-rename { display: flex; flex-wrap: wrap; gap: 6px; align-items: end; margin: 0; }
.e2-menu form.e2-rename label { flex: 1 1 200px; display: grid; gap: 2px; font-size: var(--t-ui); color: var(--ink-2); }

/* ---- answers: when, what they read, and asking again */
.e2-answered { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: var(--s2); font-size: var(--t-ui); color: var(--ink-2); }
.e2-answered.is-stale .e2-newer { color: var(--signal-text); font-weight: 600; }
form.e2-again { display: inline; margin: 0; }
a.e2-numlink { display: inline-flex; align-items: center; max-width: 100%; }
details.e2-own { margin: var(--s2) 0; font-size: var(--t-ui); }
details.e2-own > summary { cursor: pointer; color: var(--ink-2); width: max-content; }
.e2-facts .rows-table th[scope=row] { font-weight: 500; text-align: left; }
.e2-facts .rows-table .none { color: var(--ink-2); font-style: italic; }
.e2-lost { color: var(--signal-text); }

/* ---- copy buttons say what happened */
.chip-btn.is-copied, button.is-copied { color: var(--good); }
.chip-btn.is-copy-failed, button.is-copy-failed { color: var(--bad); }
.ask-note .e2-clear-draft { margin-left: 4px; }
.ask-state.is-failed .run-link { margin-left: 8px; }

/* ---- the calm rail (Sam, Nov 20): four places, one line per agent, a quiet foot */
.rail .e2-agents { display: grid; gap: 2px; align-content: start; }
.rail .e2-agents a.agent .name { flex: 0 1 auto; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; line-height: 1.2; }
.rail .e2-agents a.agent .count { flex: none; }
.rail .e2-agents a.agent[aria-current="page"] { background: var(--bg); box-shadow: var(--shadow-xs), 0 0 0 1px var(--line); }

/* ---- a place's tabs, in the page's head: no extra height */
.head .e2-tabs { display: flex; gap: 2px; flex: none; margin-left: var(--s3); }
.head .e2-tabs a { padding: 4px 10px; border-radius: var(--r-full); font-size: var(--t-ui); color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.head .e2-tabs a:hover, .head .e2-tabs a:focus-visible { background: var(--hover); color: var(--ink); }
.head .e2-tabs a[aria-current="page"] { background: var(--fill); color: var(--ink); font-weight: 600; }
@media (max-width: 760px) { .head .e2-tabs { margin-left: 0; overflow-x: auto; } .head .e2-tabs a { padding: 4px 8px; } }

/* ---- a chat's History and Start fresh */
.head .e2-hbtn { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px; border-radius: var(--r-sm); font-size: var(--t-ui); color: var(--ink-2); text-decoration: none; cursor: pointer; list-style: none; white-space: nowrap; }
.head .e2-hbtn::-webkit-details-marker { display: none; }
.head .e2-hbtn:hover, .head .e2-hbtn:focus-visible { background: var(--hover); color: var(--ink); }
.head .e2-hbtn .n { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.head .e2-hbtn svg { width: 13px; height: 13px; }
ul.e2-hlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 60vh; overflow-y: auto; }
ul.e2-hlist a { display: flex; justify-content: space-between; gap: var(--s3); padding: 6px 8px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font-size: var(--t-ui); }
ul.e2-hlist a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ul.e2-hlist a small { flex: none; color: var(--ink-2); font-size: var(--t-meta); }
ul.e2-hlist a:hover, ul.e2-hlist a:focus-visible { background: var(--hover); }
ul.e2-hlist a[aria-current="page"] { background: var(--fill); font-weight: 600; }

/* ---- team activity, in the agent's side panel */
a.e2-teamact { display: flex; align-items: center; gap: 10px; margin: 0 0 var(--s3); padding: 8px 10px; border-radius: var(--r-md); color: var(--ink); text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); }
a.e2-teamact span { display: grid; }
a.e2-teamact small { font-size: var(--t-meta); color: var(--ink-2); }
a.e2-teamact:hover, a.e2-teamact:focus-visible { background: var(--hover); }
details.e2-history > summary.e2-hbtn { width: auto; display: inline-flex; place-items: initial; }
/* the chat head fits: the title gives way first, Start fresh keeps its icon when space is short */
.head.e2-chathead .crumbs { flex: 1 1 0; min-width: 0; }
.head.e2-chathead .crumbs .chat-title { min-width: 4em; }
.frame.has-pane:not(.pane-off) .head.e2-chathead .e2-fresh-w { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* a team's jobs table takes the whole width; who has access and the skills go under it */
.p4-team .p4-cols:has(.e2-jobs) { grid-template-columns: minmax(0, 1fr); }
.frame.has-pane:not(.pane-off) .head.e2-chathead .e2-hw { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.head .e2-hbtn svg { width: 14px; height: 14px; flex: none; }

/* Tax, year end and entry pages after the Nov 21 audit: figures, dots and bars in place of
   sentences. Same tokens and chart colours as the rest (c-in, c-out, c-owe, c-cash); nothing new. */

/* a headline figure with its label */
.t3-fig { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s3); margin: 0 0 var(--s3); font-size: var(--t-ui); }
.t3-fig .lab { color: var(--ink-2); font-weight: 600; }
.t3-fig .v { font-size: var(--t-fig); font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tx2-head .t3-fig { margin: 0; }
.t3-line { margin: 0 0 var(--s3); font-size: var(--t-ui); color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.t3-h { margin: var(--s4) 0 var(--s1); font-size: var(--t-ui); color: var(--ink-2); font-weight: 600; }
.t3-count { font-weight: 400; margin-left: var(--s1); }
.chip.t3-state { text-decoration: none; }
.chip.t3-state.is-projected, .chip.t3-state.is-draft { background: var(--signal-soft); color: var(--signal-ink); }
.chip.t3-state.is-ready { background: var(--good-soft); color: var(--good); }

/* one dot per check */
.t3-dots { display: inline-flex; gap: 4px; vertical-align: middle; }
.t3-dots i { width: 9px; height: 9px; border-radius: var(--r-full); background: var(--good); }
.t3-dots i.no { background: var(--bad); }

/* a share done */
.t3-meter { display: inline-block; width: 72px; height: 6px; margin: 0 6px; border-radius: var(--r-full); background: var(--fill); overflow: hidden; vertical-align: middle; }
.t3-meter i { display: block; height: 100%; border-radius: var(--r-full); background: var(--good); }

/* split bars: the .hbars look, one bar marked */
.t3-bars { --c: var(--c-mute); max-width: 560px; margin: 0 0 var(--s4); }
.t3-bars .hbar { padding: 6px 0; }
.t3-bars .hbar .l { text-transform: none; white-space: normal; }
.t3-bars .hbar.is-on { --c: var(--c-in); font-weight: 600; }
.cra-pack .t3-bars { --c: var(--c-out); }

/* the period, the checker's reach and today on one bar */
.t3-ready { gap: var(--s3); }
.t3-span { display: grid; gap: 4px; }
.t3-span .track { position: relative; height: 8px; border-radius: var(--r-full); background: var(--fill); }
.t3-span .track i { display: block; height: 100%; border-radius: var(--r-full); background: var(--good); }
.t3-span .track b { position: absolute; top: -3px; width: 2px; height: 14px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.t3-span .lab { display: flex; justify-content: space-between; gap: var(--s2); font-size: var(--t-meta); color: var(--ink-2); }
.t3-conds { display: flex; flex-wrap: wrap; gap: 6px var(--s4); }
.t3-conds li[title] { cursor: help; }
.t3-allmet { margin: 0; color: var(--good); font-size: var(--t-ui); }

/* facts confirmed: one segment per group, as wide as its facts */
.t3-facts { margin: 0 0 var(--s5); }
.t3-facts-h { font-size: var(--t-ui); margin: 0 0 6px; }
.t3-seg { display: flex; gap: 3px; }
.t3-seg a { display: grid; gap: 4px; min-width: 44px; color: var(--ink-2); text-decoration: none; font-size: var(--t-meta); }
.t3-seg .track { display: block; height: 8px; border-radius: var(--r-full); background: var(--signal-soft); overflow: hidden; }
.t3-seg .track i { display: block; height: 100%; background: var(--good); }
.t3-seg a:hover { color: var(--ink); }
.t3-seg a:hover .track { outline: 1px solid var(--signal); }
.t3-seg a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.t3-seg .l { white-space: nowrap; }

/* folds: detail one click away */
.t3-fold { margin: 0 0 var(--s3); }
.t3-fold > summary { cursor: pointer; padding: 6px 0; font-size: var(--t-ui); color: var(--ink-2); }
.t3-fold > summary:hover { color: var(--ink); }
.t3-fold > summary, .t3-why > summary, .t3-tech > summary { list-style: none; }
.t3-fold > summary::-webkit-details-marker, .t3-why > summary::-webkit-details-marker { display: none; }
.t3-fold > summary::before, .t3-why > summary::before { content: "›"; display: inline-block; width: 12px; color: var(--ink-4); transition: transform var(--t-fast) var(--ease); }
.t3-fold[open] > summary::before, .t3-why[open] > summary::before { transform: rotate(90deg); }
.t3-fold[open] > summary { margin-bottom: var(--s2); }
.t3-sec { border-top: 1px solid var(--line); margin: 0; }
.t3-sec > summary { padding: var(--s3) 0; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: baseline; }
.t3-sec > summary .t { font-size: var(--t-title); font-weight: 600; color: var(--ink); }
.t3-why > summary { cursor: pointer; font-size: var(--t-meta); color: var(--ink-3); width: max-content; }
.t3-why p { margin: 4px 0 0; max-width: var(--read-w); }
.t3-rule p { margin: 0; max-width: var(--read-w); }
td.t3-open { color: var(--signal-ink); }
.t3-four { margin-bottom: var(--s3); }

/* open months, each with its checks */
.t3-months { list-style: none; padding: 0; margin: 0 0 var(--s5); display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: var(--s2); }
.t3-months li { display: grid; gap: 6px; padding: var(--s3); border-radius: var(--r-md); background: var(--well); font-size: var(--t-ui); align-content: start; }
.t3-months li.is-next { outline: 1px solid var(--line-2); background: var(--bg); }

/* loans */
.t3-chart { max-width: 640px; --c: var(--c-owe); margin: 0 0 var(--s2); }
.t3-asks { list-style: none; padding: 0; margin: 0 0 var(--s3); display: grid; gap: 6px; font-size: var(--t-ui); }

/* a treatment question: the answers as buttons */
.t3-answers { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 4px 0; }
.t3-answers form { margin: 0; }
.t3-answers .btn { white-space: normal; text-align: left; height: auto; min-height: 32px; padding: 6px 12px; line-height: 1.3; }

/* the dates ahead on one line */
.t3-time { position: relative; height: 44px; margin: var(--s3) 0 var(--s4); border-top: 2px solid var(--line-2); }
.t3-mark { position: absolute; top: -6px; display: grid; justify-items: center; gap: 4px; transform: translateX(-50%); font-size: var(--t-meta); color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.t3-mark i { width: 10px; height: 10px; border-radius: var(--r-full); background: var(--signal); border: 2px solid var(--bg); box-sizing: content-box; }
.t3-mark.is-if i { background: var(--ink-4); }
.t3-mark.is-today { transform: none; justify-items: start; color: var(--ink); font-weight: 600; }
.t3-mark.is-today i { background: var(--ink); }
.t3-mark.is-end { transform: translateX(-100%); justify-items: end; }
a.t3-mark:hover { color: var(--ink); }

/* entry pages */
.t3-entry-note { margin: 4px 0 var(--s2); font-size: var(--t-ui); color: var(--ink-2); }
.t3-need { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin: var(--s3) 0 0; padding: var(--s2) var(--s3); border-radius: var(--r-md); background: var(--signal-soft); color: var(--signal-ink); font-size: var(--t-ui); }
.t3-need .btn { flex: none; }
.t3-tech dl { margin-top: var(--s2); }
.t3-tech > summary { cursor: pointer; font-size: var(--t-meta); color: var(--ink-3); margin-top: var(--s2); }
.p3-bank .r b { white-space: nowrap; }
.p3-bank .r > span { min-width: 0; overflow-wrap: anywhere; }
.t3-steps { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.head .p3-crumbs .sub { white-space: nowrap; }

@media (max-width: 640px) {
  .t3-span .lab { font-size: 11px; }
  .t3-seg .l { font-size: 11px; }
}
@media print {
  .t3-fold > summary { list-style: none; }
  .t3-time, .t3-seg, [data-t3-print] { display: none !important; }
}
.t3-bars .hbar .l { max-width: 17em; }

/* Nov 21 audit, area 6: Settings, Rules, runs, backups and team pages. Fewer words, the same
   signal. Only s3- classes (and marks inside them); same tokens as the rest, no new colours. */

.s3-none { font-size: var(--t-ui); color: var(--ink-2); font-weight: 400; }
.s3-warn { color: var(--signal-text); font-weight: 600; }
details.s3-fold { margin: var(--s2) 0; font-size: var(--t-ui); }
details.s3-fold > summary { cursor: pointer; color: var(--ink-2); width: max-content; }
details.s3-fold > summary:hover, details.s3-fold > summary:focus-visible { color: var(--ink); }
details.s3-fold > p { margin: 4px 0 0; color: var(--ink-2); }
a.s3-chip, span.s3-chip { display: inline-block; font-size: var(--t-meta); font-weight: 600; padding: 1px 8px; border-radius: var(--r-full); background: var(--fill); color: var(--ink-2); text-decoration: none; white-space: nowrap; }
a.s3-chip:hover, a.s3-chip:focus-visible { background: var(--hover); color: var(--ink); }
.s3-chip.is-ok { background: var(--good-soft); color: var(--good); }
.s3-chip.is-warn { background: var(--signal-soft); color: var(--signal-text); }

/* ---- a team's page: two or three lead cells, one line a job with its own 24-hour strip */
.a5-lead.s3-lead { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.s3-lead .val .sep { color: var(--ink-3); }
.p4-hours .hb.is-failed { fill: var(--bad); }
.s3-jobs .p4-hours.s3-spark { width: 120px; height: 14px; margin-top: 3px; }
.frame .s3-jobs td { vertical-align: top; }
.frame .s3-jobs td small.s3-warn { color: var(--signal-text); }
.p4-stat .fig .s3-none { font-size: var(--t-ui); }

/* ---- Agent runs: the tabs and the folded filter beside the one chart */
.s3-runs-head { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); align-items: flex-start; justify-content: space-between; margin: 0 0 var(--s3); }
.s3-runs-head > div { flex: 1 1 420px; min-width: 0; }
.s3-runs-head h1 { margin-bottom: var(--s2); }
details.s3-filter { margin: 0; font-size: var(--t-meta); }
details.s3-filter > summary { cursor: pointer; color: var(--ink-2); width: max-content; }
details.s3-filter > summary:hover, details.s3-filter > summary:focus-visible { color: var(--ink); }
details.s3-filter .a5-filters { margin: var(--s2) 0 0; }
details.s3-filter .a5-filters input[type="date"] { width: 9.5em; }
figure.s3-asked { flex: 0 1 280px; margin: 0; min-width: 220px; }
figure.s3-asked figcaption { font-size: var(--t-label); font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; margin: 0 0 2px; }
figure.s3-asked figcaption span { font-weight: 500; text-transform: none; letter-spacing: 0; margin-left: 6px; }
figure.s3-asked figcaption b.is-over { color: var(--bad); text-transform: none; letter-spacing: 0; margin-left: 6px; }
.s3-weeks { max-height: 96px; }
.s3-weeks .wk.acted { fill: var(--ink); }
.s3-weeks .wk.ignored { fill: var(--c-mute); }
.s3-weeks .wk.open { fill: var(--signal); }
.s3-weeks .wk.none { fill: var(--fill); }
.s3-weeks .wk.is-over { stroke: var(--bad); stroke-width: 1.5; }
.s3-weeks text.is-over { fill: var(--bad); }
.s3-weeks .budget { stroke: var(--ink-3); stroke-dasharray: 3 3; }
.s3-key { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: var(--t-meta); color: var(--ink-2); }
.s3-key span { display: inline-flex; align-items: center; gap: 4px; }
.s3-key i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.s3-key i.acted { background: var(--ink); }
.s3-key i.ignored { background: var(--c-mute); }
.s3-key i.open { background: var(--signal); }
details.s3-weektable { font-size: var(--t-meta); margin-top: 2px; }
details.s3-weektable > summary { cursor: pointer; color: var(--ink-2); width: max-content; }
details.s3-weektable tr.is-over td { color: var(--bad); }

/* the runs table: the time is the link, the first cell clears the row's coloured bar */
.s3-runtable td, .s3-runtable th { vertical-align: top; }
.s3-runtable td:first-child, .s3-runtable th:first-child { padding-left: 12px; }
.s3-runtable td.s3-when { white-space: nowrap; }
.s3-runtable td.s3-work { white-space: nowrap; color: var(--ink-2); font-size: var(--t-meta); }
a.s3-decide { display: inline-block; padding: 2px 10px; border-radius: var(--r-full); background: var(--ink); color: var(--on-ink); font-size: var(--t-meta); font-weight: 600; text-decoration: none; white-space: nowrap; }
.frame a.s3-decide:hover, .frame a.s3-decide:focus-visible { color: var(--on-ink); opacity: .85; }
form.s3-ack { margin: 0; white-space: nowrap; }
.s3-quiet { margin: var(--s2) 0; font-size: var(--t-ui); color: var(--ink-2); }

/* one run */
.s3-run .s3-steps td.s3-kind, .s3-run .s3-steps th { white-space: nowrap; }
.s3-run .s3-steps td { vertical-align: top; overflow-wrap: anywhere; }

/* ---- Settings: a row is a name, two to four words and a time */
.s3-settings .a6-conn .s3-at { margin-left: 6px; white-space: nowrap; }
details.s3-how { display: inline-block; margin-left: 6px; }
details.s3-how > summary { cursor: pointer; color: var(--ink-2); display: inline; }
details.s3-how code { display: block; margin-top: 2px; font-family: var(--mono); font-size: var(--t-meta); }
.s3-settings .st-links a b:only-child { margin-bottom: 0; }

@media (max-width: 720px) {
  figure.s3-asked { flex-basis: 100%; }
  .s3-runtable { display: block; overflow-x: auto; }
}

/* ---- Rules: one legend, one line a tripwire; the audit in a line */
.s3-legend { margin: 2px 0 var(--s2); font-size: var(--t-meta); color: var(--ink-2); }
.s3-trips .s3-reads { margin-left: 6px; font-size: var(--t-meta); color: var(--ink-2); white-space: nowrap; }
ul.s3-trips li { line-height: 1.6; }
.p4-note.s3-warn { color: var(--signal-text); font-weight: 500; }
.s2-audit details.s3-fold ul { margin-top: var(--s2); }

/* ---- the door: the setup steps fold away once a token is in use */
details.door-setup.s3-fold > summary { font-weight: 600; color: var(--ink); }
.s3-copybox { display: flex; gap: var(--s2); align-items: flex-start; margin: 0 0 var(--s3); }
.s3-copybox pre { flex: 1 1 auto; min-width: 0; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---- Backups: a recovered or closed incident is one line */
.s3-backups h2 { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: baseline; }
.s3-backups h2 .soft { font-weight: 400; font-size: var(--t-ui); }
form.s3-ackall { margin: 0 0 0 auto; }
ul.s3-incs { list-style: none; margin: 0; padding: 0; }
ul.s3-incs > li { display: flex; flex-wrap: wrap; gap: 4px var(--s3); align-items: baseline; padding: var(--s2) 0; border-bottom: 1px solid var(--line); font-size: var(--t-ui); }
ul.s3-incs > li:target { background: var(--signal-soft); }
ul.s3-incs .s3-inc-what { flex: 1 1 320px; min-width: 0; }
ul.s3-incs .s3-inc-fix { color: var(--ink-2); }
ul.s3-incs form { margin: 0; }
ul.s3-incs details.tr-diag { margin-top: 0; }
ul.s3-incs details.tr-diag[open] { flex-basis: 100%; }
ul.s3-incs details.tr-diag p { margin: 4px 0; }

/* ---- second look at 1440 wide: quiet row buttons, names on one line, a compact legend */
.frame form.s3-ack button { padding: 2px 10px; font-size: var(--t-meta); min-height: 0; height: auto; }
.s3-runtable th { white-space: nowrap; }
.s3-runtable td:nth-child(2) { white-space: nowrap; }
.legend.s3-key { gap: 2px 12px !important; margin-top: 2px; }
.legend.s3-key i { margin-right: 0; width: 8px; height: 8px; }
.p4-agent .who p { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.p4-effect > .s3-effect { flex: 1 1 0; min-width: 0; }

/* Agents: the one action sits beside the title */
h1 > a.btn { float: right; font-size: var(--t-ui); font-weight: 500; }

/* ---- review round: the runs page is drawn wide and What gets the room; the style choice has its own small button */
.s3-runtable td.s3-what { width: 45%; min-width: 320px; }
.s2-visual button.s3-usestyle { padding: 2px 12px; font-size: var(--t-meta); min-height: 0; height: auto; }

/* ---- Settings in five groups (Nov 26): a status line, a short contents list, then You, Team
   access, Connections, Rules and approvals, System health. A group is an h2 with a rule under it;
   an item inside it an h3. Tokens only, so every style and light or dark draws it its own way. */
.st-v2 > h1 { margin-bottom: var(--s2); }
.st-v2 .st-status { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s3); font-size: var(--t-ui); font-weight: 600; }
.st-v2 .st-status .dot { width: 8px; height: 8px; border-radius: var(--r-full); background: var(--good); flex: none; }
.st-v2 .st-status.is-warn .dot { background: var(--signal); }
.st-v2 .st-status.is-warn a { color: var(--signal-text); }
.st-v2 .st-status.is-ok a { color: var(--ink); }
.st-toc { margin: 0 0 var(--s5); }
.st-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.st-toc a { display: inline-block; padding: 4px 12px; border-radius: var(--r-full); background: var(--fill); color: var(--ink-2); font-size: var(--t-ui); text-decoration: none; white-space: nowrap; }
.st-toc a:hover, .st-toc a:focus-visible { background: var(--hover); color: var(--ink); }
.a6-settings .st-group { margin: 0 0 var(--s6); scroll-margin-top: var(--s4); }
.settings-page.st-v2 .st-group > h2 { margin: 0 0 var(--s3); font-size: var(--t-title); color: var(--ink); font-weight: 600; }
.a6-settings .st-item { margin: 0 0 var(--s5); scroll-margin-top: var(--s4); }
.a6-settings .st-item:last-child { margin-bottom: 0; }
.a6-settings .st-item > h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--s2); margin: 0 0 var(--s2); font-size: calc(var(--t-ui) + 2px); font-weight: 600; color: var(--ink); }
/* a title inside an item is quieter than the item's own title, in every style (Pixel sets h3 in its mono face) */
.a6-settings .st-item h4 { font-family: inherit; font-size: var(--t-ui); font-weight: 500; color: var(--ink-2); }
.a6-settings .st-item > h3 > a { margin-left: auto; font-size: var(--t-ui); font-weight: 400; }
.a6-settings .st-group > .a6-conn + .st-links, .a6-settings .st-group > .st-links + .st-item, .a6-settings .st-group > .a6-conn + .st-item { margin-top: var(--s3); }
.a6-settings section.st-item { margin: 0 0 var(--s5); }
.st-tag { display: inline-block; padding: 0 6px; border-radius: var(--r-full); background: var(--fill); color: var(--ink-2); font-size: var(--t-meta); font-weight: 600; line-height: 1.6; vertical-align: baseline; white-space: nowrap; }
/* a card's tag sits on its title line, at the right, or under the title when there is no room; the words under them take the full width */
.settings-page.st-v2 .st-links a { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px var(--s2); }
.settings-page.st-v2 .st-links a > b { flex: 1 0 auto; margin-bottom: 0; white-space: nowrap; }
.settings-page.st-v2 .st-links a > .st-tag { flex: none; }
.settings-page.st-v2 .st-links a > span { flex: 1 0 100%; margin-top: 2px; }
.st-v2 .s2-replay { margin: var(--s2) 0 0; }
@media (max-width: 760px) {
  .st-toc ul { display: block; }
  .st-toc li { border-bottom: 1px solid var(--line); }
  .st-toc li:last-child { border-bottom: 0; }
  .st-toc a { display: block; padding: var(--s2) 0; border-radius: 0; background: none; color: var(--ink); }
  .st-toc a::after { content: " \203A"; color: var(--ink-3); }
  .st-toc a:hover, .st-toc a:focus-visible { background: none; text-decoration: underline; }
  .a6-settings .st-item > h3 > a { margin-left: 0; }
}

/* Nov 21 audit, area 1 (Pulse, Brief, Projections, number pages): only signal. Same tokens as
   the rest, no new colours. A passed check is one line; a failed one stays in full view. */

.pz-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; }
.pz-dot.is-bad { background: var(--bad); }
.pz-dot.is-need { background: var(--signal); }

/* ---- what was checked: one line that opens to the rows (web/evidence-view.ts) */
details.pz-ev { margin: var(--s3) 0; font-size: var(--t-ui); color: var(--ink-2); }
details.pz-ev > summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; width: max-content; max-width: 100%; }
details.pz-ev > summary::-webkit-details-marker { display: none; }
details.pz-ev > summary::after { content: "›"; color: var(--ink-4); }
details.pz-ev[open] > summary::after { transform: rotate(90deg); }
details.pz-ev > summary:hover, details.pz-ev > summary:focus-visible { color: var(--ink); }
.pz-ev.is-loud { margin: var(--s3) 0; }
.pz-ev.is-loud > details { font-size: var(--t-ui); color: var(--ink-2); }
.pz-ev.is-loud > details > summary { cursor: pointer; width: max-content; }

/* ---- a number's page */
.pz-zero { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-weight: 500; }
details.pz-how { margin: 4px 0 0; font-size: var(--t-ui); color: var(--ink-2); }
details.pz-how > summary { cursor: pointer; width: max-content; }
details.pz-how p { margin: 6px 0 0; max-width: 70ch; line-height: 1.5; }
.frame .page .means + details.pz-how { padding-bottom: var(--s4); border-bottom: 1px solid var(--line); }
.head a.pz-back { color: var(--ink-2); text-decoration: none; font-weight: 500; white-space: nowrap; }
.head a.pz-back:hover, .head a.pz-back:focus-visible { color: var(--ink); }
.ask-here .pz-lock { display: inline-flex; align-items: center; color: var(--ink-3); flex: none; }
.ask-here .pz-lock svg { width: 13px; height: 13px; }
/* a split's bars read as the rows do: no Title Case on every word */
.num-fig .hbar .l, .pz-plain .hbar .l { text-transform: none; }

/* ---- the rows behind a number: an old note is a small dot, a long list opens on its first ten */
.memo-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); margin-right: 6px; vertical-align: 2px; }
.rows-note { margin: 0 0 var(--s2); font-size: var(--t-meta); color: var(--ink-3); }
.rows-cap { display: flex; flex-direction: column; }
.rows-cap > table { order: 1; }
.rows-cap > label { order: 2; align-self: flex-start; margin-top: var(--s2); padding: 4px 10px; border-radius: var(--r-full); background: var(--fill); color: var(--ink); font-size: var(--t-ui); font-weight: 500; cursor: pointer; }
.rows-cap > label:hover { background: var(--hover); }
.rows-cap > input.rows-all { position: absolute; width: 1px; height: 1px; opacity: 0; }
.rows-cap > input.rows-all:focus-visible ~ label { outline: 2px solid var(--focus); outline-offset: 2px; }
.rows-cap > input.rows-all:not(:checked) ~ table tbody tr:nth-child(n + 11) { display: none; }
.rows-cap > input.rows-all:checked ~ label { display: none; }
@media print { .rows-cap > input.rows-all:not(:checked) ~ table tbody tr:nth-child(n + 11) { display: table-row; } .rows-cap > label { display: none; } }

/* ---- a stacked bar: runs by what came of them (web/pulse-open.ts) */
.pz-stack { display: inline-flex; width: 160px; height: 8px; border-radius: var(--r-full); overflow: hidden; background: var(--fill); flex: none; align-self: center; gap: 1px; }
.pz-stack i { display: block; min-width: 3px; height: 100%; background: var(--line-2); }
.pz-stack i.s-done { background: var(--good); }
.pz-stack i.s-asked, .pz-stack i.s-recovered { background: var(--signal); }
.pz-stack i.s-recovered { opacity: .55; }
.pz-stack i.s-blocked, .pz-stack i.s-failed { background: var(--bad); }
.pz-stack i.s-other { background: var(--ink-4); }
.pz-stack i.s-filled { background: var(--good); }
.pz-stack i.s-missing { background: var(--signal); }
.ops-health.pz-agents > summary { align-items: center; flex-wrap: wrap; }
.ops-health.pz-agents > summary .v a { color: inherit; text-decoration: none; }
.ops-health.pz-agents > summary .v a:hover { text-decoration: underline; }
ul.pz-fails { list-style: none; margin: 0 0 var(--s3); padding: 0; display: grid; gap: 4px; font-size: var(--t-ui); }
ul.pz-fails li { display: grid; gap: 2px; padding-left: 10px; box-shadow: inset 3px 0 0 var(--bad); }
ul.pz-fails li a { color: var(--bad); text-decoration: none; }
ul.pz-fails li span { color: var(--ink-2); overflow-wrap: anywhere; }
.strip.pz-last > span:first-child { color: var(--ink-2); }

/* ---- the Brief's short lines */
.pz-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pz-line .pz-stack { width: 120px; }
sup.pz-src { font-size: 10px; line-height: 0; margin-left: 2px; }
sup.pz-src a { color: var(--ink-3); text-decoration: none; }
sup.pz-src a:hover { color: var(--ink); text-decoration: underline; }
.pz-cleared { color: var(--ink-3); }

/* ---- Projections: the label beside the chat picker never breaks inside a word */
.page-chat .pc-to span, .page-chat .pc-to label { white-space: nowrap; }

/* ---- the Brief's fold: the label in sentence case with the live time beside it; one column under it */
.p2-lead > .k { text-transform: none; letter-spacing: 0; display: flex; align-items: baseline; gap: var(--s3); }
.p2-lead > .k .when { font-weight: 400; color: var(--ink-2); }
.pz-changed .po-cols, .p2-changed.pz-changed .po-cols { grid-template-columns: minmax(0, 1fr); }
.pz-written { font-weight: 400; color: var(--ink-2); font-size: var(--t-ui); }
.p2-lines li > span > a.pz-line, .p2-lines a.pz-line { display: inline-flex; color: inherit; text-decoration: none; }
.p2-lines li > span > a { color: inherit; }
.po-brief ul.pulse li a { color: inherit; }

/* ---- split bars: one grid for the whole set, so every row shares the label and the value
   column and every track starts and ends at the same place, whatever the amounts */
.hbars { display: grid; grid-template-columns: minmax(70px, max-content) minmax(40px, 1fr) max-content; column-gap: var(--s3); }
.hbars > .hbar { grid-column: 1 / -1; grid-template-columns: subgrid; }
.hbars > .hbar .l { max-width: min(26em, 38vw); }

/* ---- the Pulse: two cards on the last row share it; Work shows its projects by stage as small bars */
.pd-third.pd-half { grid-column: span 6; }
@media (max-width: 900px) { .pd-third.pd-half { grid-column: auto; } }
.pd-stages { margin-top: 8px; min-height: 0; overflow: hidden; }
.pd-stages .hbar { padding: 3px 0; border-bottom: 0; font-size: var(--t-meta); grid-template-columns: minmax(70px, 1fr) 2fr 2ch; }
.pd-stages .hbar .l { text-transform: none; }
.pd-stages .hbar .track i { background: var(--c-work, var(--ink-3)); }

/* ---- a record's summary: its money as three small figures */
.sm-figs { display: inline-flex; flex-wrap: wrap; gap: 4px var(--s5); margin-right: var(--s3); vertical-align: bottom; }
.sm-fig { display: inline-flex; flex-direction: column; }
.sm-fig small { font-size: var(--t-meta); color: var(--ink-3); }
.sm-fig b { font-weight: 500; font-variant-numeric: tabular-nums; }
.sm-fig.is-owed b { color: var(--signal-ink); }

/* ---- the Brief's lines: the words stay together at the left, the one action at the right */
.p2-lines li > span > span { min-width: 0; }
.p2-lines li > span a { color: inherit; text-decoration: none; }
.p2-lines li > span a:hover { text-decoration: underline; }
.p2-lines li > span > a.go { margin-left: auto; }

/* ---- Work's bars on the Pulse say what they count */
.pd-stages-h { display: block; font-size: var(--t-meta); color: var(--ink-2); text-decoration: none; margin-bottom: 2px; }
.pd-stages-h:hover { text-decoration: underline; }

/* ---- Projections: a pass is not drawn as a warning; the page title is never clipped (with the
   pane open, "Ask about this" gives way first: the page has its own ask box) */
.p3-lead .calib.is-ok { color: var(--ink-2); }
.head .crumbs:has(.p3-title) { flex: none; overflow: visible; }
.head .crumbs .p3-title, .head .crumbs .p3-title b { flex: none; overflow: visible; white-space: nowrap; }
.frame.has-pane:not(.pane-off) .head:has(.p3-title) .tools .p3-btn[href="#ask"] { display: none; }

/* Records and Subscriptions, made tight (audit, Nov 21): one place per fact, a picture where
   a paragraph was really a split, a state or a trend. New classes only, prefixed r3-. Colours
   come from the tokens (tokens.css), so light and dark both follow. */

/* ---- the small visuals (web/records3.ts) */
.r3-bar { display: flex; gap: 2px; height: 8px; width: 100%; border-radius: var(--r-full); overflow: hidden; background: var(--fill); }
.r3-bar i { display: block; height: 100%; min-width: 3px; flex-basis: 0; }
.r3-split { display: block; margin: 6px 0 4px; }
.r3-leg { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: var(--t-meta); color: var(--ink-2); line-height: 1.5; }
.r3-leg > * { display: inline-flex; align-items: center; gap: 5px; color: inherit; text-decoration: none; white-space: nowrap; }
.r3-leg a:hover { color: var(--ink); text-decoration: underline; }
.r3-leg i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.r3-leg b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.k-in { background: var(--c-in); }
.k-cash { background: var(--c-cash); }
.k-out { background: var(--c-out); }
.k-owe { background: var(--c-owe); }
.k-work { background: var(--c-work); }
.k-deal { background: var(--c-deal); }
.k-mute { background: var(--c-mute); }
.k-bad { background: var(--bad); }
.k-none { background: transparent; }
.r3-prog { display: grid; gap: 4px; min-width: 0; }
.r3-prog-w { font-size: var(--t-meta); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.r3-cbars, .r3-chbars { display: block; max-width: 100%; height: auto; overflow: visible; }
.r3-cbars text, .r3-chbars text { font-family: var(--sans); font-size: 9.5px; fill: var(--ink-3); font-variant-numeric: tabular-nums; }
.r3-cbars rect.a { fill: var(--c-in); }
.r3-cbars rect.b { fill: var(--c-cash); }
.r3-cbars rect.z { fill: var(--line-2); }
.r3-chbars rect.p { fill: var(--c, var(--c-out)); }
.r3-chbars rect.x { fill: var(--c-owe); }

/* ---- Records: the list on the left */
.p3-rows a.p3-group.r3-quiet { display: flex; align-items: center; gap: 6px; margin-top: var(--s2); border-top: 1px solid var(--line); text-decoration: none; cursor: pointer; }
.p3-rows a.p3-group.r3-quiet:hover { color: var(--ink); background: var(--hover); }
.p3-rows a.p3-group.r3-quiet svg { margin-left: auto; color: var(--ink-4); }
.r3-warn { padding: 0 6px; border-radius: var(--r-full); background: var(--signal-soft); color: var(--signal-text); font-weight: 600; }
.r3-quiet-h { display: flex; align-items: baseline; gap: 6px; margin: 0; padding: var(--s3) 8px 4px; font-size: var(--t-meta); color: var(--ink-2); }
.r3-quiet-h b { font-weight: 600; color: var(--ink); white-space: nowrap; }
.r3-quiet-h .n { color: var(--ink-4); }
.r3-quiet-h a { margin-left: auto; color: var(--ink-2); white-space: nowrap; }
.r3-gnote { margin: 0; padding: 0 8px 2px; font-size: var(--t-meta); color: var(--ink-3); }
.r3-nofind a { color: var(--ink); }
.p3-av.r3-tdot { background: none; border: 0; display: inline-grid; place-items: center; }
.r3-tdot i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--ink-4); background: transparent; }
.r3-tdot.is-doing i { border-color: var(--c-cash); background: var(--c-cash); }
.r3-tdot.is-done i { border-color: var(--good); background: var(--good); }
.r3-tdot.is-late i { border-color: var(--bad); background: var(--bad); }
.p3-av.lg.r3-tdot i { width: 16px; height: 16px; border-width: 3px; }

/* ---- Records: each list as a picture */
.p3-rx.r3-rx { gap: 2px; }
.r3-rx-h { color: var(--ink); text-decoration: none; }
.r3-rx-h:hover b { text-decoration: underline; text-underline-offset: 3px; }
.r3-alert { display: block; margin-top: 6px; padding: 5px 8px; border-left: 3px solid var(--signal); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--signal-soft); color: var(--ink); font-size: var(--t-meta); line-height: 1.45; }
.r3-alert a { color: var(--ink); font-weight: 600; }

/* ---- a record: the strip, a cell per fact that is there */
/* cells share each row and the last row is filled: never an empty box */
.rh.r3-rh { display: flex; flex-wrap: wrap; }
.rh.r3-rh .rh-cell { flex: 1 1 140px; align-content: start; }
.rh.r3-rh .rh-cell.is-wide { flex: 2 1 280px; }
.rh.r3-rh .rh-cell .val > a { color: var(--ink); }
.rh.r3-rh .rh-cell .val small.c { display: inline; font-size: .8em; color: var(--ink-3); }
.rh.r3-rh .rh-cell .addr { overflow-wrap: anywhere; }
.rh.r3-rh .p3-steps { margin-top: 4px; max-width: 140px; }
.rh.r3-rh .rh-src { color: inherit; font-size: inherit; text-decoration-style: dotted; text-underline-offset: 3px; }
.rh.r3-rh .r3-prog { margin-top: 3px; }
/* Details keeps a label beside its value down to a narrow column (the right panel open) */
@container (min-width: 300px) and (max-width: 480px) {
  details.r3-fold .p3-dl.r2-meta { grid-template-columns: 110px minmax(0, 1fr); }
  details.r3-fold .p3-dl.r2-meta dt { border-bottom: 1px solid var(--line); padding-bottom: 7px; }
}
.head .p3-crumbs.r3-crumbs b { font-weight: 500; color: var(--ink-2); }
.head .p3-crumbs.r3-crumbs a { color: inherit; text-decoration: none; }
.head .p3-crumbs.r3-crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* ---- a record: sections that fold, history in words, mail by thread */
details.r3-fold > summary { list-style: none; cursor: pointer; }
details.r3-fold > summary::-webkit-details-marker { display: none; }
.frame .page details.r3-fold > summary h2 { display: flex; align-items: center; gap: 8px; }
details.r3-fold > summary h2::after { content: "Show"; margin-left: 8px; font-size: var(--t-meta); font-weight: 400; color: var(--ink-3); }
details.r3-fold[open] > summary h2::after { content: "Hide"; }
.frame .page details.r3-fold > summary h2 small { margin-left: 0; }
details.r3-fold > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.p3-ev .t .act { font-family: inherit; font-size: var(--t-ui); }
.p3-ev .t details.r3-src { font-size: var(--t-meta); color: var(--ink-3); }
.p3-ev .t details.r3-src > summary { cursor: pointer; display: inline-block; color: var(--ink-3); list-style: none; text-decoration: underline dotted; text-underline-offset: 3px; }
.p3-ev .t details.r3-src > summary::-webkit-details-marker { display: none; }
.p3-ev .t details.r3-src > span { display: block; line-height: 1.5; overflow-wrap: anywhere; }
.r3-lock { display: inline-grid; place-items: center; margin-left: 6px; color: var(--ink-4); cursor: help; }
.r3-mailstrip { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 6px var(--s4); margin: 0 0 var(--s2); }
details.r3-thread > summary { list-style: none; cursor: pointer; }
details.r3-thread > summary::-webkit-details-marker { display: none; }
details.r3-thread > summary:hover { background: var(--well); }
details.r3-thread > summary .go svg { transition: transform var(--t-fast) var(--ease); }
details.r3-thread[open] > summary .go svg { transform: rotate(90deg); }
.r3-thread-in { margin: 0 0 var(--s2) 44px; border-left: 2px solid var(--line-2); }
.r3-thread-in .p3-ev::before { display: none; }
.r3-thread-in .p3-ev { padding: 4px 8px; }
.r3-thread-in .p3-ev .t b { font-weight: 400; color: var(--ink-2); }

/* ---- a mail or a meeting, as one card */
.r3-mail { margin: var(--s3) 0; padding: var(--s3) var(--s4); border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--bg); display: grid; gap: 8px; }
.r3-mail p { margin: 0; }
.r3-mail-l { font-size: var(--t-ui); color: var(--ink-2); overflow-wrap: anywhere; }
.r3-mail-p { font-size: var(--t-ui); line-height: 1.55; color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.r3-mail-f { display: flex; flex-wrap: wrap; gap: 6px var(--s4); font-size: var(--t-meta); color: var(--ink-2); }
.r3-mail-f a { color: var(--ink); }
.r3-mail-f details.r3-src { color: var(--ink-3); }
.r3-mail-f details.r3-src > summary { cursor: pointer; display: inline-block; list-style: none; text-decoration: underline dotted; text-underline-offset: 3px; }
.r3-mail-f details.r3-src > summary::-webkit-details-marker { display: none; }
.r3-mail-f details.r3-src > span { display: block; overflow-wrap: anywhere; }

/* ---- the summary: what the strip does not say; the rest one click away */
.sm-line .sm-edit1 { opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.sm-line:hover .sm-edit1, .sm-line:focus-within .sm-edit1, .sm-line .sm-edit1[open] { opacity: 1; }
@media (hover: none) { .sm-line .sm-edit1 { opacity: 1; } }
details.r3-smore { margin-top: var(--s2); }
details.r3-smore > summary { cursor: pointer; font-size: var(--t-meta); color: var(--ink-3); }
details.r3-smore[open] > summary { margin-bottom: 4px; }
.r3-money { display: flex; flex-wrap: wrap; gap: 4px var(--s5); }
.r3-money span { display: grid; font-size: var(--t-meta); color: var(--ink-3); }
.r3-money b { font-size: 17px; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.r3-money .is-owed b { color: var(--signal-ink); }

/* ---- Subscriptions */
.r3-sub-top { display: grid; gap: 6px; margin-bottom: var(--s2); }
.r3-sub-top .r3-split { margin: 2px 0; max-width: 520px; }
.r3-sub-top .r3-bar { height: 10px; }
.r3-how { margin: var(--s2) 0 0; font-size: var(--t-meta); color: var(--ink-2); }
.r3-how > summary { cursor: pointer; color: var(--ink-3); }
.r3-how p { margin: 6px 0 0; max-width: 72ch; line-height: 1.5; }
table.r3-flags { width: 100%; border-collapse: collapse; font-size: var(--t-ui); margin: var(--s2) 0 var(--s4); }
.r3-flags caption { caption-side: bottom; text-align: left; padding-top: 6px; font-size: var(--t-meta); color: var(--ink-3); }
.r3-flags td { padding: 8px var(--s2) 8px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.r3-flags td.v { width: 30%; }
.r3-flags td.v a { font-weight: 600; color: var(--ink); text-decoration: none; }
.r3-flags td.v a:hover { text-decoration: underline; }
.r3-flags .r3-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.r3-flags td.a { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.r3-flags td.a small { display: block; font-size: var(--t-meta); color: var(--ink-3); }
.r3-flags .up { color: var(--signal-ink); font-weight: 600; }
.sub-chip[title] { cursor: help; }
.sub-chip.is-bad { background: var(--bad-soft); color: var(--bad); }
.sub-chip.is-soft { background: var(--fill); color: var(--ink-2); }
.sub > summary .n .k { font-size: var(--t-meta); color: var(--ink-3); font-weight: 400; }
.sub > summary .n .r3-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--good); vertical-align: 1px; }
.sub > summary .n .r3-dot.is-flag { background: var(--signal); }
.sub > summary .n .r3-dot.is-wait { background: var(--ink-4); }
.sub > summary .n .r3-dot.is-off { background: var(--line-2); }
.sub > summary .y { position: relative; }
.sub > summary .y .r3-share { display: block; width: 100%; height: 4px; border-radius: var(--r-full); background: var(--fill); overflow: hidden; }
.sub > summary .y .r3-share i { display: block; height: 100%; float: left; }
.r3-charges { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px var(--s4); margin: var(--s2) 0; }
.r3-charges-t > summary { cursor: pointer; font-size: var(--t-meta); color: var(--ink-2); }
.r3-more { margin-top: var(--s2); font-size: var(--t-meta); }
.r3-more > summary { cursor: pointer; color: var(--ink-2); }
.sm-add .sm-line .sm-edit1 { opacity: 1; }

/* ---- the summary when every line only repeats the strip: one closed fold, not an empty card */
.sm-folded .sm-box { margin-top: var(--s2); }
.frame .page details.sm-folded > summary h2 small { font-weight: 400; }

/* ---- "No contact yet" at the top of the list: one line that fits the column */
.r3-quiet-h { min-width: 0; flex-wrap: wrap; }
.r3-quiet-h a { text-decoration: none; }
.r3-quiet-h a:hover { color: var(--ink); text-decoration: underline; }

/* ---- a list group's heading: one line, the title cut, the count beside it */
.p3-group.r3-group1 { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.p3-group.r3-group1 .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p3-group.r3-group1 .n { flex: none; white-space: nowrap; }

/* ---- a record's ask box does not stick: stuck, it slid over its own heading and chip on a short page */
.p3-rec .page-chat form.ask { position: static; }

/* ---- a folded section's count sits right after its title; Show / Hide at the far end */
.frame .page details.r3-fold > summary h2 { justify-content: flex-start; }
details.r3-fold > summary h2::after { margin-left: auto; }

/* Decisions, Unfiled mail, Vendor memory, Promises, Receipts and People's chats, tightened
   (audit Nov 21 2026, area 2): the same signal in fewer words. A routine match is one line, the
   split of what waits is a bar, a vendor is a table row with a bar for its evidence. */

/* ---- the split of what waits: one bar, each part a link to its lane */
.d3-split { display: flex; gap: 3px; align-items: stretch; margin: 0 0 var(--s4); font-size: var(--t-ui); }
.d3-split .d3-seg { flex: 1 1 0; min-width: max-content; padding: 6px var(--s3); border-radius: var(--r-md); background: var(--fill); color: var(--ink); text-decoration: none; white-space: nowrap; }
.d3-split .d3-seg:hover { background: var(--hover); }
.d3-split .d3-seg:focus-visible, .d3-oldest:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.d3-split .d3-seg.is-need { background: var(--signal-soft); color: var(--signal-ink); box-shadow: inset 3px 0 0 var(--signal); }
.d3-split .d3-oldest { flex: 0 0 auto; align-self: center; margin-left: var(--s3); color: var(--ink-2); font-size: var(--t-meta); white-space: nowrap; }
@media (max-width: 640px) { .d3-split { flex-wrap: wrap; } }

/* the thin form: where the unfiled mail is, by sender, with the names under it */
.d3-strip { margin: 0 0 var(--s4); }
.d3-split.is-thin { height: 10px; margin: 0 0 var(--s2); gap: 2px; }
.d3-split.is-thin .d3-seg { min-width: 4px; padding: 0; border-radius: 3px; }
.d3-seg.cc-0, .d3-dot.cc-0 { background: var(--cc-0); } .d3-seg.cc-1, .d3-dot.cc-1 { background: var(--cc-1); }
.d3-seg.cc-2, .d3-dot.cc-2 { background: var(--cc-2); } .d3-seg.cc-3, .d3-dot.cc-3 { background: var(--cc-3); }
.d3-seg.cc-4, .d3-dot.cc-4 { background: var(--cc-4); } .d3-seg.cc-5, .d3-dot.cc-5 { background: var(--cc-5); }
.d3-seg.cc-6, .d3-dot.cc-6 { background: var(--cc-6); } .d3-seg.cc-7, .d3-dot.cc-7 { background: var(--cc-7); }
.d3-seg.is-quiet, .d3-dot.is-quiet { background: var(--line-2); }
.d3-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px var(--s4); font-size: var(--t-meta); }
.d3-legend a { color: var(--ink-2); text-decoration: none; white-space: nowrap; }
.d3-legend a:hover { color: var(--ink); text-decoration: underline; }
.d3-legend b { color: var(--ink); font-weight: 600; }
.d3-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }

/* ---- a routine bank match as one line; the rest of the card opens under "More" */
.d3-rows { gap: 0; }
.frame .page .p4-card.d3-card { padding: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; }
/* Two lines in the 680px column, nothing cut (review Nov 23): the day, the money, the bank's name and
   Approve; under them the entry it is matched to and what agrees. The day and the money size to
   their own text; the name and the books side wrap. */
.d3-row { display: grid; grid-template-columns: max-content max-content minmax(12ch, 1fr) auto auto; gap: 2px var(--s3); align-items: center; padding: 6px 0; font-size: var(--t-ui); }
.d3-row > span { min-width: 0; }
.d3-row .d3-date, .d3-row .d3-amt { white-space: nowrap; }
.d3-row .d3-name, .d3-row .d3-books { overflow-wrap: anywhere; }
.d3-row .d3-books { grid-row: 2; grid-column: 1 / 4; }
.d3-row .d3-ticks { grid-row: 2; grid-column: 4 / -1; justify-self: end; }
.d3-row .of { grid-row: 1; grid-column: 4; white-space: nowrap; }
.d3-row .d3-go { grid-row: 1; grid-column: 5; }
.d3-row .d3-date { color: var(--ink-2); }
.d3-row .d3-date.is-off { color: var(--signal-ink); white-space: normal; }
.d3-row .d3-amt { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.d3-row .d3-books { color: var(--ink-2); }
.d3-row .d3-ticks { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 var(--s2); }
.d3-tick { font-size: var(--t-meta); color: var(--ink-2); white-space: nowrap; }
.d3-tick.is-off { white-space: normal; }
.d3-tick::before { content: ""; display: inline-block; width: 5px; height: 9px; border: solid var(--good, var(--ink-2)); border-width: 0 1.5px 1.5px 0; transform: rotate(40deg); margin: 0 5px 1px 2px; }
.d3-tick.is-off { color: var(--signal-ink); }
.d3-tick.is-off::before { width: 6px; height: 6px; border: 0; border-radius: 50%; background: var(--signal); transform: none; margin: 0 5px 0 0; }
.d3-row .of { font-size: var(--t-meta); color: var(--ink-3); overflow: visible; }
.d3-row .of.is-long { color: var(--signal); }
.frame .d3-row .choices.d3-go { margin: 0; overflow: visible; }
/* armed: the question takes a line of its own under the facts, which stay as they were */
.frame .decision.is-armed .d3-row .d3-go { grid-row: 3; grid-column: 1 / -1; }
.frame .decision.is-armed .d3-row .d3-go form { flex: 1; }
.d3-more { font-size: var(--t-ui); }
.d3-more > summary { cursor: pointer; color: var(--ink-3); font-size: var(--t-meta); padding: 0 0 6px; width: max-content; }
.d3-more > summary:hover { color: var(--ink); }
.d3-more[open] { padding: 0 0 var(--s4) var(--s3); border-left: 2px solid var(--line-2); margin-bottom: var(--s3); }
@media (max-width: 560px) {
  .d3-row { grid-template-columns: max-content max-content minmax(0, 1fr); }
  .d3-row .d3-name { grid-row: 2; grid-column: 1 / -1; }
  .d3-row .of { grid-row: 1; grid-column: 3; justify-self: end; }
  .d3-row .d3-books { grid-row: 3; grid-column: 1 / -1; }
  .d3-row .d3-ticks { grid-row: 4; grid-column: 1 / -1; justify-self: start; justify-content: flex-start; }
  .d3-row .d3-go, .frame .decision.is-armed .d3-row .d3-go { grid-row: 5; grid-column: 1 / -1; }
}

/* who raised a group and how long it has waited, once on its heading */
.d3-g-by { font-weight: 400; color: var(--ink-3); font-size: var(--t-meta); margin-left: var(--s2); }
.d3-g-by.is-long { color: var(--signal); }
.a2-limit summary { white-space: nowrap; }

/* ---- number changes, in the lane with everything else that needs the owner */
.d3-numchanges { margin: var(--s4) 0 0; }
.d3-numchanges > ul { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; gap: var(--s3); }
.frame .page .d3-numchange { border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s3) var(--s4); }
.d3-nc-line { margin: 0; font-size: var(--t-ui); }
.d3-nc-why { max-width: 80ch; margin: var(--s2) 0 0; }
.d3-nc-full > summary { cursor: pointer; color: var(--ink-3); font-size: var(--t-meta); }
.frame .d3-numchange .choices { margin: var(--s2) 0 0; }

/* ---- History, folded; what the Mind withdrew as one line a reason */
.d3-history > summary { cursor: pointer; list-style: none; }
.d3-history > summary::-webkit-details-marker { display: none; }
.frame .page .d3-history > summary .a2-lane-h { display: inline-flex; margin: 0; }
.d3-history > summary .a2-lane-h::after { content: "Show"; font-weight: 400; font-size: var(--t-meta); color: var(--ink-3); margin-left: var(--s2); }
.d3-history[open] > summary .a2-lane-h::after { content: "Hide"; }
.d3-history[open] > summary { margin-bottom: var(--s3); }
.d3-wd summary { cursor: pointer; }
.d3-wd-list { margin: var(--s2) 0 0; padding-left: var(--s5); color: var(--ink-2); font-size: var(--t-meta); }
.d3-older { font-size: var(--t-ui); margin: var(--s3) 0 0; }

/* ---- recovered backup incidents: a line each */
.d3-recs { list-style: none; margin: var(--s2) 0; padding: 0; }
.d3-rec { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s3); align-items: start; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: var(--t-ui); }
.d3-rec summary { cursor: pointer; }
.d3-rec-how { color: var(--ink-2); }
.d3-rec .tr-ack { margin: 0; }

/* ---- unfiled mail: one line a mail */
.d2-row.d3-mail { grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; padding: 5px 0; }
.d2-row.d3-mail .d2-subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d2-row.d3-mail .d2-subj b { font-weight: 500; }
.d3-when { color: var(--ink-3); font-size: var(--t-meta); white-space: nowrap; }
.d3-chip { font-style: normal; font-size: var(--t-meta); padding: 1px 6px; border-radius: var(--r-full); background: var(--signal-soft); color: var(--signal-ink); }
.d2-row.d3-mail .d2-party.is-mixed { white-space: normal; text-align: right; }
@media (max-width: 720px) {
  .d2-row.d3-mail { grid-template-columns: auto minmax(0, 1fr) auto; }
  .d2-row.d3-mail .d2-party { grid-column: 2 / -1; }
}

/* ---- vendor memory: a table, a row a vendor, a bar for the entries that agree */
.d3-vendors { margin: var(--s3) 0; max-width: 980px; }
.d3-vhead, .d3-vendor > summary { display: grid; grid-template-columns: minmax(12ch, 1.2fr) minmax(14ch, 1.6fr) 5.5em minmax(120px, 1fr) 6.5em; gap: var(--s3); align-items: center; }
.d3-vhead { font-size: var(--t-meta); color: var(--ink-3); padding: 0 0 4px; border-bottom: 1px solid var(--line-2); }
.frame .page .a2-vendor.d3-vendor { margin: 0; padding: 0; border-top: 0; border-bottom: 1px solid var(--line); }
.d3-vendor > summary { cursor: pointer; list-style: none; padding: 8px 0; font-size: var(--t-ui); }
.d3-vendor > summary::-webkit-details-marker { display: none; }
.d3-vendor > summary:hover { background: var(--hover); }
.d3-vendor > summary > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d3-vname small, .d3-vgoes small { color: var(--ink-3); font-size: var(--t-meta); }
.d3-vhst { color: var(--ink-2); }
.d3-vbar { display: grid !important; grid-template-columns: 1fr minmax(2.5ch, auto); gap: var(--s2); align-items: center; }
/* a vendor whose lessons disagree: its sides, side by side, never one long bar under "agreeing" */
.d3-track.is-split { display: flex; gap: 2px; background: none; }
.d3-track.is-split i { flex: 1 1 0; min-width: 4px; background: var(--signal); }
.d3-track.is-split i.s1 { background: var(--ink-3); }
.d3-track.is-split i.s2 { background: var(--line-2); }
/* the row opens to its lessons (and Forget): said on the row */
.d3-vendor > summary > .d3-vopen { color: var(--ink-3); font-size: var(--t-meta); text-align: right; text-decoration: underline; text-underline-offset: 2px; }
.d3-vendor > summary:hover > .d3-vopen { color: var(--ink); }
.d3-vendor[open] > summary > .d3-vopen { visibility: hidden; position: relative; }
.d3-vendor[open] > summary > .d3-vopen::after { content: "Hide"; visibility: visible; position: absolute; right: 0; text-decoration: underline; }
.d3-vbar b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.d3-track { height: 6px; border-radius: var(--r-full); background: var(--fill); overflow: hidden; }
.d3-track i { display: block; height: 100%; border-radius: var(--r-full); background: var(--ink); }
.d3-vendor.is-mixed .d3-track i { background: var(--signal); }
.d3-flag { font-size: var(--t-meta); color: var(--ink-3); }
.d3-flag.is-off { color: var(--signal-ink); }
.d3-flag.is-off::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); margin-right: 5px; }
.d3-vendor[open] { padding-bottom: var(--s3); }
.d3-vendor[open] > .p4-done, .d3-vendor[open] > p { margin-left: var(--s4); }
@media (max-width: 640px) {
  .d3-vhead { display: none; }
  .d3-vendor > summary { grid-template-columns: 1fr 1fr; }
  .d3-vendor > summary > .d3-vopen { grid-column: 1 / -1; text-align: left; }
}

/* ---- promises: the line that says what is not read */
.pr-unfiled { margin: var(--s2) 0 var(--s3); font-size: var(--t-ui); }
.pr-unfiled a { color: var(--signal-ink); }

/* ---- receipts: what an upload did, on the page; Upload shows once a file is chosen */
.d3-notice { margin: 0 0 var(--s4); padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--well); font-size: var(--t-ui); }
.d3-notice.is-bad { border-color: var(--signal); }
.d3-notice ul { margin: var(--s2) 0 0; padding-left: var(--s5); }
.a6-drop button:disabled { display: none; }
.a6-drop-pick { display: block; margin: var(--s2) 0; font-size: var(--t-ui); }
.d3-nc-fig { font-variant-numeric: tabular-nums; font-weight: 600; padding: 0 var(--s2); border: 1px solid var(--line-2); border-radius: var(--r-sm); white-space: nowrap; }

/* review Nov 23: a number change whose before and after could not be worked out says so, quietly */
.d3-nc-fig.is-unknown { font-weight: 400; color: var(--ink-3); border-style: dashed; white-space: normal; }

/* ---- vendor memory: the "forget it?" box has its own full line under the lesson, never the row's last narrow column */
.frame .p4-done li.decision-done > .a2-preview { grid-column: 1 / -1; margin-top: 8px; }

/* ---- unfiled mail: a mail with several outside parties names them on its own line, so the subject keeps its room */
.d2-row.d3-mail .d2-party.is-mixed { grid-column: 2 / -1; text-align: left; }

/* ---- number changes: the before and after as words in a pill, right after the name */
.d3-nc-line .d3-nc-fig { margin: 0 var(--s1, 4px); }

/* Chats, the left menu and the right panel after the Nov 21 audit (area 3): less furniture
   around an answer, short cards on the panel, one line where everything passed.
   Loaded just before pane-fit.css, so that file's "the panel never scrolls sideways" still wins. */

/* ---- an answer's by-line: name, time, and one small menu (View run, Correct) */
.frame .msg .by details.c3-msg-more { margin-left: 2px; opacity: .55; }
.frame .msg:hover .by details.c3-msg-more, .frame .msg .by details.c3-msg-more[open], .frame .msg .by details.c3-msg-more:focus-within { opacity: 1; }
.frame .msg .by details.c3-msg-more > summary { width: 22px; height: 22px; }
.frame .msg .by details.c3-msg-more[open] > .e2-menu { top: 26px; width: min(360px, 78vw); font-size: var(--t-ui); }
.frame .msg .by details.c3-msg-more .e2-menu .run-link { font-size: var(--t-ui); color: var(--ink); text-decoration: none; }
.frame .msg .by details.c3-msg-more .e2-menu .run-link::after { content: " ›"; color: var(--ink-3); }
.frame .msg .by details.c3-msg-more .e2-menu details.fix { margin-top: 0; font-size: var(--t-ui); }
.frame .msg .by details.c3-msg-more .e2-menu details.fix > summary { color: var(--ink); margin-left: 0; padding: 0; }
.frame .msg .by details.c3-msg-more .e2-menu form.correct { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s2); white-space: normal; }
.frame .msg .by details.c3-msg-more .e2-menu form.correct input[name=text] { flex: 1 1 180px; min-width: 0; }
.frame .msg .by details.c3-msg-more .e2-menu .fix-note { white-space: normal; }

/* ---- under a chart: its rows, Pin, and one menu for the values as text and Copy */
.frame .msg .chat-figure .cf-foot .c3-pin { display: inline-flex; align-items: center; gap: 5px; }
.frame .msg .chat-figure .cf-foot details.c3-fig-more { margin-left: auto; }
.frame .msg .chat-figure .cf-foot details.c3-fig-more > summary { width: 24px; height: 24px; }
.frame .msg .chat-figure .cf-foot details.c3-fig-more[open] > .e2-menu { top: auto; bottom: 30px; left: auto; right: 0; width: min(340px, 78vw); color: var(--ink); }
.frame .msg .chat-figure .cf-foot details.c3-fig-more details.e2-values { margin: 0; }

/* ---- records an answer read whose names it did not keep: one quiet count */
.msg .chips details.c3-used { font-size: var(--t-meta); color: var(--ink-3); align-self: center; min-width: 0; }
.msg .chips details.c3-used > summary { cursor: pointer; }
.msg .chips details.c3-used .c3-used-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* ---- the record table: a missing date is a quiet dash; cells sit on one line */
.record-facts .rows-table th[scope=row], .record-facts .rows-table td { vertical-align: baseline; }
.record-facts .rows-table .none[title] { color: var(--ink-4); }

/* ---- the stale line is one line */
.e2-answered.is-stale { gap: 4px 8px; }
.e2-answered.is-stale form { margin: 0; }

/* ---- a new chat: the greeting, then things to ask */
.hello.c3-hello h1 { margin-bottom: var(--s4); }
.hello.c3-hello .now { margin: 0 0 var(--s3); }

/* ---- the owner's privacy line is the lock alone (its words on hover) */
.composer .privacy.c3-lock { margin-top: 4px; justify-content: flex-end; color: var(--ink-4); }
.composer .privacy.c3-lock:hover { color: var(--ink-2); }

/* ---- the panel: Team activity as one line */
a.e2-teamact.c3-teamact { padding: 6px 10px; }
a.e2-teamact.c3-teamact .c3-go { margin-left: auto; color: var(--ink-4); }
.sec-h.c3-sec-row a { font-weight: 500; }

/* ---- the panel: a saved number change, short */
.c3-ncs .c3-nc { padding: var(--s3); margin-top: var(--s2); border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.c3-nc .c3-nc-h { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); min-width: 0; }
.c3-nc .c3-nc-h > b { min-width: 0; overflow-wrap: anywhere; }
.c3-delta { flex: none; display: inline-flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.c3-delta i { font-style: normal; color: var(--ink-4); }
.c3-delta b { color: var(--signal-text); font-weight: 600; }
.c3-delta.is-same b { color: var(--ink); }
.c3-nc .c3-adds { margin: 6px 0 0; font-size: var(--t-ui); color: var(--ink-2); overflow-wrap: anywhere; }
.c3-nc .c3-adds mark { background: var(--good-soft); color: var(--ink); border-radius: 3px; padding: 0 3px; }
.c3-nc .c3-adds s { color: var(--ink-4); }
.c3-nc .c3-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: var(--s2); }
.c3-nc .c3-acts form { margin: 0; display: flex; gap: 6px; min-width: 0; }
.c3-nc .c3-acts .c3-refuse { flex: 1 1 150px; }
.c3-nc .c3-ask > summary { list-style: none; cursor: pointer; }
.c3-nc .c3-ask > summary::-webkit-details-marker { display: none; }
.c3-nc .c3-ask[open] { flex: 1 1 100%; }
.c3-nc .c3-ask[open] > form { flex-wrap: wrap; align-items: center; margin-top: 6px; }
.c3-nc .c3-ask-q { flex: 1 1 100%; font-size: var(--t-ui); color: var(--ink-2); overflow-wrap: anywhere; }
.c3-nc .c3-acts .c3-refuse input { flex: 1 1 80px; min-width: 0; width: 100%; }
.c3-nc details.c3-full { margin-top: var(--s2); }
.c3-nc details.c3-full details.exact { margin-top: var(--s2); }
.c3-nc details.c3-full code { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.c3-ncs .c3-why { margin: 0 0 var(--s1); font-size: var(--t-ui); color: var(--ink-2); }
.c3-ncs .sec-h .n { font-weight: 500; }

/* ---- the panel: what is checked, one line when everything passed */
.c3-checked details.fold > summary { justify-content: flex-start; gap: 8px; }
.c3-checked details.fold > summary::after { margin-left: auto; }
.c3-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); }
.c3-dot.is-ok { background: var(--good); }

/* ---- the panel: what was decided lately, quiet */
.c3-decided { font-size: var(--t-meta); margin-top: var(--s2); display: grid; gap: 2px; }

/* ---- the Agents page: version beside the name, built-in agents marked */
.c3-agents td:first-child a { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.c3-agents td .glyph { flex: none; margin-right: 0; }

/* ---- the ask box on a page: one line; where it goes and the keys only when in use */
.page-chat.c3-ask .pc-to { display: none; }
.page-chat.c3-ask:focus-within .pc-to { display: block; }
.page-chat.c3-ask .composer-row .tool, .page-chat.c3-ask form.ask > .key-hints { display: none; }
.page-chat.c3-ask:focus-within .composer-row .tool { display: inline-flex; }
.page-chat.c3-ask .pc-head .c3-lock { margin-left: auto; color: var(--ink-4); display: inline-flex; }
.page-chat.c3-ask .pc-head { margin-bottom: var(--s2); }

/* ---- voice, when it is off: the type box alone */
.c3-voice-off { display: flex; flex-direction: column; align-items: center; gap: var(--s4); margin: 18vh auto 0; color: var(--ink-2); text-align: center; }
.c3-voice-off b { font-weight: 500; font-size: 16px; color: var(--ink); }
.c3-voice-back { font-size: var(--t-ui); color: var(--ink-3); text-decoration: none; }
.c3-voice-back:hover, .c3-voice-back:focus-visible { color: var(--ink); text-decoration: underline; }
.c3-voice-mark { display: inline-flex; align-items: center; gap: 6px; height: 56px; }
.c3-voice-mark i { width: 6px; height: 14px; border-radius: 3px; background: var(--ink-3); animation: c3Voice 1.6s ease-in-out infinite; }
.c3-voice-mark i:nth-child(2) { animation-delay: .15s; }
.c3-voice-mark i:nth-child(3) { animation-delay: .3s; }
.c3-voice-mark i:nth-child(4) { animation-delay: .45s; }
.c3-voice-mark i:nth-child(5) { animation-delay: .6s; }
@keyframes c3Voice { 0%, 100% { height: 10px; opacity: .45; } 50% { height: 40px; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .c3-voice-mark i { animation: none; height: 20px; } }

/* ---- the frame: "How this works", a small fold in the head */
details.e2-more.c3-about > summary { font-weight: 600; font-size: var(--t-ui); }
details.e2-more.c3-about[open] > .e2-menu { left: auto; right: 0; }
.c3-changes { font-size: var(--t-ui); color: var(--ink-2); overflow-wrap: anywhere; }

/* ---- Books panel: pause or resume chat answers, one line in the Agent fold */
.c3-chat-switch { display: flex; align-items: center; gap: var(--s2); margin: 6px 0; font-size: var(--t-ui); color: var(--ink-2); }

/* The board (/board): projects by stage, tasks by state. One screen at 1440x900; a long
   column scrolls inside itself; the page never scrolls sideways; narrow widths stack. */
.b4 { display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.b4-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.b4-seg { flex: none; margin: 0; }
.b4-seg .p3-seg-i { padding: 0 10px; }
.b4-chips { display: flex; flex-wrap: nowrap; gap: var(--s1); min-width: 0; flex: 1 1 0; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
.b4-chip { flex: none; }
.b4-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border: 1px solid var(--line-2); border-radius: var(--r-full); font-size: var(--t-meta); color: var(--ink-2); text-decoration: none; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b4-chip span { color: var(--ink-3); }
.b4-chip:hover { background: var(--hover); }
.b4-chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.b4-chip[aria-current="true"] span { color: var(--on-ink); opacity: .7; }
.b4-said { font-size: var(--t-meta); color: var(--good); }

.b4-board { display: grid; grid-template-columns: repeat(var(--b4-n, 7), minmax(0, 1fr)); gap: var(--s2); align-items: start; min-width: 0; }
.b4-n3 { --b4-n: 3; }
.b4-n7 { --b4-n: 7; }
.b4-col { display: flex; flex-direction: column; min-width: 0; background: var(--well); border-radius: var(--r-md); padding: var(--s2); border: 1px solid transparent; }
.b4-col.is-over { border-color: var(--c-work); background: var(--hover); }
.b4-col.is-folded { align-self: start; }
.frame .page .b4-col-h { display: flex; align-items: center; justify-content: flex-start; gap: 6px; margin: 0 0 var(--s2); padding: 0 2px; border: 0; font-size: var(--t-meta); font-weight: 600; color: var(--ink-2); text-transform: none; }
.b4-col-h > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b4-col-h b { font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.frame .page .b4-col.is-folded .b4-col-h { margin: 0; }
.b4-fold { margin-left: auto; font-weight: 500; font-size: var(--t-meta); color: var(--ink-3); }
.b4-cards { display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - var(--head-h) - 160px); overflow-y: auto; overflow-x: hidden; min-height: 24px; }

.b4-card { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-xs); font-size: var(--t-meta); min-width: 0; }
.b4-card[draggable="true"] { cursor: grab; }
.b4-card.is-drag { opacity: .45; }
.b4-card.is-late { border-left: 3px solid var(--bad); }
.b4-card.is-moved { border-color: var(--c-work); }
.b4-name { font-size: var(--t-ui); font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.b4-name:hover { text-decoration: underline; }
.b4-who { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b4-facts { display: flex; flex-wrap: wrap; gap: 2px 8px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.b4-bad { color: var(--bad); font-weight: 600; }
.b4-moved { display: flex; align-items: center; gap: 4px; margin: 2px 0 0; color: var(--good); font-size: var(--t-meta); }
.b4-moved button { padding: 0; border: 0; background: none; color: var(--ink); text-decoration: underline; font: inherit; cursor: pointer; }

.b4-move { align-self: stretch; margin-top: 2px; }
.b4-move > summary { display: inline-block; }
.b4-move > summary { list-style: none; cursor: pointer; padding: 1px 6px; margin-left: -6px; border-radius: var(--r-sm); font-size: var(--t-label); color: var(--ink-3); }
.b4-move > summary::-webkit-details-marker { display: none; }
.b4-move > summary:hover, .b4-move[open] > summary { background: var(--fill); color: var(--ink); }
.b4-move form { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 0 -6px; }
.b4-move form button { padding: 3px 8px; border: 1px solid var(--line-2); background: var(--bg); border-radius: var(--r-full); font: inherit; font-size: var(--t-meta); color: var(--ink); cursor: pointer; }
.b4-move form button:hover, .b4-move form button:focus-visible { background: var(--hover); }

/* narrower: fewer columns per row, then one column stacked */
@media (max-width: 1100px) { .b4-n7 { --b4-n: 4; } }
@media (max-width: 760px) {
  .b4-chips { flex-wrap: wrap; flex-basis: 100%; overflow-x: visible; }
  .b4-board, .b4-n3, .b4-n7 { grid-template-columns: minmax(0, 1fr); }
  .b4-cards { max-height: none; }
}

/* Tax and year end > To confirm, made calm (Nov 23): one bar, two numbers, one button.
   Everything else sits behind a fold. Same tokens as the rest; nothing new. */

/* where the facts stand: confirmed of all, then what waits on the owner */
.c4-top { display: grid; gap: var(--s3); max-width: 640px; margin: 0 0 var(--s5); }
.c4-bar { display: grid; gap: 6px; }
.c4-bar .track { display: block; height: 10px; border-radius: var(--r-full); background: var(--fill); overflow: hidden; }
.c4-bar .track i { display: block; height: 100%; border-radius: var(--r-full); background: var(--good); }
.c4-bar .l { font-size: var(--t-meta); color: var(--ink-2); }
.c4-nums { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); }
.c4-n { display: flex; align-items: baseline; gap: var(--s2); color: var(--ink-2); text-decoration: none; font-size: var(--t-ui); }
.c4-n b { font-size: var(--t-fig); font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; color: var(--ink); }
.c4-n.is-ask b { color: var(--signal-ink); }
.c4-n.is-calm b { color: var(--good); }
a.c4-n:hover span { color: var(--ink); text-decoration: underline; }
a.c4-n:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.c4-calm { margin: 0 0 var(--s4); color: var(--good); font-size: var(--t-ui); }

/* a section: its name, a few words, and at most one button */
.c4-sec { max-width: 760px; margin: 0 0 var(--s5); }
.c4-h { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin: 0 0 var(--s2); }
.cra .c4-h h2, .c4-h h2 { margin: 0; padding: 0; border: 0; font-size: var(--t-ui); line-height: inherit; }
.c4-h .btn { margin-left: auto; }
.c4-note { max-width: 760px; margin: 0 0 var(--s4); }

/* a question: one line, then its answers as buttons */
.c4-q { display: grid; gap: 6px; padding: var(--s3) 0; border-top: 1px solid var(--line); }
.c4-answers { display: flex; flex-wrap: wrap; gap: var(--s2); }
.c4-answers form { margin: 0; }
.c4-answers .btn { white-space: normal; text-align: left; }

/* folds: every answer, what can wait, what is done */
.c4-fold > summary { cursor: pointer; padding: 6px 0; font-size: var(--t-ui); color: var(--ink-2); }
.c4-fold > summary:hover { color: var(--ink); }
.c4-table { width: 100%; table-layout: fixed; }
.c4-table td { vertical-align: top; overflow-wrap: anywhere; }
.c4-table td:first-child { width: 28px; }
.c4-table td:last-child { width: 42%; }
.c4-table select, .c4-table input:not([type="checkbox"]) { width: 100%; max-width: 100%; min-width: 0; }
.c4-src { white-space: nowrap; }
.c4-src::before { content: "· "; }
.c4-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--s3); padding: 8px 0; border-top: 1px solid var(--line); font-size: var(--t-ui); overflow-wrap: anywhere; }
.c4-own { flex-basis: 100%; }
.c4-own > summary { cursor: pointer; font-size: var(--t-meta); color: var(--ink-2); }
.c4-own form { margin: 6px 0; }
.c4-own select, .c4-own input { max-width: 100%; }
:target.c4-row, :target.c4-q, tr:target { background: var(--signal-soft); }

/* Bank cards: who holds each, and automatic approval for the one holder's routine purchases
   (Nov 23). Only aa- classes; the same tokens as the rest, no new colours. */

/* ---- Settings: each card on a line, then the switch with its limit */
.aa-cards .aa-row { display: flex; flex-wrap: wrap; gap: 4px var(--s3); align-items: center; min-width: 0; }
.aa-cards form.aa-inline, .aa-hint form.aa-inline { display: inline-flex; margin: 0; }
.aa-cards details.aa-change { font-size: var(--t-meta); }
.aa-cards details.aa-change > summary { cursor: pointer; color: var(--ink-2); width: max-content; }
.aa-cards details.aa-change > summary:hover, .aa-cards details.aa-change > summary:focus-visible { color: var(--ink); }
.aa-cards .aa-who { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: center; margin-top: 4px; }
.aa-cards .aa-who label { display: inline-flex; gap: 4px; align-items: center; }
.aa-rule { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: center; margin: var(--s3) 0 var(--s2); padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--well); font-size: var(--t-ui); }
.aa-rule .aa-state { display: inline-flex; gap: var(--s2); align-items: baseline; flex-wrap: wrap; }
.aa-rule .dot { width: 8px; height: 8px; border-radius: var(--r-full); background: var(--ink-4); flex: none; transform: translateY(-1px); }
.aa-rule.is-on .dot { background: var(--good); }
.aa-rule .aa-form { display: inline-flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin: 0 0 0 auto; }
.aa-rule .aa-form input { width: 6.5em; }
.aa-how { margin: 0 0 var(--s2); font-size: var(--t-meta); color: var(--ink-2); }
.aa-said { margin: 0 0 var(--s3); padding: var(--s2) var(--s3); border-radius: var(--r-md); background: var(--good-soft); color: var(--ink); font-size: var(--t-ui); }
.aa-never { margin: 4px 0 0; padding-left: 1.2em; color: var(--ink-2); font-size: var(--t-meta); }

/* ---- Decisions: one quiet line that opens the list, each with its Undo */
.aa-hint { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s3); align-items: center; margin: 0 0 var(--s3); font-size: var(--t-meta); color: var(--ink-2); }
details.aa-auto { margin: 0 0 var(--s4); font-size: var(--t-meta); color: var(--ink-2); }
details.aa-auto > summary { cursor: pointer; width: max-content; max-width: 100%; }
details.aa-auto > summary:hover, details.aa-auto > summary:focus-visible { color: var(--ink); }
details.aa-auto > summary b { color: var(--ink); }
.aa-list { list-style: none; margin: var(--s2) 0 0; padding: 0; border-top: 1px solid var(--line); }
.aa-list li { display: grid; grid-template-columns: 5.5em 6.5em minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 2px var(--s3); align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: var(--t-ui); color: var(--ink); }
.aa-list li.is-off { color: var(--ink-3); }
.aa-list .aa-amt { text-align: right; font-variant-numeric: tabular-nums; }
.aa-list .aa-d { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.aa-list .aa-name, .aa-list .aa-acct { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.aa-list form.inline { margin-left: 0; }
@media (max-width: 760px) {
  .aa-list li { grid-template-columns: 5.5em 1fr; }
  .aa-list .aa-amt { text-align: left; }
  .aa-rule .aa-form { margin-left: 0; }
}

/* Connectors (Nov 23 2026): Settings > Connectors. A card per connection: a dot, its name,
   its state and last good time on one line; what it brings in under it; then its rows and
   the one action that fits. Rarely-needed actions sit behind "More". */
.c4-page { max-width: 760px; }
.c4-cards { display: grid; gap: var(--s3); margin-top: var(--s4); }
.c4-card { padding: var(--s4); border-radius: var(--r-lg); background: var(--well); min-width: 0; }
.c4-card > header { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.frame .page .c4-card h2 { font-size: var(--t-title); font-weight: 600; margin: 0; padding: 0; border: 0; }
.frame .page .c4-card h2::before { content: none; }
.c4-card .dot, .c4-rows .dot { width: 8px; height: 8px; border-radius: var(--r-full); background: var(--ink-4); flex: none; align-self: center; }
.c4-card.is-ok > header .dot, .c4-rows .is-ok .dot { background: var(--good); }
.c4-card.is-warn > header .dot, .c4-rows .is-warn .dot { background: var(--signal); }
.c4-state { margin-left: auto; font-size: var(--t-ui); font-weight: 600; }
.c4-card.is-warn .c4-state { color: var(--signal-ink); }
.c4-card.is-off .c4-state { color: var(--ink-3); }
.c4-at { font-size: var(--t-meta); color: var(--ink-3); white-space: nowrap; }
.frame .page .c4-card .c4-brings { margin: 2px 0 0 16px; font-size: var(--t-ui); color: var(--ink-2); }
.frame .page .c4-card .c4-step { margin: var(--s2) 0 0 16px; font-size: var(--t-meta); color: var(--ink-2); }
.c4-row { display: flex; gap: var(--s2); flex-wrap: wrap; margin: var(--s3) 0 0 16px; }
.c4-card form { margin: 0; }
.frame .c4-card button, .frame .c4-add button, .c4-add a.btn { height: 28px; font-size: var(--t-meta); padding: 0 12px; }

.c4-rows { list-style: none; margin: var(--s3) 0 0; padding: 0; border-top: 1px solid var(--line-2); }
.c4-rows li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto auto; gap: var(--s3); align-items: center; padding: var(--s2) 0; border-bottom: 1px solid var(--line-2); font-size: var(--t-ui); }
.c4-rows .name { display: grid; min-width: 0; }
.c4-rows .name b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c4-rows small, .c4-addlist small, .c4-requests small, .c4-activity small { color: var(--ink-3); font-size: var(--t-meta); }
.c4-rows .st { white-space: nowrap; }
.c4-rows .is-warn .st { color: var(--signal-ink); font-weight: 600; }
.c4-rows .act { display: flex; gap: var(--s2); align-items: center; justify-content: flex-end; }
.c4-more { position: relative; }
.c4-more summary { cursor: pointer; font-size: var(--t-meta); color: var(--ink-3); list-style: none; padding: 4px 6px; border-radius: var(--r-sm); }
.c4-more summary::-webkit-details-marker { display: none; }
.c4-more summary:hover { background: var(--hover); color: var(--ink); }
.c4-more > div { position: absolute; right: 0; top: 100%; z-index: 3; display: grid; gap: var(--s2); padding: var(--s3); min-width: 170px; border-radius: var(--r-md); background: var(--bg); box-shadow: var(--shadow-float); }

.c4-signin { margin: var(--s3) 0 0; padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--bg); box-shadow: inset 2px 0 0 var(--signal); }
.c4-signin ol { margin: 0; padding-left: 18px; font-size: var(--t-ui); display: grid; gap: 4px; }
.c4-code { font-family: var(--mono); font-size: var(--t-title); letter-spacing: .08em; user-select: all; }
.c4-wait { display: flex; align-items: center; gap: var(--s2); margin: var(--s3) 0 0; font-size: var(--t-ui); color: var(--ink-2); }
.c4-wait small { color: var(--ink-3); }
.c4-spin { width: 10px; height: 10px; border-radius: var(--r-full); border: 2px solid var(--ink-4); border-top-color: var(--signal); animation: c4-spin 1s linear infinite; }
@keyframes c4-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .c4-spin { animation: none; } }
.c4-signin .c4-row { margin-left: 0; }

.c4-card form.c4-make { display: flex; gap: var(--s2); margin: var(--s3) 0 0 16px; }
.frame .c4-make input, .frame .c4-ask input { flex: 1; min-width: 0; height: 28px; font-size: var(--t-ui); }

.c4-notice { padding: 8px 12px; border-radius: var(--r-md); font-size: var(--t-ui); background: var(--good-soft); color: var(--good); }
.c4-notice.is-bad { background: var(--bad-soft); color: var(--bad); }

.c4-add { margin-top: var(--s6); }
.frame .page .c4-add h2 { font-size: var(--t-title); font-weight: 600; margin: 0 0 var(--s2); }
.c4-addlist, .c4-requests, .c4-activity ul { list-style: none; margin: 0; padding: 0; }
.c4-addlist li, .c4-requests li, .c4-activity li { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--line); font-size: var(--t-ui); }
.c4-addlist span { display: grid; min-width: 0; }
.c4-ask { display: grid; gap: 4px; margin-top: var(--s4); font-size: var(--t-ui); }
.c4-ask > div { display: flex; gap: var(--s2); }
.c4-requests { margin-top: var(--s2); }
.c4-requests b { font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.c4-requests span { white-space: nowrap; color: var(--ink-2); }

.c4-fold { margin: var(--s3) 0 0 16px; font-size: var(--t-meta); color: var(--ink-2); }
.c4-fold summary { cursor: pointer; color: var(--ink-2); }
.frame .page .c4-fold p { margin: var(--s2) 0 0; }
.c4-activity { margin: var(--s5) 0 0; font-size: var(--t-ui); }
.c4-activity .n { color: var(--ink-3); font-weight: 400; }
.c4-activity li span { min-width: 0; overflow-wrap: anywhere; }
.c4-activity li small { white-space: nowrap; }

@media (max-width: 720px) {
  .c4-rows li { grid-template-columns: 8px minmax(0, 1fr) auto; }
  .c4-rows .act { grid-column: 2 / -1; justify-content: flex-start; }
}

/* The door for other agents (Nov 23 2026): today's use in one line, the reach switch, and the
   setup blocks behind small tabs. Radio tabs: no script needed. */
.d4-used { margin: var(--s3) 0 0; font-size: var(--t-meta); color: var(--ink-3); }
.d4-used b { color: var(--ink-2); font-weight: 600; }
.d4-reach { display: flex; align-items: center; gap: var(--s3); margin: var(--s4) 0; padding: var(--s3) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: var(--t-ui); }
.d4-reach > span:not(.d4-dot) { flex: 1; min-width: 0; display: grid; }
.d4-reach b { font-weight: 600; }
.d4-reach small { color: var(--ink-3); font-size: var(--t-meta); }
.d4-reach form { margin: 0; }
.d4-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.d4-dot.is-on { background: var(--good); box-shadow: none; }
.d4-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: var(--s2) 0 var(--s3); max-width: 100%; }
.d4-tabs > input { position: absolute; opacity: 0; pointer-events: none; }
.d4-tabs > label { padding: 4px 10px; border-radius: var(--r-full); background: var(--fill); color: var(--ink-2); font-size: var(--t-meta); font-weight: 500; cursor: pointer; }
.d4-tabs > label:hover { background: var(--hover); color: var(--ink); }
.d4-tabs > input:checked + label { background: var(--ink); color: var(--on-ink); }
.d4-tabs > input:focus-visible + label { outline: 2px solid var(--signal); outline-offset: 2px; }
.d4-panel { display: none; flex-basis: 100%; min-width: 0; margin-top: var(--s2); }
.d4-panel p { margin: 0 0 6px; font-size: var(--t-ui); color: var(--ink-2); }
.d4-panel a { color: var(--ink); text-underline-offset: 3px; }
#d4-cc:checked ~ .d4-p-cc, #d4-cd:checked ~ .d4-p-cd, #d4-cx:checked ~ .d4-p-cx, #d4-cu:checked ~ .d4-p-cu, #d4-vs:checked ~ .d4-p-vs, #d4-mcp:checked ~ .d4-p-mcp, #d4-cli:checked ~ .d4-p-cli { display: block; }

/* Connect your agent (Nov 24 2026): the address first, a tab per agent, the live connections,
   a key by hand folded below. And the one plain question an agent's sign-in asks (o5-consent). */
.o5-door .o5-sub { margin: 0 0 var(--s4); color: var(--ink-2); font-size: var(--t-chat); }
.o5-address { display: flex; gap: var(--s2); align-items: stretch; }
.frame .o5-address input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--well); color: var(--ink); font: 14px/1 var(--mono); }
.frame .o5-address button { height: 40px; padding: 0 18px; }
.o5-where { display: flex; align-items: center; gap: var(--s3); margin: var(--s2) 0 var(--s4); font-size: var(--t-ui); color: var(--ink-2); }
.o5-where > span:not(.d4-dot) { flex: 1; min-width: 0; }
.o5-where b { color: var(--ink); font-weight: 600; }
.o5-where form { margin: 0; flex: none; }
.frame .o5-where button { height: 28px; font-size: var(--t-meta); }
.o5-after { margin: 6px 0 0; font-size: var(--t-meta); color: var(--ink-3); }
.o5-after code, .o5-byhand code { font: 12px var(--mono); background: var(--fill); padding: 1px 5px; border-radius: var(--r-sm); overflow-wrap: anywhere; }
.o5-door .o5-facts-row { margin: var(--s4) 0; }
.o5-note { margin: 0 0 var(--s2); padding: 8px 12px; border-radius: var(--r-md); background: var(--good-soft); color: var(--good); font-size: var(--t-ui); font-weight: 500; }
.o5-note[hidden] { display: none; }
.o5-empty { display: grid; gap: 2px; padding: var(--s3) 0; }
.o5-empty small { color: var(--ink-3); font-size: var(--t-meta); }
.o5-byhand { margin-top: var(--s4); }
.o5-byhand .p4-make { margin-top: var(--s3); }
@media (max-width: 640px) {
  .o5-where { flex-wrap: wrap; }
  .o5-door .p4-facts { grid-template-columns: 1fr; }
  .o5-door .p4-fact + .p4-fact { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .o5-door .p4-key { grid-template-columns: 32px 1fr; }
  .o5-door .p4-key .used, .o5-door .p4-key .act { grid-column: 2; text-align: left; }
  /* last used and calls today stay on a phone, on one line (part4 hides them for other key lists) */
  .o5-door .p4-key .used { display: flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline; }
}

.o5-card { max-width: 420px; }
.o5-consent h1 { font-size: 21px; line-height: 1.25; font-weight: 500; }
.o5-consent h1 b { font-weight: 650; overflow-wrap: anywhere; }
.o5-consent .lead { color: var(--ink-2); font-size: 15px; line-height: 1.45; margin: var(--s3) 0 var(--s4); }
.o5-facts { list-style: none; padding: 0; margin: 0 0 var(--s5); display: grid; gap: var(--s2); }
.o5-facts li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--t-ui); color: var(--ink-2); }
.o5-facts svg { flex: none; margin-top: 2px; color: var(--ink-3); }
.o5-buttons { display: flex; gap: var(--s2); }
.o5-buttons button { flex: 1; height: 40px; font-size: 14px; }
.signin .o5-buttons button.quiet { background: var(--fill); color: var(--ink); }
.signin .o5-buttons button.quiet:hover { background: var(--hover); }
.o5-switch { margin-top: var(--s3); text-align: center; }
.o5-switch button { background: none; border: 0; color: var(--ink-3); font: var(--t-meta) var(--sans); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
/* the consent page: what the name is and where the browser goes next, set apart; a notice
   when the page was open too long; the short "Allowed" page; a connection marked older */
.o5-who { margin: 0 0 var(--s4); padding: 10px 12px; border-radius: var(--r-md); background: var(--well); color: var(--ink-2); font-size: var(--t-ui); line-height: 1.45; }
.o5-who b { color: var(--ink); font-weight: 600; font-family: var(--mono); font-size: 13px; }
.o5-notice { margin: 0 0 var(--s3); padding: 8px 12px; border-radius: var(--r-md); background: var(--fill); color: var(--ink); font-size: var(--t-ui); }
.o5-allowed h1 { font-size: 21px; font-weight: 600; }
.o5-allowed .lead { color: var(--ink-2); font-size: 15px; line-height: 1.45; margin: var(--s2) 0 var(--s4); }
.o5-allowed .o5-back { font-size: var(--t-ui); }
.o5-older { color: var(--ink-3); font-style: italic; }

/* Approve through your agent (Dec 2 2026): on the person's own connection, a fold with the tick,
   the most for each card and one line of warning; on anyone else's, one quiet line. */
.o5-approve, .o5-can { grid-column: 2 / -1; margin: 0; font-size: var(--t-meta); color: var(--ink-3); }
.o5-approve summary { cursor: pointer; color: var(--ink-2); font-weight: 500; }
.o5-approve form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 6px 0 0; }
.o5-tick { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--ink-2); font-size: var(--t-ui); }
.frame .o5-tick input[name="cap"], .frame .o5-tick input[name="day"] { width: 6em; height: 28px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--well); color: var(--ink); font: inherit; }
.frame .o5-approve button { height: 28px; font-size: var(--t-meta); }
.o5-warn { margin: 6px 0 0; color: var(--signal-ink); font-weight: 500; }

/* Dashboards on the left menu (Nov 23 2026): the menu's lines, a dashboard's own page, and the
   page that makes one (web/menu-dash.ts, web/shell.ts). */

/* ---------------------------------------------------------------- the menu */
.rail .nav-item.rd-item span:not(.count), .rail .nav-item.rd-add span:not(.count), .rail .rd-more > summary span:not(.count) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail .nav-item.rd-item svg, .rail .nav-item.rd-add svg, .rail .rd-more > summary svg { flex: none; }
.rail .nav-item.rd-add, .rail .rd-more > summary { color: var(--ink-3); }
.rail .nav-item.rd-add:hover, .rail .rd-more > summary:hover { color: var(--ink); }
.rail .rd-more > summary { list-style: none; cursor: pointer; }
.rail .rd-more > summary::-webkit-details-marker { display: none; }
.rail .rd-more > summary svg { width: 16px; height: 12px; transition: transform var(--t-fast) var(--ease); }
.rail .rd-more[open] > summary svg { transform: rotate(90deg); }
.rail .rd-more > summary .count { background: var(--fill); color: var(--ink-2); }
.rail .tone-today svg { color: var(--cc-1); }
@media (max-width: 760px) {
  .frame > .rail .nav .rd-item { max-width: 14em; }
  .frame > .rail .nav .rd-more[open] { display: flex; flex-direction: row; gap: 2px; }
}

/* ---------------------------------------------------------------- shared small parts */
.rd-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: var(--r-full); background: var(--fill); color: var(--ink-2); font-size: var(--t-meta); white-space: nowrap; }
.rd-editlink { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: var(--r-md); color: var(--ink-2); font-size: var(--t-ui); text-decoration: none; box-shadow: inset 0 0 0 1px var(--line-2); }
.rd-editlink:hover { background: var(--hover); color: var(--ink); }
.rd-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); flex: none; }
.rd-dot.is-need { background: var(--need, var(--signal)); }
.rd-dot.is-bad { background: var(--bad); }
.rd-dot.is-working { background: var(--signal); animation: rd-breathe 1.4s ease-in-out infinite; }
@keyframes rd-breathe { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .rd-dot.is-working { animation: none; } }
.rd-none { margin: var(--s2) 0; color: var(--ink-3); font-size: var(--t-ui); }
.rd-state.is-said { color: var(--ink); }
.rd-state { display: flex; align-items: center; gap: var(--s2); margin: var(--s3) 0 0; color: var(--ink-2); font-size: var(--t-ui); max-width: 72ch; }
.rd-box { display: flex; gap: var(--s2); }
.rd-box input { flex: 1; min-width: 0; height: 36px; }
.rd-box button { height: 36px; flex: none; }
.rd-acts { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.rd-wait { display: flex; align-items: center; gap: var(--s2); margin: 0; color: var(--ink-2); font-size: var(--t-ui); }

/* ---------------------------------------------------------------- tiles, large */
.rd-grid { display: grid; gap: var(--s3); grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); }
.rd-grid.n-1 { grid-template-columns: minmax(0, 1fr); }
.rd-grid.n-2, .rd-grid.n-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rd-grid.n-7, .rd-grid.n-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rd-tile { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: var(--s4); border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--bg); color: inherit; text-decoration: none; overflow: hidden; transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
a.rd-tile:hover { border-color: var(--ink-4); box-shadow: var(--shadow-xs); color: inherit; }
.rd-tile.is-new { border-style: dashed; }
.rd-lab { display: flex; align-items: baseline; gap: var(--s2); min-width: 0; color: var(--ink-2); font-size: var(--t-ui); }
.rd-lab span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-lab small { flex: none; color: var(--ink-3); font-size: var(--t-meta); }
.rd-v { margin: auto 0; padding: var(--s2) 0; font-size: clamp(28px, 3.4vw, 52px); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rd-v.is-unver, .rd-v.is-none { display: flex; align-items: center; gap: var(--s2); font-size: 15px; font-weight: 400; letter-spacing: 0; color: var(--ink-3); }
.rd-chart { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; margin-top: var(--s2); }
.rd-chart svg.colour-chart { width: 100%; max-width: none; height: 100%; max-height: 100%; }
.rd-chart .colour-pie { max-height: 100%; min-width: 0; }
.rd-chart .colour-pie svg.colour-chart { width: auto; height: auto; max-width: 180px; }
.rd-chart .colour-pie .pie-legend { min-width: 0; overflow: hidden; }

/* ---------------------------------------------------------------- a dashboard's page: one screen */
.frame .page:has(> .page-col > .rd-page) { display: flex; flex-direction: column; padding-bottom: var(--s4); }
.frame .page.is-wide .page-col:has(> .rd-page) { flex: 1; min-height: 0; max-width: none; display: flex; flex-direction: column; }
.rd-page { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--s3); }
.rd-page > .rd-grid { flex: 1; min-height: 0; }
.rd-page > .rd-state { margin: 0; }
.rd-ask { flex: none; max-width: 720px; width: 100%; }
.rd-change { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--well, var(--fill)); }
.rd-change-w { flex: 1 1 260px; min-width: 0; display: grid; gap: 2px; }
.rd-change-w span { color: var(--ink-2); overflow-wrap: anywhere; }
/* seven or eight tiles, or a narrow window: the page scrolls and each tile keeps a readable height */
.rd-page > .rd-grid.n-7, .rd-page > .rd-grid.n-8 { grid-auto-rows: minmax(200px, 1fr); }
@media (max-width: 900px) {
  .frame .page:has(> .page-col > .rd-page), .frame .page.is-wide .page-col:has(> .rd-page), .rd-page { display: block; }
  .rd-page > * + * { margin-top: var(--s3); }
  .rd-grid, .rd-grid.n-2, .rd-grid.n-4, .rd-grid.n-7, .rd-grid.n-8 { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .rd-tile.is-chart { min-height: 220px; }
  .rd-chart svg.colour-chart { height: auto; }
}
@media (min-width: 901px) and (max-width: 1200px) {
  .rd-grid, .rd-grid.n-7, .rd-grid.n-8 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rd-grid.n-1 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- the page that makes one */
.rd-newpage { max-width: 920px; display: grid; gap: var(--s4); align-content: start; }
.rd-new { display: grid; gap: var(--s3); max-width: 720px; }
.rd-new > label[for] { font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.rd-tries { display: flex; flex-wrap: wrap; gap: var(--s2); }
.frame .rd-tries button.rd-try { height: 30px; padding: 0 12px; border-radius: var(--r-full); background: var(--fill); color: var(--ink-2); font-weight: 400; }
.frame .rd-tries button.rd-try:hover { background: var(--hover); color: var(--ink); }
.rd-all { display: flex; align-items: center; gap: var(--s2); color: var(--ink-2); font-size: var(--t-ui); }
.rd-newpage > .rd-state { margin: 0; }
.rd-preview { display: grid; gap: var(--s3); padding: var(--s4); border: 1px solid var(--line-2); border-radius: var(--r-lg); }
.rd-preview-h { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.rd-preview-h b { font-size: 15px; min-width: 0; overflow-wrap: anywhere; }
.rd-by { color: var(--ink-3); font-size: var(--t-meta); }
.rd-preview .rd-grid.is-preview { grid-auto-rows: minmax(120px, auto); }
.rd-preview .rd-grid.is-preview .rd-v { font-size: 28px; }
.rd-preview .rd-grid.is-preview .rd-chart svg.colour-chart { height: auto; }
.rd-preview .rd-none { margin: 0; }

/* ---------------------------------------------------------------- editing one */
.rd-edit { max-width: 560px; display: grid; gap: var(--s4); align-content: start; }
.rd-rename { display: grid; gap: 6px; }
.rd-rename label, .rd-sec { font-size: var(--t-meta); color: var(--ink-3); }
.rd-sec { margin-bottom: calc(-1 * var(--s3)); }
.rd-tiles { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rd-tiles li { display: flex; align-items: center; gap: var(--s2); padding: 6px 0; border-bottom: 1px solid var(--line); }
.rd-tname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-tiles form { display: flex; gap: 4px; flex: none; }
.frame .rd-tiles button { height: 28px; padding: 0 9px; }
.frame .rd-tiles button[disabled] { opacity: .35; cursor: default; }
.rd-versions { margin: var(--s2) 0 0; padding: 0; list-style: none; color: var(--ink-3); font-size: var(--t-meta); display: grid; gap: 2px; }
.rd-off form { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-top: var(--s2); color: var(--ink-2); }

/* ---------------------------------------------------------------- each person's own order (web/shell.ts railMenu)
   A small handle beside each line: drag it, or open it to move or hide the line. Quiet until
   the line is hovered or focused; always there on a touch screen. */
.rail .rm-list { display: flex; flex-direction: column; gap: 1px; list-style: none; margin: 0; padding: 0; }
.rail .rm-line { position: relative; display: flex; align-items: center; min-width: 0; border-radius: var(--r-md); }
.rail .rm-line > .nav-item { flex: 1; min-width: 0; }
.rail .rm-line.is-dragging { opacity: .55; background: var(--hover); }
.rail .rm-line[hidden] { display: none; }
.rail .rm-menu { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); }
.rail .rm-menu[open] { z-index: 6; }
.rail .rm-grip { list-style: none; display: grid; place-items: center; width: 20px; height: 24px; border-radius: var(--r-sm, 4px); color: var(--ink-3); cursor: grab; touch-action: none; opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.rail .rm-grip::-webkit-details-marker { display: none; }
.rail .rm-grip svg { stroke-width: 2.4; }
.rail .rm-grip:hover { background: var(--fill); color: var(--ink); }
.rail .rm-line:hover .rm-grip, .rail .rm-line:focus-within .rm-grip, .rail .rm-menu[open] .rm-grip, .rail .rm-line.is-dragging .rm-grip { opacity: 1; }
.rail .rm-line.is-dragging .rm-grip { cursor: grabbing; }
/* the line's own count moves aside while the handle shows, so they never sit on each other */
.rail .rm-line:hover > .nav-item .count, .rail .rm-line:focus-within > .nav-item .count { margin-right: 22px; }
@media (pointer: coarse) {
  .rail .rm-grip { opacity: 1; width: 28px; height: 32px; }
  .rail .rm-line > .nav-item { padding-right: 30px; }
  .rail .rm-line > .nav-item .count { margin-right: 0; }
}
.rail .rm-pop { position: absolute; right: 0; top: calc(100% + 4px); display: grid; min-width: 9.5em; padding: 4px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--bg); box-shadow: var(--shadow-sm, 0 4px 14px rgba(0,0,0,.12)); }
.frame .rail .rm-pop button { justify-content: flex-start; height: 30px; padding: 0 10px; background: none; color: var(--ink); font-weight: 400; text-align: left; border-radius: var(--r-sm, 4px); box-shadow: none; }
.frame .rail .rm-pop button:hover, .frame .rail .rm-pop button:focus-visible { background: var(--hover); }
.rail .rm-msg { margin: 4px var(--s2) 0; color: var(--bad); font-size: var(--t-meta); }
.rail .rm-more { display: block; }
.rm-restore { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s2); }
/* on a narrow layout the rail clips (a tablet) or scrolls sideways (a phone), so the pop-up is
   fixed: it opens where it stands, under its handle, over the page and never cut off. Nothing
   above it is transformed there, and the menu's script closes it when the page or the row scrolls. */
@media (max-width: 1100px) {
  .frame > .rail .rm-pop { position: fixed; top: auto; right: auto; bottom: auto; left: auto; z-index: 40; }
}
/* the icon rail (761 to 1100 px) places its handle in visual.css, with the rest of that rail */
/* a phone: the places are one row; the handle sits small at each line's end on a touch screen */
@media (max-width: 760px) {
  .frame > .rail .nav .rm-list { flex-direction: row; gap: 2px; }
  .frame > .rail .nav .rm-list > * { flex: none; }
  .frame > .rail .rm-menu { position: static; transform: none; }
  .frame > .rail .rm-line > .nav-item { padding-right: var(--s2); }
  .frame > .rail .rm-pop { right: auto; left: 0; }
}
@media (max-width: 760px) and (pointer: fine) { .frame > .rail .rm-menu { display: none; } }

/* ---------------------------------------------------------------- What needs me today (web/menu-order.ts): one screen */
.frame .page:has(> .page-col > .td-page) { display: flex; flex-direction: column; padding-bottom: var(--s4); }
.frame .page.is-wide .page-col:has(> .td-page) { flex: 1; min-height: 0; max-width: none; display: flex; flex-direction: column; }
.td-page { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.td-grid { min-height: 0; display: grid; gap: var(--s3); grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(190px, auto); align-content: start; }
.td-grid.n-1 { grid-template-columns: minmax(0, 1fr); }
.td-grid.n-2, .td-grid.n-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.td-part { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; min-height: 0; padding: var(--s4); border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--bg); overflow: hidden; }
.td-h { display: flex; align-items: center; gap: var(--s2); color: var(--ink-2); font-size: var(--t-ui); text-decoration: none; }
.td-h span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-h b { color: var(--ink-3); font-weight: 400; }
.td-h:hover { color: var(--ink); }
.td-part.is-ok .rd-dot { background: var(--good); }
.td-part.is-need .rd-dot { background: var(--need, var(--signal)); }
.td-part.is-bad .rd-dot { background: var(--bad); }
.td-n { font-size: clamp(30px, 3.4vw, 48px); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.td-n.is-note { font-size: 20px; letter-spacing: -.01em; }
.td-part ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; min-width: 0; min-height: 0; }
.td-part li { min-width: 0; }
.td-part li a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; padding: 3px 0; color: var(--ink); text-decoration: none; overflow: hidden; overflow-wrap: anywhere; }
.td-part li a:hover { text-decoration: underline; }
.td-part li a.is-bad { color: var(--bad); }
.td-clear { margin: 0; color: var(--ink-3); font-size: var(--t-ui); }
@media (max-width: 900px) {
  .frame .page:has(> .page-col > .td-page), .frame .page.is-wide .page-col:has(> .td-page), .td-page { display: block; }
  .td-grid, .td-grid.n-2, .td-grid.n-4 { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
}
.td-offer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); border: 1px dashed var(--line-2); border-radius: var(--r-lg); max-width: 720px; }
.td-offer > b { min-width: 0; font-weight: 500; }

/* Nov 24: Settings > Sign-in (web/sign-in-settings.ts). Only s4-signin classes; the same tokens, no new colours. */
.s4-signin .s4-signin-part { margin: var(--s3, 16px) 0 0; display: grid; gap: 6px; max-width: 30rem; }
.s4-signin .s4-signin-part h3, .s4-signin .s4-signin-part h4 { margin: 0; font-size: var(--t-ui); }
.s4-signin .s4-signin-part p { margin: 0; }
.s4-signin .s4-pass label { display: grid; gap: 4px; font-size: var(--t-meta); color: var(--ink-2); }
.s4-signin .s4-pass input { width: 100%; box-sizing: border-box; }
.s4-signin .s4-signin-part button { justify-self: start; margin-top: 4px; }
.s4-signin .s4-signin-row { display: block; }
.s4-signin .ok-note { margin: var(--s2, 8px) 0 0; padding: 6px 10px; border-radius: var(--r-md, 8px); background: var(--good-soft); color: var(--good); font-size: var(--t-ui); max-width: 30rem; }
.s4-signin .unver { max-width: 30rem; }
.s4-signin button.s4-second { background: var(--fill); color: var(--ink); border-color: transparent; }
.s4-signin button.s4-second:hover, .s4-signin button.s4-second:focus-visible { background: var(--hover); }
.s4-signin .s4-check { display: flex; align-items: center; gap: 6px; font-size: var(--t-meta); color: var(--ink-2); }
.s4-signin .s4-signin-row { display: grid; gap: 4px; margin-top: 6px; }
.s4-signin .s4-signin-row button { justify-self: start; }

/* ================================================================ Social (Nov 26 2026)
   Each founder's own accounts, one screen like the Pulse (it uses the Pulse's frame, figures and
   cards, pulse2.css): followers per platform with where they come from, followers over time per
   platform, views and impressions per week, and the best 5 posts. Nothing scrolls at desktop size;
   below 900 px it stacks, as the Pulse does. */

/* each platform's own colour, from the app's chart colours, the same in every style */
.soc-p-youtube { --c: var(--c-out); }
.soc-p-tiktok { --c: var(--c-deal); }
.soc-p-linkedin { --c: var(--c-cash); }
.soc-p-x { --c: var(--ink-2); }
.soc-p-instagram { --c: var(--c-in); }
.soc-p-facebook { --c: var(--c-work); }
.soc-p-threads { --c: var(--c-owe); }
.soc-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--c, var(--ink-3)); vertical-align: 1px; flex: none; }

/* the head: who it is for, and Add by hand as a small form that opens over the page */
.head .soc-who { margin-left: var(--s3); font-size: var(--t-ui); color: var(--ink-2); }
.head .soc-who a { color: var(--ink); }
.soc-add { position: relative; }
.soc-add > summary { list-style: none; cursor: pointer; }
.soc-add > summary::-webkit-details-marker { display: none; }
.soc-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: min(360px, calc(100vw - 32px)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; padding: 14px; box-sizing: border-box; border-radius: var(--r-md); background: var(--bg); box-shadow: var(--shadow-float), inset 0 0 0 1px var(--line); }
.soc-form label { display: flex; flex-direction: column; gap: 3px; font-size: var(--t-meta); color: var(--ink-2); }
.soc-form label { min-width: 0; }
.soc-form input, .soc-form select { width: 100%; box-sizing: border-box; min-width: 0; height: 30px; font: inherit; font-size: var(--t-ui); color: var(--ink); }
.soc-form .soc-note { grid-column: 1 / -1; margin: 0; font-size: var(--t-meta); color: var(--ink-3); }
.soc-form button { grid-column: 1 / -1; }

.soc-notice { margin: 0; font-size: var(--t-ui); color: var(--ink-2); }

/* the figures: a platform each, all in one row however many there are; under the number its chip
   (where the numbers come from) and the 30-day change, each kept to one line */
.soc-figs { --count: 3; grid-template-columns: repeat(var(--count), minmax(0, 1fr)); }
.soc-fig .lab { display: flex; align-items: center; min-width: 0; white-space: nowrap; }
.soc-fig .lab .nm { overflow: hidden; text-overflow: ellipsis; }
.soc-fig .foot { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-width: 0; }
.soc-chip { flex: none; padding: 0 7px; border-radius: 999px; font-size: var(--t-meta); line-height: 18px; color: var(--ink-2); background: var(--well); white-space: nowrap; }
.soc-chip.is-official { color: var(--good); background: var(--good-soft); }
.soc-chip.is-agent { color: var(--signal-ink); background: var(--signal-soft); }

/* the figures take what they need, the cards share the rest (a notice line, when there is one, comes first) */
.soc-dash { grid-template-rows: auto minmax(0, 1fr); }
.soc-dash:has(> .soc-notice) { grid-template-rows: auto auto minmax(0, 1fr); }

/* the cards: followers and the weekly chart down the left, the best posts on the right; with five
   platforms or more the followers take the whole top row, one small chart each */
.soc-grid.is-many { grid-template-areas: "f f f f f f f f f f f f" "w w w w w w w p p p p p"; }
.soc-grid { grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "f f f f f f f p p p p p" "w w w w w w w p p p p p"; }
.soc-followers { grid-area: f; }
.soc-posts { grid-area: p; }
.soc-weekly { grid-area: w; }
.soc-minis { --cols: 3; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 6px var(--s3); }
.soc-mini { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.soc-mini .lab { font-size: var(--t-meta); color: var(--ink-2); display: flex; align-items: center; }
/* a followers chart: the high and low on the left, the line filling the rest, first and last day under it */
.soc-chart { flex: 1; min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; column-gap: 5px; margin-top: 4px; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.soc-y { display: flex; flex-direction: column; justify-content: space-between; text-align: right; line-height: 1; }
.soc-plot { position: relative; min-height: 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
/* (the app's own chart rule keeps a chart's shape; this one fills its box) */
.frame .soc-plot svg.chart, .soc-mini svg { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; max-width: none; margin: 0; }
.soc-mini { container-type: inline-size; }
.soc-x { grid-column: 2; display: flex; justify-content: space-between; gap: 6px; padding-top: 2px; white-space: nowrap; }
@container (max-width: 150px) { .soc-x { justify-content: flex-end; } .soc-x > span:first-child { display: none; } }
.soc-line { overflow: visible; }
.soc-line .line { fill: none; stroke: var(--c); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.soc-line .area { fill: color-mix(in srgb, var(--c) 14%, transparent); stroke: none; }
/* the weekly bars: a small chart per platform, each on its own scale, filling its share of the card */
.soc-weeks { --cols: 3; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 8px var(--s3); }
.soc-wk { display: flex; flex-direction: column; min-width: 0; min-height: 0; container-type: inline-size; }
.soc-wk .lab { display: flex; align-items: baseline; gap: 5px; min-width: 0; white-space: nowrap; font-size: var(--t-meta); color: var(--ink-2); }
.soc-wk .lab .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@container (max-width: 200px) { .soc-wk .lab small { display: none; } }
.soc-wk .lab b { flex: none; margin-left: auto; font-size: var(--t-ui); font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.soc-wk .lab small { flex-shrink: 20; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ink-3); font-size: var(--t-meta); }
.soc-wkbars { flex: 1; min-height: 14px; display: flex; align-items: flex-end; gap: 3px; margin-top: 4px; border-bottom: 1px solid var(--line); }
.soc-wkbars i { flex: 1; min-width: 0; background: color-mix(in srgb, var(--c) 55%, transparent); border-radius: 2px 2px 0 0; }
.soc-wkbars i.is-now { background: var(--c); }
.soc-wkx { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.soc-one { margin: 0; font-size: var(--t-ui); color: var(--ink-3); }

.soc-best { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; min-height: 0; flex: 1; }
/* the five share the card's height, so a tall card is not left half empty */
.soc-best li { flex: 1 1 0; min-height: 0; max-height: 25%; overflow: hidden; align-content: center; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 4px; padding: 7px 0; border-top: 1px solid var(--line); align-items: baseline; }
.soc-best li:first-child { border-top: 0; }
.soc-best .soc-dot { grid-row: 1; }
.soc-best .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--t-ui); }
.soc-best .t a { color: var(--ink); }
.soc-best .n { font-variant-numeric: tabular-nums; font-weight: 600; font-size: var(--t-ui); white-space: nowrap; }
.soc-best .n small { font-weight: 400; color: var(--ink-3); }
.soc-best .m { grid-column: 2 / -1; font-size: var(--t-meta); color: var(--ink-3); }

/* the empty page: one line per platform on how to connect it */
.soc-dash.is-empty { grid-template-rows: auto minmax(0, 1fr); }
.soc-how { list-style: none; margin: 0; padding: 0; }
.soc-how li { display: flex; align-items: baseline; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); font-size: var(--t-ui); }
.soc-how li:first-child { border-top: 0; }
.soc-how b { min-width: 80px; }
.soc-how span { color: var(--ink-2); }

/* a short window: the figures lose a little padding first, as on the Pulse */
@media (min-width: 901px) and (max-height: 820px) {
  .soc-best li { padding: 3px 0; }
  /* the likes and comments under a post give way first */
  .soc-best .m { display: none; }
}
/* below 900 px: one column, as the Pulse */
@media (max-width: 900px) {
  .soc-grid, .soc-grid.is-many { grid-template-areas: none; grid-template-rows: none; }
  .soc-followers, .soc-posts, .soc-weekly { grid-area: auto; }
  .soc-minis { grid-auto-rows: 120px; --cols: 2 !important; }
  .soc-weeks { grid-auto-rows: 90px; --cols: 2 !important; }
  .soc-figs { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .soc-best li { flex: none; }
}
/* a phone: Add by hand opens as a panel across the screen, never off its edge */
@media (max-width: 600px) {
  .soc-form { position: fixed; left: 16px; right: 16px; top: 64px; width: auto; max-height: calc(100vh - 80px); overflow: auto; }
}

/* The setup guide (web/social-setup.ts): numbered steps, each with its copy fields, then the
   form for the two codes. One column, so it reads the same on a phone. */
.soc-steps { margin: 0 0 var(--s4); padding-left: 22px; display: grid; gap: var(--s3); }
.soc-steps > li { padding-left: 4px; font-size: var(--t-ui); line-height: 1.5; }
.frame .page .soc-steps > li > p { margin: 0; }
.soc-steps a { overflow-wrap: anywhere; }
.soc-copy { display: grid; gap: 3px; margin: var(--s2) 0 0; min-width: 0; }
.soc-copy .lab { font-size: var(--t-meta); color: var(--ink-3); }
.soc-copy .p4-token { padding: 4px 4px 4px var(--s3); }
.soc-setup .c4-card + .c4-card, .soc-setup .soc-steps + .c4-card { margin-top: var(--s3); }
.c4-card form.soc-setform, .soc-setform { display: grid; gap: var(--s3); margin: var(--s3) 0 0 16px; max-width: 460px; }
.soc-setform label { display: grid; gap: 4px; font-size: var(--t-meta); color: var(--ink-2); min-width: 0; }
.frame .soc-setform input:not([type=checkbox]) { width: 100%; box-sizing: border-box; min-width: 0; height: 32px; font-family: var(--mono); font-size: var(--t-ui); color: var(--ink); }
.soc-setform .soc-check { display: flex; align-items: flex-start; gap: 8px; font-size: var(--t-ui); color: var(--ink); line-height: 1.4; }
.soc-setform .soc-check input { margin-top: 3px; flex: none; }
.soc-setform .soc-check.is-warn { color: var(--signal-ink); }
.frame .soc-setform button { justify-self: start; height: 32px; padding: 0 14px; }
.frame .page .soc-setup .soc-note { margin: var(--s3) 0 0; font-size: var(--t-meta); color: var(--ink-3); }
.frame .page .soc-setform .soc-note { margin: 0; }
.frame .page .c4-card .soc-bad { color: var(--bad); }
.c4-card .c4-row a.p3-btn { height: 28px; font-size: var(--t-meta); }
@media (max-width: 720px) {
  .c4-card form.soc-setform, .soc-setform { margin-left: 0; max-width: none; }
  .soc-steps { padding-left: 18px; }
}

/* Kepler ("Kep"), the penguin guide, and the welcome (/welcome, web/onboarding.ts), Nov 26 2026.
   First Kep's own motion, exactly KEP_CSS from web/style/kep.ts (the test keeps them the same),
   with its reduced-motion rule; then the welcome's layout. Only ob- and kep classes, the app's
   own tokens for every colour of text and surface (each already AA in all three styles, light
   and dark, tests/app/visual-style.test.ts), so it follows the person's style and theme.
   Loaded before pane-fit.css, visual.css and atmospheres.css. */

@keyframes kepWaddle { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-2px)} }
@keyframes kepWingL { 0%,100%{transform:rotate(0deg)} 50%{transform:rotate(-14deg)} }
@keyframes kepWingR { 0%,100%{transform:rotate(0deg)} 50%{transform:rotate(14deg)} }
@keyframes kepBeak { 0%,100%{transform:scaleY(1)} 50%{transform:scaleY(1.38)} }
@keyframes kepBlink { 0%,92%,100%{transform:scaleY(1)} 96%{transform:scaleY(0.15)} }
@keyframes kepPulse { 0%,100%{opacity:0.35} 50%{opacity:1} }
.kep-waddle { animation: kepWaddle 1.0s steps(2, end) infinite; }
.kep-bob { animation: kepWaddle 1.8s ease-in-out infinite; }
.kep-wl { transform-box: fill-box; transform-origin: right top; animation: kepWingL 0.65s ease-in-out infinite; }
.kep-wr { transform-box: fill-box; transform-origin: left top; animation: kepWingR 0.65s ease-in-out infinite; }
.kep-bk { transform-box: fill-box; transform-origin: center top; animation: kepBeak 0.3s steps(2, end) infinite; }
.kep-bl { transform-box: fill-box; transform-origin: center; animation: kepBlink 3.8s linear infinite; }
.kep-pl { animation: kepPulse 0.8s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .kep-waddle, .kep-bob, .kep-wl, .kep-wr, .kep-bk, .kep-bl, .kep-pl { animation: none !important; }
}

/* Kep's floor shadow follows the theme; in dark, a light rim keeps the navy penguin visible
   (at least 3:1 against the page, WCAG 1.4.11). */
.kep .kep-floor { fill: var(--line-2); stroke: var(--line-2); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ob-kep-art svg.kep { filter: drop-shadow(1px 0 0 #94A3B8) drop-shadow(-1px 0 0 #94A3B8) drop-shadow(0 1px 0 #94A3B8) drop-shadow(0 -1px 0 #94A3B8); }
}
:root[data-theme="dark"] .ob-kep-art svg.kep { filter: drop-shadow(1px 0 0 #94A3B8) drop-shadow(-1px 0 0 #94A3B8) drop-shadow(0 1px 0 #94A3B8) drop-shadow(0 -1px 0 #94A3B8); }

/* ---------- the welcome ---------- */
body.ob-page { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); }
.ob { max-width: 980px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; box-sizing: border-box; padding: 0 16px; }
.ob-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0 12px; border-bottom: 1px solid var(--line); }
.ob-brand { display: inline-flex; align-items: center; gap: 8px; font-size: var(--t-ui); }
.ob-brand b { font-size: 15px; }
.ob-steps ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.ob-dot { display: inline-block; font-size: var(--t-meta); font-variant-numeric: tabular-nums; padding: 3px 9px; border: 1px solid var(--line-2); border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; }
a.ob-dot:hover { background: var(--hover); color: var(--ink); }
.ob-dot.is-done { color: var(--ink); }
.ob-dot.is-done::before { content: "✓ "; }
.ob-dot.is-now { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 600; }
.ob-main { flex: 1; display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; align-content: start; padding: 28px 0; }
.ob-kep { background: var(--rail); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 14px; display: grid; justify-items: center; gap: 8px; text-align: center; box-shadow: var(--shadow-xs); }
:root[data-pack="blend"] .ob-kep, :root[data-pack="pixel"] .ob-kep { background-image: radial-gradient(color-mix(in srgb, var(--ink-3) 22%, transparent) 1px, transparent 1px); background-size: 10px 10px; }
.ob-kep-art { display: grid; place-items: center; min-height: 116px; }
.ob-kep-art [hidden] { display: none; }
.ob-kep-name { margin: 0; font-size: var(--t-label); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.ob-say { margin: 0; font-size: var(--t-ui); line-height: 1.5; color: var(--ink); background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 10px 12px; text-align: left; }
.ob-say-line { display: block; }
.ob-say-line + .ob-say-line { margin-top: 4px; }
.ob-step { display: grid; gap: 12px; min-width: 0; }
.ob-kicker { margin: 0; font-size: var(--t-label); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.ob-step h1 { margin: 0; font-size: 24px; line-height: 1.2; letter-spacing: -.01em; }
.ob-lead { margin: 0; color: var(--ink-2); font-size: var(--t-ui); max-width: 56ch; line-height: 1.5; }
.ob-soft { display: block; color: var(--ink-2); font-size: var(--t-meta); line-height: 1.45; }
.ob-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ob-inline { display: inline; margin: 0; }
.ob-styles fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.ob-styles legend { padding: 0; margin-bottom: 8px; font-size: var(--t-meta); color: var(--ink-2); }
.ob-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ob-opt { display: grid; gap: 6px; align-content: start; padding: 12px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--bg); cursor: pointer; }
.ob-opt:hover { background: var(--hover); }
.ob-opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ob-opt:has(input:focus-visible) { outline: 2px solid var(--focus, var(--signal)); outline-offset: 2px; }
.ob-opt input[type="radio"] { accent-color: var(--ink); margin: 0; justify-self: start; }
.ob-opt-art { display: flex; gap: 6px; align-items: center; min-height: 26px; }
.ob-now { font-weight: 500; color: var(--ink-2); }
.ob-styles .ob-row { margin-top: 12px; }
.ob-note { margin: 8px 0 0; font-size: var(--t-meta); color: var(--ink-2); }
.ob-note.is-ok { color: var(--ink); padding: 6px 10px; border-left: 3px solid var(--good); background: var(--well); }
.ob-note.is-bad { color: var(--ink); padding: 6px 10px; border-left: 3px solid var(--bad); background: var(--well); }
.ob-box { border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--well); padding: 12px 14px; }
.ob-box p { margin: 0; }
.ob-box p + p { margin-top: 6px; }
.ob-stream { display: flex; gap: 10px; align-items: flex-start; }
.ob-stream b { display: block; }
.ob-stream-dot { width: 10px; height: 10px; margin-top: 5px; flex: none; border-radius: var(--r-full); background: var(--ink-3); }
.ob-stream.is-ok .ob-stream-dot { background: var(--good); }
.ob-stream.is-warn .ob-stream-dot { background: var(--signal); }
.ob-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ob-links a { font-weight: 600; color: var(--ink); }
.ob-lanes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ob-lane { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--bg); color: var(--ink); text-decoration: none; }
.ob-lane:hover { background: var(--hover); }
.ob-lane.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ob-lanes { --lane: var(--ink-3); }
.ob-swatch { width: 28px; height: 8px; background: var(--lane); border: 1px solid var(--ink); border-radius: 2px; }
.ob-card { display: grid; gap: 8px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--bg); padding: 14px 16px; box-shadow: var(--shadow-xs); max-width: 560px; }
.ob-card h2 { margin: 0; font-size: var(--t-title); }
.ob-card p { margin: 0; }
.ob-practice { justify-self: start; font-size: var(--t-meta); font-weight: 700; color: var(--ink); background: var(--well); border-left: 3px solid var(--signal); padding: 3px 8px; }
.ob-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.ob-sum div { border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--well); padding: 10px 12px; }
.ob-sum dt { font-size: var(--t-meta); color: var(--ink-2); }
.ob-sum dd { margin: 4px 0 0; font-weight: 600; }
.ob-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 12px 0 18px; border-top: 1px solid var(--line); }
.ob-foot-r { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ob-stop { max-width: 32rem; margin: 14vh auto; padding: 0 16px; }

/* Full Pixel: the bold 2px edge and square corners, as on its other tiles */
:root[data-pack="pixel"] .ob-kep, :root[data-pack="pixel"] .ob-opt, :root[data-pack="pixel"] .ob-lane, :root[data-pack="pixel"] .ob-card, :root[data-pack="pixel"] .ob-box, :root[data-pack="pixel"] .ob-sum div, :root[data-pack="pixel"] .ob-say, :root[data-pack="pixel"] .ob-dot { border-width: 2px; border-radius: 0; }
:root[data-pack="pixel"] .ob-step h1, :root[data-pack="pixel"] .ob-kicker { font-family: var(--mono); }
/* Sharp Modern: soft corners and pill steps, no texture */
:root[data-pack="modern"] .ob-dot { border-radius: var(--r-full); }

@media (max-width: 720px) {
  .ob-main { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px 0; }
  .ob-kep { grid-template-columns: auto minmax(0, 1fr); justify-items: start; text-align: left; align-items: center; padding: 12px; }
  .ob-kep-art { min-height: 0; grid-row: span 2; }
  .ob-kep-art svg.kep { width: 72px; height: 72px; }
  .ob-grid, .ob-lanes, .ob-sum { grid-template-columns: minmax(0, 1fr); }
  .ob-steps { width: 100%; }
  .ob-dot { padding: 3px 7px; }
}

/* The right panel never scrolls sideways (Sam, Nov 21): long words, codes and links wrap
   inside it, and its fact lists keep their second column within the panel. */
.frame > .pane .pane-body { overflow-x: hidden; }
.frame > .pane .pane-body :where(p, dd, li, div, span, a, small, code, summary) { overflow-wrap: anywhere; }
.frame > .pane code, .frame > .pane pre { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; max-width: 100%; }
.frame > .pane dl.facts { grid-template-columns: auto minmax(0, 1fr); }
.frame > .pane dl.facts.stack { grid-template-columns: minmax(0, 1fr); }
.frame > .pane dl.facts.stack dt { margin-top: var(--s2); }
.frame > .pane :where(img, svg, table, video, canvas) { max-width: 100%; }
.frame > .pane table { display: block; overflow-x: auto; }
.frame > .pane dl.facts.stack dd { text-align: left; justify-self: stretch; margin: 2px 0 0; color: var(--ink); }
.frame > .pane dl.facts.stack dt { font-size: var(--t-meta); color: var(--ink-3); }
.frame > .pane details.exact code { font-size: 11px; color: var(--ink-2); }

/* The visual pass (UX area 7, Nov 20 2026): the floor under every screen, loaded last.
   Still stays: light rail, matte surfaces, few accents. This file only raises the floor:
   - type: body 14 to 15 px, secondary 12 to 13 px, nothing smaller; figures tabular;
   - contrast: helper, timestamp and evidence text at WCAG AA on light and dark;
   - one route header plus one page title, and one left edge per layout;
   - colour by meaning: green only for a named passed check, amber for input needed,
     the strong red for a current failure; team accents mark places;
   - visible selected and focus states;
   - space in proportion: compact empty charts, sparse panes, the composer in view. */

/* ---------------------------------------------------------------- type floor and contrast */
:root {
  /* 12 label, 13 meta, 14 ui (body), 15 chat; the old 11/12/13 read too small (Sam) */
  --t-label: 12px; --t-meta: 13px; --t-ui: 14px;
  --text-xs: 12px; --text-sm: 13px; --text-md: 14px;
  /* meta text at 5.6:1 on white and 5.2:1 on the rail (was 4.5 and 4.2) */
  --ink-3: #65655E;
  /* the focus ring: ink, not the signal colour, so focus never reads as "needs you" */
  --focus-ring: #18181A; --focus: var(--focus-ring);
  /* amber: input needed (not a failure) */
  --need: #A15C07; --need-soft: #FDF3E1;
  /* the passed-check green, a shade deeper so it is AA on its own soft chip (was 4.48:1) */
  --good: #276F41;
  /* the rail is a little wider so agent names are not cut at 14 px */
  --rail-w: 272px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ink-3: #9C9C96; --ink-4: #6A6A65; --focus-ring: #EDEDEA; --need: #F0B354; --need-soft: #2B2213; }
}
:root[data-theme="dark"] { --ink-3: #9C9C96; --ink-4: #6A6A65; --focus-ring: #EDEDEA; --need: #F0B354; --need-soft: #2B2213; }

body { font-variant-numeric: tabular-nums; }
/* faint grey was used for words in a few places; words take the meta colour */
.ptile .prov, .p3-group .n, .hello h1 span, .head .crumbs .sep { color: var(--ink-3); }
/* chart axis and value labels: 12 px like every other secondary line */
.cashahead text, .mbars text, .num-fig svg.chart text, .trend text { font-size: 12px; }
/* and at that size on screen at every width: chart-text.js sets --chart-k, the chart's own units
   per screen pixel, so a label no longer grows and shrinks with its drawing (Nov 24 2026) */
:root svg { --chart-k: 1; }
:root svg[data-fit-text] text { font-size: calc(var(--t-meta) * var(--chart-k, 1)); }
:root svg[data-fit-text] text[data-crowded] { visibility: hidden; }
/* description lines about 55 to 75 characters */
.frame .page-col p, .frame .pane p, .p4-lead, .cra .lead, .sub-page > p, .pr-page > p { max-width: 72ch; }
.frame .page-col table p, .frame .page-col .p4-card p, .frame .page-col li p { max-width: none; }

/* ---------------------------------------------------------------- one header, one title, one edge */
/* the head lines up with the page column under it */
.frame .main > .head { padding-inline: var(--gutter); }
.head .crumbs h1.head-title, .head .crumbs h1.chat-title { margin: 0; font-size: 14px; line-height: inherit; font-weight: 600; letter-spacing: 0; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.head .crumbs h1.chat-title { min-width: 0; flex: 0 1 auto; }
.head .crumb { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: var(--t-ui); color: var(--ink-3); }
.head .crumb a { color: var(--ink-2); text-decoration: none; border-radius: var(--r-sm); }
.head .crumb a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.head .crumb [aria-current="page"] { color: var(--ink); font-weight: 500; }
.head .crumb .sep { color: var(--ink-3); }
/* every page in the standard column starts at the column's left edge (no centred islands) */
.frame .page-col > .p4-page, .frame .page-col > .sub-page, .frame .page-col > .settings-page, .frame .page-col > .p4-review-one, .frame .page-col > .pr-page { margin-left: 0; margin-right: auto; }
.frame .page-col > .settings-page { padding-left: 0; padding-right: 0; }

/* the tax tables: the same column widths on every page, so totals line up when read down */
.cra td.num, .cra th.num { width: 9.5em; min-width: 9.5em; }
.cra thead th { font-size: var(--t-meta); }
.cra tr.is-key td.num { border-top: 1px solid var(--ink-3); }

/* ---------------------------------------------------------------- evidence, as one chip */
.ev-chip { display: inline-block; vertical-align: baseline; margin-left: 4px; font-size: var(--t-meta); font-weight: 500; line-height: 1.4; }
a.ev-chip, .ev-chip > summary { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: var(--r-full); background: var(--fill); color: var(--ink-2); text-decoration: none; cursor: pointer; list-style: none; white-space: nowrap; }
.ev-chip > summary::-webkit-details-marker { display: none; }
a.ev-chip:hover, .ev-chip > summary:hover { color: var(--ink); background: var(--hover); }
.ev-chip .n { font-weight: 600; color: var(--ink-3); }
.ev-chip[open] { display: block; margin: 6px 0 0; }
.ev-chip[open] > summary { color: var(--ink); }
.ev-chip ul { list-style: none; margin: 6px 0 0; padding: 8px 12px; border-radius: var(--r-md); background: var(--well); display: grid; gap: 4px; font-weight: 400; }
.ev-chip ul a { color: var(--ink); }

/* ---------------------------------------------------------------- colour by meaning */
/* green is only for a named check that passed; activity and done-ness are ink */
.frame .presence, .presence, .presence-dot { background: var(--ink-2); }
.frame .msg .ask-state.is-working > i { background: var(--ink-2); }
.delta.is-good { color: var(--ink-2); }
.sm-tag.is-person { background: var(--fill); color: var(--ink-2); }
.sm-msg { color: var(--ink-2); }
.a5-auth.is-acts, .a5-out.is-answered, .a5-out.is-did, .pr-state.is-done { background: var(--fill); color: var(--ink-2); }
.pr-acts button.is-done { box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); }
.a6-drop.has-file .a6-drop-zone { border-color: var(--ink-2); }
/* input needed is amber, not the failure colour */
.checked.need, .chip.cra-todo, .t-need, .tr-need { --signal-soft: var(--need-soft); --signal-ink: var(--need); }
.chip.cra-todo, .chip.cra-todo:hover, .cra-tabs .count { background: var(--need-soft); color: var(--need); }
.p4-card .needs-line { color: var(--need); }

/* ---------------------------------------------------------------- selected and focus */
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.rail :focus-visible, .head :focus-visible { outline-offset: 1px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; }
/* the selected place in the rail: a bar on the left and a heavier name, in both themes */
.rail [aria-current="page"].nav-item, .rail [aria-current="page"].agent, .rail [aria-current="page"].rail-link, .thread-row[aria-current="page"], .thread-new[aria-current="page"] { font-weight: 600; box-shadow: inset 3px 0 0 var(--ink), var(--shadow-xs), 0 0 0 1px var(--line-2); }
.cra-tabs a[aria-current="page"], .a2-tab.is-on { box-shadow: inset 0 -2px 0 var(--ink); }

/* ---------------------------------------------------------------- space */
/* the composer and its send button stay in view on pages that end with one */
.page-chat form.ask { position: sticky; bottom: 0; z-index: 2; padding: var(--s2) 0 var(--s3); background: var(--bg); }
/* a sparse pane takes less room: a pane with little in it is narrower */
.frame.has-pane:has(.pane .p4-empty, .pane .empty) { --pane-w: 300px; }
/* an empty chart is a short line with the pixel slot, never a tall blank frame */
.fig-low { padding: var(--s2) 0; }
.p4-empty { padding-block: var(--s3); }
.chart-empty { display: flex; align-items: center; gap: var(--s3); min-height: 0; padding: var(--s3) 0; color: var(--ink-2); font-size: var(--t-ui); }

/* the four "nothing here" states, told apart in words and in a quiet mark */
.state-word { display: inline-flex; align-items: center; gap: 6px; padding: 0 8px; border-radius: var(--r-full); font-size: var(--t-meta); font-weight: 500; white-space: nowrap; }
.state-word.is-nodata { background: var(--fill); color: var(--ink-2); }
.state-word.is-unchecked { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.state-word.is-failed { background: var(--bad-soft); color: var(--bad); }
.state-word.is-fine { background: var(--good-soft); color: var(--good); }
.state-word.is-need { background: var(--need-soft); color: var(--need); }

/* a busy region: the stale content is not clickable while it reloads */
[aria-busy="true"] { pointer-events: none; opacity: .55; transition: opacity var(--t-fast) var(--ease); }

/* ---------------------------------------------------------------- narrow windows and scaling */
@media (max-width: 960px) {
  .frame .main > .head { padding-inline: var(--s4); }
  .cra td.num, .cra th.num { width: 8em; }
}
@media (max-width: 600px) {
  .cra td.num, .cra th.num { width: auto; min-width: 0; }
  .frame .page-col p { max-width: none; }
  .ev-chip ul { padding: 6px 8px; }
}

/* the Records browser starts at the same edge as every other page */
.frame .page:has(.p3-split) { padding-left: var(--gutter); }
/* keyboard hints: still small, never under 12 px */
kbd, .kbd, .key { font-size: 12px; }

/* the skip link: the first stop for a keyboard, hidden until focused */
.skip { position: absolute; left: 8px; top: -48px; z-index: 50; padding: 8px 14px; border-radius: var(--r-md); background: var(--ink); color: var(--on-ink); font-size: var(--t-ui); font-weight: 600; text-decoration: none; }
.skip:focus { top: 8px; }
.frame .main:focus { outline: none; }
/* at the bigger floor, a tile's foot line and a chart's heading wrap instead of running out */
.kpi .foot { white-space: normal; }
.kpi .foot > * { white-space: nowrap; }
.fig-h, .po-h, .card-x .card-h { flex-wrap: wrap; row-gap: 2px; }

/* ---------------------------------------------------------------- narrow windows */
/* about 900 px: the side pane floats over the chat, so it starts closed there and opens with
   its toggle (it stays open once a person opens it) */
@media (max-width: 1100px) {
  .frame.has-pane:not(.pane-on) > .pane { display: none; }
  .frame.has-pane.pane-on > .pane { display: block; }
}
/* about 380 px: the rail is a short top bar (brand, search, the places as a row that scrolls
   sideways); the agents' chat lists and the footer step aside; the page follows straight on */
@media (max-width: 760px) {
  .frame, .frame.has-pane { display: block; height: auto; min-height: 100vh; overflow: visible; }
  .frame > .rail { display: flex; flex-direction: column; height: auto; overflow: visible; padding: 0 var(--s3) var(--s2); border-right: 0; border-bottom: 1px solid var(--line); }
  .frame > .rail .nav { display: flex; flex-direction: row; gap: 2px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  /* the row scrolls sideways; its right edge fades so a cut-off place reads as "more", not as clipped */
  .frame > .rail .nav { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); padding-right: 24px; }
  .frame > .rail .nav > * { flex: none; }
  .frame > .rail .rail-h, .frame > .rail .agents, .frame > .rail .rail-link, .frame > .rail .rail-update, .frame > .rail .me { display: none; }
  /* Nov 26: the foot stays on a phone, one short row under the places. Without it a phone had
     no way to Settings (and so to changing a password) or to Sign out but the search box */
  .frame > .rail .me { display: flex; margin-top: var(--s2); padding: var(--s2) 0 0; }
  .frame > .rail .me .face { display: none; }
  .frame > .rail .me [data-tip]::after { display: none; }
  .frame .main { min-height: 0; }
  .frame .page { overflow: visible; padding-inline: var(--s4); }
  .frame .main > .head { padding-inline: var(--s4); }
  .frame .page:has(.p3-split) { padding-left: var(--s4); }
}
/* the head never runs into its tools: the page title keeps its room, the extras give way first */
.head .crumbs { flex: 1 1 auto; overflow: hidden; }
.head .crumbs h1.head-title { flex: none; }
@media (max-width: 1100px) {
  .head .crumbs .chat-meta .just { display: none; }
  .head .crumbs h1.chat-title { flex: 1 1 auto; min-width: 7em; }
}
@media (max-width: 760px) {
  .head .crumbs .sub, .head .crumbs .chat-meta { display: none; }
}

/* ---------------------------------------------------------------- the icon rail (761 to 1100 px)
   Sam, Nov 24, shrinking the desktop app to a tall narrow window: "the rail looks like crap".
   The icons showed but the rail kept its full 272 px (this file's --rail-w came last and won).
   Three widths, each deliberate:
   - over 1100 px: the full rail, words and all;
   - 761 to 1100 px: a 60 px column of icons. Every place, dashboard, agent and foot button is a
     40 px square in one centred column; the selected one is that square lit; a count sits on the
     icon's corner; a working or unset agent keeps its dot on the other corner. Each keeps its name
     for a screen reader, and shows it beside the rail on hover and keyboard focus (the tip in
     web/shell.ts). The menu's handle sits in the rail's edge beside its icon: drag it, or open it
     for Move up, Move down and Hide. The page gets the rest of the window;
   - 760 px and under: the short top bar above. */
@media (min-width: 761px) and (max-width: 1100px) {
  :root { --rail-w: 60px; }
  .frame > .rail { padding: 0 6px 10px; align-items: center; }
  .frame > .rail .brand { width: 100%; padding: 0; justify-content: center; }
  .frame > .rail .brand .home > b { display: none; }
  .frame > .rail .search { width: 40px; height: 40px; padding: 0; margin: 0 0 6px; justify-content: center; }
  .frame > .rail .search .kbd { display: none; }
  /* the words stay for a screen reader, out of sight */
  .frame > .rail .search > span:not(.kbd), .frame > .rail .nav-item > span:not(.count), .frame > .rail .agent .name {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .frame > .rail .nav, .frame > .rail .rm-list { width: 100%; align-items: center; gap: 4px; }
  .frame > .rail .rm-line { width: 100%; justify-content: center; flex-direction: row; }
  .frame > .rail .rm-more, .frame > .rail .rd-more { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; }
  .frame > .rail .rd-more > .rm-list { margin-top: 0; }
  /* one square per place: the icon in the middle, the selected one lit as a square */
  .frame > .rail .nav-item, .frame > .rail .rm-line > .nav-item, .frame > .rail .agent {
    flex: none; position: relative; width: 40px; height: 40px; padding: 0; gap: 0; justify-content: center; border-radius: var(--r-md);
  }
  .frame > .rail .nav-item svg { width: 18px; height: 18px; }
  /* lit evenly: the full rail's left bar would make a square lopsided. A place and an agent are
     lit the same (the agent's selector carries .e2-agents to outrank evidence2.css). The ring is
     the faint ink, not the line colour, so the square still reads in dark, where the page's
     colour and the rail's are nearly the same; in dark the square is also lifted a step */
  .frame > .rail [aria-current="page"].nav-item, .frame > .rail [aria-current="page"].agent,
  .frame > .rail .e2-agents a.agent[aria-current="page"] { background: var(--rail-on, var(--bg)); box-shadow: var(--shadow-xs), 0 0 0 1px var(--ink-4); }
  /* a count sits on the icon's top right corner, ringed in the rail's colour so it reads as its own */
  .frame > .rail .nav-item .count, .frame > .rail .agent .count,
  .frame > .rail .rm-line:hover > .nav-item .count, .frame > .rail .rm-line:focus-within > .nav-item .count {
    position: absolute; top: 3px; right: 3px; margin: 0; min-width: 16px; height: 16px; padding: 0 4px; font-size: 11px; transform: none; box-shadow: 0 0 0 2px var(--rail);
  }
  .frame > .rail [aria-current="page"] .count { box-shadow: 0 0 0 2px var(--rail-on, var(--bg)); }
  /* the agents: a short hairline under the places, then one square each */
  .frame > .rail .rail-h, .frame > .rail .rail-note, .frame > .rail .rail-update { display: none; }
  .frame > .rail .agents { width: 100%; margin: 8px 0 0; padding: 10px 0 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; scrollbar-width: none; position: relative; }
  .frame > .rail .agents::-webkit-scrollbar { display: none; }
  .frame > .rail .agents::before { content: ""; position: absolute; top: 0; left: 50%; width: 24px; height: 1px; margin-left: -12px; background: var(--line-2); }
  .frame > .rail .agent { --ring: var(--rail); }
  .frame > .rail .agent[aria-current="page"] { --ring: var(--rail-on, var(--bg)); }
  .frame > .rail .agent .presence.e2-presence { position: absolute; right: 3px; bottom: 3px; margin: 0; width: 9px; height: 9px; box-shadow: 0 0 0 2px var(--ring); }
  .frame > .rail .agent .presence.e2-presence.is-off { background: var(--ring); box-shadow: inset 0 0 0 1.5px var(--ink-3), 0 0 0 2px var(--ring); }
  .frame > .rail .agent .presence.e2-presence.is-idle { background: var(--ring); box-shadow: inset 0 0 0 1.5px var(--ink-3), 0 0 0 2px var(--ring); }
  /* the foot: Settings, Voice and Sign out, the same squares, no rule above them */
  .frame > .rail .me { width: 100%; flex-direction: column; align-items: center; gap: 4px; margin-top: 8px; padding: 0; border-top: 0; }
  .frame > .rail .me .face, .frame > .rail .me .who { display: none; }
  .frame > .rail .me .icon-btn, .frame .rail .me button.icon-btn { width: 40px; height: 40px; border-radius: var(--r-md); }
  .frame > .rail .me [data-tip]::after { display: none; }
  /* the handle: in the rail's edge beside its icon, never over it. Quiet until the line is
     hovered or focused with a mouse; always there, faint, on a touch screen */
  .frame > .rail .rm-menu { position: absolute; right: -6px; top: 50%; margin-top: -12px; transform: none; width: auto; }
  .frame > .rail .rm-grip { width: 10px; height: 24px; border-radius: 3px; }
  .frame > .rail .rm-grip svg { width: 10px; height: 14px; transform: none; }
  /* the rail clips at its edge, where the handle sits: its focus ring draws inside it */
  .frame > .rail .rm-grip:focus-visible { outline-offset: -2px; }
  .frame > .rail .rm-line > .nav-item { padding-right: 0; }
  .frame > .rail .rm-msg { position: fixed; left: calc(var(--rail-w) + 8px); bottom: 16px; z-index: 40; max-width: 22em; margin: 0; padding: 8px 12px; border-radius: var(--r-md); background: var(--bg); box-shadow: 0 0 0 1px var(--line-2), var(--shadow-float, 0 4px 14px rgba(0,0,0,.12)); }
}
/* the selected square's fill in dark: a step above the rail, since the page's colour is darker */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --rail-on: var(--hover); } }
:root[data-theme="dark"] { --rail-on: var(--hover); }
@media (min-width: 761px) and (max-width: 1100px) and (pointer: coarse) {
  .frame > .rail .rm-grip { opacity: .7; color: var(--ink-4); }
}
/* the name beside an icon of the icon rail, on hover and keyboard focus (web/shell.ts) */
.rail-tip { position: fixed; z-index: 60; transform: translateY(-50%); padding: 5px 9px; border-radius: var(--r-sm); background: var(--ink); color: var(--on-ink); font: 500 var(--t-meta)/1.25 var(--sans); white-space: nowrap; pointer-events: none; box-shadow: var(--shadow-xs); }
.rail-tip[hidden] { display: none; }

/* ---------------------------------------------------------------- a phone: nothing scrolls sideways
   The head's tools (Brief, the checked mark) wrap under the title instead of pushing the page wide. */
@media (max-width: 760px) {
  .frame .main > .head { flex-wrap: wrap; height: auto; min-height: var(--head-h); padding-block: 8px; row-gap: 6px; }
  .frame .main > .head .tools { flex-wrap: wrap; justify-content: flex-end; min-width: 0; max-width: 100%; }
  .frame .main > .head .checked { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
}

/* Mind: the three atmospheres (Nov 24 2026), each person's own choice in Settings, on
   <html data-pack="blend" | "pixel" | "modern">. From design/atmospheres/atmospheres.css,
   checked against the real pages: the component rules aim at the app's own parts
   (composer-box, the Pulse and Tax tiles, the Settings choices), not the preview's.
   Loaded last (after visual.css). Light and dark both; every text colour here passes
   WCAG AA (4.5:1) on every surface it sits on. Charts keep their smooth lines and solid
   bars in every atmosphere: nothing here touches a chart's shapes.

   Studio Blend  clean 1px lines, pixel art, tabular figures, a faint dot grid behind empty slots.
   Full Pixel    2px navy borders, square corners, hard offset shadows, dot-grid rails, mono headings.
   Sharp Modern  soft corners, hairlines, quiet surfaces, modern icons, no texture. */

/* ---------- 1. Studio Blend ---------- */

:root[data-pack="blend"] {
  --bg: #FFFFFF;
  --rail: #F6F6F3;
  --pane: #FAF9F6;
  --well: #F5F4EF;
  --fill: #EFEFE9;
  --hover: #EAEAE3;
  --ink: #08152E;
  --ink-2: #475569;
  --ink-3: #5C677A;
  --line: #E8E7E1;
  --line-2: #D8D7D0;
  --r-sm: 5px;
  --r-md: 7px;
  --r-lg: 10px;
  --r-xl: 12px;
  --shadow-xs: 0 1px 2px rgba(8, 21, 46, .05);
  --atm-cta: #C2410C;
  --atm-on-cta: #FFFFFF;
}

@media (prefers-color-scheme: dark) {
  :root[data-pack="blend"]:not([data-theme="light"]) {
    --bg: #090E18;
    --rail: #0D1422;
    --pane: #0B1220;
    --well: #111A2B;
    --fill: #162136;
    --hover: #1C2A44;
    --ink: #F1F5F9;
    --ink-2: #B6C2D4;
    --ink-3: #94A3B8;
    --line: #1C2942;
    --line-2: #283A5C;
    --band: #131D30;
    --c-mute: #2B3A55;
    --atm-cta: #F06A43;
    --atm-on-cta: #08152E;
  }
}
:root[data-pack="blend"][data-theme="dark"] {
  --bg: #090E18;
  --rail: #0D1422;
  --pane: #0B1220;
  --well: #111A2B;
  --fill: #162136;
  --hover: #1C2A44;
  --ink: #F1F5F9;
  --ink-2: #B6C2D4;
  --ink-3: #94A3B8;
  --line: #1C2942;
  --line-2: #283A5C;
  --band: #131D30;
  --c-mute: #2B3A55;
  --atm-cta: #F06A43;
  --atm-on-cta: #08152E;
}

/* tabular figures, and a faint dot grid behind empty slots and the boot art */
:root[data-pack="blend"] .num,
:root[data-pack="blend"] .fig,
:root[data-pack="blend"] .ptile .val,
:root[data-pack="blend"] .checked,
:root[data-pack="blend"] .cra td.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

:root[data-pack="blend"] .px-empty,
:root[data-pack="blend"] .chart-empty,
:root[data-pack="blend"] .px-boot-stage {
  background-image: radial-gradient(rgba(128, 128, 128, .16) 1px, transparent 1px);
  background-size: 10px 10px;
}

/* ---------- 2. Full Pixel ---------- */

:root[data-pack="pixel"] {
  --bg: #FAF9F4;
  --rail: #F3F2EB;
  --pane: #F5F4EE;
  --well: #EFECE3;
  --fill: #E9E7DD;
  --hover: #E2E0D5;
  --ink: #08152E;
  --ink-2: #384459;
  --ink-3: #566277;
  --line: #C9C7BC;
  --line-2: #08152E;
  --need: #8A4E05;
  --signal-ink: #A3360A;
  --r-sm: 0px;
  --r-md: 0px;
  --r-lg: 2px;
  --r-xl: 2px;
  --r-full: 2px;
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 2px;
  --radius-xl: 2px;
  --radius-full: 2px;
  --shadow-xs: 2px 2px 0 #08152E;
  --shadow-float: 4px 4px 0 rgba(8, 21, 46, .28);
  --atm-cta: #C2410C;
  --atm-on-cta: #FFFFFF;
}

@media (prefers-color-scheme: dark) {
  :root[data-pack="pixel"]:not([data-theme="light"]) {
    --bg: #08101E;
    --rail: #0D1628;
    --pane: #0B1424;
    --well: #121E36;
    --fill: #182745;
    --hover: #1E3156;
    --ink: #F1F5F9;
    --ink-2: #B9C8DF;
    --ink-3: #92A6C7;
    --line: #223659;
    --line-2: #3A578A;
    --need: #F0B354;
    --signal-ink: #F59072;
    --band: #132140;
    --c-mute: #2C4066;
    --shadow-xs: 2px 2px 0 #020617;
    --shadow-float: 4px 4px 0 rgba(0, 0, 0, .55);
    --atm-cta: #F06A43;
    --atm-on-cta: #08152E;
  }
}
:root[data-pack="pixel"][data-theme="dark"] {
  --bg: #08101E;
  --rail: #0D1628;
  --pane: #0B1424;
  --well: #121E36;
  --fill: #182745;
  --hover: #1E3156;
  --ink: #F1F5F9;
  --ink-2: #B9C8DF;
  --ink-3: #92A6C7;
  --line: #223659;
  --line-2: #3A578A;
  --need: #F0B354;
  --signal-ink: #F59072;
  --band: #132140;
  --c-mute: #2C4066;
  --shadow-xs: 2px 2px 0 #020617;
  --shadow-float: 4px 4px 0 rgba(0, 0, 0, .55);
  --atm-cta: #F06A43;
  --atm-on-cta: #08152E;
}

/* dot-grid rails */
:root[data-pack="pixel"] .rail,
:root[data-pack="pixel"] .pane {
  background-image: radial-gradient(rgba(128, 128, 128, .17) 1px, transparent 1px);
  background-size: 8px 8px;
}

/* mono headings and figures */
:root[data-pack="pixel"] h1,
:root[data-pack="pixel"] h2,
:root[data-pack="pixel"] h3,
:root[data-pack="pixel"] .head-title,
:root[data-pack="pixel"] .chat-title,
:root[data-pack="pixel"] .num,
:root[data-pack="pixel"] .fig,
:root[data-pack="pixel"] .ptile .val,
:root[data-pack="pixel"] .cra td.num {
  font-family: var(--mono);
  letter-spacing: -0.02em;
}

/* 2px navy borders and a hard shadow on the boxes people type in and pick from.
   Never on a row that bleeds to its column's edge (the pane's pinned numbers): the
   shadow would run past the pane. */
:root[data-pack="pixel"] .composer-box,
:root[data-pack="pixel"] .a6-tile,
:root[data-pack="pixel"] .p3-ach,
:root[data-pack="pixel"] .checked,
:root[data-pack="pixel"] .frame .page .p4-card:first-child:not(.d3-card) {
  border-width: 2px;
  border-style: solid;
  border-color: var(--line-2);
  box-shadow: var(--shadow-xs);
}
/* the Pulse figures and chart cards draw their edge as an inset ring, not a border */
:root[data-pack="pixel"] .pd-fig,
:root[data-pack="pixel"] .pd-card {
  box-shadow: inset 0 0 0 2px var(--line-2), var(--shadow-xs);
}
:root[data-pack="pixel"] .pd-fig.is-bad {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--bad) 70%, transparent), var(--shadow-xs);
}
:root[data-pack="pixel"] .s2-pack { border-width: 2px; }
:root[data-pack="pixel"] .s2-pack:has(input:checked) { border-color: var(--ink); box-shadow: var(--shadow-xs); }
:root[data-pack="pixel"] .btn,
:root[data-pack="pixel"] .p3-btn {
  border-width: 2px;
  border-color: var(--line-2);
}

/* ---------- 3. Sharp Modern ---------- */

:root[data-pack="modern"] {
  --bg: #FFFFFF;
  --rail: #F7F7F5;
  --pane: #FBFBFA;
  --well: #F5F5F3;
  --fill: #EFEFEC;
  --hover: #ECECE9;
  --ink: #08152E;
  --ink-2: #4B5563;
  --ink-3: #5A6577;
  --line: #EAEAE5;
  --line-2: #DCDCD6;
  --r-sm: 6px;
  --r-md: 9px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-full: 999px;
  --shadow-xs: 0 1px 2px rgba(8, 21, 46, .04);
}

@media (prefers-color-scheme: dark) {
  :root[data-pack="modern"]:not([data-theme="light"]) {
    --bg: #0A0F1A;
    --rail: #0E1420;
    --pane: #0C121D;
    --well: #121B2B;
    --fill: #182338;
    --hover: #1E2C45;
    --ink: #F1F5F9;
    --ink-2: #B4C0D2;
    --ink-3: #94A3B8;
    --line: #1B263B;
    --line-2: #253450;
    --band: #141E30;
    --c-mute: #2A3750;
  }
}
:root[data-pack="modern"][data-theme="dark"] {
  --bg: #0A0F1A;
  --rail: #0E1420;
  --pane: #0C121D;
  --well: #121B2B;
  --fill: #182338;
  --hover: #1E2C45;
  --ink: #F1F5F9;
  --ink-2: #B4C0D2;
  --ink-3: #94A3B8;
  --line: #1B263B;
  --line-2: #253450;
  --band: #141E30;
  --c-mute: #2A3750;
}

/* ---------- Studio Blend and Full Pixel: the orange primary button ----------
   A deeper orange than the signal under white text in light (5.2:1), and navy text on
   the signal in dark (5.9:1); the plain signal under white is only 3.5:1. */
:root[data-pack="blend"] .btn-primary,
:root[data-pack="pixel"] .btn-primary,
:root[data-pack="blend"] .send,
:root[data-pack="pixel"] .send {
  --on-ink: var(--atm-on-cta);
  background: var(--atm-cta);
  border-color: var(--atm-cta);
  color: var(--atm-on-cta);
}
:root[data-pack="blend"] .btn-primary:hover,
:root[data-pack="pixel"] .btn-primary:hover,
:root[data-pack="blend"] .send:hover,
:root[data-pack="pixel"] .send:hover {
  background: var(--atm-cta);
  color: var(--atm-on-cta);
}

/* ---------- Range bands, every atmosphere ---------- */
/* A band's fill stays faint so the line on it reads first, so its edge carries it: at least
   3:1 against every surface in light and dark (WCAG 1.4.11), on the chart and in its key. */
:root[data-pack] {
  --band-edge: color-mix(in srgb, var(--c-cash) 80%, transparent);
}
:root[data-pack] .p3-cash .band {
  stroke: var(--band-edge);
  stroke-width: 1;
  stroke-linejoin: round;
}
:root[data-pack] .p3-legend .i.band {
  background: color-mix(in srgb, var(--c-cash) 22%, transparent);
  box-shadow: inset 0 0 0 1px var(--band-edge);
}
:root[data-pack] .legend .k.band {
  box-shadow: inset 0 0 0 1px var(--ink-3);
}

/* ---------- The frame's icons, each style its own set (web/shell.ts ICON, Nov 26) ---------- */
/* Full Pixel's icons (web/style/pixel-icons.ts) are drawn at their grid's own size and never
   scaled, so each square pixel lands on a screen pixel: the places that set a line icon to 14,
   18 or 10 px (the Update row, the icon rail, the menu's handle) keep the pixel grid instead.
   The gear (svg.gear-px) is on the same 16 px grid. This holds on the content pages too (Rules,
   Connect your agent, a page's chat, a number's page, the search box), so a few icons there are
   1 to 3 px larger or smaller in Full Pixel than in the line styles: on purpose, a scaled pixel
   grid would blur. */
:root[data-pack] svg.ic-px, :root[data-pack] svg.gear-px { flex: none; shape-rendering: crispEdges; }
:root[data-pack] svg.ic-px[width="16"], :root[data-pack] svg.gear-px { width: 16px; height: 16px; }
:root[data-pack] svg.ic-px[width="14"] { width: 14px; height: 14px; }
:root[data-pack] svg.ic-px[width="12"] { width: 12px; height: 12px; }
:root[data-pack] svg.ic-px[width="10"] { width: 10px; height: 14px; }
/* the menu's "More" chevron keeps the 16 px box the icons above it have (raildash4.css), so its
   label lines up with theirs; the 12 px drawing sits in the middle of it at 1:1 */
:root[data-pack] .rd-more > summary svg.ic-px { width: 16px; height: 12px; }
