/* Look D (the signed canvas, R16): its tokens, light and dark from one table, and the frame's layout.
   No colour or size is written outside this file (FE-02). */

@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/atkinson-hyperlegible-400.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/atkinson-hyperlegible-700.woff2) format("woff2"); }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/bricolage-grotesque-var.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-400.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-500.woff2) format("woff2"); }
/* a Hebrew page's (App1.4, N50; the canvas's App1 boards): Assistant the body, Rubik the display, each its Hebrew and
   Latin alone (subset from Google Fonts' variable TTFs), OFL */
@font-face { font-family: "Assistant"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(fonts/assistant-var.woff2) format("woff2"); }
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 300 900; font-display: swap; src: url(fonts/rubik-var.woff2) format("woff2"); }

:root {
  color-scheme: light dark;

  /* colour: light, dark */
  --bg: light-dark(#F5F5F2, #131419);
  --surface: light-dark(#FFFFFF, #1A1B21);
  --ink: light-dark(#1A1B20, #E8E7E1);
  --muted: light-dark(#5F626C, #9C9EA8);
  --line: light-dark(#E4E3DD, #2A2C34);
  --track: light-dark(#DDDCD5, #34363F);
  --mine: light-dark(#ECEBE5, #23252D);
  --yes: light-dark(#3D6B4A, #9FC9A8);
  --no: light-dark(#9A4A2E, #D9A38F);
  --accent-1: light-dark(#B57352, #C99272);
  --accent-2: light-dark(#5867A6, #929FC9);
  --accent-3: light-dark(#94587A, #BE91A9);
  --marker: #FFE27A;
  --marker-ink: #1A1B20;
  /* an applet's lane (PRD_App1, the canvas's App1 boards): its calm teal, and the soft ground under its icon */
  --applet: light-dark(#2F6F6B, #8CC7C0);
  --applet-soft: light-dark(#E3EFED, #1F3533);

  /* type */
  --font-body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", sans-serif;
  /* the firm's mark and name: the brand's face on every page, a Hebrew one's too */
  --font-brand: "Bricolage Grotesque", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 15px;
  --fs-md: 17px;
  --fs-lg: 19px;
  --fs-xl: 26px;
  --fs-2xl: 40px;
  --fs-2xl-phone: 28px;
  --fs-title: 36px;
  --fs-gate: 28px;
  --fs-button: 16px;
  --fs-pre: 12.5px;
  --lh-snug: 1.2;
  --lh-mono: 1.65;
  --lh: 1.5;
  --lh-tight: 1.12;
  --track-wide: 0.12em;
  --track-tight: -0.02em;
  --track-brand: -0.01em;
  --weight-mark: 800;

  /* space and shape */
  --s-1: 2px;
  --s-2: 4px;
  --s-3: 8px;
  --s-4: 12px;
  --s-5: 16px;
  --s-6: 20px;
  --s-7: 24px;
  --s-8: 28px;
  --s-9: 36px;
  --s-10: 44px;
  --s-11: 56px;
  --s-12: 80px;
  --page-max: 1280px;
  --card-min: 300px;
  --heading-min: 520px;
  --icon: 20px;
  --icon-sm: 18px;
  --radius-sm: 4px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xs: 8px;
  --radius-md: 12px;
  --radius-xl: 16px;
  --border: 1px;
  --border-strong: 2px;
  --border-roundel: 3px;
  --border-mark: 2.5px;
  --border-selected: 1.5px;
  --touch: 44px;
  --touch-lg: 48px;
  --touch-xl: 52px;
  --check: 18px;
  --side-min: 320px;
  --gate-min: 640px;
  --column-min: 420px;
  --form-max: 560px;
  /* a team's forms (Win3.8, the canvas's W3_Form): the list beside the form, each wrapping under the other */
  --forms-list-min: 250px;
  --forms-list-max: 420px;
  --forms-form-min: 420px;
  --forms-form-max: 640px;
  /* the Files page's browser (Win3.5, the canvas's W3_Files): the views and folders beside the list and the open file,
     each wrapping under the other; a line's size and change columns; the chips' pill */
  --files-side-min: 210px;
  --files-side-max: 250px;
  --files-column-min: 380px;
  --files-switch-min: 300px;
  --files-find-min: 240px;
  --file-size-w: 64px;
  --file-changed-w: 104px;
  --open-name-min: 160px;
  --chip-radius: 22px;
  --fs-form-title: 22px;
  --call-min: 260px;
  --roundel: 34px;
  --brand-mark: 32px;
  --tabbar: 72px;
  --who-max: 200px;
  /* a line's track (look D's Signal): the rail, its stops and the current dot, by radius; the feed's dot and time */
  --track-h: 22px;
  --track-inset: 9px;
  --rail: 3px;
  --ring: 4px;
  --dot-stop-r: 4.5px;
  --dot-end-r: 3.5px;
  --dot-now-r: 7px;
  --dot-marked-r: 8px;
  --dot: 8px;
  --time-w: 44px;
  /* the chat (look D's Chat): its three columns, the bubbles' widths and their tucked corner */
  --chat-nav-min: 240px;
  --chat-main-min: 560px;
  --chat-side-min: 260px;
  --bubble-mine: 78%;
  --bubble-theirs: 86%;
  --roundel-sm: 30px;
  /* the chat's list and box (Win3.4, the canvas's W3_Chat): a conversation's state mark, the meter before the
     rollover, a folded line's least height, a title's least width beside its acts */
  --chat-mark: 12px;
  --meter-w: 64px;
  --meter-h: 4px;
  --said-system-h: 28px;
  --chat-title-min: 200px;
  /* a button that cannot be pressed */
  --dim: 0.5;
  /* a run's page: its one reading column, and how far a sub-agent stands in from the one that spawned it */
  --read-max: 760px;
  --indent: var(--s-5);
  /* Home's tiles and an applet's screen (App1.2, the canvas's App1_Home and App1_Voice_phone): a tile's least width and
     height, its lane's width, its icon's square; the screen's lane mark; how far a part's place stands below the jump bar */
  --tile-min: 280px;
  --tile-min-h: 180px;
  --lane-w: 5px;
  --tile-icon: 44px;
  --lane-mark: 44px;
  --dot-draft: 10px;
  --jump-clear: 72px;
  /* a draft's card's marks (App1.3, N48; the canvas's App1_Card): each button's least width on its row, as drawn */
  --mark-asis-min: 120px;
  --mark-edits-min: 110px;
  --mark-drop-min: 90px;
  /* the menu (PRD_Win3 R193): the desk's side rail, its width and the least width of the waits badge. The rail stands
     from 1024 px (--rail-break), the bar at the foot below it; a custom property drives no media query, so the two
     queries write 1024 and 1023 themselves, as the phone's write 640 and 641. (--rail is the line's track, above.) */
  --rail-w: 208px;
  /* the desk's frame: the rail and the page beside it, one block centred at every width (the human, 2026-11-26) */
  --frame-max: calc(var(--rail-w) + var(--page-max));
  --rail-break: 1024px;
  --badge-min: 18px;
}
/* a Hebrew page (N50): its faces, and the body a step up, as the canvas sets it */
:root:lang(he) {
  --font-body: "Assistant", system-ui, sans-serif;
  --font-display: "Rubik", sans-serif;
  --fs-base: 16px;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* the frame */
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh);
}
.muted { color: var(--muted); }
.note { margin: 0; font-size: var(--fs-sm); color: var(--muted); }

.top { border-bottom: var(--border) solid var(--line); }
.top-in {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--s-5) var(--s-7);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4) var(--s-8);
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: var(--s-4); color: var(--ink); text-decoration: none; }
.brand-mark {
  box-sizing: border-box;
  width: var(--brand-mark);
  height: var(--brand-mark);
  border-radius: 50%;
  border: var(--border-mark) solid var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-brand);
  font-weight: var(--weight-mark);
  font-size: var(--fs-xs);
}
.brand-name { font-family: var(--font-brand); font-weight: 700; font-size: var(--fs-lg); letter-spacing: var(--track-brand); }
/* the brand keeps its own left-to-right order on a Hebrew page and stands at that page's start, the right */
[dir="rtl"] .brand { justify-content: flex-end; }

/* the menu (R193): one nav beside the page in the frame, the rail at the desk's width, the bar at the foot below it
   (each its own query, after the phone's); a row its icon, its label and, on Approvals, the waits badge */
.menu-item {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-height: var(--touch);
  box-sizing: border-box;
  color: var(--muted);
  text-decoration: none;
}
.menu-item svg { flex: none; width: var(--icon); height: var(--icon); }
.menu-label { min-width: 0; }
.menu-count {
  box-sizing: border-box;
  min-width: var(--badge-min);
  padding: 0 var(--s-2);
  border-radius: var(--badge-min);
  background: var(--ink);
  color: var(--surface);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: var(--badge-min);
  text-align: center;
}
.menu-count:empty { display: none; }

.top-side { display: flex; align-items: center; gap: var(--s-5); }
.clock { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); }
.theme { display: contents; }
.round-button, .memo-button {
  width: var(--touch);
  height: var(--touch);
  border-radius: 50%;
  border: var(--border) solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.round-button svg, .memo-button svg { width: var(--icon-sm); height: var(--icon-sm); }
/* the toggle offers the other theme: the system's until the owner picks one */
.to-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .to-light { display: inline-flex; }
  :root:not([data-theme="light"]) .to-dark { display: none; }
}
:root[data-theme="dark"] .to-light { display: inline-flex; }
:root[data-theme="dark"] .to-dark { display: none; }
/* the Alerts switch: the struck bell while this device is not subscribed, the filled button while it is */
.alerts[hidden] { display: none; }
.alerts .alerts-on, .alerts[aria-pressed="true"] .alerts-off { display: none; }
.alerts[aria-pressed="true"] .alerts-on { display: block; }
.alerts[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.alerts:disabled { opacity: var(--dim); cursor: not-allowed; }

/* a page */
.page { max-width: var(--page-max); margin: 0 auto; padding: var(--s-10) var(--s-7) var(--s-12); }
.page-title { margin: 0 0 var(--s-8); font-family: var(--font-display); font-weight: 500; font-size: var(--fs-title); letter-spacing: var(--track-tight); }

/* Today's head (R193): the greeting and the day's figures, New run beside them at the head's end */
.today-head { display: flex; align-items: flex-start; gap: var(--s-5) var(--s-9); margin-bottom: var(--s-10); }
.today-head .welcome { flex: 1 1 0; min-width: 0; }
.today-new { flex: none; }
.welcome {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5) var(--s-11);
  align-items: flex-end;
  justify-content: space-between;
}
.welcome h1 {
  flex: 1 1 var(--heading-min);
  min-width: 0;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-2xl);
  line-height: var(--lh-tight);
  letter-spacing: var(--track-tight);
}
.totals { margin: 0; display: flex; gap: var(--s-9); flex-wrap: wrap; }
.totals dt { font-size: var(--fs-sm); color: var(--muted); }
.totals dd { margin: var(--s-1) 0 0; font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 500; }

.rule { display: flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-5); }
.rule::after { content: ""; flex: 1; height: var(--border); background: var(--line); }
.rule :is(h2, h3) {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--muted);
}

/* an instance's card */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(var(--card-min), 100%), 1fr)); gap: var(--s-6); }
.card {
  --accent: var(--accent-1);
  background: var(--surface);
  border: var(--border) solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.accent-1 { --accent: var(--accent-1); }
.accent-2 { --accent: var(--accent-2); }
.accent-3 { --accent: var(--accent-3); }
.card[data-state="down"] { --accent: var(--track); }
.card-head { display: flex; align-items: center; gap: var(--s-4); }
.card-head :is(h2, h3), .team h3 { flex: 1; min-width: 0; margin: 0; font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; overflow-wrap: anywhere; }
/* a card folded under its head (the cost page's day, the privacy page's ways): the summary a finger high, + or – at its end */
details.card { gap: 0; }
details.card > summary.card-head { min-height: var(--touch); cursor: pointer; list-style: none; }
details.card > summary.card-head::-webkit-details-marker { display: none; }
details.card > summary.card-head::after { content: "+"; flex: none; font-family: var(--font-mono); color: var(--muted); }
details.card[open] > summary.card-head::after { content: "–"; }
details.card[open] > summary.card-head { margin-bottom: var(--s-6); }
.roundel {
  flex: none;
  box-sizing: border-box;
  width: var(--roundel);
  height: var(--roundel);
  border-radius: 50%;
  border: var(--border-roundel) solid var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-base);
}
.tag { font-size: var(--fs-xs); color: var(--muted); }
.tag-marked { font-weight: 700; padding: var(--s-1) var(--s-3); border-radius: var(--radius-sm); background: var(--marker); color: var(--marker-ink); }
.card[data-state="down"] .tag { font-weight: 700; color: var(--ink); }
/* the way to a team's newest runs, at the card's foot, quiet */
.card-runs { align-self: flex-start; display: inline-flex; align-items: center; min-height: var(--touch); margin-top: auto; font-size: var(--fs-sm); color: var(--muted); text-underline-offset: var(--s-1); }
/* a run's line (N11): its goal, its track, its latest step and its count */
.lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-4); }
.line + .line { border-top: var(--border) solid var(--line); padding-top: var(--s-4); }
.sentence { margin: 0 0 var(--s-2); overflow-wrap: anywhere; }
.track { height: var(--track-h); padding: 0 var(--track-inset); }
.track svg { display: block; width: 100%; height: 100%; overflow: visible; }
.rail { stroke: var(--track); stroke-width: var(--rail); stroke-linecap: round; }
.track-open .rail { stroke-dasharray: var(--rail) var(--s-2); }
.fill { stroke: var(--accent); stroke-width: var(--rail); stroke-linecap: round; }
.stop-start { r: var(--dot-stop-r); fill: var(--accent); }
.stop-end { r: var(--dot-end-r); fill: var(--surface); stroke: var(--track); stroke-width: var(--border-strong); }
.stop-now { r: var(--dot-now-r); fill: var(--surface); stroke: var(--accent); stroke-width: var(--ring); }
.stop-marked { r: var(--dot-marked-r); fill: var(--marker); stroke: var(--ink); stroke-width: var(--border-strong); }
.line-foot { display: flex; justify-content: space-between; gap: var(--s-4); margin-top: var(--s-2); font-size: var(--fs-sm); color: var(--muted); }
.count { font-family: var(--font-mono); font-size: var(--fs-xs); white-space: nowrap; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.facts dt { font-size: var(--fs-sm); color: var(--muted); }
.facts dd { margin: var(--s-1) 0 0; font-family: var(--font-display); font-size: var(--fs-md); font-weight: 500; }
.facts dd .muted { display: block; font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 400; }
/* the day's total, plain: the card's first row, its tokens beside it */
.fact-spend { grid-column: 1 / -1; }
.fact-spend dd[data-k="spend"] { font-size: var(--fs-xl); }
.fact-spend dd .muted { display: inline; }
.facts dd.tokens, .totals dd.tokens { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 400; color: var(--muted); overflow-wrap: anywhere; }
/* what a run cost and its id: under its line, on a job's card, under a conversation's title */
.line-meta { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); align-items: baseline; margin-top: var(--s-2); font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); }
.run-id { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); user-select: all; cursor: copy; }
.run-id[data-copied]::after { content: " copied"; }

/* the cost page (R45, no screen of look D's own): its cards and tables, quiet; a run's cost, where it is named, reads as the figure it was */
a.cost, a.to-cost { color: inherit; text-decoration: underline; text-decoration-color: var(--track); text-decoration-thickness: var(--border); text-underline-offset: var(--s-1); }
a.cost:hover, a.to-cost:hover { text-decoration-color: currentColor; }
.cost .page-title { margin-bottom: var(--s-5); }
.crumb { display: flex; width: fit-content; align-items: center; min-height: var(--touch); margin-bottom: var(--s-2); font-size: var(--fs-sm); color: var(--muted); text-underline-offset: var(--s-1); }
.cost-run .line-meta { margin: 0 0 var(--s-7); }
.day-nav { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-7); font-size: var(--fs-sm); }
.day-nav a { display: inline-flex; align-items: center; min-height: var(--touch); color: var(--muted); text-underline-offset: var(--s-1); }
.day-now { flex: 1; text-align: center; font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--ink); }
.day-nav > :first-child, .day-nav > :last-child { flex: 0 0 auto; min-width: var(--s-12); }
.day-nav > :last-child { justify-content: flex-end; }
.spends { display: flex; flex-direction: column; gap: var(--s-6); }
.spend-sum { flex: none; font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--muted); }
.spend-body { display: flex; flex-direction: column; gap: var(--s-8); min-width: 0; }
.spend-head { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(var(--call-min), 100%), 1fr)); gap: var(--s-4) var(--s-8); }
.spend-head dt { font-size: var(--fs-sm); color: var(--muted); }
.spend-head dd { margin: var(--s-1) 0 0; font-family: var(--font-display); font-size: var(--fs-md); font-weight: 500; overflow-wrap: anywhere; }
.spend-head dd .muted { font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 400; }
.spend-total { grid-column: 1 / -1; }
.spend-total dd { font-size: var(--fs-2xl); line-height: var(--lh-tight); letter-spacing: var(--track-tight); }
.spend-part { min-width: 0; }
.spend-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.spend-table th, .spend-table td { padding: var(--s-3) var(--s-4) var(--s-3) 0; border-bottom: var(--border) solid var(--line); text-align: left; vertical-align: baseline; overflow-wrap: anywhere; }
.spend-table th:last-child, .spend-table td:last-child { padding-right: 0; }
.spend-table thead th { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.spend-table tbody th { font-weight: 400; color: var(--ink); }
.spend-table td { color: var(--muted); overflow-wrap: break-word; }
.spend-table td[data-label="Status"] { white-space: nowrap; }
.spend-table :is(thead th, tbody td):nth-last-child(-n+2) { font-family: var(--font-mono); font-size: var(--fs-xs); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.spend-table :is(tbody td):nth-last-child(-n+2) { color: var(--ink); }
.spend-table :is(thead th, tbody td):nth-last-child(2) { padding-right: var(--s-6); }
[data-part="wallet"] .spend-table :is(thead th, tbody td):nth-last-child(2) { font-family: inherit; font-size: inherit; text-align: left; white-space: normal; padding-right: var(--s-4); color: var(--muted); }
[data-part="wallet"] .spend-table thead th:nth-last-child(2) { font-family: var(--font-mono); font-size: var(--fs-xs); }
[data-part="wallet"] .spend-table tbody td:nth-last-child(2) { font-size: var(--fs-sm); }
.spend-run a { color: var(--ink); text-underline-offset: var(--s-1); }
.spend-run .run-id { display: block; }

/* below the lines: what waits for a yes beside what moved */
.below {
  margin-top: var(--s-11);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(var(--column-min), 100%), 1fr));
  gap: var(--s-10);
  align-items: start;
}
.asks { display: flex; flex-direction: column; gap: var(--s-5); }
/* the status line: what became of the last answer, outside what the live stream re-draws; look D's quiet dashed note */
.status {
  margin: 0 0 var(--s-5);
  padding: var(--s-3) var(--s-4);
  border: var(--border) dashed var(--line);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  color: var(--muted);
  overflow-wrap: anywhere;
}
.status:empty { display: none; }
.chat-main > .status { margin: 0; }

/* a gate: the column's card, the full view, and what became of an answer */
.gate { background: var(--surface); border: var(--border) solid var(--line); border-radius: var(--radius-lg); }
.ask { padding: var(--s-6) var(--s-7); }
.ask-head { display: flex; align-items: center; gap: var(--s-3); margin-bottom: var(--s-3); font-size: var(--fs-sm); color: var(--muted); }
.ask-head .dot, .gate-where .dot, .waiting-head .dot { display: inline-block; margin-top: 0; }
.ask-text { margin: 0 0 var(--s-4); font-size: var(--fs-md); line-height: var(--lh-snug); overflow-wrap: anywhere; }
.asked-text { margin: 0 0 var(--s-2); white-space: pre-line; overflow-wrap: anywhere; }
.preview {
  background: var(--bg);
  border-radius: var(--radius-xs);
  padding: var(--s-4);
  font-family: var(--font-mono);
  font-size: var(--fs-pre);
  line-height: var(--lh-mono);
  color: var(--muted);
  overflow-wrap: anywhere;
}
.answer { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: flex-start; margin-top: var(--s-5); }
.button {
  font: inherit;
  font-size: var(--fs-base);
  min-height: var(--touch);
  box-sizing: border-box;
  padding: var(--s-3) var(--s-6);
  border-radius: var(--radius);
  border: var(--border) solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
a.button { text-decoration: none; }
.button-yes { font-weight: 700; border-color: var(--ink); background: var(--ink); color: var(--surface); }
.button:disabled { opacity: var(--dim); cursor: not-allowed; }
summary.button { list-style: none; }
summary.button::-webkit-details-marker { display: none; }
.not-yet[open] { flex-basis: 100%; display: flex; flex-direction: column; gap: var(--s-3); align-items: flex-start; }
.not-yet[open] > summary { display: none; }
.note-field { display: flex; flex-direction: column; gap: var(--s-2); width: 100%; font-size: var(--fs-sm); color: var(--muted); }
.note-field :is(textarea, input) {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: var(--fs-base);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius-xs);
  border: var(--border) solid var(--line);
  background: var(--bg);
  color: var(--ink);
  resize: vertical;
}
.note-field input { min-height: var(--touch); }
.look { align-self: center; margin-left: var(--s-2); font-size: var(--fs-sm); color: var(--muted); text-underline-offset: var(--s-1); }
.gate-done { padding: var(--s-6) var(--s-7); }
.gate-done p { margin: 0 0 var(--s-3); font-size: var(--fs-md); }
.gate-done a { font-size: var(--fs-sm); color: var(--muted); }
.gate-next { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); align-items: center; }
.back { display: flex; width: fit-content; align-items: center; min-height: var(--touch); font-size: var(--fs-sm); color: var(--muted); text-underline-offset: var(--s-1); }

/* the approvals page: the waiting list and the history beside one gate in full */
.approvals { display: flex; flex-wrap: wrap; gap: var(--s-10); align-items: flex-start; }
.approvals-side { flex: 1 1 var(--side-min); min-width: 0; display: flex; flex-direction: column; gap: var(--s-8); }
.approvals > .gate { flex: 999 1 var(--gate-min); min-width: 0; }
.side-title {
  margin: 0 0 var(--s-4);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--muted);
}
.waiting-list, .history-list { list-style: none; margin: 0; padding: 0; }
.waiting-list { display: flex; flex-direction: column; gap: var(--s-3); }
.waiting-item {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--surface);
  border: var(--border) solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--s-4) var(--s-5);
}
.waiting-item[aria-current="true"] { border: var(--border-selected) solid var(--ink); }
.waiting-head { display: flex; justify-content: space-between; gap: var(--s-3); font-size: var(--fs-sm); color: var(--muted); }
.waiting-ask { display: block; margin-top: var(--s-2); font-weight: 700; overflow-wrap: anywhere; }
.decision { padding: var(--s-4) 0; border-bottom: var(--border) solid var(--line); font-size: var(--fs-base); overflow-wrap: anywhere; }
.decision-head { display: flex; gap: var(--s-3); align-items: baseline; }
.decision-time { flex: none; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); }
.verdict { font-size: var(--fs-sm); font-weight: 700; }
.verdict-yes { color: var(--yes); }
.verdict-no { color: var(--no); }
.decision-note { margin-top: var(--s-1); color: var(--muted); font-style: italic; }
.decision[data-reply="conflict"], .decision[data-reply="failed"] { color: var(--muted); }

.gate-full { border-radius: var(--radius-xl); padding: var(--s-8) var(--s-9); }
.gate-head { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); align-items: center; justify-content: space-between; }
.gate-where { font-size: var(--fs-sm); color: var(--muted); overflow-wrap: anywhere; }
.gate-ask {
  margin: var(--s-4) 0 var(--s-3);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-gate);
  line-height: var(--lh-snug);
  letter-spacing: var(--track-brand);
  overflow-wrap: anywhere;
}
.gate-goal { margin: 0 0 var(--s-7); color: var(--muted); overflow-wrap: anywhere; }
.gate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(var(--call-min), 100%), 1fr)); gap: var(--s-8); }
.gate-grid > section { min-width: 0; }
.gate-side { display: flex; flex-direction: column; gap: var(--s-6); }
.gate-side p { margin: 0 0 var(--s-2); overflow-wrap: anywhere; }
.gate-label { display: block; margin: 0 0 var(--s-2); font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
.call { border: var(--border) solid var(--line); border-radius: var(--radius); overflow: hidden; }
.call-tool { padding: var(--s-4) var(--s-5); border-bottom: var(--border) solid var(--line); font-family: var(--font-mono); font-size: var(--fs-pre); font-weight: 500; }
.call-none { padding: var(--s-4) var(--s-5); }
.call-args { margin: 0; padding: var(--s-4) var(--s-5); font-family: var(--font-mono); font-size: var(--fs-pre); line-height: var(--lh-mono); }
.call-args > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: var(--s-4); }
.call-args dt { color: var(--muted); overflow-wrap: anywhere; }
.call-args dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.call-raw { margin: 0 var(--s-5) var(--s-5); padding: var(--s-3) var(--s-4); background: var(--bg); border-radius: var(--radius-xs); font-size: var(--fs-sm); }
.call-raw summary { cursor: pointer; color: var(--muted); min-height: var(--touch); display: flex; align-items: center; }
.call-raw pre { margin: var(--s-3) 0 0; font-family: var(--font-mono); font-size: var(--fs-xs); white-space: pre-wrap; overflow-wrap: anywhere; }
/* A held send drawn as an email (W2.7): its head as a mail's, its body as the plain text it sends. */
.email-head { margin: 0; padding: var(--s-4) var(--s-5); border-bottom: var(--border) solid var(--line); font-size: var(--fs-sm); line-height: var(--lh); }
.email-head > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 4fr); gap: var(--s-4); }
.email-head dt { color: var(--muted); }
.email-head dd { margin: 0; overflow-wrap: anywhere; }
.email .email-body { margin: 0; padding: var(--s-4) var(--s-5); font-family: var(--font-body); font-size: var(--fs-base); line-height: var(--lh); white-space: pre-wrap; overflow-wrap: anywhere; }
.step-part .call-raw pre { white-space: pre-wrap; }
.gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  align-items: center;
  margin-top: var(--s-8);
  padding-top: var(--s-6);
  border-top: var(--border) solid var(--line);
}
.gate-actions .button { min-height: var(--touch-lg); font-size: var(--fs-button); padding: var(--s-4) var(--s-7); }
.again { display: inline-flex; align-items: center; gap: var(--s-3); margin-left: auto; min-height: var(--touch); font-size: var(--fs-sm); color: var(--muted); }
.again input { width: var(--check); height: var(--check); accent-color: var(--ink); }

/* the owner's alone (PRD_W2 N19, S77; no screen of look D's own, built from the gate's parts): a reach gate's line, a
   yes's three choices where the run's yes is offered, the owner's mark on a gate staff may not answer, a halt at a cap
   and its raise, and who gave a decision */
.gate-reach { margin: 0 0 var(--s-6); overflow-wrap: anywhere; }
.ask .gate-reach { margin: var(--s-3) 0 0; }
.again-choices { flex-direction: column; align-items: flex-start; gap: var(--s-1); margin: 0 0 0 auto; padding: 0; border: 0; min-width: 0; }
.again-choices label { display: flex; align-items: center; gap: var(--s-3); min-height: var(--touch); overflow-wrap: anywhere; }
.again-choices input { flex: none; }
.waiting-item .tag { display: block; margin-top: var(--s-2); }
.cap-halt { margin-top: var(--s-3); }
.cap-halt > .note { margin: 0; }
.raise { margin-top: var(--s-3); }
.decision-by { margin-top: var(--s-1); }

/* As it happens: what moved, newest first */
.feed { list-style: none; margin: 0; padding: 0; }
.feed-item { display: flex; gap: var(--s-5); padding: var(--s-5) 0; border-bottom: var(--border) solid var(--line); }
.feed-item p { flex: 1; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.feed-time { flex: none; width: var(--time-w); font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--muted); }
.dot { flex: none; width: var(--dot); height: var(--dot); margin-top: var(--s-3); border-radius: 50%; background: var(--accent); }
.feed-empty { padding: var(--s-5) 0; }

/* the chat (look D's Chat): the conversations, one conversation and its box, and what is in it */
.chat { display: flex; flex-wrap: wrap; gap: var(--s-9); align-items: flex-start; }
.chat-nav { flex: 1 1 var(--chat-nav-min); min-width: 0; display: flex; flex-direction: column; gap: var(--s-6); }
.chat-main { flex: 999 1 var(--chat-main-min); min-width: 0; display: flex; flex-direction: column; gap: var(--s-6); }
.chat-side { flex: 1 1 var(--chat-side-min); min-width: 0; display: flex; flex-direction: column; gap: var(--s-5); }
.chat-new { display: flex; flex-direction: column; gap: var(--s-3); }
.chat-more summary { display: flex; align-items: center; min-height: var(--touch); cursor: pointer; }
.chat-new-error { color: var(--no); overflow-wrap: anywhere; }
/* a side column: the column it was on the desk, where it is shown whole and its summary hidden; a folded <details>
   on the phone (below). A browser without ::details-content folds it on the desk too. */
.fold-in { display: flex; flex-direction: column; gap: var(--s-6); }
.chat-side .fold-in { gap: var(--s-5); }
.fold-summary {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: var(--touch);
  box-sizing: border-box;
  padding: 0 var(--s-4);
  border: var(--border) solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  list-style: none;
}
.fold-summary::-webkit-details-marker { display: none; }
.fold-summary::after { content: "+"; font-family: var(--font-mono); color: var(--muted); }
.fold[open] > .fold-summary::after { content: "–"; }
.fold[open] > .fold-summary { margin-bottom: var(--s-4); }
.fold-summary .side-title { flex: none; margin: 0; }
.fold-now { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-sm); }
@media (min-width: 641px) {
  @supports selector(::details-content) {
    .fold-summary { display: none; }
    .fold::details-content { content-visibility: visible; }
  }
}
/* the desk at the width its three columns sit side by side (their minimums, the two gaps and the page's padding: 1181
   px) beside the rail (--rail-w, 208 px): the side columns stay in view while the conversation is kept at its newest line */
@media (min-width: 1389px) {
  .chat-nav, .chat-side { position: sticky; top: var(--s-5); max-height: calc(100vh - var(--s-9)); overflow-y: auto; }
}
.chat-select {
  font: inherit;
  min-height: var(--touch);
  padding: 0 var(--s-4);
  border-radius: var(--radius-xs);
  border: var(--border) solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.chat-new-button { justify-content: center; }
/* the sidebar (N36): the search and the team, New conversation folded at its head, the conversations by day */
.chat-find { display: flex; flex-direction: column; gap: var(--s-4); }
.chat-find .chat-select { width: 100%; min-width: 0; font-size: var(--fs-base); }
.chat-find input[type="search"] { min-height: var(--touch); padding: 0 var(--s-4); background: var(--surface); }
.chat-new-fold > summary { width: 100%; justify-content: center; font-weight: 700; border-color: var(--ink); }
.chat-new-fold[open] > summary { margin-bottom: var(--s-4); }
.chat-day { display: flex; flex-direction: column; gap: var(--s-2); }
.chat-day + .chat-day { margin-top: var(--s-4); }
.chat-day-label { margin: var(--s-3) 0 var(--s-2); font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--muted); }
.chat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-1); }
.chat-item { display: flex; gap: var(--s-4); padding: var(--s-4) var(--s-4); border: var(--border) solid transparent; border-radius: var(--radius-xs); color: var(--ink); text-decoration: none; }
.chat-item[aria-current="page"] { background: var(--surface); border-color: var(--ink); }
/* its state's mark: waiting the marker, open a ring, ended a quiet dot */
.chat-mark { flex: none; box-sizing: border-box; width: var(--chat-mark); height: var(--chat-mark); margin-top: var(--s-2); border-radius: 50%; background: var(--track); }
.chat-item[data-state="waiting"] .chat-mark { background: var(--marker); border: var(--border-strong) solid var(--ink); }
.chat-item[data-state="open"] .chat-mark { background: transparent; border: var(--border-roundel) solid var(--ink); }
.chat-item-words { flex: 1; min-width: 0; }
.chat-item-title { display: block; font-size: var(--fs-base); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-item[aria-current="page"] .chat-item-title { font-weight: 700; }
.chat-item-sub { display: block; font-size: var(--fs-sm); color: var(--muted); overflow-wrap: anywhere; }
/* the phone's way back to the list (N43): the desk shows the list beside the conversation */
.chat-back { display: none; align-items: center; min-height: var(--touch); color: var(--ink); font-size: var(--fs-sm); text-underline-offset: var(--s-1); }
/* the head (W3_Chat): the title on one line, its pencil, End; the run's id under it */
.chat-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-4); padding-bottom: var(--s-4); margin-bottom: var(--s-3); border-bottom: var(--border) solid var(--line); }
.chat-title { flex: 1 1 var(--chat-title-min); min-width: 0; margin: 0; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-lg); line-height: var(--lh-snug); letter-spacing: var(--track-brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-acts { display: contents; }
.icon-button {
  width: var(--touch);
  height: var(--touch);
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--border) solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}
.icon-button::-webkit-details-marker { display: none; }
.icon-button svg { width: var(--icon-sm); height: var(--icon-sm); }
.chat-rename[open] > .icon-button { border-color: var(--line); color: var(--ink); }
.chat-rename[open], .chat-end[open] { flex-basis: 100%; }
.chat-rename-form, .chat-end-form { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); margin-top: var(--s-3); }
.chat-end[open] > summary { display: none; }
.chat-end-form .button { border-color: var(--no); color: var(--no); }
.chat-from { margin: 0 0 var(--s-2); }
.chat-from a { color: var(--ink); text-underline-offset: var(--s-1); }
.chat-continue-slot:empty { display: none; }
.chat-continue { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); }
#chat-meta { margin-bottom: var(--s-4); }
.talk { display: flex; flex-direction: column; gap: var(--s-6); }
.said { display: flex; justify-content: flex-start; }
.said-mine { justify-content: flex-end; }
/* on a Hebrew page as the canvas draws it (App1_Voice_phone): her lines on the right, the agent's on the left */
[dir="rtl"] .said { justify-content: flex-end; }
[dir="rtl"] .said-mine { justify-content: flex-start; }
.said-bubble {
  max-width: var(--bubble-theirs);
  min-width: 0;
  box-sizing: border-box;
  padding: var(--s-4) var(--s-5);
  background: var(--surface);
  border: var(--border) solid var(--line);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-sm);
}
.said-mine .said-bubble { max-width: var(--bubble-mine); background: var(--mine); border-color: var(--mine); border-radius: var(--radius-lg) var(--radius-lg) var(--radius-sm) var(--radius-lg); }
.said-who { margin-bottom: var(--s-2); font-size: var(--fs-xs); color: var(--muted); }
.said-text { white-space: pre-line; overflow-wrap: anywhere; }
/* an agent's line is Markdown (N36): its own breaks, not the source's */
.said-text > .md { white-space: normal; }
a.run-short { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--ink); text-underline-offset: var(--s-1); }
/* the files a line of the owner's carried, each a chip under its words */
.said-files { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
.said-file { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--radius-xs); background: var(--surface); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.said-file svg { flex: none; width: var(--icon-sm); height: var(--icon-sm); }
/* a named sender's lines folded (R196 (2)), and the rollover with its gist (N36): quiet, the note on a tap */
.said-system, .said-rolled { font-size: var(--fs-sm); color: var(--muted); overflow-wrap: anywhere; }
.said-system { padding: 0 var(--s-2); }
.said-system > summary { min-height: var(--said-system-h); cursor: pointer; }
.said-rolled { border: var(--border) dashed var(--line); border-radius: var(--radius-xs); padding: 0 var(--s-4); }
.said-rolled > summary { padding: var(--s-3) 0; cursor: pointer; }
.said-note, .said-gist { margin: var(--s-2) 0 var(--s-3); white-space: pre-wrap; }
.job-link {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  max-width: var(--bubble-theirs);
  box-sizing: border-box;
  padding: var(--s-4) var(--s-5);
  border-radius: var(--radius);
  background: var(--surface);
  border: var(--border) solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.job-link .roundel { width: var(--roundel-sm); height: var(--roundel-sm); }
.job-link-text { flex: 1; min-width: 0; }
.job-link-title { display: block; font-weight: 700; font-size: var(--fs-base); overflow-wrap: anywhere; }
.job-link-follow { font-size: var(--fs-sm); }
/* the box stays in view as the conversation scrolls (R197), at the viewport's foot (above the phone's tab bar, below),
   the page's ground drawn under it so no line shows through the gap */
.chat-box {
  position: sticky;
  bottom: var(--s-4);
  z-index: 1;
  background: var(--surface);
  border: var(--border-selected) solid var(--ink);
  border-radius: var(--radius-lg);
  padding: var(--s-4) var(--s-5);
  box-shadow: 0 0 0 var(--s-4) var(--bg);
  scroll-margin-bottom: var(--s-7);
}
/* a box that takes no line now: the form it was, Send disabled, the why under it */
.chat-box[data-closed] { border-color: var(--line); }
.chat-why { margin-top: var(--s-2); color: var(--ink); }
.chat-ask { margin-bottom: var(--s-2); }
.chat-question { display: block; font-weight: 700; overflow-wrap: anywhere; }
.chat-input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: var(--fs-base);
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink);
  resize: vertical;
}
/* the box's foot: the memo's control and Send either side of the note over the spend; on the phone the note and the
   spend each a line under them, so the row is never stacked four high */
.chat-box-foot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "memo note send" "memo spend send";
  align-items: center;
  column-gap: var(--s-4);
  row-gap: var(--s-1);
  margin-top: var(--s-2);
}
.chat-box-foot > .box-tools { grid-area: memo; display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.chat-box-foot > .note { grid-area: note; min-width: 0; }
.chat-box-foot > .box-spend { grid-area: spend; }
.chat-box-foot > button[type="submit"] { grid-area: send; }
/* what the conversation cost, beside Send (R197): quiet, the figures in mono as a line's meta */
.box-spend { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); overflow-wrap: anywhere; }
/* the meter before the rollover (N36, §5), from half its line: a thin track filled in ink, its words beside it */
.roll { display: inline-flex; align-items: center; gap: var(--s-2); }
.roll-meter { appearance: none; width: var(--meter-w); height: var(--meter-h); border: 0; border-radius: var(--s-1); background: var(--track); overflow: hidden; }
.roll-meter::-webkit-meter-bar { height: var(--meter-h); border: 0; border-radius: var(--s-1); background: var(--track); }
.roll-meter::-webkit-meter-optimum-value { background: var(--ink); }
.roll-meter::-moz-meter-bar { background: var(--ink); }
/* attach (N36): the clip beside the mic, its input over it unseen, its words for a reader of the page alone */
.attach-set { display: contents; margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.attach-button {
  position: relative;
  flex: none;
  width: var(--touch);
  height: var(--touch);
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: var(--border) solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  cursor: pointer;
}
.attach-button svg { width: var(--icon-sm); height: var(--icon-sm); }
.attach-button:focus-within { outline: var(--border-strong) solid var(--ink); outline-offset: var(--s-1); }
.attach-button:has(.attach-input:disabled) { opacity: var(--dim); cursor: not-allowed; }
.attach-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: inherit; }
.attach-words { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#say-files-note { margin: var(--s-1) 0 var(--s-2); }
.say-files-sizes { margin: 0 0 var(--s-2); }
.say-files-sizes:empty { display: none; }
/* a voice memo (Win3.10, the canvas's W3_Chat and W3_NewRun): the round mic button, recording in the waiting colour; the
   language switch small beside it; the time while it records; the note under the box's text */
.memo { flex: none; display: inline-flex; align-items: center; gap: var(--s-3); }
.memo-button[hidden], .memo-lang[hidden] { display: none; }
.memo-button:disabled { opacity: var(--dim); cursor: not-allowed; }
.memo-button[aria-pressed="true"] { background: var(--marker); color: var(--marker-ink); border-color: var(--ink); }
.memo-lang { display: inline-flex; border: var(--border) solid var(--line); border-radius: var(--radius-xs); overflow: hidden; }
.memo-lang button {
  min-width: var(--s-9);
  min-height: var(--touch);
  padding: 0 var(--s-3);
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--fs-xs);
  cursor: pointer;
}
.memo-lang button + button { border-inline-start: var(--border) solid var(--line); }
.memo-lang button[aria-pressed="true"] { background: var(--mine); color: var(--ink); font-weight: 700; }
/* send when transcribed (R203): a small switch beside the mic, filled while on */
.memo-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-width: var(--touch);
  min-height: var(--touch);
  padding: 0 var(--s-3);
  border: var(--border) solid var(--line);
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--fs-xs);
  cursor: pointer;
}
.memo-send[hidden] { display: none; }
.memo-send svg { flex: none; width: var(--icon-sm); height: var(--icon-sm); }
.memo-send[aria-pressed="true"] { background: var(--mine); color: var(--ink); font-weight: 700; border-color: var(--ink); }
.memo-time { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); }
.memo-time:empty, .memo-note:empty { display: none; }
.chat-box .memo-note { margin: var(--s-1) 0 var(--s-2); }
.memo-off { margin-top: var(--s-2); }
.new-run-goal { display: flex; flex-direction: column; gap: var(--s-3); }
.job-card, .files { background: var(--surface); border: var(--border) solid var(--line); border-radius: var(--radius-md); padding: var(--s-5) var(--s-6); }
.job-title { margin: var(--s-1) 0 var(--s-3); font-weight: 700; overflow-wrap: anywhere; }
.tell { display: flex; flex-direction: column; gap: var(--s-3); align-items: flex-start; margin-top: var(--s-4); }
/* a job that takes no line: its form stays only while something is typed in it */
.tell[data-closed]:has(textarea:placeholder-shown) { display: none; }
.tell-note:empty { display: none; }
.file-list { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); font-family: var(--font-mono); font-size: var(--fs-sm); overflow-wrap: anywhere; }

/* the first run (PRD_W2 N17, no screen of look D's own): one column, the firm's teams and the owner's password */
.first-run-top .top-in, .first-run { max-width: var(--form-max); }
.first-run .page-title { margin-bottom: var(--s-4); overflow-wrap: anywhere; }
.first-run-lead { margin: 0 0 var(--s-10); color: var(--muted); }
.first-run-part + .first-run-part { margin-top: var(--s-10); }
.first-run-part > .note { margin-bottom: var(--s-5); }
.teams { list-style: none; margin: 0; padding: 0; background: var(--surface); border: var(--border) solid var(--line); border-radius: var(--radius-lg); }
.team { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5); }
.team + .team { border-top: var(--border) solid var(--line); }
.team[data-state="down"] { --accent: var(--track); }
.team h3 { font-size: var(--fs-md); }
.team[data-state="down"] .tag { font-weight: 700; color: var(--ink); }
.first-run-form { display: flex; flex-direction: column; gap: var(--s-5); }
.first-run-form > .button { align-self: flex-start; min-height: var(--touch-lg); font-size: var(--fs-button); padding: var(--s-4) var(--s-7); }
.first-run-form .note-field input { background: var(--surface); }
/* The first run's one-time code: typed as the install printed it, its letters apart. */
.first-run-form .note-field input[name="code"] { font-family: var(--font-mono); font-size: var(--fs-md); letter-spacing: var(--track-wide); text-transform: uppercase; }
.first-run-who { margin: 0; overflow-wrap: anywhere; }
.first-run-error { color: var(--no); overflow-wrap: anywhere; }

/* who is signed in (PRD_W2 N18): the name, a link to their own password (R83; a key on the phone), and the way out in
   the header; the notice of a window with no owner */
.person-out { display: flex; align-items: center; gap: var(--s-4); margin: 0; }
.person-who { max-width: var(--who-max); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-sm); color: var(--muted); text-decoration: none; }
.person-who:hover, .person-who:focus-visible { color: var(--ink); text-decoration: underline; }
.person-key { display: none; box-sizing: border-box; text-decoration: none; }
.sign-out { display: contents; }
.no-owner { max-width: var(--page-max); box-sizing: border-box; margin: 0 auto; padding: var(--s-3) var(--s-7); font-size: var(--fs-sm); color: var(--muted); border-bottom: var(--border) dashed var(--line); overflow-wrap: anywhere; }
/* a person's header (App1.4, N49): no bar, rail, clock or switch; the brand, then her Home, her name, her password and
   the way out on one row, wrapping under the brand where it must; the page alone in the frame, no bar's room below it */
.seat-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-5); min-width: 0; }
.seat-home, .seat-password { display: inline-flex; align-items: center; min-height: var(--touch); color: var(--ink); text-underline-offset: var(--s-1); }
.seat-home[aria-current="page"], .seat-password[aria-current="page"] { font-weight: 700; text-decoration: none; }
.seat-name { max-width: var(--who-max); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-sm); color: var(--muted); }
.seat-out { font: inherit; min-height: var(--touch); padding: 0 var(--s-4); border-radius: var(--radius); border: var(--border) solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }

/* the door (sign-in, a one-time link's page) is the first run's column; nothing of its own but the line under the form */
.door .first-run-form + .note { margin-top: var(--s-7); }

/* the people page: a card each person, the teams as a row of ticks, a link handed once */
.people-list { list-style: none; margin: 0 0 var(--s-11); padding: 0; display: flex; flex-direction: column; gap: var(--s-5); max-width: var(--form-max); }
.person { display: flex; flex-direction: column; gap: var(--s-4); background: var(--surface); border: var(--border) solid var(--line); border-radius: var(--radius-lg); padding: var(--s-5) var(--s-6); }
.person-head { display: flex; align-items: center; gap: var(--s-4); }
.person-name { flex: 1; min-width: 0; font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; overflow-wrap: anywhere; }
.person-form { display: flex; flex-direction: column; gap: var(--s-4); align-items: flex-start; }
.people-teams { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-6); margin: 0; padding: 0; border: 0; min-width: 0; }
.people-teams legend { padding: 0; margin-bottom: var(--s-2); font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--muted); }
.people-teams .again { margin-left: 0; }
.person-acts { display: flex; flex-wrap: wrap; gap: var(--s-3); padding-top: var(--s-4); border-top: var(--border) solid var(--line); }
.person-acts form { margin: 0; }
.people > .first-run-part { max-width: var(--form-max); }
.handed { max-width: var(--form-max); box-sizing: border-box; margin: 0 0 var(--s-9); padding: var(--s-5) var(--s-6); background: var(--surface); border: var(--border-selected) solid var(--ink); border-radius: var(--radius-lg); }
.handed h2 { margin: 0 0 var(--s-3); font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; overflow-wrap: anywhere; }
.handed p { margin: 0 0 var(--s-4); font-size: var(--fs-sm); color: var(--muted); }
.handed-link { display: block; width: 100%; min-width: 0; box-sizing: border-box; min-height: var(--touch-lg); padding: var(--s-3) var(--s-4); font-family: var(--font-mono); font-size: var(--fs-sm); border-radius: var(--radius-xs); border: var(--border) solid var(--line); background: var(--bg); color: var(--ink); user-select: all; text-overflow: clip; }

/* the privacy page (PRD_W2 N20; no screen of look D's own, built of its parts): one calm column, the phone's width first.
   A way that is on and reaches outside is the one thing with weight, in the waiting colour (the marker, as a gate's signal
   and a marked tag); every other way, off or kept inside, is plain ink on the page's own line. */
.privacy { max-width: var(--read-max); }
.privacy .page-title { margin-bottom: var(--s-4); }
.lede { margin: 0 0 var(--s-3); color: var(--muted); }
.privacy > .note { margin-bottom: var(--s-7); }
/* each team, and the box, a card as Today's, folded under its head; the head keeps what folding must never hide: how
   many ways are on and reach out, in the waiting colour, and a part not read. The box's roundel is no team's colour. */
.privacy-team { margin-bottom: var(--s-6); }
.privacy-box { --accent: var(--muted); margin-bottom: 0; }
.privacy-box .roundel svg { width: var(--icon-sm); height: var(--icon-sm); }
.privacy-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--s-2) var(--s-4); }
.privacy-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s-2); }
.tag-unread { font-weight: 700; color: var(--ink); }
.privacy-body > .ways:last-child { margin-bottom: 0; }
/* on the phone the head's tags take the line under the name, the fold's mark kept at the end of the first */
@media (max-width: 640px) {
  .privacy-head { grid-template-columns: auto minmax(0, 1fr) auto; }
  .privacy-tags { grid-column: 2 / -1; grid-row: 2; justify-content: flex-start; }
}
.ways { margin-bottom: var(--s-8); }
.ways-title { margin: 0 0 var(--s-2); font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; }
.ways-unread { padding: var(--s-3) 0; color: var(--ink); overflow-wrap: anywhere; }
.box-limit { margin: 0 0 var(--s-5); font-size: var(--fs-sm); color: var(--muted); }
.way-list { list-style: none; margin: 0; padding: 0; }
.way { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-4) var(--s-4); border-left: var(--border-mark) solid transparent; border-top: var(--border) solid var(--line); }
.way:last-child { border-bottom: var(--border) solid var(--line); }
.way-out { border-left-color: var(--marker); }
.way-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); }
.way-name { min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.way-says { margin: 0; overflow-wrap: anywhere; }
.way-last, .way-held { overflow-wrap: anywhere; }
.way-switch { margin: var(--s-2) 0 0; }
.tag-out { font-weight: 700; padding: var(--s-1) var(--s-3); border-radius: var(--radius-sm); background: var(--marker); color: var(--marker-ink); }

/* a run's page (PRD_Win2 N26; no screen of look D's own, built of its parts): one column, the phone's width first.
   Its head, the answer in full (the page's subject), then the story, quieter: each agent under its stage, each step a
   line that opens, a gate its signal. */
.run { max-width: var(--read-max); }
a.to-run { color: inherit; text-decoration: underline; text-decoration-color: var(--track); text-decoration-thickness: var(--border); text-underline-offset: var(--s-1); }
a.to-run:hover { text-decoration-color: currentColor; }
.job-title { display: block; color: var(--ink); }
.run-head { margin-bottom: var(--s-9); }
.run .run-goal { margin-bottom: var(--s-3); font-size: var(--fs-xl); line-height: var(--lh-snug); overflow-wrap: anywhere; }
.run-goal-whole { margin: 0 0 var(--s-4); color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.run-meta { margin: 0 0 var(--s-4); }
a.run-team { color: inherit; text-underline-offset: var(--s-1); }
/* a team's newest runs (PRD_Win2 R86): the run's page's column, a line a run, each its goal over its status and start */
.team-runs { max-width: var(--read-max); }
.team-run-list { list-style: none; margin: 0 0 var(--s-5); padding: 0; }
.team-run { padding: var(--s-4) 0; border-bottom: var(--border) solid var(--line); overflow-wrap: anywhere; }
.team-run:first-child { border-top: var(--border) solid var(--line); }
.team-run .to-run { display: block; color: var(--ink); }
/* the menu's Runs (R193): a line a team, its name over its state and the way to its newest runs */
.runs-team-name { display: block; font-weight: 700; }
.runs-team .line-meta { align-items: center; }
.runs-team .to-run { display: inline-flex; align-items: center; min-height: var(--touch); text-underline-offset: var(--s-1); }
/* the More page (R193; look D's list): a row a place off the bar, its icon, its name and its line under it */
.more-page { max-width: var(--read-max); }
.more-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: var(--border) solid var(--line); border-radius: var(--radius-lg); }
.more-list li + li { border-top: var(--border) solid var(--line); }
.more-item {
  display: grid;
  grid-template-columns: var(--icon) minmax(0, 1fr);
  grid-template-areas: "icon name" ". line";
  align-items: center;
  gap: var(--s-1) var(--s-4);
  min-height: var(--touch-lg);
  box-sizing: border-box;
  padding: var(--s-4) var(--s-5);
  color: var(--ink);
  text-decoration: none;
}
.more-item svg { grid-area: icon; width: var(--icon); height: var(--icon); color: var(--muted); }
.more-name { grid-area: name; font-weight: 700; }
.more-line { grid-area: line; font-size: var(--fs-sm); color: var(--muted); overflow-wrap: anywhere; }
/* the Files page (PRD_Win2 N27; no screen of look D's own): the runs list's column, a line an entry, its name over its
   kind, size and change time; the viewer under the file's name, its Download and Share */
.files-page:not(.files-browse) { max-width: var(--read-max); }
.crumbs { display: flex; flex-wrap: wrap; column-gap: var(--s-3); margin-bottom: var(--s-2); font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); }
.crumbs a { display: inline-flex; align-items: center; min-height: var(--touch); color: inherit; text-underline-offset: var(--s-1); overflow-wrap: anywhere; }
.crumbs a + a::before, .crumbs a + span::before { content: "›"; display: inline-block; margin-inline-end: var(--s-3); }
/* a chevron points the page's own way: on a Hebrew page the crumbs' separator mirrored (the back link's ‹ is mirrored
   by the browser, a character of the bidi algorithm's own) */
[dir="rtl"] .crumbs a + a::before, [dir="rtl"] .crumbs a + span::before { transform: scaleX(-1); }
.crumbs span[aria-current] { display: inline-flex; align-items: center; min-height: var(--touch); color: var(--ink); overflow-wrap: anywhere; }
.files-page .files-title { overflow-wrap: anywhere; }
.files-stream, .files-cut { margin-bottom: var(--s-4); }
.files-page .file-list { list-style: none; margin: 0 0 var(--s-5); padding: 0; }
.file-entry { padding: var(--s-4) 0; border-bottom: var(--border) solid var(--line); overflow-wrap: anywhere; }
.file-entry:first-child { border-top: var(--border) solid var(--line); }
a.to-file { display: block; color: var(--ink); text-decoration: underline; text-decoration-color: var(--track); text-decoration-thickness: var(--border); text-underline-offset: var(--s-1); }
a.to-file:hover { text-decoration-color: currentColor; }
.file-meta { margin: 0 0 var(--s-5); }
.file-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-7); }
.share[hidden] { display: none; }
.file-body { min-width: 0; }
.file-body > * + * { margin-top: var(--s-4); }
.file-text { margin: 0; padding: var(--s-4); overflow-x: auto; max-width: 100%; box-sizing: border-box; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: var(--fs-pre); line-height: var(--lh-mono); background: var(--surface); border: var(--border) solid var(--line); border-radius: var(--radius-xs); }
.file-image { display: block; max-width: 100%; height: auto; border: var(--border) solid var(--line); border-radius: var(--radius-xs); }
.file-table td { white-space: normal; }
.file-open { margin: 0; }
.files-words { color: var(--ink); overflow-wrap: anywhere; }
.card-ways { display: flex; flex-wrap: wrap; column-gap: var(--s-5); margin-top: auto; }
.card-ways .card-runs { margin-top: 0; }
.card-files, .card-new, .card-chat { display: inline-flex; align-items: center; min-height: var(--touch); font-size: var(--fs-sm); color: var(--muted); text-underline-offset: var(--s-1); }
.run-files { margin-bottom: var(--s-10); min-width: 0; }
.run-files a, a.run-space { color: inherit; text-underline-offset: var(--s-1); }
.run-files .file-list { margin-top: var(--s-4); }
.run-receipt { margin-bottom: var(--s-3); overflow-wrap: anywhere; }
.marks:empty { display: none; }
.marks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-1); font-size: var(--fs-sm); color: var(--muted); overflow-wrap: anywhere; }
.run-answer { margin-bottom: var(--s-10); min-width: 0; }
.run-reason, .new-run-said { margin: 0 0 var(--s-5); padding: var(--s-4) var(--s-5); border-left: var(--border-strong) solid var(--no); background: var(--surface); border-radius: var(--radius-xs); overflow-wrap: anywhere; }
/* A request past its model's window (`PastSaid`): the person's words, the core's beneath them on a line of its own. */
.past-core { display: block; margin-top: var(--s-2); overflow-wrap: anywhere; }
/* a refusal on a Hebrew page (App1.4, N50): the line of its kind, then the English words whole under it, isolated left
   to right, quiet, set against the same edge as the line above; drawn whole, it stands as a run's reason does */
.said-he { display: block; }
.said-en { display: block; margin-top: var(--s-1); font-size: var(--fs-sm); font-weight: 400; color: var(--muted); text-align: end; overflow-wrap: anywhere; }
.refusal-said { margin: 0 0 var(--s-5); padding: var(--s-4) var(--s-5); border-inline-start: var(--border-strong) solid var(--no); background: var(--surface); border-radius: var(--radius-xs); overflow-wrap: anywhere; }
.answer-part + .answer-part, .output + .output { margin-top: var(--s-6); }
.answer-key, .output-of, .stage { margin: 0 0 var(--s-2); font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--muted); }
/* an agent's words, rendered: never wider than the column, a wide table or a long line scrolled in its own box */
.md { min-width: 0; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md :is(p, ul, ol, pre, blockquote, .md-table, .md-front) { margin: 0 0 var(--s-4); }
.md :is(h3, h4, h5) { margin: var(--s-7) 0 var(--s-3); line-height: var(--lh-snug); }
.md h3 { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; }
.md h4 { font-size: var(--fs-md); font-weight: 700; }
.md h5 { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--muted); }
.md :is(ul, ol) { padding-inline-start: var(--s-7); }
.md li + li { margin-top: var(--s-1); }
.md li > :is(ul, ol) { margin: var(--s-1) 0 0; }
.md a { color: inherit; text-decoration: underline; text-decoration-color: var(--muted); text-decoration-thickness: var(--border); text-underline-offset: var(--s-1); }
.md a:hover { text-decoration-color: currentColor; }
.md-table { overflow-x: auto; max-width: 100%; scrollbar-width: thin; scrollbar-color: var(--track) transparent; }
.md-table table { border-collapse: collapse; font-size: var(--fs-sm); }
.md-table :is(th, td) { padding-block: var(--s-2); padding-inline: 0 var(--s-5); border-bottom: var(--border) solid var(--line); vertical-align: baseline; white-space: nowrap; overflow-wrap: normal; font-variant-numeric: tabular-nums; }
.md-table th { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--muted); }
:where(.md-table :is(th, td)) { text-align: start; }
/* a note's frontmatter, a key a row, and its task boxes (drawn disabled): the md-table's own look */
.md-front { border-collapse: collapse; max-width: 100%; font-size: var(--fs-sm); }
.md-front :is(th, td) { padding-block: var(--s-2); padding-inline: 0 var(--s-5); border-bottom: var(--border) solid var(--line); vertical-align: baseline; text-align: start; }
.md-front th { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--muted); }
.md-front :is(th, td):last-child { padding-inline-end: 0; }
.md .md-front ul { margin: 0; padding-inline-start: var(--s-5); }
.md-task { list-style: none; margin-inline-start: calc(-1 * var(--s-5)); }
.md-task input { margin-block: 0; margin-inline: 0 var(--s-3); }
.md-left { text-align: left; }
.md-center { text-align: center; }
.md-right { text-align: right; }
.md-table :is(th, td):last-child { padding-inline-end: 0; }
.md code, .run pre { font-family: var(--font-mono); font-size: var(--fs-pre); }
.md :not(pre) > code { padding: 0 var(--s-2); border-radius: var(--radius-sm); background: var(--mine); overflow-wrap: anywhere; }
.md pre, .run pre { margin: 0; padding: var(--s-4); overflow-x: auto; max-width: 100%; box-sizing: border-box; line-height: var(--lh-mono); background: var(--surface); border: var(--border) solid var(--line); border-radius: var(--radius-xs); scrollbar-width: thin; scrollbar-color: var(--track) transparent; }
.md pre code { padding: 0; background: none; overflow-wrap: normal; }
.md blockquote { padding-inline-start: var(--s-5); border-inline-start: var(--border-strong) solid var(--line); color: var(--muted); }
.story { min-width: 0; }
.agents, .steps { list-style: none; margin: 0; padding: 0; }
.agents { display: flex; flex-direction: column; gap: var(--s-7); }
.agents:not(:empty) + .story-none { display: none; }
.agent { min-width: 0; }
.depth-1 { margin-left: var(--indent); }
.depth-2 { margin-left: calc(2 * var(--indent)); }
.depth-3 { margin-left: calc(3 * var(--indent)); }
.depth-4 { margin-left: calc(4 * var(--indent)); }
.agent-head { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-3); }
.agent-name { margin: 0; font-family: var(--font-display); font-size: var(--fs-md); font-weight: 600; overflow-wrap: anywhere; }
.step { border-top: var(--border) solid var(--line); }
.step:last-child { border-bottom: var(--border) solid var(--line); }
/* a step's line: what it did and how it ended on one row, its cost under them, a gate under that; a plus where it opens */
.step-line { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-1) var(--s-4); align-items: baseline; min-height: var(--touch); box-sizing: border-box; padding: var(--s-3) var(--s-8) var(--s-3) 0; cursor: pointer; list-style: none; overflow-wrap: anywhere; }
.step-line::-webkit-details-marker { display: none; }
.step-line::after { content: "+"; position: absolute; top: var(--s-3); right: var(--s-2); font-family: var(--font-mono); color: var(--muted); }
details[open] > .step-line::after { content: "–"; }
.step-state, .step-cost { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); }
.step-cost { grid-column: 1 / -1; font-variant-numeric: tabular-nums; }
.step-failed { grid-column: 1 / -1; grid-row: 2; color: var(--no); }
.step-line > .signal { grid-column: 1 / -1; }
/* a gate on a line: look D's signal, its dot, what it said, then what became of it and who said so */
.signal { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); align-items: baseline; margin-top: var(--s-1); padding: var(--s-3) var(--s-4); background: var(--surface); border: var(--border) solid var(--line); border-radius: var(--radius-xs); font-size: var(--fs-sm); }
.signal .dot { align-self: baseline; margin-top: 0; position: relative; top: var(--s-1); }
.signal[data-answer="waiting"] .dot { background: var(--marker); outline: var(--border) solid var(--ink); }
.signal-words { flex: 1 1 calc(100% - var(--dot) - var(--s-3)); min-width: 0; color: var(--ink); }
.signal > :is(.signal-reach, .verdict, .signal-wait) { margin-left: calc(var(--dot) + var(--s-3)); }
.signal-who { min-width: 0; }
.signal-wait { display: inline-flex; align-items: center; min-height: var(--touch); color: var(--ink); font-weight: 700; text-underline-offset: var(--s-1); }
.agent-head > .signal { margin-top: 0; }
/* a step's detail loads when its place comes into view (htmx's intersect); empty, its place is its whole line, so a line
   taller than the screen, opened, is in view too; a closed line's draws nothing, and is never in view */
.step > details { position: relative; }
.step-body:empty { position: absolute; inset: 0; pointer-events: none; }
.step-detail { display: flex; flex-direction: column; gap: var(--s-5); margin: 0 0 var(--s-5) var(--s-2); padding: var(--s-1) 0 0 var(--s-4); border-left: var(--border-strong) solid var(--line); min-width: 0; }
.step-detail > p { margin: 0; }
.step-part { min-width: 0; }
.step-part pre, .raw-pre { white-space: pre; }
.step-whole { display: inline-flex; align-items: center; min-height: var(--touch); }
.step-error { color: var(--no); overflow-wrap: anywhere; }
.step-gate p { margin: 0 0 var(--s-2); overflow-wrap: anywhere; }
.step-gate-words, .step-gate-note { white-space: pre-line; }
.raw summary { display: flex; align-items: center; justify-content: space-between; min-height: var(--touch); cursor: pointer; font-size: var(--fs-sm); color: var(--muted); list-style: none; }
.raw summary::-webkit-details-marker { display: none; }
.raw summary::after { content: "+"; font-family: var(--font-mono); }
.raw[open] > summary::after { content: "–"; }
.raw-body { display: flex; flex-direction: column; gap: var(--s-2); min-width: 0; }

/* New run (PRD_Win2 N28; no screen of look D's own, built of its parts): a team's card head over its budget, the first
   run's form column, the scheduled jobs a line each under the section's rule. One column, the phone's width first. */
.new-run-page { max-width: var(--form-max); }
.new-run .lede { margin-bottom: var(--s-7); overflow-wrap: anywhere; }
.new-run-card .new-run-open { align-self: flex-start; margin-top: auto; }
.new-run-card .new-run-why { color: var(--ink); overflow-wrap: anywhere; }
.new-run-team { display: flex; flex-direction: column; gap: var(--s-3); }
.new-run-page .new-run-team { margin-bottom: var(--s-8); }
.budget { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); }
.budget-spent { font-weight: 500; color: var(--no); }
.new-run-unread { margin-bottom: var(--s-5); color: var(--ink); overflow-wrap: anywhere; }
.new-run-form .note-field :is(input, textarea) { background: var(--surface); }
.new-run-form .chat-select { width: 100%; min-width: 0; font-size: var(--fs-base); }
.new-run-form .note-field > label { color: var(--muted); }
.new-run-form input[type="file"] {
  min-height: var(--touch-lg);
  padding: var(--s-2);
  font-size: var(--fs-sm);
  color: var(--muted);
  border-style: dashed;
  cursor: pointer;
}
.new-run-form input[type="file"]::file-selector-button {
  font: inherit;
  font-size: var(--fs-sm);
  min-height: var(--touch);
  margin-right: var(--s-4);
  padding: var(--s-2) var(--s-5);
  border-radius: var(--radius);
  border: var(--border) solid var(--line);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}
.new-run-sizes { margin-top: 0; color: var(--ink); }
.new-run-sizes:empty { display: none; }
.new-run-sizes [data-over] { color: var(--no); }
.new-run-keep .again { margin-left: 0; overflow-wrap: anywhere; font-family: var(--font-mono); }
.new-run-gone { flex-basis: 100%; overflow-wrap: anywhere; }
/* *more*, folded under a line a finger high, + or – at its end as a folded card's */
.new-run-more { border-top: var(--border) solid var(--line); border-bottom: var(--border) solid var(--line); }
.new-run-more > summary { justify-content: space-between; gap: var(--s-4); list-style: none; }
.new-run-more > summary::-webkit-details-marker { display: none; }
.new-run-more > summary::after { content: "+"; flex: none; font-family: var(--font-mono); }
.new-run-more[open] > summary::after { content: "–"; }
.new-run-more-in { display: flex; flex-direction: column; gap: var(--s-4); margin: var(--s-1) 0 var(--s-5); }
.new-run-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.new-run-why { color: var(--ink); overflow-wrap: anywhere; }
.new-run-form .new-run-raise { align-self: flex-start; margin-left: 0; }
.new-run-jobs { margin-top: var(--s-11); }
.job-lines { list-style: none; margin: 0; padding: 0; }
.job-line { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: var(--border) solid var(--line); }
.job-line:first-child { border-top: var(--border) solid var(--line); }
.job-line-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--s-1); }
.job-line-name { font-weight: 700; overflow-wrap: anywhere; }
.job-line .line-meta { margin-top: 0; }
.job-line .button { flex: none; }
.job-line-off .job-line-name { font-weight: 400; color: var(--muted); }
.new-run-job-title { margin-bottom: var(--s-6); overflow-wrap: anywhere; }
.new-run-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4) var(--s-6); margin: 0 0 var(--s-8); }
.new-run-facts dt { font-size: var(--fs-sm); color: var(--muted); }
.new-run-facts dd { margin: var(--s-1) 0 0; overflow-wrap: anywhere; }
.team-runs-new { margin-bottom: var(--s-7); }

/* the Files page's browser (Win3.5, PRD_Win3 N37, N43; the canvas's W3_Files): the team and space, the search and Add a
   file above the chips; at the desk three columns (the views and the folders, the list, the open file), each wrapping
   under the one before when the window is narrower; a line its kind's mark and name, its marks, size, change and pin */
.files-top { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-5); align-items: flex-end; margin-bottom: var(--s-5); }
.files-top .files-h1 { flex: 0 1 auto; margin: 0 var(--s-4) 0 0; }
.files-switch { flex: 0 1 var(--files-switch-min); min-width: 0; }
.files-find { flex: 999 1 var(--files-find-min); min-width: 0; }
.files-switch label, .files-find label, .files-pick label { display: block; margin-bottom: var(--s-2); font-size: var(--fs-sm); color: var(--muted); }
.files-switch-row { display: flex; gap: var(--s-3); }
.files-switch-row .button { flex: none; }
.files-select, .files-input { width: 100%; min-width: 0; box-sizing: border-box; font: inherit; min-height: var(--touch); padding: 0 var(--s-4); border-radius: var(--radius-xs); border: var(--border) solid var(--line); background: var(--surface); color: var(--ink); }
.add-file { flex: none; }
.add-file[open] { flex-basis: 100%; }
.add-file > summary.button { font-weight: 700; border-color: var(--ink); }
.add-file-form { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); max-width: var(--form-max); margin-top: var(--s-4); padding: var(--s-5); background: var(--surface); border: var(--border) solid var(--line); border-radius: var(--radius-md); }
.add-file-sizes { list-style: none; margin: 0; padding: 0; overflow-wrap: anywhere; }
.add-file-sizes:empty { display: none; }
.add-said { margin: 0; overflow-wrap: anywhere; }
.add-said:empty { display: none; }
.add-said[data-reply="failed"] { padding-left: var(--s-4); border-left: var(--border-strong) solid var(--no); }
.add-core { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-6); }
.chip { display: inline-flex; align-items: center; box-sizing: border-box; min-height: var(--touch); padding: 0 var(--s-5); border-radius: var(--chip-radius); border: var(--border) solid var(--line); color: var(--ink); text-decoration: none; white-space: nowrap; }
.chip[aria-current="true"] { border-color: var(--ink); background: var(--ink); color: var(--surface); font-weight: 700; }
.files-panes { display: flex; flex-wrap: wrap; gap: var(--s-8); align-items: flex-start; }
.files-side { flex: 1 1 var(--files-side-min); max-width: var(--files-side-max); min-width: 0; display: flex; flex-direction: column; gap: var(--s-7); }
.files-list, .files-open { flex: 999 1 var(--files-column-min); min-width: 0; }
.side-head { margin: 0 0 var(--s-3); font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--muted); }
.views-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-1); font-size: var(--fs-sm); }
.views-list a { display: flex; align-items: center; gap: var(--s-3); box-sizing: border-box; min-height: var(--touch); padding: 0 var(--s-4); border: var(--border) solid transparent; border-radius: var(--radius-xs); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.views-list a[aria-current="page"] { font-weight: 700; background: var(--surface); border-color: var(--ink); }
.new-count { margin-left: auto; flex: none; font-size: var(--fs-xs); font-weight: 400; color: var(--muted); }
.save-view { margin-top: var(--s-2); }
.save-view > summary { display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 var(--s-4); font-size: var(--fs-sm); color: var(--muted); text-decoration: underline; text-underline-offset: var(--s-1); cursor: pointer; list-style: none; }
.save-view > summary::-webkit-details-marker { display: none; }
.save-view-form { display: flex; flex-direction: column; align-items: stretch; gap: var(--s-3); padding: var(--s-4); background: var(--surface); border: var(--border) solid var(--line); border-radius: var(--radius-md); font-size: var(--fs-sm); }
.save-view-form .button { align-self: flex-start; }
.save-view-said { color: var(--ink); overflow-wrap: anywhere; }
.tree { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); }
.tree .tree { padding-left: var(--s-5); }
.tree-folder > summary { display: flex; align-items: center; gap: var(--s-2); min-height: var(--s-9); cursor: pointer; list-style: none; }
.tree-folder > summary::-webkit-details-marker { display: none; }
.tree-folder > summary::before { content: "▸"; flex: none; width: var(--s-5); color: var(--muted); }
.tree-folder[open] > summary::before { content: "▾"; }
.tree-folder a { min-width: 0; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.tree-folder a:hover { text-decoration: underline; text-underline-offset: var(--s-1); }
.tree-folder a[aria-current="page"] { font-weight: 700; }
.tree-none { padding-left: var(--s-5); }
.files-pick { display: none; }
.view-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); margin-bottom: var(--s-3); padding: var(--s-3) var(--s-4); border-radius: var(--radius); background: var(--surface); border: var(--border) solid var(--line); font-size: var(--fs-sm); color: var(--muted); overflow-wrap: anywhere; }
.view-line strong { color: var(--ink); }
.view-change { margin-left: auto; color: var(--ink); text-underline-offset: var(--s-1); }
.sort-head, .files-list .file-entry { display: grid; grid-template-columns: minmax(0, 1fr) var(--file-size-w) var(--file-changed-w) var(--touch); column-gap: var(--s-4); align-items: center; }
.sort-head { padding: 0 var(--s-2); font-size: var(--fs-xs); color: var(--muted); border-bottom: var(--border) solid var(--line); }
.sort-head a { display: inline-flex; align-items: center; min-height: var(--touch); color: inherit; text-decoration: none; }
.sort-head [aria-sort] a { color: var(--ink); font-weight: 700; }
.sort-size, .sort-changed { text-align: right; }
.files-list .file-list { margin: 0; gap: 0; font-family: var(--font-body); font-size: var(--fs-base); }
.files-list .file-entry { grid-template-areas: "head size changed pin" "where size changed pin"; padding: 0 var(--s-2); }
.files-list .file-entry:first-child { border-top: 0; }
.files-list .file-entry[aria-current="page"] { background: var(--surface); font-weight: 700; }
.file-head { grid-area: head; display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--s-3); min-width: 0; }
.files-list a.to-file { display: inline-flex; align-items: center; gap: var(--s-4); min-height: var(--touch-lg); min-width: 0; text-decoration: none; }
.files-list a.to-file:hover .file-name { text-decoration: underline; text-underline-offset: var(--s-1); }
.file-icon { flex: none; width: var(--icon-sm); height: var(--icon-sm); color: var(--muted); }
.file-name { min-width: 0; overflow-wrap: anywhere; }
.file-marks { display: inline-flex; gap: var(--s-2); }
.file-marks:empty { display: none; }
.tag-new, .tag-pinned { font-weight: 700; padding: 0 var(--s-2); border-radius: var(--radius-sm); border: var(--border) solid var(--ink); color: var(--ink); }
.file-where { grid-area: where; margin: 0 0 var(--s-3); padding-left: calc(var(--icon-sm) + var(--s-4)); font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); overflow-wrap: anywhere; }
.files-list .file-size, .files-list .file-entry time { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 400; color: var(--muted); text-align: right; white-space: nowrap; }
.files-list .file-size { grid-area: size; }
.files-list .file-entry time { grid-area: changed; }
.files-list .pin-form { grid-area: pin; }
.pin-form { display: inline-flex; margin: 0; }
.pin-toggle { display: inline-flex; align-items: center; justify-content: center; width: var(--touch); height: var(--touch); padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.pin-toggle[data-pinned] { color: var(--ink); }
.pin-toggle svg, .pin-button svg { width: var(--icon-sm); height: var(--icon-sm); }
.pin-button { gap: var(--s-3); }
.pin-button[data-pinned] { border-color: var(--ink); }
.files-hidden, .files-more, .files-none, .files-stream, .files-gone { margin-top: var(--s-4); }
.files-stream { margin: 0 0 var(--s-3); }
.files-hidden a { color: var(--ink); text-underline-offset: var(--s-1); }
.files-cut { margin-top: var(--s-4); display: flex; flex-direction: column; gap: var(--s-2); overflow-wrap: anywhere; }
.files-cut p { margin: 0; }
.files-open { box-sizing: border-box; padding: var(--s-5) var(--s-6); background: var(--surface); border: var(--border) solid var(--line); border-radius: var(--radius-lg); }
.open-phone { display: none; }
.open-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-bottom: var(--s-3); padding-bottom: var(--s-4); border-bottom: var(--border) solid var(--line); }
.open-name { flex: 1 1 var(--open-name-min); min-width: 0; margin: 0; font-size: var(--fs-md); font-weight: 700; overflow-wrap: anywhere; }
.files-open .step { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: var(--touch); height: var(--touch); border-radius: var(--radius); border: var(--border) solid var(--line); color: var(--ink); text-decoration: none; font-size: var(--fs-lg); }
.files-open .step[aria-disabled="true"] { opacity: var(--dim); }
.open-place { margin-bottom: var(--s-3); }
.files-open .file-actions { margin-bottom: var(--s-6); }
.files-open-none { background: transparent; border-style: dashed; }
.view-form { margin-bottom: var(--s-5); }
.view-form .files-select { width: auto; }
.view-folder + .view-folder { margin-top: var(--s-2); }
.view-remove { margin-bottom: var(--s-6); }
.view-back { color: inherit; text-underline-offset: var(--s-1); }
@media (max-width: 640px) {
  .files-side, .files-folder .files-open { display: none; }
  .files-file :is(.files-top, .chips, .files-side, .files-list) { display: none; }
  .files-file .open-phone { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: var(--s-3); }
  .open-back { display: inline-flex; align-items: center; min-height: var(--touch); color: var(--ink); font-weight: 700; text-underline-offset: var(--s-1); }
  .files-file .files-open { padding: 0; background: transparent; border: 0; }
  .files-switch, .files-find { flex-basis: 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-bottom: var(--s-5); }
  .chip { flex: none; }
  .files-pick { display: block; margin-bottom: var(--s-2); }
  .sort-head { display: flex; gap: var(--s-5); }
  .files-list .file-entry { grid-template-columns: minmax(0, 1fr) var(--touch); grid-template-areas: "head pin" "where pin" "changed pin"; }
  .files-list .file-entry time { text-align: left; margin: calc(-1 * var(--s-3)) 0 var(--s-3); padding-left: calc(var(--icon-sm) + var(--s-4)); }
  .sort-size, .files-list .file-size { display: none; }
}

/* the phone (look D's phone screens): the header and each page at its width; the menu's bar is its own query, below */
@media (max-width: 640px) {
  /* the top bar: the firm's name gives way (ellipsis) to the clock and the buttons; the signed-in name is hidden, its key and its sign-out kept */
  .top-in { column-gap: var(--s-3); }
  .brand { min-width: 0; flex: 1 1 auto; }
  .brand-mark { flex: none; }
  .brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .top-side { flex: none; gap: var(--s-3); }
  .person-who { display: none; }
  .person-key { display: inline-flex; }
  .person-out { gap: var(--s-3); }
  .no-owner { padding: var(--s-3) var(--s-6); }
  .handed, .person { padding: var(--s-5); }
  .top-in { padding: var(--s-5) var(--s-6) var(--s-4); flex-wrap: nowrap; }
  .seat-head .top-in { flex-wrap: wrap; row-gap: 0; }
  .seat-nav { column-gap: var(--s-4); }
  .clock-day { display: none; }
  .page { padding: var(--s-6) var(--s-6) var(--s-9); }
  /* Today's head: the greeting the phone's width, New run under its figures */
  .today-head { flex-direction: column; margin-bottom: var(--s-8); }
  .today-head .welcome { flex: none; align-self: stretch; }
  .welcome h1, .page-title { font-size: var(--fs-2xl-phone); }
  /* Today (look D's phone): what waits for a yes first, then the lines, then what moved */
  .today { display: flex; flex-direction: column; }
  .today .below { display: contents; }
  .waiting-column { order: 1; margin-bottom: var(--s-9); }
  .the-lines { order: 2; }
  .happens { order: 3; margin-top: var(--s-9); }
  /* a gate's answers fill the row, each a finger wide */
  .button { justify-content: center; }
  .answer > .button, .answer > .not-yet:not([open]) { flex: 1; }
  .not-yet > summary { width: 100%; }
  .not-yet[open], .not-yet[open] .button { align-self: stretch; }
  .look { flex-basis: 100%; margin-left: 0; min-height: var(--touch); display: inline-flex; align-items: center; justify-content: center; }
  /* the approvals page (look D's phone approval): the gate first, its answers stacked, Yes the larger */
  .approvals { gap: var(--s-8); }
  .approvals > .gate { order: -1; flex-basis: 100%; }
  .gate-full { padding: var(--s-6) var(--s-5); }
  .gate-ask { font-size: var(--fs-xl); }
  .gate-actions { flex-direction: column; align-items: stretch; margin-top: var(--s-6); }
  .gate-actions .button-yes { min-height: var(--touch-xl); font-size: var(--fs-md); }
  .ask { padding: var(--s-5); }
  .again { margin-left: 0; }
  .totals dd { font-size: var(--fs-lg); }
  .first-run-form > .button { align-self: stretch; min-height: var(--touch-xl); font-size: var(--fs-md); }
  .first-run-lead { margin-bottom: var(--s-8); }
  /* the chat (N43): with none open the list is the screen, under the page's title; one open is the screen, the list
     behind its back link, the side folded, its summary saying what it holds */
  .chat { gap: var(--s-6); }
  .chat[data-open] > .chat-nav { display: none; }
  .chat:not([data-open]) > .chat-main { order: -1; }
  .chat-none .page-title { margin-bottom: var(--s-3); }
  .chat-back { display: inline-flex; }
  .fold .side-title:not(.fold-summary .side-title) { display: none; }
  /* the cost tables: a row is two lines, its name whole first and its figures under it, each with its head before it */
  .spend-table thead { display: none; }
  .spend-table, .spend-table tbody { display: block; }
  .spend-table tr { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); padding: var(--s-3) 0; border-bottom: var(--border) solid var(--line); }
  .spend-table th, .spend-table td { display: block; padding: 0; border: 0; }
  .spend-table tbody th { flex: 1 0 100%; }
  .spend-table td::before { content: attr(data-label) " "; color: var(--muted); font-family: var(--font-body); font-size: var(--fs-xs); }
  .spend-table :is(thead th, tbody td):nth-last-child(-n+2), .spend-table :is(thead th, tbody td):nth-last-child(2) { text-align: left; padding: 0; }
  [data-part="wallet"] .spend-table :is(thead th, tbody td):nth-last-child(2) { padding: 0; }
  .spend-table td { white-space: normal; }
  .spend-total dd { font-size: var(--fs-2xl-phone); }
  .spend-head { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4) var(--s-5); }
  .spend-table, .spend-table tr { max-width: 100%; }
  .day-nav > :first-child, .day-nav > :last-child { min-width: 0; }
  /* New run: the team's way in a finger wide, the form's fields the screen's width */
  .new-run-card .new-run-open { align-self: stretch; }
}

/* the bar (R193; look D's phone tab bar), below the rail's width: fixed at the foot, five cells at most, Today · Home ·
   Approvals · Chat · More, each its icon over its label on one line; the groups give their bar rows to the bar and
   draw nothing of their own. Home is second (`order`), wherever its group stands. */
@media (max-width: 1023px) {
  body { padding-bottom: var(--tabbar); }
  .menu {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 1;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    padding: var(--s-2) var(--s-1) var(--s-5);
    background: var(--surface);
    border-top: var(--border) solid var(--line);
  }
  .menu-group { display: contents; }
  .menu-head, .menu-item:not(.in-bar) { display: none; }
  .menu-home { order: 1; }
  .menu-group[data-group="work"] > .in-bar ~ .in-bar { order: 2; }
  .menu-more { order: 3; }
  .menu-item { position: relative; flex-direction: column; justify-content: center; gap: var(--s-1); min-width: 0; font-size: var(--fs-xs); text-align: center; }
  .menu-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .menu-item:is([aria-current="page"], [data-bar-current="page"]) { color: var(--ink); font-weight: 700; }
  /* the count a badge on the icon's corner, so the label keeps its one line */
  .menu-count { position: absolute; top: 0; left: calc(50% + var(--s-2)); }
  .chat-box { bottom: calc(var(--tabbar) + var(--s-4)); scroll-margin-bottom: calc(var(--tabbar) + var(--s-4)); }
  /* a person's frame has no bar */
  :root[data-seat="person"] body { padding-bottom: 0; }
  :root[data-seat="person"] .chat-box { bottom: var(--s-4); scroll-margin-bottom: var(--s-4); }
}
@media (max-width: 640px) {
  /* the tools (attach, the mic, its language, send when transcribed) the row's whole width beside Send, the last a mark
     alone, so the mic and Send keep one row (Win3.4) */
  .chat-box-foot { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "memo send" "note note" "spend spend"; }
  .chat-box-foot > .box-tools, .box-tools .memo { gap: var(--s-2); }
  .memo-send-words { display: none; }
  .memo-send { padding: 0; }
}

/* the rail (R193), at the desk's width: the menu a column beside the page, every place the seat is shown by group,
   each group's head in the canvas's section head (mono small caps); More is the bar's, so not here */
@media (min-width: 1024px) {
  /* the header and the no-owner line on the frame's width, so they stand over the rail and the page as one block */
  .top-in, .no-owner { max-width: var(--frame-max); box-sizing: border-box; }
  /* a flex row, not a grid: the page's auto margins (centred at --page-max) would shrink a grid item to its content,
     where a flex item grows first and is centred in what is left; the frame itself centred, so on a wide screen the
     margins are equal and no gap opens after the rail */
  .frame { display: flex; align-items: flex-start; max-width: var(--frame-max); margin: 0 auto; }
  .frame > main { flex: 1 1 0; min-width: 0; }
  .menu {
    flex: none;
    width: var(--rail-w);
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: var(--s-7);
    padding: var(--s-9) var(--s-4) var(--s-9) var(--s-5);
  }
  .menu-group { display: flex; flex-direction: column; }
  .menu-head { margin: 0 0 var(--s-2); padding-inline-start: calc(var(--s-3) + var(--border-strong)); font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--muted); }
  .menu-item { padding: var(--s-2) var(--s-3); border-inline-start: var(--border-strong) solid transparent; overflow-wrap: anywhere; }
  .menu-item:hover { color: var(--ink); }
  .menu-item[aria-current="page"] { color: var(--ink); font-weight: 700; border-inline-start-color: var(--ink); }
  /* an applet's row under Home, its name where the labels stand */
  .menu-applet { padding-inline-start: calc(var(--s-3) + var(--icon) + var(--s-4)); }
  .menu-count { margin-inline-start: auto; }
  .menu-more { display: none; }
}

/* Win2.3 C: the lost call */
/* A run's Run again, beside its team and space in the head's line; a call lost to a restart, marked as a halt's reason
 * is, its Resume beneath its words (no screen of look D's own: built of the reason's and the gate's parts). */
a.run-again { color: inherit; font-weight: 700; text-underline-offset: var(--s-1); }
.run-lost, .run-cap { margin: 0 0 var(--s-5); padding: var(--s-4) var(--s-5); border-left: var(--border-strong) solid var(--no); background: var(--surface); border-radius: var(--radius-xs); overflow-wrap: anywhere; }
.run-lost { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); }
.run-lost-words, .run-lost-whose, .run-lost-said, .run-lost-form { margin: 0; }
/* audit-6: a run halted at a cap on its page, marked as the lost call is, the raise beneath its words; none, no box */
.run-cap:empty { display: none; }
.run-cap > .cap-halt { margin-top: 0; }

/* A team's forms (Win3.8, PRD_Win3 N40; the canvas's W3_Form and its narrow board): the list of cards beside the form's
 * card, wrapping under it; at the phone's width one column, a form opened full width and the list behind the crumb. */
.forms-page .crumbs { margin-bottom: var(--s-3); }
.forms-page .forms-back { display: none; }
.forms-panes { display: flex; flex-wrap: wrap; gap: var(--s-8); align-items: flex-start; }
.forms-list { flex: 1 1 var(--forms-list-min); max-width: var(--forms-list-max); min-width: 0; }
.forms-list .eyebrow { margin: 0 0 var(--s-3); font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: var(--track-wide); text-transform: uppercase; color: var(--muted); }
.form-cards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.form-card { display: flex; flex-direction: column; gap: var(--s-1); box-sizing: border-box; min-height: var(--touch); padding: var(--s-4) var(--s-5); background: var(--surface); border: var(--border) solid var(--line); border-radius: var(--radius-md); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.form-card[aria-current="page"] { border: var(--border-selected) solid var(--ink); }
.form-card:focus-visible { outline: var(--border-strong) solid var(--ink); outline-offset: var(--s-1); }
.form-card-title { display: block; }
.form-card-bad { background: transparent; border: var(--border) dashed var(--no); }
.form-card-why { color: var(--no); font-weight: 700; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.form-card-path { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); overflow-wrap: anywhere; }
.forms-none, .forms-unread { margin-bottom: var(--s-3); overflow-wrap: anywhere; }
.forms-pick { flex: 999 1 var(--forms-form-min); padding: var(--s-5) 0; }
.form-draw { flex: 999 1 var(--forms-form-min); max-width: var(--forms-form-max); min-width: 0; box-sizing: border-box; display: flex; flex-direction: column; gap: var(--s-6); padding: var(--s-7); background: var(--surface); border: var(--border) solid var(--line); border-radius: var(--radius-lg); }
.form-draw-bad { gap: var(--s-3); border-style: dashed; border-color: var(--no); background: transparent; }
.form-draw-bad p { margin: 0; overflow-wrap: anywhere; }
.form-head { min-width: 0; }
.form-title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: var(--fs-form-title); overflow-wrap: anywhere; }
.form-body { margin: var(--s-2) 0 0; font-size: var(--fs-base); color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.form-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.form-label { display: block; margin: 0 0 var(--s-3); padding: 0; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); overflow-wrap: anywhere; }
.form-hint { font-weight: 400; }
.form-input { width: 100%; box-sizing: border-box; font: inherit; font-size: var(--fs-base); min-height: var(--touch); padding: 0 var(--s-4); border-radius: var(--radius-xs); border: var(--border) solid var(--line); background: var(--bg); color: var(--ink); }
.form-file { width: 100%; box-sizing: border-box; font: inherit; min-height: var(--touch-lg); padding: var(--s-2); font-size: var(--fs-sm); color: var(--muted); border-radius: var(--radius-xs); border: var(--border) dashed var(--muted); background: transparent; cursor: pointer; }
.form-file::file-selector-button { font: inherit; font-size: var(--fs-sm); min-height: var(--touch); margin-inline-end: var(--s-4); padding: var(--s-2) var(--s-5); border-radius: var(--radius); border: var(--border) solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; }
.form-choices { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.form-choice { display: inline-flex; align-items: center; gap: var(--s-3); box-sizing: border-box; min-height: var(--touch); padding: 0 var(--s-5); border-radius: var(--radius); border: var(--border) solid var(--line); cursor: pointer; overflow-wrap: anywhere; }
.form-choice input { width: var(--check); height: var(--check); margin: 0; accent-color: var(--ink); }
.form-choice:has(input:checked) { border: var(--border-selected) solid var(--ink); font-weight: 700; }
.form-choice:has(input:focus-visible) { outline: var(--border-strong) solid var(--ink); outline-offset: var(--s-1); }
.form-what { padding: var(--s-4) var(--s-5); background: var(--bg); border-radius: var(--radius); font-size: var(--fs-base); overflow-wrap: anywhere; }
.form-saved, .form-refused { margin: 0; padding: var(--s-4) var(--s-5); border-inline-start: var(--border-strong) solid var(--yes); background: var(--bg); border-radius: var(--radius-xs); overflow-wrap: anywhere; }
.form-refused { border-inline-start-color: var(--no); }
.form-send { min-height: var(--touch-lg); padding: var(--s-4) var(--s-8); font-size: var(--fs-button); }
@media (max-width: 640px) {
  .forms-panes { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: var(--s-7); }
  .forms-list, .form-draw { flex: none; max-width: none; }
  .form-draw { padding: var(--s-6) var(--s-5); }
  .form-card { min-height: var(--touch-lg); }
  .forms-open .forms-list { display: none; }
  .forms-open .forms-back { display: inline-flex; }
  .forms-open .forms-back::before { content: none; }
  .form-choice { flex: 1 1 auto; justify-content: center; }
  .form-send { width: 100%; justify-content: center; min-height: var(--touch-xl); }
}

/* Home (App1.2, PRD_App1 N47; the canvas's App1_Home, the owner's branch): a grid of tiles, each an applet's lane, its
 * icon, its name in its own words and direction, its id, version and reach, its team and what waits; a tile that does
 * not open a card saying why; the dashed note after them. One column at 390 px. */
.home-title { margin-bottom: var(--s-2); }
.home-note { margin: 0 0 var(--s-7); color: var(--muted); }
.home-none { color: var(--ink); overflow-wrap: anywhere; }
.home-none code { font-family: var(--font-mono); font-size: var(--fs-xs); }
.applet-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--tile-min), 100%), 1fr)); gap: var(--s-5); }
.applet-tile {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  min-height: var(--tile-min-h);
  box-sizing: border-box;
  padding: var(--s-5) var(--s-6);
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: var(--border-selected) solid var(--ink);
  color: var(--ink);
  text-decoration: none;
}
.applet-tile::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: var(--lane-w); background: var(--applet); }
a.applet-tile:focus-visible { outline: var(--border-strong) solid var(--ink); outline-offset: var(--s-1); }
.tile-closed { border-style: dashed; border-color: var(--muted); }
.tile-closed::before { background: var(--track); }
.tile-head { display: flex; align-items: center; gap: var(--s-4); }
.tile-icon { flex: none; width: var(--tile-icon); height: var(--tile-icon); border-radius: var(--radius-md); background: var(--applet-soft); color: var(--applet); display: inline-flex; align-items: center; justify-content: center; }
.tile-icon svg { width: var(--icon); height: var(--icon); }
.tile-words { min-width: 0; }
.tile-name { display: block; font-size: var(--fs-lg); font-weight: 700; overflow-wrap: anywhere; }
.tile-meta { display: block; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); overflow-wrap: anywhere; }
.tile-team { font-size: var(--fs-sm); color: var(--muted); }
.tile-waits { display: flex; align-items: center; gap: var(--s-3); margin-top: auto; font-weight: 700; overflow-wrap: anywhere; }
.tile-waits::before { content: ""; flex: none; width: var(--dot-draft); height: var(--dot-draft); box-sizing: border-box; border-radius: 50%; background: var(--marker); border: var(--border-strong) solid var(--ink); }
.tile-waits[data-none]::before { background: transparent; border-color: var(--muted); }
.tile-waits[data-none] { font-weight: 400; color: var(--muted); }
.tile-said { margin: auto 0 0; overflow-wrap: anywhere; }
.tile-note { display: flex; flex-direction: column; justify-content: center; gap: var(--s-2); min-height: var(--tile-min-h); box-sizing: border-box; padding: var(--s-5) var(--s-6); border-radius: var(--radius-xl); border: var(--border) dashed var(--muted); color: var(--muted); font-size: var(--fs-sm); }
.tile-note strong { color: var(--ink); }

/* An applet's screen (App1.2, N46; the canvas's App1_Voice_phone and App1_Card, no marks): one column, the reading
 * column's width at the desk; its head under the lane's mark; the jump bar kept at the top as the page scrolls; each
 * part in its place, a part not drawn its one line. */
.applet-page { max-width: var(--read-max); }
.applet-head { margin-bottom: var(--s-5); }
.applet-head .crumbs { margin-bottom: var(--s-4); }
.applet-lane { display: block; width: var(--lane-mark); height: var(--lane-w); border-radius: var(--radius-sm); background: var(--applet); margin-bottom: var(--s-4); }
.applet-title { margin: 0 0 var(--s-2); font-family: var(--font-display); font-weight: 500; font-size: var(--fs-title); line-height: var(--lh-snug); letter-spacing: var(--track-tight); overflow-wrap: anywhere; }
.applet-does { margin: 0 0 var(--s-3); color: var(--muted); overflow-wrap: anywhere; }
.applet-meta { overflow-wrap: anywhere; }
.applet-said { margin: var(--s-5) 0 0; padding: var(--s-4) var(--s-5); border-inline-start: var(--border-strong) solid var(--no); background: var(--surface); border-radius: var(--radius-xs); overflow-wrap: anywhere; }
.applet-jump { position: sticky; top: 0; z-index: 1; display: flex; gap: var(--s-3); overflow-x: auto; margin: 0 0 var(--s-6); padding: var(--s-3) 0; background: var(--bg); border-bottom: var(--border) solid var(--line); }
.jump-link { flex: none; display: inline-flex; align-items: center; gap: var(--s-3); min-height: var(--touch); box-sizing: border-box; padding: 0 var(--s-5); border-radius: var(--chip-radius); border: var(--border) solid var(--line); color: var(--ink); text-decoration: none; font-size: var(--fs-sm); }
.jump-link:focus-visible { outline: var(--border-strong) solid var(--ink); outline-offset: var(--s-1); }
.jump-count { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--muted); }
.applet-parts { display: flex; flex-direction: column; gap: var(--s-9); }
.applet-part { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; scroll-margin-top: var(--jump-clear); }
.applet-part .form-draw { max-width: none; }
.part-title { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: var(--fs-lg); overflow-wrap: anywhere; }
.part-said-words { margin: 0; padding: var(--s-4) var(--s-5); border: var(--border) dashed var(--no); border-radius: var(--radius-xs); color: var(--no); font-weight: 700; font-size: var(--fs-sm); overflow-wrap: anywhere; }
/* a draft as a card (App1_Card): its time, its caption as written, the editor's word, then its marks */
.draft-card { box-sizing: border-box; padding: var(--s-5) var(--s-6); background: var(--surface); border: var(--border) solid var(--line); border-radius: var(--radius-lg); min-width: 0; }
.draft-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin-bottom: var(--s-3); font-size: var(--fs-sm); color: var(--muted); }
.draft-dot { flex: none; width: var(--dot-draft); height: var(--dot-draft); border-radius: 50%; background: var(--applet); }
.draft-head time { margin-inline-start: auto; font-family: var(--font-mono); font-size: var(--fs-xs); }
.draft-caption { margin: 0 0 var(--s-4); font-size: var(--fs-md); line-height: var(--lh); white-space: pre-line; overflow-wrap: anywhere; }
.draft-verdict { margin: 0; font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
.draft-card[data-verdict="pass"] .draft-verdict { color: var(--yes); }
.draft-card[data-verdict="fail"] .draft-verdict, .draft-card[data-verdict="unread"] .draft-verdict { color: var(--no); }
.draft-reasons { margin: var(--s-2) 0 0; padding-inline-start: var(--s-6); font-size: var(--fs-sm); color: var(--muted); overflow-wrap: anywhere; }
/* its marks (App1.3, N48): the stage's record above the cards; open, the three marks on a row, Needs edits opening its
   note under them; unverified, the card's border dashed and its line above the marks; recorded, the mark, who and when,
   its note, how many before, and a quiet Mark it again; what a post said, on the card */
.stage-record { margin: 0; padding: var(--s-4) var(--s-5); background: var(--surface); border: var(--border) solid var(--line); border-radius: var(--radius-md); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.draft-card[data-state="unverified"] { border: var(--border-selected) dashed var(--no); }
.mark-unverified { margin: var(--s-4) 0 0; padding: var(--s-3) var(--s-4); border: var(--border) dashed var(--no); border-radius: var(--radius-xs); color: var(--no); font-size: var(--fs-sm); font-weight: 700; overflow-wrap: anywhere; }
.mark-form { margin-top: var(--s-4); }
.mark-buttons { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.mark-buttons > .button, .mark-edits-open { min-height: var(--touch-lg); justify-content: center; text-align: center; }
.mark-asis { flex: 1 1 var(--mark-asis-min); }
.mark-edits { flex: 1 1 var(--mark-edits-min); display: flex; flex-direction: column; min-width: 0; }
.mark-edits-open { border-color: var(--ink); }
.mark-edits[open] { flex-basis: 100%; order: 1; }
.mark-edits[open] > .mark-edits-open { background: var(--mine); }
.mark-drop { flex: 0 1 var(--mark-drop-min); color: var(--muted); }
.mark-note-field { display: flex; flex-direction: column; gap: var(--s-3); margin-top: var(--s-4); }
.mark-note-label { font-size: var(--fs-sm); font-weight: 700; color: var(--muted); }
.mark-note-text { width: 100%; box-sizing: border-box; font: inherit; font-size: var(--fs-base); padding: var(--s-3) var(--s-4); border-radius: var(--radius-xs); border: var(--border) solid var(--line); background: var(--bg); color: var(--ink); resize: vertical; }
.mark-save { align-self: flex-start; }
.mark-recorded { display: flex; flex-direction: column; gap: var(--s-4); margin-top: var(--s-4); }
.mark-done { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); padding: var(--s-4); background: var(--bg); border-radius: var(--radius-xs); font-size: var(--fs-sm); }
.mark-tick { flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--icon-sm); height: var(--icon-sm); border-radius: 50%; background: var(--yes); color: var(--surface); font-size: var(--fs-xs); font-weight: 700; }
.mark-by { color: var(--muted); overflow-wrap: anywhere; }
.mark-note-said { display: flex; flex-direction: column; gap: var(--s-1); }
.mark-note-head { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.mark-note { margin: 0; font-size: var(--fs-sm); color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.mark-before, .mark-kept { margin: 0; font-size: var(--fs-xs); color: var(--muted); }
.mark-again-open { display: inline-flex; align-items: center; min-height: var(--touch); padding: 0 var(--s-3); font-size: var(--fs-sm); color: var(--muted); text-decoration: underline; text-underline-offset: var(--s-1); cursor: pointer; list-style: none; }
.mark-again-open::-webkit-details-marker { display: none; }
.mark-again[open] > .mark-again-open { color: var(--ink); }
.mark-again .mark-form { margin-top: var(--s-2); }
.mark-said { margin: var(--s-4) 0 0; padding: var(--s-3) var(--s-4); border-inline-start: var(--border-strong) solid var(--no); background: var(--bg); border-radius: var(--radius-xs); font-size: var(--fs-sm); overflow-wrap: anywhere; }
.applet-part > .mark-said { margin: 0; }
.cards-more, .read-open { align-self: flex-start; display: inline-flex; align-items: center; min-height: var(--touch); color: var(--ink); text-underline-offset: var(--s-1); }
.applet-read { padding: var(--s-5); background: var(--surface); border: var(--border) solid var(--line); border-radius: var(--radius-lg); min-width: 0; }
/* a read part whose file is not written yet: look D's empty state, quiet, where its file will stand (the Files viewer's
   empty open column's dashed line, never the red of a part that does not pass) */
.part-empty { padding: var(--s-5); border: var(--border) dashed var(--line); border-radius: var(--radius-lg); overflow-wrap: anywhere; }
.applet-chat-start { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-3); }
.applet-chat-start .form-label { margin: 0; }
.chat-start-input { min-height: var(--touch-lg); padding: var(--s-3) var(--s-4); resize: vertical; }
.applet-part .chat-box { scroll-margin-bottom: 0; }
@media (max-width: 640px) {
  .applet-title { font-size: var(--fs-xl); }
  .tile-note { min-height: 0; }
  .applet-read { padding: var(--s-4); }
  .applet-chat-start .button { align-self: stretch; justify-content: center; min-height: var(--touch-lg); }
  .mark-drop { flex-grow: 1; }
  .mark-save { align-self: stretch; justify-content: center; }
}
