/* Our Stories — warm, accessible UI shared by the public site and pilot console. */
:root {
  color-scheme: light;
  --bg: #f6f5f0;
  --bg-elevated: #fbfaf7;
  --fg: #1e2430;
  --muted: #687080;
  --subtle: #8b92a0;
  --card: #ffffff;
  --card-soft: #f0eee8;
  --line: #dedfdc;
  --line-strong: #c9cbc8;
  --accent: #7c5cbf;
  --accent-hover: #6b4dad;
  --accent-soft: #f1ecf9;
  --accent-fg: #ffffff;
  --user-bubble: #ece5f7;
  --agent-bubble: #f0f1f3;
  --third-bubble: #fbe9d0;   /* a turn the recording's voices gave to someone else (app/diarization.py) */
  --danger: #bd3f4b;
  --danger-soft: #fff0f1;
  --ok: #20815a;
  --ok-soft: #e7f6ee;
  --warn: #a86417;
  --warn-soft: #fff3dd;
  /* The assessment window's marks: five act hues in a fixed, validated order
     (adjacent CVD ΔE ≥ 8 on the card surface), the accent for single-hue bars. */
  --viz-1: #2a78d6;
  --viz-2: #eb6834;
  --viz-3: #1baf7a;
  --viz-4: #eda100;
  --viz-5: #e87ba4;
  --shadow-sm: 0 1px 2px rgb(30 36 48 / .04), 0 6px 18px rgb(30 36 48 / .04);
  --shadow-md: 0 18px 50px rgb(31 34 49 / .12);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Iowan Old Style, Charter, "Palatino Linotype", Georgia, serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121419;
  --viz-1: #3987e5;
  --viz-2: #d95926;
  --viz-3: #199e70;
  --viz-4: #c98500;
  --viz-5: #d55181;
  --bg-elevated: #171a20;
  --fg: #f0f1f4;
  --muted: #a2a8b3;
  --subtle: #7d8490;
  --card: #1c1f26;
  --card-soft: #242830;
  --line: #30343d;
  --line-strong: #414650;
  --accent: #b39de2;
  --accent-hover: #c3b1ea;
  --accent-soft: #2e2742;
  --accent-fg: #1c1430;
  --user-bubble: #352b4b;
  --agent-bubble: #272b33;
  --third-bubble: #4a3a26;
  --danger: #ff8b95;
  --danger-soft: #3a2328;
  --ok: #69d3a2;
  --ok-soft: #19382d;
  --warn: #f0b768;
  --warn-soft: #3b3020;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .16), 0 8px 24px rgb(0 0 0 / .13);
  --shadow-md: 0 20px 60px rgb(0 0 0 / .38);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scrollbar-gutter: stable; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 6% 0%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 30rem),
    radial-gradient(circle at 96% 25%, color-mix(in srgb, var(--warn) 5%, transparent), transparent 28rem);
  content: "";
  pointer-events: none;
}
button, input, select, textarea { font: inherit; }
button, input, select, textarea {
  min-height: 42px;
  padding: .6rem .8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--fg);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, color .16s ease, transform .16s ease;
}
button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; cursor: pointer; font-weight: 650; }
button:hover:not(:disabled) { border-color: var(--line-strong); background: var(--card-soft); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { cursor: not-allowed; opacity: .5; }
/* A running action: content goes invisible (text and currentColor icons
   alike) and a ring spins in its place, so width never jumps and a slow
   provider cannot be double-clicked. */
button.busy { position: relative; color: transparent !important; pointer-events: none; }
button.busy::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  margin: -8px 0 0 -8px;
  border: 2px solid color-mix(in srgb, var(--fg) 25%, transparent);
  border-radius: 50%;
  border-top-color: var(--fg);
  animation: busy-spin .7s linear infinite;
}
@keyframes busy-spin { to { transform: rotate(360deg); } }
/* Past calls: the discussion icon breathes while the assessment job holds the call (operator, 2026-09-16). */
button.assessing .msym { animation: assess-pulse 1.4s ease-in-out infinite; }
@keyframes assess-pulse { 0%, 100% { color: var(--muted); opacity: .55; } 50% { color: var(--fg); opacity: 1; } }
button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 20%, transparent);
}
button.primary:hover:not(:disabled) { border-color: var(--accent-hover); background: var(--accent-hover); }
button.ghost { border-color: transparent; background: transparent; box-shadow: none; }
button.ghost:hover:not(:disabled) { border-color: var(--line); background: var(--card-soft); }
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}
input[type="search"] {
  padding-left: 2.45rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23838a96' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E");
  background-position: .8rem center;
  background-repeat: no-repeat;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}
a { color: var(--accent); }
.wrap { width: min(100% - 2rem, 1180px); margin: 0 auto; }
.msym { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.icon-button { width: 40px; min-height: 40px; padding: 0; }
#theme-btn .icon-light { display: none; }
:root[data-theme="dark"] #theme-btn .icon-dark { display: none; }
:root[data-theme="dark"] #theme-btn .icon-light { display: block; }
.meta { color: var(--muted); font-size: .8rem; }
.eyebrow {
  margin: 0 0 .5rem;
  color: var(--accent);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.up { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 14%, transparent); }
.dot.down { background: var(--danger); }
.ok { color: var(--ok); }
.error { margin: .5rem 0; color: var(--danger); }
/* The partner console (documentation/PARTNERS.md, step 3): the operator's
   classes, plus what only this page has — the red validation warning above
   the grades. */
.partner-page .view-heading a { color: var(--accent); text-decoration: none; }
.warn { color: var(--danger); }
.st-requests { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .8rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.validation-warning { margin: 0 0 .8rem; padding: .7rem .9rem; border: 1px solid var(--danger); border-radius: 10px; background: color-mix(in srgb, var(--danger) 10%, var(--card)); color: var(--danger); font-weight: 600; }
/* The public pages' header: who the page is for, one of two, top right. */
.audience { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.audience a { padding: .38rem .8rem; border-radius: 999px; color: var(--muted); font-size: .78rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.audience a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.audience .label-short { display: none; }
/* The partner page's hero card: the staff note's lines after the quote. */
.note-lines { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .8rem; }
.note-lines span { padding: .2rem .55rem; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .7rem; }
/* Settings → Users: the forms live in a modal with the fixed frame the rule asks for. */
.modal.users { display: flex; flex-direction: column; width: min(460px, 100%); height: min(72vh, 400px); overflow: hidden; }
.modal.users .scroll { flex: 1; min-height: 0; overflow-y: auto; margin-top: .6rem; }
.modal.users .uform { display: flex; flex-direction: column; gap: .5rem; }
.modal.users .uform input, .modal.users .uform select { width: 100%; }
.user-row, .domain-row { align-items: flex-start; }
/* An address or a domain with no hyphen to break at still stays inside 360 px. */
.user-row b, .domain-row b { overflow-wrap: anywhere; }

/* Shared header and footer */
header.site { display: flex; align-items: center; }
.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: .65rem;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  text-align: left;
  text-decoration: none;
  box-shadow: none;
}
.brand:hover:not(:disabled) { border: 0; background: transparent; }
.brand img { width: 38px; height: 38px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.18; }
.brand-copy strong { font-family: var(--font-display); font-size: 1.08rem; letter-spacing: -.015em; }
.brand-copy small { color: var(--muted); font-size: .67rem; font-weight: 500; }
/* The time-mode button says its mode in text: UTC / THEIR / MINE. */
.time-button { width: 3.6rem; padding: 0; font-size: .68rem; font-weight: 800; letter-spacing: .06em; }

/* Build stamp beside the brand — the pattern family_net uses (2026-08-24). */
.version-tag {
  position: relative;
  flex: 0 1 auto;
  gap: .3rem;
  min-width: 0;
  min-height: auto;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  color: var(--muted);
  font-size: .66rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: default;
}
.version-tag:hover:not(:disabled) { border: none; background: none; }
/* The partner page shows the build stamp as the icon at every width (operator, 2026-09-16); the bubble is the small screens' below. */
.partner-page .version-tag, .trusted-page .version-tag { cursor: pointer; }
.partner-page .version-tag > .msym, .trusted-page .version-tag > .msym { display: block; }
.partner-page .version-tag .version-text, .trusted-page .version-tag .version-text { display: none; }
.partner-page .version-tag.open .version-text, .trusted-page .version-tag.open .version-text {
  display: block;
  position: absolute;
  z-index: 40;
  top: calc(100% + .6rem);
  left: 50%;
  transform: translateX(-50%);
  overflow: visible;
  padding: .4rem .65rem;
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-md);
}
.version-tag > .msym { display: none; width: 16px; height: 16px; }
.version-tag .version-text { overflow: hidden; text-overflow: ellipsis; }
footer.site {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .72rem;
}

/* Pilot console shell */
.dashboard-page .app-shell { padding: 0 0 2rem; }
.app-header {
  position: sticky;
  z-index: 30;
  top: 0;
  gap: 1rem;
  min-height: 60px;
  /* Full-bleed: the banner owns the whole screen width — buttons must never
     fall off an invisible horizontal scrollbar (2026-08-14). */
  margin-inline: calc(50% - 50vw);
  padding: .5rem 1rem;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}
.app-nav { display: flex; flex: 1; justify-content: center; gap: .2rem; }
.app-nav button {
  min-height: 40px;
  padding: .5rem .72rem;
  color: var(--muted);
  font-size: .78rem;
  white-space: nowrap;
}
.app-nav button .msym { width: 18px; height: 18px; }
.app-nav button.active { border-color: transparent; background: var(--accent-soft); color: var(--accent); }
.account-bar { display: flex; align-items: center; flex: none; gap: .25rem; }
#nav-settings-top { display: none; }
#nav-settings-top.active { background: var(--accent-soft); color: var(--accent); }
.account-bar .who { max-width: 150px; margin: 0 .25rem; overflow: hidden; color: var(--muted); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.connection { display: inline-flex; align-items: center; gap: .38rem; margin-right: .2rem; color: var(--muted); font-size: .7rem; }
.app-main { min-height: calc(100vh - 105px); padding-top: 1.5rem; }
.view-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .7rem;
}
.view-heading > div { min-width: 0; flex: 1; }
.view-heading .eyebrow { margin-bottom: .1rem; }
.view-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.view-heading > .primary { flex: none; min-height: 40px; padding-inline: .9rem; box-shadow: none; }

/* A plain on/off switch, for settings that read as a sentence rather than a form. */
.switch { display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; color: var(--muted); cursor: pointer; user-select: none; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch .track { position: relative; flex: none; width: 34px; height: 20px; border-radius: 999px; background: var(--line-strong); transition: background .15s; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--card); box-shadow: var(--shadow-sm); transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(14px); }
.switch input:checked ~ span { color: var(--fg); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Borderless and square (2026-08-24): the bar reads as part of the frame,
   not a floating card. */
.toolbar {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1rem;
  padding: .55rem;
  background: var(--card);
}
.toolbar input, .toolbar select, .toolbar .seg { border-color: transparent; background-color: var(--card-soft); }
.toolbar > .primary { flex: none; box-shadow: none; }

/* Surfaces, data, and statuses */
.card, .st-card, .tile {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.card { margin-bottom: 1rem; padding: 1.15rem 1.25rem; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.tile { padding: .85rem 1rem; }
.tile .n { font-family: var(--font-display); font-size: 1.75rem; font-weight: 650; }
.tile .l { color: var(--muted); font-size: .74rem; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: .9rem; }
.empty-state {
  display: grid;
  min-height: 290px;
  place-items: center;
  align-content: center;
  padding: 2.5rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 58%, transparent);
  text-align: center;
}
.empty-state .empty-icon { display: grid; width: 46px; height: 46px; place-items: center; margin-bottom: .8rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 1.35rem; }
.empty-state h3 { margin: 0; font-family: var(--font-display); font-size: 1.3rem; }
.empty-state p { max-width: 360px; margin: .35rem 0 1rem; color: var(--muted); font-size: .84rem; }
.st-card { padding: 1rem 1.05rem; }
.st-card:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: 0 12px 30px rgb(30 36 48 / .07); }
.st-card h3 { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin: 0 0 .25rem; font-family: var(--font-display); font-size: 1.12rem; }
.st-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .55rem;
  margin: .85rem 0;
  padding: .75rem;
  border-radius: 12px;
  background: var(--card-soft);
  font-size: .79rem;
}
.st-stats span { color: var(--muted); font-size: .68rem; }
.st-actions { display: flex; flex-wrap: wrap; gap: .32rem; margin-top: .75rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.st-actions button { width: 34px; min-height: 34px; padding: 0; border-radius: 9px; }
.st-actions .msym { width: 16px; height: 16px; }
.who[data-edit], .who[data-contact] { cursor: pointer; text-decoration: underline dotted; text-decoration-color: var(--subtle); text-underline-offset: 4px; }
.badge, .chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: .2rem .55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: .68rem;
  font-weight: 700;
  line-height: 1.25;
  text-transform: capitalize;
}
.badge.accepted { border-color: transparent; background: var(--ok-soft); color: var(--ok); }
.badge.declined { border-color: transparent; background: var(--danger-soft); color: var(--danger); }
.badge.pending { border-color: transparent; background: var(--warn-soft); color: var(--warn); }
.badge.stopped { border-color: transparent; background: var(--danger-soft); color: var(--danger); }
/* The stop on a storyteller's consent pane (PARTNERS.md §4.8): the reason, and the button that undoes it. */
.stopped-block { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: .6rem 0; padding: .6rem .8rem; border: 1px solid var(--danger); border-radius: 10px; color: var(--danger); }
.stopped-block span { flex: 1 1 14rem; }
.chip.user { border: 0; background: var(--user-bubble); }
.chip.agent { border: 0; background: var(--agent-bubble); }
.chip.third { border: 0; background: var(--third-bubble); }
.consent { display: inline-flex; }
.consent .msym { width: 19px; height: 19px; }
.consent.accepted, .status-in_progress { color: var(--ok); font-weight: 700; }
.consent.declined, .status-failed, .status-no_answer { color: var(--danger); }
.consent.pending { color: var(--warn); }
.status-voicemail { color: var(--muted); }
a.sched { color: var(--accent); font-weight: 650; text-decoration: none; cursor: pointer; }
a.sched:hover { text-decoration: underline; text-underline-offset: 3px; }
button.live { border-color: var(--ok); background: var(--ok); color: #fff; animation: live-pulse 1.8s ease-in-out infinite; }
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 50%, transparent); }
  50% { box-shadow: 0 0 0 .4rem transparent; }
}

/* Tables */
/* clip, not hidden: hidden makes this a scroll container and position:sticky
   inside it would pin to the box instead of the page (2026-08-24). */
.table-wrap { overflow: clip; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow-sm); }
/* separate, not collapse: collapsed borders stay behind when a sticky header
   row pins, leaving the header ghosting over the rows. */
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { padding: .75rem .7rem; border-bottom: 1px solid var(--line); text-align: left; font-size: .84rem; }
th { background: var(--card-soft); color: var(--muted); font-size: .68rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
tbody tr:last-child td { border-bottom: 0; }
/* The console is a fixed frame (2026-08-24): the page itself never scrolls.
   Each view is a column — heading, filters, page info and pagers hold —
   and only its content region scrolls. :not([hidden]) everywhere, because
   an author display would otherwise override the hidden attribute. */
body.dashboard-page { height: 100dvh; overflow: hidden; }
.dashboard-page .app-shell { display: flex; height: 100%; flex-direction: column; }
.dashboard-page .app-main { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; }
.app-main > div[id^="view-"]:not([hidden]) { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; }
/* The two calls panels only — a bare > div would catch the heading too and
   grow it, stranding the toolbar mid-page on an empty view. */
#calls-next:not([hidden]), #calls-past:not([hidden]) { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; }
/* Sized by content, capped by the frame: a full region scrolls, an empty
   one stays small so the filters sit at the top. */
.view-scroll,
#storytellers,
#unknown-list,
#log-entries,
#calls-past .table-wrap {
  flex: 0 1 auto;
  min-height: 0;
  overflow-y: auto;
}
/* Column headers pin to the top of whichever region scrolls them. */
.app-main thead th { position: sticky; top: 0; z-index: 5; }
tr.call-row { cursor: pointer; }
tr.call-row:hover { background: var(--card-soft); }
/* In a table the action buttons are a cell, not a card footer: no rule above
   them, no margin pushing them below the row (the "In progress" table drew
   a stray line under its header, 2026-09-04). */
.table-wrap td.st-actions { margin: 0; padding-top: .48rem; border-top: 0; }
#storytellers.table-wrap td.st-actions { min-width: 210px; }
/* The partner roster's list has one action: a plain cell, so the column's
   remainder is the row's, not the box behind it (found at 800 px, 2026-09-16). */
#roster.table-wrap td.st-actions { display: table-cell; white-space: nowrap; }

/* Tabs and segmented controls */
.tabs {
  display: flex;
  /* Never squeezed by the fixed-frame flex column: when a tab's content
     fills the scroll region, the bar must keep its own height (2026-09-02:
     the Models tab compressed it to 29px). */
  flex-shrink: 0;
  gap: .25rem;
  width: fit-content;
  margin: 1rem 0 1.2rem;
  padding: .25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card-soft);
}
.tabs button { min-height: 36px; padding: .4rem .85rem; border: 0; background: transparent; color: var(--muted); font-size: .78rem; }
.tabs button.active { background: var(--card); color: var(--fg); box-shadow: 0 1px 5px rgb(30 36 48 / .1); }
.tabs button .msym { width: 16px; height: 16px; }
.seg { display: inline-flex; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
/* The storyteller modal's consent rows (app/consent.py): one line per scope, its state, and one button. */
.consent-rows { display: flex; flex-direction: column; gap: .35rem; margin-top: .35rem; }
.consent-rows .consent-row { display: flex; align-items: center; gap: .6rem; min-height: 32px; }
.consent-rows .consent-row b { min-width: 4.2rem; }
.consent-rows .consent-row .state { flex: 1 1 auto; font-size: .9rem; color: var(--muted); }
.consent-rows .consent-row button { min-height: 30px; padding: .2rem .6rem; font-size: .85rem; }
.seg button { min-height: 38px; padding: .4rem .65rem; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: .95rem; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.active { background: var(--accent); color: var(--accent-fg); }
#edit-status button[data-status="accepted"] { color: var(--ok); }
#edit-status button[data-status="pending"] { color: var(--warn); }
#edit-status button[data-status="declined"] { color: var(--danger); }
#edit-status button.active { color: var(--accent-fg); }

/* The search box hosts the view switch — the pattern family_net uses
   (2026-08-24). */
/* The basis, not min-width, is what flex wrapping measures: it must stay
   small enough that the box plus the status icons hold one line on a
   320px phone (2026-08-24). */
.filter-box { position: relative; display: flex; flex: 1 1 6rem; min-width: 6rem; }
.filter-box input[type="search"] { flex: 1 1 auto; width: 100%; min-width: 0; padding-right: 4.6rem; }
.filter-box .mode-switch {
  position: absolute;
  top: 50%;
  right: .3rem;
  transform: translateY(-50%);
  gap: .2rem;
  overflow: visible;
  border: none;
  background: none;
}
.filter-box .mode-switch button { width: 30px; min-height: 30px; padding: 0; border-radius: 8px; color: var(--muted); }
/* Restated below the base rule: the two share specificity, so without this
   the active button kept the muted icon on the accent background. */
.filter-box .mode-switch button.active { background: var(--accent); color: var(--accent-fg); }
.filter-box .mode-switch button + button { border-left: none; }
.filter-box .mode-switch .msym { width: 17px; height: 17px; }
/* Only a filter box hosting the view switch reserves room for it. */
.filter-box:not(:has(.mode-switch)) input[type="search"] { padding-right: .8rem; }

/* The History storyteller picker: search on top, rows below. A modal NEVER
   resizes with its content (2026-08-24) — this one owns a fixed frame and
   the list scrolls inside it. */
#log-pick { gap: .5rem; }
#log-pick .meta { font-weight: 400; }
.modal.logpick { display: flex; width: min(480px, 100%); height: min(560px, 82vh); flex-direction: column; }
.logpick-list { flex: 1 1 auto; min-height: 0; margin-top: .6rem; overflow-y: auto; }
.logpick-row {
  display: flex;
  width: 100%;
  align-items: baseline;
  gap: .6rem;
  min-height: 44px;
  padding: .55rem .4rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}
.logpick-row:last-of-type { border-bottom: 0; }
.logpick-row .meta { flex: 1; }
.logpick-row .badge { flex: none; }

/* Status toggles: one icon per consent status, down means shown. Colors
   match the status badges; an icon that is up sits dimmed. */
.status-switch button { width: 38px; padding: 0; color: var(--muted); opacity: .45; }
.status-switch button.active { opacity: 1; background: var(--card); }
.status-switch button.active[data-status="accepted"] { color: var(--ok); }
.status-switch button.active[data-status="pending"] { color: var(--warn); }
.status-switch button.active[data-status="declined"] { color: var(--danger); }
.status-switch button.active[data-status="completed"] { color: var(--ok); }
.status-switch button.active[data-status="voicemail"] { color: var(--accent); }
.status-switch button.active[data-status="no_answer"] { color: var(--warn); }
.status-switch button.active[data-status="failed"] { color: var(--danger); }
.status-switch .msym { width: 18px; height: 18px; }

/* Messages, timeline, settings, providers */
.exchange { max-width: 82%; margin: .55rem 0; padding: .65rem .8rem; border-radius: 14px 14px 14px 4px; white-space: pre-wrap; font-size: .84rem; }
.exchange.user { background: var(--user-bubble); }
.exchange.user.third { background: var(--third-bubble); }
.exchange.agent { margin-left: auto; border-radius: 14px 14px 4px; background: var(--agent-bubble); }
.exchange .meta { margin-top: .2rem; font-size: .68rem; }
.exchange .turn-head { margin: 0 0 .2rem; font-variant-numeric: tabular-nums; }
.exchange .turn-head .safety-flag { margin-right: .35rem; }
/* Refused by the carrier: shown, but never as if it had arrived. */
.exchange.failed { background: var(--danger-soft); border: 1px dashed var(--danger); }
.exchange .undelivered { display: block; color: var(--danger); }
/* Section titles above list tables — one voice on every page. */
.list-title { margin: 0 0 .5rem; font-size: .95rem; }
/* Event-kind colours survive the move from timeline rows to table rows.
   The row classes are log-prefixed: a bare "consent" would collide with the
   consent icon styling above (display: inline-flex breaks the table row). */
.log-icon .msym { width: 16px; height: 16px; color: var(--muted); }
/* The audit trail reads best dense — many small facts scanned by date — so
   its rows are half the height of a data table's: measured 45 px, 67 px with
   the open-call button, before 2026-09-04; about 28 px after. */
#log-entries th, #log-entries td { padding: .28rem .55rem; font-size: .8rem; line-height: 1.3; }
#log-entries th { padding-top: .4rem; padding-bottom: .4rem; }
#log-entries td:first-child { width: 1.5rem; padding-right: 0; }
#log-entries td:nth-child(2) { color: var(--muted); font-variant-numeric: tabular-nums; }
#log-entries td b { font-weight: 650; }
#log-entries td:last-child { width: 2.2rem; padding-top: .1rem; padding-bottom: .1rem; text-align: right; }
#log-entries [data-log-call] { width: 26px; min-height: 26px; padding: 0; border-radius: 7px; }
#log-entries [data-log-call] .msym { width: 14px; height: 14px; }
#log-entries tr.log-safety .log-icon .msym { color: var(--warn); }
#log-entries tr.log-alert .log-icon .msym { color: var(--danger); }
tr.log-sms_failed .log-icon .msym { color: var(--danger); }
tr.log-consent .log-icon .msym { color: var(--ok); }
tr.log-erasure .log-icon .msym { color: var(--danger); }
/* Timestamps stay on one line; the text columns take the wrapping. */
td[data-label="When"], td[data-label="Since"], td[data-label="Received"],
td[data-label="Next call"] { white-space: nowrap; }
.set-section { margin: 1rem 0 .4rem; font-weight: 700; }
.set-row { display: flex; align-items: center; gap: .75rem; margin: .3rem 0; flex-wrap: wrap; }
.passkey-row { flex-wrap: nowrap; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .86rem; }
.passkey-row:last-of-type { border-bottom: 0; }
.passkey-row > .msym { width: 17px; height: 17px; color: var(--ok); }
.set-row label { flex: 1 1 16rem; font-size: .86rem; }
.set-row input, .set-row select { flex: 1 1 16rem; }
/* Settings rows for a TTS provider that is not selected. A class of its own:
   the `hidden` attribute belongs to the tab switcher. */
.set-row.prov-hidden { display: none; }

/* Every settings card reads best at a form's width, not the page's — and the
   whole tab sits centred, tabs bar included. */
#view-settings .card[data-tab] { max-width: 46rem; margin-inline: auto; }
/* Ten tabs with their labels run to 980 px, wider than the card: the strip keeps
   the card's width on one line by naming the current tab only — the others are
   their icons, the title saying which is which (operator, 2026-09-16). */
#settings-tabs { width: 100%; max-width: 46rem; margin-inline: auto; }
#settings-tabs button { flex: 1 1 auto; justify-content: center; }
#settings-tabs button:not(.active) span { display: none; }
#settings-tabs button:not(.active) { padding-inline: .6rem; }

/* One bordered box per provider (e.g. Models: Anthropic / ElevenLabs /
   Deepgram / Cartesia). */
.set-fieldset {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: .6rem 0;
  padding: .1rem .8rem .4rem;
  min-width: 0;
}
.set-fieldset legend {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .65;
  padding: 0 .35rem;
}

/* Measured call smoothness (Past calls) — thresholds calibrated on the
   2026-09-01 France uplink incident. */
.qdot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; vertical-align: baseline; }
.qdot.good { background: #22a06b; }
.qdot.fair { background: #e2a336; }
.qdot.poor { background: #d64545; }

/* Call button counting down before it dials — click again to cancel. */
button.arming { background: #e2a336; color: #fff; }

/* Compact sample players inside the hero's call card. */
.mini-player { display: flex; align-items: center; gap: .55rem; margin-top: .45rem; color: var(--muted); font-size: .74rem; }
.mini-play {
  flex: none;
  width: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 50%;
  font-size: .62rem;
}
.mini-label { flex: 1; }
.mini-time { font-variant-numeric: tabular-nums; }

/* Who dialed (Past calls, When column): ↗ we called, ↙ they called us. */
.dir { font-weight: 700; opacity: .55; }
.dir.in { color: #22a06b; opacity: 1; }
.set-row .meta { flex-basis: 100%; }
/* Health tab: one single-hue row per measure, one thin bar per day, a 2px
   surface gap between bars. Identity lives in the label, never in the hue;
   a "bad" row is a count that should be zero and wears the danger colour. */
.hrow { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr 4.5rem; align-items: center; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.hrow .hlabel { font-size: .8rem; }
.hrow .hsum { font-size: .86rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.hrow .bars { display: flex; align-items: flex-end; gap: 2px; height: 36px; }
.hrow .bars span { flex: 1 1 0; min-width: 2px; border-radius: 3px 3px 0 0; background: var(--accent); opacity: .8; }
.hrow .bars span:hover { opacity: 1; }
.hrow.bad .bars span { background: var(--danger); }
.hrow .bars span.none { height: 1px; border-radius: 0; background: var(--line); opacity: 1; }
.haxis { display: flex; justify-content: space-between; margin-top: .4rem; color: var(--muted); font-size: .68rem; }
.flagmark { cursor: help; }
/* The safety flags, in the modal and the lists: red for a medical emergency, orange
   for distress, purple for a third party, grey for the kinds that reach nobody
   during the call. */
.safety-flag { display: inline-block; cursor: help; vertical-align: -.2em; margin-right: .3rem; }
.safety-flag .msym { width: 1.1em; height: 1.1em; vertical-align: 0; }
.safety-flag.emergency { color: var(--danger); }
.safety-flag.distress { color: var(--warn); }
.safety-flag.third { color: var(--accent); }
.safety-flag.other { color: var(--muted); }
.flagmark .safety-flag { margin-right: 0; }
#d-flags { display: flex; gap: .1rem; flex: none; }
#d-flags .safety-flag { margin-right: 0; }
#d-flags .msym { width: 22px; height: 22px; }
.voices-note { margin: .5rem 0 0; font-style: italic; font-size: .72rem; }
/* A word of help on a measure, on hover or focus: what p99 is, why lag matters. */
.help { display: inline-grid; place-items: center; width: 1.05rem; height: 1.05rem; margin-left: .2rem; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); font-size: .66rem; font-weight: 700; line-height: 1; cursor: help; vertical-align: 1px; }
.help:hover, .help:focus { border-color: var(--accent); color: var(--accent); outline: none; }
/* The console's hover box (app.js): under its element, not under the pointer,
   and its text can be selected and copied. Above the modals and the confirm. */
#tip {
  position: fixed;
  z-index: 80;
  max-width: min(30rem, calc(100vw - 16px));
  padding: .5rem .7rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--fg);
  box-shadow: var(--shadow-md);
  font-size: .78rem;
  line-height: 1.45;
  white-space: pre-line;
  overflow-wrap: anywhere;
  user-select: text;
  cursor: text;
}
#view-health .view-scroll.loading .card, #view-health .view-scroll.loading .tiles { opacity: .45; transition: opacity .15s; }
.health-table { margin-top: .8rem; }
.health-table summary { cursor: pointer; }
.health-table table td, .health-table table th { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hfindings td.kind { white-space: nowrap; }
#view-health .tiles { margin-top: .4rem; }
.prov { display: flex; align-items: baseline; gap: .65rem; padding: .75rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.prov:last-child { border-bottom: 0; }
.prov .name { flex: 1 1 12rem; font-size: .86rem; }
.prov .head { font-size: .86rem; font-weight: 700; }
.prov .detail, .prov .action { color: var(--muted); font-size: .74rem; }
/* The detail shares its line with the alert switch; action and warn get their own. */
.prov .detail { flex: 1 1 24rem; }
.prov .action, .prov .warnline { flex-basis: 100%; }
.prov .warnline { color: var(--warn); }
.prov .action { color: var(--accent); }
.prov.error .head, .prov.unavailable .head { color: var(--muted); font-weight: 500; }
/* Per-vendor alert switch: right-aligned on its own line under the figures. */
.alert-switch { display: flex; align-items: center; gap: .45rem; margin-left: auto; cursor: pointer; white-space: nowrap; }
.alert-switch .label-short { display: none; }
.alert-switch input { position: absolute; opacity: 0; width: 0; height: 0; min-height: 0; }
.alert-switch .knob {
  position: relative;
  width: 32px;
  height: 18px;
  flex: none;
  border-radius: 9px;
  background: var(--line-strong);
  transition: background .16s ease;
}
.alert-switch .knob::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--card);
  transition: left .16s ease;
}
.alert-switch input:checked + .knob { background: var(--accent); }
.alert-switch input:checked + .knob::after { left: 16px; }
.alert-switch input:focus-visible + .knob { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); }

.gauge { flex-basis: 100%; height: 6px; overflow: hidden; border-radius: 6px; background: var(--card-soft); }
.gauge > span { display: block; height: 100%; border-radius: inherit; background: var(--ok); }
.gauge.warn > span { background: var(--danger); }

/* The partner page while an admin views it as one of its users (PARTNERS.md §4.10): said on every screen. */
.view-as-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  margin: 0 0 1rem;
  padding: .6rem .9rem;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 10%, var(--card));
  font-size: .88rem;
}
.view-as-bar span { flex: 1 1 16rem; }

/* Dialogs and notifications */
.banner {
  position: fixed;
  z-index: 70;
  top: 1rem;
  left: 50%;
  width: max-content;
  max-width: min(640px, 92vw);
  margin: 0;
  padding: .75rem 1rem;
  transform: translateX(-50%);
  border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--line));
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow-md);
  color: var(--danger);
  cursor: pointer;
  font-size: .84rem;
}
.banner:empty { display: none; }
.banner.success { border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); color: var(--ok); }
.form-error { margin: 0; padding: .6rem .7rem; border: 1px solid var(--danger); border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: .82rem; }
.modal-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* The confirm dialog stacks ON other modals (e.g. "stop the recording?"
   over the call modal), and DOM order alone would paint it underneath. */
#confirm-backdrop {
  z-index: 60;
  padding: 1rem;
  background: rgb(11 13 18 / .55);
  backdrop-filter: blur(7px);
}
.modal {
  width: min(720px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-md);
  animation: modal-in .18s ease-out;
}
.modal h3 { font-family: var(--font-display); }
.modal h3 small { font-family: var(--font-sans); font-size: .72em; font-weight: 400; color: var(--muted); }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.modal.sms { display: flex; flex-direction: column; height: min(72vh, 600px); overflow: hidden; }
.modal.sms #sms-thread { flex: 1; overflow-y: auto; margin: .7rem 0; }
.modal.call { display: flex; flex-direction: column; height: min(82vh, 680px); overflow: hidden; }
.modal.call #d-exchanges, .modal.call #pt-exchanges { flex: 1; overflow-y: auto; padding-right: .25rem; }
.modal.story { display: flex; flex-direction: column; width: min(800px, 100%); height: min(88vh, 900px); overflow: hidden; }
/* Fixed frames (the rule: a modal never changes size with its content — one
   scrolling region inside, header and buttons outside it). */
.modal.memory { display: flex; flex-direction: column; width: min(800px, 100%); height: min(88vh, 760px); overflow: hidden; }
.modal.memory .scroll { flex: 1; overflow-y: auto; margin-top: .5rem; padding-right: .25rem; }
.modal.storyteller { display: flex; flex-direction: column; box-sizing: border-box; width: min(600px, 100%); height: min(88vh, 680px); overflow: hidden; padding: 1rem 1.1rem; }
.modal.storyteller form { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: .6rem; }
.modal.storyteller .panes { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-right: .25rem; }
.modal.storyteller .pane { display: flex; flex-direction: column; gap: .55rem; }
.modal.storyteller .pane[hidden] { display: none; }
/* The modal's labels and rows are flex boxes, which would override the
   hidden attribute the add/edit mode sets on what belongs to the other. */
.modal.storyteller [hidden] { display: none !important; }
.modal.storyteller .pane[data-pane="links"] button { width: 100%; text-align: left; justify-content: flex-start; }
.modal.storyteller .actions { display: flex; gap: .5rem; justify-content: flex-end; padding-top: .6rem; }
.modal.storyteller label { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; color: var(--muted); }
.modal.storyteller label .value { font-size: .95rem; color: var(--fg); min-height: 38px; display: flex; align-items: center; }
/* The phone and the language sit on one line, each label beside its value (operator, 2026-09-15). */
.modal.storyteller label.inline { flex-direction: row; align-items: center; gap: .5rem; }
.modal.storyteller .row.compact { display: flex; flex-wrap: wrap; gap: .6rem .8rem; align-items: flex-end; }
.modal.storyteller .row.compact .grow { flex: 1 1 160px; min-width: 0; }
.modal.storyteller .pick { display: flex; gap: .4rem; }
.modal.storyteller .pick select, .modal.storyteller .pick input { flex: 1; min-width: 0; }
.modal.storyteller .pick .voice-preview { width: 42px; flex: none; }
.modal.storyteller .phone-field select { flex: none; width: auto; }
.modal.storyteller .phone-field input { flex: 0 1 9.5rem; }
.modal.storyteller select, .modal.storyteller input[type="datetime-local"] { width: 100%; }
.modal.storyteller .seg { width: max-content; }
/* A fieldset refuses to shrink below its content unless told to: without
   this the person cards overflow a phone and the pane scrolls sideways. */
fieldset.person { min-width: 0; }
fieldset.person .row input { width: 0; }
/* The console's .switch (the history toggle), inside a modal whose labels
   stack their caption above the field: back to one row, caption beside it. */
.modal.storyteller label.switch, fieldset.person label.switch { flex-direction: row; align-items: center; min-height: 32px; font-size: .84rem; color: var(--fg); }
@media (max-width: 520px) {
  .modal.storyteller { height: 100dvh; max-height: 100dvh; width: 100%; border-radius: 0; }
  .modal.memory { height: 100dvh; max-height: 100dvh; border-radius: 0; }
}
fieldset.person { margin: 0; padding: .5rem .7rem .6rem; border: 1px solid var(--line); border-radius: 8px; display: flex; flex-direction: column; gap: .4rem; }
fieldset.person legend { font-size: .78rem; color: var(--muted); padding: 0 .3rem; }
fieldset.person .row { display: flex; gap: .4rem; }
fieldset.person .row input { flex: 1; min-width: 0; }
fieldset.storyteller { margin: 0; padding: .6rem .8rem .8rem; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; gap: .6rem; }
fieldset.storyteller > legend { font-family: var(--font-display); font-weight: 650; padding: 0 .3rem; }
.record h4 { margin: .9rem 0 .25rem; font-size: .85rem; }
.record ul { margin: .2rem 0; padding-left: 1.2rem; }
.record .briefing { margin: .4rem 0 0; padding: .6rem .8rem; border-radius: 7px; background: var(--agent-bubble); white-space: pre-wrap; font-size: .78rem; line-height: 1.5; }
.record textarea { width: 100%; min-height: 4.2rem; margin: .2rem 0 .6rem; font: inherit; font-size: .84rem; }
.record label.rm { display: block; font-size: .84rem; }
.record label.rm input { margin-right: .4rem; }
.wellbeing { width: 100%; border-collapse: collapse; font-size: .8rem; }
.wellbeing th, .wellbeing td { padding: .25rem .4rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.wellbeing td.dot { text-align: center; }
.wellbeing td.dot span { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: var(--accent, #7a5af8); cursor: help; }
.wellbeing td.concern { color: var(--danger, #c0392b); font-weight: 600; text-align: center; }
.modal.story #story-body { flex: 1; overflow-y: auto; margin-top: .8rem; }
.story-tools { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .65rem; }
.story-tools audio { flex: 1 1 14rem; height: 2rem; }
/* Named voices, up to eight: the segment wraps on a phone instead of clipping the last names (2026-09-08). */
#story-voice { flex-wrap: wrap; max-width: 100%; }
#story-voice button { flex: 0 0 auto; }
.modal.stcalls, .modal.memory { display: flex; flex-direction: column; width: min(600px, 100%); height: min(64vh, 500px); overflow: hidden; }
.modal.stcalls #stcalls-list, .modal.memory #memory-body { flex: 1; overflow-y: auto; margin-top: .7rem; }
.past-call {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: .65rem;
  width: 100%;
  margin-bottom: .4rem;
  padding: .65rem .7rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card);
  text-align: left;
  font-size: .82rem;
}
.past-call:hover { border-color: var(--accent); }
.past-call .when { color: var(--muted); white-space: nowrap; }
.past-call .whom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.past-call > .meta { white-space: nowrap; }
.md { font-size: .86rem; line-height: 1.65; word-break: break-word; }
.md > :first-child { margin-top: 0; }
.md h3, .md h4, .md h5, .md h6 { margin: 1rem 0 .3rem; font-size: .9rem; }
.md p { margin: .5rem 0; }
.md ul, .md ol { margin: .4rem 0; padding-left: 1.35rem; }
.md code, .md pre { border-radius: 7px; background: var(--agent-bubble); }
.md code { padding: .1rem .3rem; font-size: .9em; }
.md pre { overflow-x: auto; padding: .65rem .75rem; }
.md pre code { padding: 0; background: none; }
.md blockquote { margin: .5rem 0; padding-left: .8rem; border-left: 3px solid var(--line); color: var(--muted); }
.md hr { margin: .8rem 0; border: 0; border-top: 1px solid var(--line); }

/* Public welcome page */
.welcome-page { background: var(--bg-elevated); }
.welcome-shell { width: min(100% - 2.5rem, 1180px); }
.welcome-header { justify-content: space-between; min-height: 82px; border-bottom: 1px solid var(--line); }
.header-actions { display: flex; align-items: center; gap: .4rem; }
.welcome-header #theme-btn { width: 40px; min-height: 40px; padding: 0; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, .96fr);
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  min-height: 650px;
  padding: 5rem 0 6rem;
}
.hero-copy h1 {
  max-width: 720px;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 6vw, 5.9rem);
  font-weight: 500;
  letter-spacing: -.065em;
  line-height: .96;
}
.hero .lede { max-width: 610px; margin: 1.5rem 0 0; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.18rem); line-height: 1.7; }
.hero-actions { display: flex; align-items: center; gap: 1rem 1.25rem; margin-top: 2rem; flex-wrap: wrap; }
.hero-cta { min-height: 50px; padding-inline: 1.2rem; }
.hero-cta span { display: inline-block; transition: transform .16s ease; }
.hero-cta:hover span { transform: translateX(3px); }
.hero-note { color: var(--muted); font-size: .78rem; }
/* The partner page's way in for those already invited: a line of its own under the button. */
.hero-signin { flex-basis: 100%; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
/* The application-sent confirmation under the hero button: unmissable. */
#apply-done { color: var(--ok); font-weight: 650; }
/* Normal flow: the memoir card FOLLOWS the call card — whatever the card
   grows to hold (sample players included), nothing can cover it. */
.story-visual { position: relative; display: flex; flex-direction: column; align-items: flex-end; isolation: isolate; }
.visual-glow { position: absolute; z-index: -1; inset: 8% 0 0 8%; border-radius: 50%; background: color-mix(in srgb, var(--accent) 18%, transparent); filter: blur(60px); }
.call-card {
  position: relative;
  z-index: 2;
  margin-top: 1.5rem;
  margin-right: 4%;
  width: min(100%, 410px);
  /* Extra bottom padding: the blank strip the memoir card straddles. */
  padding: 1.2rem 1.4rem 1.8rem;
  transform: rotate(2deg);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 26px;
  background: var(--card);
  box-shadow: 0 30px 70px rgb(58 53 111 / .16);
}
.call-card-top { display: flex; align-items: center; gap: .7rem; }
.call-card-top > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; }
.call-card-top small { color: var(--muted); }
.avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-family: var(--font-display); font-size: 1.25rem; }
.call-card blockquote { margin: .8rem 0; font-family: var(--font-display); font-size: 1.2rem; line-height: 1.4; }
.call-status { display: flex; align-items: center; gap: .55rem; color: var(--muted); font-size: .76rem; }
.sound-wave { display: flex; align-items: center; gap: 3px; height: 24px; }
.sound-wave i { display: block; width: 3px; height: 30%; border-radius: 9px; background: var(--accent); }
.sound-wave i:nth-child(2), .sound-wave i:nth-child(4) { height: 70%; }
.sound-wave i:nth-child(3) { height: 100%; }
.memoir-card {
  position: relative;
  z-index: 3;
  align-self: flex-start;
  margin: -.9rem 0 0 2%;
  display: flex;
  width: min(85%, 330px);
  flex-direction: column;
  gap: .25rem;
  padding: 1.2rem 1.25rem;
  transform: rotate(-3deg);
  border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line));
  border-radius: 18px;
  background: color-mix(in srgb, var(--warn-soft) 55%, var(--card));
  box-shadow: var(--shadow-md);
}
.memoir-label { color: var(--warn); font-size: .62rem; font-weight: 800; letter-spacing: .12em; }
.memoir-card strong { font-family: var(--font-display); font-size: 1.2rem; }
.memoir-card > span:last-child { color: var(--muted); font-size: .72rem; }
.section-intro { margin: 1rem 0 2rem; text-align: center; }
/* A section-intro worth framing: same card language as the steps. */
.section-intro.boxed {
  padding: 2.2rem 2rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.section-intro h2 { margin: 0; font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3.3rem); font-weight: 500; letter-spacing: -.045em; line-height: 1.08; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; }
.step { position: relative; min-height: 240px; padding: 1.5rem; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--card); box-shadow: var(--shadow-sm); }
.step-number { display: block; margin-bottom: 3rem; color: var(--accent); font-size: .7rem; font-weight: 800; letter-spacing: .12em; }
.step b { display: block; font-family: var(--font-display); font-size: 1.35rem; }
.step p { margin: .65rem 0 0; color: var(--muted); font-size: .85rem; line-height: 1.6; }
.promises { display: grid; grid-template-columns: repeat(4, 1fr); margin: 2.5rem 0 4rem; padding: 1.2rem 0; border-block: 1px solid var(--line); }
.promises span { padding: .2rem 1rem; border-right: 1px solid var(--line); color: var(--muted); font-size: .75rem; text-align: center; }
.promises span::before { margin-right: .4rem; color: var(--ok); content: "✓"; font-weight: 800; }
.promises span:last-child { border-right: 0; }
.login { display: flex; max-width: 24rem; margin: .8rem auto 0; flex-direction: column; gap: .65rem; }
.login input { width: 100%; }

/* Responsive behavior */
@media (max-width: 1400px) {
  /* Seven labelled buttons, the brand and the account bar ran 92 px past a
     1280 px screen (the browser suite, 2026-09-16): the signed-in address
     and the word "Online" go first, the dot and the buttons stay. */
  .account-bar .who, .connection-label { display: none; }
}
@media (max-width: 1220px) {
  /* The nav buttons no longer fit beside the brand — eight labelled ones,
     the brand and the account bar need 1,208 px (measured 2026-09-16; the
     account bar was cut off between 1,100 and 1,208): the nav becomes a
     full-width bottom banner, and the top banner — brand and account —
     stays sticky and present at every width (2026-08-14). */
  .dashboard-page .app-shell { padding-bottom: 6rem; }
  /* backdrop-filter makes an ancestor the containing block for fixed
     children — with it on, the "bottom" nav pinned inside the header
     (2026-08-14). Solid background replaces the blur. */
  .app-header { min-height: 58px; background: var(--bg-elevated); backdrop-filter: none; }
  .account-bar { margin-left: auto; }
  /* The build stamp shrinks to an info icon; a tap reveals it in a bubble. */
  .version-tag { cursor: pointer; }
  .version-tag > .msym { display: block; }
  .version-tag .version-text { display: none; }
  .version-tag.open .version-text {
    display: block;
    position: absolute;
    z-index: 40;
    top: calc(100% + .6rem);
    left: 50%;
    transform: translateX(-50%);
    overflow: visible;
    padding: .4rem .65rem;
    border: 1px solid var(--line);
    border-radius: .55rem;
    background: var(--bg-elevated);
    box-shadow: var(--shadow-md);
  }
  .app-nav {
    position: fixed;
    z-index: 35;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    /* One column per button, however many exist — a hard-coded count broke
       the day a sixth button arrived (2026-08-14). */
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    width: auto;
    padding: .35rem .35rem max(.35rem, env(safe-area-inset-bottom));
    overflow: visible;
    border: 0;
    border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(18px);
  }
  /* Seven pages across a phone: small labels that never spill into the
     next one; Settings moves to the top right (2026-09-10). */
  .app-nav button { flex-direction: column; gap: .1rem; min-width: 0; min-height: 46px; padding: .3rem .05rem; font-size: .47rem; letter-spacing: -.01em; }
  .app-nav button span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  /* A word too long for its slot shows its short form on a phone. */
  .app-nav button span[data-short] { font-size: 0; }
  .app-nav button span[data-short]::after { content: attr(data-short); font-size: .47rem; }
  .app-nav button .msym { width: 17px; height: 17px; }
  .app-nav #nav-settings { display: none; }
  #nav-settings-top { display: inline-flex; }
}

@media (max-width: 1000px) {
  .hero { gap: 2rem; }
}

@media (max-width: 760px) {
  .wrap, .welcome-shell { width: min(100% - 1.2rem, 1180px); }
  .alert-switch .label-full { display: none; }
  .alert-switch .label-short { display: inline; }
  /* Flush to the top edge: any shell padding shows as a strip above the
     sticky header (2026-08-24). */
  .dashboard-page .app-shell { padding-top: 0; }
  .app-header { padding: .55rem .8rem; }
  /* The settings tabs shrink to their icons; the title says which is which. */
  .tabs button span { display: none; }
  .tabs button { padding: .4rem .6rem; }
  .app-header .brand img { width: 32px; height: 32px; }
  .app-header .brand-copy small, .connection-label, .account-bar .who { display: none; }
  .app-main { padding-top: 1.15rem; }
  .view-heading { align-items: center; gap: .55rem; margin-bottom: .6rem; }
  .view-heading .eyebrow { font-size: .62rem; }
  .view-heading p:not(.eyebrow) { font-size: .73rem; }
  .view-heading > .primary { padding-inline: .7rem; white-space: nowrap; }
  .view-heading.split { align-items: stretch; flex-direction: column; }
  .toolbar { align-items: stretch; flex-wrap: wrap; }
  .toolbar input { flex-basis: calc(100% - 92px) !important; }
  .toolbar select { flex: 1; }
  .st-grid { grid-template-columns: 1fr; }
  .st-stats { grid-template-columns: repeat(2, 1fr); }
  /* Scrollable when cramped, but no visible scrollbar riding in the pill. */
  .tabs, #settings-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  /* Narrow screens scroll like phones: the classic scrollbar would inset the
     scroll region and misalign it with the tabs bar above it. */
  .view-scroll, #storytellers, #unknown-list, #log-entries, #calls-past .table-wrap { scrollbar-width: none; }
  .view-scroll::-webkit-scrollbar, #storytellers::-webkit-scrollbar, #unknown-list::-webkit-scrollbar,
  #log-entries::-webkit-scrollbar, #calls-past .table-wrap::-webkit-scrollbar { display: none; }
  .table-wrap { overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { display: none; }
  .table-wrap tr { margin: .65rem 0; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: 13px; background: var(--card); box-shadow: var(--shadow-sm); }
  .table-wrap td { display: flex; align-items: baseline; gap: .5rem; padding: .2rem 0; border: 0; }
  /* Stacked cells take the full width; the dense-log column widths would squeeze them. */
  #log-entries td:first-child, #log-entries td:last-child { width: auto; text-align: left; }
  .table-wrap td[data-label]::before { min-width: 6.5rem; flex: none; color: var(--muted); content: attr(data-label); font-size: .68rem; }
  /* A long address in a stacked cell breaks rather than pushing the card past the screen (measured at 360 px, 2026-09-15). */
  .table-wrap td[data-label] .meta { min-width: 0; overflow-wrap: anywhere; }
  .table-wrap td:empty { display: none; }
  .table-wrap td.st-actions { min-width: 0; margin-top: .45rem; padding-top: .6rem; border-top: 1px solid var(--line); }
  .modal { padding: 1rem; border-radius: 18px; }
  .hero { grid-template-columns: 1fr; gap: 1rem; min-height: 0; padding: 4rem 0 3rem; }
  .hero-copy h1 { font-size: clamp(3rem, 14vw, 4.8rem); }
  .story-visual { width: min(100%, 500px); margin: 0 auto; }
  /* Narrow screens: the straddle gets cramped — sit just below the card. */
  .memoir-card { margin-top: -.5rem; }
  .steps { grid-template-columns: 1fr; }
  .step { min-height: 0; }
  .step-number { margin-bottom: 2rem; }
  .promises { grid-template-columns: 1fr 1fr; }
  .promises span:nth-child(2) { border-right: 0; }
  .promises span { padding: .6rem; }
}

/* A box with a fixed ending written after it: the local part of an address, its domain given. */
.affixed { display: flex; align-items: center; gap: .35rem; min-width: 0; }
.affixed input { flex: 1; min-width: 0; }
.affixed .affix { flex: none; max-width: 55%; overflow: hidden; color: var(--muted); font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 400px) {
  /* The header's five buttons ran 20 px past a 360 px screen (measured 2026-09-15). */
  .account-bar { gap: 0; }
  .account-bar .icon-button { width: 36px; }
  .account-bar .time-button { width: 3rem; }
  /* The toolbar's filter box takes a line of its own; the switches follow on the next
     (the partner's third segment left it 132 px wide at 360, measured 2026-09-15). */
  .toolbar { flex-wrap: wrap; }
  .toolbar .filter-box { flex-basis: 100%; }
}
@media (max-width: 520px) {
  .welcome-header .brand-copy small { display: none; }
  .welcome-header #theme-btn { display: none; }
  /* The audience toggle stays on the brand's line: the logo alone stands for
     the brand, the labels lose their "For" (operator, 2026-09-15). */
  .welcome-header .brand-copy { display: none; }
  .audience a { padding-inline: .55rem; }
  .audience .label-full { display: none; }
  .audience .label-short { display: inline; }
  .hero { padding-top: 3.25rem; }
  .story-visual { min-height: 370px; }
  .call-card { right: 0; padding: 1.2rem; }
  .call-card blockquote { font-size: 1.15rem; }
  .memoir-card { right: 6%; }
  .past-call { grid-template-columns: 1fr auto; }
  .past-call .whom { grid-column: 1 / -1; }
  /* One clean checklist: the container keeps its top and bottom rules,
     the items lose theirs and line up as a centred left-aligned column. */
  .promises { grid-template-columns: 1fr; justify-items: start; width: fit-content; gap: .55rem; margin-inline: auto; padding: 1rem 1.5rem; }
  .promises span { padding: 0; border: 0; text-align: left; }
  .phone-field { display: flex !important; flex-basis: 100%; }
  .phone-field input { min-width: 7rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.discussion-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: .5rem; }
.discussion-table { overflow-x: auto; }
.discussion-evidence { padding: .1rem .3rem; }
/* One block per dimension, a rule and air between them: the grade line, the
   reasoning, then the folded anchors. */
.discussion-ratings dt { text-transform: capitalize; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.discussion-ratings dt:first-child { margin-top: .4rem; padding-top: 0; border-top: 0; }
.discussion-ratings dd { margin: .35rem 0 .2rem; }

/* The assessment window: a fixed frame over the call modal, tabs, one scroll region. */
#assess-backdrop { z-index: 55; }
.modal.assessment { display: flex; flex-direction: column; width: min(880px, 100%); height: min(88vh, 780px); overflow: hidden; }
.modal.assessment .tabs { margin: .7rem 0 .6rem; }
.modal.assessment #a-body { flex: 1; min-height: 0; overflow-y: auto; padding-right: .25rem; }
.modal.assessment h4 { margin: 1rem 0 .35rem; }
.modal.assessment .tabs button .msym { width: 18px; height: 18px; margin-right: .35rem; vertical-align: -4px; }
/* On a small screen the tabs are icons; this line names the open one. */
.a-tab-name { display: none; margin: 0 0 .5rem; font-weight: 600; }
.discussion-anchors { margin-top: .35rem; }
.discussion-anchors summary { cursor: pointer; font-size: .78rem; color: var(--muted); }
.discussion-anchors p { margin: .3rem 0 0; }
/* A grade badge: the number carries the value, the tint says low, middle or high. */
.grade { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-weight: 700; font-variant-numeric: tabular-nums; }
.grade-low { background: var(--danger-soft); color: var(--danger); }
.grade-mid { background: var(--warn-soft); color: var(--warn); }
.grade-high { background: var(--ok-soft); color: var(--ok); }
.grade-none { background: var(--card-soft); color: var(--muted); font-weight: 500; }
.modal.assessment h4 + .meta { margin-top: 0; }

/* Charts: plain HTML marks. Thin bars, 4px rounded data-ends, a 2px surface gap
   between stacked segments, text in text tokens, hairline ticks. */
.viz-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }
.viz-tile { min-width: 0; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card-soft); }
.viz-tile-label { font-size: .68rem; color: var(--muted); }
.viz-tile-value { margin: .1rem 0; font-size: 1.15rem; font-weight: 600; overflow-wrap: anywhere; }
.viz-tile-note { font-size: .7rem; color: var(--muted); }
.viz-chart { display: flex; flex-direction: column; gap: .45rem; }
.viz-row { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr minmax(7rem, 14rem); gap: .6rem; align-items: center; font-size: .82rem; }
.viz-label { color: var(--fg); }
.viz-value { color: var(--fg); font-variant-numeric: tabular-nums; }
/* A 6px margin keeps an end mark or the last dot inside the column. */
.viz-track { position: relative; height: 14px; margin-right: 6px; border-radius: 4px; background: var(--card-soft); }
.viz-scale { background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(20% - 1px), var(--line) calc(20% - 1px), var(--line) 20%); }
.viz-fill { position: absolute; inset: 0 auto 0 0; border-radius: 0 4px 4px 0; background: var(--accent); }
.viz-fill:hover, .viz-segment:hover { filter: brightness(1.1); }
.viz-mark { position: absolute; top: 50%; width: 10px; height: 10px; border: 2px solid var(--fg); border-radius: 50%; background: var(--card); box-shadow: 0 0 0 2px var(--card); transform: translate(-50%, -50%); }
.viz-stack { display: flex; gap: 2px; height: 14px; margin-right: 6px; }
.viz-segment { min-width: 3px; border-radius: 2px; }
.viz-segment:first-child { border-radius: 4px 2px 2px 4px; }
.viz-segment:last-child { border-radius: 2px 4px 4px 2px; }
.viz-c1 { background: var(--viz-1); }
.viz-c2 { background: var(--viz-2); }
.viz-c3 { background: var(--viz-3); }
.viz-c4 { background: var(--viz-4); }
.viz-c5 { background: var(--viz-5); }
.viz-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .2rem; font-size: .72rem; color: var(--muted); }
.viz-swatch { display: inline-block; width: 10px; height: 10px; margin-right: .35rem; border-radius: 2px; vertical-align: -1px; }
.viz-swatch-fill { background: var(--accent); }
.viz-swatch-mark { box-sizing: border-box; border: 2px solid var(--fg); border-radius: 50%; background: var(--card); }
.viz-strip { position: relative; height: 30px; margin: .2rem 6px .9rem 0; border-bottom: 1px solid var(--line); }
.viz-strip-empty { display: flex; align-items: center; border: 0; margin: 0; }
.viz-dot { position: absolute; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--card); transform: translateX(-50%); opacity: .85; }
.viz-rule { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--fg); opacity: .7; transform: translateX(-50%); }
.viz-strip-zero { position: absolute; bottom: 0; width: 1px; height: 10px; background: var(--line-strong); }
.viz-strip-min, .viz-strip-max { position: absolute; top: 100%; margin-top: 2px; font-size: .66rem; color: var(--subtle); }
.viz-strip-min { left: 0; }
.viz-strip-max { right: 0; }
/* The Assessments page: small multiples per dimension, then the radars. */
.as-group { margin-bottom: 1.4rem; }
.as-group h3 { margin: .2rem 0 .5rem; font-size: 1rem; }
.as-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .8rem; }
.as-figure, .as-radar { margin: 0; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.as-figure figcaption, .as-radar figcaption { margin-bottom: .3rem; font-size: .78rem; color: var(--muted); }
.as-figure svg, .as-radar svg { display: block; width: 100%; height: auto; }
.as-radar svg { max-width: 520px; margin: 0 auto; }
.as-radars { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: .8rem; }
.toolbar .tabs { margin: 0; }
.as-chosen { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: .6rem 0 .2rem; }
#as-compare { margin-bottom: 1.4rem; }
/* Dozens of calls: three columns of compact rows, one column on a phone. */
.callspick-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .1rem .8rem; align-content: start; margin-top: .6rem; }
.callspick-row { display: flex; align-items: center; gap: .4rem; min-width: 0; padding: .3rem .2rem; font-size: .82rem; line-height: 1.2; }
.callspick-row input { flex: none; width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; }
.callspick-row { flex-wrap: wrap; column-gap: .4rem; row-gap: 0; }
.callspick-row b { white-space: nowrap; }
.callspick-row .meta { flex-basis: 100%; padding-left: 1.4rem; font-size: .68rem; white-space: nowrap; }
@media (max-width: 520px) { .callspick-list { grid-template-columns: 1fr; } }
.as-grid-line, .as-ring, .as-spoke { fill: none; stroke: var(--line); stroke-width: 1; }
.as-axis-text { fill: var(--subtle); font-size: 10px; }
.as-spoke-text { fill: var(--fg); font-size: 11px; }
.as-empty { fill: var(--muted); font-size: 11px; }
.as-label { fill: var(--fg); font-size: 11px; font-weight: 600; }
.as-line { stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }
.as-line-gap { opacity: .3; }
.as-dot { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.as-edge { stroke-width: 2; stroke-linecap: round; fill: none; }
.as-area { fill-opacity: .1; stroke: none; }
.as-mark { stroke: var(--card); stroke-width: 2; }
.as-series-1 { stroke: var(--viz-1); fill: var(--viz-1); }
.as-series-2 { stroke: var(--viz-2); fill: var(--viz-2); }
.as-series-3 { stroke: var(--viz-3); fill: var(--viz-3); }
.as-series-4 { stroke: var(--viz-4); fill: var(--viz-4); }
.as-edge.as-series-1, .as-edge.as-series-2, .as-edge.as-series-3, .as-edge.as-series-4 { fill: none; }

@media (max-width: 760px) {
  .modal.assessment .tabs button .msym { margin-right: 0; }
  .a-tab-name { display: block; }
}
@media (max-width: 520px) {
  .modal.assessment { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .viz-row { grid-template-columns: 1fr; gap: .2rem; }
}

/* The trusted person's page (PARTNERS.md §4.9): one card per storyteller, the console's shapes. */
.trusted-main { max-width: 46rem; margin: 0 auto; width: 100%; }
/* No nav between the brand and the account bar: the bar keeps the right edge. */
.trusted-page .account-bar { margin-left: auto; }
.trusted-page #btn-settings.active, .trusted-page #nav-storytellers.active { background: var(--accent-soft); color: var(--accent); }
.trusted-page .card-head { display: flex; align-items: flex-start; gap: .5rem; }
.trusted-page .card-head h2 { flex: 1 1 auto; min-width: 0; }
.trusted-page .card-actions { display: inline-flex; flex: none; gap: .15rem; }
.trusted-page .picker { margin: 0 0 1rem; }
.trusted-page .picker select { flex: 1 1 12rem; }
.trusted-page .lede { color: var(--muted); line-height: 1.6; margin: 0 0 1rem; }
.trusted-page .card h2 { font-size: 1.1rem; margin: 0 0 .6rem; }
.trusted-page .scopes { margin: 0 0 .6rem; padding-left: 1.1rem; line-height: 1.5; }
.trusted-page .invite { margin: .6rem 0; }
.trusted-page pre.invitation { white-space: pre-wrap; overflow-wrap: anywhere; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--accent) 6%, var(--card)); font: inherit; }
.trusted-page details { margin: .6rem 0; }
.trusted-page details summary { cursor: pointer; }
.trusted-page table.calls { width: 100%; border-collapse: collapse; font-size: .88rem; }
.trusted-page table.calls th, .trusted-page table.calls td { text-align: left; padding: .3rem .5rem; border-bottom: 1px solid var(--line); }
.trusted-page fieldset.person.readonly { border-style: dashed; }
.trusted-page form.digest, .trusted-page .memoir-row { margin-top: 1.1rem; }
.trusted-page .pick, [data-spane="card"] .pick { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.trusted-page .card.account { margin-top: 1.5rem; }
.modal.memoir { display: flex; flex-direction: column; max-height: min(85vh, 900px); }
.modal.memoir .memoir-text { overflow: auto; min-height: 0; line-height: 1.65; padding-right: .3rem; }

/* The staff card on the partner console (PARTNERS.md §4.8): a short portrait, read like a letter. */
.staff-card { max-width: 40rem; line-height: 1.6; }
.staff-card p { margin: .5rem 0; }
