/*
 * Meticulous Hub — baseline styles. Mirrors the pitch-dashboard aesthetic;
 * dashboard-specific styles live alongside each view in their own files.
 */

/* Faraon, self-hosted as on meticulous.com, for major headlines. Gotham SSm,
   Gotham XNarrow and Operator Mono come from Hub's Cloud.typography project,
   linked in the layout head (PRD A 4.4). */
@font-face {
  font-family: "Faraon";
  src: url("/assets/Faraon-Regular-c33199fe.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Faraon";
  src: url("/assets/Faraon-Light-ba069ac5.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Faraon";
  src: url("/assets/Faraon-RegularIt-3554d2bf.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* Metric-tuned fallback so headings keep their box while Faraon loads.
   Faraon's hhea table gives ascent 960 and descent 240 at 1000 upm: 96% and
   24%, divided by the 108% size-adjust that brings Georgia to Faraon's width. */
@font-face {
  font-family: "Faraon Fallback";
  src: local("Georgia");
  size-adjust: 108%;
  ascent-override: 89%;
  descent-override: 22%;
  line-gap-override: 0%;
}

/* Dark only (PRD A 4.3). The names are the ones the views already use, so
   their markup takes the new colours unchanged. Paper holds the same values
   as --v2-* (docs/prds/mocks/v2/tokens.json). */
:root {
  color-scheme: dark;
  --bg: #141413;
  --surface: #1b1b1a;
  --panel: #232322;
  --panel-strong: #2e2e2c;
  --hover: #2a2a28;
  /* A hairline, never the only boundary of a control: that is --line-strong. */
  --line: #2e2e2c;
  --line-strong: #7e7e7a;
  --border: var(--line-strong);
  --input-bg: var(--panel);
  --fg: #ecebe8;
  --muted: #b3b1ad;
  --faint: #9a988f;
  --link: #e3b15c;
  --accent: #e3b15c;
  --accent-hover: #e8bd74;
  /* Too faint to carry state alone: always paired with an accent bar. */
  --accent-soft: #2c2618;
  --accent-contrast: #141413;
  --button-bg: transparent;
  --button-fg: #b3b1ad;
  /* The primary button's fill (PRD A step 4a). */
  --button-primary-bg: #e3b15c;
  --button-primary-fg: #141413;
  --warning: #e08a4f;
  --warning-soft: #31251b;
  --good: #6fb57c;
  --good-soft: #212b22;
  --danger: #e58075;
  --danger-soft: #312321;
  --shadow: rgba(0, 0, 0, .5);
  /* Behind a modal, a sheet or the navigation drawer (appendix components.md
     1.3), and the content drawer's lighter one (appendix shell.md, resolved 9). */
  --scrim: rgba(0, 0, 0, .55);
  --scrim-light: rgba(0, 0, 0, .35);
  /* The view bar, and the phone's top bar in its place: what sticky things
     inside a page stick under. */
  --viewbar-h: 52px;
  /* Content's distance from the shell: 24px, 16px on a phone (PRD A 4.1). */
  --gutter: 24px;

  /* Gotham SSm comes in 400, 500 and 700 only, so no rule asks for a weight
     between them: the browser would round it to the next face up. */
  --font-sans: "Gotham SSm A", "Gotham SSm B", "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Gotham XNarrow A", "Gotham XNarrow B", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --font-headline: "Faraon", "Faraon Fallback", "Iowan Old Style", Georgia, serif;
  --font-mono: "Operator Mono A", "Operator Mono B", Menlo, ui-monospace, monospace;
}

* { box-sizing: border-box; }

/* Every interactive element, on keyboard focus only (PRD A 4.3). */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Controls take the UA's system font otherwise, whatever the body says. */
button, input, select, textarea { font-family: inherit; }

/* Naming a family switches off the UA's shrink for a bare `monospace`, so
   the size comes back down by hand. `code` and `pre` set their own below. */
kbd, samp {
  font-family: var(--font-mono);
  font-size: .875em;
}

body {
  font: 14px/1.5 var(--font-sans);
  margin: 0;
  color: var(--fg);
  background: var(--bg);
}

/* A7a (#153): the title treatment, Faraon Regular at 28px (PRD A 4.4), on
   every page's and record's h1 and the Auth headline alike, so PRD C's titles
   need no class of their own. Regular only: Faraon has no bold, and a bold
   one would be faked. The view bar's crumb is a 14px Gotham line, not this. */
h1 {
  margin: 0 0 4px;
  font-family: var(--font-headline);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  /* A name with no break in it, a domain or a host, wraps rather than
     pushing a phone's page sideways. */
  overflow-wrap: anywhere;
}
/* A redesigned view's title is the bar's own line, an h1 for the outline
   (ViewBarComponent and MobileTopBarComponent `heading: true`): 14px or
   16px Gotham, which their rules size, not a Faraon title. */
.view-bar__title, .top-bar__heading {
  font-family: var(--font-sans);
  overflow-wrap: normal;
}
/* End A7a title treatment. */
h2 {
  margin: 26px 0 8px;
  font-size: 16px;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 4px;
}
h2 .n { color: var(--faint); font-weight: 400; font-size: 13px; }

p { margin: 0 0 12px; }
p.sub, .muted { color: var(--muted); font-size: 13px; }
p.empty, .empty { color: var(--faint); font-style: italic; margin: 4px 0 0; }

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
/* A link inside running text is underlined: gold against body text is 1.64:1,
   so colour alone can't mark it (WCAG 1.4.1, PRD A 4.3). Kept at element
   weight on purpose, :where included, so a link class that sets its own
   text-decoration (nav, tab, button, card, rail item) wins. Table cells are
   left out, since a link there is the row's action. */
:is(p, li, dd, blockquote) a,
:where(.note-body, .narrative-body) a { text-decoration: underline; }
.hubspot-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.hubspot-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 16px;
  padding: 0 4px;
  border-radius: 4px;
  background: var(--warning);
  /* Dark text on the warning fill: 6.9:1. */
  color: var(--accent-contrast);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--warning));
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Off screen until focused, then over the shell's top-left corner. Main
   takes focus from it (tabindex -1) without drawing a ring round the page. */
.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--panel);
  color: var(--fg);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
main:focus { outline: none; }

code {
  font-family: var(--font-mono);
  background: var(--panel);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 12px;
}
pre {
  font-family: var(--font-mono);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
}

table { border-collapse: collapse; width: 100%; margin: 6px 0 4px; }
th, td {
  text-align: left;
  padding: 5px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
th {
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
/* On a phone the cells give back some gutter: 12px a column is the
   difference between a narrow table fitting and pushing the page sideways,
   and Gotham SSm sets wider than the system face did. */
@media (width < 768px) {
  th, td { padding-inline: 6px; }
}

.cards { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 24px; }
.card {
  background: var(--panel);
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 118px;
}
.card .big { font-size: 24px; font-weight: 700; }
.card .lbl { color: var(--muted); font-size: 12px; }
.score {
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
}
.score-high {
  background: var(--good-soft);
  color: var(--good);
  border: 1px solid color-mix(in srgb, var(--good) 35%, var(--good-soft));
}
.score-medium {
  background: var(--warning-soft);
  color: var(--warning);
  border: 1px solid color-mix(in srgb, var(--warning) 45%, var(--warning-soft));
}


.foot {
  color: var(--faint);
  font-size: 12px;
  margin-top: 30px;
  border-top: 1px solid var(--line-strong);
  padding-top: 10px;
}

.small { font-size: 12px; }

/* Layout (PRD A 6.2): content fills the width beside the sidebar, at a 24px
   gutter, 16px on a phone. Forms keep their caps, left-aligned; reading text
   caps at 640px. */
main {
  display: block;
  padding: var(--gutter);
}
/* A page laid out as panes (data-layout="panes", Today's queue beside its
   work pane) runs them edge to edge from the sidebar; each pane keeps its
   own inner padding. The shell layout sweep checks this. */
main:has(> [data-layout="panes"]) { padding: 0; }
/* Until its redesign lands, a screen keeps the old 1100px column, left-aligned,
   so its tables don't stretch to 1440 with no lanes in them. */
main.legacy { max-width: 1100px; }
/* Reading text's cap (PRD A 4.1): .reading for a page's prose, and the
   timeline's messages, which are prose too. */
.reading, .timeline__content { max-width: 640px; }

.page-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.compact-actions {
  margin-top: 0;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.split-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.wide-form {
  max-width: 820px;
}
.inline-panel {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface);
  margin: 10px 0 18px;
}
.inline-panel summary {
  cursor: pointer;
  color: var(--fg);
  font-weight: 500;
}

/* A button that reads as a link: no UA button face under its text. */
.linklike {
  background: none;
  border: 0;
  padding: 0;
  color: var(--link);
  font: inherit;
  cursor: pointer;
}
.linklike.small { font-size: 12px; }
/* A destructive action: Delete, Remove, Disconnect, Disable. */
.linklike.danger { color: var(--danger); }


/* Auth card */
.auth-card {
  max-width: 380px;
  margin: 80px auto;
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
}
.auth-card h1 { margin: 0 0 6px; }
.auth-card .sub { margin: 0 0 18px; }
.auth-card label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.auth-card input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  margin-bottom: 14px;
  background: var(--input-bg);
  color: var(--fg);
}
/* The OAuth consent screen: the auth card, widened enough for a sentence about
   what the app is about to be allowed to do. */
.consent-card { max-width: 460px; }
.auth-card .auth-action { margin: 8px 0; }
.auth-card .auth-foot { margin-top: 20px; }
.consent-scopes {
  margin: 0 0 18px;
  padding: 14px 14px 14px 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  font-size: 13px;
}
.consent-scopes li + li { margin-top: 6px; }
.consent-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}
.consent-actions form { display: inline-flex; margin: 0; }
/* Secondary by default: a transparent fill needs the --line-strong border to
   show where the button is. Padding is 1px smaller to absorb the border, so
   the button keeps its size. */
.btn {
  display: inline-block;
  background: var(--button-bg);
  color: var(--button-fg);
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}
.btn:hover { background: var(--hover); color: var(--fg); }
/* The card-corner variant: same button, sized so it doesn't outweigh the
   heading it sits beside. Long used in the pitch cards; it never had a rule. */
.btn-small {
  padding: 5px 10px;
  font-size: 12px;
}

/* CFP urgency cues in conferences table */
.cfp-soon   { color: var(--danger); font-weight: 500; }

/* Cards that are themselves links */
.card-link { text-decoration: none; color: inherit; }
.card-link:hover .card { background: var(--hover); }

/* Inline action button (link-style). The --line-strong border is its edge
   inside a card, where --panel is the card's own colour; padding is 1px
   smaller to absorb it. */
.btn-inline {
  display: inline-block;
  background: var(--panel);
  color: var(--fg);
  padding: 5px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
}
.btn-inline:hover { background: var(--hover); text-decoration: none; }

/* Stacked form (for agent creation) */
/* The app-wide form rules below style every control in their container.
   They skip the A4b form-field components (:not(:where(...)) adds no
   specificity), so a component looks the same inside one as outside it and
   these forms look as they did. */
.stacked-form {
  max-width: 480px;
  margin-top: 20px;
}
.stacked-form label:not(:where(.field__label, .toggle, .checkbox)) {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0 4px;
}
.stacked-form input[type="text"]:not(:where(.input, .search-picker__input)) {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--fg);
}
.stacked-form input[type="datetime-local"]:not(:where(.input, .search-picker__input)),
.stacked-form select:not(:where(.input, .search-picker__input)),
.stacked-form textarea:not(:where(.input, .search-picker__input)) {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--fg);
}
.stacked-form textarea:not(:where(.input, .search-picker__input)) { min-height: 120px; resize: vertical; }
.form-actions { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }


/* Grid of small form fields */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.form-grid > div { display: flex; flex-direction: column; }
.form-grid label:not(:where(.field__label, .toggle, .checkbox)) { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.form-grid input[type="text"]:not(:where(.input, .search-picker__input)),
.form-grid input[type="email"]:not(:where(.input, .search-picker__input)),
.form-grid input[type="url"]:not(:where(.input, .search-picker__input)),
.form-grid input[type="number"]:not(:where(.input, .search-picker__input)),
.form-grid input[type="date"]:not(:where(.input, .search-picker__input)),
.form-grid textarea:not(:where(.input, .search-picker__input)),
.form-grid select:not(:where(.input, .search-picker__input)) {
  width: 100%;
  padding: 6px 8px;
  font-size: 13px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--input-bg);
  color: var(--fg);
}

@media (width < 768px) {
  .page-header,
  .split-heading { display: block; }
  .compact-actions { justify-content: flex-start; margin-top: 12px; }
}

/* Mark replied asking who and how, in place of its button. Wraps, because it
   carries a picker and a button and can land in a narrow cell. */
.mark-replied-picker {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  white-space: normal;
}

/* Urgent overview cards (red emphasis when non-zero) */
.card-urgent { background: var(--danger-soft); border: 1px solid var(--line-strong); }
.card-urgent .big { color: var(--danger); }

/* Manual-override lock banner on pitch detail page */
.lock-banner {
  background: color-mix(in srgb, var(--warning) 22%, var(--surface));
  border: 1px solid var(--line-strong);
  border-left-width: 4px;
  border-radius: 4px;
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 13px;
}

.run-block {
  border-top: 1px solid var(--line-strong);
  padding-top: 12px;
  margin-top: 18px;
}
.run-block h3 {
  font-size: 14px;
  margin: 0 0 4px;
}

/* Workflow console */
.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.work-list,
.candidate-list {
  display: grid;
  gap: 10px;
}
.work-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.work-title {
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.lock-banner-action {
  display: inline;
  margin-left: 10px;
}
.row-action { margin-top: 4px; }
.frontmatter-pre {
  background: var(--panel);
  padding: 12px;
  border-radius: 6px;
  font-size: 11px;
  max-height: 300px;
  overflow: auto;
}
.btn-row form {
  display: inline-flex;
  margin: 0;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 2px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}
/* Warm rather than neutral: a prior-contact pill is good news sitting in a row
   of status pills, and it should not read like one more state. */
.prior-contact {
  border-color: var(--good);
  color: var(--good);
  background: var(--good-soft);
}

/* ── Pitch workspace ──────────────────────────────────────────────────────
   Edge to edge of main: a header band that never leaves, a sticky tab strip,
   and one panel at a time. Every panel is in the document on every request — closed
   ones are hidden, never withheld — so Turbo broadcasts, in-page anchors and
   Cmd-F all keep working regardless of which tab is open. */
main > :is(.workspace-band, .workspace-tabs, .workspace) { margin-inline: calc(-1 * var(--gutter)); }
main > .workspace-band:first-child { margin-top: calc(-1 * var(--gutter)); }
.workspace-band,
.workspace-tabs,
.workspace-panels { padding-inline: var(--gutter); }
.workspace-band {
  padding-top: 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line-strong);
}

.workspace-tabs {
  position: sticky;
  top: var(--viewbar-h);
  z-index: 5;
  background: var(--surface);
}

/* A list of rows to review: the Today queue, a person's suggestions, the
   LinkedIn import. */
.review-rows {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
/* The last thing either side said, under a Nurture check-in. */
.nurture-excerpt { margin: 6px 0; padding-left: 10px; border-left: 2px solid var(--line-strong); }
.nurture-excerpt blockquote { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.nurture-excerpt figcaption { margin-top: 2px; }
/* A live page, loaded on press beside a story or a piece of evidence. */
.review-live-frame iframe {
  width: 100%;
  height: 60vh;
  margin-top: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel);
}

.workspace-panels { padding-block: 20px 60px; }
.workspace-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  align-items: start;
}
/* One card class for the whole workspace, whether the contents were written for
   it or relocated into it. A relocated partial brings its own .inline-panel box
   and its own page-scale <h2>; both are neutralised here so every card in the
   grid has one border and one heading size. */
.workspace-card {
  min-width: 0;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}
.workspace-card-wide { grid-column: 1 / -1; }
.workspace-card h2 {
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  font-size: 15px;
}
.workspace-card > .inline-panel {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
}
.workspace-card > :first-child,
.workspace-card > section > :first-child,
.workspace-card > details > :first-child { margin-top: 0; }
/* Anchored cards sit under the view bar and the sticky tab bar; land below
   both, not behind them. */
.workspace-panels [id] { scroll-margin-top: calc(var(--viewbar-h) + 58px); }
/* A heading and its button share a card a third of the screen wide. The heading
   text shrinks and wraps; the button keeps its size and stays in the corner,
   rather than being pushed onto a line of its own halfway down the card. The
   only-child guard matters: with one child both rules would match it, and the
   later `flex: none` would stop the heading wrapping at all.
   (Under 760px the global rule stacks them properly.) */
.workspace-grid .split-heading > :first-child:not(:only-child) {
  flex: 1 1 0;
  min-width: 0;
}
.workspace-grid .split-heading > :last-child:not(:only-child) { flex: none; }
.workspace-grid .split-heading .btn,
.workspace-grid .split-heading .btn-inline { white-space: nowrap; }

/* A card that arrives on its own is still a card: the frame is the grid child,
   and an unknown element lays out inline unless it is told otherwise. */
.workspace-grid > turbo-frame { display: block; }

.digest-list,
.fact-list,
.note-list,
.path-list {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}
.digest-list li,
.path-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.digest-list li:last-child,
.path-list li:last-child { border-bottom: 0; }
.digest-list .status-pill,
.path-list .status-pill { margin-right: 6px; }
.digest-list p,
.path-list p { margin: 4px 0 0; }

/* The suggestion, and it has to read as one: a rule down the side rather than
   a filled box, so a machine's opinion about a status never looks like the
   status. */
.digest-nudge {
  margin: 8px 0 0;
  padding: 6px 0 6px 10px;
  border-left: 2px solid var(--line);
  font-size: 13px;
}
.digest-nudge .linklike { margin-left: 4px; }

.fact {
  display: flex;
  gap: 8px;
  padding: 5px 0;
  font-size: 13px;
}

.note-list { margin-top: 14px; }
.note-form { display: grid; gap: 12px; }
.note-form__submit { justify-self: end; }
.note { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.note__meta { margin: 0; color: var(--faint); font-size: 12px; }
.note-body { color: var(--fg); font-size: 14px; line-height: 21px; }
.note:last-child { border-bottom: 0; }
.note-body p { margin: 0 0 6px; }
.note-body p:last-child { margin-bottom: 0; }
/* Markdown, wherever render_markdown puts it. A page h2 draws a full-width
   section rule, which is a strange thing to find inside a list item, a page h1
   is the record's own Faraon title, and the browser's 40px list indent is too
   much for a card. */
.markdown :is(h1, h2, h3, h4, h5, h6) {
  margin: 10px 0 4px;
  font-family: inherit;
  line-height: inherit;
  font-size: 14px;
  font-weight: 500;
  border: 0;
  padding: 0;
}
.note-body :is(ul, ol),
.narrative-body :is(ul, ol) { margin: 6px 0; padding-left: 18px; }
.note-body blockquote,
.narrative-body blockquote {
  margin: 6px 0;
  padding-left: 10px;
  border-left: 2px solid var(--line);
  color: var(--faint);
}
.narrative-body { margin: 8px 0; }
.narrative-body p:last-child { margin-bottom: 0; }

/* Twenty years of correspondence is twenty of these, so they wrap along a line
   rather than stacking into a table of dates nobody reads down. */
.year-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  font-size: 13px;
}
.year-counts .lbl {
  margin-right: 5px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

@media (width < 1280px) {
  .work-row {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

/* Contact row actions: Edit / Reject / Delete stacked in one cell */
.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
.contact-actions form { margin: 0; }

/* The generated draft, wherever it is mounted: the workspace outreach plan and
   /today's draft queue render the same partial, so it is styled once. Boxed and
   indented because it is a proposal sitting inside a queue row, not the row. */
.attempt-draft {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-left: 2px solid var(--line-strong);
  background: var(--panel);
}
.attempt-draft > * + * { margin-top: 6px; }
/* The draft reads as the email it is: preserved line breaks, wrapped rather
   than scrolled, in the page's own face — a monospace draft is a draft nobody
   can judge the tone of. */
.draft-prose {
  margin: 4px 0 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 13px;
}
.draft-claims h3 {
  margin: 0;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---- Shell components (PRD A 4.1, 4.5; appendix shell.md, components.md) ----
   Built as ViewComponents in app/components, previewed in Lookbook. */

.icon {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kbd {
  font: 12px/16px var(--font-mono);
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 2px 6px;
}
.kbd--bare {
  color: var(--faint);
  border: 0;
  padding: 0;
}

.section-label {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--faint);
}

/* A sidebar group: its label, then its items 2px apart. */
.nav-group > .section-label { padding: 0 10px 6px; }
.nav-group__items {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The nav item. The wrapper positions the rail's tooltip beside the control. */
.nav-item { position: relative; }
.nav-item__form { margin: 0; }
.nav-item__link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  line-height: 18px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.nav-item__link:hover {
  background: var(--hover);
  color: var(--fg);
  text-decoration: none;
}
.nav-item__label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Counts, the alert and the shortcut hint share one lane, so they line up. */
.nav-item__trailing {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 48px;
  flex: none;
  font-size: 12px;
  line-height: 16px;
}
.nav-item__count { color: var(--faint); }
/* The dot is drawn, not marked up: the explanation beside it is what a
   screen reader hears. */
.nav-item__alert::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: var(--warning);
}
.nav-item__alert .nav-item__count { color: var(--warning); }

/* The active item is whichever link says aria-current="page", so the shell's
   permanent sidebar marks a new one by moving that attribute alone. The tint
   is too faint to carry state by itself: the bar and the attribute do. */
.nav-item__link[aria-current="page"] {
  background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--accent);
  color: var(--fg);
  font-weight: 500;
}
.nav-item__link[aria-current="page"] .icon { color: var(--accent); }
.nav-item__link[aria-current="page"] .nav-item__count {
  color: var(--accent);
  font-weight: 500;
}

.nav-item--faint .nav-item__link {
  color: var(--faint);
  font-size: 13px;
  line-height: 16px;
}
/* The Jump to field (appendix shell.md 1, block 2): drawn as a search box,
   though it is a button that opens Jump to. In the rail it is the icon. */
.nav-item--field .nav-item__link {
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--faint);
  font-size: 13px;
  line-height: 16px;
}
.nav-item--field .nav-item__link .icon { width: 14px; height: 14px; }

/* Collapsed into the rail: a 40px icon. The label and count leave the screen,
   not the accessibility tree (PRD A 4.1). An item is a container, and any
   item too narrow for its label draws as an icon, so whatever narrows the
   sidebar collapses every item with it: .sidebar--rail, or the rail the
   shell defaults to between 768 and 1279. */
.nav-item { container: nav-item / inline-size; }
.sidebar--rail .nav-item { width: 40px; }
@container nav-item (width < 100px) {
  .nav-item__link {
    position: relative;
    justify-content: center;
    padding: 0;
  }
  /* Out of the flow, so the icon stays centred; the alert's dot is drawn
     against the item's corner. */
  .nav-item__trailing {
    position: absolute;
    inset: 0;
    width: auto;
  }
  :is(.nav-item__label, .nav-item__trailing > *, .kbd) {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .nav-item__alert::before {
    position: absolute;
    top: 6px;
    right: 8px;
  }
}

/* On keyboard focus and, where there is a pointer to hover with, on hover,
   until Escape (WCAG 1.4.13). Not on a click's focus: the sidebar stays on
   the page, and a tooltip left by a click would stay with it. The bridge
   spans the 8px gap, so the pointer can cross onto the tooltip. */
.nav-item__tooltip {
  display: none;
  position: absolute;
  top: 2px;
  left: 48px;
  z-index: 10;
  height: 28px;
  padding: 0 10px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel);
  color: var(--fg);
  font-size: 13px;
  line-height: 16px;
  white-space: nowrap;
}
.nav-item__tooltip::before {
  content: "";
  position: absolute;
  inset: -1px 100% -1px auto;
  width: 9px;
}
@container nav-item (width < 100px) {
  .nav-item:has(:focus-visible):not([data-tooltip-dismissed]) .nav-item__tooltip { display: flex; }
}
@media (hover: hover) {
  @container nav-item (width < 100px) {
    .nav-item:hover:not([data-tooltip-dismissed]) .nav-item__tooltip { display: flex; }
  }
}

.view-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 52px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.view-bar__crumbs {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1;
  min-width: 0;
  margin: 0;
  white-space: nowrap;
}
.view-bar__section,
.view-bar__separator {
  color: var(--faint);
  font-size: 13px;
  line-height: 16px;
}
/* A breadcrumb, not running text: it underlines on hover like the nav. */
a.view-bar__section { text-decoration: none; }
a.view-bar__section:hover { color: var(--fg); text-decoration: underline; }
.view-bar__title {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--fg);
  font-size: 14px;
  line-height: 18px;
  font-weight: 500;
}
.view-bar__stats {
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.view-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.top-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 12px;
  /* The hairline is a shadow, not a border, so the 36px buttons centre on a
     whole pixel in the 52px bar. */
  box-shadow: inset 0 -1px var(--line);
  background: var(--surface);
}
.top-bar__title {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
  margin: 0;
}
.top-bar__section {
  color: var(--faint);
  font-size: 12px;
  line-height: 16px;
}
.top-bar__heading {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--fg);
  font-size: 16px;
  line-height: 20px;
  font-weight: 500;
}
/* Drawn at 36px, hit at 44px (PRD A 4.5): the ::after takes the taps. */
.top-bar__button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.top-bar__button:hover { background: var(--panel); }
.top-bar__button::after {
  content: "";
  position: absolute;
  /* Sized outright, centred on the button, so its border can't skew it. */
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  translate: -50% -50%;
}
.top-bar__button--bordered {
  border-color: var(--line-strong);
  color: var(--fg);
}
.top-bar__button--primary {
  background: var(--button-primary-bg);
  color: var(--button-primary-fg);
}
.top-bar__button--primary:hover { background: var(--accent-hover); }
/* No box of its own: the button's 44px hit area reaches past its 36px, and
   a form around it would only be the thing it spilled out of. */
.top-bar__form { display: contents; }

/* The dialog primitive. The browser centres a dialog in the top layer; the
   variant decides where it sits. The panel draws, the dialog is the hit area
   behind it. */
.dialog {
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fg);
}
.dialog::backdrop { background: var(--scrim); }
/* A plain box, as the dialog primitive's own preview draws it. The modal,
   drawer and sheet are OverlayComponent's, in the A4d block. */
.dialog__panel {
  width: min(440px, 100vw - 32px);
  height: 100%;
  max-height: calc(100dvh - 32px);
  padding: 18px 20px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 16px 48px var(--shadow);
}
html:has(dialog:modal) { overflow: hidden; }
/* Space for the scrollbar is kept whether or not there is one, so locking the
   scroll when a dialog opens doesn't slide the page sideways. */
html { scrollbar-gutter: stable; }

.nav-drawer {
  inset: 0 auto 0 0;
  width: 296px;
  /* Of the window less its scrollbar gutter, where 100vw would count it. */
  max-width: calc(100% - 16px);
  height: 100dvh;
  max-height: none;
  margin: 0;
}
.nav-drawer .dialog__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: auto;
  max-height: none;
  padding: 14px 10px;
  border: 0;
  border-radius: 0;
  box-shadow: 8px 0 24px var(--shadow);
}
.nav-drawer__close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.nav-drawer__close:hover { background: var(--hover); color: var(--fg); }
/* The sidebar's groups, then its footer at the foot. */
.nav-sections {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
}
.nav-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
/* The drawer's rows draw at 32px inside a 44px hit area (PRD A 4.5), so they
   sit 12px apart and each one's ::after takes half the gap either side. */
.nav-drawer .nav-group__items { gap: 12px; }
.nav-drawer .nav-item__link { position: relative; }
.nav-drawer .nav-item__link::after {
  content: "";
  position: absolute;
  inset: -6px 0;
}

/* ---- The shell (PRD A 4.1, 6.1; appendix shell.md) ----
   The sidebar, then a column of the view bar, #flash and main. The sidebar is
   232px from 1280, a 60px rail from 768, and a stored preference wins at 768
   and up. Under 768 its nav moves into the drawer, and the top bar stands in
   for the view bar. */
.shell {
  display: flex;
  align-items: flex-start;
  min-height: 100dvh;
}
.shell-nav { display: contents; }
.shell__main {
  flex: 1;
  min-width: 0;
}
.shell__main > :is(.view-bar, .top-bar) {
  position: sticky;
  top: 0;
  z-index: 10;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  flex: none;
  width: 232px;
  height: 100dvh;
  overflow-y: auto;
  background: var(--surface);
  /* A shadow rather than a border, so the rail's 60px leave its items 40. */
  box-shadow: inset -1px 0 var(--line);
}
/* The rail's tooltips stand out past its edge, so it can't clip them. */
.sidebar--rail {
  width: 60px;
  overflow: visible;
}
@media (768px <= width < 1280px) {
  .sidebar:not(.sidebar--expanded) {
    width: 60px;
    overflow: visible;
  }
}
/* A phone has no column beside the sidebar to lay out, so the shell's
   wrappers step aside. */
@media (width < 768px) {
  :root { --gutter: 16px; }
  .sidebar,
  .view-bar { display: none; }
  .shell,
  .shell__main { display: contents; }
}
@media (width >= 768px) {
  .top-bar { display: none; }
}

.sidebar__nav {
  container: sidebar / inline-size;
  flex: 1;
  padding: 14px 10px;
}
/* Its own padding came with it; the drawer's panel already has some. */
.nav-drawer .sidebar__nav { padding: 0; }
.nav-drawer__slot { display: contents; }
.nav-drawer .nav-footer__collapse { display: none; }
/* Holds nothing but the streams that fill in the counts. Lazy, it loads once
   it is seen, so it needs a box, and out of the flow it takes no room. */
#nav_counts {
  position: absolute;
  top: 0;
  left: 0;
}

.sidebar__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 8px;
}
.sidebar__mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel);
}
.sidebar__mark img {
  display: block;
  width: 18px;
  height: auto;
}
.sidebar__name {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  margin: 0;
}
.sidebar__workspace {
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: -.01em;
}
.sidebar__email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--faint);
  font-size: 12px;
  line-height: 16px;
}
/* The rail keeps the mark, and a hairline where each group's label was. The
   labels stay headings a screen reader can move by. */
@container sidebar (width < 100px) {
  .sidebar__header {
    justify-content: center;
    padding: 4px 0 8px;
  }
  .sidebar__name { display: none; }
  .nav-group > .section-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .nav-group + .nav-group {
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
}

/* === A4a: actions and structure === */
/* Buttons, the segmented control, tabs, filter chips and status text (PRD A
   4.5; appendix components.md 3.3 to 3.6, 3.17). Hover fills are --panel, not
   --hover, which is for rows. The focus ring is the global one. */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  color: var(--button-fg);
  font: 400 13px/16px var(--font-sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.button:hover { text-decoration: none; }
.button .icon { width: 14px; height: 14px; }
/* At a plain class's weight, so quiet's own padding still wins. */
.button:where(:has(.icon):not(.button--icon)) { padding-left: 10px; }

.button--primary {
  background: var(--button-primary-bg);
  color: var(--button-primary-fg);
  font-weight: 500;
}
.button--primary:hover { background: var(--accent-hover); }
.button--secondary { border-color: var(--line-strong); }
.button--secondary:hover {
  background: var(--panel);
  border-color: var(--faint);
  color: var(--fg);
}
.button--quiet { padding: 0 8px; color: var(--muted); }
.button--quiet:hover { background: var(--panel); color: var(--fg); }
.button:is(.button--secondary, .button--quiet):focus-visible { color: var(--fg); }
/* The outline at 45% danger, so the button reads as a danger before it is
   pressed and can't be mistaken for the Save beside it. */
.button--destructive {
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
  color: var(--danger);
}
.button--destructive:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
}
/* Only as the confirm button in a modal. */
.button--destructive-filled {
  background: var(--danger);
  color: var(--bg);
  font-weight: 500;
}

.button--sm { height: 26px; padding: 0 10px; font-size: 12px; }
.button--sm.button--quiet { padding: 0 6px; }
.button--touch {
  width: 100%;
  height: 44px;
  font-size: 14px;
  line-height: 18px;
}
.button--full { width: 100%; }
/* A button with a method is a form of its own; it sits in a row like any. */
.button-form { display: inline-flex; margin: 0; }
/* Two short, equal touch actions side by side; anything else stacks,
   primary on top. */
.button-pair { display: flex; gap: 8px; }
.button-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.button--icon { width: 30px; padding: 0; }
.button--icon.button--sm { width: 26px; }
.button--icon .icon { width: 16px; height: 16px; }

/* An icon-only button's name, on hover and keyboard focus until Escape (WCAG
   1.4.13), as the nav item's rail tooltip. A screen reader already hears the
   name, so this is hidden from it; on touch the name is enough. */
.button-tip {
  position: relative;
  display: inline-flex;
}
.button-tip__tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  translate: -50% 0;
  z-index: 10;
  height: 28px;
  padding: 0 10px;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel);
  color: var(--fg);
  font-size: 13px;
  line-height: 16px;
  white-space: nowrap;
  pointer-events: none;
}
.button-tip:has(:focus-visible):not([data-tooltip-dismissed]) .button-tip__tooltip { display: flex; }
@media (hover: hover) {
  .button-tip:hover:not([data-tooltip-dismissed]) .button-tip__tooltip { display: flex; }
}

/* After the hovers, which it outweighs by coming later: a disabled button
   doesn't answer the pointer. Why it is disabled is said beside it. */
.button:is(:disabled, [aria-disabled="true"]) {
  background: none;
  border-color: transparent;
  color: var(--faint);
  cursor: not-allowed;
}
.button:is(.button--secondary, .button--destructive):is(:disabled, [aria-disabled="true"]) {
  border-color: var(--line);
}
.button:is(.button--primary, .button--destructive-filled):is(:disabled, [aria-disabled="true"]) {
  background: var(--panel);
}
.button-with-reason {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.button-with-reason__reason {
  min-width: 0;
  color: var(--faint);
  font-size: 12px;
  line-height: 16px;
  /* A reason can name a credential key, one long word with no break in it. */
  overflow-wrap: anywhere;
}

/* The segmented control. Every segment carries a border, transparent until
   selected, so selecting one moves nothing. The selected fill alone is
   1.27:1 on --surface; its --line-strong border carries the state. */
.segmented {
  display: inline-flex;
  gap: 2px;
  min-inline-size: 0;
  margin: 0;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
}
.segmented__option {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 16px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.segmented__option:hover {
  background: var(--panel);
  color: var(--fg);
  text-decoration: none;
}
.segmented__option:is(:has(:checked), [aria-current="page"]) {
  background: var(--panel-strong);
  border-color: var(--line-strong);
  color: var(--fg);
  font-weight: 500;
}
/* The radio is there for the keyboard and the screen reader, not the eye, so
   its segment wears the ring. */
.segmented__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.segmented__option:has(:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Tabs with counts. Each tab is the strip's full height, so the whole of it
   takes a tap, and its underline sits on the strip's hairline. The strip
   scrolls sideways on a phone, which clips anything drawn outside it, so the
   ring is drawn inside the tab. */
.tabs {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}
.tab {
  display: inline-flex;
  flex: none;
  align-items: baseline;
  gap: 5px;
  padding: 14px 0 11px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 16px;
  text-decoration: none;
  white-space: nowrap;
}
.tab:hover { color: var(--fg); text-decoration: none; }
.tab:focus-visible { outline-offset: -2px; }
.tab__count { color: var(--faint); font-size: 12px; }
.tab[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--fg);
  font-weight: 500;
}
.tab[aria-current="page"] .tab__count { color: var(--accent); }
.tab--unavailable,
.tab--unavailable:hover { color: var(--faint); cursor: default; }
.tab__reason { font-size: 12px; }
@media (width < 768px) {
  .tabs { gap: 16px; }
}

/* ---- A section's own nav (PRD A 4.2; appendix system-data.md 1) ----
   A 220px column beside the section's pages (Discover's is 208), under the
   view bar. Its items draw as the sidebar's do, without an icon. On a phone
   there is no column: /system lists every page, and is the menu, and
   Discover's modes are a tab strip over each mode. */
.section-frame {
  --section-nav-width: 220px;
  display: grid;
  grid-template-columns: var(--section-nav-width) minmax(0, 1fr);
  align-items: start;
}
.section-frame--discover { --section-nav-width: 208px; }
.sub-nav {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  padding: 16px 12px;
  border-right: 1px solid var(--line);
}
.sub-nav__group > .section-label { padding: 14px 10px 6px; }
.sub-nav__group:first-child > .section-label { padding-top: 4px; }
.sub-nav__rule {
  margin: 10px 10px 8px;
  border: 0;
  border-top: 1px solid var(--line);
}
.sub-nav__items {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sub-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 18px;
  text-decoration: none;
}
.sub-nav__link:hover {
  background: var(--hover);
  color: var(--fg);
  text-decoration: none;
}
.sub-nav__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sub-nav__count {
  flex: none;
  color: var(--warning);
  font-size: 12px;
  line-height: 16px;
}
/* A tally, not something to act on: Discover's run history count. */
.sub-nav__count--tally { color: var(--faint); }
/* The column's foot, under whatever the nav leaves: Discover's backends. */
.sub-nav__footer {
  margin-top: auto;
  padding: 12px 10px 0;
  border-top: 1px solid var(--line);
}
/* As in the sidebar, the tint is too faint to carry state alone. */
.sub-nav__link[aria-current="page"] {
  background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--accent);
  color: var(--fg);
  font-weight: 500;
}
@media (width < 768px) {
  .section-frame { display: contents; }
  .sub-nav { display: none; }
}

/* ---- Discover (PRD C 6; appendix discover-candidates.md) ----
   Beside the mode list: the form in a 420px column, then its results. Below
   1100px the results go under the form; on a phone the mode list is a tab
   strip over each mode, and the backends one line at the foot. */
.discover {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  align-items: start;
  min-height: 100%;
}
.discover__form {
  align-self: stretch;
  border-right: 1px solid var(--line);
}
.discover__form-header { padding: 24px 28px 16px; }
.discover__form-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.discover__form-description {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}
.discover__fields,
.discover__fieldset {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.discover__fields { padding: 0 28px 28px; }
.discover__fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.discover__fieldset:disabled { opacity: 0.55; }
.discover__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
.discover__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.discover__helper,
.discover__note,
.discover__empty {
  margin: 0;
  color: var(--faint);
  font-size: 13px;
}
.discover__results { min-width: 0; }
.discover__section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 28px 10px;
}
.discover__section + .discover__section .discover__section-header { padding-top: 28px; }
.discover__section-link { font-size: 13px; }
.discover__section > .discover__note,
.discover__section > .discover__empty { padding: 0 28px; }
.discover__section > .banner { margin: 0 28px 12px; }

.discover-run__header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--line);
}
.discover-run__status { margin: 0; font-size: 13px; font-weight: 500; }
.discover-run__title { margin: 0; font-size: 20px; font-weight: 700; }
.discover-run__meta,
.discover-run__error { margin: 0; color: var(--faint); font-size: 12px; }
.discover-run__error { color: var(--danger); }
.discover-run__stats { display: flex; flex-wrap: wrap; gap: 32px; }
.discover-run__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.discover-run__body {
  max-width: 560px;
  padding: 24px 28px;
  color: var(--muted);
  font-size: 14px;
}
.discover-run__body p { margin: 0 0 8px; }
.discover-run > .tabs { padding: 0 28px; }
.discover-run > .discover__empty { padding: 16px 28px; }

.backends__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.backends__row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}
.backends__row .status-text { min-width: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.backends__value { color: var(--faint); }

.discover-tabs,
.discover-backends-line { display: none; }

@media (width < 1100px) {
  .discover { grid-template-columns: minmax(0, 1fr); }
  .discover__form { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (width < 768px) {
  .discover-tabs { display: flex; }
  .discover__form-header { padding: 16px 16px 12px; }
  .discover__fields { padding: 0 16px 20px; }
  .discover__row { grid-template-columns: minmax(0, 1fr); }
  .discover__actions > .button { width: 100%; }
  .discover__section-header,
  .discover-run__header,
  .discover-run__body { padding-inline: 16px; }
  .discover__section > .discover__note,
  .discover__section > .discover__empty,
  .discover-run > .tabs,
  .discover-run > .discover__empty { padding-inline: 16px; }
  .discover__section > .banner { margin-inline: 16px; }
  .discover-backends-line {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    padding: 16px;
    border-top: 1px solid var(--line);
    font-size: 12px;
  }
}

/* /system (PRD C 6; appendix system-data.md 2): the header and its legend,
   then each group's rows: the state in words, the page and its line side by
   side, the last activity, a chevron. Narrow, the line goes under the page
   and wraps, and the activity drops. */
.system-overview__header { align-items: end; }
.system-overview__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.system-overview__group { margin-top: 20px; }
.system-overview__group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
/* Over the activity lane: past the chevron's lane, its gap and the row's
   padding. */
.system-overview__column {
  padding-right: 48px;
  color: var(--faint);
  font-size: 12px;
  line-height: 16px;
}
.system-overview__group .list-row__lead { flex-basis: 128px; }
.system-overview__group .list-row__text { flex-direction: row; align-items: baseline; gap: 16px; }
.system-overview__group .list-row__title { flex: 0 0 200px; font-weight: 500; }
.system-overview__group .list-row__meta { flex: 1; color: var(--muted); font-size: 13px; }
@container list (width < 560px) {
  .system-overview__group .list-row__lead { flex-basis: 120px; }
  .system-overview__group .list-row__text { flex-direction: column; gap: 3px; }
  .system-overview__group .list-row__title { flex: none; }
  .system-overview__group .list-row__meta { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
  .system-overview__group .list-row__lane:last-child { flex-basis: 16px; }
}
@media (width < 768px) {
  .system-overview__column { display: none; }
}

/* ---- Run history and a research run (appendix discover-candidates.md 8, 9) ----
   Run history is a list beside the mode list, 32px in. A run is its story in
   the middle and the form for finishing it by hand in a 380px column; below
   1100px the form goes under it. */
.run-history { padding: 0 32px; }
.run-history__header { padding: 24px 0 16px; }
.run-history__title { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.run-history__summary { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.run-history__toolbar { border-top: 0; padding-top: 0; }
.run-history__menus { align-items: center; }
.run-history__filters { display: none; }
.run-history__sheet { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }

.research-run {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: start;
  min-height: 100%;
}
.research-run__main {
  align-self: stretch;
  min-width: 0;
  padding-bottom: 32px;
  border-right: 1px solid var(--line);
}
.research-run__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 24px 32px 20px;
  border-bottom: 1px solid var(--line);
}
.research-run__heading { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.research-run__eyebrow {
  margin: 0;
  color: var(--faint);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.research-run__title {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 28px;
  font-weight: 400;
  line-height: 34px;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.research-run__meta { margin: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.research-run__status { margin: 0; font-size: 13px; font-weight: 500; }
.research-run__discard { align-self: start; }
.research-run__stats { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 16px 36px; }
.research-run__phone-actions { display: none; }
.research-run__notes { display: flex; flex-direction: column; gap: 8px; padding: 16px 32px 0; }
.research-run .discover__section-header,
.research-run .discover__section > .discover__note,
.research-run .discover__section > .discover__empty { padding-inline: 32px; }
.research-run__query { max-width: 640px; padding: 0 32px; font-size: 14px; line-height: 21px; }
.research-run__query p { margin: 0 0 8px; }
.research-run__disclosure { margin: 4px 32px 0; color: var(--muted); font-size: 13px; }
.research-run__disclosure > summary { cursor: pointer; padding: 4px 0; }
.research-run__disclosure--inset { margin-top: 0; }
.research-run__disclosure--inset > .data-table { margin-top: 8px; }
.research-run__mono { margin-left: 8px; color: var(--faint); font-family: var(--font-mono); font-size: 12px; overflow-wrap: anywhere; }
.research-run__inputs {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 6px 16px;
  margin: 8px 0 0;
}
.research-run__inputs dt { color: var(--faint); }
.research-run__inputs dd { margin: 0; color: var(--fg); overflow-wrap: anywhere; white-space: pre-line; }
.research-run__applied { padding-top: 12px; }
.research-run__json {
  margin: 0 32px;
  padding: 12px 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 18px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.research-run__side { padding: 24px; }
.research-run__side-summary { list-style: none; cursor: pointer; }
.research-run__side-summary::-webkit-details-marker { display: none; }
.research-run__side-title { display: inline; margin: 0; font-size: 16px; font-weight: 500; }
.research-run__fold-summary { cursor: pointer; list-style: none; }
.research-run__fold-summary::-webkit-details-marker { display: none; }
.research-run__fold-summary::after,
.research-run__side-summary::after { content: "▾"; margin-left: 8px; color: var(--faint); font-size: 12px; }
.research-run__fold:not([open]) > .research-run__fold-summary::after,
.research-run__side:not([open]) > .research-run__side-summary::after { content: "▸"; }
.research-run__fold-summary > .section-label { display: inline; }
.research-run__fold-actions { padding: 0 32px 10px; }
.research-run__fold-actions > .discover__note { margin-bottom: 8px; }
.research-run__fold-actions > .research-run__json { margin: 8px 0 0; }
.research-run__side-note { margin: 4px 0 16px; color: var(--faint); font-size: 12px; }
.research-run__form { display: flex; flex-direction: column; gap: 16px; min-width: 0; margin: 0; padding: 0; border: 0; }
.research-run__form:disabled { opacity: 0.55; }
.research-run__form .input--mono { font-family: var(--font-mono); font-size: 12px; }
.research-run__menu { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }

@media (width < 1100px) {
  .research-run { grid-template-columns: minmax(0, 1fr); }
  .research-run__main { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (width < 768px) {
  .run-history { padding: 0 16px; }
  .run-history__toolbar { flex-wrap: nowrap; }
  .run-history__toolbar .list-filters__search { flex: 1 1 0; }
  .run-history__toolbar .run-history__menus { display: none; }
  .run-history__filters { display: inline-flex; }
  .research-run__header { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .research-run__title { font-size: 20px; line-height: 26px; }
  .research-run__discard { display: none; }
  .research-run__stats { gap: 12px 20px; }
  .research-run__phone-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .research-run__phone-actions > :first-child { flex-basis: 100%; }
  .research-run__notes { padding-inline: 16px; }
  .research-run .discover__section-header,
  .research-run .discover__section > .discover__note,
  .research-run .discover__section > .discover__empty,
  .research-run__query { padding-inline: 16px; }
  .research-run__disclosure,
  .research-run__json { margin-inline: 16px; }
  .research-run__side { padding: 16px; }
  .research-run__fold-actions { padding-inline: 16px; }
}



/* /system/gmail (PRD C 6; appendix system-data.md 7): the header, then the
   connection, the review-only scans and the recent runs, each a band edge to
   edge. One order at both widths, the phone's, so what reads first is what
   comes first: the connection is last, its actions after its facts. */
.gmail-summary { display: contents; }
main > .gmail-page,
.gmail-summary > :is(.gmail-header, .gmail-touch) { margin-inline: calc(-1 * var(--gutter)); }
/* The page's stream tag comes first but draws nothing, so the header
   pulls up into the gutter all the same. */
.gmail-summary > .gmail-header { margin-top: calc(-1 * var(--gutter)); }
.gmail-header { padding: 24px 32px 20px; }
.gmail-header__title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.gmail-header__about { margin-top: 6px; }
.gmail-header__glance,
.gmail-touch { display: none; }
.gmail-section { padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.gmail-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 20px 32px 8px;
}
.gmail-section__link { font-size: 13px; font-weight: 500; }
.gmail-section__empty { margin: 0; padding: 0 32px; color: var(--muted); font-size: 13px; }
.gmail-section > :is(.data-table, .list) { margin-inline: 12px; }
.gmail-section__text { margin: 0 0 12px; padding: 0 32px; color: var(--muted); font-size: 13px; line-height: 18px; }
.gmail-section__banner { padding: 0 32px 12px; }
.gmail-section__banner .banner { height: auto; min-height: 44px; padding-block: 10px; }
.gmail-connection__actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 32px 0; }
/* One card per mailbox (#148), each its facts and then its actions. */
.gmail-mailboxes,
.gmail-drafts { display: grid; margin: 0; padding: 0; list-style: none; }
.gmail-mailbox { display: grid; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); }
.gmail-mailbox:first-child { border-top: 0; padding-top: 4px; }
.gmail-mailbox > .banner { margin-inline: 32px; height: auto; min-height: 44px; padding-block: 10px; }
.gmail-mailbox > .gmail-connection__actions { padding-top: 2px; }
.gmail-mailbox__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 0 32px; }
.gmail-mailbox__account { margin: 0; padding: 0; border: 0; font-size: 14px; font-weight: 500; line-height: 18px; overflow-wrap: anywhere; }
.gmail-mailbox__note { margin: 0; padding: 0 32px; font-size: 13px; }
.gmail-mailboxes + .gmail-section__text { margin-top: 4px; }
.gmail-mailboxes + .gmail-facts,
.gmail-section__text + .gmail-facts { padding-top: 12px; border-top: 1px solid var(--line); }
.gmail-draft {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px 16px;
  padding: 12px 32px;
  border-top: 1px solid var(--line);
}
.gmail-draft__about { flex: 1 1 280px; min-width: 0; }
.gmail-draft__subject { margin: 0; padding: 0; border: 0; font-size: 14px; font-weight: 500; line-height: 18px; }
.gmail-draft__meta { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 18px; }
.gmail-draft__form,
.gmail-drafting { display: flex; flex-wrap: wrap; align-items: end; gap: 12px 16px; }
.gmail-draft__form .field { min-width: 220px; }
.gmail-drafting { padding: 0 32px; }
.gmail-drafting .field { flex: 0 1 280px; min-width: 0; }
.gmail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  margin: 0;
  padding: 0 32px;
}
.gmail-facts > div { display: grid; gap: 4px; min-width: 0; }
.gmail-facts dt { color: var(--faint); font-size: 12px; line-height: 16px; }
.gmail-facts dd { margin: 0; color: var(--fg); font-size: 14px; line-height: 18px; overflow-wrap: anywhere; }
.gmail-facts--code dd { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.gmail-scan {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px 84px 120px;
  align-items: start;
  gap: 16px;
  padding: 14px 32px;
  border-top: 1px solid var(--line);
}
.gmail-scan__name { margin: 0; padding: 0; border: 0; font-size: 14px; font-weight: 500; line-height: 18px; }
.gmail-scan__text { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 18px; }
.input.gmail-scan__mono { font-family: var(--font-mono); font-size: 12px; }
.gmail-scan__run { display: flex; justify-content: flex-end; padding-top: 20px; }
.gmail-latest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 4px 32px 12px;
  font-size: 13px;
}
.gmail-latest > p { flex: 1; min-width: 0; margin: 0; }
@media (width < 768px) {
  .gmail-header { padding: 16px; }
  .gmail-header .gmail-header__about { display: none; }
  .gmail-header__glance { display: grid; gap: 2px; }
  .gmail-header__glance > p { margin: 0; }
  .gmail-header__account { font-size: 14px; font-weight: 500; }
  .gmail-header__sync { color: var(--muted); font-size: 13px; }
  .gmail-touch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
  }
  .gmail-section { border-bottom: 0; }
  .gmail-section__head { padding: 20px 16px 8px; }
  .gmail-section__empty,
  .gmail-section__text,
  .gmail-section__banner,
  .gmail-latest,
  .gmail-mailbox__head,
  .gmail-mailbox__note,
  .gmail-draft,
  .gmail-drafting { padding-inline: 16px; }
  .gmail-mailbox > .banner { margin-inline: 16px; }
  .gmail-draft__form,
  .gmail-draft__form .field,
  .gmail-drafting .field { flex: 1 1 100%; min-width: 0; }
  .gmail-section > :is(.data-table, .list) { margin-inline: 0; }
  .gmail-connection__actions { padding: 8px 16px 0; }
  .gmail-facts { display: grid; gap: 8px; padding: 0 16px; }
  .gmail-facts > div { display: flex; justify-content: space-between; gap: 16px; }
  .gmail-facts dt { font-size: 13px; }
  .gmail-facts dd { font-size: 13px; text-align: right; }
  .gmail-facts > .gmail-facts__wide,
  .gmail-facts__aside { display: none; }
  .gmail-scan { grid-template-columns: minmax(0, 1fr) 84px; padding: 12px 16px; }
  .gmail-scan__about,
  .gmail-scan__run { grid-column: 1 / -1; }
  .gmail-scan__run { padding-top: 0; }
  .gmail-scan__run > .button { width: 100%; }
}

/* Filter chips. */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: none;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
:is(a, button).chip:hover {
  background: var(--panel);
  border-color: var(--faint);
  color: var(--fg);
  text-decoration: none;
}
.chip .icon { width: 12px; height: 12px; }
.chip--applied,
.chip[aria-pressed="true"],
:is(a, button):is(.chip--applied, [aria-pressed="true"]):hover {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--fg);
}
span.chip--applied { padding: 0 8px 0 10px; cursor: auto; }
.chip__label { color: inherit; text-decoration: none; }
.chip__count { color: var(--faint); }
/* A menu chip: the chip opens a list of the filter's values under it. */
.chip-menu { position: relative; }
.chip--menu { list-style: none; }
.chip--menu::-webkit-details-marker { display: none; }
.chip--menu .icon { width: 10px; height: 10px; rotate: -90deg; }
.chip-menu[open] .chip--menu .icon { rotate: 90deg; }
.chip-menu__list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 20;
  min-width: 180px;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  list-style: none;
}
.chip-menu__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
.chip-menu__option:hover { background: var(--hover); color: var(--fg); }
.chip-menu__option[aria-current] { color: var(--fg); font-weight: 500; }
@media (width < 768px) {
  .chip-menu__option { min-height: 44px; }
}
:is(.chip--applied, [aria-current="true"]) .chip__count { color: var(--accent); }
.chip__label:hover { text-decoration: underline; }
/* The x draws at 10px but takes a 24px target (WCAG 2.5.8), its margins
   pulled in so the chip keeps the drawn size. */
.chip__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: 0 -6px 0 -4px;
  border-radius: 50%;
  color: var(--muted);
}
.chip__remove:hover { color: var(--fg); }
.chip__remove .icon { width: 10px; height: 10px; }
.chip--add { border-style: dashed; color: var(--faint); }
.chip--read-only {
  border-color: transparent;
  background: var(--panel-strong);
  cursor: auto;
}

/* Status text: the words carry the state, the dot repeats it. */
.status-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 16px;
}
.status-text__dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 3px;
  background: currentColor;
}

/* On a phone every button, chip and segment is 44px to the touch (PRD A
   4.5), and draws at that size: a larger hit area than the drawing would
   overlap its neighbours in a row or a stack. A read-only tag takes no
   touch, so it keeps its size. */
@media (width < 768px) {
  .button,
  .segmented__option {
    min-width: 44px;
    min-height: 44px;
  }
  .chip:not(.chip--read-only) {
    min-height: 44px;
    border-radius: 22px;
  }
  /* Out to the chip's edge, and over the gap before it, never the label. */
  .chip__remove {
    width: 44px;
    height: 44px;
    margin: 0 -8px 0 -6px;
  }
}
/* === end A4a === */
/* === A4c: content === */
/* List rows, tables, cards, stats, meters, avatars and empty states (PRD A
   4.5; appendix components.md 3.11 to 3.19). Lists and tables measure their
   own width rather than the window's, so a phone and a narrow drawer stack
   them the same way. */

/* The list. */
.list {
  container: list / inline-size;
  margin: 0;
  padding: 0;
  list-style: none;
  border-block: 1px solid var(--line);
}
.list-row + .list-row { border-top: 1px solid var(--line); }
.list-row__body {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 20px;
  border-left: 2px solid transparent;
  color: var(--fg);
  text-decoration: none;
}
a.list-row__body:hover { background: var(--hover); }
a.list-row__body:hover .list-row__meta { color: var(--muted); }
/* Inset, so the list's own edges don't clip it. */
.list-row__body:focus-visible { outline-offset: -2px; }
.list-row__body[aria-current] {
  background: var(--panel);
  border-left-color: var(--accent);
}
.list-row__body[aria-current] .list-row__title { font-weight: 500; }
.list-row__body[aria-current] .list-row__meta { color: var(--muted); }
.list-row__icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}
.list-row__lead { display: flex; flex: none; align-items: center; }
.list-row__icon--round { border-radius: 11px; }
.list-row__icon--dashed { border-style: dashed; }
.list-row__icon .icon { width: 12px; height: 12px; }
.list-row__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.list-row__title,
.list-row__meta,
.list-row__folded,
.list-row__lane {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.list-row__title { font-size: 14px; line-height: 18px; }
.list--wrap :is(.list-row__title, .list-row__meta, .list-row__folded) {
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
}
.list--wrap .list-row__body { padding-block: 10px; }
.list-row__meta,
.list-row__folded {
  color: var(--faint);
  font-size: 12px;
  line-height: 16px;
}
.list-row__folded { display: none; }
/* A trailing value's lane: the same width on every row, so it lines up. */
.list-row__lane {
  flex: 0 0 var(--lane-width);
  font-size: 12px;
  line-height: 16px;
  text-align: right;
}
/* A row with a control before its link or an action after it: the three
   side by side, the link taking the room between. */
.list-row--with-controls { display: flex; align-items: center; }
.list-row--with-controls > :is(.list-row__cell, .list-row__body) { flex: 1; min-width: 0; }
.list-row__control { display: flex; flex: none; padding-left: 20px; }
.list-row__control + :is(.list-row__cell, .list-row__body),
.list-row__control + .list-row__cell > .list-row__body { padding-left: 12px; }
.list-row__action { flex: none; padding-right: 20px; }
/* Narrow, the status keeps its lane and the rest fold into a third line. */
@container list (width < 560px) {
  .list-row__body {
    align-items: flex-start;
    padding: 12px 16px;
  }
  .list-row__folded { display: block; }
  .list-row__text:has(.list-row__folded) ~ .list-row__lane:not(:last-child, .list-row__lane--keep) { display: none; }
  .list-row__lane:last-child { flex-basis: 52px; }
  .list-row__text:has(.list-row__folded) ~ .list-row__lane--fold { display: none; }
  .list-row__lane--drop { display: none; }
  .list-row--with-controls { align-items: flex-start; }
  .list-row__control { padding: 0 0 0 16px; }
  .list-row__action { padding: 6px 12px 0 0; }
}

/* A redesigned list screen's bands (PRD C 5): a summary of stats, the
   filter bar, then the table and its pager. */
.list-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 40px;
  margin: 0 0 16px;
}
.list-summary .stats { gap: 16px 40px; }
.list-summary__caption,
.list-filters__caption,
.list-pager__range {
  margin: 0;
  color: var(--faint);
  font-size: 13px;
  line-height: 16px;
}
.list-summary__caption { margin-left: auto; }
.list-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 12px 0;
  border-block: 1px solid var(--line);
}
.list-filters__search { flex: 0 1 280px; min-width: 0; }
.list-filters__search .input-search { width: 100%; }
.list-filters__caption { margin-left: auto; }
.list-filters + .banner { margin: 0 0 16px; }
.list-pager {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
}
.list-pager__range { margin-right: auto; }
@media (width < 768px) {
  .list-summary__caption,
  .list-filters__caption { margin-left: 0; }
  .list-filters__search { flex-basis: 100%; }
  .list-pager--wide { display: none; }
}

/* The table: flex rows with the table roles. Its width is the space it is
   given, never its content's, so data_table_controller can measure it. */
.data-table__table { border-bottom: 1px solid var(--line); }
/* Padding, gap and the actions' 44px lane are TableComponent::PADDING, GAP
   and ACTIONS_LANE too, which work out when a table becomes cards. */
.data-table__row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}
.data-table__body .data-table__row:last-child { border-bottom: 0; }
.data-table__row--header {
  min-height: 36px;
  background: var(--surface);
}
/* The header stays in view under the 52px view bar as the rows scroll
   (PRD C 5); on a phone the cards carry their own labels. */
@media (width >= 768px) {
  .data-table:not(.data-table--cards) .data-table__head {
    position: sticky;
    top: 52px;
    z-index: 5;
  }
}
.data-table__row--header .data-table__cell {
  color: var(--faint);
  font-size: 12px;
  line-height: 16px;
}
.data-table__cell {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.data-table__cell--fixed { flex: 0 0 var(--lane-width); }
.data-table__cell--right { text-align: right; }
.data-table__cell--blank { color: var(--faint); }
.data-table__cell--primary {
  color: var(--fg);
  font-size: 14px;
  line-height: 18px;
}
.data-table__label { display: none; }
.data-table__sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none;
}
.data-table__sort:hover { color: var(--fg); }
.data-table__row--header .data-table__cell--sorted { color: var(--fg); font-weight: 500; }
.data-table__sort .icon {
  width: 10px;
  height: 10px;
  color: var(--accent);
  rotate: 90deg;
}
[aria-sort=descending] .data-table__sort .icon,
.data-table__sorts[data-direction=desc] [aria-current] .icon { rotate: -90deg; }
/* The card layout's own sort control; the wide header has its links. */
.data-table__sorts {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  margin: 0 0 12px;
  color: var(--faint);
  font-size: 12px;
  line-height: 16px;
}
.data-table__sorts .data-table__sort {
  min-height: 44px;
  color: var(--muted);
  font-size: 13px;
}
.data-table__sorts [aria-current] { color: var(--fg); font-weight: 500; }
/* The record's name is the link; stretched, it takes the whole row's click. */
/* Its 3px of padding, which an inline box draws without moving a line, make
   the name a 24px target in its own right (WCAG 2.5.8) beside the header's
   sort links, now that it, not the row, is what the keyboard lands on. */
.data-table__link {
  padding-block: 3px;
  color: inherit;
  text-decoration: none;
}
/* A card's name is a flex item, whose padding would move it; the card is
   the target there. */
.data-table--cards .data-table__link { padding-block: 0; }
.data-table__link::after {
  content: "";
  position: absolute;
  inset: 0;
}
.data-table__body .data-table__row:hover { background: var(--hover); }
.data-table__row:hover .data-table__link { color: var(--accent); }
/* The ring goes round the row the link stands for, where :has() can say so,
   and round the link where it can't. */
@supports selector(:has(*)) {
  .data-table__link:focus-visible { outline: 0; }
  .data-table__row:has(.data-table__link:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
}
/* Wide enough for a real button and its focus ring, which it doesn't clip. */
.data-table__actions {
  position: relative;
  display: flex;
  flex: 0 0 44px;
  justify-content: flex-end;
  overflow: visible;
}
/* Shown on hover, to the keyboard whenever focus is in the row, and always
   where nothing can hover. */
.data-table__body .data-table__actions > * { opacity: 0; }
.data-table__row:hover .data-table__actions > *,
.data-table__row:focus-within .data-table__actions > * { opacity: 1; }
@media (hover: none) {
  .data-table__body .data-table__actions > * { opacity: 1; }
}
/* The Candidates list's status lane, which stacks a row's research stamp
   and holds under its status. */
.candidate-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding-block: 10px;
}
.data-table--cards .candidate-status { align-items: flex-end; padding-block: 0; }
/* Its toolbar: the menus on a desk, a Filters button and its sheet on a
   phone, which has room for the search alone. */
.candidate-toolbar__filters,
.candidate-toolbar__select { display: none; }
.candidate-filters-sheet {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
@media (width < 768px) {
  .candidate-toolbar { flex-wrap: nowrap; }
  .candidate-toolbar .list-filters__search { flex: 1 1 0; }
  .candidate-toolbar__menus { display: none; }
  .candidate-toolbar__filters,
  .candidate-toolbar__select { display: inline-flex; }
}

/* What the bulk bar hides stays hidden, a flex row or a button though it is. */
.candidates-index [hidden] { display: none; }
/* The bulk bar, in the toolbar's place while rows are ticked (appendix
   discover-candidates.md 11): the count, Select all, the verbs between
   dividers, and Clear at the far end. */
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  margin: 0 0 16px;
  padding: 0 20px;
  background: var(--panel);
}
.bulk-bar__count {
  margin: 0;
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.bulk-bar .bulk-bar__select-all { color: var(--accent); }
.bulk-verbs {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bulk-verbs--sheet { display: none; }
.bulk-verbs__divider {
  width: 1px;
  height: 20px;
  background: var(--line-strong);
}
.bulk-bar__clear { margin-left: auto; }
.bulk-bar__clear-narrow { display: none; }
/* While rows are selected, Queue research is the page's primary and the
   view bar's Discover steps down. */
.candidates-discover--selecting,
body:has(.candidates-index--selecting) .candidates-discover--lead { display: none; }
body:has(.candidates-index--selecting) .candidates-discover--selecting { display: inline-flex; }
/* A ticked row: tinted, with the accent's bar down its left edge. */
.data-table__row:has(.data-table__select .checkbox__box:checked) {
  background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--accent);
}
/* On a phone the boxes wait for Select. Then the bar keeps the count, Select
   all and Done, and the verbs are the sheet docked at the foot of the
   screen, the list still live above it, and padded below the pager so its
   last rows and pages clear the sheet. */
@media (width < 768px) {
  .candidates-index:not(.candidates-index--selecting) .data-table .data-table__select { display: none; }
  .candidates-index--selecting { padding-bottom: 200px; }
  .bulk-bar {
    min-height: 61px;
    padding: 0 16px;
  }
  .bulk-bar__count { font-size: 15px; }
  .bulk-bar__clear-wide { display: none; }
  .bulk-bar__clear-narrow { display: inline; }
  .bulk-verbs--bar { display: none; }
  .bulk-verbs--sheet:not([hidden]) {
    position: fixed;
    inset: auto 0 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    padding: 16px;
    border-top: 1px solid var(--line-strong);
    background: var(--panel);
  }
  .bulk-verbs__apply {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--faint);
    font-size: 12px;
    line-height: 16px;
  }
  .bulk-verbs__divider { display: none; }
  .bulk-verbs--sheet .button {
    grid-column: span 2;
    height: 40px;
    font-size: 14px;
  }
  .bulk-verbs--sheet .bulk-verbs__lead { grid-column: 1 / -1; height: 44px; }
  .bulk-verbs--sheet .button--destructive { grid-column: span 3; }
}

/* A card in the appendix's order: the name and score, the signal under them
   in full, then status, Rails and source. `order` moves what the eye sees,
   not what a screen reader reads, and each cell carries its own label. */
.data-table--cards .candidate-entry [data-lane=signal] { order: 1; white-space: normal; }
.data-table--cards .candidate-entry [data-lane=signal] .data-table__label { display: none; }
.data-table--cards .candidate-entry [data-lane=signal] .data-table__line { white-space: normal; }
.data-table--cards .candidate-entry [data-lane=status] { order: 2; }
.data-table--cards .candidate-entry [data-lane=rails] { order: 3; }
.data-table--cards .candidate-entry [data-lane=source] { order: 4; }

/* The Pitches list's toolbar: the vertical menu on a desk, a Filters button
   and its sheet on a phone, as Candidates has. */
.pitch-toolbar__filters { display: none; }
.pitch-filters-sheet {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
@media (width < 768px) {
  .pitch-toolbar { flex-wrap: nowrap; }
  .pitch-toolbar .list-filters__search { flex: 1 1 0; }
  .pitch-toolbar__menus { display: none; }
  .pitch-toolbar__filters { display: inline-flex; }
}
/* A row's actions, labelled, side by side; on a card they give way to the
   one button that opens them as a sheet, by the fit at the card's top right.
   Mark replied's picker, when the press needs one, stays where it is and
   takes the card's foot. */
/* Five where a raw pitch has gone out: they wrap rather than overrun. */
.pitch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}
.pitch-actions__more { display: none; }
.data-table--cards .pitch-entry .pitch-actions > :not(.mark-replied-picker) { display: none; }
.data-table--cards .pitch-entry .pitch-actions__more { display: inline-flex; }
.data-table--cards .data-table__body .pitch-entry .data-table__actions--labelled {
  grid-row: 1;
  grid-column: 3;
  padding: 4px 8px 0 0;
}
.data-table--cards .data-table__body .pitch-entry .data-table__actions--labelled:has(.mark-replied-picker) {
  grid-row: auto;
  grid-column: 1 / -1;
  padding: 0 14px;
}
.data-table--cards .pitch-entry .data-table__actions--labelled > * { flex: none; }
.pitch-row-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
/* A card reads next action first, then status, the last touch and who. */
.data-table--cards .pitch-entry [data-lane=next_action] { order: 1; }
.data-table--cards .pitch-entry [data-lane=status] { order: 2; }
.data-table--cards .pitch-entry [data-lane=last_touch] { order: 3; }
.data-table--cards .pitch-entry [data-lane=contacts] { order: 4; }
/* Under the list: when the scores last moved, and the sweeps over it. */
.pitch-list-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 0 0 28px;
}
.pitch-list-footer__note {
  margin: 0;
  color: var(--faint);
  font-size: 12px;
  line-height: 16px;
}
.pitch-list-footer__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin-left: auto;
}
.pitch-list-footer__link {
  color: var(--accent);
  font-size: 13px;
}
.pitch-list-footer__export { display: none; }
@media (width < 768px) {
  .pitch-list-footer__actions { margin-left: 0; }
  .pitch-list-footer__export { display: inline-flex; }
}
.empty-state__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

/* The select lane: the box above the row's stretched link, so a tick never
   opens the record, in a 24px target (WCAG 2.5.8); 44px on a card. */
.data-table__select {
  flex: 0 0 24px;
  overflow: visible;
}
.data-table__check {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  cursor: pointer;
}
/* A lane of labelled buttons, a review queue's answers: as wide as the
   table says, and always drawn. */
.data-table__actions--labelled {
  flex-basis: var(--lane-width);
  gap: 6px;
}
.data-table__body .data-table__actions--labelled > * { opacity: 1; }
/* A finger's target on a phone (PRD A 4.5). */
@media (width < 768px) {
  .data-table__actions > * {
    min-width: 44px;
    min-height: 44px;
  }
}
/* A cell's value with a detail under it: two lines, each truncating on its
   own. */
.data-table__line {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.data-table__value:has(> .data-table__line) { min-width: 0; }
.data-table__detail {
  color: var(--faint);
  font-size: 12px;
  line-height: 16px;
}
/* Too narrow for its columns, each row is a card (appendix 3.13): the name
   and status over a hairline, then label and value pairs. The header leaves
   the screen, not the accessibility tree. */
.data-table--cards .data-table__sorts { display: flex; }
.data-table--cards .data-table__table { border-bottom: 0; }
.data-table--cards .data-table__head {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
/* Its row keeps the columns' width inside that 1px box; clipped there too,
   so the hidden header can't count as a row spilling past the page. */
.data-table--cards .data-table__head .data-table__row { overflow: hidden; }
.data-table--cards .data-table__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.data-table--cards .data-table__body .data-table__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px 12px;
  min-height: 0;
  padding: 0 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.data-table--cards .data-table__body .data-table__row::before {
  content: "";
  grid-row: 2;
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
}
.data-table--cards .data-table__body .data-table__cell {
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  text-align: left;
}
.data-table--cards .data-table__body .data-table__cell:not(.data-table__cell--blank, [class*="tone-"]) { color: var(--fg); }
.data-table--cards .data-table__body .data-table__label {
  display: block;
  color: var(--faint);
  font-size: 12px;
}
/* The name over its detail, which wraps rather than squeezing the name. */
.data-table--cards .data-table__body .data-table__cell--primary:has(.data-table__line) {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.data-table--cards .data-table__cell--primary .data-table__detail {
  overflow-wrap: anywhere;
  white-space: normal;
}
.data-table--cards .data-table__body .data-table__cell--primary {
  grid-row: 1;
  grid-column: 1;
  padding: 12px 0 4px 14px;
  white-space: normal;
  overflow-wrap: anywhere;
}
/* A card's box sits at its top right, where a row's actions would. */
.data-table--cards .data-table__body .data-table__select {
  grid-row: 1;
  grid-column: 3;
  padding: 4px 4px 0 0;
}
.data-table--cards .data-table__check {
  width: 44px;
  height: 44px;
}
.data-table--cards .data-table__body .data-table__cell--status {
  grid-row: 1;
  grid-column: 2;
  padding: 12px 0 4px;
  font-size: 12px;
}
.data-table--cards .data-table__body .data-table__cell--status .data-table__label { display: none; }
.data-table--cards .data-table__body .data-table__actions {
  grid-row: 1;
  grid-column: 3;
  padding: 4px 8px 0 0;
}
.data-table--cards .data-table__body .data-table__actions > * { opacity: 1; }
/* Labelled answers take the card's foot, side by side. */
.data-table--cards .data-table__body .data-table__actions--labelled {
  grid-row: auto;
  grid-column: 1 / -1;
  padding: 0 14px;
}
.data-table--cards .data-table__actions--labelled > * { flex: 1; }
.data-table--cards .data-table__actions--labelled .button { width: 100%; }

/* A grouped table: each group's heading runs the table's width over its
   rows, the dot only decoration beside the words (Clients by tier). A group
   with no rows is its heading alone, "None" at the far end. */
.data-table__body .data-table__row--group {
  min-height: 0;
  padding: 14px 20px 8px;
}
.data-table__body .data-table__row--group:hover { background: none; }
.data-table__body .data-table__row--empty { padding-bottom: 14px; }
.data-table__group-header {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.data-table__group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: 0;
  text-transform: none;
}
.data-table__group-count,
.data-table__group-none { color: var(--faint); font-size: 13px; font-weight: 400; }
.data-table__group-summary { color: var(--faint); font-size: 12px; line-height: 16px; white-space: nowrap; }
/* A heading with a caption keeps its words whole; the caption gives way. */
.data-table__group-title:has(+ .data-table__group-caption) { flex: none; }
/* What puts a row in the group, beside its heading; truncated, never
   pushing the table wider. */
.data-table__group-caption {
  min-width: 0;
  margin: 0 auto 0 0;
  overflow: hidden;
  color: var(--faint);
  font-size: 12px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* The square that marks a tier or a group, beside the words for it. */
.marker-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--marker-dot);
}
.marker-dot--good { --marker-dot: var(--good); }
.marker-dot--warning { --marker-dot: var(--warning); }
.marker-dot--accent { --marker-dot: var(--accent); }
.marker-dot--faint { --marker-dot: var(--faint); }
.marker-dot--hollow {
  border: 1.5px solid var(--marker-dot);
  background: none;
}
/* In cards the heading stays a heading, not a card, and the cards follow. */
.data-table--cards .data-table__body .data-table__row--group {
  display: flex;
  padding: 14px 0 0;
  border: 0;
  border-radius: 0;
  background: none;
}
.data-table--cards .data-table__body .data-table__row--group::before { content: none; }
.data-table--cards .data-table__group-none { display: none; }
.data-table--cards .data-table__body .data-table__group-header {
  display: flex;
  padding: 0;
  color: var(--fg);
}

/* The card. */
.content-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.content-card__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}
.content-card__header:not(:last-child) { border-bottom: 1px solid var(--line); }
.content-card__title {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
}
.content-card__meta {
  margin: 0;
  color: var(--faint);
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
}
.content-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 14px 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 21px;
}
.content-card__body > * { margin: 0; }
.content-card__field {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.content-card__field dt {
  color: var(--faint);
  font-size: 12px;
  line-height: 16px;
}
.content-card__field dd {
  margin: 0;
  color: var(--fg);
  font-size: 13px;
  line-height: 16px;
  text-align: right;
}
/* Its actions wrap rather than spill when the card is narrow. */
.content-card__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
}
/* The card a section leads with: the next action, the story read. */
.content-card--lead { border-color: var(--line-strong); }
.content-card--lead .content-card__title { max-width: 640px; font-size: 16px; line-height: 22px; }
/* The meta over the title, as a kicker, with no rule under the header. */
.content-card--meta-first .content-card__header {
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 6px;
  border-bottom: 0;
}
.content-card--meta-first .content-card__meta { white-space: normal; }
/* A card in a grid of many: tighter, in smaller type. */
.content-card--compact .content-card__header { gap: 4px; padding: 12px 12px 0; }
.content-card--compact .content-card__body { padding: 4px 12px 12px; font-size: 12px; line-height: 16px; }

/* The stat. A row of them sits 32px apart. */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
}
.stat__value {
  color: var(--fg);
  font-size: 20px;
  font-weight: 700;
  line-height: 26px;
  letter-spacing: -.01em;
}
.stat__label {
  color: var(--faint);
  font-size: 12px;
  line-height: 16px;
}
/* A record header's one figure, its label beside it in the display face. */
.stat--headline { flex-direction: row; align-items: baseline; gap: 8px; }
.stat--headline .stat__value { font-size: 28px; line-height: 34px; }
.stat--headline .stat__label {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
@media (max-width: 600px) {
  .stat--headline .stat__value { font-size: 20px; line-height: 26px; }
}
/* A figure among a section's words: its label over it, the value at body weight. */
.stat--compact { flex-direction: column-reverse; }
.stat--compact .stat__value { font-size: 16px; font-weight: 500; }

/* The meter. Every fill is 3:1 or more on the track: accent 6.9, warning
   5.1, danger 5.0 (appendix 1.1). */
.meter {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.meter__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
}
.meter__label {
  color: var(--muted);
  font-size: 13px;
  line-height: 16px;
}
.meter__value {
  color: var(--faint);
  font-size: 12px;
  line-height: 16px;
  font-variant-numeric: tabular-nums;
}
.meter__track {
  display: flex;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--panel-strong);
}
.meter__fill {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
}
/* What is queued but not yet sent: the fill's own colour, lighter, so it
   turns with the tone. Decorative beside the count in words. */
.meter__fill--queued { opacity: 0.35; }
.meter--warning .meter__value { color: var(--warning); }
.meter--warning .meter__fill { background: var(--warning); }
.meter--danger .meter__value { color: var(--danger); }
.meter--danger .meter__fill { background: var(--danger); }

/* The avatar. */
.avatar {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}
.avatar--56 { width: 56px; height: 56px; font-size: 16px; line-height: 20px; }
.avatar--40 { width: 40px; height: 40px; font-size: 14px; line-height: 18px; }
.avatar--28 { width: 28px; height: 28px; }
.avatar--24 { width: 24px; height: 24px; }
.avatar--you {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* The empty state. */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  text-align: center;
}
.empty-state > .icon {
  width: 24px;
  height: 24px;
  color: var(--faint);
}
.empty-state__title {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--fg);
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
}
.empty-state__body {
  max-width: 300px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}
/* A value in the colour of what it says. The words carry the state.
   Last, so it wins over the colour a part has by default. */
.tone-muted { color: var(--muted); }
.tone-faint { color: var(--faint); }
.tone-accent { color: var(--accent); }
.tone-good { color: var(--good); }
.tone-warning { color: var(--warning); }
.tone-danger { color: var(--danger); }
/* === end A4c: content === */

/* === A4b: form fields (PRD A 4.5; appendix components.md 3.7 to 3.10, 3.20) ===
   Scoped to the components' own classes. The app-wide form rules above
   (.stacked-form, .form-grid) skip these components, so they
   look the same in any container. Borders are --line-strong, never --line: a control's boundary
   needs 3:1 (WCAG 1.4.11, docs/prds/mocks/v2/contrast-check.md). */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field__label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 16px;
}
.field__help {
  margin: 0;
  color: var(--faint);
  font-size: 12px;
  line-height: 16px;
}
.field__help--mono { font-family: var(--font-mono); }
/* The asterisk is for the eye; the control says required to a screen reader. */
.field__required {
  margin-left: 2px;
  color: var(--muted);
}

.input {
  width: 100%;
  height: 32px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--input-bg);
  color: var(--fg);
  font-size: 14px;
  line-height: 18px;
}
.input::placeholder { color: var(--faint); opacity: 1; }
/* The ring is the global :focus-visible one; the border turns with it. */
.input:focus-visible { border-color: var(--accent); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input:disabled {
  border-color: var(--line);
  color: var(--faint);
  cursor: not-allowed;
}
/* Read-only: shown, selectable, not editable. A dashed border on no fill
   says so, at the same 3:1 as an editable one. */
.input[readonly],
.search-picker--readonly .search-picker__field {
  border-style: dashed;
  background: transparent;
}
.input--textarea {
  display: block;
  height: auto;
  min-height: 88px;
  padding: 8px 10px;
  line-height: 21px;
  resize: vertical;
}

.input-search,
.select {
  position: relative;
  display: block;
}
.input-search > .icon {
  position: absolute;
  top: 50%;
  left: 10px;
  width: 14px;
  height: 14px;
  color: var(--faint);
  transform: translateY(-50%);
  pointer-events: none;
}
.input-search > .input { padding-left: 32px; }
.input-search > .input::-webkit-search-cancel-button { display: none; }

.select > .input {
  padding-right: 30px;
  appearance: none;
  cursor: pointer;
}
.select > .input:disabled { cursor: not-allowed; }
/* The 12px chevron, drawn: two borders of a square, turned. */
.select::after {
  content: "";
  position: absolute;
  top: calc(50% - 5px);
  right: 13px;
  width: 6px;
  height: 6px;
  border: solid var(--muted);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  pointer-events: none;
}

/* Toggle and checkbox: the native input, unstyled and redrawn, so the focus
   ring and the checked state stay on the element the keyboard reaches. */
/* 24px tall at least, so boxes stacked in a group are 24px apart (WCAG
   2.5.8); 44px on a phone, below. */
.toggle,
.checkbox {
  display: inline-flex;
  min-height: 24px;
  margin: 0;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 18px;
  cursor: pointer;
}
.toggle:has(:checked),
.checkbox:has(:checked),
.checkbox:has([aria-invalid="true"]) { color: var(--fg); }
.toggle:has(:disabled),
.checkbox:has(:disabled) { color: var(--faint); cursor: not-allowed; }

.toggle__switch,
.checkbox__box {
  flex: none;
  margin: 0;
  appearance: none;
  cursor: inherit;
}
.toggle__switch {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 9px;
  background: var(--line-strong);
}
/* Off, the knob is --fg on the --line-strong track (3.4:1); the --muted knob
   the sheet draws is 1.9:1, under 1.4.11's 3:1 for the part that shows state. */
.toggle__switch::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 7px;
  background: var(--fg);
  transition: transform .12s;
}
.toggle__switch:checked { background: var(--accent); }
.toggle__switch:checked::before {
  background: var(--bg);
  transform: translateX(14px);
}
.toggle__switch:disabled { background: var(--line); }
.toggle__switch:disabled::before { background: var(--faint); }

.checkbox-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.checkbox__box {
  position: relative;
  width: 16px;
  height: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--panel);
}
.checkbox__box:checked {
  border-color: var(--accent);
  background: var(--accent);
}
/* The tick, drawn: two borders of a box, turned. */
.checkbox__box:checked::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 4.5px;
  width: 4px;
  height: 8px;
  border: solid var(--bg);
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg);
}
.checkbox__box[aria-invalid="true"] { border-color: var(--danger); }
.checkbox__box:disabled { border-color: var(--line); }

/* The field error leads with a circled "!", drawn, in the danger colour. */
.inline-error {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 16px;
}
.inline-error[hidden] { display: none; }
.inline-error::before {
  content: "!";
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 12px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}
/* 14px, and in line with the title's first line. */
.inline-error--block::before {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  font-size: 9px;
}
.inline-error--block {
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-left: 2px solid var(--danger);
  background: var(--danger-soft);
}
.inline-error__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.inline-error__title,
.inline-error__body {
  margin: 0;
  font-size: 13px;
}
.inline-error__title {
  font-weight: 500;
  line-height: 16px;
}
.inline-error__body {
  color: var(--muted);
  line-height: 18px;
}
.inline-error__list {
  padding-left: 18px;
}
.inline-error__action {
  flex: none;
  font-size: 13px;
  line-height: 16px;
}

/* The search picker: an input like the search input's, a chip in its place
   once a choice is made, and the listbox under it. */
.search-picker { position: relative; }
.search-picker__field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--input-bg);
}
.search-picker__field:has([aria-invalid="true"]) { border-color: var(--danger); }
.search-picker--disabled .search-picker__field {
  border-color: var(--line);
  color: var(--faint);
  cursor: not-allowed;
}
.search-picker--disabled .search-picker__input { cursor: not-allowed; }
.search-picker__field > .icon {
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--faint);
}
.search-picker__input {
  flex: 1;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  font-size: 14px;
  line-height: 18px;
}
/* The field takes the ring and the accent border, rather than the borderless
   input drawing a box inside it. */
.search-picker__input:focus-visible { outline: none; }
.search-picker__field:has(.search-picker__input:focus-visible) {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.search-picker__input::placeholder { color: var(--faint); opacity: 1; }
.search-picker__chip[hidden] { display: none; }

.search-picker__chip {
  display: inline-flex;
  flex: none;
  max-width: calc(100% - 40px);
  align-items: center;
  gap: 6px;
  min-width: 0;
  height: 26px;
  padding: 0 8px 0 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--fg);
  font-size: 12px;
  line-height: 16px;
}
.search-picker__chip-text {
  display: flex;
  gap: 6px;
  min-width: 0;
}
.search-picker__chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-picker__chip-kind { color: var(--faint); }
.search-picker__remove {
  position: relative;
  display: inline-grid;
  flex: none;
  place-items: center;
  /* 24px to press, drawn as the 10px x. */
  width: 24px;
  height: 24px;
  margin: 0 -6px 0 -4px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.search-picker__remove[hidden] { display: none; }
.search-picker__remove:disabled { cursor: not-allowed; }
.search-picker__remove .icon { width: 10px; height: 10px; }

.search-picker__listbox {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  min-width: 280px;
  margin: 0;
  padding: 4px 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 8px 24px var(--shadow);
  list-style: none;
  /* Eight options, or less of the window; the list scrolls, never the page. */
  max-height: min(392px, 50vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.search-picker__listbox[hidden] { display: none; }
.search-picker__option {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 12px;
  border-left: 2px solid transparent;
  cursor: pointer;
}
.search-picker__option[hidden] { display: none; }
.search-picker__option:hover,
.search-picker__option[aria-selected="true"] { background: var(--hover); }
.search-picker__option[aria-selected="true"] { border-left-color: var(--accent); }
.search-picker__glyph {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}
.search-picker__glyph .icon { width: 12px; height: 12px; }
.search-picker__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.search-picker__name,
.search-picker__detail {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-picker__name {
  color: var(--fg);
  font-size: 14px;
  line-height: 18px;
}
.search-picker__kind,
.search-picker__detail {
  color: var(--faint);
  font-size: 12px;
  line-height: 16px;
}
.search-picker__no-match {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  color: var(--faint);
  font-size: 13px;
  line-height: 16px;
}
.search-picker__no-match[hidden] { display: none; }
.search-picker__create {
  height: 40px;
  color: var(--accent);
  font-size: 13px;
  line-height: 16px;
}

/* A phone's touch target is 44px (PRD A 4.5): controls grow to it, and the
   toggle's and checkbox's label row is the target. The picker's list drops
   into the flow under its input, full width, so inside a sheet it pushes
   what follows down instead of covering it. */
@media (width < 768px) {
  .input,
  .search-picker__field { height: 44px; }
  .input--textarea { height: auto; }
  .toggle,
  .checkbox { min-height: 44px; }
  .search-picker__listbox {
    position: static;
    min-width: 0;
    margin-top: 4px;
  }
  .search-picker__option { height: 52px; }
  /* The chip's x draws at 10px and takes a 44px press. */
  .search-picker__remove::after {
    content: "";
    position: absolute;
    inset: -10px;
  }
}
/* === end A4b === */

/* === A4d: overlays === */
/* Banners, toasts, the modal, the content drawer, the phone's sheet and the
   result panel (PRD A 4.5; appendix components.md 3.21 to 3.23). The modal
   and drawer dress the A2a dialog primitive; its rules above stay the
   behaviour's. */

/* Banners: a tone sets the icon and action colour, and all but info their
   fill and a 35% border, which has no token. */
.banner {
  --banner-tone: var(--muted);
  --banner-action: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel);
}
.banner > .icon { color: var(--banner-tone); }
.banner__message {
  flex: 1;
  margin: 0;
  color: var(--fg);
  font-size: 13px;
  line-height: 16px;
}
.banner__action :is(a, .button) {
  color: var(--banner-action);
  font-size: 13px;
  font-weight: 500;
}
.banner__dismiss { color: var(--muted); }
.banner--warning {
  --banner-tone: var(--warning);
  --banner-action: var(--warning);
  border-color: color-mix(in srgb, var(--warning) 35%, transparent);
  background: var(--warning-soft);
}
.banner--danger {
  --banner-tone: var(--danger);
  --banner-action: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 35%, transparent);
  background: var(--danger-soft);
}
.banner--good {
  --banner-tone: var(--good);
  --banner-action: var(--good);
  border-color: color-mix(in srgb, var(--good) 35%, transparent);
  background: var(--good-soft);
}

/* Toasts stack at the foot of the window, 24px in, over the page but under
   any dialog (the top layer). The stack lets clicks through between its
   toasts, and scrolls rather than run off the top of a short window. Each
   live region stays in the layout even when empty: one taken out of it with
   display:none isn't announced. */
.toasts {
  position: fixed;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 30;
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: 0 8px 24px var(--shadow);
  pointer-events: auto;
}
.toast > .icon { color: var(--good); }
.toast--danger > .icon { color: var(--danger); }
/* A long unbroken name wraps rather than push Dismiss off a phone. */
.toast__message {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--fg);
  font-size: 13px;
  line-height: 16px;
}
.toast__action :is(a, .button) {
  color: var(--accent);
  font-weight: 500;
}
.toast__dismiss { margin-right: -6px; color: var(--muted); }
/* Across a phone, the stack would cover the foot of the page, where a form
   ends. So the page keeps room for it at its foot and scrolls a focused
   control clear of it (WCAG 2.4.11); toasts_controller measures the stack
   into --toasts-height. */
@media (width < 768px) {
  .toasts {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    left: 16px;
    width: auto;
    max-width: none;
    max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
  html { scroll-padding-bottom: var(--toasts-height, 0px); }
  body { padding-bottom: var(--toasts-height, 0px); }
}

/* The modal and the content drawer: a header, a body that scrolls, and the
   actions pinned under it. */
.overlay .dialog__panel {
  display: flex;
  flex-direction: column;
  height: auto;
  padding: 0;
  overflow: hidden;
}
.overlay__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 0;
}
.overlay__title {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--fg);
  font: 700 20px/26px var(--font-sans);
}
.overlay__close { margin-right: -6px; color: var(--muted); }
.overlay__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 14px;
  min-height: 0;
  padding: 12px 20px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--muted);
  font-size: 14px;
  line-height: 21px;
}
.overlay__body p { margin: 0; }
.overlay__footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}
.overlay__footer-start .button--quiet { color: var(--danger); }
.overlay__actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.overlay--modal .dialog__panel { width: min(440px, 100vw - 32px); }
.overlay--modal.overlay--form .dialog__panel { width: min(560px, 100vw - 32px); }

/* 400px from the right over a lighter scrim, inside the 16px gutter on a
   phone, as the navigation drawer is from the left. */
.overlay--drawer {
  inset: 0 0 0 auto;
  width: 400px;
  /* Of the window less its scrollbar gutter, where 100vw would count it. */
  max-width: calc(100% - 16px);
  height: 100dvh;
  margin: 0;
}
.overlay--drawer::backdrop { background: var(--scrim-light); }
/* A drawer holding a table or a preview, 720px (appendix components.md 3.23). */
.overlay--wide_drawer { width: 720px; }
.overlay--drawer .dialog__panel {
  width: auto;
  height: 100%;
  max-height: none;
  border: 0;
  border-left: 1px solid var(--line-strong);
  border-radius: 0;
  box-shadow: -12px 0 32px rgba(0, 0, 0, .4);
}
.overlay--drawer .overlay__header {
  flex: none;
  height: 52px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}
.overlay--drawer .overlay__title { font-size: 16px; line-height: 20px; font-weight: 500; }
.overlay--drawer .overlay__body { gap: 16px; padding: 20px; }

/* Under 600px the modal is a sheet from the foot of the screen: no taller
   than 90%, a grab handle, and its actions full width and stacked, the
   confirm on top. */
@media (width < 600px) {
  .overlay--modal {
    inset: auto 0 0;
    width: 100%;
    margin: 0;
  }
  .overlay--modal .dialog__panel,
  .overlay--modal.overlay--form .dialog__panel {
    width: auto;
    max-height: 90dvh;
    border: 0;
    border-top: 1px solid var(--line-strong);
    border-radius: 12px 12px 0 0;
    box-shadow: none;
  }
  .overlay--modal .dialog__panel::before {
    content: "";
    flex: none;
    align-self: center;
    width: 36px;
    height: 4px;
    margin-top: 8px;
    border-radius: 2px;
    background: var(--line-strong);
  }
  .overlay--modal .overlay__header { padding: 12px 16px 8px; }
  .overlay--modal .overlay__title { font-size: 16px; line-height: 20px; font-weight: 500; }
  .overlay--modal .overlay__body { padding: 0 16px 16px; }
  .overlay--modal .overlay__footer {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 24px;
  }
  .overlay--modal .overlay__actions {
    flex-direction: column-reverse;
    margin-left: 0;
  }
  .overlay--modal .overlay__actions .button {
    width: 100%;
    height: 44px;
    font-size: 14px;
  }
}

/* A choice of one, as rows: native radios, so a screen reader and the arrow
   keys get a radio group for free; the radio itself is drawn as the row's
   tint and accent bar. */
.overlay-options {
  margin: 0 -20px;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.overlay-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  color: var(--fg);
  font-size: 14px;
  line-height: 18px;
  cursor: pointer;
}
.overlay-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.overlay-option:hover { background: var(--hover); }
.overlay-option:has(:checked) {
  background: var(--accent-soft);
  box-shadow: inset 2px 0 var(--accent);
  font-weight: 500;
}
.overlay-option:has(:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.overlay-option__meta {
  margin-left: auto;
  color: var(--faint);
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}
.overlay-option:has(:checked) .overlay-option__meta { color: var(--accent); }
@media (width < 600px) {
  .overlay-options { margin: 0 -16px; }
  .overlay-option { padding: 0 16px; }
}

/* A one-time credential, shown in full until dismissed. */
.result-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
}
.result-panel__title {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
}
.result-panel__note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}
.result-panel__value {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.result-panel__value .result-panel__field {
  flex: 1 1 240px;
  min-width: 0;
  color: var(--fg);
  font-size: 12px;
}
.result-panel__copied {
  color: var(--good);
  font-size: 12px;
  line-height: 16px;
}
/* === end A4d === */

/* === B3a: outreach timeline === */
/* A person's touches on every channel, newest first (appendix person.md,
   "Timeline column"): a date lane, a rail of dots joined by a hairline, and
   the entry. What came in is lit, what went out is quiet, and anything else
   is a hollow dot and one line. */
.timeline__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.timeline__entries {
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline__entry {
  display: grid;
  grid-template-columns: 64px 12px minmax(0, 1fr);
  column-gap: 16px;
}
.timeline__date {
  padding-top: 2px;
  color: var(--faint);
  font-size: 12px;
  line-height: 16px;
}
/* The rail: the dot, then the hairline down to the next entry's. */
.timeline__dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 5px;
}
.timeline__dot::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  box-sizing: border-box;
  border: 1px solid var(--faint);
  border-radius: 4px;
}
.timeline__entry--inbound .timeline__dot::before { border-color: var(--accent); background: var(--accent); }
.timeline__entry--outbound .timeline__dot::before { border-color: var(--muted); background: var(--muted); }
.timeline__entry--note .timeline__dot::before { background: var(--faint); }
/* A note's label recedes, so its words lead. */
.timeline__entry--note .timeline__label { color: var(--faint); }
.timeline__dot::after {
  content: "";
  flex: 1;
  width: 1px;
  background: var(--line);
}
.timeline__entry:last-child .timeline__dot::after { content: none; }
.timeline__content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 22px;
}
.timeline__content > p { margin: 0; }
.timeline__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  font-size: 12px;
  line-height: 16px;
}
.timeline__label { color: var(--muted); }
.timeline__entry--inbound .timeline__label { color: var(--accent); }
.timeline__detail { color: var(--faint); }
.timeline__meta .status-text { font-size: 12px; }
/* A message's own words, as written: its line breaks kept, a long link
   broken rather than pushing the page sideways. */
.timeline__message {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--muted);
  font-size: 14px;
  line-height: 21px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.timeline__entry--inbound .timeline__message {
  border-color: var(--line-strong);
  background: var(--panel);
  color: var(--fg);
}
/* A note is the operator's own words, read at full strength. */
.timeline__note {
  color: var(--fg);
  font-size: 14px;
  line-height: 21px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.timeline__text,
.timeline__missing {
  color: var(--faint);
  font-size: 13px;
  line-height: 18px;
  overflow-wrap: anywhere;
}
.timeline__missing { font-style: italic; }
/* On a phone the date lane narrows, the bubble takes the width, and what
   went out says only what it was. */
@media (width < 768px) {
  .timeline__entry {
    grid-template-columns: 48px 12px minmax(0, 1fr);
    column-gap: 12px;
  }
  .timeline__entry--outbound .timeline__detail { display: none; }
}
/* A pitch's activity on a phone (appendix pitch-outreach.md, 390): the date
   joins the person and the touch on one line, with no date lane. */
.timeline__when { display: none; }
@media (width < 600px) {
  .timeline--pitch .timeline__entry { grid-template-columns: 12px minmax(0, 1fr); }
  .timeline--pitch .timeline__date { display: none; }
  .timeline--pitch .timeline__when { display: inline; color: var(--faint); }
}
/* === end B3a: outreach timeline === */

/* === A6: Jump to === */
/* The search picker in a dialog near the top of the window, its list in the
   flow under the field so the panel grows to hold twelve results; on a
   phone, full width inside the 16px gutters. */
.jump-to {
  margin: 12vh auto auto;
}
.jump-to .dialog__panel {
  width: min(560px, 100vw - 32px);
  height: auto;
  padding: 12px;
}
.jump-to .search-picker__listbox {
  position: static;
  min-width: 0;
  max-height: min(588px, 100dvh - 12vh - 96px);
  margin-top: 8px;
  border: 0;
  box-shadow: none;
}
@media (width < 600px) {
  .jump-to { margin-top: 16px; }
}
/* === end A6 === */

/* === B7c: campaigns (appendix campaigns-experiments-flows.md 1-3) === */
.campaigns-index { display: flex; flex-direction: column; gap: 20px; }
.campaigns-index__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}
.campaigns-index__caption { margin: 0 0 0 auto; color: var(--faint); font-size: 13px; }
.campaigns-index__group { display: flex; flex-direction: column; gap: 8px; }
.campaigns-index__group-header { display: flex; justify-content: space-between; align-items: baseline; }
.campaigns-index__count { color: var(--faint); font-size: 12px; }
.campaigns-index__name { display: block; font-weight: 500; }
.campaigns-index__meta { display: block; color: var(--faint); font-size: 12px; font-weight: 400; }

.campaign-page { display: flex; flex-direction: column; gap: 24px; }
.campaign-page__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.campaign-page__identity { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.campaign-page__eyebrow { margin: 0; font-family: var(--font-display); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.campaign-page__title { margin: 0; font-family: var(--font-headline); font-size: 28px; line-height: 1.2; overflow-wrap: anywhere; }
.campaign-page__subline { margin: 0; color: var(--muted); font-size: 14px; }
.campaign-page__actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.campaign-page__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 48px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.campaign-page__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: 32px;
}
.campaign-page__steps,
.campaign-page__people { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.campaign-page__none { margin: 0; color: var(--faint); font-size: 13px; }
.campaign-step__queue { margin: 0; color: var(--faint); font-size: 12px; }
.campaign-step__metrics { display: flex; flex-wrap: wrap; gap: 8px 32px; margin: 12px 0; }
.campaign-step__metrics dt { color: var(--faint); font-size: 12px; }
.campaign-step__metrics dd { margin: 0; font-size: 16px; font-weight: 500; }
.campaign-step__excerpt { margin: 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 20px; }

.campaign-form {
  display: grid;
  grid-template-columns: minmax(0, 640px) minmax(0, 400px);
  gap: 32px;
  align-items: start;
}
.campaign-form__main { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.campaign-form__section { display: flex; flex-direction: column; gap: 14px; }
.campaign-form__section + .campaign-form__section { padding-top: 24px; border-top: 1px solid var(--line); }
.campaign-form__section-header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.campaign-form__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.campaign-form__merge { color: var(--faint); font-size: 12px; }
.campaign-form__match { color: var(--accent); font-size: 13px; }
.campaign-form__filters { border: 1px solid var(--line); border-radius: 8px; }
.campaign-form__filters--invalid { border-color: var(--danger); }
/* A legend is never a grid item, so the label lane is a float the choices
   clear by its width. */
.campaign-form__filter {
  display: flow-root;
  margin: 0;
  padding: 10px 14px;
  border: 0;
  min-width: 0;
}
.campaign-form__filter + .campaign-form__filter { border-top: 1px solid var(--line); }
.campaign-form__filter-label { float: left; width: 110px; padding: 0; color: var(--muted); font-size: 13px; }
.campaign-form__choices { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-left: 122px; }
/* The Segment control shows one panel; the other stays in the form, unread. */
.campaign-form:has(#segment_mode_hand_picked:checked) .campaign-form__filters,
.campaign-form:has(#segment_mode_hand_picked:checked) .campaign-form__filter-help,
.campaign-form:has(#segment_mode_filter:checked) .campaign-form__hand-picked { display: none; }
/* Sent from outside Hub: no segment, no cadence and no words, since Hub
   sends nothing; a line in their place says so. */
.campaign-form:has(#segment_mode_outside_hub:checked) :is(.campaign-form__filters, .campaign-form__filter-help,
  .campaign-form__hand-picked, .campaign-form__merge, .campaign-step__words, .field:has(#campaign_cadence)),
.campaign-form:not(:has(#segment_mode_outside_hub:checked)) :is(.campaign-form__outside-help, .campaign-step__outside-note) { display: none; }
.campaign-form__outside-help, .campaign-step__outside-note { margin: 0; color: var(--muted); font-size: 13px; }
.campaign-step__words { display: flex; flex-direction: column; gap: 14px; }
.campaign-form__hand-picked { display: flex; flex-direction: column; gap: 12px; }
.campaign-form__picked { margin: 0; padding: 0; list-style: none; }
.campaign-form__picked li { display: flex; align-items: center; gap: 12px; padding-block: 8px; border-bottom: 1px solid var(--line); }
.campaign-form__picked-name { font-size: 13px; font-weight: 500; }
.campaign-form__picked-job { flex: 1; color: var(--faint); font-size: 12px; }
.campaign-form__pick { display: flex; align-items: flex-end; gap: 8px; }
.campaign-form__pick .field { flex: 1; }
.campaign-step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  min-width: 0;
}
.campaign-step--invalid { border-color: var(--danger); }
.campaign-step__title { padding: 0; font-size: 14px; font-weight: 500; }
.campaign-step__settings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 96px; gap: 12px; }
.campaign-step__footer { display: flex; justify-content: flex-end; }
.campaign-form__add-step { align-self: flex-start; border-style: dashed; }
.campaign-form__actions { display: none; }
.campaign-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.campaign-preview > div { display: flex; flex-direction: column; gap: 20px; }
.campaign-preview__section { display: flex; flex-direction: column; gap: 8px; }
.campaign-preview__section + .campaign-preview__section { padding-top: 16px; border-top: 1px solid var(--line); }
.campaign-preview__count { margin: 0; color: var(--muted); font-size: 14px; }
.campaign-preview__value { margin-right: 8px; color: var(--fg); font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.campaign-preview__note { margin: 0; color: var(--faint); font-size: 12px; line-height: 17px; }
.campaign-preview__text { margin: 0; color: var(--muted); font-size: 13px; line-height: 19px; }
.campaign-preview__people { margin: 0; padding: 0; list-style: none; }
.campaign-preview__people li { display: flex; flex-direction: column; padding-block: 9px; border-bottom: 1px solid var(--line); }
.campaign-preview__name { font-size: 13px; font-weight: 500; }
.campaign-preview__job { color: var(--faint); font-size: 12px; }

@media (width < 1280px) {
  .campaign-page__body,
  .campaign-form { grid-template-columns: minmax(0, 1fr); }
}
/* On a phone the preview is its count beside the segment's label, and the
   form ends with its own Save, the view bar being gone. */
@media (width < 768px) {
  .campaigns-index__caption { margin-left: 0; }
  .campaign-page__title { font-size: 20px; }
  .campaign-page__stats { gap: 16px 24px; }
  .campaign-form__row,
  .campaign-step__settings { grid-template-columns: minmax(0, 1fr); }
  .campaign-form__filter-label { float: none; width: auto; margin-bottom: 8px; }
  .campaign-form__choices { margin-left: 0; }
  .campaign-form__pick { flex-direction: column; align-items: stretch; }
  .campaign-preview { display: none; }
  .campaign-form__actions { display: flex; flex-direction: column; gap: 8px; }
}
/* B7c: Add people on a campaign's page, and the Edit form's one column. */
.campaign-page__add { display: flex; align-items: flex-end; gap: 8px; }
.campaign-page__add .field { flex: 1; }
.campaign-form--settings { grid-template-columns: minmax(0, 640px); }
@media (width < 768px) {
  .campaign-page__add { flex-direction: column; align-items: stretch; }
}
/* === end B7c: campaigns === */

/* === B3c: pitch Outreach tab === */
/* The people on the left at 560, their activity on the right (appendix
   pitch-outreach.md); one column on anything narrower than both. */
.pitch-outreach {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
  align-items: start;
}
.pitch-outreach__people {
  min-width: 0;
  border-right: 1px solid var(--line);
}
.pitch-outreach__activity {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 24px 32px;
}
@media (max-width: 1100px) {
  .pitch-outreach { grid-template-columns: minmax(0, 1fr); }
  .pitch-outreach__people { border-right: 0; border-bottom: 1px solid var(--line); }
}

.outreach-wave {
  display: grid;
  gap: 12px;
  padding: 24px 32px 20px;
  border-bottom: 1px solid var(--line);
}
.outreach-wave__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.outreach-wave .section-label { color: var(--accent); }
.outreach-wave__rule,
.outreach-wave__empty {
  margin: 0;
  color: var(--faint);
  font-size: 12px;
  line-height: 16px;
}
.outreach-wave__empty,
.outreach-wave__note { margin: 0; font-size: 13px; color: var(--muted); }
.outreach-wave__draft {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pitch-contacts {
  display: grid;
  grid-template-areas: "head add" "list list" "bench bench";
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding-block: 16px;
}
.pitch-contacts__header {
  grid-area: head;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 0 12px 8px 32px;
}
.pitch-contacts__header .section-label { margin-right: auto; }
.pitch-contacts__add { grid-area: add; padding: 0 32px 8px 0; }
.pitch-contacts__list { grid-area: list; min-width: 0; }
.pitch-contacts .list-row__body { padding-inline: 32px; }
.pitch-contacts .list-row:hover { background: var(--hover); }
.pitch-contacts .list-row__title .status-text { margin-left: 6px; font-size: 12px; }
/* The actions lane holds a button: its focus ring and tooltip can't be
   clipped like a value's ellipsis. */
.pitch-contacts .list-row__lane:last-child { overflow: visible; }
/* Shown on hover and focus where there is a pointer to hover with; always
   on a phone, where it keeps its drawing inside a 44px hit area. */
@media (hover: hover) and (min-width: 601px) {
  .pitch-contacts .list-row:not(:hover, :focus-within) .pitch-contacts__more { opacity: 0; }
}
/* A phone, as appendix pitch-outreach.md draws it at 390: the filter under
   its label, Add contact and Open in Today full-width 44px actions, and no
   Log touch or mail-archive note. */
@media (max-width: 600px) {
  .pitch-contacts { grid-template-areas: "head" "list" "add" "bench"; grid-template-columns: minmax(0, 1fr); }
  .pitch-contacts__header { display: grid; gap: 8px; }
  .pitch-contacts__header,
  .pitch-contacts__add,
  .pitch-contacts__bench,
  .outreach-wave,
  .pitch-outreach__activity { padding-inline: 16px; }
  .pitch-contacts__add { padding-block: 12px 0; }
  .pitch-contacts > .pitch-contacts__bench { padding-inline: 16px; }
  .pitch-contacts__add .button,
  .outreach-wave .outreach-wave__today { width: 100%; min-height: 44px; justify-content: center; }
    .pitch-contacts .list-row__body { padding-inline: 16px; }
  .pitch-contacts__more { min-width: 44px; min-height: 44px; }
  .outreach-wave__rule,
  .pitch-outreach #record-outreach,
  .pitch-outreach__conversations { display: none; }
}
.pitch-contacts__bench {
  grid-area: bench;
  margin: 0;
  padding: 12px 32px 4px;
  color: var(--faint);
  font-size: 12px;
  line-height: 16px;
}

/* The row's actions sheet, and the contact form in its drawers. */
.contact-actions,
.contact-form {
  display: grid;
  gap: 14px;
}
.contact-actions__note { margin: 0; }

/* The Mark sent / Log touch modal (appendix campaigns-experiments-flows.md
   8): channel and kind side by side, the words with their count, the tags
   the send carries in a box of their own, and the footer's note. */
.touch-form {
  display: grid;
  gap: 16px;
}
.touch-form__regarding { color: var(--faint); font-size: 13px; }
.touch-form__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: end;
  gap: 12px;
}
.touch-form .segmented { flex-wrap: wrap; }
.touch-form__value { color: var(--fg); }
/* The channel's address beside the name: the LinkedIn profile Hub has. */
.touch-form__address {
  display: block;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.touch-form__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.touch-form__words { color: var(--good); font-size: 12px; }
.touch-form__tags {
  display: grid;
  grid-template-columns: 110px minmax(0, max-content) minmax(0, 1fr);
  align-items: center;
  gap: 10px 12px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  font-size: 13px;
}
.touch-form__tags dt,
.touch-form__tags dt label { color: var(--muted); }
.touch-form__tags dd { margin: 0; min-width: 0; }
.touch-form__none { color: var(--faint); }
.touch-form__tag-note { color: var(--faint); font-size: 12px; }
.chip--preselected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
/* One of a few to pick, a chip over its own radio (FilterChipComponent
   :choice). A long label wraps inside the chip rather than out of it. */
.chip-choices { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.chip-choice { position: relative; display: inline-flex; max-width: 100%; }
.chip-choice__input { position: absolute; opacity: 0; pointer-events: none; }
.chip--choice { height: auto; min-height: 26px; max-width: 100%; padding-block: 4px; white-space: normal; overflow-wrap: anywhere; }
/* Never read-only, so a phone gives it 44px like any chip (.chip:not(.chip--read-only)). */
.chip-choice:has(:checked) .chip {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--fg);
  font-weight: 500;
}
.chip-choice:has(:focus-visible) .chip { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (forced-colors: active) {
  .chip-choice:has(:checked) .chip { border: 2px solid Highlight; }
}
.touch-form__note,
.touch-form__loading {
  color: var(--faint);
  font-size: 12px;
  line-height: 17px;
}
@media (width < 600px) {
  .touch-form__row { grid-template-columns: minmax(0, 1fr); }
  .touch-form__tags { grid-template-columns: minmax(0, 1fr) minmax(0, max-content); }
  .touch-form__tag-note,
  .touch-form__note { display: none; }
}
.contact-actions__facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 12px;
  margin: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.contact-actions__facts dt { color: var(--faint); }
.contact-actions__facts dd { margin: 0; }
.contact-actions__reject {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.contact-actions__reject .field { flex: 1; }
.mail-archive,
.mail-archive__summary {
  display: grid;
  gap: 12px;
}
.mail-archive__summary p { margin: 0; }
.mail-archive__meta { color: var(--faint); font-size: 12px; line-height: 16px; }
.outreach-wave__sequence { max-width: 220px; }
.timeline__delete { margin-left: auto; }
/* === end B3c === */
/* Connect (appendix connect.md): the week band, the filters, the rows. */
.connect { display: flex; flex-direction: column; gap: 20px; }
.connect-week {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.connect-week__week {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 360px;
  padding: 20px 32px 20px 0;
}
.connect-week__week .meter__track { height: 6px; border-radius: 3px; }
.connect-week__count { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.connect-week__sent { font-size: 28px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.connect-week__sent--none { color: var(--faint); }
.connect-week__of { color: var(--faint); font-size: 14px; }
.connect-week__warning { margin: 0; color: var(--warning); font-size: 13px; }
.connect-week__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 40px;
  padding: 20px 0;
}
.connect-week__summary .stat__value { font-size: 20px; font-weight: 700; }
.connect__filters {
  display: flex;
  align-items: center;
  gap: 10px;
}
.connect__filters .input-search { inline-size: 280px; max-inline-size: 100%; }
.connect__search { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
/* Why them wraps to three lines rather than truncating to one. */
.connect__why {
  display: -webkit-box;
  overflow: hidden;
  white-space: normal;
  line-height: 19px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}
.connect__name { display: block; font-weight: 500; }
/* A finished row, shown with Hide finished off: its words step back. */
.connect-row--finished .connect__name { color: var(--muted); font-weight: 400; }
.connect-row--finished .connect__why { color: var(--faint); }
/* The row's name link stretches over the row; Find and the status form sit
   above it, so a click on them is theirs. */
.connect__find,
.connect-status { position: relative; z-index: 1; }
.connect__filters-button { display: none; }
.connect__menus { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 10px; }
.connect__menus .toggle { margin-inline-start: auto; }
.connect__sheet-filters { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.connect-week__line { display: none; margin: 0; color: var(--faint); font-size: 13px; }
.connect__job { display: block; color: var(--faint); font-size: 12px; font-weight: 400; }
.connect-status { display: flex; align-items: center; gap: 12px; }
.connect-status .select { inline-size: 160px; }
.connect-empty { display: flex; flex-direction: column; gap: 16px; max-inline-size: 600px; }
.connect-empty__counts { margin: 0; }
.connect-empty__count {
  display: flex;
  justify-content: space-between;
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
}
.connect-empty__count dd { margin: 0; color: var(--muted); font-size: 13px; }
.connect-empty__note { margin: 0; color: var(--faint); font-size: 12px; }

/* A card puts the status control under the explanation, full width. */
.data-table--cards .data-table__body .data-table__cell:has(.connect-status) { flex-direction: column; align-items: stretch; }
.data-table--cards .connect-status { flex-wrap: wrap; }
.data-table--cards .connect-status .select { flex: 1 1 100%; inline-size: auto; }
.data-table--cards .connect-status .input { min-height: 44px; }

/* Paste a list (appendix connect.md 2): the lines, the source, and what
   each line came to, in lanes that align down the preview. */
.connect-paste { display: flex; flex-direction: column; gap: 18px; }
.connect-paste__intro { color: var(--faint); font-size: 13px; }
.connect-paste__lines {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 20px;
  background: var(--bg);
}
.connect-paste__fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.connect-paste__fields .field { flex: 1 1 200px; }
.connect-paste__preview { display: flex; flex-direction: column; gap: 10px; }
.connect-paste__preview-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 14px; }
.connect-paste__counts,
.connect-paste__empty { margin: 0; color: var(--faint); font-size: 12px; }
.connect-paste__rows { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
.connect-paste__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 10px;
  border-top: 1px solid var(--line);
}
.connect-paste__status { flex: none; inline-size: 140px; font-size: 13px; }
.connect-paste__person { flex: 1; min-inline-size: 0; overflow-wrap: anywhere; }
.connect-paste__row--skipped .connect__name { color: var(--muted); }
.connect-paste__problem { color: var(--danger); }
.connect-paste__role { flex: none; inline-size: 100px; color: var(--muted); font-size: 13px; }
.connect-paste__outcome { flex: none; inline-size: 150px; color: var(--faint); font-size: 12px; text-align: end; }
.connect-paste__outcome .button { margin-inline-end: -8px; }
.connect-paste__note { flex: 1; margin: 0; color: var(--faint); font-size: 12px; }
.connect-paste__over { color: var(--warning); }
.overlay--wide_drawer .overlay__footer-start { flex: 1; }

/* Add from Apollo (appendix connect.md 3): the search and its chips, then
   the results in lanes that line up under their header. A picked row takes
   the selected bar and tint; one Connect already holds steps back. */
.connect-apollo { display: flex; flex-direction: column; gap: 14px; }
.connect-apollo__filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.connect-apollo__filters .input-search { flex: 1 1 200px; }
.connect-apollo__filters .chip-group { flex-basis: 100%; }
.connect-apollo__prompt { margin: 0; color: var(--muted); font-size: 14px; }
.connect-apollo__header,
.connect-apollo__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.connect-apollo__header {
  color: var(--faint);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.connect-apollo__header .checkbox__label { color: var(--faint); }
.connect-apollo__rows { margin: 0; padding: 0; list-style: none; }
.connect-apollo__row:has(.checkbox__box:checked) { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.connect-apollo__row--held .checkbox__label,
.connect-apollo__row--held .connect-apollo__company,
.connect-apollo__row--held .connect-apollo__role { color: var(--muted); }
.connect-apollo__person { flex: 1; min-inline-size: 0; overflow-wrap: anywhere; }
.connect-apollo__person .checkbox__label { font-weight: 500; }
.connect-apollo__person .connect__job { padding-inline-start: 26px; }
.connect-apollo__header .connect-apollo__person { display: flex; align-items: center; gap: 6px; }
.connect-apollo__company { flex: none; inline-size: 140px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.connect-apollo__role { flex: none; inline-size: 110px; font-size: 13px; }
.connect-apollo__in-hub { flex: none; inline-size: 150px; font-size: 12px; text-align: end; }
.connect-apollo__crowded { display: block; color: var(--warning); }
.connect-apollo__more { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--faint); font-size: 12px; }
.connect-apollo__outcome { display: flex; flex-direction: column; gap: 12px; }
.connect-apollo__outcome-title { margin: 0; font-size: 14px; font-weight: 500; }
.connect-apollo__left { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
.connect-apollo__left-row { padding-block: 10px; border-top: 1px solid var(--line); }

/* A phone stacks the lanes: status and outcome over the person. */
@media (width < 600px) {
  .connect-apollo__header .connect-apollo__company,
  .connect-apollo__header .connect-apollo__role,
  .connect-apollo__header .connect-apollo__in-hub,
  .connect-apollo__role { display: none; }
  .connect-apollo__row { flex-wrap: wrap; row-gap: 2px; padding-inline: 0; }
  .connect-apollo__row:has(.checkbox__box:checked) { padding-inline-start: 8px; }
  .connect-apollo__person { flex-basis: calc(100% - 162px); }
  .connect-apollo__in-hub { inline-size: 150px; }
  .connect-apollo__company { order: 1; inline-size: auto; flex-basis: 100%; padding-inline-start: 26px; color: var(--faint); }
  .connect-paste__row { flex-wrap: wrap; row-gap: 4px; }
  .connect-paste__status { inline-size: auto; }
  .connect-paste__person { flex-basis: 100%; order: 1; }
  .connect-paste__role { display: none; }
  .connect-paste__outcome { flex: 1; inline-size: auto; }
  .overlay--wide_drawer .overlay__footer { flex-wrap: wrap; }
  .overlay--wide_drawer .overlay__footer-start { flex-basis: 100%; }
  .overlay--wide_drawer .overlay__actions { margin-inline-start: auto; }
}

@media (width < 768px) {
  .connect-week__week { flex-basis: 100%; padding: 14px 0; }
  .connect-week__count,
  .connect-week__summary { display: none; }
  .connect-week__line { display: block; }
  .connect__filters .input-search { flex: 1; inline-size: auto; }
  .connect__menus { display: none; }
  .connect__filters-button { display: inline-flex; }
}

/* === C1g: New person === */
/* Edit person's bands (appendix people-clients 2): what a section is for on
   the left, its fields on the right, a hairline between. */
.person-form { display: flex; flex-direction: column; max-width: 928px; }
.person-form > .inline-error { margin-bottom: 20px; }
.person-form__section {
  display: grid;
  grid-template-columns: 240px minmax(0, 640px);
  gap: 48px;
  padding-block: 28px;
  border-bottom: 1px solid var(--line);
}
.person-form__section:first-of-type { padding-top: 8px; }
.person-form__intro p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 19px; }
.person-form__fields { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.person-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
/* Six relationships are wider than a phone. */
.person-form__relationship { flex-wrap: wrap; }
@media (width < 768px) {
  .person-form__section { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-block: 20px; }
  .person-form__intro p { display: none; }
}
/* === end C1g === */
/* C1g: a namesake is added only when the operator says so, under the refusal. */
.person-form__namesake { margin: -12px 0 20px; }
/* C4d: a pair a phone stacks, one field to a row (appendix projects-tasks.md 3);
   dates and the deal's pipeline and stage stay side by side. */
@media (width < 768px) {
  .person-form__row--stack { grid-template-columns: minmax(0, 1fr); }
}
/* C1b: New pitch's intro (appendix pitches.md 3), over the bands at every
   width: the band descriptions hide on a phone, and this says what a save
   sets off. */
.person-form__lede { max-width: 640px; margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 21px; }
@media (width < 768px) {
  .person-form__lede { margin-bottom: 4px; font-size: 13px; line-height: 20px; }
}
/* === B7e: experiments (appendix campaigns-experiments-flows.md 4-7) === */
/* A choice of one, as rows in a form (Scope; a send to tag): native radios
   drawn as a ring, the checked row tinted with the accent bar, as the
   overlay's options are. */
.choice-rows {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
}
.choice-rows > legend { margin-bottom: 8px; padding: 0; }
.choice-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  min-height: 44px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
}
.choice-row + .choice-row { border-top: 1px solid var(--line); }
.choice-row input { margin: 0; accent-color: var(--accent); }
.choice-row:hover { background: var(--hover); }
.choice-row:has(:checked) { background: var(--accent-soft); box-shadow: inset 2px 0 var(--accent); color: var(--fg); }
.choice-row__meta { flex-basis: 100%; padding-left: 26px; color: var(--faint); font-size: 12px; overflow-wrap: anywhere; }

/* The checked scope shows its chooser; the others stay in the form, unread. */
.experiment-form__chooser { display: none; }
.experiment-form:has(#experiment_scope_campaign:checked) .experiment-form__chooser--campaign,
.experiment-form:has(#experiment_scope_campaign_step:checked) .experiment-form__chooser--campaign_step,
.experiment-form:has(#experiment_scope_segment:checked) .experiment-form__chooser--segment { display: block; }
.experiment-form__target { max-width: 200px; }

.experiment-page__hypothesis { margin: 0; max-width: 640px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.experiment-page__progress,
.experiment-page__conclusion {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.experiment-page__conclusion { align-items: flex-start; gap: 16px 32px; }
.experiment-page__conclusion > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.experiment-page__conclusion > div:first-child { flex: 1 1 320px; max-width: 640px; }
.experiment-page__count { margin: 0; font-size: 20px; font-weight: 700; }
.experiment-page__note { margin: 0; font-size: 14px; line-height: 21px; overflow-wrap: anywhere; }
.experiment-page__final { margin: 0; color: var(--muted); font-size: 14px; }
.experiment-page__variants,
.experiment-page__sends { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.experiment-page__arms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.experiment-page__tag-link { color: var(--muted); font-size: 12px; }
.experiment-page__phone-action { display: none; }

.experiment-conclude { display: flex; flex-direction: column; gap: 18px; }
.experiment-conclude__legend { margin-bottom: 8px; padding: 0 20px; color: var(--muted); font-size: 13px; font-weight: 500; }
.experiment-conclude__composer { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; border: 0; }
.experiment-conclude__composer .experiment-conclude__legend { padding: 0; }

.experiment-tags { display: flex; flex-direction: column; gap: 20px; max-width: 640px; }
.experiment-tags__form { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.experiment-tags__form .choice-rows { align-self: stretch; }

@media (width < 768px) {
  .campaign-page__actions:has(.experiment-page__phone-action) { width: 100%; }
  .experiment-page__phone-action { display: flex; }
}
@media (width < 600px) {
  .experiment-conclude__legend { padding: 0 16px; }
}
/* === end B7e: experiments === */

/* B7e: the experiments on a campaign step (its card's footer). */
.campaign-step__experiments { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.campaign-step__experiments-label { margin: 0; color: var(--faint); font-size: 12px; }
.campaign-step__experiments ul { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.campaign-step__experiments li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.campaign-step__variants { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }


/* === C1h: Edit person === */
/* Save and Cancel again at the foot of a form taller than the screen. */
/* A form's Save and Cancel, at its foot at every width: the view bar has
   them too, but a form taller than the window ends where the operator is. */
.person-form__actions { display: flex; justify-content: flex-end; gap: 8px; padding-block: 20px; }
/* The row sections: tables want more room than fields (900px, appendix 2). */
.person-form--rows { max-width: 1188px; }
.person-form--rows .person-form__section { grid-template-columns: 240px minmax(0, 900px); }
.person-form--rows .person-form__section:first-of-type { padding-top: 28px; }
.person-form--rows .person-form__section:last-of-type { padding-bottom: 40px; border-bottom: 0; }
.person-form__watch {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.person-form__watch p { margin: 0; color: var(--muted); font-size: 13px; line-height: 19px; }
/* The Add forms under each table, and the fields a row's drawer shares. */
.person-form__add { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; }
.person-form__add-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  align-items: end;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.person-form__add-row--end { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.row-form { display: grid; gap: 14px; }
/* A drawer is one field wide. */
.overlay .row-form .person-form__add-row { grid-template-columns: minmax(0, 1fr); }
@media (width < 768px) {
  .person-form--rows .person-form__section { grid-template-columns: minmax(0, 1fr); }
  .person-form__actions { flex-direction: column-reverse; align-items: stretch; }
}
/* === end C1h === */
/* === C1c: pitch detail header, Overview and Research === */
/* The header over every pitch tab (appendix pitches.md): the name in the
   headline face, where it sits, and the fit at the right. */
.pitch-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 28px 32px 16px;
  background: var(--bg);
  border-bottom: 0;
}
.pitch-header__identity { min-width: 0; }
.pitch-header__title {
  margin: 0 0 4px;
  font-family: var(--font-headline);
  font-size: 28px;
  font-weight: 400;
  line-height: 34px;
  letter-spacing: -.02em;
}
.pitch-header__meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.pitch-header__domain { color: inherit; }

/* A section of a detail tab: 24px down, 32px in, a hairline under it. */
.pitch-section {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 24px 32px;
  border-bottom: 1px solid var(--line);
}
.pitch-section > *,
.pitch-section p { margin: 0; }
.pitch-section__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.pitch-section__header > .section-label { margin-right: auto; }
.pitch-section__lede { color: var(--muted); font-size: 13px; line-height: 20px; }
.pitch-section__caption,
.pitch-section__aside { color: var(--faint); font-size: 12px; line-height: 18px; }
.pitch-section__empty { color: var(--muted); font-size: 13px; }

/* The tabs' columns run edge to edge, as the header does: the panels
   give up their gutter while one of these is the open one. */
.workspace-panels:has(> .workspace-panel:not([hidden]) > :is(.pitch-overview, .pitch-research, .pitch-notes, .pitch-ops, .candidate-overview, .candidate-research)) {
  padding-inline: 0;
  padding-top: 0;
}

/* Overview: the phone's order in the document, laid into two columns at
   desktop. Short sections don't stretch to their row, and Why this company,
   reliably the tall one, spans two; the rule between the columns is the
   grid's own, so it runs the full height whatever the rows do. */
.pitch-overview {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
  grid-template-areas: "next why" "glance why" "stands people";
  align-items: start;
}
.pitch-overview::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: min(560px, 50%);
  border-left: 1px solid var(--line);
}
.pitch-overview__next { grid-area: next; }
.pitch-overview__why-group { grid-area: why; }
.pitch-overview__glance { grid-area: glance; }
.pitch-overview__people { grid-area: people; }
.pitch-overview__stands { grid-area: stands; }
.pitch-overview__next > .section-label { color: var(--accent); }
.pitch-next__detail { color: var(--muted); font-size: 13px; line-height: 20px; }
.pitch-next__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pitch-next__actions:empty { display: none; }
.pitch-why__verdict { max-width: 640px; color: var(--fg); font-size: 16px; line-height: 24px; }
.pitch-why__stats { gap: 24px; }
.pitch-why__unknown { color: var(--warning); font-size: 13px; line-height: 20px; }

/* Key and value rows, a hairline between them. */
.pitch-facts { display: grid; margin: 0; }
.pitch-facts > div {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.pitch-facts > div:last-child { border-bottom: 0; }
.pitch-facts dt { color: var(--faint); font-size: 13px; }
.pitch-facts dd { margin: 0; color: var(--fg); font-size: 14px; overflow-wrap: anywhere; }

.pitch-timeline { display: grid; margin: 0; padding: 0; list-style: none; }
.pitch-timeline li {
  display: grid;
  grid-template-columns: 56px 84px minmax(0, 1fr);
  gap: 16px;
  padding: 8px 0;
  font-size: 13px;
}
.pitch-timeline__when { color: var(--faint); font-variant-numeric: tabular-nums; }
.pitch-timeline__kind { color: var(--fg); font-weight: 500; }
.pitch-timeline__detail { color: var(--muted); }

/* People in play: four seats across, then the ways in. */
.pitch-seats { display: grid; gap: 12px; }
.pitch-seats__intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
/* Each seat's card fills its cell, so a row of them lines up. */
.pitch-seat { display: grid; }
.pitch-seats__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(112px, 100%), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pitch-ways-group,
.pitch-ways { display: grid; }
.pitch-ways__row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.pitch-ways-group > :last-child .pitch-ways__row:last-child,
.pitch-ways-group > .pitch-ways__row:last-child { border-bottom: 0; }
.pitch-ways__key {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--faint);
  font-size: 13px;
  font-weight: 400;
}
.pitch-ways__value { display: grid; gap: 8px; min-width: 0; font-size: 14px; }
.pitch-ways__value > * { margin: 0; }
.pitch-ways__note { color: var(--muted); font-size: 13px; line-height: 20px; }
.pitch-ways .path-list { margin: 0; }

/* Research: news on the right, the machine work down the left. */
.pitch-research {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
  grid-template-areas: "icp news" "pain news" "reach news" "runs news";
  grid-template-rows: auto auto auto 1fr;
}
.pitch-research__news { grid-area: news; border-bottom: 0; }
.pitch-research__icp { grid-area: icp; }
.pitch-research__pain { grid-area: pain; }
.pitch-research__reach { grid-area: reach; }
.pitch-research__runs { grid-area: runs; }
:is(.pitch-research__icp, .pitch-research__pain, .pitch-research__reach, .pitch-research__runs) { border-right: 1px solid var(--line); }
.pitch-icp,
.pitch-pain,
.pitch-news { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.pitch-icp > *,
.pitch-pain > *,
.pitch-news > * { margin: 0; }
.pitch-icp__details summary { color: var(--muted); font-size: 12px; cursor: pointer; }
.pitch-icp__details ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 18px; }
.pitch-pain__headline { font-weight: 500; }
.pitch-pain__advice { color: var(--muted); line-height: 21px; }
.pitch-pain__hook { display: grid; gap: 8px; }
.pitch-pain__hook-title { margin: 0 auto 0 0; padding: 0; border: 0; font-size: 13px; font-weight: 500; }
.pitch-runs__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* A coverage bar in the ICP table: the bar, then its number. */
.meter--coverage { flex-direction: row-reverse; align-items: center; gap: 8px; }
.meter--coverage .meter__track { flex: 1; }
.meter--coverage .meter__value { min-width: 32px; }

.pitch-stories { display: grid; gap: 12px; }
.pitch-stories__shelves { font-size: 13px; }
.pitch-story__source { color: var(--faint); font-size: 12px; }
.pitch-story__summary { color: var(--muted); }
.pitch-story__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pitch-story__links { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.pitch-story__open { color: var(--accent); }
.pitch-story__actions .review-live-frame { flex-basis: 100%; }
.pitch-stories__list { margin: 0; padding: 0; list-style: none; }
.pitch-stories__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.pitch-stories__open {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
  color: var(--fg);
  text-decoration: none;
}
.pitch-stories__open:hover .pitch-stories__title { text-decoration: underline; }
.pitch-stories__title { font-size: 14px; }
.pitch-stories__meta { color: var(--faint); font-size: 12px; }
.pitch-stories__verdicts { display: flex; flex: none; gap: 4px; }

/* One column below the two columns' combined width, in the phone's order. */
@media (max-width: 1100px) {
  .pitch-research {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: none;
    grid-template-rows: none;
  }
  .pitch-research > * { grid-area: auto; border-right: 0; }
  /* One column, in the document's order, which is the phone's. */
  .pitch-overview { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; }
  .pitch-overview > * { grid-area: auto; }
  .pitch-overview::before { content: none; }
  .pitch-research__news { border-bottom: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .pitch-header { padding: 14px 16px; }
  .pitch-header__title { font-size: 20px; line-height: 26px; }
  .pitch-header__meta { font-size: 13px; line-height: 19px; }
  .pitch-section { padding: 16px; }
  .pitch-facts > div,
  .pitch-ways__row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pitch-seats__list { grid-template-columns: minmax(0, 1fr); }
  .pitch-timeline li { grid-template-columns: 52px minmax(0, 1fr); }
  .pitch-timeline__detail { grid-column: 2; }
  .pitch-next__actions { flex-direction: column; align-items: stretch; }
  .pitch-next__actions .button { width: 100%; min-height: 40px; justify-content: center; white-space: normal; }
  .pitch-story__actions > .button-form,
  .pitch-story__actions > .button-form .button { flex: 1; min-height: 40px; justify-content: center; }
  .pitch-stories__verdicts { display: none; }
  .pitch-stories__row { padding-inline: 0; }
  .pitch-story__links { margin-left: 0; }
}
/* === end C1c === */
/* === C2c: candidate detail and Research (appendix discover-candidates.md 13 to 15) === */
/* The pitch header's shape, with the status and Rails words under the meta,
   and the phone's actions under both (the view bar carries them at desktop). */
.candidate-header { align-items: flex-start; }
.candidate-header__slug { padding: 0; background: none; color: var(--faint); font-family: var(--font-mono); font-size: 12px; }
.candidate-header__status { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0; font-size: 13px; }
.candidate-header__phone-actions { display: none; }

/* Overview: the phone's order in the document; at desktop the score and the
   previews take a 380px side column, packed from the top, and the banners
   run across both. A side section spans the rows of the main ones beside
   it, so a tall preview doesn't open a gap under a short summary. The rule
   between the columns is the grid's own. */
.candidate-overview {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  grid-auto-flow: row dense;
  align-items: start;
}
.candidate-overview::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-end: 380px;
  border-left: 1px solid var(--line);
}
.candidate-overview > * { grid-column: 1; }
.candidate-overview > .candidate-overview__score { grid-column: 2; }
/* The next step and the score share the first row; both fill it, so its
   rule lands under the taller and the summary follows on. */
.candidate-overview > :is(.candidate-overview__next, .candidate-overview__score) { align-self: stretch; }
.candidate-overview > .candidate-overview__preview { grid-column: 2; grid-row: span 6; }
.candidate-overview__banners { position: relative; z-index: 1; grid-column: 1 / -1; background: var(--bg); }
.candidate-overview__next > .section-label { color: var(--accent); }
.candidate-next { display: grid; gap: 4px; max-width: 640px; padding-left: 14px; border-left: 2px solid var(--accent); }
.candidate-next__title { margin: 0; font-size: 16px; font-weight: 500; line-height: 22px; }
.candidate-next__detail { margin: 0; color: var(--muted); font-size: 14px; line-height: 21px; }
.candidate-overview__prose { max-width: 640px; font-size: 14px; line-height: 21px; overflow-wrap: anywhere; }
.candidate-overview__list { display: grid; gap: 6px; margin: 0; padding-left: 16px; font-size: 13px; line-height: 18px; }
.candidate-overview__list li::marker { color: var(--faint); }
.candidate-overview__lead .workspace-card { padding: 0; border: 0; background: none; }
.candidate-score { display: grid; gap: 8px; }
.candidate-score > * { margin: 0; }
.candidate-score__path { font-size: 16px; font-weight: 500; }
.candidate-score__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.candidate-score__rubric { flex-basis: 100%; }
.candidate-score__rubric summary { color: var(--muted); font-size: 13px; cursor: pointer; }
.candidate-score__rubric table { width: 100%; margin: 8px 0; font-size: 12px; }

/* Research: the evidence and the runs down a 440px column, the open document
   beside them. The split's frame lays no box, so its list and reader are
   cells of this grid. */
.candidate-research {
  display: grid;
  grid-template-columns: 440px minmax(0, 1fr);
  grid-auto-flow: row dense;
  align-items: start;
}
.candidate-research .review-split { display: contents; }
.candidate-research > *,
.candidate-research .review-list { grid-column: 1; border-right: 1px solid var(--line); }
.candidate-research .review-reader { grid-column: 2; grid-row: span 2; border-bottom: 0; }
.candidate-research > :is(.candidate-research__banner, .candidate-research__empty) { grid-column: 1 / -1; border-right: 0; }
.candidate-research__empty .empty-state {
  align-items: flex-start;
  padding: 48px 32px 32px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  text-align: left;
}
.candidate-research__empty .empty-state__body { max-width: 560px; }
.review-list { padding-inline: 0; }
.review-list > :is(.section-label, .pitch-section__caption, .pitch-section__empty, .review-unreadable) { margin-inline: 32px 24px; }
.review-unreadable { color: var(--faint); font-size: 12px; }
.review-unreadable summary { cursor: pointer; }
.review-unreadable ul { margin: 6px 0 0; padding-left: 18px; }
.review-list .list-row s { color: var(--faint); }
.review-reader { gap: 18px; }
.review-reader__head { display: grid; gap: 4px; }
.review-reader__title { margin: 0; font-size: 20px; font-weight: 700; line-height: 26px; overflow-wrap: anywhere; }
.review-reader__url { color: var(--accent); font-size: 13px; overflow-wrap: anywhere; }
.review-reader__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.review-reader__actions .review-live-frame { flex-basis: 100%; }
.review-reader__actions .button[aria-pressed="true"] { border-color: var(--accent); color: var(--fg); }
.review-reader__excerpt { display: grid; gap: 8px; }
.review-reader__excerpt > * { margin: 0; }
.review-reader__body { max-width: 640px; margin: 0; padding-left: 14px; border-left: 2px solid var(--line-strong); font-size: 14px; line-height: 22px; overflow-wrap: anywhere; }
.review-reader__body + .review-reader__body { padding-top: 10px; }
.candidate-research__runs .pitch-section__header { min-height: 28px; }

/* One column below the two columns' combined width, in the phone's order. */
@media (max-width: 1100px) {
  .candidate-overview,
  .candidate-research { grid-template-columns: minmax(0, 1fr); }
  .candidate-overview > *,
  .candidate-overview > :is(.candidate-overview__score, .candidate-overview__preview),
  .candidate-research > *,
  .candidate-research .review-list,
  .candidate-research .review-reader { grid-column: 1; grid-row: auto; border-right: 0; }
  .candidate-overview::before { content: none; }
  .candidate-research .review-reader { border-bottom: 1px solid var(--line); }
}
@media (width < 768px) {
  .candidate-header__phone-actions {
    display: grid;
    flex-basis: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  /* The primary runs full width, and so does a lone secondary under it. */
  .candidate-header__phone-actions > :first-child:is(.button--primary, :has(.button--primary)),
  .candidate-header__phone-actions > :nth-child(2):last-child { grid-column: 1 / -1; }
  .candidate-header__phone-actions .button { width: 100%; justify-content: center; }
  .candidate-research__queue { display: none; }
}
@media (max-width: 600px) {
  .candidate-header { gap: 8px 16px; }
  .candidate-header__slug { display: none; }
  .review-list > :is(.section-label, .pitch-section__caption, .pitch-section__empty, .review-unreadable) { margin-inline: 16px; }
  .candidate-research__empty .empty-state { padding: 40px 16px; }
  /* Qualify, Drop and Exclude share a row; Edit next step sits under it. */
  .candidate-overview__next .pitch-next__actions { flex-flow: row wrap; }
  .candidate-overview__next .pitch-next__actions > :is(.button-form, button.button) { flex: 1; }
  .candidate-next__edit { flex-basis: 100%; }
}
/* === end C2c === */
/* === C1i: merge person (appendix people-clients.md 3) === */
/* The header band: what this step does, then where the operator is in the
   two. At 390 the step line stands in for the indicator. */
.merge-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.merge-header__text { min-width: 0; }
.merge-header h1 { margin: 0; font-size: 20px; font-weight: 700; line-height: 24px; }
.merge-header__text p { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 20px; }
.merge-steps { display: flex; align-items: center; gap: 12px; margin: 0; padding: 0; list-style: none; }
.merge-steps__step { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 13px; }
.merge-steps__step + .merge-steps__step::before {
  content: "";
  width: 24px;
  border-top: 1px solid var(--line-strong);
}
.merge-steps__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 12px;
}
.merge-steps__step[aria-current] { color: var(--fg); font-weight: 500; }
.merge-steps__step[aria-current] .merge-steps__number { border-color: var(--accent); background: var(--accent); color: var(--bg); }
.merge-steps__step--confirm[aria-current] .merge-steps__number { border-color: var(--danger); background: var(--danger); }
.merge-header__phone-step { display: none; margin: 0; color: var(--accent); font-size: 12px; font-weight: 500; }
.merge-header__phone-step span { margin-left: 6px; color: var(--faint); font-weight: 400; }

.merge-body { padding-top: 24px; }
.merge-section,
.merge-confirm,
.merge-preview { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.merge-confirm { gap: 28px; max-width: 880px; }
.merge-rule,
.merge-preview__note,
.merge-plan__fold { max-width: 640px; margin: 0; color: var(--muted); font-size: 13px; line-height: 19px; }
.merge-plan .list-row__lane { font-size: 13px; }

/* Choosing: the picker beside the preview of whoever is picked. */
.merge-choose { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 32px; }
.merge-picker { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.merge-picker__none,
.merge-picker__caption { margin: 0; color: var(--faint); font-size: 12px; line-height: 16px; }
.merge-preview { gap: 24px; }
.merge-preview__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.merge-preview__card--deleted .content-card__meta { color: var(--danger); }
.merge-preview__card--kept .content-card { border-color: var(--accent); }
.merge-preview__card--kept .content-card__meta { color: var(--good); }

/* The phone's step actions, at the foot; at desktop they are the view bar's. */
.merge-footer { display: none; }
@media (width < 768px) {
  .merge-steps { display: none; }
  .merge-header__phone-step { display: block; order: -1; }
  .merge-header h1 { font-size: 16px; line-height: 20px; }
  .merge-choose { grid-template-columns: minmax(0, 1fr); }
  .merge-choose .merge-preview { display: none; }
  .merge-footer {
    position: sticky;
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 0;
    background: var(--surface);
  }
}
/* === end C1i === */

/* Notes and Ops: two columns at desktop, the left 560 with a rule beside it,
   each the phone's order top to bottom (appendix pitches.md 7 and 8). */
.pitch-notes,
.pitch-ops {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 1fr);
  align-items: stretch;
}
.pitch-notes__working,
.pitch-ops__column:first-child { min-width: 0; border-right: 1px solid var(--line); }
.pitch-ops__column { min-width: 0; }

.pitch-notes__working .note-list { margin: 0; }
.pitch-notes__working .note { padding: 16px 32px; }
.pitch-notes__empty { padding: 24px 32px; }
.pitch-notes__narrative .narrative-body { max-width: 640px; margin: 0; font-size: 14px; line-height: 22px; }
.pitch-notes__save-note { margin: 0; color: var(--muted); font-size: 13px; }

.pitch-ops__state { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.pitch-ops__status { color: var(--fg); font-size: 16px; font-weight: 500; }
.pitch-ops__state-detail { color: var(--muted); font-size: 13px; }
.pitch-ops__buttons,
.pitch-ops__close { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pitch-ops__close-label { min-width: 48px; color: var(--faint); font-size: 13px; }
.pitch-ops__later { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 8px; }
.pitch-ops__later .button { justify-self: start; }
.pitch-ops__crm { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.pitch-ops__id { font-family: var(--font-mono); font-size: 13px; }
.pitch-ops__none { color: var(--faint); font-size: 13px; }
.pitch-ops__crm > :is(.hubspot-link, .pitch-ops__link) { margin-left: auto; color: var(--accent); font-size: 13px; }
.pitch-ops__source { display: grid; gap: 4px; }
.pitch-ops__path { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.pitch-ops__disclosures { display: grid; border-top: 1px solid var(--line); }
.pitch-ops__disclosure { border-bottom: 1px solid var(--line); }
.pitch-ops__disclosure > summary {
  padding: 12px 0;
  color: var(--fg);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}
.pitch-ops__summary-note { margin-left: 8px; color: var(--faint); font-size: 13px; font-weight: 400; }
.pitch-ops__fields { display: grid; gap: 16px; padding-bottom: 16px; }
.pitch-ops__fields .form-grid { margin: 0; }
.pitch-ops__disclosure .frontmatter-pre { margin: 0 0 16px; }

@media (max-width: 1100px) {
  .pitch-notes,
  .pitch-ops { grid-template-columns: minmax(0, 1fr); }
  .pitch-notes__working,
  .pitch-ops__column:first-child { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 600px) {
  .pitch-notes__working .note { padding: 12px 16px; }
  .pitch-notes__empty { padding: 16px; }
  .note-form__submit { justify-self: stretch; min-height: 40px; justify-content: center; }
  .pitch-ops__later { grid-template-columns: minmax(0, 1fr); }
  /* The phone's 40px buttons, two to a row: ButtonComponent's size can't
     change at a breakpoint, so the row sets it. */
  .pitch-ops__buttons > :is(.button, .button-form),
  .pitch-ops__close > :is(.button, .button-form) { flex: 1 1 calc(50% - 4px); }
  :is(.pitch-ops__buttons, .pitch-ops__close, .pitch-ops__later) .button {
    width: 100%;
    min-height: 40px;
    justify-content: center;
  }
  .pitch-ops__close-label { display: none; }
  .pitch-ops__crm > :is(.hubspot-link, .pitch-ops__link) { margin-left: 0; }
}
/* === end C1d === */

/* === C-gate G3: the pitch page at 390 (appendix pitches.md 5 to 8) ===
   Each section condensed the way the phone mocks draw it, and nothing moved:
   what a phone does without is hidden on it, what only a phone shows is
   hidden at desktop, so one of each is read at either width and the reading
   order is the document's. The folds (fold_controller) stand open at
   desktop, their summaries hidden, and close on a phone. */
.pitch-fold__summary,
.pitch-pain__sources-short,
.pitch-ops__and-sync { display: none; }
/* Open, the rest of the signals continue the list above them: the margin
   takes back .pitch-section's 12px gap. */
.pitch-signals__more { margin-top: -12px; }
.pitch-signals__more > .list { border-top: 0; }

@media (width < 768px) {
  .pitch-signals__more { margin-top: 0; }
  .pitch-fold__summary {
    display: block;
    padding-top: 8px;
    color: var(--muted);
    font-size: 13px;
    list-style: none;
    cursor: pointer;
  }
  .pitch-fold__summary::-webkit-details-marker { display: none; }
  .pitch-fold__summary:hover { color: var(--fg); }

  /* Overview: the axes as one line, value then what it measures. */
  .pitch-why__stats { display: block; color: var(--muted); font-size: 12px; line-height: 18px; }
  .pitch-why__stats .stat { display: inline-flex; flex-direction: row; gap: 4px; }
  .pitch-why__stats .stat + .stat { margin-left: 4px; }
  .pitch-why__stats .stat + .stat::before { content: "·" / ""; }
  .pitch-why__stats :is(.stat__value, .stat__label) { color: inherit; font-size: inherit; font-weight: 400; line-height: inherit; }

  /* At a glance: each fact beside its name, one line, the map row dropped. */
  .pitch-overview__glance .pitch-facts > div { display: flex; justify-content: space-between; gap: 12px; }
  .pitch-overview__glance .pitch-facts dt { flex: none; }
  .pitch-overview__glance .pitch-facts dd { font-size: 13px; text-align: right; }
  .pitch-overview__glance .pitch-facts > .pitch-facts__wide-only { display: none; }

  /* A signal in two lines: what it is, then the evidence and its source. */
  .pitch-overview__signals .list-row__text { display: block; }
  .pitch-overview__signals .list-row__title { display: block; }
  .pitch-overview__signals :is(.list-row__meta, .list-row__folded) { display: inline; }
  .pitch-overview__signals .list-row__meta + .list-row__folded::before { content: " · " / ""; }

  /* The seats as rows: the name, then the seat and the role, no count. */
  .pitch-seats__list { gap: 0; }
  .pitch-seat + .pitch-seat { border-top: 1px solid var(--line); }
  .pitch-seat .content-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 4px;
    padding: 9px 0;
    border: 0;
    border-radius: 0;
    background: none;
  }
  .pitch-seat .content-card__header { display: contents; }
  .pitch-seat .content-card__title { grid-column: 1 / -1; }
  .pitch-seat :is(.content-card__meta, .content-card__body) { padding: 0; color: var(--muted); font-size: 12px; line-height: 16px; }
  .pitch-seat .content-card__body { display: block; }
  .pitch-seat .content-card__body::before { content: "· " / ""; }
  .pitch-seat__count { display: none; }

  /* Research: the bucket table without its tags and bars, the number kept. */
  .pitch-icp__tags,
  .pitch-icp .meter__track { display: none; }
  /* Its cards as one line a bucket: the bucket, its fit, its coverage, the
     cells' labels left to a screen reader (the caption says which is which),
     hidden as .sr-only hides, since the table renders them. */
  .pitch-icp .data-table--cards .data-table__body { gap: 0; }
  .pitch-icp .data-table--cards .data-table__body .data-table__row {
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: none;
  }
  .pitch-icp .data-table--cards .data-table__body .data-table__row::before { content: none; }
  .pitch-icp .data-table--cards .data-table__body :is(.data-table__cell, .data-table__cell--primary) { grid-row: 1; grid-column: auto; padding: 0; }
  .pitch-icp .data-table--cards .data-table__body .data-table__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .pitch-pain__sources { display: none; }
  .pitch-pain__sources-short { display: block; }
  .pitch-runs__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pitch-runs__actions > :first-child { grid-column: 1 / -1; }
  .pitch-runs__actions .button { width: 100%; min-height: 40px; justify-content: center; }

  /* Ops: CRM and sync read as one section under one label, the sync
     warning as a line of text rather than a box. */
  .pitch-ops__and-sync { display: inline; }
  .pitch-ops__crm-section { padding-bottom: 0; border-bottom: 0; }
  .pitch-ops__crm-section > .pitch-section__lede,
  .pitch-ops__sync > .section-label { display: none; }
  .pitch-ops__crm-section .pitch-section__header > .button-form { flex-basis: 100%; }
  .pitch-ops__crm-section .pitch-section__header .button { width: 100%; min-height: 40px; justify-content: center; }
  .pitch-ops__sync .banner { min-height: 0; padding: 0; border: 0; background: none; }
  .pitch-ops__sync .banner__message { color: var(--warning); font-size: 12px; line-height: 18px; }
}
/* === end C-gate G3 === */

/* === C1e: Close as won === */
.close-won { display: grid; gap: 16px; }
.close-won__lede { margin: 0; color: var(--muted); font-size: 14px; line-height: 20px; }
.close-won__lede a { color: var(--accent); }
/* === end C1e === */


/* === B6d: Today (appendix today.md) ===
   The queue, 480px, beside the work pane, both the height of the window
   under the view bar. On a phone they take turns: the queue alone, or, once
   a row is chosen, its pane alone. */
.today {
  display: grid;
  grid-template-columns: 480px minmax(0, 1fr);
  min-height: calc(100dvh - 52px);
}
.today__queue {
  min-width: 0;
  border-right: 1px solid var(--line);
}
.today__tabs {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-inline: 20px;
  border-bottom: 1px solid var(--line);
}
.today__tabs > .tabs {
  flex: 1;
  min-width: 0;
  border-bottom: 0;
}
.today__tabs > .chip { flex: none; }
/* The week's requests, a compact meter beside the number (appendix today.md 1). */
.view-bar__stats li:has(> .meter) { display: flex; align-items: center; gap: 8px; }
.view-bar__stats .meter { inline-size: 64px; }
.view-bar__stats .meter__track { height: 4px; border-radius: 2px; }
.today__list { padding-block: 8px; }
.today__stats { display: none; }
.today__notice {
  margin: 0;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.list__group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 10px 20px 6px;
}
.list__group:not(:first-child) > .list__group-head,
.list__group:not(:first-child).list__group-head { padding-top: 18px; }
.list__group-head .section-label { margin: 0; }
.list__group-count { color: var(--faint); font-size: 12px; }
.list__group + .list-row { border-top: 0; }
.view-bar__stat-link { color: inherit; text-decoration: none; }
.view-bar__stat-link:hover .stat__label { color: var(--fg); }
.today-composer .content-card__footer { align-items: center; }
.today-composer__help { flex: 1; margin: 0; color: var(--faint); font-size: 12px; }
.today-composer__words { margin: 0; white-space: pre-wrap; font-size: 14px; line-height: 1.5; }
.today__list > .list { border-block: 0; }
.today__list > .empty-state { margin: 20px; }
.today__job-changes {
  display: grid;
  gap: 8px;
  padding: 18px 20px 8px;
  border-top: 1px solid var(--line);
}
.today__job-changes h2 { margin: 0; }

.today__pane {
  min-width: 0;
  background: var(--surface);
}
.today-pane__header {
  display: flex;
  gap: 24px;
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--line);
}
.today-pane__identity {
  display: grid;
  flex: 1;
  gap: 6px;
  min-width: 0;
}
.today-pane__eyebrow {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .06em;
  line-height: 18px;
  text-transform: uppercase;
}
.today-pane__title {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: var(--font-headline);
  font-size: 28px;
  letter-spacing: -.02em;
  line-height: 34px;
  overflow-wrap: anywhere;
}
.today-pane__subline { margin: 0; color: var(--muted); font-size: 14px; }
.today-pane__actions {
  display: flex;
  flex: none;
  gap: 8px;
  align-items: flex-start;
  padding-top: 4px;
}
.today-pane__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
}
.today-pane__work {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
  padding: 24px 32px;
}
.today-pane__next:empty { display: none; }
.today-pane__facts {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 24px;
  border-left: 1px solid var(--line);
}
.today-pane__facts > .section-label:not(:first-child) { margin-top: 12px; }
.today-pane__why { margin: 0; color: var(--muted); font-size: 13px; line-height: 20px; }
.today-pane__departure { margin: 0 0 12px; color: var(--warning); font-size: 13px; line-height: 20px; }
.today-pane__context { display: grid; gap: 8px; margin: 0; font-size: 13px; }
.today-pane__context > div { display: flex; justify-content: space-between; gap: 12px; }
.today-pane__context dt { color: var(--faint); }
.today-pane__context dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
/* Mark engaged and Mark declined, stacked full width at the foot of the
   facts (appendix today.md 1). */
.today-pane__stage-actions { display: grid; gap: 8px; margin-top: auto; padding-top: 12px; }
.today__nothing {
  display: grid;
  place-items: center;
  height: 100%;
  margin: 0;
  color: var(--faint);
  font-size: 14px;
}
.today__pane:has(> .today__nothing, > .today__caught-up) { background: var(--bg); }
.today__caught-up {
  display: grid;
  justify-items: start;
  gap: 12px;
  max-width: 560px;
  padding: 56px 48px;
}
.today__caught-up > .icon { width: 28px; height: 28px; color: var(--good); }
.today__caught-up-title {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: var(--font-headline);
  font-size: 28px;
  line-height: 34px;
}
.today__caught-up-body { margin: 0; color: var(--muted); font-size: 14px; }

@media (width < 1024px) {
  .today-pane__body { grid-template-columns: minmax(0, 1fr); }
  .today-pane__facts { border-top: 1px solid var(--line); border-left: 0; }
}
@media (width < 768px) {
  .today { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .today__queue { border-right: 0; }
  /* The tabs take the row; the chips beside them wrap to one of their own. */
  .today__tabs { flex-wrap: wrap; row-gap: 8px; padding-inline: 16px; padding-bottom: 8px; }
  .today__tabs > .tabs { flex-basis: 100%; }
  .today .list__group-head { padding-inline: 16px; }
  .today__stats {
    display: flex;
    gap: 18px;
    margin: 0;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    list-style: none;
  }
  .today__notice { padding-inline: 16px; }
  .today--item-open > .today__queue,
  .today:not(.today--item-open) > .today__pane:not(:has(.today__caught-up)) { display: none; }
  .today__caught-up-actions { display: none; }
  /* The composer stays at the foot of the screen, over the thread. */
  .today-composer { position: sticky; bottom: 0; z-index: 1; padding-bottom: 12px; background: var(--surface); }
  .today-composer__help { display: none; }
  .today-composer .button { min-height: 44px; }
  .today-pane__header { padding: 14px 16px; }
  .today-pane__title { font-size: 20px; line-height: 26px; }
  .today-pane__work { padding: 16px; }
  .today-pane__facts { padding: 16px; }
  .today__caught-up { padding: 32px 16px; }
  .today__caught-up-title { font-size: 20px; line-height: 26px; }
}
/* === end B6d === */
/* === C4a: Clients === */
/* Client detail (appendix people-clients.md 5): the header, then the rail
   and the main column, edge to edge like a pitch's. The record header is a
   project's too (C4c). */
main > :is(.record-header, .client-tabs, .client-detail) { margin-inline: calc(-1 * var(--gutter)); }
main > .record-header:first-child { margin-top: calc(-1 * var(--gutter)); }
main > .client-detail:last-child { margin-bottom: calc(-1 * var(--gutter)); }
.record-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  padding: 28px 32px;
  border-bottom: 1px solid var(--line);
}
.record-header__identity { flex: 1; min-width: 0; }
.record-header__title {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: var(--font-headline);
  font-size: 28px;
  font-weight: 400;
  line-height: 34px;
  letter-spacing: -.02em;
}
.record-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.record-header__tier { display: inline-flex; align-items: center; gap: 8px; }
.record-header__slug { color: var(--faint); font-family: var(--font-mono); font-size: 13px; }
.record-header__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  margin: 0;
}
.record-header__facts > div { display: grid; gap: 4px; }
.record-header__facts dd { margin: 0; color: var(--fg); font-size: 16px; font-weight: 500; line-height: 20px; }
.record-header__facts dd .status-text { font-size: inherit; line-height: inherit; }

/* The phone's tab strip; a desktop shows every section at once. */
.client-tabs { display: none; }

.client-detail__banner { padding: 24px 32px 0; }
.client-detail__banner .banner { height: auto; min-height: 44px; padding-block: 10px; }
.client-detail__banner .banner__action { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.client-rail,
.client-detail__main {
  display: grid;
  align-content: start;
  gap: 28px;
  min-width: 0;
  padding: 24px 32px 32px;
}
.client-detail__main { gap: 32px; }
.client-section { display: grid; gap: 12px; min-width: 0; }
.client-section > * { margin: 0; }
.client-section__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: inherit;
}
.client-section__count { color: var(--faint); font-size: 13px; font-weight: 400; }
.client-section__text { color: var(--muted); font-size: 13px; line-height: 20px; }
.client-section__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.client-facts { display: grid; margin: 0; }
.client-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.client-facts dt { color: var(--muted); }
.client-facts dd { min-width: 0; margin: 0; color: var(--fg); text-align: right; overflow-wrap: anywhere; }
.client-facts__link { font-weight: 500; }
.client-billing__row { display: flex; gap: 8px; }
.client-billing__row .input { flex: 1; min-width: 0; font-family: var(--font-mono); }
.client-billing__heading { margin: 4px 0 0; padding: 0; border: 0; font-size: 13px; font-weight: 500; }
.client-portal__link code { overflow-wrap: anywhere; }
.client-primary { color: var(--accent); font-size: 12px; font-weight: 500; }
.client-rail__foot { display: none; }
.client-detail .note-list { margin: 0; }

@media (width >= 1100px) {
  /* The rail beside the rest, the banner over the main column. The
     overview's box steps aside so its banner and rail take grid cells of
     their own: the phone's order stays the document's. */
  .client-detail {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
  }
  .client-detail__overview { display: contents; }
  .client-detail__banner { grid-column: 2; grid-row: 1; }
  .client-rail { grid-column: 1; grid-row: 1 / span 2; border-right: 1px solid var(--line); }
  .client-detail__main { grid-column: 2; grid-row: 2; }
}

@media (width < 768px) {
  .record-header { gap: 10px; padding: 16px; }
  /* The top bar carries the name, and Details the primary contact. */
  .record-header .avatar,
  .record-header__title,
  .record-header__facts > .record-header__wide { display: none; }
  .record-header__identity { flex-basis: 100%; }
  .record-header__meta { margin: 0; font-size: 13px; }
  .record-header__facts { gap: 12px 24px; }
  .record-header__facts dd { font-size: 14px; line-height: 18px; }
  .client-tabs { display: flex; gap: 20px; padding-left: 16px; }
  .client-detail__banner { padding: 16px 16px 0; }
  /* The message over its two actions, the push full width. */
  .client-detail__banner .banner { flex-wrap: wrap; align-items: flex-start; }
  .client-detail__banner .banner__message { flex: 1 1 0; min-width: 0; }
  .client-detail__banner .banner__action { flex-basis: 100%; }
  .client-detail__banner .banner__action > * { flex: 1 1 100%; }
  .client-detail__banner .banner__action .button { width: 100%; }
  .client-rail,
  .client-detail__main { gap: 24px; padding: 16px 16px 32px; }
  .client-detail__wide { display: none; }
  .client-rail__foot {
    display: grid;
    justify-items: start;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
  .client-billing__row { flex-direction: column; }
  .client-billing__row .button,
  .client-section__actions .button { width: 100%; }
  /* One tab's sections at a time. */
  .client-detail:not([data-tab=overview]) [data-panel=overview],
  .client-detail:not([data-tab=projects]) [data-panel=projects],
  .client-detail:not([data-tab=people]) [data-panel=people],
  .client-detail:not([data-tab=notes]) [data-panel=notes] { display: none; }
}
/* The tier switch takes the rail's width, its Save under it. */
.client-tier { display: grid; justify-items: start; gap: 8px; }
.client-tier .segmented { display: flex; justify-self: stretch; }
.client-tier .segmented__option { flex: 1; justify-content: center; }
/* === end C4a === */

/* === C1j: Person page === */
/* Header, then a 360px side column of what Hub holds about them beside the
   timeline, each region edge to edge between hairlines (appendix person.md).
   On a phone the header is a summary and the two columns are views of one
   another, chosen by the Timeline / Profile control. */
main > .person-page { margin: calc(-1 * var(--gutter)); }
.person-page__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 28px 32px 22px;
  border-bottom: 1px solid var(--line);
}
.person-page__identity { display: flex; align-items: center; gap: 18px; min-width: 0; }
.person-page__name { min-width: 0; }
.person-page__tags { margin: 8px 0 0; padding: 0; list-style: none; }
.person-page__title {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}
.person-page__headline { margin: 4px 0 0; color: var(--muted); font-size: 14px; line-height: 20px; }
.person-page__facts { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0; }
.person-page__fact { display: flex; flex-direction: column; gap: 4px; }
.person-page__fact dt {
  color: var(--faint);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.person-page__fact dd { margin: 0; font-size: 14px; line-height: 20px; }
.person-page__band { padding: 20px 32px; border-bottom: 1px solid var(--line); }
/* The Apollo run's band: a line and its one action. */
.person-page__enrichment { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.person-page__enrichment p { margin: 0; font-size: 13px; }
.person-page__phone-actions { display: none; }
.person-page__views { display: none; }
.person-page__body { display: grid; grid-template-columns: 360px minmax(0, 1fr); }
.person-page__side {
  display: flex;
  flex-direction: column;
  gap: 26px;
  min-width: 0;
  padding: 24px 32px;
  border-right: 1px solid var(--line);
}
.person-page__main { min-width: 0; padding: 24px 32px; }
.person-page__section { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.person-page__section > :is(.list, form, .person-page__more, .content-card, ul, div) { align-self: stretch; }
.person-page__section .section-label { margin: 0; }
.person-page__subhead { margin: 6px 0 0; color: var(--muted); font-size: 13px; font-weight: 500; }
.person-page__empty,
.person-page__help { margin: 0; color: var(--faint); font-size: 12px; line-height: 18px; }
.person-page__partner { display: flex; gap: 8px; margin: 0; font-size: 12px; }
.person-page__mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.person-page__relationship { display: flex; gap: 8px; align-items: center; }
.person-page__relationship .select { flex: 1; min-width: 0; }
.person-page__more summary { color: var(--accent); font-size: 12px; cursor: pointer; }
.person-page__more[open] summary { margin-bottom: 10px; }
.person-page__threads { margin: 0; padding-left: 16px; color: var(--muted); font-size: 12px; line-height: 18px; }
/* A row's Edit shows on hover and focus, and always where nothing hovers. */
.person-page__row-edit { opacity: 0; }
.list-row:is(:hover, :focus-within) .person-page__row-edit,
.person-page__row-edit:focus-visible { opacity: 1; }
@media (hover: none) { .person-page__row-edit { opacity: 1; } }
.person-page__actions { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.person-page__actions li { display: flex; flex-direction: column; gap: 4px; }

/* The timeline's filter and composer, and the way to its older pages. */
.timeline__composer { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.timeline__composer-row { display: flex; align-items: center; gap: 8px; }
.timeline__composer .input { flex: 1; min-width: 0; height: 40px; }
/* Only a phone, where the filter control is off, says the filter in words. */
.timeline__filtered { display: none; margin: 0 0 12px; color: var(--faint); font-size: 12px; }
.timeline__pages { display: flex; gap: 8px; padding-top: 4px; }

@media (width < 768px) {
  .person-page__body { grid-template-columns: minmax(0, 1fr); }
  .person-page__side { border-right: 0; }
}
@media (width < 600px) {
  /* The top bar carries the name, so the summary is the role and three
     facts, with the view bar's secondary actions under them. */
  .person-page__header { display: grid; gap: 12px; padding: 16px; }
  .person-page__identity .avatar,
  .person-page__title,
  .person-page__fact--relationship { display: none; }
  .person-page__headline { margin: 0; }
  .person-page__facts { gap: 12px 20px; }
  .person-page__fact dt { font-size: 12px; }
  .person-page__phone-actions { display: inline-flex; justify-self: start; }
  .person-page__views { display: flex; margin: 8px 16px; }
  .person-page__views .segmented__option { flex: 1; justify-content: center; }
  .person-page__band { padding: 16px; }
  .person-page__side,
  .person-page__main { padding: 12px 16px 24px; }
  .person-page:has(#person_view_timeline:checked) .person-page__side,
  .person-page:has(#person_view_profile:checked) .person-page__main { display: none; }
  .timeline__filter,
  .timeline__composer .kbd { display: none; }
  .timeline__filtered { display: block; }
}
/* === end C1j: Person page === */

/* === C4b: Client forms === */
/* A slug or an external id is read character by character. */
.input--mono { font-family: var(--font-mono); }
/* === end C4b === */
/* === C4c: Projects === */
/* The state filter scrolls rather than spill on a narrow screen. */
.list-filters .segmented { max-inline-size: 100%; overflow-x: auto; }

/* Project detail (appendix projects-tasks.md 2): the header, then the main
   column and the side, edge to edge like a client's. */
main > :is(.project-header-actions, .project-tabs, .project-detail) { margin-inline: calc(-1 * var(--gutter)); }
main > .project-detail:last-child { margin-bottom: calc(-1 * var(--gutter)); }
.record-header__meta .chip { max-inline-size: 100%; font-family: var(--font-mono); overflow-wrap: anywhere; }
/* The view bar holds Edit and the push at desktop. */
.project-header-actions { display: none; }
.project-tabs { display: none; }

.project-detail__main,
.project-detail__side {
  display: grid;
  align-content: start;
  gap: 32px;
  min-width: 0;
  padding: 28px 32px 32px;
}
.project-detail__side { gap: 28px; }
.project-section { display: grid; gap: 12px; min-width: 0; }
.project-section > * { margin: 0; }
.project-section__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.project-section__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: inherit;
}
.project-section__count { color: var(--faint); font-size: 12px; font-weight: 400; }
.project-section__action { color: var(--muted); font-size: 13px; }
.project-section__text { color: var(--muted); font-size: 13px; line-height: 20px; }
.project-section__subheading { padding: 0; border: 0; font-size: 13px; font-weight: 500; }
.project-section__list { padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 20px; }
.project-section__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.project-detail__main .project-section:first-child > :not(.project-section__heading) { max-width: 640px; font-size: 14px; line-height: 22px; }
.project-facts { display: grid; margin: 0; }
.project-facts > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.project-facts dt { flex: none; color: var(--faint); }
.project-facts dd { min-width: 0; margin: 0; color: var(--fg); text-align: right; overflow-wrap: anywhere; }
.project-facts dd.project-facts__mono { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.project-state { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.project-state .button-form,
.project-state .button { width: 100%; }
.project-intake { display: grid; gap: 8px; }
.project-intake__title { margin: 0; padding: 0; border: 0; font-size: 14px; font-weight: 500; }
.project-basecamp__row { display: flex; gap: 8px; }
.project-basecamp__row .input { flex: 1; min-width: 0; }

@media (width >= 1100px) {
  .project-detail { display: grid; grid-template-columns: minmax(0, 1fr) 380px; }
  .project-detail__main { border-right: 1px solid var(--line); }
}

@media (width < 768px) {
  .project-header-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
  }
  .project-header-actions .button-form,
  .project-header-actions .button { width: 100%; }
  .project-tabs { display: flex; gap: 20px; padding-left: 16px; }
  .project-detail__main,
  .project-detail__side { gap: 24px; padding: 16px 16px 0; }
  .project-detail__side { padding-bottom: 32px; }
  .project-basecamp__row { flex-direction: column; }
  /* One tab's sections at a time. */
  .project-detail:not([data-tab=overview]) [data-panel=overview],
  .project-detail:not([data-tab=tasks]) [data-panel=tasks],
  .project-detail:not([data-tab=hubspot]) [data-panel=hubspot],
  .project-detail:not([data-tab=intakes]) [data-panel=intakes] { display: none; }
}
/* === end C4c === */
/* === C5a: Conferences list and forms (appendix speaking.md 1, 3) === */
/* The summary band: the stats, then the blackout, the rubric and the
   research sources beside them. */
.conference-summary { align-items: flex-start; }
.conference-context { display: grid; flex: 1 1 420px; gap: 8px; min-width: 0; margin: 0; }
.conference-context > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; }
.conference-context dt { font-family: var(--font-display); font-size: 14px; font-weight: 500; line-height: 18px; color: var(--faint); }
.conference-context dd { margin: 0; color: var(--muted); font-size: 13px; line-height: 18px; overflow-wrap: anywhere; }
/* Each source a 24px target (WCAG 2.5.8), however the line wraps. */
.conference-context__links { display: flex; flex-wrap: wrap; gap: 0 14px; margin: -3px 0; padding: 0; list-style: none; }
.conference-context__links a { display: inline-block; padding-block: 3px; color: var(--accent); }
.conference-paste-toggle[aria-expanded="true"] { border-color: var(--accent); }
/* Paste research rows: what to paste on the left, the rows on the right. */
.paste-rows {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 32px;
  margin: 0 0 16px;
  padding: 4px 0 20px;
  border-bottom: 1px solid var(--line);
}
.paste-rows[hidden] { display: none; }
.paste-rows__about p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 19px; }
.paste-rows__about .paste-rows__format {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  font-size: 12px;
  line-height: 18px;
}
.paste-rows__about .paste-rows__help { color: var(--faint); font-size: 12px; line-height: 16px; }
.paste-rows__form { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.paste-rows__form .input--textarea { min-height: 148px; font-size: 12px; line-height: 20px; }
.paste-rows__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.paste-rows__count { margin: 0 auto 0 0; color: var(--faint); font-size: 12px; line-height: 16px; }
/* A link in a row's cell sits over the row's stretched link, as a select
   box does. */
.data-table__cell-action { position: relative; z-index: 1; color: var(--accent); text-decoration: none; }
.data-table__cell-action:hover { text-decoration: underline; }
/* A phone's research actions, at the list's foot. */
.conference-research { display: none; }
/* Where and when's City, Country and Geo region share a line. */
.person-form__row--thirds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (width < 768px) {
  .conference-context > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .conference-paste-toggle { display: none; }
  .paste-rows { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .conference-research { display: flex; flex-direction: column; gap: 12px; padding: 20px 0; border-top: 1px solid var(--line); }
  .person-form__row--thirds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .person-form__row--thirds > :last-child { grid-column: 1 / -1; }
}
/* === end C5a === */
/* === C5b: Conference detail and submissions (appendix speaking.md 2) === */
/* The header, then the main column and the side, edge to edge like a
   project's. */
main > :is(.conference-tabs, .conference-detail) { margin-inline: calc(-1 * var(--gutter)); }
main > .conference-detail:last-child { margin-bottom: calc(-1 * var(--gutter)); }
.conference-header__divider { width: 1px; height: 14px; background: var(--line-strong); }
.conference-link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); text-decoration: none; }
.conference-link:hover,
.conference-talks__title:hover { text-decoration: underline; }
.conference-link .icon { width: 14px; height: 14px; }
/* The view bar holds Edit and Record submission at desktop. */
.conference-header__edit,
.conference-section__phone-action,
.conference-tabs { display: none; }

.conference-detail__main,
.conference-detail__side {
  display: grid;
  align-content: start;
  gap: 32px;
  min-width: 0;
  padding: 24px 32px 32px;
}
.conference-detail__side { gap: 28px; background: var(--surface); }
.conference-section { display: grid; gap: 12px; min-width: 0; }
.conference-section > * { margin: 0; }
.conference-section__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.conference-section__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: inherit;
}
.conference-section__count { color: var(--faint); font-size: 12px; font-weight: 400; }
.conference-section__action { color: var(--muted); font-size: 13px; }
.conference-section__text { color: var(--muted); font-size: 13px; line-height: 20px; }
.conference-notes { color: var(--muted); font-size: 14px; line-height: 21px; overflow-wrap: anywhere; }
.conference-notes > :first-child { margin-top: 0; }
.conference-notes > :last-child { margin-bottom: 0; }
.conference-state { display: flex; flex-wrap: wrap; gap: 8px; }
.conference-facts { display: grid; gap: 10px; margin: 0; }
.conference-facts > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; font-size: 13px; }
.conference-facts dt { color: var(--faint); }
.conference-facts dd { min-width: 0; margin: 0; color: var(--fg); overflow-wrap: anywhere; }
.conference-rubric { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; }
.conference-rubric .icon { width: 14px; height: 14px; }
.conference-rubric .status-text { gap: 6px; font-size: 13px; }

/* Recommended talks: score, the talk and why, portability, Submit talk. */
.conference-talks { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.conference-talks__row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.conference-talks__score { flex: none; width: 28px; font-size: 14px; font-weight: 500; text-align: center; }
.conference-talks__talk { flex: 1; min-width: 0; }
.conference-talks__title { color: var(--fg); text-decoration: none; font-size: 14px; font-weight: 500; line-height: 18px; overflow-wrap: anywhere; }
.conference-talks__reason,
.conference-talks__audiences { margin: 2px 0 0; color: var(--faint); font-size: 12px; line-height: 16px; }
.conference-talks__portability { flex: none; width: 180px; min-width: 0; }
.conference-talks__row .button-form,
.conference-talks__row > .button { flex: none; }
.conference-talks__more { display: inline-block; padding-block: 12px; color: var(--muted); font-size: 13px; }

.talk-submission-delete { margin-top: 24px; }
/* A submission form in another page's 380px side panel: one column of bands,
   pairs side by side, its Save at its foot. */
.person-form--compact .person-form__section { grid-template-columns: minmax(0, 1fr); gap: 10px; padding-block: 16px; }
.person-form--compact .person-form__section:first-of-type { padding-top: 0; }
.person-form--compact .person-form__intro p { display: none; }
.person-form--compact .person-form__row--thirds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.person-form--compact .person-form__actions { display: flex; padding-block: 16px 0; }

@media (width >= 1100px) {
  .conference-detail { display: grid; grid-template-columns: minmax(0, 1fr) 380px; }
  .conference-detail__main { border-right: 1px solid var(--line); }
}

@media (width < 768px) {
  .conference-header__edit { display: inline; color: var(--muted); }
  .conference-tabs { display: flex; gap: 20px; padding-left: 16px; }
  .conference-section__phone-action { display: block; }
  .conference-detail__main,
  .conference-detail__side { gap: 24px; padding: 16px 16px 0; background: none; }
  .conference-detail__side { padding-bottom: 32px; }
  .conference-state { display: grid; grid-template-columns: 1fr 1fr; }
  .conference-state .button-form,
  .conference-state .button { width: 100%; }
  .conference-talks__row { flex-wrap: wrap; gap: 8px 12px; }
  .conference-talks__talk { flex-basis: calc(100% - 40px); }
  .conference-talks__portability { flex: 1; width: auto; padding-left: 40px; }
  /* One tab's sections at a time. */
  .conference-detail:not([data-tab=submissions]) [data-panel=submissions],
  .conference-detail:not([data-tab=talks]) [data-panel=talks],
  .conference-detail:not([data-tab=details]) [data-panel=details],
  .conference-detail:not([data-tab=notes]) [data-panel=notes] { display: none; }
}
/* === end C5b === */



/* A rate's meter (MeterComponent rate: true) grayed: the track alone, for a
   number too small to read as a result. */
.meter--grayed .meter__fill { display: none; }

/* The stacked column chart (StackedColumnChartComponent). Layers are the
   accent at the series' shade; the muted layer is gray. The numbers are the
   table under it, so no fill has to carry a count alone. */
.column-chart { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.column-chart__legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--faint);
  font-size: 12px;
}
.column-chart__key { display: flex; align-items: center; gap: 6px; }
/* Every fill carries its value at 3:1 or more on the page (PRD A 4.5): the
   accent at 55% is 3.64:1 on --bg, 3.56 on --surface, 3.42 on --panel; at
   75% 5.75 / 5.49 / 5.14; solid 9.40 / 8.79 / 8.02. The gray layer is
   --line-strong, 4.52 / 4.23 / 3.86. The accent edge keeps neighbouring
   layers apart. */
.column-chart__swatch,
.column-chart__layer {
  background: color-mix(in srgb, var(--accent) var(--shade, 100%), transparent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.column-chart__swatch { inline-size: 10px; block-size: 10px; border-radius: 2px; }
.column-chart__swatch--muted,
.column-chart__layer--muted {
  background: var(--line-strong);
  box-shadow: none;
}
.column-chart__plot { display: flex; gap: 16px; }
.column-chart__column { display: flex; flex: 1; flex-direction: column; gap: 10px; min-inline-size: 0; }
.column-chart__stack {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  block-size: 240px;
  padding-top: 8px;
  border-bottom: 1px solid var(--line-strong);
}
.column-chart__layer { display: block; }
.column-chart__layer:first-child { border-radius: 3px 3px 0 0; }
.column-chart__label { color: var(--faint); font-size: 12px; text-align: center; white-space: nowrap; }

/* Insights (appendix insights.md). */
.insights { display: flex; flex-direction: column; }
main > .insights { margin: calc(-1 * var(--gutter)); }
.insights__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-block-size: 56px;
  padding: 10px 32px;
  border-bottom: 1px solid var(--line);
}
.insights__menus { display: flex; flex-wrap: wrap; gap: 10px; }
.insights__recent { margin-inline-start: auto; }
.insights__recent .toggle__label { color: var(--muted); font-size: 13px; }
.insights__band { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.insights__band > .insights__funnel { border-inline-end: 1px solid var(--line); }
.insights__section { display: flex; flex-direction: column; gap: 14px; padding: 24px 32px; min-inline-size: 0; }
.insights__section + .insights__section { border-top: 1px solid var(--line); }
.insights__band + .insights__section { border-top: 0; }
.insights__section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 16px;
}
.insights__caption { margin: 0; color: var(--faint); font-size: 12px; }
.insights__empty { margin: 0; color: var(--muted); font-size: 13px; }
.insights__card-line { margin: 0; color: var(--faint); font-size: 12px; }
.insights__running .content-card__title a { color: var(--fg); }
.insights__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.insights__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-block-size: 160px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  text-align: center;
}
.insights__placeholder-title { margin: 0; color: var(--muted); font-size: 14px; }
.insights__placeholder-body { margin: 0; color: var(--faint); font-size: 13px; }

/* The funnel: stage, bar as a share of the first stage, then the words.
   Each stage a deeper tint of the accent; grayed while there isn't enough
   to read. */
.insights-funnel { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.insights-funnel__stage { display: flex; align-items: center; gap: 14px; }
.insights-funnel__name { flex: 0 0 96px; color: var(--muted); font-size: 13px; }
.insights-funnel__stage .meter { flex: 0 1 300px; min-inline-size: 64px; }
.insights-funnel__stage .meter__track { height: 22px; border-radius: 4px; background: var(--panel); }
.insights-funnel__stage .meter__fill { border-radius: 4px; }
/* Each stage a deeper tint, every one 3:1 or more on its --panel track
   (PRD A 4.5): 55% is 3.42:1, 70% 4.67, 85% 6.19, solid 8.02. The accent
   edge keeps the lightest apart from the track it sits on. */
.insights-funnel__stage--0 .meter__fill {
  background: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.insights-funnel__stage--1 .meter__fill { background: color-mix(in srgb, var(--accent) 70%, transparent); }
.insights-funnel__stage--2 .meter__fill { background: color-mix(in srgb, var(--accent) 85%, transparent); }
.insights-funnel__value {
  flex: 1 0 auto;
  color: var(--fg);
  font-size: 13px;
  text-align: end;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.insights-funnel--thin .meter__fill { background: var(--line-strong); box-shadow: none; }
.insights-funnel--thin .insights-funnel__value { color: var(--faint); }
.insights-funnel__stats { display: none; }

/* A cut's rate: the words, then a small meter; positive fills good. Rows
   too small to read go faint, meters to their track. */
.insights-rate { display: flex; align-items: center; gap: 8px; }
.insights-rate__value { flex: 1; font-variant-numeric: tabular-nums; }
.insights-rate .meter { inline-size: 48px; }
.insights-rate--positive .meter__fill { background: var(--good); }
.insights-cut__row--thin .data-table__cell { color: var(--faint); }

/* A running card's results: the step or arm, its rate as a bar, the words.
   Too few to read goes faint, the bar to its track. */
.insights-results { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.insights-result { display: flex; align-items: center; gap: 12px; min-inline-size: 0; }
.insights-result__label { flex: 0 1 150px; min-inline-size: 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.insights-result .meter { flex: 0 1 200px; min-inline-size: 32px; }
.insights-result__value {
  flex: 1 0 auto;
  color: var(--fg);
  font-size: 13px;
  text-align: end;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.insights-result--thin .insights-result__value { color: var(--faint); }
.insights__overlap { margin-inline-start: auto; }
.insights__overlap .toggle__label { color: var(--muted); font-size: 13px; }

/* Two cuts side by side only where each table keeps its lanes. */
@media (width < 1280px) {
  .insights__cards { grid-template-columns: 1fr; }
}
@media (width < 768px) {
  .insights__filters { padding: 10px 16px; }
  .insights__channels { inline-size: 100%; }
  .insights__channels .segmented__option { flex: 1; justify-content: center; }
  .insights__menus,
  .insights__recent,
  .insights__weeks,
  .insights__running-actions { display: none; }
  .insights__band,
  .insights__cards { grid-template-columns: 1fr; }
  .insights__band > .insights__funnel { border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .insights__section { padding: 16px; }
  .insights-funnel { display: none; }
  .insights-funnel__stats { display: flex; gap: 20px; }
  .insights-funnel__stats .stat { flex: 1; }
  .insights-rate .meter { display: none; }
  /* The switch is a row of its own under the label, the whole row its target. */
  .insights__overlap { flex: 1 0 100%; margin-inline-start: 0; }
  .insights__overlap .toggle { justify-content: space-between; inline-size: 100%; min-block-size: 44px; flex-direction: row-reverse; }
  .insights-result__label { flex-basis: 160px; }
  .insights-result .meter { flex: 0 0 32px; }
}

/* === C3e: tasks === */
/* The Tasks list, a task's page and its form (appendix projects-tasks.md 4
   to 6). A task row is a ListComponent row with its quick-complete box
   before the link (TasksHelper#task_row), on every page that lists tasks. */
.tasks-filters .tabs { flex: none; }
.task-check { display: flex; margin: 0; }
.task-check .checkbox-field,
.list-row__control .checkbox-field { display: flex; }
.task-relates-to { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; color: var(--muted); }
.task-relates-to .icon { flex: none; color: var(--faint); }
.task-relates-to__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-relates-to__kind { flex: none; color: var(--faint); }
.list-row:has(.checkbox__box:checked:disabled) .list-row__title { color: var(--faint); text-decoration: line-through; }
.list-row__meta .status-text { font-size: 12px; }
.list-row__meta .status-text .icon { width: 12px; height: 12px; }
.tasks-done { display: grid; gap: 28px; max-width: 836px; }
.tasks-done__today { display: grid; gap: 8px; }

/* A task's page: the box, then the title over its status, due date, subject
   and sync, edge to edge like a project's header. */
main > .task-header { margin-inline: calc(-1 * var(--gutter)); }
main > .task-header:first-child { margin-top: calc(-1 * var(--gutter)); }
main > .task-detail { margin-inline: calc(-1 * var(--gutter)); }
.task-header {
  display: flex;
  gap: 16px;
  padding: 28px 32px;
  border-bottom: 1px solid var(--line);
}
.task-header > .task-check,
.task-header > .checkbox-field { padding-top: 8px; }
.task-header__identity { display: grid; flex: 1; gap: 12px; min-width: 0; max-width: 860px; }
.task-header__title {
  margin: 0;
  font-family: var(--font-headline);
  font-size: 28px;
  font-weight: 400;
  line-height: 34px;
  overflow-wrap: anywhere;
}
.task-header__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 0; font-size: 13px; }
.task-header__subject { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
.task-header__sync-actions { display: flex; gap: 8px; }
.task-header__actions { display: none; }
.task-subject {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--fg);
  text-decoration: none;
}
.task-subject:hover { background: var(--hover); }
.task-subject__text { display: grid; gap: 2px; min-width: 0; }
.task-subject__name { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.task-subject__detail { color: var(--faint); font-size: 12px; overflow-wrap: anywhere; }
.task-subject__when { flex: none; margin-left: auto; color: var(--faint); font-size: 13px; }
.task-uuid { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.task-uuid > span { min-width: 0; overflow-wrap: anywhere; }
/* The form's due date, with its quick picks under it. */
.task-due { display: grid; gap: 6px; }
.task-due__picks { display: flex; flex-wrap: wrap; gap: 4px; }
.field__value {
  margin: 0;
  max-width: 372px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--faint);
  font-size: 13px;
  overflow-wrap: anywhere;
}
@media (width < 768px) {
  .task-header { padding: 16px; }
  .task-header__title { font-size: 20px; line-height: 26px; }
  .task-header__actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
  .task-header__actions .button-form,
  .task-header__actions .button { width: 100%; }
}
/* === end C3e === */
/* === C5c: Talks === */
/* The list (appendix speaking.md 4): the rubric beside the stats, a phone's
   state tabs, and Import speaking history at the foot on a phone, where the
   top bar has room for New talk alone. */
.talks-rubric { flex: 1 1 320px; min-width: 0; padding-left: 32px; border-left: 1px solid var(--line); }
.talks-rubric p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 20px; }
.talks-tabs { display: none; }
.talks-list__start { margin-left: 8px; color: var(--accent); font-weight: 500; }
.talks-list__foot { display: none; }
/* New and Edit talk open on their title and what the form is for; a phone's
   top bar names the form instead. */
.talk-form-intro { margin: 0 0 8px; }
.talk-form-intro__title {
  margin: 0;
  padding: 0;
  border: 0;
  font-family: var(--font-headline);
  font-size: 28px;
  font-weight: 400;
  line-height: 34px;
  letter-spacing: -.02em;
}
.talk-form-intro p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.talks-list__more { padding: 8px 0; border-bottom: 1px solid var(--line); }

/* A talk's page (appendix speaking.md 5): the header, then the talk beside
   the Record submission panel, edge to edge like a project's. */
main > .talk-detail { margin-inline: calc(-1 * var(--gutter)); }
main > .talk-detail:last-child { margin-bottom: calc(-1 * var(--gutter)); }
.talk-header__edit { display: none; }
.talk-detail__main { display: grid; align-content: start; min-width: 0; }
.talk-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 24px 32px;
  border-bottom: 1px solid var(--line);
}
.talk-section > * { margin: 0; }
/* The submissions run edge to edge of the column, their last hairline the
   section's. */
.talk-section > .data-table { margin: 0 -32px -24px; }
.talk-section > .data-table .data-table__table { border-bottom: 0; }
.talk-section__abstract { max-width: 640px; font-size: 14px; line-height: 22px; }
.talk-section__abstract p { margin: 0 0 8px; }
.talk-section__text { color: var(--muted); font-size: 13px; line-height: 20px; }
.talk-section__title { display: flex; align-items: baseline; gap: 8px; padding: 0; border: 0; font-size: inherit; }
.talk-section__title .section-label { margin: 0; }
.talk-section__count { color: var(--faint); font-size: 12px; font-weight: 400; }
.talk-section__empty-title { margin: 0 0 4px; font-size: 14px; font-weight: 500; }
.talk-audiences { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.talk-audiences__label { color: var(--muted); }
.talk-detail__record { display: none; }
.talk-detail__side { display: grid; align-content: start; gap: 8px; min-width: 0; padding: 24px; background: var(--surface); }
.talk-detail__side > :is(.section-label, p) { margin: 0; }
.talk-detail__side .person-form { margin-top: 8px; }
.overlay__body > .talk-section__text { margin: 0 0 12px; }

@media (width >= 1100px) {
  .talk-detail { display: grid; grid-template-columns: minmax(0, 1fr) 380px; min-height: 100%; }
  .talk-detail__main { border-right: 1px solid var(--line); }
}

@media (width < 768px) {
  .talks-rubric { display: none; }
  .talk-form-intro { display: none; }
  .talks-tabs { display: flex; gap: 20px; margin: 0 0 12px; }
  .talks-list__foot { display: block; padding: 16px 0; }
  .talk-header__edit { display: inline; margin-left: auto; color: var(--muted); font-size: 13px; }
  .talk-section { padding: 16px; }
  .talk-section > .data-table { margin: 0 -16px -16px; }
  /* The panel is a sheet on a phone, opened from the button under the
     submissions. */
  .talk-detail__side { display: none; }
  .talk-detail__record { display: block; padding: 16px; }
}
/* === end C5c === */
/* === C3g: Calendar (appendix auth-calendar.md 3, 4) === */
/* The week's links over the agenda, then each day with anything on it: its
   label and count, then its rows, in lanes of fixed width so a time, a kind
   and a source sit in the same place on every row. The lanes need some
   960px beside the title, so a day narrower than that (a phone, a tablet
   beside the sidebar) stacks each row in three lines, in the order the
   markup reads. */
main > .calendar-toolbar { margin: calc(-1 * var(--gutter)) calc(-1 * var(--gutter)) 0; }
.calendar-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 14px 32px;
  border-bottom: 1px solid var(--line);
}
.calendar-toolbar__week { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* The type toggles, after the week: "Show", then a chip a kind, its box
   ticked while the kind is shown, so on and off read without the tint. */
.calendar-toggles { display: flex; align-items: center; gap: 8px; min-width: 0; margin-left: auto; }
.calendar-toggles .section-label { margin: 0; }
.calendar-toggles__chips { display: flex; gap: 8px; min-width: 0; }
.calendar-toggle { color: var(--muted); font-size: 13px; }
.calendar-toggle[aria-pressed="true"] { color: var(--fg); }
.calendar-toggle .icon { width: 16px; height: 16px; }
.calendar-toggle__box { display: inline-flex; flex: none; width: 14px; height: 14px; color: var(--accent); }
.calendar-toggle__box:empty { box-sizing: border-box; border: 1px solid var(--line-strong); border-radius: 3px; }
.calendar-toggle .calendar-toggle__box .icon { width: 14px; height: 14px; }
.calendar-toggle .chip__count { font-size: 12px; }
.calendar-toolbar__range {
  margin: 0;
  padding: 0 0 0 8px;
  border: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 20px;
}
.calendar-agenda { display: grid; }
.calendar-day { container-type: inline-size; }
.calendar-day__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 24px 0 8px;
  border-bottom: 1px solid var(--line-strong);
}
.calendar-day__head .section-label { margin: 0; }
.calendar-day__count { color: var(--faint); font-size: 12px; }
.calendar-day__rows { margin: 0; padding: 0; list-style: none; }
.calendar-row {
  display: grid;
  grid-template-columns: 132px 96px minmax(0, 1fr) 240px 120px 96px;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.calendar-row__time { color: var(--muted); font-size: 13px; }
.calendar-row__type .status-text { font-size: 13px; }
.calendar-row__text { display: grid; gap: 2px; min-width: 0; }
.calendar-row__title {
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.calendar-row__title:hover { text-decoration: underline; }
.calendar-row__who { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.calendar-row__related { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.calendar-row__kind { color: var(--faint); font-size: 12px; }
.calendar-row__link-subject { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.calendar-row__detail { min-width: 0; color: var(--faint); font-size: 12px; overflow-wrap: anywhere; }
.calendar-row__detail a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.calendar-row__source { color: var(--faint); font-family: var(--font-mono); font-size: 12px; }
/* A conference's days and a CFP's closing: an edge and a tint as
   decoration; the type word says which (PRD A 4.3). */
/* The time lane gives up the edge and its inset, so every other lane stays
   in line with the rows around it. */
.calendar-row--conference,
.calendar-row--cfp-deadline { grid-template-columns: 117px 96px minmax(0, 1fr) 240px 120px 96px; padding-left: 12px; }
.calendar-row--conference { border-left: 3px solid var(--good); background: var(--good-soft); }
.calendar-row--cfp-deadline { border-left: 3px dashed var(--warning); background: var(--warning-soft); }
.calendar-row__when { display: block; font-weight: 500; }
.calendar-row__when-detail { display: block; color: var(--faint); font-size: 12px; }
.calendar-row__closes { color: var(--warning); font-weight: 500; }
.calendar-row__narrow { display: none; }
/* What the toggles leave out of this week, and the way to bring it back. */
.calendar-hidden { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding-top: 16px; }
.calendar-hidden__summary { margin: 0; color: var(--muted); font-size: 13px; }
.calendar-empty { padding-top: 28px; }
/* New meeting or event: which one, over the form's bands. */
.calendar-form__kind { display: grid; justify-items: start; gap: 6px; padding-bottom: 12px; }
.calendar-form__kind .field__help { margin: 0; }
@media (width < 768px) {
  /* The foot's Save and Cancel, full width, at a thumb's 44px. */
  .calendar-form__actions .button { height: 44px; }
  .calendar-toolbar { padding: 12px 16px; }
  .calendar-toolbar__week { flex-basis: 100%; }
  .calendar-toolbar__range { flex-basis: 100%; padding-left: 0; font-size: 14px; }
  /* The toggles scroll sideways in their own row, clipped at the edge,
     rather than pushing the page wider. */
  .calendar-toggles { flex-basis: 100%; margin-left: 0; }
  .calendar-toggles__chips { overflow-x: auto; scrollbar-width: none; }
  .calendar-toggle { flex: none; }
  .calendar-hidden { flex-direction: column; align-items: start; }
}
@container (width < 960px) {
  .calendar-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "time time type" "text text text" "related detail source";
    gap: 4px 12px;
  }
  .calendar-row--conference,
  .calendar-row--cfp-deadline { padding-right: 12px; }
  .calendar-row__wide { display: none; }
  .calendar-row__narrow { display: inline; }
  .calendar-row__time { grid-area: time; }
  .calendar-row__type { grid-area: type; }
  .calendar-row__text { grid-area: text; }
  .calendar-row__related { grid-area: related; }
  .calendar-row__detail { grid-area: detail; }
  .calendar-row__source { grid-area: source; }
}
/* === end C3g === */
/* === C6e: Agent sync === */
/* Agent sync (appendix system-data.md 9): the agents, the request log in
   tabs, then the handoff checklist and the clawd-sync contract. Names,
   codes and routes are set in mono. A desktop needs no label over the
   agents' table, which its header names, nor the Checklist tab, since the
   checklist sits under the log; a phone keeps both, and the checklist and
   contract behind that tab. */
.agent-sync__agents { margin-top: 20px; }
.agent-sync__agents > .section-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.agent-sync__tabs { margin-top: 20px; }
.agent-sync__agents [role=cell][data-lane="name"],
.agent-sync__request [role=cell][data-lane="endpoint"],
.agent-sync__request [data-lane="code"] .data-table__value,
.agent-sync__step [data-lane="call"] .data-table__value { font-family: var(--font-mono); font-size: 12px; }
.agent-sync__agents [role=cell][data-lane="name"] { font-size: 13px; }
/* The line under a name or a route is prose: when, or what Hub said. */
:is(.agent-sync__agent, .agent-sync__request) .data-table__detail { font-family: var(--font-sans); font-size: 12px; }
.agent-sync__request [data-lane="agent"] .data-table__value { color: var(--faint); font-size: 12px; }
.agent-sync__step [role=cell][data-lane="step"] { font-weight: 500; }
/* A card has the room to wrap what a row truncates: an error, a step. */
.data-table--cards :is(.agent-sync__step, .agent-sync__request) .data-table__cell { white-space: normal; }
.data-table--cards :is(.agent-sync__step, .agent-sync__request) .data-table__value { min-width: 0; overflow-wrap: anywhere; text-align: right; }
.agent-sync__section { margin-top: 28px; }
.agent-sync__section > .section-label { margin-bottom: 10px; }
.agent-sync__prose { max-width: 720px; margin: 0; color: var(--muted); font-size: 14px; }
.agent-sync__code {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-color: var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
/* A desktop's columns say the last seen and the error; a phone's card says
   them under the name instead, and puts the rejects or the status beside
   it, so each is drawn, and read, once. */
.data-table:not(.data-table--cards) :is(.agent-sync__agent, .agent-sync__request) .data-table__detail,
.data-table:not(.data-table--cards) .agent-sync__narrow,
.data-table--cards .agent-sync__wide,
.data-table--cards .agent-sync__agent :is([data-lane="description"], [data-lane="last_seen"], [data-lane="rejects"]),
.data-table--cards .agent-sync__request [data-lane="error"],
.data-table--cards .data-table__body .agent-sync__agent::before { display: none; }
/* An agent's card is its header alone, so it has no rule under the header
   to draw (the card's ::before) and needs only a little room below it. */
.data-table--cards .data-table__body .agent-sync__agent { padding-bottom: 8px; }
.agent-sync__phone-tab { display: none; }
@media (width < 768px) {
  .agent-sync__agents > .section-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .agent-sync__phone-tab { display: inline-flex; }
  .agent-sync__reference:not(.agent-sync__reference--open) { display: none; }
}
/* === end C6e === */
/* === C6d: HubSpot drift === */
/* HubSpot drift (appendix system-data.md 8): the header's sub, stats and
   caption, the reconcile underway, then a group per company whose rows end
   in the two answers or what was applied. A phone takes a one-line summary
   in place of the stats, Reconcile now in the header, and no sync runs. */
.drift-header { flex-direction: column; align-items: stretch; }
.drift-header__sub { max-width: 720px; margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 21px; }
.drift-header__stats { display: flex; flex-wrap: wrap; gap: 16px 36px; }
.drift-header__summary { display: none; }
.drift-header__running { margin: 0; color: var(--accent); font-size: 13px; }
.drift-header__running:empty { display: none; }
.drift-header__caption { margin: 0; color: var(--faint); font-size: 12px; }
.drift-header__phone-action { display: none; }
.drift-choice { display: flex; }
.drift-choice .drift-card + .drift-card { margin-left: -1px; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.drift-choice .drift-card:has(+ .drift-card) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.drift-table .data-table__body [data-lane=field] { color: var(--muted); font-family: var(--font-mono); font-size: 12px; font-weight: 400; }
.drift-table :is([data-lane=hub], [data-lane=hubspot]) .data-table__value { font-family: var(--font-mono); font-size: 13px; }
.drift-card__source, .drift-card__value { display: none; }
.drift-error { margin: 0 0 6px; font-size: 12px; line-height: 16px; text-align: right; }
.drift-table .data-table__actions--labelled { flex-direction: column; align-items: flex-end; }
.drift-row--resolved { background: var(--good-soft); }
.drift-row--resolved .icon { color: var(--good); vertical-align: -3px; }
.drift-answered { display: flex; flex-direction: column; align-items: flex-end; margin: 0; font-size: 13px; line-height: 18px; }
.drift-answered__when { color: var(--faint); font-size: 12px; }
.drift-runs { margin-top: 24px; }
.drift-runs .section-label { margin-bottom: 8px; }
@media (width < 768px) {
  .drift-header__wide,
  .drift-header__stats,
  .drift-header__caption,
  .drift-runs { display: none; }
  .drift-header__sub { margin: 0; font-size: 13px; line-height: 19px; }
  .drift-header__summary { display: block; margin: 0; color: var(--warning); font-size: 13px; }
  .drift-header__phone-action { display: flex; }
  .data-table--cards .drift-answered { align-items: flex-start; }
  .data-table--cards .drift-error { text-align: left; }
  .drift-table .data-table--cards .data-table__actions--labelled { align-items: stretch; }
  /* An open field's two values are in its choice cards. */
  .data-table--cards .data-table__row:has(.drift-choice) :is([data-lane=hub], [data-lane=hubspot]) { display: none; }
  .data-table--cards .drift-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .data-table--cards .drift-choice .drift-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 10px;
    border-radius: 6px;
    white-space: normal;
    text-align: left;
  }
  .data-table--cards .drift-card__source { display: block; color: var(--faint); font-size: 12px; font-weight: 400; }
  .data-table--cards .drift-card__value { display: block; color: var(--fg); font-family: var(--font-mono); font-size: 12px; font-weight: 400; overflow-wrap: anywhere; }
  .data-table--cards .drift-card__action { color: var(--accent); font-weight: 500; }
}
/* === end C6d === */
/* === C6f: Backups === */
/* The list (appendix system-data.md 10) and a run (11). On a phone the
   primary sits in the body, under the status block, as the top bar has no
   "+"; a run's drill form comes before Timing and Metadata in the document
   and a desktop sets it in the side column. */
.record-header--stacked .record-header__identity { flex-basis: 100%; }
.record-header--stacked .record-header__meta { max-width: 720px; }
.backups__mono { font-family: var(--font-mono); font-size: 14px; }
.backups__phone-action { display: none; }
.backups__banner { margin-top: 16px; }
.backups__banner .banner { height: auto; min-height: 44px; padding-block: 10px; }
.backups__runs { display: grid; gap: 16px; margin-top: 16px; }
.backups__drills { display: grid; gap: 8px; max-width: 760px; margin-top: 28px; }
.backups__drills p { margin: 0; color: var(--muted); font-size: 13px; line-height: 19px; }
.backups__drills .backups__runbook { color: var(--accent); font-weight: 500; }
.backups__script { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.backup-detail { display: grid; gap: 24px; margin-top: 24px; }
.backup-detail__section { display: grid; align-content: start; gap: 12px; min-width: 0; }
.backup-detail__facts { display: grid; gap: 12px; margin: 0; }
.backup-detail__facts > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; font-size: 13px; }
.backup-detail__facts dt { color: var(--faint); }
.backup-detail__facts dd { margin: 0; color: var(--fg); overflow-wrap: anywhere; }
.backup-detail__facts--mono dd { font-family: var(--font-mono); font-size: 12px; }
.backup-detail__code {
  margin: 0;
  padding: 12px 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}
.backup-detail__note,
.backup-detail__recorded { margin: 0; color: var(--muted); font-size: 13px; line-height: 19px; }
.backup-detail__form { display: grid; gap: 14px; }
.backup-detail__form .input--textarea { min-height: 120px; }

@media (width >= 1100px) {
  .backup-detail {
    grid-template-columns: minmax(0, 1fr) 360px;
    grid-template-rows: auto auto 1fr;
    grid-template-areas: "destination drill" "timing drill" "metadata drill";
  }
  .backup-detail__destination { grid-area: destination; }
  .backup-detail__timing { grid-area: timing; }
  .backup-detail__metadata { grid-area: metadata; }
  .backup-detail__drill { grid-area: drill; padding: 20px 24px; border-left: 1px solid var(--line); }
}

@media (width < 768px) {
  .backups__phone-action { display: block; margin-top: 16px; }
  .backup-detail__timing { display: none; }
  .backup-detail__facts > div { display: flex; justify-content: space-between; gap: 12px; }
  .backup-detail__facts dd { text-align: right; }
  .backup-detail__form .input--textarea { min-height: 100px; }
}
/* === end C6f === */
/* === C6g: OpenClaw retirement === */
/* The register (appendix system-data.md 12): the header with its status
   strip, the components, then the agent contract. The table's header names
   the list, so its label is for a screen reader alone. Names, routes and
   paths are set in mono. */
.retirement-strip {
  display: grid;
  flex-basis: 100%;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  list-style: none;
}
.retirement-strip > li { min-width: 0; padding: 12px 16px; }
.retirement-strip > li + li { border-left: 1px solid var(--line); }
.retirement-register { margin-top: 20px; }
.retirement-register__row [role=cell][data-lane="name"] { font-weight: 500; }
.retirement-register__row [data-lane="name"] .data-table__detail { font-weight: 400; }
.retirement-register__row [role=cell][data-lane="replacement"] { line-height: 18px; white-space: normal; }
.retirement-register__row [data-lane="api"] .data-table__value,
.retirement-register__row [role=cell][data-lane="api"] { font-family: var(--font-mono); font-size: 12px; }
.data-table--cards .retirement-register__row .data-table__value { min-width: 0; overflow-wrap: anywhere; text-align: right; }
.retirement-register__import { display: none; }
/* A desktop's row says when it was disabled; a phone's card says its status
   and replacement there instead, its other cells left off. */
.data-table:not(.data-table--cards) .retirement-register__narrow,
.data-table--cards .retirement-register__wide,
.data-table--cards .retirement-register__row [role=cell]:not([data-lane="name"]),
.data-table--cards .data-table__body .retirement-register__row::before { display: none; }
/* A card is its header alone, its line one line, cut where it runs out. */
.data-table--cards .data-table__body .retirement-register__row { padding-bottom: 8px; }
.retirement-register__narrow { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.retirement-strip-line,
.retirement-header__short { display: none; }
.retirement-contract { margin-top: 28px; }
.retirement-contract > .section-label { margin-bottom: 10px; }
.retirement-contract__prose { max-width: 720px; margin: 0; color: var(--muted); font-size: 14px; }
.retirement-contract__code {
  margin: 10px 0 0;
  padding: 12px 14px;
  border-color: var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* The record sheet: two tabs, each with its own submit in the footer, which
   follows its tab as a panel does. A hidden footer button is gone, not an
   empty box, which until-found would leave. */
.retirement-sheet .overlay__actions [hidden] { display: none; }
.retirement-sheet__tabs { margin: -4px 0 4px; }
.retirement-form { display: grid; gap: 14px; }
.retirement-form__head { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px 16px; }
.retirement-form__head > :nth-child(1) { grid-column: span 4; }
.retirement-form__head > :nth-child(2) { grid-column: span 2; }
.retirement-form__head > :nth-child(n + 3) { grid-column: span 3; }
.retirement-import__errors { display: grid; gap: 6px; margin: 0; padding: 0; color: var(--muted); font-size: 13px; list-style: none; }
.retirement-import__job { color: var(--fg); font-family: var(--font-mono); font-size: 12px; }
.retirement-form__intro { color: var(--muted); font-size: 13px; line-height: 19px; }

/* The item (appendix system-data.md 13): the cutover and its notes in the
   main column, the Update form beside them, edge to edge like a project's. */
main > .retirement-item { margin-inline: calc(-1 * var(--gutter)); }
main > .retirement-item:last-child { margin-bottom: calc(-1 * var(--gutter)); }
.retirement-header__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
.retirement-header__back:hover { color: var(--fg); }
.retirement-header__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.retirement-header__title .record-header__title { min-width: 0; overflow-wrap: anywhere; }
.retirement-item { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.retirement-item__main { min-width: 0; border-right: 1px solid var(--line); }
.retirement-item__section { display: grid; gap: 10px; padding: 24px 32px; }
.retirement-item__section + .retirement-item__section { border-top: 1px solid var(--line); }
.retirement-item__prose { max-width: 640px; margin: 0; color: var(--fg); font-size: 14px; line-height: 21px; }
.retirement-item__side { display: grid; gap: 14px; padding: 20px 24px; }
.retirement-facts { display: grid; gap: 10px; margin: 0; }
.retirement-facts > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; }
.retirement-facts dt { color: var(--faint); font-size: 13px; line-height: 19px; }
.retirement-facts dd { min-width: 0; margin: 0; color: var(--fg); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.retirement-facts dd.retirement-facts__mono { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.retirement-update__cutover {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.retirement-update__cutover p { margin: 0; color: var(--muted); font-size: 13px; line-height: 18px; }
.retirement-update__actions { display: grid; justify-items: start; gap: 10px; }
.retirement-update__edit-touch { display: none; }

@media (width < 768px) {
  .retirement-strip,
  .retirement-header__summary { display: none; }
  .retirement-strip-line { display: block; flex-basis: 100%; margin: 0; padding: 14px 16px; border-radius: 8px; background: var(--surface); font-size: 13px; }
  .retirement-header__short { display: inline; }
  .retirement-register__import { display: flex; margin-top: 16px; }
  /* A phone keeps the contract's words, not the command (appendix 12.3). */
  .retirement-contract__code { display: none; }
  .retirement-form__head { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* :nth-child(n), not *, to outweigh the desktop's :nth-child(n + 3). */
  .retirement-form__head > :nth-child(n) { grid-column: span 1; }
  .retirement-form__head > :is(:nth-child(1), :nth-child(4)) { grid-column: 1 / -1; }
  .retirement-item { grid-template-columns: minmax(0, 1fr); }
  .retirement-item__main { border-right: 0; }
  .retirement-item__section { padding: 16px; }
  .retirement-item__side { padding: 16px; border-top: 1px solid var(--line); }
  /* The top bar carries the name and the way back; a phone drops the
     Disabled and Owner facts and the notes (appendix 13, 390). */
  .retirement-header__back,
  .retirement-item__side > .section-label,
  .retirement-item__notes,
  .retirement-update__cutover { display: none; }
  .retirement-facts > div { display: flex; justify-content: space-between; gap: 12px; }
  .retirement-facts > .retirement-facts__wide { display: none; }
  .retirement-facts > div > dd { text-align: right; }
  .retirement-facts > .retirement-facts__prose { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .retirement-facts > .retirement-facts__prose > dd { text-align: left; }
  .retirement-update__actions { justify-items: stretch; }
  .retirement-update__edit-touch { display: flex; }
}
/* === end C6g === */



/* === C6i: Focus and Verticals (appendix system-settings.md 1-3) === */
/* Bands and columns run edge to edge, as a record page's do. */
main > .system-page { margin: calc(-1 * var(--gutter)); }
/* A header line with a link in it reads as one paragraph. */
.record-header__meta--prose { display: block; }
/* A System page's body beside its side column: Focus's history (300),
   Verticals' adopt form (340). Under 1100 the side follows the body, as it
   does in the DOM. */
.system-split {
  --side-width: 300px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--side-width);
  align-items: start;
}
.system-split--verticals { --side-width: 340px; }
.system-split__main { display: flex; flex-direction: column; gap: 20px; min-width: 0; padding: 24px 32px 40px; }
.system-split__main--list { gap: 10px; padding: 20px 0 40px; }
.system-split__main--list > .section-label { padding: 0 32px; }
.system-split__side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: stretch;
  min-width: 0;
  padding: 24px;
  border-left: 1px solid var(--line);
}
.system-split__side--surface { background: var(--surface); }
.system-split__note { margin: 0; color: var(--faint); font-size: 13px; line-height: 20px; }
.system-split__note--lead { color: var(--muted); line-height: 19px; }
.system-form { display: flex; flex-direction: column; gap: 20px; max-width: 560px; margin: 0; }
/* A form or section that is the page's body, not a column's. */
.system-form--page,
.system-section { padding: 24px 32px; }
.system-section { display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.system-form__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* Focus: what it is now, on the surface band under the header. */
.focus-current {
  display: flex;
  align-items: start;
  gap: 24px;
  padding: 20px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.focus-current__identity { display: flex; flex: 1; flex-direction: column; gap: 8px; min-width: 0; }
.focus-current__identity > .section-label { color: var(--accent); }
.focus-current__label { margin: 0; color: var(--fg); font-size: 20px; font-weight: 700; line-height: 24px; overflow-wrap: anywhere; }
.focus-current__verticals { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.focus-current__note { margin: 0; color: var(--muted); font-size: 14px; line-height: 20px; }
/* The count sits at the legend's right, out of the legend itself. */
.focus-form__verticals { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; max-width: 600px; margin: 0; padding: 0; border: 0; }
.focus-form__verticals > legend { padding: 0; }
.focus-form__count { position: absolute; top: 0; right: 0; margin: 0; color: var(--faint); font-size: 12px; }
.focus-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 280px)); gap: 4px 16px; }
.focus-form__grid .checkbox { min-height: 28px; font-size: 13px; }
.focus-form__grid .checkbox:has(:checked) { font-weight: 500; }
.focus-history { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; list-style: none; }
.focus-history__item { display: flex; flex-direction: column; gap: 2px; }
.focus-history__label { margin: 0; color: var(--fg); font-size: 14px; font-weight: 500; }

/* Verticals: the slug under the name, mono. */
.verticals__row [data-lane="name"] .data-table__detail { font-family: var(--font-mono); font-size: 12px; }
.chip--mono { font-family: var(--font-mono); font-size: 12px; }
.vertical-header .record-header__identity { display: flex; flex-direction: column; align-items: start; gap: 10px; }
.vertical-header .record-header__meta { margin: 0; }
.vertical-header__facts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0; }
.vertical-header__fact { display: flex; align-items: center; gap: 6px; }
.vertical-header__facts :is(dt, dd) { margin: 0; color: var(--faint); font-size: 12px; }
.vertical-remove { border-top: 1px solid var(--line); }

@media (width < 1100px) {
  .system-split { grid-template-columns: minmax(0, 1fr); }
  .system-split__side { border-top: 1px solid var(--line); border-left: 0; }
}
@media (width < 768px) {
  .system-split__main { gap: 16px; padding: 20px 16px; }
  .system-split__main--list { padding: 16px 0 0; }
  .system-split__main--list > .section-label { padding: 0 16px; }
  .system-split__side { padding: 20px 16px 32px; }
  .system-form { max-width: none; }
  .system-form--page,
  .system-section { padding: 16px; }
  .system-form__actions { flex-direction: column; align-items: stretch; }
  .system-form__actions .button,
  .focus-current__clear { width: 100%; height: 44px; font-size: 14px; }
  .focus-current { flex-direction: column; align-items: stretch; gap: 16px; padding: 16px; }
  .focus-current__note { font-size: 13px; }
  .focus-current__year { display: none; }
  .focus-form__grid { grid-template-columns: minmax(0, 1fr); }
  .focus-form__grid .checkbox { min-height: 36px; font-size: 14px; }
  /* The top bar carries the way back on a phone. */
  .vertical-header__back { display: none; }
}
/* === end C6i === */
/* === C6h: Digests (appendix system-data.md 14) === */
/* The header runs edge to edge, as a client's; the run's sections sit
   beside a 300px side of facts, as an Import run's. */
main > :is(.digest-detail) { margin-inline: calc(-1 * var(--gutter)); }
main > .digest-detail:last-child { margin-bottom: calc(-1 * var(--gutter)); }
.digests-header__actions { display: none; }
.digests-form { display: grid; gap: 20px; }
.digests-form__kind { display: grid; gap: 12px; min-width: 0; margin: 0; padding: 0 0 20px; border: 0; border-bottom: 1px solid var(--line); }
.digests-form__legend { padding: 0; font-size: 14px; font-weight: 500; }

@media (width >= 1100px) {
  .digest-detail { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
  .digest-detail > .project-detail__main { border-right: 1px solid var(--line); }
}

@media (width < 768px) {
  .digests-header__actions { display: flex; width: 100%; }
  .digests-header__actions > * { flex: 1; }
  .digests-header__actions .button-form,
  .digests-header__actions .button { width: 100%; }
  .digest-detail > .project-detail__main,
  .digest-detail > .project-detail__side { gap: 24px; padding: 16px; }
}
/* === end C6h === */
/* === C6j: Channel partners, Scout holds, Style profile === */
/* Three System pages (appendix system-settings.md 4 to 6): a header, then a
   body edge to edge under it. Channel partners and Style profile set a 300px
   side column beside their lists at a desktop, by grid placement alone, so
   the DOM keeps the phone's order. */
main > :is(.system-page__body, .style-profile, .scout-holds__list) { margin-inline: calc(-1 * var(--gutter)); }
main > :is(.system-page__body, .style-profile, .scout-holds__list):last-child { margin-bottom: calc(-1 * var(--gutter)); }
.system-page__guard { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; color: var(--faint); font-size: 12px; }
.system-page__guard .chip { font-family: var(--font-mono); }

.channel-partners > section,
.scout-holds__list { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 10px; min-width: 0; padding: 20px 12px; }
:is(.channel-partners__partners, .channel-partners__held, .scout-holds__list) > :is(.section-label, .empty-state, p, .list-pager) { margin-inline: 20px; }
.channel-partners__add { padding: 20px 24px; border-block: 1px solid var(--line); background: var(--surface); }
.channel-partners__add .person-form__actions { justify-content: flex-start; padding-block: 4px 0; }
:is(.channel-partners__none, .style-profile__none) { margin: 0; color: var(--faint); font-size: 13px; }
/* A partner's note is a sentence or two, read whole, not truncated. */
.channel-partners__partners [role=cell][data-lane="notes"] { white-space: normal; }
.channel-partners__hold [role=cell][data-lane="query"] { font-family: var(--font-mono); font-size: 12px; }
.channel-partners__hold .data-table__detail { font-family: var(--font-mono); }

.scout-holds__stats { display: flex; flex-wrap: wrap; gap: 12px 36px; margin: 0; padding: 0; list-style: none; }
.scout-holds__summary { display: grid; flex-basis: 100%; gap: 4px; }
.scout-holds__summary p { margin: 0; color: var(--muted); font-size: 13px; }
.scout-holds__hold .chip { font-family: var(--font-mono); font-size: 12px; }
.scout-holds__run { display: none; }

.style-profile__main,
.style-profile__versions { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 12px; min-width: 0; padding: 20px 32px; }
.style-profile__versions { padding-inline: 24px; border-top: 1px solid var(--line); }
.style-profile__heading { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.style-profile__status { margin: 0; }
.style-profile__status:empty { display: none; }
.style-profile__form,
.style-profile__main > .empty-state { max-width: 640px; }
.style-profile__text { min-height: 360px; font-size: 14px; line-height: 22px; }
.style-profile__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.style-profile__provenance { margin: 0; color: var(--faint); font-size: 12px; }

/* A partner's page: the names and notes, then the queries held, with Edit
   and Remove in the view bar at a desktop and at the foot on a phone. */
.channel-partner > section { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 10px; min-width: 0; padding: 20px 32px; }
.channel-partner > .channel-partners__held { padding-inline: 12px; }
.channel-partner__names { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; padding: 0; list-style: none; }
.channel-partner__notes { max-width: 640px; color: var(--muted); font-size: 14px; }
.channel-partner__actions { display: none; }
.channel-partner__edit { max-width: 560px; padding-top: 20px; }
.channel-partners__narrow { display: none; }

@media (width >= 1100px) {
  .channel-partners,
  .style-profile { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
  .channel-partners { grid-template-rows: auto 1fr; }
  .channel-partners__partners { grid-area: 1 / 1; }
  .channel-partners__held { grid-area: 2 / 1; padding-top: 28px; }
  .channel-partners__add { grid-area: 1 / 2 / 3 / 3; border-block: 0; border-left: 1px solid var(--line); }
  .style-profile__versions { border-top: 0; border-left: 1px solid var(--line); }
}

@media (width < 1100px) {
  .channel-partners__wide { display: none; }
  .channel-partners__narrow { display: inline; }
}

@media (width < 768px) {
  /* A card has the room to wrap what a row truncates: a reason, a query. */
  .data-table--cards :is(.scout-holds__hold, .channel-partners__hold) .data-table__cell { white-space: normal; }
  .data-table--cards :is(.scout-holds__hold, .channel-partners__hold) .data-table__value { min-width: 0; overflow-wrap: anywhere; }
  .channel-partner > section { padding: 16px; }
  .channel-partner > .channel-partners__held { padding-inline: 0; }
  .channel-partner__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 16px; }
  .channel-partner__actions .button { width: 100%; }
  .channel-partners > section,
  .scout-holds__list { padding-inline: 0; }
  .channel-partners > .channel-partners__add { padding: 16px; }
  /* Touch height on a phone; the component's touch size is full width at
     every width, and a desktop's buttons here are not. */
  :is(.channel-partners__add, .style-profile__actions) .button { height: 44px; }
  .scout-holds__run { display: block; flex-basis: 100%; }
  .scout-holds__run :is(.button-form, .button) { width: 100%; }
  .style-profile__main,
  .style-profile__versions { padding: 16px; }
  .style-profile__text { min-height: 300px; }
  .style-profile__actions { flex-direction: column; align-items: stretch; }
  .style-profile__actions .button-form,
  .style-profile__actions .button { width: 100%; }
  .style-profile__provenance { text-align: center; }
}
/* === end C6j === */
/* === C6b: Imports and Import run (appendix system-data.md 3 to 5) === */
.imports-header { display: grid; gap: 20px; }
.imports-header .record-header__meta { margin: 0; }
/* The source strip: equal cells, a count over its last word. */
.import-sources {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  list-style: none;
  overflow: hidden;
}
.import-sources__cell {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  box-shadow: 1px 0 0 var(--line);
}
.import-sources__label,
.import-sources__meta { color: var(--faint); font-size: 12px; line-height: 16px; }
.import-sources__value { color: var(--fg); font-size: 16px; font-weight: 700; line-height: 20px; }
main > .tabs { margin-bottom: 0; }

/* A run's header: the eyebrow and title, its status, then its stats. */
.import-run-header { align-items: end; }
.import-run-header .eyebrow { margin: 0 0 4px; font-size: 12px; }
.import-run-header__stats { flex-basis: 100%; gap: 12px 36px; }
.import-run-header__line { display: none; }
.import-steps {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--faint);
  font-size: 13px;
}
.import-steps__step { display: inline-flex; align-items: center; gap: 8px; }
.import-steps__step::before {
  content: "";
  inline-size: 14px;
  block-size: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}
.import-steps__step--done { color: var(--muted); }
.import-steps__step--done::before { border-color: var(--good); background: var(--good); }
.import-steps__step--current { color: var(--fg); font-weight: 500; }
.import-steps__step--current::before { border: 2px solid var(--accent); }
.import-run__banner { margin: 16px 0 0; }

.import-section { display: grid; gap: 10px; min-width: 0; padding: 20px 0; border-bottom: 1px solid var(--line); }
.import-section > * { margin: 0; }
.import-section__text,
.import-section__empty { color: var(--muted); font-size: 14px; line-height: 20px; }
.import-run__steps { max-width: 720px; padding-left: 20px; color: var(--muted); font-size: 14px; line-height: 22px; }
.import-counts { display: grid; margin: 0; }
.import-counts > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-height: 32px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.import-counts > div:last-child { border-bottom: 0; }
.import-counts dt { color: var(--muted); font-family: var(--font-mono); font-size: 12px; overflow-wrap: anywhere; }
.import-counts dd { margin: 0; color: var(--fg); font-size: 14px; text-align: right; overflow-wrap: anywhere; }
.import-changed,
.import-unplaced { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.import-unplaced > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; color: var(--muted); }
.import-changed > li { display: grid; gap: 2px; }
.import-holds { display: grid; margin: 0; padding: 0; list-style: none; }
.import-hold { display: grid; gap: 8px; min-width: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.import-hold > * { margin: 0; }
/* A subject with no break in it wraps rather than push a phone sideways. */
.import-hold__subject { padding: 0; border: 0; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.import-hold__meta,
.import-hold__sends { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.import-hold__sends { padding-left: 18px; }
.import-hold__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.import-changed__meta { color: var(--faint); font-size: 12px; }
.import-report { display: grid; gap: 6px; min-width: 0; padding: 8px 0; border-bottom: 1px solid var(--line); }
.import-report__domain { margin: 0; padding: 0; border: 0; font-family: var(--font-mono); font-size: 12px; font-weight: 400; }
.import-report__line { margin: 0; color: var(--faint); font-size: 13px; }
.import-report__scroll { max-inline-size: 100%; overflow-x: auto; }

.import-run { margin-inline: calc(-1 * var(--gutter)); border-top: 1px solid var(--line); }
.import-run__main,
.import-run__side { min-width: 0; padding: 0 32px 32px; }
.import-run__side { display: grid; align-content: start; gap: 14px; padding-top: 20px; }
.import-facts { display: grid; gap: 14px; margin: 0; }
.import-facts > div { display: grid; gap: 3px; }
.import-facts dt { color: var(--faint); font-size: 12px; }
.import-facts dd { margin: 0; color: var(--fg); font-size: 14px; line-height: 18px; overflow-wrap: anywhere; }

/* The review: its tabs, an info bar under each, then the rows. */
.import-review { margin-top: 16px; }
.import-review__bar { margin: 12px 0; }
.import-review__bar .banner { height: auto; padding-block: 10px; }
.import-review__bar .banner__action { display: flex; flex-wrap: wrap; gap: 8px; }
.import-duplicates { display: grid; margin: 0; padding: 0; list-style: none; }
.import-duplicate { display: grid; gap: 12px; padding: 16px 0 18px; border-bottom: 1px solid var(--line); }
.import-duplicate__reason { display: grid; gap: 2px; margin: 0; padding: 0; border: 0; color: var(--accent); font-size: 13px; font-weight: 400; }
.import-duplicate__connection { color: var(--faint); font-size: 12px; }
.import-duplicate__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.import-duplicate__narrow { display: none; }
.import-duplicate__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.import-duplicate__card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.import-duplicate__card--primary { border-color: var(--accent); box-shadow: inset 2px 0 0 var(--accent); background: var(--accent-soft); }
.import-duplicate__name { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 500; }
.import-duplicate__name a:first-child { color: var(--fg); }
.import-duplicate__mark { flex: none; color: var(--faint); font-size: 12px; font-weight: 400; }
.import-duplicate__card--primary .import-duplicate__mark { color: var(--accent); }
.import-duplicate__role { color: var(--muted); font-size: 13px; }
.import-duplicate__known { color: var(--faint); font-size: 12px; overflow-wrap: anywhere; }

/* The New import drawer: a section per source. */
.import-sheet { display: grid; }
.import-sheet__section { display: grid; gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.import-sheet__section:first-child { padding-top: 0; }
.import-sheet__section > * { margin: 0; }
.import-sheet__title { margin: 0; padding: 0; border: 0; font-size: 14px; font-weight: 500; }
.import-sheet__aside { margin-left: 8px; color: var(--faint); font-size: 12px; font-weight: 400; }
.import-sheet__text,
.import-sheet__note { color: var(--muted); font-size: 13px; line-height: 19px; overflow-wrap: anywhere; }
.import-sheet__note { margin: 0; padding-top: 20px; color: var(--faint); }
.import-sheet__form { display: grid; gap: 12px; }
.import-sheet__command { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.import-sheet__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.import-sheet__domains { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 0; border: 0; }
.import-sheet__domains legend { margin-bottom: 8px; padding: 0; color: var(--faint); font-size: 12px; }
.import-sheet__phone { display: none; }
.import-drop {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 20px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--fg);
  font-size: 13px;
  text-align: center;
  cursor: pointer;
}
.import-drop:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.import-drop__hint { color: var(--faint); font-size: 12px; }
.import-drop__input { max-inline-size: 100%; color: var(--muted); font-size: 12px; }

@media (width >= 1100px) {
  .import-run { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
  .import-run__main { border-right: 1px solid var(--line); }
}

@media (width < 768px) {
  /* A phone lists the runs alone (appendix system-data.md 3.4). */
  .import-sources { display: none; }
  .import-run__main,
  .import-run__side { padding: 0 16px 24px; }
  .import-run-header__stats,
  .import-steps,
  .import-facts__wide { display: none; }
  .import-run-header__line { display: block; flex-basis: 100%; margin: 0; color: var(--muted); font-size: 13px; line-height: 19px; }
  .import-duplicate__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .import-duplicate__actions > *,
  .import-duplicate__actions .button { width: 100%; }
  .import-duplicate__wide { display: none; }
  .import-duplicate__narrow { display: inline; }
  /* clawd reads a checkout on the machine that has it (PRD C 6). */
  .import-sheet__desktop { display: none; }
  .import-sheet__phone { display: block; }
  /* The top bar names the run; the title says where it stands, so it stays. */
  .import-run-header .record-header__title { display: block; font-size: 20px; line-height: 26px; }
}

/* === end C6b === */
/* === C6k: Agents, Connected apps, Integrations === */
/* Agents (appendix system-settings.md 7, 8), Connected apps (9) and
   Integrations (10). Names, scopes, client ids and credential keys are set
   in mono. The bands run edge to edge as the record header does. */
.mono-chip { font-family: var(--font-mono); font-size: 12px; }
main > :is(.connect-claude, .integration) { margin-inline: calc(-1 * var(--gutter)); padding-inline: 32px; }

/* A token just made: its panel under the header, and its agent's row first,
   marked as the one the panel is about. */
main > .result-panel {
  margin-inline: calc(-1 * var(--gutter));
  padding: 16px 32px;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--good) 35%, var(--good-soft));
  border-radius: 0;
  background: var(--good-soft);
}
.result-panel__title { display: flex; align-items: center; gap: 8px; }
.result-panel__title .icon { flex: none; color: var(--good); }
.result-panel__value .result-panel__field {
  max-width: 560px;
  height: 36px;
  border-color: var(--line-strong);
  background: var(--bg);
  font-size: 13px;
}
.agents__row--issued { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.agents__scopes { display: flex; align-items: center; gap: 6px; width: 100%; }
.agents__scopes .input { flex: 1; min-width: 0; height: 28px; font-size: 12px; }
.agents__scopes .agents__save { color: var(--accent); }
.agents__scope-list { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.agents__row [role=cell][data-lane="name"] { font-family: var(--font-mono); font-size: 13px; font-weight: 700; }
.agents__row .data-table__detail { font-family: var(--font-sans); font-weight: 400; }
:is(.agents__description, .agents__seen) { display: block; }
/* A desktop's column says when an agent was last seen; a phone's card says
   it under the description instead, so it is drawn, and read, once. */
.data-table:not(.data-table--cards) .agents__seen,
.data-table--cards .agents__row [data-lane="last_seen"] { display: none; }

.agent-form__back { color: var(--accent); font-size: 13px; }
.agent-form__banner { max-width: 640px; margin-block: 16px; }
.agent-form__banner .banner { height: auto; min-height: 44px; padding-block: 10px; }
.agent-form__known p { margin: 0; color: var(--faint); font-size: 12px; }
.agent-form__known ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; }

.connect-claude { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding-block: 20px 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.connect-claude__steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.connect-claude__steps > li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px 12px;
  color: var(--fg);
  font-size: 14px;
  line-height: 22px;
  counter-increment: step;
}
.connect-claude__steps > li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 12px;
}
.connect-claude__url { display: flex; flex-wrap: wrap; grid-column: 2; align-items: center; gap: 8px; }
.connect-claude__url .input { flex: 1 1 240px; max-width: 420px; font-size: 12px; }
.connect-claude__copied { color: var(--good); font-size: 12px; }
.connected-apps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 20px; }
.connected-apps__uid { color: var(--muted); font-family: var(--font-mono); font-size: 12px; overflow-wrap: anywhere; }
.connected-apps__admin-only { color: var(--faint); font-size: 12px; }
/* A desktop names the client type under the app and gives the id, tokens
   and last issue columns; a phone's card puts the type beside the name and
   the rest in two lines under it (appendix 9). Each is drawn, and read, once. */
.connected-apps__narrow { display: flex; flex-direction: column; gap: 2px; }
/* A desktop's table hides the card's lines and lane. */
.data-table:not(.data-table--cards) .connected-apps__narrow,
.data-table:not(.data-table--cards) .data-table__row [data-lane="type"] { display: none; }
.data-table:not(.data-table--cards) .integration-runs__summary { display: none; }
/* A card hides the columns its lines say. */
.data-table--cards .connected-apps__wide,
.data-table--cards .connected-apps__row :is([data-lane="client"], [data-lane="tokens"], [data-lane="issued"]),
.data-table--cards .data-table__body .connected-apps__row::before { display: none; }
.data-table--cards .integration-runs__row :is([data-lane="duration"], [data-lane="pushed"], [data-lane="pulled"], [data-lane="drift"], [data-lane="engagements"]),
.data-table--cards .data-table__body .integration-runs__row::before { display: none; }
.data-table--cards :is(.connected-apps__row, .integration-runs__row) .data-table__detail { display: flex; flex-direction: column; gap: 2px; }
.data-table--cards :is(.connected-apps__row, .integration-runs__row) .data-table__cell--status { align-self: start; }
.integration-runs__summary { color: var(--muted); }
.integration-runs__summary .tone-warning { font-weight: 500; }

.integration { display: flex; gap: 24px; padding-block: 20px; border-bottom: 1px solid var(--line); }
.integration__name { display: grid; flex: 0 0 180px; align-content: start; gap: 4px; }
.integration__name h2 { margin: 0; padding: 0; border: 0; color: var(--fg); font-size: 16px; font-weight: 500; line-height: 20px; }
.integration__detail { display: grid; grid-template-columns: minmax(0, 1fr); flex: 1; align-content: start; gap: 12px; min-width: 0; }
.integration__detail p,
.integration__steps { margin: 0; color: var(--fg); font-size: 14px; line-height: 20px; }
.integration__steps { display: grid; gap: 6px; padding-left: 20px; color: var(--muted); }
.integration__detail .integration__note { color: var(--faint); font-size: 12px; line-height: 18px; }
.integration__detail .integration__error { color: var(--danger); font-size: 13px; }
.integration-runs { margin-top: 24px; }
.integration-runs .section-label { margin-bottom: 8px; }

@media (width < 768px) {
  main > :is(.connect-claude, .integration, .result-panel) { padding-inline: 16px; }
  .agent-form__header { display: none; }
  .connect-claude__url { grid-column: 1 / -1; }
  .connect-claude__url .input { max-width: none; }
  .connect-claude__url .button { width: 100%; }
  .integration { flex-direction: column; gap: 12px; padding-block: 16px; }
  .integration__name { display: flex; flex-basis: auto; justify-content: space-between; }
  .integration__action .button { width: 100%; }
  .result-panel__value .result-panel__field { flex-basis: 100%; max-width: none; }
  .result-panel__value .button { flex: 1; }
  .result-panel__value .result-panel__done { flex: 0 0 88px; }
}
/* === end C6k === */

/* === C6m: Status === */
/* The groups flow into two columns at a desktop, in the document's order,
   which is the phone's (appendix system-settings.md 14): never re-ordered
   by the stylesheet, so a screen reader and the eye agree. */
.status-checks { margin-top: 20px; }
.status-checks__group { break-inside: avoid; margin-bottom: 24px; }
.status-checks__header .stats { margin: 0; padding: 0; list-style: none; }
.status-checks__fix { color: var(--accent); font-size: 12px; font-weight: 500; white-space: nowrap; }
/* A check's word is the row's point, so a narrow list keeps it whole
   ("Not connected") rather than the 52px a status usually folds to. */
@container list (width < 560px) {
  .status-checks .list-row__lane:last-child { flex-basis: auto; }
}

@media (width >= 1100px) {
  .status-checks { columns: 2; column-gap: 48px; }
}
/* The sub-nav's alert: Status's 6px warning dot while a check fails. */
.sub-nav__alert { display: inline-flex; flex: none; }
.sub-nav__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--warning); }
/* === end C6m === */
/* === C6l: Granola folders, Basecamp, QuickBooks === */
/* Granola folders (appendix system-settings.md 11): the header's stats,
   then the folders, each with its client select and Save in the actions'
   lane; an unmapped folder is tinted and says so in words. A phone reads
   the stats as one line and takes Sync at the foot. */
.granola-folders__stats { display: flex; flex-wrap: wrap; gap: 12px 36px; flex-basis: 100%; margin: 0; padding: 0; list-style: none; }
.granola-folders__stats-line,
.granola-folders__narrow,
.granola-folders__phone-action { display: none; }
.granola-folders__banner,
.oauth-connection__banner { margin-top: 16px; }
.granola-folders__list { margin-top: 16px; }
.granola-folders__row [data-lane="folder"] .icon { flex: none; width: 16px; height: 16px; margin-right: 4px; color: var(--muted); vertical-align: -3px; }
.granola-folders__row--unmapped { background: color-mix(in srgb, var(--warning) 6%, transparent); }
.granola-folders__row--unmapped [data-lane="folder"] .icon { color: var(--warning); }
.granola-folders__unmapped { margin-left: 4px; color: var(--warning); font-size: 12px; }
.granola-folders__map { display: flex; align-items: center; gap: 8px; width: 100%; }
.granola-folders__map .select { flex: 1 1 260px; min-width: 0; }
.granola-folders__row--unmapped .granola-folders__map .input { border-color: color-mix(in srgb, var(--warning) 50%, var(--line)); }
.data-table--cards .granola-folders__map { flex-wrap: wrap; }
.data-table--cards .granola-folders__map .select { flex-basis: 100%; }
.granola-folders__empty .empty-state { align-items: flex-start; text-align: left; }

/* Basecamp and QuickBooks (appendix 12, 13): three facts, each a word in
   the state's colour over a caption, then the connection row by row in a
   640px list, then Connect and why. */
.oauth-connection__facts { display: flex; flex-wrap: wrap; gap: 12px 48px; flex-basis: 100%; margin: 0; }
.oauth-connection__facts > div { display: grid; gap: 2px; }
.oauth-connection__facts dt { color: var(--faint); font-size: 12px; }
.oauth-connection__facts dd { margin: 0; color: var(--fg); font-size: 20px; font-weight: 700; line-height: 24px; }
.oauth-connection__facts dd .status-text { font-size: inherit; line-height: inherit; }
.oauth-connection__facts dd.oauth-connection__caption,
.oauth-connection__caption { color: var(--faint); font-size: 12px; font-weight: 400; line-height: 17px; }
.oauth-connection__section { display: grid; gap: 10px; max-width: 640px; margin-top: 28px; }
.oauth-connection__rows { margin: 0; border-top: 1px solid var(--line); }
.oauth-connection__rows > div {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  min-height: 40px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.oauth-connection__rows dt { color: var(--faint); font-size: 13px; }
.oauth-connection__rows dd { min-width: 0; margin: 0; color: var(--fg); overflow-wrap: anywhere; }
.oauth-connection__callback { min-height: 44px; }
.oauth-connection__callback dd { display: flex; align-items: center; gap: 8px; }
.oauth-connection__url {
  flex: 1;
  min-width: 0;
  padding: 5px 8px;
  border-radius: 4px;
  background: var(--panel);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.oauth-connection__footer { display: grid; gap: 10px; max-width: 640px; margin-top: 16px; }
.oauth-connection__actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 12px; }
.oauth-connection__footer > .oauth-connection__caption { max-width: 460px; margin: 0; }

@media (width < 768px) {
  .granola-folders__stats,
  .granola-folders__wide { display: none; }
  .granola-folders__narrow { display: inline; }
  .granola-folders__stats-line { display: block; flex-basis: 100%; margin: 0; color: var(--faint); font-size: 13px; }
  .granola-folders__phone-action { display: block; margin-top: 16px; }
  .granola-folders__phone-action .button-form { display: flex; }
  .oauth-connection__facts { display: grid; gap: 8px; }
  .oauth-connection__facts > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; }
  .oauth-connection__facts dt { font-size: 13px; }
  .oauth-connection__facts dd { font-size: 14px; font-weight: 500; line-height: 18px; }
  /* One caption under the facts says where the client lives, not three. */
  .oauth-connection__facts > div:not(:first-child) dd.oauth-connection__caption { display: none; }
  .oauth-connection__facts dd.oauth-connection__caption { flex-basis: 100%; }
  .oauth-connection__rows > div { display: flex; justify-content: space-between; gap: 12px; }
  .oauth-connection__rows dd { text-align: right; }
  .oauth-connection__rows > .oauth-connection__callback { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 8px 0; }
  .oauth-connection__callback dd { text-align: left; }
  .oauth-connection__actions { display: grid; }
  .oauth-connection__actions .button-form,
  .oauth-connection__actions .button,
  .oauth-connection__actions .button-with-reason { width: 100%; }
}
/* === end C6l === */
