/* Mercury11 -- ported from design/design-reference (screens/*.html are the
   source of truth for layout, spacing, type and color). Below 760px the rail
   becomes a top bar and cards stack.

   THEMES. The light palette is the design reference's. The dark one is
   derived from it: the same hues, the ground and ink swapped, the accent and
   amber lifted until text on them passes WCAG AA. Every color in this file
   is a token below -- nothing hard-coded -- so both palettes cover every
   screen. <html data-theme> is rendered by the server (app/pages.py):
   "dark" forces the dark palette, "light" the light one, and "system" (and
   no attribute) follows the device. The dark block appears twice (forced,
   and the device's choice); a test keeps the two identical. */

:root {
  /* The one spacing scale (Jon, 2026-10-09): 8 / 16 / 24 / 32 / 48, every
     margin, padding and gap one of these. Two half-steps, named for where
     they belong: 12 between the lines inside a card, 4 inside a control
     (a pill, an icon beside its label). tests/spacing_audit.js holds every
     page to it. */
  --s-half: 4px;
  --s1: 8px;
  --s-line: 12px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s6: 48px;
  --s8: 64px;
  --ground: #F6F4EE;
  --surface: #FFFFFF;
  --surface-2: #FBFAF7;
  --sunken: #EFEDE5;
  --ink: #16201C;
  --ink-2: #2E3A34;
  --ink-3: #4A544E;
  --muted: #5E6863;
  --accent: #1A5C49;
  --accent-soft: #E6EFEA;
  --accent-ink: #134536;
  --amber: #7A4F0F;
  --amber-soft: #F7EFDF;
  --danger: #8A3524;
  --danger-soft: #F6E4DF;
  --border: #E4DFD5;
  --border-2: #EFEBE2;
  --field: #D9D3C7;
  --inset: #ECE7DC;
  --soft-border: #C9D6CF;
  --soft-fill: #F3F8F5;
  --chip: #F0EDE5;
  --on-accent: #FFFFFF;
  --banner-ink: #5A3D0C;
  --needs-fill: #FDF8EF;
  --needs-icon: #F5E8CE;
  --dropzone-border: #C3BCAB;
  --lede-ink: #3C4641;
  --row-tint: #FBFDFB;
  --amber-border: #E6D3AE;
  --scrim: rgba(246, 244, 238, 0);
  --drop-veil: rgba(246, 244, 238, 0.86);
  --qr-ground: #FFFFFF;
  --backdrop: rgba(14, 19, 17, 0.45);
  --raised: none;
  --menu-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  --toast-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  --chart-1: #1A5C49;
  --chart-2: #8A5A12;
  --chart-3: #3C659E;
  --chart-4: #8A3524;
  --chart-grid: #E4DFD5;
  --chart-axis: #8C948F;
  color-scheme: light;
  --serif: "Fraunces", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

:root[data-theme="dark"] {
  --ground: #121815;
  --surface: #19211D;
  --surface-2: #1D2622;
  --sunken: #0E1311;
  --ink: #ECEAE3;
  --ink-2: #D6D4CC;
  --ink-3: #BCBFB8;
  --muted: #A3AAA5;
  --accent: #7CC4A8;
  --accent-soft: #1F3A31;
  --accent-ink: #A9DCC7;
  --amber: #E6B96E;
  --amber-soft: #33291A;
  --danger: #F0A08D;
  --danger-soft: #3B221C;
  --border: #2D3833;
  --border-2: #242E29;
  --field: #3E4A44;
  --inset: #29332E;
  --soft-border: #33514A;
  --soft-fill: #1B2C26;
  --chip: #232C28;
  --on-accent: #0E1311;
  --banner-ink: #F2D9AA;
  --needs-fill: #251F16;
  --needs-icon: #3A2E1A;
  --dropzone-border: #4A5650;
  --lede-ink: #C7CAC3;
  --row-tint: #1B2420;
  --amber-border: #5A4527;
  --scrim: rgba(18, 24, 21, 0);
  --drop-veil: rgba(18, 24, 21, 0.86);
  --qr-ground: #FFFFFF;
  --backdrop: rgba(0, 0, 0, 0.6);
  --raised: 0 1px 2px rgba(0, 0, 0, 0.45), 0 8px 24px rgba(0, 0, 0, 0.35);
  --menu-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  --toast-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  --chart-1: #7CC4A8;
  --chart-2: #E6B96E;
  --chart-3: #8FB3E8;
  --chart-4: #F0A08D;
  --chart-grid: #2D3833;
  --chart-axis: #6E7A74;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #121815;
    --surface: #19211D;
    --surface-2: #1D2622;
    --sunken: #0E1311;
    --ink: #ECEAE3;
    --ink-2: #D6D4CC;
    --ink-3: #BCBFB8;
    --muted: #A3AAA5;
    --accent: #7CC4A8;
    --accent-soft: #1F3A31;
    --accent-ink: #A9DCC7;
    --amber: #E6B96E;
    --amber-soft: #33291A;
    --danger: #F0A08D;
    --danger-soft: #3B221C;
    --border: #2D3833;
    --border-2: #242E29;
    --field: #3E4A44;
    --inset: #29332E;
    --soft-border: #33514A;
    --soft-fill: #1B2C26;
    --chip: #232C28;
    --on-accent: #0E1311;
    --banner-ink: #F2D9AA;
    --needs-fill: #251F16;
    --needs-icon: #3A2E1A;
    --dropzone-border: #4A5650;
    --lede-ink: #C7CAC3;
    --row-tint: #1B2420;
    --amber-border: #5A4527;
    --scrim: rgba(18, 24, 21, 0);
    --drop-veil: rgba(18, 24, 21, 0.86);
    --qr-ground: #FFFFFF;
    --backdrop: rgba(0, 0, 0, 0.6);
    --raised: 0 1px 2px rgba(0, 0, 0, 0.45), 0 8px 24px rgba(0, 0, 0, 0.35);
    --menu-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    --toast-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
    --chart-1: #7CC4A8;
    --chart-2: #E6B96E;
    --chart-3: #8FB3E8;
    --chart-4: #F0A08D;
    --chart-grid: #2D3833;
    --chart-axis: #6E7A74;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); background: var(--ground); color: var(--ink); }
a { color: var(--accent); }
button { font-family: var(--sans); }
[hidden] { display: none !important; }
.num, .mono { font-family: var(--mono); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- brand */
.brand { display: flex; align-items: center; gap: var(--s-line); color: var(--ink);
  text-decoration: none; }
.mark { flex-shrink: 0; }
.wordmark { font-family: var(--serif); font-size: 21px; font-weight: 500;
  letter-spacing: -0.42px; font-variation-settings: "opsz" 36; }

/* ---------------------------------------------------------------- buttons */
.btn { min-height: 44px; padding: 0 var(--s3); border-radius: 8px; font-size: 14px;
  cursor: pointer; font-weight: 500; }
.btn:disabled { cursor: not-allowed; opacity: 0.55; }
.btn-primary { border: 0; background: var(--accent); color: var(--on-accent); }
.btn-secondary { border: 1px solid var(--field); background: transparent; color: var(--ink-2);
  font-weight: 400; padding: 0 var(--s2); }
.btn-soft { min-height: 42px; border: 1px solid var(--soft-border); background: var(--soft-fill);
  color: var(--accent-ink); font-size: 13.5px; }
.btn-link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0;
  font-size: 13px; font-weight: 500; }
.link-btn { display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; }
.btn-wide { width: 100%; min-height: 50px; border-radius: 9px; font-size: 15.5px; }

input[type=text], input[type=email], input[type=password], select {
  width: 100%; min-height: 44px; padding: 0 var(--s2); border: 1px solid var(--field);
  border-radius: 8px; font-family: var(--sans); font-size: 14px; color: var(--ink);
  background: var(--surface-2); }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- shell */
.shell { display: flex; min-height: 100vh; }
.rail { width: 224px; flex-shrink: 0; padding: var(--s3) var(--s2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.rail .brand { padding: 0 var(--s1) var(--s3); }
.rail-nav { display: flex; flex-direction: column; gap: var(--s-half); }
.rail-item { display: flex; align-items: center; gap: var(--s-line); min-height: 44px; padding: 0 var(--s-line);
  border-radius: 8px; color: var(--ink-2); font-size: 14px; text-decoration: none; }
.rail-item svg { flex-shrink: 0; }
.rail-item .rail-label { flex-grow: 1; }
.rail-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink);
  font-weight: 500; }
.rail-item:hover { background: var(--sunken); }
.rail-item[aria-current="page"]:hover { background: var(--accent-soft); }
.pill-count { font-family: var(--mono); font-size: 11px; padding: var(--s-half) var(--s1); border-radius: 20px;
  background: var(--amber-soft); color: var(--amber); }
/* Findings asked of you (the rail's second count): the accent's, not amber. */
.pill-asked { background: var(--accent-soft); color: var(--accent); }
.rail-sub { display: flex; flex-direction: column; gap: 0; padding: var(--s-half) 0 var(--s-half) var(--s3); }
.rail-subitem { display: flex; align-items: center; min-height: 32px; padding: 0 var(--s-line);
  border-radius: 6px; color: var(--ink-3); font-size: 13px; text-decoration: none;
  overflow-wrap: anywhere; }
.rail-subitem:hover { background: var(--sunken); }
.rail-subitem[aria-current="page"] { color: var(--accent-ink); font-weight: 500; }
.rail-spacer { flex-grow: 1; }
.rail-foot { padding: var(--s2) var(--s-line) var(--s-half); border-top: 1px solid var(--border); }
.rail-foot-row { display: flex; align-items: flex-start; gap: var(--s1); }
.rail-who { flex-grow: 1; min-width: 0; }
.rail-gear { display: inline-flex; align-items: center; justify-content: center; width: 36px;
  height: 36px; margin: calc(-1 * var(--s1)) calc(-1 * var(--s1)) 0 0; border-radius: 8px; color: var(--muted); flex-shrink: 0; }
.rail-gear:hover { background: var(--sunken); color: var(--ink); }
.rail-gear[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
.rail-business { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.rail-user { font-size: 12px; color: var(--muted); padding-top: var(--s-half); overflow-wrap: anywhere; }
button.rail-gear { border: 0; background: none; cursor: pointer; padding: 0; position: relative; }
.rail-gear[aria-expanded="true"] { background: var(--sunken); color: var(--ink); }
.gear-count { position: absolute; top: -2px; right: -4px; }
/* The gear's menu: above the gear at the foot of the rail. */
.gear-menu-wrap { position: relative; flex-shrink: 0; }
.gear-menu { position: absolute; right: -8px; bottom: calc(100% + 12px); z-index: 20;
  min-width: 190px; padding: var(--s1); display: flex; flex-direction: column; gap: var(--s-half);
  background: var(--surface); border: 1px solid var(--field); border-radius: 10px; }
.gear-menu[hidden] { display: none; }
.gear-item { display: flex; align-items: center; justify-content: space-between; gap: var(--s-line);
  min-height: 36px; padding: 0 var(--s-line); border: 0; border-radius: 6px; background: none;
  color: var(--ink); font: inherit; font-size: 13.5px; text-align: left; text-decoration: none;
  cursor: pointer; }
.gear-item:hover, .gear-item:focus-visible { background: var(--sunken); }
.gear-item[aria-current="page"] { color: var(--accent-ink); font-weight: 500; }

.pane { flex-grow: 1; min-width: 0; padding: var(--s4) var(--s4); display: flex; flex-direction: column; }
#pane-body { display: flex; flex-direction: column; gap: var(--s2); flex-grow: 1; min-width: 0; }
.banner { background: var(--amber-soft); color: var(--banner-ink); border-radius: 10px; padding: var(--s-line) var(--s2);
  font-size: 13.5px; margin-bottom: var(--s2); }
.banner[data-banner] { display: flex; gap: var(--s-line); align-items: flex-start; }
.banner[data-banner][hidden] { display: none; }
.banner[data-banner] > span { flex: 1; }
.banner-dismiss { flex: none; border: 0; background: none; color: inherit; font-size: 18px;
  line-height: 1; padding: 0 var(--s-half); cursor: pointer; border-radius: 4px; }
.banner-dismiss:hover { background: var(--amber-border); }
.rail-bell { position: relative; }
.bell-count { position: absolute; top: -2px; right: -4px; }
.loading, .empty { color: var(--muted); font-size: 14px; }
p.empty, p.loading { margin: 0; }
/* The pane's own column already puts 16px between its children: a header
   there adds 8, to make its 24. */
#pane-body > .page-head { margin-bottom: var(--s1); }
input[type=checkbox], input[type=radio] { margin: 0; }
/* Model spend's CSV range: the app's field, not the browser's 1px date box. */
#spend-from, #spend-to { min-height: 44px; padding: 0 var(--s1); border: 1px solid var(--field);
  border-radius: 8px; font-family: var(--sans); font-size: 14px; color: var(--ink);
  background: var(--surface-2); }
textarea { padding: var(--s1) var(--s-line); }
.error-text { color: var(--danger); font-size: 13.5px; }

/* ---------------------------------------------------------------- page heads */
/* A page's header (Jon, 2026-10-09): its count on the title's baseline, and
   24px below it before the first section. */
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4);
  margin-bottom: var(--s3); }
.page-head h1, .h1 { margin: 0; font-family: var(--serif); font-size: 27px; font-weight: 600;
  letter-spacing: -0.3px; }
.page-lede { margin: var(--s1) 0 0; font-size: 14.5px; line-height: 1.6; color: var(--ink-3);
  max-width: 640px; }
.count-pill { flex-shrink: 0; font-family: var(--mono); font-size: 12px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); padding: var(--s1) var(--s-line);
  border-radius: 20px; }
.section-label { font-size: 11px; letter-spacing: 0.7px; text-transform: uppercase;
  color: var(--muted); }
/* 32px between titled sections; a section's title 16px above what it heads. */
h2.section { margin: var(--s4) 0 var(--s2); font-size: 16px; font-weight: 500; }
h2.section:first-child, .page-head + h2.section { margin-top: 0; }
.section-lede { margin: 0 0 var(--s2); font-size: 13.5px; color: var(--muted); }
.source-group { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.source-group-head { padding-top: var(--s1); overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: var(--s3) var(--s3); display: flex; flex-direction: column; gap: var(--s-line); min-width: 0; }
.badge-row { display: flex; align-items: center; gap: var(--s-line); flex-wrap: wrap; }
.badge { font-family: var(--mono); font-size: 11px; letter-spacing: 0.4px; padding: var(--s-half) var(--s-line);
  border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.card-meta { font-size: 12px; color: var(--muted); }
.observation { margin: 0; font-size: 17px; line-height: 1.55; font-weight: 500;
  overflow-wrap: anywhere; }
.usually { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-3); }
.ask-label { font-size: 14.5px; font-weight: 500; padding-top: var(--s-half); }
.card-actions { display: flex; align-items: center; gap: var(--s-line); padding-top: var(--s-half); flex-wrap: wrap; }
.evidence { font-size: 12.5px; color: var(--muted); padding-left: var(--s-half); overflow-wrap: anywhere; }
/* "Ask someone who knows": who it waits on, the asker's note, and the panel. */
.ask-waiting { margin: 0; font-size: 13.5px; color: var(--ink-2); background: var(--accent-soft);
  border-radius: 8px; padding: var(--s1) var(--s-line); }
.ask-note { margin: 0; padding: var(--s-half) var(--s-line); border-left: 3px solid var(--border);
  color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.ask-panel { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s-line);
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.ask-panel p { margin: 0; }
/* An outside person's reply, waiting to be saved as the answer. */
.ask-reply { display: flex; flex-direction: column; gap: var(--s-half); }
.ask-reply-head { margin: 0; font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
/* The outside person's one-time page. */
.answer-question { margin: 0; font-weight: 600; }
.answer-observation { margin: 0; color: var(--ink-2); }
#answer-form { display: flex; flex-direction: column; gap: var(--s1); }
#answer-text { width: 100%; font: inherit; padding: var(--s1) var(--s-line); border: 1px solid var(--field);
  border-radius: 8px; background: var(--surface); color: var(--ink); resize: vertical; }
#answer-body { display: flex; flex-direction: column; gap: var(--s-line); }
#answer-body[hidden] { display: none; }
.members-only { margin: 0; font-size: 13.5px; color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--inset); border-radius: 8px; padding: var(--s-line) var(--s2); }

.small-list { display: flex; flex-direction: column; gap: var(--s1); }
.small-card { background: var(--surface-2); border: 1px solid var(--inset); border-radius: 12px;
  padding: var(--s2) var(--s3); display: flex; align-items: flex-start; gap: var(--s-line); }
.small-card svg { flex-shrink: 0; margin-top: var(--s-half); }
.small-card .grow { flex-grow: 1; min-width: 0; }
.small-card.is-retired { background: transparent; }
.small-card.is-retired .small-title { color: var(--ink-2); }
.small-title { margin: 0; font-size: 14.5px; line-height: 1.5; font-weight: 500;
  overflow-wrap: anywhere; }
.small-body { margin: var(--s-half) 0 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-3);
  overflow-wrap: anywhere; }
.small-meta { flex-shrink: 0; font-size: 12px; color: var(--muted); }

/* ---------------------------------------------------------------- sources */
.source-list { background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; }
.source-row { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3);
  border-bottom: 1px solid var(--border-2); }
.source-row:last-child { border-bottom: 0; }
.source-row.needs-you { background: var(--needs-fill); }
.source-icon { width: 38px; height: 38px; flex-shrink: 0; border-radius: 9px;
  background: var(--accent-soft); display: flex; align-items: center; justify-content: center; }
.needs-you .source-icon { background: var(--needs-icon); }
.source-text { flex-grow: 1; min-width: 0; }
.source-name { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.source-meta { font-size: 13px; color: var(--muted); padding-top: var(--s-half); overflow-wrap: anywhere; }
.source-meta.problem { color: var(--danger); }
.status-pill { flex-shrink: 0; display: flex; align-items: center; gap: var(--s1); font-size: 12.5px;
  padding: var(--s1) var(--s-line); border-radius: 20px; background: var(--accent-soft); color: var(--accent-ink); }
.status-pill.partial { background: var(--amber-soft); color: var(--amber); }
.status-pill.failed { background: var(--danger-soft); color: var(--danger); }
.status-pill.pending { background: var(--sunken); color: var(--muted); }
a.source-name { display: block; color: var(--ink); text-decoration: none; }
a.source-name:hover { text-decoration: underline; }
.source-meta .btn-link { font-size: 13px; text-align: left; }
.source-meta.kept { font-size: 12.5px; }
.source-row.compact { padding: var(--s-line) var(--s3); }
.source-row.compact .source-icon, .source-row.compact .monogram { width: 30px; height: 30px; }
.history-host:empty { display: none; }
.history-panel { margin-top: var(--s-line); padding: var(--s2) var(--s2); border: 1px solid var(--border-2);
  border-radius: 10px; background: var(--surface-2); }
.export-steps { margin: 0 0 var(--s-line); padding-left: var(--s3); display: grid; gap: var(--s1); font-size: 13.5px;
  color: var(--ink-2); }
.export-steps .step-title { font-weight: 500; color: var(--ink); }
.dropzone.small { display: block; padding: var(--s2); font-size: 13px; }
.history-drop { margin-top: var(--s-half); }
.history-choice { margin: var(--s-line) 0; font-size: 13.5px; color: var(--ink-2); }
.history-choice p { margin: 0 0 var(--s1); }
.history-choice input[type=date], .extend-form input[type=date] { font-size: 13.5px; }
.extend-form .key-row input[type=date] { flex: 0 1 220px; font-family: inherit; }
.detail-card { margin-top: var(--s2); display: flex; flex-direction: column; gap: var(--s1); }
/* Single-field forms: about 560px of content, never the page's whole width
   (brief 18 Part 4 item 10). Only the forms -- a card keeps its column's
   width (Jon, 2026-10-10). */
#upload-panel:not(.upload-results), #custom-reconnect-form, .key-row, .reminder-form, .extend-form,
.rename-form, .pin-row, .build-add, .dock-form { max-width: 560px; }
/* One source's page (Jon, 2026-10-10): its card across the top, then two
   columns -- what to do and what it holds, and how it runs -- one under 900px. */
.source-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: var(--s3); align-items: start; }
.source-main, .source-side { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.source-cols .detail-card { margin-top: 0; }
.source-cols .detail-card > button { align-self: flex-start; }      /* Delete keeps its own width */
@media (max-width: 899px) { .source-cols { grid-template-columns: minmax(0, 1fr); } }
/* On a list, a row opens its source's page, and its status is a link. */
.source-row.is-link { cursor: pointer; }
.source-row.is-link:not(.needs-you):hover { background: var(--surface-2); }
a.pill-link { text-decoration: none; }
a.pill-link:hover, a.pill-link:focus-visible { text-decoration: underline; }
.detail-card p { margin: 0; }
.subsection { margin: var(--s-line) 0 0; font-size: 14px; font-weight: 500; }
.reminder-form .choice input[type=number] { width: 64px; margin: 0 var(--s-half); }
#staff-code-form input[type=number] {
  width: 140px; min-height: 44px; padding: 0 var(--s2); border: 1px solid var(--field);
  border-radius: 8px; font-family: var(--sans); font-size: 14px; color: var(--ink);
  background: var(--surface-2); }
.extend-form { display: flex; flex-direction: column; gap: var(--s-half); margin-top: var(--s1); }

.add-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); }
@media (max-width: 1100px) { .add-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.add-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: var(--s2) var(--s3); display: flex; flex-direction: column; gap: var(--s1); }
.add-card.is-disabled { opacity: 0.6; }
.add-card-title { font-size: 15px; font-weight: 500; }
.add-card p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--ink-3); flex-grow: 1; }
/* "Connect your own"'s address: its label, then the address on a line of
   its own, so it is two lines at any card width; that height is held while
   the card waits for it, and the card never moves when it lands. */
.add-card .own-address { flex-grow: 0; min-height: 3.1em; }
.add-card .own-ip { display: block; }
.coming { font-size: 12px; color: var(--muted); }

.dropzone { border: 1px dashed var(--dropzone-border); border-radius: 10px; padding: var(--s3); text-align: center;
  font-size: 13.5px; color: var(--ink-2); background: var(--surface-2); cursor: pointer; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.progress { height: 6px; border-radius: 6px; background: var(--sunken); overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: var(--accent);
  transition: width 0.15s; }
.mapping { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.mapping th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted);
  padding: var(--s1) var(--s1); border-bottom: 1px solid var(--border); }
.mapping td { padding: var(--s1) var(--s1); border-bottom: 1px solid var(--border-2);
  overflow-wrap: anywhere; }
.mapping td.num { text-align: right; }
.cli { margin: 0; font-family: var(--mono); font-size: 12.5px; line-height: 1.55;
  background: var(--surface-2); border: 1px solid var(--inset); border-radius: 10px;
  padding: var(--s2) var(--s2); overflow-x: auto; white-space: pre; color: var(--ink-2); }
.upload-summary { font-size: 13.5px; color: var(--ink-3); line-height: 1.6; }
.scroll-x { overflow-x: auto; max-width: 100%; }

/* ---------------------------------------------------------------- ask */
.ask-pane { display: flex; flex-direction: column; gap: var(--s2); flex-grow: 1; min-width: 0; }
.thread { display: flex; flex-direction: column; gap: var(--s3); flex-grow: 1; }
.turn { display: flex; flex-direction: column; gap: var(--s2); }
.ask-title { margin: 0 0 var(--s1); font-family: var(--serif); font-size: 26px; font-weight: 500; }
#ask-send { white-space: nowrap; flex-shrink: 0; }
.ask-hint { margin: 0; font-size: 13.5px; color: var(--ink-3); }
.asked-label { font-size: 11px; letter-spacing: 0.7px; text-transform: uppercase;
  color: var(--muted); padding-bottom: var(--s1); }
.asked { font-family: var(--serif); font-size: 25px; font-weight: 500; letter-spacing: -0.2px;
  overflow-wrap: anywhere; }
.answer-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: var(--s3) var(--s4); display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.status-line { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: var(--s1); }
.status-line::before { content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); animation: pulse 1.2s infinite ease-in-out; }
@keyframes pulse { 50% { opacity: 0.25; } }
.answer { font-size: 15px; line-height: 1.65; color: var(--ink-2); overflow-wrap: anywhere;
  min-width: 0; }
.answer p { margin: 0 0 var(--s-line); }
.answer p:last-child { margin-bottom: 0; }
.answer ul, .answer ol { margin: 0 0 var(--s-line); padding-left: var(--s3); }
.answer h3, .answer h4 { font-size: 15px; margin: var(--s-line) 0 var(--s1); }
.answer code { font-family: var(--mono); font-size: 13px; background: var(--sunken);
  padding: 0 var(--s-half); border-radius: 4px; }
.answer table { border-collapse: collapse; font-size: 13.5px; margin: var(--s-half) 0 var(--s-line); }
.answer th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px;
  border-bottom: 1px solid var(--border); padding: var(--s1) var(--s-line) var(--s1) 0; }
.answer td { border-bottom: 1px solid var(--border-2); padding: var(--s1) var(--s-line) var(--s1) 0;
  font-family: var(--mono); font-size: 13px; }
.answer .table-wrap { overflow-x: auto; max-width: 100%; }
.provenance { border-top: 1px solid var(--border-2); padding-top: var(--s2); display: flex;
  flex-direction: column; gap: var(--s-line); }
.provenance-line { display: flex; align-items: center; gap: var(--s1); font-size: 12.5px;
  color: var(--muted); flex-wrap: wrap; }
.source-chip { background: var(--chip); padding: var(--s-half) var(--s1); border-radius: 6px; color: var(--ink-2);
  overflow-wrap: anywhere; }
.rules-list { margin: 0; padding-left: var(--s3); font-size: 13px; line-height: 1.55;
  color: var(--ink-3); }
.chips { display: flex; gap: var(--s1); flex-wrap: wrap; }
.chip-link { text-decoration: none; }
.chip-pill { margin-bottom: var(--s-line); }
.composer-wrap .chips { margin-bottom: var(--s-line); }
.chip-pill[aria-expanded="true"] { border-color: var(--accent); }
.chip { font-size: 13px; color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--border); border-radius: 20px; padding: var(--s1) var(--s2); cursor: pointer;
  text-align: left; }
.chip:hover { border-color: var(--soft-border); }
.composer-wrap { position: sticky; bottom: 0; padding: var(--s-line) 0 0;
  background: linear-gradient(to bottom, var(--scrim), var(--ground) 30%); }
/* The one place to type (Jon, 2026-10-10): a visible border, a 2px accent
   ring on focus, raised a touch on dark. */
.composer { background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: var(--s-line) var(--s2); display: flex; align-items: center; gap: var(--s2);
  box-shadow: var(--raised); }
.composer input { flex-grow: 1; min-width: 0; border: 0; outline: none; font-size: 15px;
  background: transparent; min-height: 44px; padding: 0; }
.composer input:focus-visible { outline: none; }
.composer:focus-within { border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), var(--raised); }
.ask-convo-title { min-height: 32px; }
.ask-convo-name { background: none; border: 0; padding: 0; cursor: text; font-family: var(--serif);
  font-size: 21px; font-weight: 500; color: var(--ink); text-align: left; }
.ask-convo-name:hover { text-decoration: underline dotted; text-underline-offset: 4px; }
.ask-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-line); }
.ask-toolbar #new-question { margin-left: auto; }
.ask-layout { display: flex; flex-direction: column; gap: var(--s2); flex-grow: 1; min-width: 0; }
.ask-cols { display: flex; gap: var(--s3); flex-grow: 1; min-width: 0; align-items: flex-start; }
.ask-cols .ask-pane { align-self: stretch; }
/* The list of what you asked (Jon, 2026-10-11: the list as it was, with its
   day headings, search, and each row's Pin, Rename and Delete). */
.convos { width: 256px; flex-shrink: 0; position: sticky; top: var(--s4);
  max-height: calc(100vh - var(--s8)); overflow-y: auto; display: flex; flex-direction: column;
  gap: var(--s-line); }
.convo-toggle { display: inline-flex; align-items: center; gap: var(--s1); min-height: 44px;
  padding: 0 var(--s-line) 0 var(--s1); border: 0; border-radius: 8px; background: none; color: var(--ink-2);
  font-size: 13.5px; font-weight: 500; cursor: pointer; }
.convo-toggle:hover { background: var(--sunken); }
.convo-toggle svg { transition: transform 0.15s ease; }
.convo-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.convo-search { min-height: 40px; font-size: 13.5px; padding: var(--s1) var(--s-line); width: 100%;
  border: 1px solid var(--field); border-radius: 10px; background: var(--surface); color: var(--ink); }
.convo-groups { display: flex; flex-direction: column; gap: var(--s2); }
.convo-group-label { margin: 0 0 var(--s-half); padding: 0 var(--s1); font-size: 12px; font-weight: 600;
  color: var(--muted); }
.convo-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.convo { position: relative; display: flex; align-items: center; gap: var(--s-half); border-radius: 8px;
  padding: 0 var(--s-half); min-width: 0; }
.convo:hover, .convo:focus-within { background: var(--sunken); }
.convo.is-current { background: var(--accent-soft); }
.convo-open { flex-grow: 1; min-width: 0; text-align: left; background: none; border: 0; cursor: pointer;
  color: var(--ink); padding: var(--s1) var(--s-half); display: flex; flex-direction: column; gap: 0; }
.convo-title { font-size: 13.5px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.convo-when { font-size: 11.5px; color: var(--muted); }
/* A report row's schedule mark, after its title (as the Ask list's kinds). */
.report-row .board-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1); }
.report-mark { font-family: var(--sans); font-size: 12.5px; font-weight: 400; }
.report-mark[data-schedule="paused"] { color: var(--muted); }
.report-filters:empty { display: none; }
.convo-menu-btn { flex-shrink: 0; width: 32px; height: 32px; border: 0; border-radius: 8px;
  background: none; color: var(--muted); cursor: pointer; opacity: 0; font-size: 16px; line-height: 1;
  padding: 0; }
.convo-menu-btn::before { content: "\22EF"; }
.convo:hover .convo-menu-btn, .convo:focus-within .convo-menu-btn,
.convo-menu-btn[aria-expanded="true"] { opacity: 1; }
.convo-menu-btn:hover { background: var(--surface); color: var(--ink); }
.convo-menu { position: absolute; right: 0; top: 100%; z-index: 5; min-width: 140px;
  display: flex; flex-direction: column; padding: var(--s-half); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--menu-shadow); }
.convo-menu-item { text-align: left; background: none; border: 0; border-radius: 6px;
  padding: var(--s1) var(--s-line); font-size: 13px; color: var(--ink); cursor: pointer; }
.convo-menu-item:hover, .convo-menu-item:focus-visible { background: var(--sunken); }
.convo-rename { min-height: 36px; font-size: 13.5px; background: var(--surface); width: 100%; }
.convo-empty { margin: 0; font-size: 13px; color: var(--muted); padding: var(--s1); }
/* A deleted conversation's undo (undoToast). */
.toast { position: fixed; left: 50%; bottom: var(--s3); transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: var(--s2); padding: var(--s-line) var(--s2);
  background: var(--ink); color: var(--ground); border-radius: 10px; font-size: 13.5px;
  box-shadow: var(--toast-shadow); }
.toast .btn-link { color: var(--ground); font-weight: 600; text-decoration: underline; }

/* ---------------------------------------------------------------- people */
.people { width: 100%; border-collapse: collapse; font-size: 14px; }
.people th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted);
  padding: var(--s1) var(--s-line) var(--s1) 0; border-bottom: 1px solid var(--border); }
.people td { padding: var(--s-line) var(--s-line) var(--s-line) 0; border-bottom: 1px solid var(--border-2);
  vertical-align: middle; overflow-wrap: anywhere; }
.people select { width: auto; min-height: 36px; }
.invite-form { display: flex; gap: var(--s-line); flex-wrap: wrap; align-items: flex-end; }
.invite-form .field { flex: 1 1 220px; }
.invite-form select { width: auto; }
.dev-link { font-family: var(--mono); font-size: 12px; background: var(--surface-2);
  border: 1px solid var(--inset); border-radius: 8px; padding: var(--s-line) var(--s-line); overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- auth */
.auth-body { min-height: 100vh; }
.auth { max-width: 452px; margin: 0 auto; padding: var(--s6) var(--s2); display: flex;
  flex-direction: column; align-items: center; gap: var(--s4); }
.auth-brand { align-self: center; }
.auth-card { width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: var(--s4); }
.auth-card h1 { margin: 0; font-family: var(--serif); font-size: 29px; line-height: 1.18;
  font-weight: 600; letter-spacing: -0.6px; }
.auth-card .lede { margin: var(--s-line) 0 var(--s3); font-size: 15px; line-height: 1.6; color: var(--lede-ink); }
.auth-card .lede:empty { display: none; }
/* Every form on the card spaces its rows like the app's: 16 between a field
   and the next, or its button (Jon, 2026-10-10: /2fa's Confirm sat flush). */
#auth-form, #tfa-code-form { display: flex; flex-direction: column; gap: var(--s2); }
.field label, label.field-label { display: block; font-size: 13.5px; font-weight: 500;
  padding-bottom: var(--s1); }
.auth-card input[type=text], .auth-card input[type=email], .auth-card input[type=password] {
  min-height: 46px; border-radius: 9px; font-size: 15px; background: var(--surface); }
.auth-card input[readonly] { background: var(--surface-2); color: var(--muted); }
.optional { font-weight: 400; color: var(--muted); }
.hint { margin: var(--s1) 0 0; font-size: 12.5px; color: var(--muted); }
.form-error { margin: 0; color: var(--danger); font-size: 13.5px; }
/* Continue with Google / Microsoft, above the email form (app/signin.py). */
.signin-providers { display: flex; flex-direction: column; gap: var(--s-line); margin: 0 0 var(--s1); }
.signin-or { display: flex; align-items: center; gap: var(--s-line); margin: var(--s1) 0 var(--s2); color: var(--ink-3);
  font-size: 13px; }
.signin-or::before, .signin-or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
#signin-error { margin: 0 0 var(--s2); }
.form-note { margin: 0; color: var(--accent-ink); font-size: 13.5px; overflow-wrap: anywhere; }
.auth-links { margin: var(--s2) 0 0; font-size: 13.5px; text-align: center; color: var(--muted); }
.fine { margin: var(--s2) 0 0; font-size: 12.5px; line-height: 1.55; color: var(--muted); }

/* ---------------------------------------------------------------- the second
   factor (brief 18): the /2fa page, backup codes, the step-up dialog */
.tfa section { display: grid; gap: var(--s2); }
.tfa-or { margin: 0; text-align: center; font-size: 13.5px; color: var(--muted); }
.tfa-step { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.tfa-app { display: grid; gap: var(--s2); }
.tfa-qr { display: block; width: 190px; height: 190px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--qr-ground); }
.tfa-secret { overflow-wrap: anywhere; color: var(--ink); }
.auth-card input[inputmode=numeric], .auth-card input[autocomplete=one-time-code] {
  min-height: 46px; border-radius: 9px; font-size: 17px; letter-spacing: 0.08em;
  font-family: var(--mono); background: var(--surface); }
.tfa-remember { display: flex; gap: var(--s1); align-items: center; margin: var(--s2) 0 0;
  font-size: 13.5px; color: var(--ink-2); }
.backup-codes { margin: 0; padding: var(--s2) var(--s2) var(--s2) var(--s4); display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s1) var(--s2); font-size: 14.5px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; }
.tfa-code-actions { margin: 0; display: flex; gap: var(--s1); align-items: center; flex-wrap: wrap; }
dialog.stepup { width: min(420px, calc(100vw - 32px)); padding: var(--s3); border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); color: var(--ink); }
dialog.stepup::backdrop { background: var(--backdrop); }
dialog.stepup h2 { margin: 0 0 var(--s1); font-family: var(--serif); font-size: 22px; }
.stepup-form { display: grid; gap: var(--s2); margin-top: var(--s2); }
.stepup-form input { min-height: 42px; border-radius: 9px; font-size: 16px; }
.stepup-actions { display: flex; gap: var(--s1); flex-wrap: wrap; }
.person-actions { white-space: nowrap; }
.person-actions .btn-link { margin-right: var(--s-line); }
.settings-actions { display: flex; gap: var(--s1); flex-wrap: wrap; margin: var(--s-line) 0 0; }
@media (max-width: 420px) {
  .backup-codes { grid-template-columns: 1fr; }
  .person-actions { white-space: normal; }
}

/* ---------------------------------------------------------------- rules
   (screens/Rules.html) */
.filter-row { display: flex; gap: var(--s-line); align-items: center; flex-wrap: wrap; }
.cell-actions { display: inline-flex; gap: var(--s1); align-items: center; flex-wrap: wrap; }
.filter-sep { width: 1px; height: 22px; background: var(--border); margin: 0 var(--s-half); }
.rule-list { display: flex; flex-direction: column; gap: var(--s-line); }
.rule { background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: var(--s2) var(--s3); display: flex; gap: var(--s2); align-items: flex-start; min-width: 0; }
.rule.direct { border-color: var(--soft-border); border-left: 3px solid var(--accent);
  background: var(--row-tint); padding-left: var(--s3); }
.rule.is-retired { background: var(--surface-2); }
.rule.is-retired .rule-text { color: var(--ink-3); }
.rule-num { flex-shrink: 0; font-family: var(--mono); font-size: 12px; color: var(--muted);
  width: 26px; padding-top: var(--s-half); }
.rule-body { flex-grow: 1; min-width: 0; }
.rule-text { font-size: 15px; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.rule-meta { display: flex; align-items: center; gap: var(--s1); flex-wrap: wrap; font-size: 12.5px;
  color: var(--muted); margin-top: var(--s1); overflow-wrap: anywhere; }
.rule-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.4px; padding: var(--s-half) var(--s1);
  border-radius: 5px; background: var(--sunken); color: var(--ink-2); overflow-wrap: anywhere; }
.rule-tag.tag-all { background: var(--accent-soft); color: var(--accent-ink); }
.retired-line { color: var(--danger); }
.rule-actions { flex-shrink: 0; display: flex; gap: var(--s1); }
.rule-act { font-size: 12.5px; color: var(--muted); background: var(--surface); padding: var(--s-half) var(--s1);
  min-height: 32px; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; }
.rule-act:hover { color: var(--ink); border-color: var(--field); }
.rule-history { margin-top: var(--s1); font-size: 12.5px; color: var(--muted); }
.rule-history summary { cursor: pointer; width: fit-content; }
.rule-history ol { margin: var(--s1) 0 0; padding-left: var(--s3); display: flex; flex-direction: column;
  gap: var(--s1); }
.rule-old { color: var(--ink-3); font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere;
  white-space: pre-wrap; }
.rule-form { display: flex; flex-direction: column; gap: var(--s-line); width: 100%; }
.rule-form textarea { width: 100%; min-height: 76px; padding: var(--s-line) var(--s2); border: 1px solid var(--field);
  border-radius: 8px; font-family: var(--sans); font-size: 14px; color: var(--ink);
  background: var(--surface); resize: vertical; }
.rule-form-row { display: flex; gap: var(--s-line); align-items: flex-end; flex-wrap: wrap; }
.rule-form-row label { display: flex; flex-direction: column; gap: var(--s1); padding: 0; }
.rule-form-row select { width: auto; min-width: 160px; }
.rules-foot { padding: var(--s2) var(--s3); background: var(--surface-2); border: 1px solid var(--inset);
  border-radius: 12px; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.rules-foot p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--ink-3); }
.rules-foot .card-meta { flex-shrink: 0; white-space: nowrap; }

/* ---------------------------------------------------------------- catalog
   (screens/Catalog.html) */
.crumbs { font-size: 12.5px; color: var(--muted); padding-bottom: var(--s1); }
.crumbs a { text-decoration: underline; text-underline-offset: 2px; }
/* The first stop on every app page (WCAG 2.4.1): off screen until focused. */
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 50; padding: var(--s1) var(--s2);
  border-radius: 8px; background: var(--surface); color: var(--accent-ink);
  border: 1px solid var(--field); font-size: 14px; text-decoration: none; }
.skip-link:focus { top: 12px; }
.pane:focus { outline: none; }
.crumbs .sep { padding: 0 var(--s-half); }
.catalog-tools { display: flex; gap: var(--s-line); align-items: center; flex-wrap: wrap; }
.search { flex: 1 1 260px; display: flex; align-items: center; gap: var(--s-line); background: var(--surface);
  border: 1px solid var(--field); border-radius: 10px; padding: 0 var(--s2); min-height: 44px; }
.search input { border: 0; background: transparent; padding: 0; min-height: 42px; }
.search input:focus-visible { outline: none; }
.search:focus-within { border-color: var(--accent); }
.filter-chip { font-size: 13px; padding: var(--s-line) var(--s2); min-height: 40px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--border); color: var(--ink-2); cursor: pointer; }
.filter-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--ground); }
/* The section chips: sticky under the search (app.js sets top below the
   rail when the rail is a top bar), one row that scrolls sideways. */
.cat-chips { position: sticky; top: 0; z-index: 4; display: flex; gap: var(--s1); overflow-x: auto;
  scrollbar-width: thin; padding: var(--s1) 0; margin: calc(-1 * var(--s1)) 0; background: var(--ground); }
.cat-chips[hidden] { display: none; }
.cat-chip { flex-shrink: 0; white-space: nowrap; font-size: 12.5px; padding: var(--s1) var(--s-line); min-height: 36px;
  border-radius: 18px; background: var(--surface); border: 1px solid var(--border); color: var(--ink-2);
  cursor: pointer; }
.cat-chip[aria-current="true"] { background: var(--accent-soft); border-color: var(--soft-border);
  color: var(--accent-ink); font-weight: 500; }
.cat-section { display: flex; flex-direction: column; gap: var(--s-line); scroll-margin-top: var(--jump-offset, var(--s8)); }
.cat-head { display: flex; align-items: baseline; gap: var(--s-line); flex-wrap: wrap; padding-top: var(--s1); }
.cat-head h2 { margin: 0; font-size: 15px; font-weight: 500; }
.cat-head small { font-size: 12px; color: var(--muted); }
.tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-line); }
.tool-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: var(--s2) var(--s2); display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.tool-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s1); }
.monogram { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center;
  justify-content: center; font-family: var(--mono); font-size: 15px; font-weight: 500;
  background: var(--sunken); color: var(--ink-2); flex-shrink: 0; }
.monogram.is-live { background: var(--accent-soft); color: var(--accent-ink); }
.monogram.big { width: 48px; height: 48px; border-radius: 12px; font-size: 20px; }
.method { font-family: var(--mono); font-size: 10px; letter-spacing: 0.4px; padding: var(--s-half) var(--s1);
  border-radius: 5px; }
.method-oauth { background: var(--accent-soft); color: var(--accent-ink); }
.method-key { background: var(--sunken); color: var(--ink-2); }
.method-file { background: var(--amber-soft); color: var(--amber); }
.method-api, .method-database { background: var(--sunken); color: var(--ink-2); }
.tool-name { font-size: 14.5px; font-weight: 500; overflow-wrap: anywhere; }
.tool-holds { font-size: 12.5px; color: var(--muted); line-height: 1.5; flex-grow: 1;
  overflow-wrap: anywhere; }
.tool-action { min-height: 36px; border-radius: 8px; font-size: 13px; font-weight: 500;
  display: flex; align-items: center; justify-content: center; text-decoration: none; gap: var(--s1);
  cursor: pointer; padding: 0 var(--s-line); }
.tool-action.connect { background: var(--accent); color: var(--on-accent); border: 0; }
.tool-action.request { border: 1px solid var(--field); background: var(--surface); color: var(--ink-2);
  font-weight: 400; }
.tool-action.request[aria-pressed="true"] { border-color: var(--soft-border); background: var(--soft-fill);
  color: var(--accent-ink); }
.tool-action .asked { color: var(--muted); font-size: 12px; font-family: var(--sans); }
/* Request beside "Upload a file" (B-file 2): two equal halves, always side
   by side; in a narrow card each label wraps inside its half. */
.tool-split { display: flex; gap: var(--s1); }
.tool-split > .tool-action { flex: 1 1 0; min-width: 0; text-align: center; flex-wrap: wrap;
  column-gap: var(--s-half); row-gap: 0; padding: var(--s-half) var(--s1); line-height: 1.3; min-height: 40px; }
/* Outlined like Request, but its label is the brand green: the active half. */
.tool-action.upload-file { border: 1px solid var(--field); background: var(--surface);
  color: var(--accent); }
.tool-action.upload-file[disabled] { color: var(--muted); cursor: not-allowed; }
.tool-alt { align-self: center; font-size: 12.5px; padding: var(--s-half) 0; }
/* Deleting a source: the one destructive action on its page. */
.btn.danger { color: var(--danger); border-color: currentColor; }
.btn-primary.danger { background: var(--danger); color: var(--ground); border-color: transparent; }
.danger-zone { margin-top: var(--s-line); background: var(--danger-soft); color: var(--ink); }
.tool-note { font-size: 12px; color: var(--muted); }
.tool-note a { font-weight: 500; }
.dont-see { padding: var(--s2) var(--s3); background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; }
.dont-see-title { font-size: 14.5px; font-weight: 500; }
.dont-see p { margin: var(--s-half) 0 var(--s2); font-size: 13px; color: var(--muted); }
.dont-see p.form-note { margin: var(--s-line) 0 0; }
.dont-see p.form-note:empty { display: none; }
/* Three doors on one row, every control the same height; they stack when
   the row runs out of width. */
.dont-see-row { display: flex; align-items: stretch; gap: var(--s-line); flex-wrap: wrap; }
.dont-see-row form { display: flex; gap: var(--s-line); flex: 1 1 340px; min-width: 0; margin: 0; }
.dont-see-row form input { flex: 1 1 auto; min-width: 0; }
.dont-see-row .btn, .dont-see-row input, .door-link { height: 44px; min-height: 44px;
  box-sizing: border-box; }
.dont-see-row .btn { flex-shrink: 0; }
.door-link { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 var(--s2); border-radius: 8px; border: 1px solid var(--soft-border);
  background: var(--soft-fill); color: var(--accent-ink); font-size: 13.5px; font-weight: 500;
  text-decoration: none; white-space: nowrap; }
.door-talk { border-color: var(--field); background: transparent; color: var(--ink-2);
  font-weight: 400; }
.door-talk .door-lead { color: var(--muted); }
@media (max-width: 760px) {
  .dont-see-row form, .door-link { flex: 1 1 100%; }
}

/* ---------------------------------------------------------------- connect
   (screens/Connect.html) */
.connect-head { display: flex; align-items: center; gap: var(--s2); }
.connect-head h1 { margin: 0; font-family: var(--serif); font-size: 28px; font-weight: 600;
  letter-spacing: -0.4px; }
.connect-head p { margin: var(--s-half) 0 0; font-size: 13.5px; color: var(--muted); }
.connect-cols { display: flex; gap: var(--s3); align-items: flex-start; }
.connect-main { flex-grow: 1; min-width: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: var(--s3) var(--s3); display: flex; flex-direction: column; gap: var(--s2); }
.connect-side { width: 320px; flex-shrink: 0; display: flex; flex-direction: column; gap: var(--s2); }
.step { display: flex; gap: var(--s2); align-items: flex-start; }
.step > div:not(.step-n) { flex-grow: 1; min-width: 0; }
.step-n { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent-ink); display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 12px; margin-top: 0; }
.step-title { font-size: 15px; font-weight: 500; }
.step-text { margin: var(--s-half) 0 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.6; }
.step-text p { margin: 0; }
.step-text code { font-family: var(--mono); font-size: 12.5px; }
.step-text strong { font-weight: 500; color: var(--ink); }
.perms { background: var(--surface-2); border: 1px solid var(--inset); border-radius: 10px;
  padding: var(--s1) var(--s2); margin-top: var(--s-line); }
.perm { display: flex; align-items: center; gap: var(--s-line); font-size: 13.5px; padding: var(--s1) 0;
  border-bottom: 1px solid var(--border-2); flex-wrap: wrap; }
.perm:last-child { border-bottom: 0; }
.perm-name { font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); width: 170px; flex-shrink: 0; }
.perm-access { color: var(--accent-ink); }
.perm-why { color: var(--muted); font-size: 12.5px; }
.key-row { display: flex; gap: var(--s-line); margin-top: var(--s-line); flex-wrap: wrap; }
.key-row input { flex: 1 1 240px; font-family: var(--mono); font-size: 13.5px; background: var(--surface); }
.key-fields { flex: 1 1 240px; display: grid; gap: var(--s1); }
.key-fields input { width: 100%; font-family: var(--mono); font-size: 13.5px; background: var(--surface); margin-top: var(--s-half); }
.check { border-radius: 12px; padding: var(--s2) var(--s2); display: flex; flex-direction: column; gap: var(--s-line); }
.check.ok { background: var(--accent-soft); border: 1px solid var(--soft-border); }
.check.refused { background: var(--amber-soft); border: 1px solid var(--amber-border); }
.check.unverified { background: var(--amber-soft); border: 1px solid var(--amber-border); }
.check-title { display: flex; align-items: center; gap: var(--s1); font-size: 14px; font-weight: 500; }
.check.ok .check-title { color: var(--accent-ink); }
.check.refused .check-title, .check.unverified .check-title { color: var(--amber); }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s1) var(--s3);
  font-size: 13px; color: var(--ink-2); }
.check-grid .muted { color: var(--muted); }
.check-grid .bad { color: var(--danger); font-weight: 500; }
.check-actions { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.check-actions span { font-size: 12.5px; color: var(--muted); }
.side-card { background: var(--surface-2); border: 1px solid var(--inset); border-radius: 14px;
  padding: var(--s2) var(--s3); }
.side-card.white { background: var(--surface); border-color: var(--border); }
.side-title { display: flex; align-items: center; gap: var(--s1); font-size: 14px; font-weight: 500;
  margin-bottom: var(--s1); }
.side-card p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--ink-3); }
.bullets { display: flex; flex-direction: column; gap: var(--s1); font-size: 13.5px; color: var(--ink-3);
  line-height: 1.5; margin: 0; padding: 0; list-style: none; }
.bullets li { display: flex; gap: var(--s-line); }
.bullets li::before { content: ""; flex-shrink: 0; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); margin-top: var(--s1); }
.notice { font-size: 13.5px; line-height: 1.6; color: var(--amber); background: var(--amber-soft);
  border-radius: 10px; padding: var(--s-line) var(--s2); margin: 0; }

/* ---------------------------------------------------------------- requests */
.requests { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.requests th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted);
  padding: var(--s1) var(--s-line) var(--s1) 0; border-bottom: 1px solid var(--border); }
.requests td { padding: var(--s1) var(--s-line) var(--s1) 0; border-bottom: 1px solid var(--border-2);
  overflow-wrap: anywhere; vertical-align: top; }

/* ---------------------------------------------------------------- narrow */
@media (hover: none) { .convo-menu-btn { opacity: 1; } }

@media (max-width: 1100px) {
  .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .connect-cols { flex-direction: column; }
  .connect-side { width: 100%; }
}

@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .ask-cols { flex-direction: column; gap: var(--s-line); }
  .convos { width: 100%; position: static; max-height: 45vh; padding: var(--s-line); background: var(--surface);
    border: 1px solid var(--border); border-radius: 12px; }
  .convo-menu-btn { opacity: 1; }
  .rule { flex-wrap: wrap; gap: var(--s-line) var(--s2); padding: var(--s2) var(--s2); }
  .rule.direct { padding-left: var(--s2); }
  .rule-body { flex-basis: calc(100% - 44px); }
  .rule-actions { margin-left: var(--s6); }
  .rules-foot { flex-direction: column; align-items: flex-start; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .connect-main { padding: var(--s2) var(--s2); }
  .check-grid { grid-template-columns: minmax(0, 1fr); }
  .perm-name { width: auto; }
  .requests thead { display: none; }
  .requests tr { display: flex; flex-wrap: wrap; gap: var(--s-half) var(--s-line); padding: var(--s-line) 0;
    border-bottom: 1px solid var(--border-2); }
  .requests td { border: 0; padding: 0; }
  .rail { width: auto; height: auto; position: sticky; top: 0; z-index: 5; flex-direction: row;
    flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s-line); padding: var(--s-line) var(--s2);
    border-right: 0; border-bottom: 1px solid var(--border); background: var(--ground); }
  .rail .brand { padding: 0; margin-right: auto; }
  .rail .mark { width: 34px; height: 23px; }
  .rail .wordmark { font-size: 18px; }
  .rail-nav { order: 3; flex-direction: row; flex-wrap: wrap; gap: var(--s-half); width: 100%; }
  .rail-item { min-height: 40px; padding: 0 var(--s-line); gap: var(--s1); font-size: 13.5px; }
  .rail-item .rail-label { flex-grow: 0; }
  .rail-spacer { display: none; }
  .rail-foot { order: 2; border-top: 0; padding: 0; text-align: right; display: flex;
    align-items: center; gap: var(--s-half); }
  .rail-business, .rail-user, .rail-who { display: none; }
  .rail-gear { margin: 0; }
  .gear-menu { bottom: auto; top: calc(100% + 8px); right: 0; }
  .pane { padding: var(--s3) var(--s2); }
  .page-head { flex-direction: column; gap: var(--s-line); }
  .add-grid { grid-template-columns: minmax(0, 1fr); }
  .card, .answer-card { padding: var(--s2) var(--s2); }
  .source-row { flex-wrap: wrap; padding: var(--s2) var(--s2); }
  .small-card { flex-wrap: wrap; padding: var(--s2) var(--s2); }
  .small-meta { width: 100%; padding-left: var(--s4); }
  .asked { font-size: 21px; }
  .auth-card { padding: var(--s3) var(--s2); }
  .people thead { display: none; }
  .people tr { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s-line); padding: var(--s-line) 0;
    border-bottom: 1px solid var(--border-2); }
  .people td { border: 0; padding: 0; }
}

@media (max-width: 420px) {
  .tool-grid { grid-template-columns: minmax(0, 1fr); }
}

/* empty status and result holders take no room */
.upload-summary:empty, #upload-panel .small-list:empty { display: none; }

/* After signing in: pick the property or site a source reads. */
.choices { display: grid; gap: var(--s1); margin: var(--s-line) 0; }
.choice { display: flex; gap: var(--s-line); align-items: center; padding: var(--s-line) var(--s-line);
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; overflow-wrap: anywhere; }
.finding-details { margin: var(--s1) 0 0; }

/* ---------------------------------------------------------------- settings */
.settings-layout { display: flex; gap: var(--s4); align-items: flex-start; }
.settings-nav { display: flex; flex-direction: column; gap: var(--s-half); width: 180px; flex-shrink: 0; }
.settings-tab { display: flex; align-items: center; min-height: 40px; padding: 0 var(--s-line);
  border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.settings-tab:hover { background: var(--sunken); }
.settings-tab[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink);
  font-weight: 500; }
.settings-body { flex-grow: 1; min-width: 0; }
.section-head { margin: var(--s4) 0 var(--s3); }
.section-head:first-child { margin-top: 0; }
.section-title { margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 500;
  color: var(--ink); }
.settings-card { max-width: 560px; }
.settings-facts { display: grid; grid-template-columns: 120px 1fr; gap: var(--s-line) var(--s2); margin: 0; }
.settings-facts dt { color: var(--muted); font-size: 13.5px; }
.settings-facts dd { margin: 0; color: var(--ink); font-size: 14px; }
.settings-slot { max-width: 560px; border: 1px dashed var(--field); background: var(--surface-2); }
.settings-slot .slot-label { font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--amber); }
.settings-slot p { margin: var(--s1) 0 0; color: var(--ink-3); font-size: 13.5px; line-height: 1.55; }
.settings-form { display: grid; gap: var(--s2); }
.settings-form .field label { display: block; font-size: 13px; color: var(--ink-3);
  margin-bottom: var(--s1); }
.choice-title { font-weight: 500; color: var(--ink); }

/* ---------------------------------------------------------------- export */
.export-row { display: flex; align-items: center; gap: var(--s-line); margin: 0; }
.export-row .btn-link { font-size: 13px; }

@media (max-width: 759px) {
  .settings-layout { flex-direction: column; gap: var(--s2); }
  .settings-nav { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .settings-tab { min-height: 36px; }
  .settings-facts { grid-template-columns: 1fr; gap: var(--s-half); }
  .settings-facts dd { margin-bottom: var(--s1); }
}

/* ---------------------------------------------------------------- charts
   (app/static/charts.js; screens/Dashboard.html). Marks are colored by the
   --chart-* tokens; every label is HTML text. */
.chart-mark[data-series="1"] { --series: var(--chart-1); }
.chart-mark[data-series="2"] { --series: var(--chart-2); }
.chart-mark[data-series="3"] { --series: var(--chart-3); }
.chart-mark[data-series="4"] { --series: var(--chart-4); }
rect.chart-mark, circle.chart-mark { fill: var(--series); }
polyline.chart-mark { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round;
  stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-grid { stroke: var(--chart-grid); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-axis { stroke: var(--chart-axis); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart { display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.chart-body { display: flex; gap: var(--s1); min-width: 0; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; height: 180px;
  margin-top: calc(-1 * var(--s1)); margin-bottom: var(--s1); font-family: var(--mono); font-size: 10.5px;
  color: var(--muted); text-align: right; min-width: 34px; }
.chart-plot { flex-grow: 1; min-width: 0; }
.chart-svg { display: block; width: 100%; height: 180px; overflow: visible; }
.chart-x { position: relative; height: 18px; margin-top: var(--s1); font-size: 10.5px;
  color: var(--muted); }
.chart-x span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.chart-x span.first { transform: none; left: 0 !important; }
.chart-x span.last { transform: none; left: auto !important; right: 0; }
.chart-key { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); font-size: 12px; color: var(--ink-3); }
.chart-key-item { display: inline-flex; align-items: center; gap: var(--s1); }
.chart-swatch { width: 10px; height: 10px; border-radius: 2px; background: var(--series); }
/* The window before (compare): dashed, thinner, in its series' colour. */
polyline.chart-mark.prior { stroke-width: 1.5; stroke-dasharray: 5 4; }
circle.chart-mark.prior { fill: none; stroke: var(--series); stroke-width: 1.5; }
.chart-swatch.prior { height: 0; border-radius: 0; background: none;
  border-top: 2px dashed var(--series); }
.chart-empty { margin: var(--s1) 0; }
/* Series of very different sizes (app/chartscale.py): a small chart each,
   stacked, or a second axis on the right. */
.chart-panels { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.chart-panel .chart-y, .chart-panel .chart-svg { height: 108px; }
.chart-y.right { text-align: left; }
.bar-list { display: flex; flex-direction: column; gap: var(--s1); }
.bar-line { display: flex; justify-content: space-between; gap: var(--s-line); font-size: 12.5px;
  padding-bottom: var(--s-half); }
.bar-name { color: var(--ink-2); overflow-wrap: anywhere; }
.bar-value { color: var(--ink-3); white-space: nowrap; }
.bar-track { height: 7px; background: var(--border-2); border-radius: 4px; }
.bar-fill { height: 7px; background: var(--series); border-radius: 4px; }
.chart-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.chart-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px;
  padding: var(--s1) var(--s-line) var(--s1) 0; border-bottom: 1px solid var(--border); }
.chart-table td { padding: var(--s1) var(--s-line) var(--s1) 0; border-bottom: 1px solid var(--border-2);
  color: var(--ink-2); overflow-wrap: anywhere; }
.chart-table .num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.stat { display: flex; flex-direction: column; gap: var(--s-half); }
.stat-value { font-size: 27px; font-weight: 500; letter-spacing: -0.8px; color: var(--ink); }
.stat-change { font-size: 12px; color: var(--muted); }
.stat-change[data-tone="good"] { color: var(--accent); }
.stat-change[data-tone="bad"] { color: var(--danger); }
/* A tile's badges, and the ones a board's tiles share (in its header). */
.board-badges, .tile-badges { display: flex; flex-wrap: wrap; gap: var(--s1); }
.board-badges:empty, .tile-badges:empty { display: none; }
.badge-note summary { cursor: pointer; list-style: none; display: inline-block; }
.badge-note summary::-webkit-details-marker { display: none; }
.badge-note[open] { flex-basis: 100%; }
.badge-note p { margin: var(--s1) 0 0; font-size: 12px; color: var(--ink-2); max-width: 70ch; }
/* The board's own notes ("Partial period · every tile"): a plain muted line
   in the UI face under the toolbar, never a code-like tag (Jon, 2026-10-11).
   A tile's own stay tags. */
.board-badges .badge { font-family: var(--sans); font-size: 12.5px; letter-spacing: 0;
  padding: 0; background: none; color: var(--muted); border-radius: 0;
  text-decoration: underline dotted; text-underline-offset: 3px; }

/* Ask: a chart an answer drew, and pinning it */
.answer-charts { display: flex; flex-direction: column; gap: var(--s-line); }
.answer-charts:empty { display: none; }
.chart-card { margin: var(--s-line) 0 0; padding: var(--s2) var(--s2); border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface-2); display: flex; flex-direction: column;
  gap: var(--s-line); min-width: 0; }
.chart-title { font-size: 14px; font-weight: 500; color: var(--ink); }
.pin-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); }
.add-all { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--s1); }
.pin-row select, .pin-row input, .add-all select { min-height: 36px; padding: 0 var(--s-line);
  border: 1px solid var(--field);
  border-radius: 8px; background: var(--surface); color: var(--ink); font-family: var(--sans);
  font-size: 13px; }

/* ---------------------------------------------------------------- dashboards */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--s-line); }
.board-card { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s2) var(--s3);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  text-decoration: none; }
.board-card:hover { border-color: var(--field); }
/* "New dashboard": the grid's dashed last tile (brief 18 Part 4 item 6). */
.board-new { border-style: dashed; border-color: var(--dropzone-border); background: transparent;
  text-align: left; font: inherit; cursor: pointer; min-height: 96px; justify-content: center; }
.board-new:hover { border-color: var(--accent); }
.archived-boards summary { cursor: pointer; font-weight: 500; color: var(--ink); }
.archived-list { list-style: none; margin: var(--s-line) 0 0; padding: 0; display: flex; flex-direction: column;
  gap: var(--s-line); }
.archived-list li { display: flex; gap: var(--s-line); align-items: center; flex-wrap: wrap; }
.share-panel { gap: var(--s-line); max-width: 560px; }
/* Email a PDF: where it went, newest first. */
.pdf-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s1);
  border-top: 1px solid var(--border-2); padding-top: var(--s-line); }
.pdf-log[hidden] { display: none; }
.pdf-log li { display: flex; flex-direction: column; gap: var(--s-half); font-size: 13.5px; overflow-wrap: anywhere; }
.pdf-panel p { margin: 0; }
.share-panel h2 { margin: 0; font-size: 16px; font-weight: 500; font-family: var(--sans); }
.share-choice, .share-person { display: flex; gap: var(--s1); align-items: center; color: var(--ink-2); }
.share-people { border: 1px solid var(--border); border-radius: 8px; padding: var(--s-line) var(--s-line); margin: 0;
  display: flex; flex-direction: column; gap: var(--s1); }
.share-people legend { font-size: 12px; color: var(--muted); padding: 0 var(--s-half); }
/* Brief 19: the person picker (sharing; Findings' "Ask someone who knows"). */
.person-picker { display: grid; gap: var(--s1); }
.person-search, #share-note, #pdf-note, #pdf-to { width: 100%; font: inherit; padding: var(--s1) var(--s-line); border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface); color: var(--ink); }
.person-chips, .person-results { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s1); }
.person-results { flex-direction: column; }
.person-chip { display: inline-flex; gap: var(--s-half); align-items: center; padding: var(--s-half) var(--s-half) var(--s-half) var(--s-line);
  border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: 13px; }
.person-result { width: 100%; text-align: left; font: inherit; padding: var(--s1); border: 0; border-radius: 6px;
  background: transparent; color: var(--ink); cursor: pointer; }
.person-result:hover, .person-result:focus-visible { background: var(--surface-2); }
.board-who { margin: var(--s-half) 0 0; }
.board-name { font-family: var(--serif); font-size: 18px; font-weight: 500; color: var(--ink);
  overflow-wrap: anywhere; }
.empty-board p { margin: var(--s1) 0 0; color: var(--ink-3); font-size: 14px; line-height: 1.55; }
.board-head { align-items: flex-start; }
.board-tools { display: flex; gap: var(--s1); flex-wrap: wrap; }
.board-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-line) var(--s2); }
.board-bar .export-row { margin: 0 0 0 auto; }
.range-custom { display: flex; align-items: center; gap: var(--s1); flex-wrap: wrap; }
/* Item 8: what every tile is compared with. */
/* Compare: a second chip row, under the period's (Jon, 2026-10-11). */
.compare-chips { flex-basis: 100%; }
.compare-label { margin-right: var(--s-half); }
.range-custom input { min-height: 36px; padding: 0 var(--s1); border: 1px solid var(--field);
  border-radius: 8px; background: var(--surface); color: var(--ink); font-family: var(--sans); }
.rename-form { display: flex; gap: var(--s1); align-items: center; flex-wrap: wrap; }
.rename-form input { min-height: 40px; padding: 0 var(--s-line); border: 1px solid var(--field);
  border-radius: 8px; background: var(--surface); color: var(--ink); font-family: var(--serif);
  font-size: 20px; min-width: 0; }
.tile-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-line);
  align-items: start; }          /* a number tile is as tall as its number, not its row */
/* A dashboard built from a prompt (brief 18 Part 4 item 6): the empty state
   is the prompt box, then a preview to keep tiles from. */
.tile-grid > .build-panel { grid-column: 1 / -1; }
.build-panel h2, .dock-title { margin: 0; font-size: 16px; font-weight: 500; font-family: var(--sans); }
.build-form { display: flex; gap: var(--s-line); align-items: flex-end; flex-wrap: wrap; }
.build-form textarea { flex: 1 1 320px; min-height: 72px; resize: vertical; font: inherit;
  padding: var(--s-line) var(--s-line); border: 1px solid var(--field); border-radius: 8px; background: var(--surface);
  color: var(--ink); }
.build-form input[type="text"], .dock-form input { flex: 1 1 240px; font: inherit; padding: var(--s1) var(--s-line);
  border: 1px solid var(--field); border-radius: 8px; background: var(--surface); color: var(--ink); }
.build-add { flex: 1 1 420px; flex-wrap: nowrap; }
@media (max-width: 520px) { .build-add { flex-wrap: wrap; } }
.build-actions { display: flex; gap: var(--s-line); flex-wrap: wrap; align-items: center; }
/* "Ask about this dashboard", docked above the tiles. */
.dock { gap: var(--s-line); }
.dock-thread { display: flex; flex-direction: column; gap: var(--s-line); max-height: 480px; overflow-y: auto; }
.dock-thread:empty { display: none; }
.dock-question { margin: 0; font-weight: 500; color: var(--ink); }
.dock-answer { display: flex; flex-direction: column; gap: var(--s1); }
.dock-form { display: flex; gap: var(--s-line); flex-wrap: wrap; }
/* What the chat changed on the board: one line each, Put back beside a
   tile it changed or removed. */
.dock-change { margin: 0; }
.dock-change strong { font-weight: 600; color: var(--ink); }
/* Reports (brief 18 Part 4 item 7). */
/* "Write a report from this": the conversation it's from, and its sources. */
.report-from { display: grid; gap: var(--s-half); }
.report-from[hidden] { display: none; }
.report-from p { margin: 0; }
.report-form textarea { width: 100%; min-height: 96px; resize: vertical; font: inherit; padding: var(--s-line) var(--s-line);
  border: 1px solid var(--field); border-radius: 8px; background: var(--surface); color: var(--ink);
  box-sizing: border-box; }
.report-list { display: flex; flex-direction: column; gap: var(--s-line); }
.report-row, .schedule-row { display: flex; flex-direction: column; gap: var(--s-half); text-decoration: none; padding: var(--s2) var(--s2); }
.report-row[data-status="failed"] .card-meta { color: var(--danger); }
.report-body { display: flex; flex-direction: column; gap: var(--s-line); line-height: 1.6; }
.report-body p, .report-body ul, .report-body ol { max-width: 68ch; }
.report-body ul, .report-body ol { padding-left: var(--s3); }
.schedule-form .rename-form { gap: var(--s2); }
.schedule-form #schedule-weekday { width: auto; }

/* The report page (Jon, 2026-10-11): the report in its own container, a
   sticky 320px panel beside it level with the title, collapsible to a 44px
   strip; a drawer under 1100px; the actions along the bottom under 700px. */
.report-page { display: grid; grid-template-columns: minmax(0, 880px) 320px; gap: var(--s3);
  align-items: start; justify-content: center; }
.report-page.is-collapsed { grid-template-columns: minmax(0, 880px) 44px; }
.report-main { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s2); }
.report-head h1 { margin: 0 0 var(--s1); }
.report-container { background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: var(--s4); min-width: 0; }
.report-container.is-waiting { padding: var(--s3); }
.report-byline { margin: 0 0 var(--s2); font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted); }
.report-side { position: sticky; top: var(--s2); display: flex; flex-direction: column; gap: var(--s2); min-width: 0; }
.report-side-head { display: flex; justify-content: space-between; align-items: center; }
.report-panel-close { min-width: 32px; min-height: 32px; padding: 0; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1; }
.report-panel-close:hover { color: var(--ink); }
.report-card { display: flex; flex-direction: column; gap: var(--s1); }
.report-card h2 { margin: 0; }
.report-actions { display: flex; flex-direction: column; gap: var(--s1); }
.report-action { display: flex; align-items: center; gap: var(--s1); justify-content: flex-start; width: 100%;
  text-align: left; text-decoration: none; background: var(--surface-2); color: var(--ink);
  border: 1px solid var(--border); }
.report-action .report-action-label { flex-grow: 1; }
.report-action-cost { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.report-schedule .schedule-panel { margin: 0; }
.schedule-panel.is-scheduled { border-color: var(--accent); background: var(--accent-soft); }
.schedule-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-half);
  font-size: 13px; }
.schedule-history li[data-outcome="skipped_unchanged"] { color: var(--muted); }
.schedule-check { display: flex; align-items: center; gap: var(--s1); }
.report-strip { display: none; }
.report-page.is-collapsed .report-side { display: none; }
.report-page.is-collapsed .report-strip { display: flex; flex-direction: column; align-items: center;
  gap: var(--s1); position: sticky; top: var(--s2); }
.report-strip-btn { position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  color: var(--ink-2); cursor: pointer; }
.report-strip-btn:hover { color: var(--ink); background: var(--surface-2); }
.report-strip-open { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; font-size: 18px; }
.report-strip-dot { position: absolute; top: var(--s-half); right: var(--s-half); width: 8px; height: 8px;
  border-radius: 50%; background: var(--accent); }
.report-drawer-open, .report-bar { display: none; }
@media (max-width: 1099px) {
  .report-page, .report-page.is-collapsed { grid-template-columns: minmax(0, 1fr); }
  .report-page.is-collapsed .report-strip { display: none; }
  .report-drawer-open { display: inline-flex; flex-shrink: 0; }
  .report-side, .report-page.is-collapsed .report-side { display: none; position: fixed; top: 0; right: 0; bottom: 0;
    width: min(360px, 100vw); z-index: 30; padding: var(--s2); background: var(--ground);
    border-left: 1px solid var(--border); box-shadow: var(--menu-shadow); overflow-y: auto; }
  .report-page.drawer-open .report-side { display: flex; }
}
@media (max-width: 699px) {
  .report-drawer-open { display: none; }
  .report-container { padding: var(--s3) var(--s2); }
  .report-bar { display: flex; justify-content: space-around; gap: var(--s1); position: fixed; left: 0; right: 0;
    bottom: 0; z-index: 25; padding: var(--s1) var(--s2); background: var(--surface);
    border-top: 1px solid var(--border); }
  .report-main { padding-bottom: var(--s6); }
}
.report-asked { margin-top: var(--s2); }
.report-body h2 { margin: var(--s2) 0 0; font-size: 18px; font-weight: 500; font-family: var(--serif); }
.report-body h3 { margin: var(--s-line) 0 0; font-size: 15px; font-weight: 500; }

/* A new dashboard's "Nothing here yet" spans the grid, not one column. */
.tile-grid > .empty { grid-column: 1 / -1; }
.tile { grid-column: span 6; display: flex; flex-direction: column; gap: var(--s-line); min-width: 0;
  padding: var(--s2) var(--s2); }
.tile-stat, .tile-findings { grid-column: span 3; }
/* A table is always a whole row, at every width (Jon, 2026-10-09). */
.tile.tile-table { grid-column: 1 / -1; }
.tile.tile-table .tile-body { overflow-x: auto; }
/* The board's name and description, edited in place; the build panel above
   the tiles; "Removed from this build" below them. */
.board-head h1.is-editable, .board-description.is-editable { cursor: text; border-radius: 6px; }
.board-head h1.is-editable:hover, .board-description.is-editable:hover { background: var(--surface-2); }
.title-field { font-family: var(--serif); font-size: 28px; font-weight: 600; min-height: 44px; width: 100%; }
.description-field { width: 100%; font: inherit; font-size: 14px; padding: var(--s1) var(--s-line);
  border: 1px solid var(--field); border-radius: 8px; background: var(--surface); color: var(--ink); }
.build-host:empty { display: none; }
/* After a build: up to four tiles to add, one click each. */
.board-suggestions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); }
.board-suggestions[hidden] { display: none; }
.board-tray { display: flex; flex-direction: column; gap: var(--s1); }
.board-tray h2.section { margin-bottom: 0; }
.board-tray > p { margin: 0 0 var(--s1); }
.tray-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s1); }
.tray-what { display: flex; flex-direction: column; gap: var(--s-half); min-width: 0; }
.tray-list li { display: flex; justify-content: space-between; align-items: center; gap: var(--s2);
  padding: var(--s1) var(--s-line); border: 1px dashed var(--border); border-radius: 8px; color: var(--ink-2); }
.tile-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-line); }
.tile-title { margin: 0; font-size: 14px; font-weight: 500; color: var(--ink);
  font-family: var(--sans); overflow-wrap: anywhere; }
.tile-stat .tile-title, .tile-findings .tile-title { font-size: 12.5px; font-weight: 400;
  color: var(--muted); }
.tile-actions { display: flex; gap: var(--s-line); flex-shrink: 0; }
.tile-actions .btn-link { font-size: 12px; }
.tile-body { flex-grow: 1; min-width: 0; }
.tile-foot { display: flex; flex-direction: column; gap: var(--s-half); }
.tile-foot .card-meta { font-size: 11.5px; overflow-wrap: anywhere; }
.tile-rules-line .btn-link, .tile-rules-line .card-meta { font-size: 11.5px; }
.tile-rules { font-size: 12px; margin: var(--s-half) 0 0; }
.tile-error { margin: 0; }
.tile-gap { font-size: 11.5px; color: var(--amber); overflow-wrap: anywhere; }
.rule-tag.tag-status { background: var(--accent-soft); color: var(--accent-ink); }
.rule-tag.status-held { background: var(--amber-soft); color: var(--amber); }
.rule-tag.status-retired { background: var(--sunken); color: var(--ink-3); }

@media (max-width: 1100px) {
  .tile-stat, .tile-findings { grid-column: span 6; }
  .tile { grid-column: span 12; }
  .tile.tile-stat, .tile.tile-findings { grid-column: span 6; }
}
@media (max-width: 759px) {
  .tile, .tile.tile-stat, .tile.tile-findings { grid-column: span 12; }
  .board-bar .export-row { margin: 0; }
  .rail-sub { display: none; }
}

/* ------------------------------------------------ plans and the meter (brief 13) */
.meter-card { display: flex; flex-direction: column; gap: var(--s-line); }
.meter-line { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-line); flex-wrap: wrap; }
/* The period by kind: Ask, dashboard builds, reports. */
.by-kind { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s1); font-size: 13px; }
.by-kind li { display: flex; justify-content: space-between; gap: var(--s-line); }
/* A build's cost, asked before it runs. */
.build-confirm p { margin: 0 0 var(--s-line); }
.meter-count { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.meter-bar { height: 10px; border-radius: 6px; background: var(--sunken); overflow: hidden; }
.meter-fill { display: block; height: 100%; background: var(--accent); }
.meter-fill.high { background: var(--amber); }
.meter-fill.full { background: var(--danger); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s-line); margin: var(--s-line) 0; }
.plan-card { border: 1px solid var(--border); border-radius: 12px; padding: var(--s2) var(--s2); display: flex;
  flex-direction: column; gap: var(--s1); align-items: flex-start; }
.plan-card.is-current { border-color: var(--accent); }
.plan-name { font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); }
/* The plan a trial looks like: marked, never pre-selected. */
.plan-fits { font-weight: 500; }
#trial-recommended { margin: 0; }
.ask-paused { display: flex; flex-direction: column; gap: var(--s1); align-items: flex-start; margin-bottom: var(--s-line); }
.ask-paused-title { margin: 0; font-weight: 500; }
.banner .btn-link { margin-left: var(--s1); }
.invite-code code { font-size: 13px; letter-spacing: 0.5px; }
#upload-card.is-open { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The Sources page's upload: its progress and result under the four cards,
   across the grid (Jon, 2026-10-09). */
.add-grid .upload-results { grid-column: 1 / -1; }
.upload-results[hidden] { display: none; }
/* A file dragged over the Sources page: drop it anywhere. */
.drop-overlay { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center;
  justify-content: center; background: var(--drop-veil); pointer-events: none; }
.drop-overlay[hidden] { display: none; }
.drop-overlay-box { display: flex; align-items: center; gap: var(--s1); padding: var(--s3) var(--s4);
  border: 2px dashed var(--accent); border-radius: 14px; background: var(--surface);
  font-size: 16px; font-weight: 500; color: var(--ink); }

/* ------------------------------------------------ the private-beta page */
.site-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s2);
  max-width: 1040px; margin: 0 auto; padding: var(--s3) var(--s2); }
.site-nav a { font-weight: 500; }
.beta { max-width: 1040px; margin: 0 auto; padding: var(--s1) var(--s2) var(--s8); display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: var(--s6); align-items: start; }
.beta-kicker { margin: 0 0 var(--s1); font-size: 12px; letter-spacing: 0.8px; text-transform: uppercase;
  color: var(--accent-ink); font-weight: 600; }
.beta-intro h1 { margin: 0; font-family: var(--serif); font-size: 38px; line-height: 1.15;
  font-weight: 500; letter-spacing: -0.4px; }
.beta-intro .lede { margin: var(--s2) 0; font-size: 16px; line-height: 1.65; color: var(--lede-ink); }
.beta-code-line { margin: var(--s2) 0; font-size: 14px; color: var(--ink-3); }
.news-card textarea { width: 100%; min-height: 160px; resize: vertical; font: inherit; font-size: 14px;
  padding: var(--s-line) var(--s-line); border: 1px solid var(--field); border-radius: 10px; background: var(--surface); color: var(--ink); }
.beta-card textarea { width: 100%; font: inherit; font-size: 14px; padding: var(--s-line) var(--s-line);
  border: 1px solid var(--field); border-radius: 10px; background: var(--surface); color: var(--ink); }
.beta-card select { width: 100%; }
.beta-card .field { margin-bottom: var(--s2); }
.limit-controls { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); margin-top: var(--s1); }
.limit-controls select { width: auto; min-height: 34px; }
.limit-controls input { width: 130px; min-height: 34px; padding: 0 var(--s-line); border: 1px solid var(--field);
  border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.beta-done h2 { margin: 0 0 var(--s1); font-family: var(--serif); font-weight: 500; }
.beta-done:focus { outline: none; }
@media (max-width: 820px) {
  .beta { grid-template-columns: minmax(0, 1fr); gap: var(--s3); }
  .beta-intro h1 { font-size: 30px; }
}

/* ------------------------------------------------------------------ spaces
   Brief 10: the switcher at the top of the rail, a source's space, rules
   set above this space, held rules and their review, stale answers, and
   notifications. Tokens only, so both palettes cover them. */
.space-switcher { display: flex; flex-direction: column; gap: var(--s-half); padding: var(--s-half) var(--s-line) var(--s2); }
.space-switcher-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.6px;
  text-transform: uppercase; color: var(--muted); }
.space-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column;
  gap: 0; max-height: 240px; overflow-y: auto; }
.space-item { display: block; width: 100%; min-height: 32px; padding: 0 var(--s1); border: 0;
  border-radius: 6px; background: none; color: var(--ink-3); font: inherit; font-size: 13px;
  text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.space-item:hover { background: var(--sunken); color: var(--ink); }
.space-item[aria-current="true"] { background: var(--accent-soft); color: var(--accent-ink);
  font-weight: 500; cursor: default; }
.space-item[data-depth="1"] { padding-left: var(--s3); }
.space-item[data-depth="2"] { padding-left: var(--s4); }
.space-item[data-depth="3"] { padding-left: var(--s6); }
.space-item[data-depth="4"], .space-item[data-depth="5"] { padding-left: var(--s8); }
.source-space { font-family: var(--mono); font-size: 11px; letter-spacing: 0.3px; color: var(--accent-ink);
  padding-top: var(--s-half); }
.rule-tag.tag-set-by { background: var(--chip); color: var(--ink-2); }
.rule.is-inherited { background: var(--surface-2); }
.rule.is-held, .rule.is-pending { border-left: 3px solid var(--amber-border); }
.review-line { color: var(--ink-3); }
.review-note { overflow-wrap: anywhere; }
.held-why { font-size: 13px; line-height: 1.5; color: var(--amber); background: var(--amber-soft);
  border-radius: 8px; padding: var(--s1) var(--s-line); margin-top: var(--s1); overflow-wrap: anywhere; }
.held-conflict { font-size: 13px; color: var(--ink-3); padding: var(--s-half) var(--s-line) 0; overflow-wrap: anywhere; }
.stale-flag { font-size: 12.5px; color: var(--amber); background: var(--amber-soft); border-radius: 8px;
  padding: var(--s1) var(--s-line); margin: var(--s1) 0; }
.ask-space { margin: var(--s1) var(--s-half) 0; font-size: 12.5px; color: var(--muted); }
.ask-space strong { color: var(--ink-2); font-weight: 600; }
.rail-notify { display: inline-flex; align-items: center; gap: var(--s1); text-decoration: none; }
/* A list of alerts or events: 12px between cards; each card's title, body
   and meta line on its own line-height, 12px apart (Jon, 2026-10-09). */
.notification-list { list-style: none; margin: 0; padding: 0; display: flex;
  flex-direction: column; gap: var(--s-line); }
.notification-list > .card { display: flex; flex-direction: column; gap: var(--s-line); }
.notification-list .contact-head { line-height: 1.35; }
.notification-list .contact-head strong { font-size: 14px; }
.notification-list a, .notification-list p { line-height: 1.5; margin: 0; }
.notification-list .card-meta { line-height: 1.45; }
.notification { display: block; text-decoration: none; color: var(--ink); }
.notification.is-unread { border-left: 3px solid var(--accent); }
.notification-title { font-weight: 600; font-size: 14px; }
.person-role { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); padding: var(--s-half) 0;
  font-size: 13px; }
.person-space { color: var(--ink-3); }
.super-cell { white-space: nowrap; font-size: 13px; }
.choice-inline { display: inline-flex; align-items: center; gap: var(--s1); }
.space-name { overflow-wrap: anywhere; }
tr.is-archived td { color: var(--muted); }

/* /app/staff/contact (brief 14) */
.contact-request { display: flex; flex-direction: column; gap: var(--s1); }
.contact-head { display: flex; justify-content: space-between; gap: var(--s-line); flex-wrap: wrap; }
.contact-who { font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.contact-message { white-space: pre-wrap; overflow-wrap: anywhere; margin: var(--s-half) 0; }
.contact-request .btn { align-self: flex-start; }

/* The staff console (brief 15) */
.staff-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--s-line);
  margin: var(--s-line) 0 var(--s3); }
.staff-stat { display: flex; flex-direction: column; gap: var(--s-half); padding: var(--s2) var(--s2); }
.staff-stat-value { font-size: 22px; color: var(--ink); overflow-wrap: anywhere; }
.staff-alert { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger);
  border-radius: 8px; padding: var(--s-line) var(--s2); margin-bottom: var(--s2); font-size: 14px; }
.staff-alert a { color: var(--danger); }
.staff-table tr.is-trouble td { background: var(--danger-soft); color: var(--danger); }
.staff-table .num { text-align: right; white-space: nowrap; }
/* Model spend's prompt cache: a hit rate under the target. */
.staff-table td.is-under { background: var(--amber-soft); color: var(--amber); }
.staff-table th .btn-link { font: inherit; color: inherit; }
.attention-count { color: var(--danger); font-weight: 600; }
.staff-filters { flex-wrap: wrap; gap: var(--s-line); align-items: center; }
.staff-tree { list-style: none; margin: 0 0 var(--s2); padding: 0; font-size: 14px; }
.staff-tree li { padding: var(--s-half) 0; border-bottom: 1px solid var(--border-2); }
.audit-json { font-size: 12px; max-width: 260px; overflow-wrap: anywhere; }

/* Mercury11 Admin's own shell (templates/admin.html): a header, its sections
   in a row under it, the console full width below. No business rail. */
.admin-body { display: block; min-height: 100vh; background: var(--ground); }
.admin-header { background: var(--surface); border-bottom: 1px solid var(--border);
  padding: var(--s2) var(--s4) 0; }
.admin-header-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding-bottom: var(--s-line); }
.admin-brand { flex-shrink: 0; }
.admin-who { display: flex; align-items: center; gap: var(--s2); font-size: 14px; color: var(--muted); }
.admin-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-half) var(--s2); font-size: 14px; }
.admin-nav-item { color: var(--muted); text-decoration: none; padding: var(--s1) 0 var(--s-line);
  border-bottom: 2px solid transparent; display: inline-flex; align-items: center; gap: var(--s1); }
.admin-nav-item:hover { color: var(--ink); }
.admin-nav-item[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.admin-mark-read { font-size: 13px; }
.admin-header-row { padding-bottom: var(--s2); }
/* Gutters (Jon, 2026-10-09): 32px at desktop, 24px at tablet, 16px at phone;
   32px from the section nav to the content at every width. */
main.pane.admin-pane { max-width: none; padding: var(--s4) var(--s4) var(--s6); }
@media (max-width: 1100px) {
  .admin-header { padding: var(--s2) var(--s3) 0; }
  main.pane.admin-pane { padding: var(--s4) var(--s3) var(--s6); }
}
@media (max-width: 720px) {
  main.pane.admin-pane { padding: var(--s4) var(--s2) var(--s6); }
  .admin-header { padding: var(--s2) var(--s2) 0; }
  .admin-nav { overflow-x: auto; flex-wrap: nowrap; }
  .admin-nav-item { white-space: nowrap; }
}
.invite-mail.is-not-sent { color: var(--amber); }
.invite-actions { margin: var(--s-half) 0 0; font-size: 13px; }
#staff-note { width: 100%; }

/* Guided file mapping (app/ingest/mapper.py): the conversation with the assistant. */
.mapping-turns { display: flex; flex-direction: column; gap: var(--s1); margin: var(--s1) 0 var(--s-line); }
.mapping-turn { padding: var(--s1) var(--s-line); border-radius: 10px; border: 1px solid var(--border); max-width: 100%; }
.mapping-turn p { margin: 0; overflow-wrap: anywhere; }
.mapping-turn.person { align-self: flex-end; background: var(--border-2); }
.mapping-turn.note { border-style: dashed; color: var(--muted); font-size: 0.92em; }
.mapping-who { font-size: 0.8em; color: var(--muted); margin-bottom: var(--s-half); }
.mapping-excluded { color: var(--muted); }
.mapping textarea { flex: 1; min-width: 0; }

/* ---------------------------------------------------------------- a source's activity (4.10) */
.activity-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s1); }
.activity-item { font-size: 13.5px; color: var(--ink); overflow-wrap: anywhere; }
/* ---------------------------------------------------------------- scheduled reports */
.schedule-panel { display: flex; flex-direction: column; gap: var(--s-line); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-line); }
.panel-head h2 { margin: 0; }
.schedule-form { display: flex; flex-direction: column; gap: var(--s-line); }
.schedule-form select, .schedule-form input[type="time"], .schedule-form input[type="number"] {
  min-height: 36px; padding: 0 var(--s-line); border: 1px solid var(--field); border-radius: 8px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; }
.schedule-form input[type="number"] { width: 90px; }

/* A report's Exceptions (amber: a warning, never red) and its footer. */
.report-exceptions { background: var(--amber-soft); border-left: 3px solid var(--amber);
  color: var(--banner-ink); border-radius: 0 8px 8px 0; padding: var(--s-line) var(--s2); margin: 0 0 var(--s2); }
.report-exceptions > :last-child { margin-bottom: 0; }
.report-footer { border-top: 1px solid var(--border); margin-top: var(--s2); padding-top: var(--s-line);
  font-size: 12.5px; color: var(--muted); }
.report-footer p { margin: var(--s-half) 0; overflow-wrap: anywhere; }
/* The public demo's banner (app/demo.py): what this is, and the way out. */
.banner-demo > span { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s-line); align-items: center; }
.banner-demo .banner-cta { margin-left: auto; }

/* Google Sheets' Picker window (app/templates/picker.html): a heading, a line
   and the button; Google's Picker opens over it. */
.picker-body { margin: 0; min-height: 100vh; background: var(--ground); color: var(--ink);
  font-family: var(--sans); }
.picker-main { max-width: 480px; margin: 0 auto; padding: var(--s6) var(--s3); display: flex;
  flex-direction: column; gap: var(--s2); align-items: flex-start; }
.picker-title { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 600; }
.picker-lede { margin: 0; color: var(--ink-3); font-size: 14.5px; line-height: 1.6; }
/* Mercury11 Admin's usage watch: a business's last questions, their words. */
.staff-questions { margin: var(--s1) 0 0; padding-left: var(--s3); display: flex; flex-direction: column;
  gap: var(--s-half); font-size: 13.5px; overflow-wrap: anywhere; }
/* Brief 19: the AI notice (app/ai_copy.py). Small, always there. */
.ai-notice { margin: var(--s1) 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.finding-ai-notice { margin: var(--s-half) 0 var(--s1); }
#dashboard-ai-notice { margin-top: var(--s3); }
.ai-first-card { display: grid; gap: var(--s-line); margin: 0 0 var(--s-line); }
.ai-first-card p { margin: 0; color: var(--ink); }
.ai-first-card .btn { justify-self: start; }
