/* AgentPulse control room. One stylesheet.
   Palette and type from the product's mock (the Floor and Setup screens):
   a near-black green ground, a green accent for the one primary action, and
   status always in words as well as colour (Working green, Blocked amber,
   Paused red, Idle grey, Needs you mint). Display type is Space Grotesk,
   text is Inter, both self-hosted under the SIL Open Font License
   (static/fonts/OFL.txt). Text and status colours are checked for WCAG 2.2
   AA in test/contrast.test.ts; change a value here and that test says if it
   holds. */

@font-face {
  font-family: "Inter";
  src: url("/static/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/static/fonts/space-grotesk.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ground: #0e1512;
  --layer-1: #141c18;
  --layer-2: #19221e;
  --layer-3: #212b26;
  --layer-hover: #28342e;
  --rule: #27322c;
  --rule-strong: #374339;
  /* Control edges and dividers that carry meaning: 3:1 or more against every ground. */
  --line: #5f7268;
  --text: #e8eeea;
  --text-2: #a9b6ae;
  --text-3: #90a097;
  /* The one primary action, with dark ink on it. */
  --accent: #34c77b;
  --accent-hover: #4fd690;
  --accent-ink: #04150c;
  /* Focus, links, selection, live lines and "Needs you". */
  --signal: #6fe0a3;
  --signal-rule: #2f5a44;
  --ok: #4fd18a;
  --ok-rule: #2c6a49;
  --warn: #e8b04e;
  --warn-rule: #6b5426;
  --bad: #ff8b8b;
  --stop: #b3263a;
  --stop-hover: #c52f44;
  --stop-text: #ff9d9d;
  --stop-edge: #c4505d;
  --stopped-ground: #231214;
  --stopped-rule: #5c2730;
  --stopped-text: #ffd4d8;
  --running-ground: #0f2219;
  --running-rule: #1f4d36;
  --setup-ground: #231c0c;
  --setup-rule: #5a4618;
  --setup-text: #ffe2a8;
  --radius: 8px;
  --radius-card: 10px;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --display: "Space Grotesk", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  color-scheme: dark;
  accent-color: var(--accent);
  scrollbar-color: var(--rule-strong) var(--ground);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 14px/1.45 var(--font);
  caret-color: var(--signal);
}
::selection { background: var(--signal); color: var(--ground); }
a { color: var(--signal); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; margin: 0; text-wrap: balance; font-family: var(--display); }
h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.015em; }
h2 { font-size: 16px; font-weight: 600; margin: 28px 0 10px; letter-spacing: -0.005em; }
h3 { font-size: 14px; font-weight: 600; font-family: var(--font); }
p { margin: 0 0 8px; }
code { font-family: var(--mono); font-size: 12.5px; }
small { font-size: 12px; color: var(--text-2); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--accent); color: var(--accent-ink); padding: 12px 16px; border-radius: var(--radius); z-index: 10; }
.skip:focus { top: 8px; }
.glyph { flex: none; display: block; }
.glyph .cut { fill: var(--ground); }
.inline { display: inline; margin: 0; }

/* Buttons and fields: standard controls, 44 px targets. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  font: 600 13.5px/1 var(--font); color: var(--text);
  background: var(--layer-3); border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--layer-hover); border-color: var(--rule-strong); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-stop { background: var(--stop); border-color: var(--stop); color: #fff; }
.btn-stop:hover { background: var(--stop-hover); }
.btn-stop .glyph { color: #fff; }
.btn-stop .glyph .cut { fill: var(--stop); }
.btn-quiet { background: transparent; border-color: transparent; color: var(--signal); }
.btn-quiet:hover { background: var(--layer-2); }
input, select, textarea {
  min-height: 44px; padding: 0 12px; width: 100%;
  font: 14px var(--font); color: var(--text);
  background: var(--ground); border: 1px solid var(--line); border-radius: var(--radius);
}
input[readonly] { color: var(--text-2); border-style: dashed; }
input[type="file"] { padding: 6px; color: var(--text-2); cursor: pointer; }
input[type="file"]::file-selector-button {
  min-height: 30px; margin-right: 12px; padding: 0 14px; cursor: pointer;
  font: 600 13.5px/1 var(--font); color: var(--text);
  background: var(--layer-3); border: 1px solid var(--line); border-radius: var(--radius);
}
input[type="file"]::file-selector-button:hover { background: var(--layer-hover); border-color: var(--rule-strong); }
input[disabled], select[disabled] { color: var(--text-2); background: var(--layer-1); }
input[type="radio"], input[type="checkbox"] { width: 20px; min-height: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--signal); }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
label small { color: var(--text-3); }
fieldset { border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px 16px; margin: 0 0 12px; }
legend { padding: 0 6px; color: var(--text-2); font-size: 13px; }

/* The shell: AgentPulse, its screens, More, the Sample data marker and the
   stop switch, on one row from 1280 pixels, two rows below. */
.bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 4px 18px;
  min-height: 58px; padding: 0 24px;
  background: var(--ground); border-bottom: 1px solid var(--rule);
}
.brand {
  display: inline-flex; align-items: center; min-height: 44px; margin-right: 6px;
  font: 600 17px/1 var(--display); letter-spacing: -0.01em; color: var(--text); text-decoration: none; white-space: nowrap;
}
.mark { display: block; }
.nav { display: flex; gap: 2px; min-width: 0; }
.nav a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 9px; white-space: nowrap;
  color: var(--text-2); text-decoration: none; font-weight: 500; font-size: 14px; border-radius: var(--radius);
}
.nav a:hover { color: var(--text); background: var(--layer-1); }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; background: none; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: -7px; height: 2px; border-radius: 2px; background: var(--accent); }
.more { position: relative; }
.more > summary {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 9px; border-radius: var(--radius);
  color: var(--text-2); font-weight: 500; font-size: 14px; cursor: pointer; list-style: none; white-space: nowrap;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary:hover, .more[open] > summary { color: var(--text); background: var(--layer-1); }
.more > summary[data-current] { color: var(--text); font-weight: 600; }
.more[open] > summary .glyph { transform: rotate(180deg); }
.more-panel {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; width: 280px; padding: 6px;
  background: var(--layer-1); border: 1px solid var(--rule-strong); border-radius: var(--radius-card);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.4);
}
.more-panel ul { list-style: none; margin: 0; padding: 0; }
.more-panel li a { display: flex; flex-direction: column; justify-content: center; gap: 1px; min-height: 48px; padding: 6px 10px; border-radius: 6px; color: var(--text); text-decoration: none; }
.more-panel li a:hover { background: var(--layer-2); }
.more-panel li a[aria-current="page"] { box-shadow: inset 2px 0 0 var(--accent); background: var(--layer-2); }
.more-panel li a strong { font-weight: 600; font-size: 14px; }
.more-panel li a small { color: var(--text-3); }
.more-me { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; padding: 8px 4px 2px 10px; border-top: 1px solid var(--rule); }
.more-me p { margin: 0; display: flex; flex-direction: column; line-height: 1.25; }
.more-me small { color: var(--text-3); }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sample-marker {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px;
  border: 1px solid var(--rule-strong); border-radius: 6px; color: var(--text-2); font-size: 12.5px; font-weight: 500; text-decoration: none; white-space: nowrap;
  position: relative;
}
.sample-marker::before { content: ""; position: absolute; inset: -6px 0; }
.sample-marker .glyph { width: 13px; height: 13px; color: var(--warn); }
.sample-marker:hover { color: var(--text); border-color: var(--line); }
#breaker-wrap { display: flex; }
.breaker { display: flex; align-items: center; gap: 10px; }
.breaker-state { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 10px; border-radius: var(--radius); text-decoration: none; color: var(--text); border: 1px solid transparent; }
.breaker-state span { display: flex; flex-direction: column; line-height: 1.2; }
.breaker-state strong { font-size: 13px; font-weight: 600; white-space: nowrap; }
.breaker-state small { font-size: 11.5px; white-space: nowrap; }
.breaker[data-state="stopped"] .breaker-state { background: var(--stopped-ground); border-color: var(--stopped-rule); }
.breaker[data-state="stopped"] .breaker-state .glyph, .breaker[data-state="stopped"] strong { color: var(--bad); }
.breaker[data-state="stopped"] .breaker-state .glyph .cut { fill: var(--stopped-ground); }
.breaker[data-state="running"] .breaker-state .glyph, .breaker[data-state="running"] strong { color: var(--ok); }
.breaker[data-state="running"] .breaker-state small { display: none; }
.btn-stop.btn { background: transparent; border-color: var(--stop-edge); color: var(--stop-text); }
.btn-stop.btn:hover { background: var(--stopped-ground); border-color: var(--bad); color: #ffc2c2; }
.btn-stop.btn .glyph { color: var(--stop-text); }
.btn-stop.btn .glyph .cut { fill: var(--ground); }
.me { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.strip { background: var(--stopped-ground); border-bottom: 1px solid var(--stopped-rule); color: var(--stopped-text); padding: 9px 24px; }
.strip p { margin: 0; max-width: 1400px; }
.strip strong { color: #fff; }
.strip-setup { background: var(--setup-ground); border-bottom-color: var(--setup-rule); color: var(--setup-text); }
.strip-setup a { color: #fff; font-weight: 600; margin-left: 4px; display: inline-flex; align-items: center; min-height: 32px; }
main { max-width: 1680px; margin: 0 auto; padding: 22px 24px 64px; outline: none; }
.page-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.sub { color: var(--text-2); margin: 0; }
.flash { padding: 10px 14px; border-radius: var(--radius); border: 1px solid; margin: 0 0 16px; max-width: 900px; }
.flash-ok { background: #0f2a20; border-color: #22553f; color: #c3f5dc; }
.flash-bad { background: var(--stopped-ground); border-color: var(--stopped-rule); color: var(--stopped-text); }
.panel { background: var(--layer-1); border: 1px solid var(--rule); border-radius: 9px; padding: 16px 20px; margin: 16px 0; }
.panel h2 { margin-top: 0; }
.panel h3 { margin: 18px 0 8px; color: var(--text-2); }
.warn { color: var(--warn); }
.note, .empty { color: var(--text-2); }
.empty { padding: 18px 0; }
.small { font-size: 12.5px; color: var(--text-2); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack > .btn { align-self: flex-start; }
.door .stack > .btn { align-self: stretch; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px 18px; align-items: start; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 13px; color: var(--text-2); }
.field > small { color: var(--text-3); line-height: 1.4; }
.grid-form h2 { grid-column: 1 / -1; }
.agent-limits { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.choice { flex-direction: row; gap: 12px; padding: 10px 0; color: var(--text); font-size: 14px; }
.choice small { display: block; margin-top: 2px; line-height: 1.4; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 8px 0 14px; }
.facts div { display: contents; }
.facts dt { color: var(--text-2); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.secret { display: inline-block; padding: 4px 8px; background: var(--ground); border: 1px solid var(--rule-strong); border-radius: 5px; color: var(--text); font-size: 14px; overflow-wrap: anywhere; user-select: all; }

/* The Floor: five figures, the brief, the agents in four groups, and the
   Live feed beside them, as the product's mock draws it. */
.connections { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; color: var(--text-2); font-size: 12.5px; line-height: 1.45; }
.connections li { display: flex; align-items: flex-start; gap: 8px; }
.connections li .glyph { margin-top: 2px; }
.connections strong { color: var(--text); font-weight: 600; }
.connections .is-fake { color: var(--warn); }
.connections .is-fake strong { color: var(--warn); }

.figures { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.figures > div { padding: 13px 16px 14px; background: var(--layer-1); border: 1px solid var(--rule); border-radius: var(--radius-card); min-width: 0; }
.figures dt { font-size: 13px; color: var(--text-2); }
.figures dd { margin: 6px 0 0; font: 600 26px/1.1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; color: var(--text); }
.figures dd span { font-size: 26px; }
.figures dd.fig-note { margin-top: 8px; font: 12.5px/1.35 var(--font); letter-spacing: 0; color: var(--text-3); }
.figures dd.fig-note strong { color: var(--warn); font-weight: 600; }
.figures .attn dd:not(.fig-note) { color: var(--signal); }
.figures .over dd:not(.fig-note) { color: var(--warn); }

.floor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 18px; align-items: start; }
.floor-main { min-width: 0; }
.floor-side { position: sticky; top: 74px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.floor-side .panel { margin: 0; }
.group { margin: 0 0 18px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 9px; }
.group-head h2 { margin: 0; font-size: 15px; }
.group-head p { margin: 0; font-size: 12.5px; color: var(--text-3); text-align: right; }
.seats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.seats > li { display: flex; min-width: 0; }
.org-note { margin: 4px 0 0; font-size: 12.5px; color: var(--text-3); }

.seat { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: 4px 14px 12px; background: var(--layer-1); border: 1px solid var(--rule); border-radius: var(--radius-card); transition: border-color .2s ease-out; }
.seat-live.is-working { border-color: var(--ok-rule); }
.seat-live.is-blocked { border-color: var(--warn-rule); }
.seat-live.is-paused { border-color: var(--stopped-rule); }
.seat-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.seat h3 { font-size: 14px; font-weight: 600; min-width: 0; }
.seat h3 a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; }
.seat h3 a:hover { text-decoration: underline; text-decoration-color: var(--signal); }
.status { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.status .glyph { width: 12px; height: 12px; }
.st-working { color: var(--ok); }
.st-idle { color: var(--text-2); }
.st-blocked { color: var(--warn); }
.st-paused { color: var(--bad); }
.st-needs { color: var(--signal); }
.st-not_built { color: var(--text-3); }
.reason { font-size: 12.5px; margin: 0 0 6px; color: var(--warn); }
.is-paused .reason { color: var(--bad); }
.task { margin: 0 0 6px; font-size: 13px; line-height: 1.45; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-live .task { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.own { margin: auto 0 0; padding-top: 2px; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.seat-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px; }
/* Drawn at 34 pixels, each still a 44 pixel target: the hit area reaches past its edge. */
.btn.btn-small { position: relative; min-height: 34px; padding: 0 11px; font-size: 12.5px; font-weight: 600; background: transparent; border-color: var(--rule-strong); }
.btn.btn-small::after { content: ""; position: absolute; inset: -5px -3px; }
.btn.btn-small:hover { background: var(--layer-2); border-color: var(--line); }
.btn.btn-run { color: var(--signal); border-color: var(--signal-rule); }
.btn.btn-run:hover { border-color: var(--signal); }
.sched { font-size: 12px; color: var(--text-3); margin-left: auto; text-align: right; white-space: nowrap; }
.seat-dormant { background: transparent; border-style: dashed; border-color: var(--rule-strong); padding: 7px 12px 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; }
.seat-dormant h3 { font-size: 13.5px; color: var(--text-2); font-weight: 600; align-self: center; }
.seat-dormant .task { grid-column: 1 / -1; margin: 2px 0 0; font-size: 12.5px; color: var(--text-3); }

.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.panel-head h2 { margin: 0; font-size: 15px; }
.panel-head a { font-size: 12.5px; display: inline-flex; align-items: center; min-height: 44px; }
.feed-panel { padding-bottom: 8px; }
.feed-list { list-style: none; margin: 0; padding: 0; }
.feed-list li { padding: 10px 0 11px; border-top: 1px solid var(--rule); }
.feed-list li:first-child { border-top: 0; padding-top: 4px; }
.fl-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 8px; margin: 0 0 3px; font-size: 13px; }
.fl-head strong { font-weight: 600; }
.fl-state { font-size: 12px; font-weight: 600; }
.fl-head time { margin-left: auto; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.fl-what { margin: 0; font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fl-type { margin: 3px 0 0; font-size: 11.5px; color: var(--text-3); }
.conn-panel h2 { margin: 0 0 10px; font-size: 15px; }

/* Live feed. */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.filters label { min-width: 180px; }
.stream-state { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 0 auto; min-height: 44px; font-size: 12.5px; color: var(--text-2); }
.stream-state .glyph { color: var(--text-3); }
.stream-state.is-live .glyph { color: var(--ok); }
.stream-state.is-down .glyph { color: var(--warn); }
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: 9px; background: var(--layer-1); }
.feed { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.feed th { white-space: nowrap; text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 9px 10px; border-bottom: 1px solid var(--rule-strong); background: var(--layer-1); position: sticky; top: 0; }
.feed td { padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.feed tbody tr:last-child td { border-bottom: 0; }
.feed tbody tr:hover td { background: rgba(111, 224, 163, 0.05); }
.feed .t-time { white-space: nowrap; color: var(--text-2); }
.feed .t-who { white-space: nowrap; font-weight: 600; }
.feed .t-who small { display: block; font-weight: 500; }
.feed .t-type .etype { display: block; color: var(--text-2); white-space: nowrap; }
.feed .t-what { min-width: 320px; }
.feed .t-lead { padding-top: 0; padding-bottom: 0; }
.feed .t-lead a { font-family: var(--mono); font-size: 12px; display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.feed .t-cost { white-space: nowrap; text-align: right; }
.feed.compact td { padding: 6px 10px; }
.tone-bad td { background: rgba(255, 138, 138, 0.06); }
.tone-good td { background: rgba(91, 214, 154, 0.05); }
.gate { font-weight: 650; white-space: nowrap; }
.gate-block { color: var(--bad); }
.gate-approval { color: var(--signal); }
.gate-allow { color: var(--ok); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; border-radius: 4px; font-size: 11px; font-weight: 650; vertical-align: 1px; }
.tag-fake { color: var(--warn); border: 1px solid rgba(242, 184, 75, 0.5); }
.tag-fake .glyph { width: 12px; height: 12px; }
.paging { margin: 14px 0; }
.is-off td { color: var(--text-3); }
.row-actions { white-space: nowrap; }
.row-actions select { width: auto; display: inline-block; margin-right: 6px; }

/* Stop switch. */
.switch-panel { border: 1px solid; border-radius: 10px; padding: 20px 22px; margin-bottom: 16px; }
.switch-panel[data-state="stopped"] { background: var(--stopped-ground); border-color: var(--stopped-rule); }
.switch-panel[data-state="running"] { background: var(--running-ground); border-color: var(--running-rule); }
.switch-state { display: flex; gap: 16px; align-items: flex-start; }
.switch-state > .glyph { width: 40px; height: 40px; }
.switch-panel[data-state="stopped"] .switch-state > .glyph { color: var(--bad); }
.switch-panel[data-state="stopped"] .switch-state > .glyph .cut { fill: var(--stopped-ground); }
.switch-panel[data-state="running"] .switch-state > .glyph { color: var(--ok); }
.switch-state h2 { margin: 2px 0 6px; font-size: 22px; }
.switch-panel[data-state="stopped"] h2 { color: #ffb3ba; }
.switch-panel[data-state="running"] h2 { color: var(--ok); }
.why { color: var(--text-2); }
.switch-effect { margin: 16px 0 10px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, 0.08); max-width: 75ch; }
.switch-panel .note, .switch-panel .why { max-width: 75ch; }
.switch-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); gap: 16px; align-items: start; margin-bottom: 8px; }
.switch-grid .switch-panel { margin-bottom: 0; }
.switch-forms { display: flex; flex-direction: column; gap: 16px; }
.switch-forms .panel { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.switch-forms .panel h2 { margin: 0; }
.opt { color: var(--text-3); font-size: 12px; }

/* Shared bits for the email screens. */
textarea { padding: 10px 12px; line-height: 1.5; resize: vertical; min-height: 120px; }
textarea[readonly] { color: var(--text-2); border-style: dashed; }
.muted { color: var(--text-2); }
.mono { font-family: var(--mono); font-size: 12px; }
.connections .is-off { color: var(--bad); }
.connections .is-off strong { color: var(--bad); }
.connections .is-off .glyph .cut { fill: var(--ground); }
.checks-ok, .checks-bad { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; white-space: nowrap; }
.checks-ok { color: var(--ok); }
.checks-bad { color: var(--bad); }
.checks-none { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 12.5px; color: var(--text-2); }
.checks { margin: 12px 0 0; border-top: 1px solid var(--rule); padding-top: 8px; }
.checks summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; list-style-position: inside; }
.checks summary::marker { color: var(--text-3); }
.checks ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 4px 18px; }
.checks li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; padding: 3px 0; }
.checks li .glyph { margin-top: 2px; }
.checks li.ok .glyph { color: var(--ok); }
.checks li.bad .glyph { color: var(--bad); }
.checks li.bad { grid-column: 1 / -1; }
.checks .check-word { font-weight: 650; margin-right: 4px; }
.checks li.ok .check-word { color: var(--ok); }
.checks li.bad .check-word { color: var(--bad); }
.checks li small { display: block; color: var(--text-2); margin-top: 2px; }

/* Conversations. */
.convs .t-office a { font-weight: 600; }
.convs .t-office small, .convs td small { display: block; margin-top: 2px; }
.feed .t-num { text-align: right; }
.cstat { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; white-space: nowrap; font-size: 12.5px; }
.cs-open { color: var(--text); }
.cs-waiting { color: var(--text-2); }
.cs-closed { color: var(--text-3); }
.cs-handed_off, .cs-taken_over { color: var(--signal); }
.cs-opted_out { color: var(--bad); }
.cs-opted_out .glyph .cut { fill: var(--layer-1); }
.thread-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: 16px; align-items: start; }
.thread { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.thread-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 16px; }
.thread-side .panel { margin: 0; }
.thread-side .facts { grid-template-columns: max-content minmax(0, 1fr); }
.thread-side .facts dd small { display: block; }
.thread-side form + form { margin-top: 14px; }
.thread-side .stack small { margin-top: -6px; }
.panel-fake { border: 1px dashed rgba(242, 184, 75, 0.6); }
.panel-fake h2 { display: flex; align-items: center; gap: 8px; color: var(--warn); }
.msg { background: var(--layer-1); border: 1px solid var(--rule); border-radius: 9px; padding: 12px 16px 14px; min-width: 0; }
.msg-outbound { background: var(--layer-2); }
.msg.tone-bad { border-color: var(--stopped-rule); }
.msg.tone-wait { border-color: var(--signal-rule); }
.msg-head { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; }
.msg-head h3 { font-size: 14px; }
.msg-state { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.msg-state.st-in { color: var(--signal); }
.msg-state.st-ok { color: var(--ok); }
.msg-state.st-wait { color: var(--signal); }
.msg-state.st-bad { color: var(--bad); }
.msg-state.st-muted { color: var(--text-3); }
.msg-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 0; font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.msg-subject { margin: 8px 0 6px; font-size: 13px; }
.msg-body { margin: 0; padding: 10px 12px; background: var(--ground); border: 1px solid var(--rule); border-radius: 7px; white-space: pre-wrap; overflow-wrap: anywhere; font: 13.5px/1.55 var(--font); color: var(--text); }
.ap-thread .msg-body { max-height: 480px; overflow: auto; }
.checks .warn { display: flex; gap: 6px; align-items: flex-start; margin: 6px 0 0; }
.checks .warn .glyph { margin-top: 2px; }
.msg .note { margin: 8px 0 0; display: flex; gap: 6px; align-items: center; }
.msg p.tag { margin: 10px 0 0; display: inline-flex; padding: 2px 8px; }

/* Approvals. */
.ap-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 8px; }
.ap { background: var(--layer-1); border: 1px solid var(--rule); border-radius: 9px; padding: 14px 20px 18px; }
.ap-handoff { border-color: var(--signal-rule); }
.ap-head { margin-bottom: 8px; }
.ap-kind { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 12.5px; font-weight: 650; color: var(--signal); }
.ap-head h2 { margin: 0; font-size: 16px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.ap-link { font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; min-height: 44px; vertical-align: middle; margin-left: 4px; }
.decided td { vertical-align: middle; padding-top: 0; padding-bottom: 0; }
.decided td a { display: inline-flex; align-items: center; min-height: 44px; vertical-align: middle; }
.ap-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 0; font-size: 12.5px; color: var(--text-2); }
.ap-why { margin: 6px 0 2px; max-width: 90ch; }
.ap-to { margin: 8px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.ap-form { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.ap-form > label { font-size: 13px; color: var(--text-2); }
.ap-form textarea { font: 13.5px/1.55 var(--font); min-height: 260px; }
.ap-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.ap-reject { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; align-items: center; }
.ap-reject input { flex: 1 1 280px; width: auto; }
.ap-thread { margin-top: 10px; }
.ap-thread summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--signal); }

/* The risk tier of each item, the oldest wait against the
   line, drafts approved together, the decision bar (in thumb's reach on a
   phone), Learning, Proposed changes and Releases. */
.risk { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.risk .glyph { width: 14px; height: 14px; }
.risk-high { color: var(--warn); }
.risk-medium { color: var(--text); }
.risk-low { color: var(--text-2); }
.ap-risk { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 6px 0 0; font-size: 12.5px; }
.ap-slot > .ap-risk { margin: 0 0 6px 2px; }
.past-line { display: inline-flex; align-items: center; gap: 6px; color: var(--warn); font-weight: 650; }
.wait-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 18px; padding: 4px 16px; margin: 0 0 14px; background: var(--layer-1); border: 1px solid var(--rule); border-radius: var(--radius-card); }
.wait-band[data-state="past"] { border-color: var(--warn-rule); }
.wait-state { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 8px 0; }
.wait-state .glyph { margin-top: 2px; }
.wait-state strong { margin-right: 6px; }
.wait-band[data-state="past"] .wait-state .glyph, .wait-band[data-state="past"] .wait-state strong { color: var(--warn); }
.wait-band[data-state="within"] .wait-state .glyph, .wait-band[data-state="within"] .wait-state strong { color: var(--ok); }
.wait-tiers { display: flex; flex-wrap: wrap; align-items: center; gap: 0 14px; margin: 0; font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.wait-tiers a { display: inline-flex; align-items: center; min-height: 44px; }
.batches { display: flex; flex-direction: column; gap: 12px; margin: 0 0 14px; }
.batch { background: var(--layer-1); border: 1px solid var(--signal-rule); border-radius: var(--radius-card); padding: 12px 20px 14px; }
.batch-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 4px; }
.batch-head h2 { margin: 0; font-size: 15px; }
.batch-to { margin: 6px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.ap-decide { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.only-phone { display: none; }
.diff-one { margin-top: 6px; }
.diff-one h3 { font-size: 13px; color: var(--text-2); margin: 0 0 6px; }
.rel-rules .facts dd small { display: block; color: var(--text-3); margin-top: 2px; }
.item-nav { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: -6px 0 10px; }
.phone-panel .facts { margin-bottom: 6px; }
.notice-list { list-style: none; margin: 6px 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; max-width: 760px; }
.notice-list li { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px 4px; background: var(--ground); border: 1px solid var(--rule); border-radius: var(--radius); }
.notice-list small { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; }
.notice-list small a { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--mono); font-size: 12px; }
.tier-pick { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0 22px; margin: 0; }

/* Learning: four places, then the lessons. */
.learn-list { list-style: none; margin: 0 0 18px; padding: 0; background: var(--layer-1); border: 1px solid var(--rule); border-radius: var(--radius-card); }
.learn-list li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, auto); align-items: center; gap: 4px 28px; padding: 4px 20px; border-top: 1px solid var(--rule); }
.learn-list li:first-child { border-top: 0; }
.learn-link { display: flex; flex-direction: column; justify-content: center; gap: 3px; min-height: 60px; padding: 8px 0; color: var(--text); text-decoration: none; }
.learn-link strong { font: 600 15px/1.25 var(--display); color: var(--signal); }
.learn-link:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.learn-link span { font-size: 13px; color: var(--text-2); max-width: 92ch; }
.learn-count { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; margin: 0; text-align: right; }
.learn-num { font: 600 26px/1.1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.learn-unit { font-size: 12.5px; color: var(--text-2); }
.learn-count small { color: var(--text-3); }
.alert-note h2 { display: flex; align-items: center; gap: 8px; color: var(--signal); }
.lessons-table td:nth-child(3) { min-width: 320px; }
.match-count { font-weight: 650; font-variant-numeric: tabular-nums; }

/* Proposed changes. */
.pc, .pc-alert { border-color: var(--signal-rule); }
.anchor { display: block; position: relative; top: -84px; visibility: hidden; }
.pc-state { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--signal); }
.pc-state.pc-approved { color: var(--ok); }
.bench { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; font-size: 13px; color: var(--text-2); }
.bench .glyph { margin-top: 2px; }
.bench strong { color: var(--text); }
.bench-none .glyph { color: var(--text-3); }
.bench-ref .glyph { color: var(--ok); }
.bench a { display: inline-flex; align-items: center; min-height: 44px; }
.evidence { margin-top: 14px; padding-top: 2px; border-top: 1px solid var(--rule); }
.evidence h3 { margin: 10px 0 6px; font-size: 13px; color: var(--text-2); }
.evidence p { margin: 0; }
.edit-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.edit-list a { display: inline-flex; align-items: center; min-height: 44px; }
.edit-pair { font-size: 13px; overflow-wrap: anywhere; }
.edit-pair del { color: var(--bad); text-decoration-thickness: 1px; }
.edit-pair ins { color: var(--ok); text-decoration: none; }
.hist-word { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; white-space: nowrap; }
.tone-good .hist-word { color: var(--ok); }
.tone-bad .hist-word { color: var(--bad); }
.history-table td:nth-child(5) { min-width: 220px; }

/* Releases. */
.figures.rel-figures { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 960px; }
.release-table th[scope="row"] { min-width: 200px; text-align: left; font-weight: 600; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--rule); }
.release-table th[scope="row"] strong { display: block; }
.release-table th[scope="row"] .risk { margin-top: 4px; }
.release-table th[scope="row"] small { display: block; font-weight: 400; }
.release-table tbody tr:last-child th { border-bottom: 0; }
.rec-cell { min-width: 200px; }
.rec-cell small { max-width: 38ch; }
.rec-share strong { font-variant-numeric: tabular-nums; font-size: 15px; }
.rel { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; white-space: nowrap; }
.rel-earned, .rel-out { color: var(--ok); }
.rel-not, .rel-waits { color: var(--text-2); }
.rel-never { color: var(--warn); white-space: normal; }
.release-table td small { max-width: 40ch; }
.trend { display: inline-flex; flex-direction: column; gap: 4px; }
.trend-svg { display: block; overflow: visible; }
.trend-svg .t-all { fill: var(--line); }
.trend-svg .t-clean { fill: var(--ok); }
.risk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 22px; }
.risk-grid h3 { margin: 10px 0 2px; }
.risk-grid .plain-list { padding-left: 16px; }
.risk-grid .plain-list small { display: inline; }

/* Costs. */
.over-word { display: inline-flex; align-items: center; gap: 6px; color: var(--warn); font-weight: 650; }
.cap-panel[data-state="reached"] { border-color: var(--warn-rule); }
.cap-state { max-width: 90ch; }
.cap-state .glyph { display: inline-block; vertical-align: -2px; margin-right: 6px; }
.cap-panel[data-state="reached"] .cap-state .glyph { color: var(--warn); }
.cap-panel[data-state="ok"] .cap-state .glyph { color: var(--ok); }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-top: 12px; }
.inline-form label { flex-basis: 100%; }
.inline-form input { width: auto; flex: 0 1 320px; }
.inline-form select { width: auto; }
.num-table td.t-cost, .num-table td.t-num, .feed th.t-cost, .feed th.t-num { text-align: right; }
.num-table td, .num-table th { white-space: nowrap; }
.feed td small { display: block; margin-top: 2px; }
.feed .t-rule { white-space: nowrap; }
.resolve { display: flex; gap: 6px; flex-wrap: wrap; min-width: 220px; }
.resolve input { flex: 1 1 140px; width: auto; }

/* Compliance. */
.jump { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0 0 6px; }
.jump a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; color: var(--text); font-weight: 600; }
.jump a:hover { background: var(--layer-2); }
.jump .count { color: var(--text-2); font-weight: 500; font-variant-numeric: tabular-nums; }
.sev { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; white-space: nowrap; }
.sev-serious { color: var(--bad); }
.sev-minor { color: var(--warn); }
.rec { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.rec .glyph { margin-top: 2px; }
.rec small, .placements small { display: block; color: var(--text-2); font-weight: 400; margin-top: 2px; }
.rec-ok, .rec-ok strong { color: var(--ok); }
.rec-warn, .rec-warn strong { color: var(--warn); }
.rec-bad, .rec-bad strong { color: var(--bad); }
.rec-muted, .rec-muted strong { color: var(--text-3); }
.rec span { color: var(--text); }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; margin-top: 14px; }
.dl-grid .panel { margin: 0; }
.dl h3 { font-size: 15px; margin: 0 0 6px; }
.dl h3 small { display: block; font-weight: 500; margin-top: 2px; }
.dl-verdict { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; }
.dl .facts { grid-template-columns: 6em minmax(0, 1fr); row-gap: 10px; }
.placements { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.placements li { display: flex; gap: 8px; align-items: center; }
.placements li span { color: var(--text); }
.history { margin-top: 14px; }
.history summary, .propose summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--signal); font-weight: 600; }
.rules { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; max-width: 110ch; }
.rules li { border-left: 2px solid var(--rule-strong); padding: 2px 0 2px 14px; }
.rule-text { margin: 0 0 2px; }
.rules .mono { color: var(--text-3); }

/* The Agent page. */
.agent-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.agent-top .panel { margin: 0; }
.big-status { font-size: 14px; margin-bottom: 6px; }
.task-line { color: var(--text-2); margin: 0 0 10px; }
.agent-top .facts dd small { display: block; }
.reason.is-paused-reason { color: var(--bad); }
.grid-form.tight { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); align-items: end; margin-top: 10px; }
.ins-text { margin-top: 10px; }
.propose { margin-top: 10px; }
.propose textarea { min-height: 360px; font: 13.5px/1.55 var(--font); }
.tools { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 10px 0 0; }
.tools div { display: contents; }
.tools dt { color: var(--signal); }
.tools dd { margin: 0; color: var(--text-2); font-size: 13px; }

/* An instruction change in Approvals: current against proposed. */
.ap-instructions { border-color: var(--signal-rule); }
.diff-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 10px; }
.diff-grid h3 { font-size: 13px; color: var(--text-2); margin: 0 0 6px; }
.diff { margin: 0; padding: 10px 12px; background: var(--ground); border: 1px solid var(--rule); border-radius: 7px; white-space: pre-wrap; overflow-wrap: anywhere; font: 12.5px/1.55 var(--mono); color: var(--text-2); max-height: 560px; overflow: auto; }
.diff .d-removed { color: var(--bad); text-decoration: line-through; text-decoration-thickness: 1px; }
.diff .d-added { color: var(--ok); }
.diff .d-skip { color: var(--text-3); font-style: italic; }

/* Pipeline: the funnel band, the period switch, the channel table, the trials. */
.figures.funnel { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 12px; }
.periods { margin: 4px 0 14px; }
.periods a[aria-current="page"] { border-color: var(--signal); color: var(--text); box-shadow: inset 0 -2px 0 var(--signal); }
.cost-note { max-width: 90ch; color: var(--text-2); margin: 0 0 22px; }
.cost-note strong { color: var(--text); }
.sub-note { max-width: 90ch; color: var(--text-2); margin: -4px 0 12px; }
h2 small { font-size: 12.5px; font-weight: 500; margin-left: 8px; }
.funnel-table th[scope="row"] { text-align: left; font-weight: 600; white-space: nowrap; }
.funnel-table th[scope="row"] small, .onboarding-table td small.mono { display: block; margin-top: 2px; font: 12px var(--mono); color: var(--text-3); font-weight: 400; }
.funnel-table td.zero { color: var(--text-3); }
.funnel-table tfoot th, .funnel-table tfoot td { border-top: 1px solid var(--rule-strong); font-weight: 650; }
.funnel-table tfoot td.t-num { color: var(--text); }
.connections li .inline { margin-left: 8px; }
.ob-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; white-space: nowrap; }
.ob-ok { color: var(--ok); }
.ob-warn { color: var(--warn); }
.ob-muted { color: var(--text-3); }
.onboarding-table td { vertical-align: top; }
.onboarding-table td a { display: inline-flex; align-items: center; min-height: 44px; }
.onboarding-table td small { display: block; margin-top: 2px; color: var(--text-2); max-width: 46ch; }
.sim-grid form + form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); }

/* The morning brief on the Floor, reports on the Agent page, a budget move in Approvals. */
.brief { margin: 0 0 22px; padding: 0; }
.brief > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; min-height: 44px; padding: 10px 20px; cursor: pointer; }
.brief > summary small { color: var(--text-2); font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.brief-title { font-weight: 650; font-size: 16px; color: var(--text); }
.brief-open { color: var(--signal); font-weight: 600; font-size: 13.5px; }
.brief[open] .brief-open { display: none; }
.brief .report-text { margin: 0 20px 18px; }
.brief-none { margin: -14px 0 20px; font-size: 13px; }
.report-text { white-space: pre-wrap; max-width: 110ch; }
.table-wrap + .small { margin-top: 10px; }
.fake-note { color: var(--warn) !important; display: inline-flex; align-items: center; gap: 6px; }
.report-old { margin: 6px 0 0 14px; }
.report-old summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; color: var(--signal); }
.ap-budget { border-color: var(--signal-rule); }
.budget-move { display: flex; gap: 0; margin: 10px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); max-width: 420px; }
.budget-move div { flex: 1; padding: 8px 16px; border-left: 1px solid var(--rule); }
.budget-move div:first-child { border-left: 0; padding-left: 0; }
.budget-move dt { font-size: 12.5px; color: var(--text-2); }
.budget-move dd { margin: 2px 0 0; font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.budget-move div:last-child dd { color: var(--signal); }

/* The human closer's one list. */
.closer-list td { vertical-align: top; }
.closer-list .t-office a { display: inline-flex; align-items: center; min-height: 44px; margin-left: 6px; }
.closer-list td small { display: block; margin-top: 2px; }
.plain-list { margin: 8px 0 0; padding-left: 18px; color: var(--text-2); }
.plain-list li { margin: 4px 0; }
.plain-list strong { color: var(--text); }
.agent-note { max-width: 110ch; }
.agent-note p { margin: 0; color: var(--text-2); }

/* A demo message and a testimonial in Approvals. */
.ap-chat { border-color: var(--signal-rule); }
.ap-testimonial { border-color: var(--signal-rule); }
.quote { margin: 10px 0; padding: 0 0 0 14px; border-left: 2px solid var(--signal); }
.quote .msg-body { margin: 0; }
.ap-testimonial .ap-form input { max-width: 520px; }

/* A content draft in Approvals, the intent map, what a person supplies, the partners. */
.ap-content { border-color: var(--signal-rule); }
.content-langs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-top: 10px; }
.content-langs h3 { font-size: 13px; color: var(--text-2); margin: 0 0 6px; }
.content-langs .msg-body { max-height: 520px; overflow: auto; margin: 0; }
.content-facts { margin: 8px 0 4px; }
.content-facts dd small { display: block; color: var(--text-2); }
.claim { display: block; }
.claim small { display: inline; color: var(--text-2); }
.topics { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 8px 0 0; max-width: 120ch; }
.topics div { display: contents; }
.topics dt { color: var(--signal); font: 12.5px var(--mono); }
.topics dd { margin: 0; color: var(--text-2); font-size: 13px; }
label.check { display: flex; flex-direction: row; align-items: center; gap: 10px; min-height: 44px; color: var(--text); font-size: 13.5px; }
label.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--signal); flex: none; }
.inputs-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 8px; }
.inputs-grid h3 { margin: 0 0 4px; font-size: 14px; }
.t-partner a, .side-link { display: inline-flex; align-items: center; min-height: 44px; margin-left: 6px; }
.side-link { margin-left: 0; }

/* The door: sign-in and setup. */
.bare main.door { max-width: 440px; margin: 9vh auto 40px; padding: 28px; background: var(--layer-1); border: 1px solid var(--rule); border-radius: 12px; }
.door .brand { margin: 0 0 18px; }
.door h1 { margin-bottom: 10px; }
.door p { color: var(--text-2); }
.error { color: var(--stopped-text); background: var(--stopped-ground); border: 1px solid var(--stopped-rule); border-radius: var(--radius); padding: 8px 12px; }
.steps { padding-left: 20px; color: var(--text-2); }
.steps li { margin-bottom: 6px; }
.qr { width: 196px; margin: 10px 0 16px; padding: 8px; background: #fff; border-radius: 8px; }
.qr svg { display: block; width: 100%; height: auto; }
.codes { list-style: none; padding: 0; margin: 12px 0 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.codes code { display: block; padding: 6px 10px; font-size: 15px; background: var(--ground); border: 1px solid var(--rule-strong); border-radius: 5px; text-align: center; }

/* Motion: one moment each, and none at all for those who ask. */
@media (prefers-reduced-motion: no-preference) {
  .feed tr.fresh td { animation: arrive 1.6s cubic-bezier(.16, 1, .3, 1); }
  .glyph-working { animation: breathe 2.4s ease-in-out infinite; }
}
@keyframes arrive { from { background: rgba(111, 224, 163, 0.2); } to { background: transparent; } }
@keyframes breathe { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Narrower screens: side panels stack under their main column. */
@media (max-width: 1240px) {
  .switch-grid { grid-template-columns: minmax(0, 1fr); }
  .thread-grid { grid-template-columns: minmax(0, 1fr); }
  .thread-side { position: static; order: -1; }
  /* A hand-off's brief comes first on a phone: the closer reads, then acts (My leads' cards carry Accept). */
  .handoff-grid .thread-side { order: 0; }
  .agent-top { grid-template-columns: minmax(0, 1fr); }
  .diff-grid { grid-template-columns: minmax(0, 1fr); }
  .content-langs, .inputs-grid { grid-template-columns: minmax(0, 1fr); }
  .figures.funnel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .risk-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  main { padding: 16px 14px 48px; }
  .figures.funnel { grid-template-columns: 1fr 1fr; }

  .filters label { min-width: 100%; }
  .stream-state { margin-left: 0; }
  /* The Live feed stacks each event, so what happened is always on screen. */
  .feed.stackable thead { display: none; }
  .feed.stackable tbody tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
  .feed.stackable tbody tr:last-child { border-bottom: 0; }
  .feed.stackable td { padding: 0; border: 0; min-width: 0; background: none; }
  .feed.stackable td:empty { display: none; }
  .feed.stackable .t-what { grid-column: 1 / -1; margin-top: 4px; }
  .feed.stackable .t-type { grid-column: 1 / -1; order: 6; margin-top: 2px; }
  .feed.stackable .t-gate { grid-column: 3; grid-row: 1; text-align: right; }
  .feed.stackable .t-lead, .feed.stackable .t-cost { order: 7; margin-top: 2px; }
  .feed.stackable tr.tone-bad { background: rgba(255, 138, 138, 0.06); }
  .feed.stackable tr.tone-good { background: rgba(91, 214, 154, 0.05); }
  .table-wrap { overflow-x: auto; }
  .table-wrap:has(> .stackable) { overflow-x: visible; }
  /* Labelled tables become one card per row, each value under its label. */
  .feed.labelled thead { display: none; }
  .feed.labelled tbody tr { display: block; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
  .feed.labelled tbody tr:last-child { border-bottom: 0; }
  .feed.labelled td { display: block; padding: 3px 0; border: 0; background: none; }
  .feed.labelled td::before { content: attr(data-label); display: block; color: var(--text-2); font-size: 12px; font-weight: 600; }
  .feed.labelled td:empty { display: none; }
  .feed.labelled tr.tone-bad { background: rgba(255, 138, 138, 0.06); }
  .feed.labelled tr.tone-good { background: rgba(91, 214, 154, 0.05); }
  /* Conversations restack: office and status on top, the rest beneath. */
  .feed.convs tbody tr { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .feed.convs td { grid-column: auto; }
  .feed.convs .t-office { grid-column: 1 / -1; }
  .feed.convs .t-num::before { content: "Messages: "; color: var(--text-2); }
  .ap { padding: 12px 14px 16px; }
  .ap-actions .btn, .ap-reject .btn { flex: 1 1 auto; }
  .checks ul { grid-template-columns: minmax(0, 1fr); }
  .msg { padding: 10px 12px 12px; }
  .dl-grid { grid-template-columns: minmax(0, 1fr); }
  .tools { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .tools dd { margin-bottom: 8px; }
  .inline-form input { flex: 1 1 100%; }
  .feed.labelled td.t-cost, .feed.labelled td.t-num { text-align: left; }
  /* A labelled table's row heading sits on its own line, like a cell. */
  .feed.labelled tbody th { display: block; padding: 3px 0; border: 0; background: none; min-width: 0; }
  .feed.labelled .rec-cell, .feed.labelled td:nth-child(n) { min-width: 0; }

  /* Approvals on a phone: one item to a screen where it fits, the draft
     readable, and the decision in thumb's reach. The decision bar stays at the
     bottom of the screen while its item is on it; Reject is right under it. */
  html:has(body[data-page="approvals"]) { scroll-snap-type: y proximity; scroll-padding-top: 156px; }
  body[data-page="approvals"] .ap-list > .ap, body[data-page="approvals"] .ap-list > .ap-slot { scroll-snap-align: start; }
  body[data-page^="approvals"] .ap-draft { min-height: min(calc(100svh - 168px), 680px); display: flex; flex-direction: column; }
  .ap-draft .ap-form textarea { font-size: 15px; line-height: 1.55; min-height: min(38svh, 300px); max-height: min(62svh, 460px); field-sizing: content; }
  .ap-decide { position: sticky; bottom: 0; z-index: 2; margin: auto -14px 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--layer-2); border-top: 1px solid var(--rule-strong); }
  .ap-decide .btn { flex: 1 1 150px; min-height: 48px; font-size: 14.5px; }
  .ap-decide small { flex-basis: 100%; }
  /* Approve on top, the whole width; edit and reject side by side under it. */
  .ap-draft .ap-decide .btn-primary { flex-basis: 100%; }
  .ap-draft .ap-decide .btn:not(.btn-primary) { flex: 1 1 0; padding: 0 10px; }
  .ap-draft .ap-decide small { display: none; }
  .ap-decide .only-phone { display: inline-flex; }
  .rel-rules .facts { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  .rel-rules .facts dd { margin-bottom: 8px; }
  .batch .ap-decide { margin: 12px -20px -14px; border-radius: 0 0 var(--radius-card) var(--radius-card); }
  .batch { padding: 12px 20px 14px; }
  .wait-band { padding: 2px 12px; }
  .item-nav .btn { flex: 1 1 auto; }
  .learn-list li { grid-template-columns: minmax(0, 1fr); padding: 4px 14px 10px; gap: 0; }
  .learn-count { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 0 8px; text-align: left; }
  .learn-num { font-size: 22px; }
  .figures.rel-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lessons-table td:nth-child(3), .history-table td:nth-child(5) { min-width: 0; }
}

/* The creative library and its cards. */
.thumbs { list-style: none; margin: 8px 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 12px; }
.thumbs li { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-2); }
.thumbs a { display: block; line-height: 0; border: 1px solid var(--rule); border-radius: 5px; overflow: hidden; }
.thumbs a:hover { border-color: var(--signal); }
.thumbs img { display: block; height: auto; background: var(--ground); }
.facts.files dd { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.scenes th:first-child, .scenes td:first-child { min-width: 170px; }
.file { display: block; }
.file small { color: var(--text-2); }
.facts.files .file a, .renditions a { display: inline-flex; align-items: center; min-height: 44px; }
.renditions { list-style: none; padding-left: 0; }
.renditions li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.asset { margin: 0 0 14px; }
.asset-head h3 { margin: 0 0 4px; color: var(--text); font-size: 15px; }
.adset { margin: 0 0 14px; }
.adset h3 { margin: 0 0 6px; color: var(--text); }
.adset h3 small { font-weight: 500; }
.adset .inline-form { margin: 4px 0 10px; }
.adset .inline-form input { flex: 0 1 160px; }
.ck summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; }
.ck summary .glyph { flex: none; }
.checks-list { list-style: none; margin: 6px 0; padding: 0; display: grid; gap: 8px; }
.checks-list li { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; align-items: start; }
.checks-list li .glyph { margin-top: 3px; }
.checks-list small { display: block; color: var(--text-2); font-size: 12.5px; }
.scenes td small { display: block; color: var(--text-2); }
.scenes td small.warn { color: var(--warn); }
.sim-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 14px; padding: 8px 0; border-top: 1px solid var(--rule); }
.sim-row > strong { flex-basis: 100%; }
.sim-row .inline-form { margin-top: 0; }
.ap-creative { border-color: var(--signal-rule); }
.asset .facts dd small, .adset .facts dd small { display: block; color: var(--text-2); font-size: 12.5px; }
.panel > h3:first-child { margin-top: 0; }

/* Visibility. */
.api-note { display: flex; gap: 8px; align-items: flex-start; max-width: 1100px; color: var(--text-2); }
.api-note .glyph { flex: none; margin-top: 3px; color: var(--warn); }
.api-note strong { color: var(--text); }
.answers-grid th[scope="row"] { font-weight: 600; min-width: 220px; }
.answers-grid th[scope="row"] small { display: block; font-weight: 400; color: var(--text-2); }
.answers-grid td { white-space: nowrap; }
.answers-grid td span { display: inline-flex; align-items: center; gap: 6px; }
.answers td small, .answers td strong { display: block; }
.answers td small { color: var(--text-2); }
.score-table th[scope="row"] small { display: block; color: var(--text-2); font-weight: 400; }
.score-table td small { color: var(--text-2); }
.t-for a { display: inline-flex; align-items: center; min-height: 44px; }
.task-form { margin-top: 0; }
.task-form input { flex: 1 1 160px; }
.site-items { max-width: 1100px; }

/* Setup: the company profile (the product's mock, its last screen). */
.setup { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: 18px; align-items: start; max-width: 1120px; margin: 0 auto; }
.setup ~ * { max-width: 1120px; }
.setup-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.setup-main .panel { margin: 0; padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 16px; }
.setup-main .panel h2 { margin: 0; font-size: 15px; }
.setup .field > label, .setup legend { font-size: 13px; font-weight: 600; color: var(--text); }
.setup .field > small { font-size: 12px; color: var(--text-3); }
.setup textarea { min-height: 64px; padding: 10px 12px; resize: vertical; field-sizing: content; }
.setup textarea[rows="1"] { min-height: 44px; }
.setup input::placeholder, .setup textarea::placeholder { color: var(--text-3); opacity: 1; }
.setup fieldset.langs { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.setup fieldset.langs legend { padding: 0; margin-bottom: 4px; }
.checks-row { display: flex; flex-wrap: wrap; gap: 0 22px; }
.money { position: relative; }
.money > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.money input { padding-left: 26px; }
.draft-note { display: flex; gap: 8px; align-items: flex-start; margin: -4px 0 0; padding: 10px 12px; border: 1px dashed rgba(232, 176, 78, 0.55); border-radius: var(--radius); color: var(--warn); font-size: 13px; }
.draft-note .glyph { margin-top: 2px; flex: none; }
.pack-rules { margin-top: -6px; }
.pack-rules summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--signal); font-weight: 600; font-size: 13px; }
.pack-rules ol { margin: 0 0 4px; padding-left: 26px; color: var(--text-2); font-size: 13px; display: flex; flex-direction: column; gap: 5px; max-width: 75ch; }
.facts.linked { margin: 0; padding-top: 12px; border-top: 1px solid var(--rule); grid-template-columns: max-content minmax(0, 1fr); }
.facts.linked dd a { display: inline-flex; align-items: center; min-height: 32px; margin-left: 6px; font-size: 12.5px; }
.setup-side { position: sticky; top: 74px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.setup-side .panel { margin: 0; }
.start-panel h2 { margin: 0 0 6px; font-size: 15px; }
.start-list { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--text-2); }
.start-list li { padding: 9px 0; border-top: 1px solid var(--rule); line-height: 1.45; }
.start-list li:first-child { border-top: 0; }
.btn-block { width: 100%; }
.btn-primary.btn-block { min-height: 46px; font-size: 14.5px; }
.started { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 13px; color: var(--text-2); }
.started .glyph { margin-top: 3px; }
.gaps { margin: 0; padding: 10px 12px; border: 1px solid var(--setup-rule); background: var(--setup-ground); color: var(--setup-text); border-radius: var(--radius); font-size: 13px; }
.reason-field label { font-size: 13px; font-weight: 600; color: var(--text); }
.grid-form .reason-field { grid-column: 1 / -1; max-width: 640px; }
.note-sample { display: flex; gap: 8px; align-items: flex-start; color: var(--warn); max-width: 1120px; margin: 0 auto 14px; }
.note-sample .glyph { margin-top: 3px; flex: none; }
q { quotes: "\201C" "\201D"; color: var(--text-2); }
body:has(.setup) .page-head { max-width: 1120px; margin-left: auto; margin-right: auto; }
body:has(.setup) .flash { max-width: 1120px; margin-left: auto; margin-right: auto; }

/* Browser surfaces in the palette. */
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; border-color: var(--signal-rule); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
.panel { border-radius: var(--radius-card); }

/* The header: one row from 1280 pixels; the screens take their own row below. */
@media (max-width: 1499px) {
  .bar { gap: 4px 12px; padding: 0 18px; }
  .nav a, .more > summary { padding: 0 7px; }
  .nav a[aria-current="page"]::after { left: 7px; right: 7px; }
  .breaker[data-state="running"] .breaker-state { display: none; }
}
@media (max-width: 1279px) {
  .bar { flex-wrap: wrap; padding: 6px 18px 0; }
  .bar-end { order: 2; }
  .nav { order: 3; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .more { order: 4; }
  .nav a[aria-current="page"]::after { bottom: 0; }
  .floor-grid, .setup { grid-template-columns: minmax(0, 1fr); }
  .floor-side, .setup-side { position: static; }
  .figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .seats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  /* Phone: AgentPulse and the Sample data marker, then the stop switch the whole width, then the screens with More. */
  .bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 4px 12px 0; gap: 4px 8px; }
  .brand { grid-column: 1; grid-row: 1; font-size: 16px; }
  .bar-end { display: contents; }
  .sample-marker { grid-column: 2; grid-row: 1; justify-self: end; }
  #breaker-wrap { grid-column: 1 / -1; grid-row: 2; }
  .breaker { width: 100%; }
  .breaker-state { flex: 1; min-width: 0; }
  .breaker[data-state="running"] .breaker-state { display: inline-flex; }
  .breaker[data-state="running"] form.inline { margin-left: auto; }
  .nav { grid-column: 1; grid-row: 3; }
  .more { grid-column: 2; grid-row: 3; }
  .sample-marker span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .sample-marker { padding: 0 8px; min-height: 36px; }
  .breaker-state small { display: none; }
  .breaker-state { padding: 0 8px; }
  .btn-stop.btn { padding: 0 10px; font-size: 13px; }
  .more-panel { left: auto; right: 0; width: min(300px, calc(100vw - 24px)); }
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .figures > div:first-child { grid-column: 1 / -1; }
  .figures > div { padding: 11px 12px 12px; }
  .figures dd, .figures dd span { font-size: 22px; }
  .seats { grid-template-columns: minmax(0, 1fr); }
  .group-head { flex-direction: column; gap: 2px; }
  .group-head p { text-align: left; }
  .setup-main .panel { padding: 14px 14px 16px; }
  .strip, .strip-setup { padding: 8px 14px; }
}
@media (max-width: 400px) {
  .btn-stop.btn .glyph { display: none; }
}

/* The learning screens: the test bench and live experiments. Existing components; these only place them. */
.feed.num-table th[scope="row"] { text-align: left; font-weight: 600; white-space: nowrap; }
.feed.num-table th[scope="row"] small { display: block; margin-top: 2px; font-weight: 400; color: var(--text-2); white-space: normal; max-width: 34ch; }
.feed tr.is-off th { color: var(--text-2); }
.feed td q { display: block; max-width: 48ch; }
.feed td .plain-list { margin: 0; padding-left: 16px; }
.feed td .rec small { max-width: 60ch; }
.feed td .ck .checks-list { min-width: 300px; max-width: 70ch; }
fieldset label.check { flex-wrap: wrap; column-gap: 10px; }
fieldset label.check > small { flex-basis: 100%; padding-left: 30px; margin-top: -8px; }
.agent-top .panel .grid-form.tight { align-items: start; }
@media (max-width: 720px) {
  .feed td .ck .checks-list { min-width: 0; }
  .feed.num-table th[scope="row"] small { max-width: 22ch; }
}
.connections.learning-notes { margin-bottom: 14px; }
.feed td .ck .resolve { margin-top: 4px; }
.bench-failed .glyph, .bench-failed strong { color: var(--bad); }
/* The bench line in Proposed changes: its 44 pixel link keeps the glyph and the words on one line. */
.bench { align-items: center; }
.bench-waiting td:nth-child(-n+3) { white-space: nowrap; }
.bench-waiting td:nth-child(-n+3) small { white-space: nowrap; }
@media (max-width: 720px) { .bench-waiting td:nth-child(-n+3), .bench-waiting td:nth-child(-n+3) small { white-space: normal; } }
.panel > .panel-head h3 { margin: 0; color: var(--text); font: 600 15px/1.25 var(--display); }
.panel > .panel-head { align-items: center; margin-bottom: 6px; }
.feed tbody th[scope="row"] { position: static; background: none; border-bottom: 1px solid var(--rule); padding: 8px 10px; font-size: 13px; color: var(--text); vertical-align: top; }
.feed tbody tr:last-child th[scope="row"] { border-bottom: 0; }

/* The trainer and memory screens. Existing components and tokens; these only place them. */
.night-para { max-width: 82ch; margin: 6px 0 12px; font-size: 14.5px; line-height: 1.55; color: var(--text); }
.figures.trainer-figures { margin: 4px 0 10px; }
.feed.hyp-table th[scope="row"] { white-space: nowrap; }
.feed.hyp-table th[scope="row"] small { display: block; margin-top: 2px; font-weight: 400; color: var(--text-2); }
.feed.hyp-table td { min-width: 150px; }
.feed.hyp-table td:nth-child(2) { min-width: 260px; max-width: 46ch; }
.feed.hyp-table td:nth-child(3) { min-width: 220px; max-width: 40ch; }
.feed.hyp-table td:nth-child(4) small { max-width: 40ch; }
.feed.hyp-table td:nth-child(4) small + small { margin-top: 6px; }
.feed td small strong { color: var(--text); font-weight: 600; }
.fates { margin-top: 6px; }
.fates summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--signal); font-size: 12.5px; font-weight: 600; }
.fates summary:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 4px; }
.fates .plain-list li { margin: 6px 0; }
.held-list li, .never-list li { margin: 8px 0; max-width: 92ch; }
.held-list li span { color: var(--text-2); }
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 260px; }
.rank-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; align-items: start; }
.rank { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 1px solid var(--rule-strong); border-radius: 6px; font: 600 12px/1 var(--display); font-variant-numeric: tabular-nums; color: var(--text-2); }
.rank-list li:first-child .rank { border-color: var(--signal-rule); color: var(--signal); }
.ok-word { color: var(--ok); }
.pb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.pb-grid .panel { margin: 0; }
.pb .facts { grid-template-columns: max-content minmax(0, 1fr); font-size: 13px; }
.pb .facts dd { margin: 0; }
.pb-line { display: block; margin-bottom: 4px; }
.pb-line small { color: var(--text-3); }
.history-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; max-width: 720px; }
.history-form .field { flex: 1 1 320px; }
.history-text { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100ch; margin: 0; padding: 14px 16px; background: var(--layer-1); border: 1px solid var(--rule); border-radius: 9px; font: 13px/1.55 var(--mono); color: var(--text); }
.history-text:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.side-link { font-size: 12.5px; }
.lib-table th[scope="row"] small { display: block; margin-top: 2px; font-weight: 400; color: var(--text-2); }
.pb .panel-head { flex-wrap: wrap; row-gap: 2px; }
.trainer-rules .panel-head { flex-wrap: wrap; gap: 6px 10px; }
.seed-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 12px; }
.seed-form .btn { white-space: normal; text-align: left; line-height: 1.3; padding-block: 8px; }
@media (max-width: 1240px) {
  .pb-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .feed.hyp-table td, .feed.hyp-table td:nth-child(2), .feed.hyp-table td:nth-child(3) { min-width: 0; max-width: none; }
  .rank-list { min-width: 0; }
  .figures.trainer-figures { grid-template-columns: minmax(0, 1fr); }
  .history-form .btn { flex: 1 1 100%; }
  .seed-form .btn { flex: 1 1 100%; justify-content: flex-start; }
  /* Recent objections: when and what followed side by side, the rest beneath. */
  .feed.labelled.occ-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; }
  .feed.labelled.occ-table td { grid-column: 1; }
  .feed.labelled.occ-table td:nth-child(5) { grid-column: 2; grid-row: 1 / span 2; text-align: right; }
  .feed.labelled.occ-table td:nth-child(1)::before, .feed.labelled.occ-table td:nth-child(5)::before { display: none; }
  /* The loop's health: each week one compact card, its numbers three to a row. */
  .feed.labelled.health-table tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 12px; }
  .feed.labelled.health-table tbody th { grid-column: 1 / -1; font-weight: 600; }
  .feed.labelled.health-table td:nth-last-child(2) { grid-column: span 2; }
  .feed.labelled.health-table td:last-child { grid-column: 1 / -1; }
}
/* Scoring and the Costs screen's new sections. Existing tokens and components; these only place them. */
.dec { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: 12.5px; white-space: nowrap; }
.dec .glyph { width: 14px; height: 14px; }
.dec-ok { color: var(--ok); }
.dec-needs { color: var(--signal); }
.dec-warn { color: var(--warn); }
.dec-bad { color: var(--bad); }
.dec-muted { color: var(--text-2); }
.feed td .dec + small, .feed td .dec ~ small { margin-top: 4px; }
.model-line { max-width: 100ch; margin: 4px 0 10px; color: var(--text-2); }
.model-line strong { color: var(--text); }
.volume, .needs-line { display: flex; gap: 8px; align-items: flex-start; max-width: 100ch; margin: 0 0 10px; padding: 10px 12px; background: var(--ground); border: 1px solid var(--rule); border-radius: var(--radius); font-size: 13px; color: var(--text-2); }
.volume .glyph, .needs-line .glyph { flex: none; margin-top: 2px; color: var(--text-2); }
.volume strong, .needs-line strong { color: var(--text); }
.needs-line { border-color: var(--signal-rule); }
.needs-line .glyph { color: var(--signal); }
.needs-line a { display: inline-flex; align-items: center; min-height: 44px; margin-left: 4px; }
.panel h3 { color: var(--text); font-size: 13.5px; }
.needs-table td:first-child { min-width: 240px; }
.needs-table td:last-child { min-width: 280px; }
.needs-table td:last-child small { max-width: 52ch; }
.weights { margin: 6px 0 4px; padding-left: 24px; display: flex; flex-direction: column; gap: 8px; max-width: 110ch; }
.weights li::marker { color: var(--text-3); font-variant-numeric: tabular-nums; }
.weights p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 0; }
.weights small { display: block; color: var(--text-2); margin-top: 2px; }
.odds { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.odds .glyph { width: 13px; height: 13px; }
.odds-up { color: var(--ok); }
.odds-down { color: var(--warn); }
.hours > summary, .revert > summary, .owner-form > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--signal); font-weight: 600; font-size: 13px; }
.hours table { margin-top: 4px; min-width: 260px; }
.revert { margin-top: 10px; }
.revert .inline-form { margin-top: 4px; }
.send-times td:first-child { min-width: 190px; }
.send-times td:nth-child(4) { min-width: 260px; }
.send-times td:nth-child(4) small { max-width: 48ch; }
.jump form.inline { margin-left: auto; }
.cost-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; margin: 16px 0; }
.cost-grid .panel { margin: 0; }
.pair { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 8px 0 10px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.pair div { padding: 8px 14px 9px; border-left: 1px solid var(--rule); min-width: 0; }
.pair div:first-child { border-left: 0; padding-left: 0; }
.pair dt { font-size: 12.5px; color: var(--text-2); }
.pair dd { margin: 3px 0 0; font: 600 20px/1.15 var(--display); font-variant-numeric: tabular-nums; color: var(--text); }
.pair dd small { display: block; margin-top: 3px; font: 12px/1.35 var(--font); color: var(--text-3); }
.forecast-panel[data-state="projected"], .forecast-panel[data-state="reached"] { border-color: var(--warn-rule); }
.forecast-panel[data-state="projected"] .cap-state .glyph, .forecast-panel[data-state="reached"] .cap-state .glyph, .forecast-panel[data-state="warned"] .cap-state .glyph { color: var(--warn); }
.forecast-panel[data-state="ok"] .cap-state .glyph { color: var(--ok); }
.baseline-words { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 4px; max-width: 90ch; }
.baseline-words .glyph { flex: none; margin-top: 3px; color: var(--text-2); }
.baseline-panel[data-state="down"] .baseline-words .glyph { color: var(--ok); }
.baseline-panel[data-state="up"] .baseline-words .glyph { color: var(--warn); }
.baseline-panel[data-state="up"] { border-color: var(--warn-rule); }
.tasks-table td:first-child { min-width: 260px; }
.tasks-table td:first-child small { max-width: 52ch; }
.tasks-table td:nth-child(2), .tasks-table td:nth-child(3) { min-width: 200px; }
.tasks-table td:nth-child(3) small { max-width: 44ch; }
.tasks-table td:nth-child(n+4) { white-space: nowrap; }
.feed td small.sens { display: flex; gap: 6px; align-items: flex-start; color: var(--text-2); }
.feed td small.sens .glyph { flex: none; width: 13px; height: 13px; margin-top: 1px; }
.feed td small.warn { color: var(--warn); }
.bench-word { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; }
.bench-word .glyph { width: 13px; height: 13px; }
.bench-passed { color: var(--ok); }
.bench-failed { color: var(--bad); }
.tasks-table td a, .send-times td a { display: inline-flex; align-items: center; min-height: 44px; }
.owner-form { margin-top: 10px; }
.owner-form .grid-form { margin-top: 4px; }
@media (max-width: 1240px) {
  .cost-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .pair { grid-template-columns: minmax(0, 1fr); }
  .pair div { border-left: 0; border-top: 1px solid var(--rule); padding: 8px 0; }
  .pair div:first-child { border-top: 0; }
  .needs-table td:first-child, .needs-table td:last-child, .send-times td:first-child, .send-times td:nth-child(4), .tasks-table td:first-child, .tasks-table td:nth-child(2), .tasks-table td:nth-child(3) { min-width: 0; }
  .tasks-table td:nth-child(n+4) { white-space: normal; }
  .jump form.inline { margin-left: 0; }
  .dec { white-space: normal; }
}

/* Go live (the installer's and owner's checklist) and Public site. */
.gl-band { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.gl-band.is-late { border-color: var(--warn-rule); }
.gl-count { margin: 0; font-family: var(--display); }
.gl-count strong { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.gl-count span { color: var(--text-2); font-size: 15px; }
.gl-clock { margin: 0; display: flex; gap: 8px; align-items: flex-start; color: var(--text-2); max-width: 80ch; }
.gl-band.is-late .gl-clock .glyph { color: var(--warn); margin-top: 2px; }
.gl-steps { list-style: none; margin: 0; padding: 0; background: var(--layer-1); border: 1px solid var(--rule); border-radius: 10px; }
.gl-step { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px 18px; border-top: 1px solid var(--rule); }
.gl-step:first-child { border-top: 0; }
.gl-n { margin: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 600 13px/1 var(--display); color: var(--text-2); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.gl-step.is-done .gl-n { color: var(--ok); border-color: var(--ok-rule); }
.gl-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; margin: 0 0 4px; }
.gl-title { font-size: 14.5px; }
.gl-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.gl-ok { color: var(--ok); }
.gl-wait { color: var(--text-2); }
.gl-evidence { color: var(--text-2); margin: 0 0 4px; max-width: 100ch; overflow-wrap: anywhere; }
.gl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin: 0; font-size: 12.5px; color: var(--text-3); }
.gl-meta a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.gl-foot { margin-top: 14px; max-width: 100ch; }
.site-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.site-grid .panel { margin: 0; }
.ps-switch.is-on { border-color: var(--ok-rule); }
.ps-state { display: flex; align-items: center; gap: 8px; margin: 4px 0 6px; font-size: 15px; }
.ps-on { color: var(--ok); }
.ps-off { color: var(--text-2); }
.ps-form { display: grid; gap: 12px; margin-top: 12px; max-width: 520px; }
.ps-form .btn { justify-self: start; }
.ps-warn { display: flex; gap: 8px; align-items: flex-start; color: var(--setup-text); background: var(--setup-ground); border: 1px solid var(--setup-rule); border-radius: var(--radius); padding: 10px 14px; margin: 8px 0 12px; }
.ps-warn .glyph { color: var(--warn); margin-top: 2px; }
.ps-agents summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--signal); font-weight: 600; }
.ps-agents ul { margin: 4px 0 0; padding-left: 18px; color: var(--text-2); columns: 2 320px; }
.ps-agents li { margin: 0 0 4px; break-inside: avoid; }
.ps-agents li strong { color: var(--text); }
@media (max-width: 1240px) {
  .site-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .gl-step { grid-template-columns: 32px minmax(0, 1fr); padding: 12px 14px; gap: 10px; }
}

/* ── My leads, a hand-off's brief, Hand-offs, Channels, deliverability control ── */
.lead-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.lead-grid .panel { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.lead-offer .panel-head h3 { margin: 0; font-size: 15px; }
.lead-offer .panel-head h3 a { display: inline-flex; align-items: center; min-height: 44px; }
.lead-why { margin: 0; }
.lead-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.presence .facts { margin-bottom: 10px; }
.panel-head.stack-head { flex-direction: column; align-items: flex-start; gap: 2px; }
.stack-head .cstat { white-space: normal; }
.ch-grid .panel-head { flex-wrap: wrap; row-gap: 2px; }
.ch-grid .panel-head h3 { margin: 0; }
.connections + .jump { margin-top: 12px; }
.ho-brief .panel-head h2 { font-size: 16px; }
.handoff-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.handoff-main .panel { margin: 0; }
.brief-facts { grid-template-columns: 9em minmax(0, 1fr); row-gap: 12px; }
.brief-facts dd small, .why-line small, .reach-line small, .q-line small { display: block; color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
.why-line, .reach-line, .q-line { display: block; margin-bottom: 6px; }
.why-line:last-child, .reach-line:last-child, .q-line:last-child { margin-bottom: 0; }
.never { margin: 0; padding-left: 18px; }
.never li { margin-bottom: 4px; color: var(--text-2); }
.said { list-style: none; margin: 8px 0 14px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.said li { padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--layer-2); }
.said li.said-lead { border-left: 3px solid var(--signal-rule); }
.said-head { margin: 0 0 4px; }
.said-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.offer-list, .notes { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.offer-list small, .notes small { display: block; color: var(--text-3); font-size: 12.5px; }
.notes p { margin: 0; white-space: pre-wrap; }
.figures.handoff-figures { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; align-items: start; margin: 12px 0 16px; }
.ch-grid .panel { margin: 0; }
.ch-grid .facts dd small, .ho-brief .facts dd small { display: block; color: var(--text-3); font-size: 12.5px; }
.ch-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 12px; align-items: end; margin-top: 12px; }
.ch-form > .btn { justify-self: start; }
.ch-form > label:has(input[name="reason"]) { grid-column: 1 / -1; }
.ch-form label.check { align-self: center; }
.closer-form { margin-top: 0; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); min-width: 520px; }
.result-form fieldset { display: flex; flex-direction: column; gap: 0; }
.control-table th small { display: block; color: var(--text-3); font-weight: 500; }
@media (max-width: 1240px) {
  .figures.handoff-figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .figures.handoff-figures { grid-template-columns: 1fr 1fr; }
  .lead-grid { grid-template-columns: minmax(0, 1fr); }
  .brief-facts, .presence .facts { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  .presence .facts dd { margin-bottom: 8px; }
  .brief-facts dd { margin-bottom: 10px; }
  .closer-form { min-width: 0; grid-template-columns: 1fr 1fr; }
  .ch-form { grid-template-columns: minmax(0, 1fr); }
  .ch-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Setup's sections (pack, leads and prices; your words and knowledge) and Leads. Existing tokens only. */
.setup-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.setup-nav.is-centred { max-width: 1120px; margin-left: auto; margin-right: auto; }
.setup-nav .btn, .periods .btn { min-height: 44px; display: inline-flex; align-items: center; }
.pack-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pack-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 12px 24px; padding: 14px 0; border-top: 1px solid var(--rule); }
.pack-row:first-child { border-top: 0; }
.pack-row h3 { margin: 0 0 4px; font-size: 15px; color: var(--text); }
.pack-row p { margin: 4px 0; }
.pack-row .draft-note { margin: 8px 0; }
.pack-row.is-current { box-shadow: inset 3px 0 0 var(--signal); padding-left: 14px; }
.pack-do .field input { width: 100%; }
fieldset.choices, fieldset.handoff-rule { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
fieldset.choices legend, fieldset.handoff-rule legend { padding: 0; margin-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--text); }
fieldset.choices .choice { align-items: flex-start; min-height: 44px; border-top: 1px solid var(--rule); }
fieldset.choices .choice:first-of-type { border-top: 0; }
fieldset.choices .choice input { margin-top: 3px; flex: none; }
fieldset.choices .choice small { color: var(--text-2); max-width: 80ch; }
fieldset.handoff-rule { gap: 10px; padding-top: 4px; }
fieldset.handoff-rule small { font-size: 12px; color: var(--text-3); }
.conn-form, .price-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); max-width: 900px; }
.conn-form code, .sub-note code { font: 12.5px var(--mono); color: var(--text); overflow-wrap: anywhere; }
.words-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; margin-bottom: 14px; }
.words-grid .panel { margin: 0; min-width: 0; }
.words-grid h3 { margin: 16px 0 6px; font-size: 13px; color: var(--text-2); }
.words-grid .msg-subject { margin: 0 0 8px; overflow-wrap: anywhere; }
.words-grid textarea { width: 100%; resize: vertical; }
.tried { padding: 12px; margin-bottom: 14px; border: 1px solid var(--signal-rule); border-radius: var(--radius); }
.tried h3 { margin-top: 0; }
.facts.lines { grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); font-size: 13px; }
.sources-note { color: var(--text-2); }
.sources-note strong { color: var(--text); }
.leads-table th[scope="row"] small, .leads-table td small { display: block; margin-top: 2px; font-weight: 400; }
@media (max-width: 860px) {
  .pack-row, .words-grid { grid-template-columns: minmax(0, 1fr); }
}

.pack-version { padding: 10px 12px; border: 1px solid var(--signal-rule); border-radius: var(--radius); font-size: 13px; color: var(--text-2); }
.pack-version p { margin: 0 0 6px; }
.pack-version strong { color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pack-what, .pack-do { min-width: 0; }
.leads-table .row-actions .inline { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
@media (max-width: 720px) {
  .facts.caps, .facts.lines { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .facts.caps dd, .facts.lines dd { margin-bottom: 8px; }
  .leads-table .row-actions { white-space: normal; }
  .words-grid .msg-body { font-size: 13px; }
  .conn-form code { word-break: break-all; }
}

/* The webhook's outbound queue, money in other currencies, hours by country, and a lead's own time. */
.deliveries-table th[scope="row"] small, .deliveries-table td small { display: block; margin-top: 2px; font-weight: 400; color: var(--text-2); }
.deliveries-table td { overflow-wrap: anywhere; }
.deliveries-table tr.tone-bad { background: rgba(255, 138, 138, 0.06); }
.rates-table td { overflow-wrap: anywhere; }
.fx-outside { list-style: none; padding-left: 0; }
.fx-outside li { margin: 0 0 10px; }
.fx-outside small { display: block; margin: 2px 0 0 24px; color: var(--text-2); max-width: 75ch; }
.fx-form, .hours-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); max-width: 900px; }
.hours-form textarea { width: 100%; resize: vertical; font: 13px var(--mono); }
.zone-codes { font: 12.5px var(--mono); letter-spacing: 0.02em; overflow-wrap: anywhere; max-width: 90ch; }
.zone-note { display: flex; gap: 10px; align-items: flex-start; border-color: rgba(232, 176, 78, 0.55); color: var(--text-2); }
.zone-note .glyph { margin-top: 3px; flex: none; color: var(--warn); }
.zone-note strong { color: var(--text); }
.leads-table td small.zone-unknown { color: var(--warn); }
.words-grid .panel .grid-form.tight { margin-bottom: 4px; }
@media (max-width: 720px) {
  .facts.narrow-stack { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .facts.narrow-stack dd { margin-bottom: 8px; }
}
.zone-list { margin-top: 14px; }
.leads-table td:nth-child(3) { min-width: 210px; }
.leads-table td.row-actions { white-space: nowrap; width: 1%; }
.leads-table .row-actions .inline { flex-wrap: nowrap; }
.table-wrap + .words-grid { margin-top: 14px; }
.words-grid .grid-form.tight { align-items: start; }
@media (max-width: 720px) {
  .leads-table td:nth-child(3) { min-width: 0; }
  .leads-table td.row-actions { white-space: normal; width: auto; }
  .leads-table .row-actions .inline { flex-wrap: wrap; }
}

/* A fixed word that only the owner may change says so under its words. */
.owner-only { margin: 12px 0 0; color: var(--text-2); max-width: 90ch; }

/* Long tables and lists fold (app.js): the button that shows the rest. */
.fold-more { display: inline-flex; margin: 10px 0 4px; }
[hidden] { display: none !important; }
/* A long block of fixed text (an agent's instructions, a lead's history) scrolls inside itself. */
pre.msg-body, pre.instructions, .ag-instructions pre { max-height: 420px; overflow: auto; }
@media (max-width: 720px) {
  /* A card made from a table row never scrolls sideways: its words wrap. */
  .feed.labelled td, .feed.labelled th { overflow-wrap: anywhere; white-space: normal; }
  .feed.labelled td small, .feed.labelled th small { white-space: normal; overflow-wrap: anywhere; }
  .table-wrap:has(> .feed.labelled) { overflow-x: visible; }
  pre.msg-body, pre.instructions, .ag-instructions pre { max-height: 300px; }
  .ap-form textarea { max-height: 260px; }
}
@media (max-width: 720px) {
  /* In a card made from a table row, a number, an amount or a time sits on one line beside its label. */
  .feed.labelled td.t-num, .feed.labelled td.t-cost, .feed.labelled td.t-time { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 2px 0; text-align: right; white-space: normal; }
  .feed.labelled td.t-num::before, .feed.labelled td.t-cost::before, .feed.labelled td.t-time::before { margin-right: auto; text-align: left; }
  .feed.labelled td.t-num small, .feed.labelled td.t-cost small, .feed.labelled td.t-time small { display: inline; margin: 0; }
  .feed.labelled tbody tr { padding: 12px 14px; }
  .feed.labelled tbody th { font-size: 14px; padding-bottom: 6px; }
}
.dim { color: var(--text-2); font-weight: 400; }
small.block { display: block; margin-top: 2px; }
.feed tbody th small { display: block; margin-top: 2px; font-weight: 400; color: var(--text-2); }
@media (max-width: 720px) {
  /* A card's label sits on the same line as its value, so a card is half as tall. */
  .feed.labelled td::before { display: inline; margin-right: 6px; font-size: 12.5px; }
  .feed.labelled td[data-label]:not([data-label=""])::before { content: attr(data-label) ":"; }
  .feed.labelled td.t-num::before, .feed.labelled td.t-cost::before, .feed.labelled td.t-time::before { content: attr(data-label); }
  /* A cell that only holds a button or a form needs no label. */
  .feed.labelled td:has(> form:first-child)::before, .feed.labelled td:has(> .btn:first-child)::before, .feed.labelled td:has(> details:first-child)::before { display: none; }
  .feed.labelled td > form:first-child, .feed.labelled td > .btn:first-child { margin-top: 6px; }
  /* The header's row of screens scrolls sideways: a fade at its edge says so. */
  .nav { -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 28px), transparent 100%); mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 28px), transparent 100%); }
}
@media (max-width: 720px) {
  /* The test bench line under a proposal: its link stays in the sentence. */
  .bench { align-items: flex-start !important; }
  .bench a { display: inline; min-height: 0; padding: 4px 0; }
}
@media (max-width: 720px) {
  /* A list of facts stacks on a phone: the label above its value, never a squeezed second column. */
  .facts { grid-template-columns: minmax(0, 1fr); gap: 2px 0; }
  .facts dt { margin-top: 8px; font-size: 13px; }
  /* Number cards made from wide tables: one figure a line. */
  .feed.labelled.num-table tbody tr { display: block; }
}
@media (max-width: 720px) {
  /* The loop's weeks: one figure a line, like every other card. */
  .feed.labelled.health-table tbody tr { display: block; }
}
.inline-rec { display: inline-flex; align-items: center; gap: 6px; vertical-align: baseline; }
.inline-rec .glyph, .inline-rec svg { display: inline-block; flex: none; }
.day-boxes { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; padding: 0; border: 0; flex: 1 1 100%; min-width: min(100%, 420px); grid-column: 1 / -1; }
.day-boxes label.check { flex: 0 0 auto; width: auto; margin: 0; }
.day-boxes legend { padding: 0; margin-bottom: 4px; font-size: 13px; color: var(--text-2); }
.day-boxes label.check { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; }

/* Setup, Sending: the button under the mailboxes. */
.sending-actions { margin: 12px 0 8px; }

/* Setup, Finding leads: the sources, each with a sentence that wraps. */
.lead-sources th[scope="row"] { white-space: normal; min-width: 280px; }
.lead-sources th[scope="row"] small { display: block; white-space: normal; max-width: 68ch; }
.lead-sources td { vertical-align: top; }
.lead-sources td small { display: block; white-space: normal; max-width: 44ch; }
.lead-form > p { grid-column: 1 / -1; }
