/* Hallmark · shape: app screen · genre: modern-minimal · theme: custom (unslop direction: a dispatcher's desk, steady and plainspoken) · redesign: full
 * nav: sidebar on warm grey paper, content in a white bordered panel · signature: the approval stamp, a double-ruled mono mark in stamp ink on approved and sent drafts
 * states: loading, empty, error, full · axes: light/humanist-sans + serif titles/warm graphite · surface: absolute · posture: dense · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: H, the app is dense; serif page titles and tabular figures carry hierarchy so weights can stay at 400 to 500 */
/* Hallmark · app adaptation · Flow's layout; Instrument Sans body, serif page titles (since removed), Geist Mono for counts and meta; one stamp-ink accent for the chart, rates, stamp, links and focus */
/* Hallmark · answered F4 · search, save, campaign and draft actions share one primary recipe; the running-campaign control is a distinct warm outline */
/* Hallmark · reworded "Overview" to "Dashboard" and "People" to "Search" · user asked for Flow's navigation vocabulary */
/* Hallmark · finish review: user is the judge for every screen, side by side with the live Flow app */
/* Hallmark · waive 39b · .overview-card and .stat are buttons with a label and a figure · each tile opens or filters its queue, so the figure needs the height */
/* Hallmark · waive 7b · white content panel and cards on a #f5f5f5 frame · the user's Dub reference puts every working surface on plain white held by hairline borders */
/* Hallmark · dismissed F7 · cards, tables and inputs share one hairline recipe on purpose; Dub's border-first system is uniform and the user asked for it */
/* Hallmark · dismissed F6 · .stat-label holds status labels, not numerals; the figures in .stat-value are tabular */
@import url("./tokens.css");
@import url("./base.css");

html, body { overflow-x: clip; }
body { min-height: 100dvh; background: var(--color-frame); color: var(--color-ink); font-size: var(--text-md); line-height: 1.5; font-synthesis: none; }
/* the serif is for page titles only; every other heading is the interface face */
h2, h3 { font-family: var(--font-body); font-weight: 500; }
h2 { font-size: var(--text-heading); line-height: 1.2; max-width: none; letter-spacing: 0; }
h3 { font-size: var(--text-lg); line-height: 1.3; max-width: none; letter-spacing: normal; font-weight: 500; }
p { max-width: 75ch; }
strong, b { font-weight: 600; }
button, input, textarea, select, label, legend, th, nav, .pill, .stamp { font-family: var(--font-body); letter-spacing: normal; text-transform: none; }
.muted, .hint, .lede { color: var(--color-muted); }
.small, .hint, .label-sm { font-size: var(--text-sm); }
.hint { margin-top: var(--space-xs); min-height: 1lh; }
.mono { font-family: var(--font-body); font-variant-numeric: tabular-nums; }
code { font-family: var(--font-mono); font-size: var(--text-sm); overflow-wrap: anywhere; }
.urn { overflow-wrap: anywhere; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; top: var(--space-sm); left: var(--space-md); z-index: var(--z-toast); background: var(--color-ink); color: var(--color-paper); }
.skip:not(:focus-visible) { width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus-visible { padding: var(--space-xs) var(--space-md); }
.icon { display: inline-flex; flex: none; width: 1.15em; height: 1.15em; }
.icon svg { width: 100%; height: 100%; }

/* ---------- shell ---------- */
.app-shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); max-width: var(--container); margin-inline: auto; min-height: 100dvh; }
.workspace-nav { position: sticky; top: 0; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column; padding: var(--space-md) var(--space-sm); background: var(--color-deep); color: var(--color-on-dark-soft); }
.brand-row { display: flex; align-items: center; justify-content: space-between; min-height: 2.5rem; margin-bottom: var(--space-lg); padding-inline: var(--space-xs); }
.brand { display: flex; align-items: center; gap: var(--space-xs); font-family: var(--font-body); font-size: var(--text-xl); font-weight: 500; letter-spacing: 0; color: var(--color-ink-strong); }
.brand-mark { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: var(--radius-sm); background: var(--color-action); color: var(--color-action-ink); font-family: var(--font-body); font-size: var(--text-xs); font-weight: 500; }
.navigation-disclosure { display: flex; flex-direction: column; flex: 1; }
.navigation-disclosure > summary { display: none; }
.navigation-disclosure[open] { display: flex; }
.navigation-disclosure::details-content { display: contents; }
.rail { display: grid; gap: var(--space-3xs); }
.rail-group { margin: var(--space-lg) 0 var(--space-2xs); padding-inline: var(--space-xs); font-size: var(--text-sm); font-weight: 400; color: var(--color-on-dark-muted); }
#saved-list-shortcuts { display: grid; gap: var(--space-3xs); }
.saved-shortcut { min-width: 0; overflow: hidden; justify-content: flex-start; gap: var(--space-xs); width: 100%; min-height: 2.125rem; padding: 0 var(--space-xs); border-color: var(--color-clear); background: var(--color-clear); color: var(--color-ink-2); font-size: var(--text-md); font-weight: 400; }
.saved-shortcut:hover:not(:disabled) { background: var(--color-paper-3); border-color: var(--color-clear); }
.saved-shortcut[aria-pressed="true"] { color: var(--color-ink-strong); font-weight: 500; }
.saved-shortcut .list-name { flex: 1; min-width: 0; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.list-mark { display: inline-grid; place-items: center; flex: none; width: 1rem; height: 1rem; }
.saved-shortcut .list-dot { margin: 0; }
.saved-shortcut .list-dot.on { background: var(--color-success); }
.saved-shortcut .muted { font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.rail button { justify-content: flex-start; gap: var(--space-sm); width: 100%; min-height: 2.25rem; padding: 0 var(--space-xs); border-color: var(--color-clear); border-radius: var(--radius-button); background: var(--color-clear); box-shadow: none; color: var(--color-on-dark-soft); font-size: var(--text-md); font-weight: 500; }
.rail button .icon { width: 1rem; height: 1rem; color: var(--color-on-dark-muted); }
.rail button.rail-end { margin-top: var(--space-lg); }
.rail-label { flex: 1; text-align: left; }
.rail button:hover:not(:disabled) { background: var(--color-on-dark-wash); color: var(--color-on-dark); }
.rail button[aria-current="page"] { background: var(--color-deep-2); box-shadow: none; color: var(--color-on-dark); }
.rail button[aria-current="page"] .icon { color: var(--color-brand-on-dark); }
.rail .count { color: var(--color-on-dark-muted); }
/* The one bright mark in the rail: work that waits on a person. */
.rail button[data-view="review"] .count { background: var(--color-brand-on-dark); color: var(--color-deep); font-weight: 500; }
.count { min-width: 1.25rem; padding: 0 .375rem; border-radius: 4px; background: var(--color-clear); color: var(--color-muted); font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 400; line-height: 1.25rem; text-align: center; font-variant-numeric: tabular-nums; }

.count:empty { display: none; }
.count-stop { background: var(--color-clear); box-shadow: inset 0 0 0 1px currentColor; color: var(--color-error); }
.rail button[data-view="review"] .count.count-stop { background: var(--color-clear); color: var(--color-on-dark); }
.workspace-card { margin-top: auto; padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-card); background: var(--color-deep-2); font-size: var(--text-sm); }
.workspace-card :is(.muted, .hint) { color: var(--color-on-dark-muted); }
.workspace-card .text-link { color: var(--color-brand-on-dark); }
.workspace-card .problem { color: var(--color-error-bg); }
.workspace-line { display: flex; align-items: center; gap: var(--space-xs); min-height: 2rem; color: var(--color-on-dark-soft); }
.workspace-line .icon { color: var(--color-on-dark-muted); }
/* ---------- status, at the foot of the rail: whether the line is live ---------- */
.rail-status { display: grid; padding-bottom: var(--space-2xs); margin-bottom: var(--space-2xs); border-bottom: 1px solid var(--color-on-dark-rule); }
.rail-status[hidden] { display: none; }
.status-line { display: flex; align-items: center; gap: var(--space-xs); min-height: 2rem; margin: 0; color: var(--color-on-dark-soft); white-space: nowrap; }
/* The logo's ring as a signal: solid when live, open when simulated, amber when it needs a person. */
.state-ring { flex: none; width: .625rem; height: .625rem; border: 2px solid var(--color-silver); border-radius: var(--radius-pill); }
.state-ring.is-on { border-color: var(--color-brand); background: var(--color-brand); }
.state-ring.is-half { border-color: var(--color-brand); }
.state-ring.is-warn { border-color: var(--color-warn-solid); }
.rail-status .state-ring.is-on { border-color: var(--color-brand-on-dark); background: var(--color-brand-on-dark); }
.rail-status .state-ring.is-half { border-color: var(--color-brand-on-dark); }
/* The panel opens over the rail, above the card it belongs to. */
.workspace-card { position: relative; }
.connection-details { margin: 0 calc(-1 * var(--space-xs)); }
.connection-details > summary { display: flex; align-items: center; gap: var(--space-xs); min-height: 2rem; padding: 0 var(--space-xs); border-radius: var(--radius-button); cursor: pointer; color: var(--color-on-dark-soft); list-style: none; white-space: nowrap; }
.connection-details > summary::-webkit-details-marker { display: none; }
.connection-details > summary:hover, .connection-details[open] > summary { background: var(--color-on-dark-wash); color: var(--color-on-dark); }
#connection-state { margin-left: auto; color: var(--color-on-dark-muted); }
.status-pop { position: absolute; z-index: var(--z-dropdown); bottom: calc(100% + var(--space-2xs)); left: 0; right: 0; padding: var(--space-xs) var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-pop); color: var(--color-ink); }
.workspace-card .status-pop :is(.muted, .hint) { color: var(--color-muted); }
.lamps { display: grid; gap: var(--space-xs); padding: var(--space-xs) 0; }
.lamp { display: flex; gap: var(--space-xs); align-items: center; flex-wrap: wrap; min-width: 0; }
.lamp-label { color: var(--color-muted); }
.lamp .urn { font-size: var(--text-xs); width: 100%; color: var(--color-muted); overflow-wrap: anywhere; }
.lamp-go strong { color: var(--color-success); }
.lamp-warn strong, .lamp-stop strong { color: var(--color-warn); }
#connection-help p { overflow-wrap: anywhere; }
.workspace-body { min-width: 0; background: var(--color-surface); overflow: clip; }
.banners { --banners-inline: var(--space-xl); display: grid; gap: var(--space-xs); padding: var(--space-sm) var(--banners-inline) 0; }
.banners:empty { padding: 0; }
/* The Black Friday bar runs across the top of the page, flush with the header under it, not a card in a white strip. */
.banners > .sale-welcome:first-child { margin: calc(-1 * var(--space-sm)) calc(-1 * var(--banners-inline)) 0; padding-inline: var(--banners-inline) var(--space-md); border-width: 0 0 1px; border-radius: 0; }
.banners:has(> .sale-welcome:only-child) { padding-bottom: 0; }
.banner { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2xs); width: fit-content; max-width: 100%; min-height: 1.75rem; padding: 0 var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-pill); background: var(--color-mist); color: var(--color-muted); font-size: var(--text-sm); }
.banner strong { color: var(--color-ink); }
.banner-hot, .banner-warn, .banner-stop { gap: var(--space-xs); border-color: var(--color-rule-2); background: var(--color-paper); color: var(--color-ink-2); }
.banner-hot::before, .banner-warn::before, .banner-stop::before { content: ""; flex: none; box-sizing: border-box; width: .625rem; height: .625rem; border: 2px solid var(--color-warn-solid); border-radius: var(--radius-pill); }
.banner-stop::before { border-color: var(--color-error); }
.banner-hot strong, .banner-warn strong { color: var(--color-warn); }
.banner-stop strong { color: var(--color-error); }
.banner button { margin-left: var(--space-xs); }
.content-frame { display: grid; grid-template-columns: minmax(0, 1fr); min-height: calc(100dvh - var(--banners-h, 0px)); }
.content-frame.with-person { grid-template-columns: minmax(0, 1fr) var(--person-width); }
.shell { min-width: 0; padding: var(--space-lg) var(--space-xl) var(--space-xl); }
.screen-head .lede { display: none; }
.screen-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); margin: 0 calc(-1 * var(--space-xl)) var(--space-lg); padding: 0 var(--space-xl) var(--space-md); border-bottom: 1px solid var(--color-rule); }
.screen-head > div { min-width: 0; }
.screen-head h2 { font-family: var(--font-display); font-size: 1.75rem; font-weight: 400; line-height: 1.14; letter-spacing: -.022em; }
.screen-head .lede { font-size: var(--text-md); margin-top: var(--space-3xs); max-width: 70ch; color: var(--color-faint); }
.screen-head > button { flex-shrink: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); }

/* ---------- controls ---------- */
button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: var(--control-height); padding: 0 var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-input); background: var(--color-surface); color: var(--color-ink); font-size: var(--text-md); font-weight: 500; line-height: 1.2; white-space: nowrap; cursor: pointer; }
button .icon { width: 1rem; height: 1rem; }
button::before { content: ""; position: absolute; inset: calc(-1 * var(--hit-expand)); }
button:hover:not(:disabled) { background: var(--color-mist); border-color: var(--color-rule-2); }
button:active:not(:disabled) { background: var(--color-paper-3); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; } /* headings take focus on navigation for screen readers; not an interactive target */
button:disabled, input:disabled, select:disabled, textarea:disabled, [aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
button.primary, button.go { background: var(--color-action); color: var(--color-action-ink); border-color: var(--color-action); box-shadow: var(--shadow-card); }
button.primary:hover:not(:disabled), button.go:hover:not(:disabled) { background: var(--color-action-hover); border-color: var(--color-action-hover); }
button.primary:active:not(:disabled), button.go:active:not(:disabled) { background: var(--color-ink-2); }
button.small { min-height: var(--control-height-sm); padding-inline: var(--space-sm); font-size: var(--text-sm); --hit-expand: 4px; }
button.quiet, button.ghost { border-color: var(--color-clear); background: var(--color-clear); box-shadow: none; color: var(--color-muted); }
button.ghost:hover:not(:disabled), button.quiet:hover:not(:disabled) { color: var(--color-ink); }
button.danger { color: var(--color-error); }
button.text-action { min-height: 0; padding: 0; gap: var(--space-2xs); border: 0; background: none; box-shadow: none; color: var(--color-link); font-size: var(--text-sm); }
button.text-action:hover:not(:disabled) { background: none; color: var(--color-brand-hover); }
button.text-action .icon { width: 1rem; height: 1rem; }
button.link { min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; color: var(--color-link); font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }
button.link:hover:not(:disabled) { background: none; color: var(--color-brand-hover); }
button.campaign-toggle.running .icon { color: var(--color-muted); }
button[aria-busy="true"] { cursor: progress; }
button[aria-busy="true"]::after { content: ""; width: 12px; height: 12px; flex-shrink: 0; border: 2px solid currentColor; border-right-color: var(--color-clear); border-radius: var(--radius-pill); animation: progress-turn 900ms linear infinite; }
@keyframes progress-turn { to { transform: rotate(360deg); } }
input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="password"], input[type="datetime-local"], input[type="number"], input[type="time"], select, textarea { width: 100%; min-width: 0; height: var(--control-height); padding: 0 var(--space-sm); border: 1px solid var(--color-input-edge); border-radius: var(--radius-input); background: var(--color-surface); color: var(--color-ink); font-size: var(--text-md); line-height: 1.5; }
select { appearance: none; padding-right: var(--space-xl); background-image: linear-gradient(45deg, var(--color-clear) 50%, var(--color-muted) 50%), linear-gradient(135deg, var(--color-muted) 50%, var(--color-clear) 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
input::placeholder, textarea::placeholder { color: var(--color-faint); opacity: 1; }
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: var(--color-rule-2); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: -1px; }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--color-error); }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; accent-color: var(--color-accent); cursor: pointer; flex: none; }
textarea { height: auto; min-height: 120px; resize: vertical; padding: var(--space-sm); }
label { display: block; font-size: var(--text-sm); font-weight: 500; margin-bottom: var(--space-xs); }
form > label:not(:first-child) { margin-top: var(--space-lg); }
label.check { display: flex; align-items: center; gap: var(--space-sm); min-height: 2.5rem; margin: 0; font-weight: 400; font-size: var(--text-md); }
fieldset { padding: 0; margin: var(--space-md) 0 0; min-width: 0; border: 0; }
legend { font-size: var(--text-sm); font-weight: 500; margin-bottom: var(--space-xs); padding: 0; }
fieldset.inline { display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-lg); }
fieldset.inline legend { width: 100%; }
.problem { color: var(--color-error); font-size: var(--text-sm); margin-block: var(--space-xs); min-height: 1lh; }
.problem:empty { display: none; }
.row { display: flex; align-items: center; gap: var(--space-xs); }
.row input { flex: 1; min-width: 0; }
.row button { flex-shrink: 0; }
.search-field { position: relative; display: block; margin: 0; font-weight: 400; }
.search-field > .icon { position: absolute; left: var(--space-sm); top: 50%; translate: 0 -50%; width: 1rem; height: 1rem; color: var(--color-faint); pointer-events: none; }
.search-field input { padding-left: var(--space-xl); }

/* ---------- search ---------- */
.query-strip { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: var(--space-md); align-items: start; padding: var(--space-lg); border: 1px solid var(--color-rule); border-radius: var(--radius-card); }
.query-go { padding-top: calc(var(--text-sm) * 1.5 + var(--space-xs)); }
.query-note { margin: 0 0 0 auto; min-height: 0; }
.query-where #geo-status:empty { display: none; }
#geo-choices .choices { margin-top: var(--space-xs); padding: var(--space-xs) var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-input); background: var(--color-surface); box-shadow: var(--shadow-pop); }
#geo-choices legend { padding-top: var(--space-xs); color: var(--color-muted); font-weight: 400; }
.query-strip form { min-width: 0; }
.location-summary { display: flex; gap: var(--space-xs); align-items: baseline; flex-wrap: wrap; padding: var(--space-md) 0; font-size: var(--text-sm); }
.label-sm { color: var(--color-muted); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); min-width: 0; }
.chip { min-height: 2rem; padding-inline: var(--space-sm); --hit-expand: 6px; max-width: 100%; border-radius: var(--radius-input); background: var(--color-paper-2); border-color: var(--color-rule); color: var(--color-ink); box-shadow: none; font-size: var(--text-sm); }
.choices { padding: var(--space-sm) 0; }
.results { border: 1px solid var(--color-rule); border-radius: var(--radius-card); overflow: hidden; }
.results-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: var(--space-xs) var(--space-md); padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--color-rule); }
.results-head h3 { font-size: var(--text-md); }
.results-head p { font-size: var(--text-sm); }
.results .pager, .results .savebar { margin: 0; padding: var(--space-sm) var(--space-lg); }

/* ---------- tables ---------- */
.table-wrap { width: 100%; min-width: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
thead { background: var(--color-surface); color: var(--color-faint); }
thead th { height: 2.5rem; padding: var(--space-xs) var(--space-md); font-size: var(--text-sm); font-weight: 500; white-space: nowrap; border-bottom: 1px solid var(--color-rule); }
th, td { padding: var(--space-sm); border-bottom: 1px solid var(--color-rule); vertical-align: middle; }
tbody tr { height: var(--row-height); }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 500; min-width: 140px; }
tbody tr:hover { background: var(--color-mist); }
tr.selected-record, tr.selected-record:hover { background: var(--color-paper-2); }
.people-table tbody th { width: 28%; }
.c-check { width: 44px; min-width: 44px; padding-inline: 0; text-align: center; }
.c-check input { margin: 0; }
.row-pick { display: flex; align-items: center; justify-content: center; gap: var(--space-sm); min-height: 40px; min-width: 40px; margin: 0; cursor: pointer; }
.mobile-pick-label { display: none; }
.who { display: block; font-size: var(--text-md); color: var(--color-ink); }
.person-open { min-height: 1.9rem; padding: 0; --hit-expand: 6px; border: 0; background: var(--color-clear); box-shadow: none; text-align: left; font-weight: 500; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.person-open:hover:not(:disabled) { background: var(--color-clear); color: var(--color-link); }
.profile { display: inline-block; margin-top: var(--space-2xs); font-size: var(--text-sm); color: var(--color-muted); text-decoration-color: var(--color-rule-2); }
.profile:hover { color: var(--color-link); }
.empty-row, .empty-row:hover { height: auto; background: none; }
.empty-row td { padding: var(--space-2xl) var(--space-md); color: var(--color-muted); text-align: center; }
.savebar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-sm); border-top: 1px solid var(--color-rule); background: var(--color-paper-2); }
.savebar strong { font-size: var(--text-sm); margin-right: auto; }
.savebar input { width: min(100%, 240px); }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-xs); }
.pager:not(:has(button:not([hidden]))) { display: none; }
.empty-state { padding: var(--space-2xl) var(--space-lg); max-width: 80ch; }
.empty-state p { max-width: none; } /* one short sentence stays on one line */
.empty-state h3 { font-size: var(--text-lg); }
.empty-state p { margin: var(--space-xs) 0 var(--space-lg); color: var(--color-muted); }
/* A page this member's role hides (04-07): the same box as an empty state, alone on the page. */
.view.is-denied > :not(.denied) { display: none !important; }
.denied { padding: var(--space-2xl) var(--space-lg); max-width: 80ch; }
.denied h3 { font-size: var(--text-lg); font-weight: var(--display-weight); }
.denied p { margin: var(--space-xs) 0 var(--space-lg); color: var(--color-muted); }
.avatar { display: inline-grid; place-items: center; flex: none; width: 2rem; height: 2rem; border: 1px solid var(--color-rule); border-radius: var(--radius-pill); background: var(--color-paper-2); color: var(--color-ink-2); font-size: var(--text-xs); font-weight: 500; }
.avatar.tint-0 { background: var(--color-paper-2); border-color: var(--color-rule); color: var(--color-ink-2); }
.avatar.tint-1 { background: var(--color-success-bg); border-color: var(--color-success-bg); color: var(--color-success); }
.avatar.tint-2 { background: var(--color-info-bg); border-color: var(--color-info-bg); color: var(--color-info); }
.avatar.tint-3 { background: var(--color-warn-bg); border-color: var(--color-warn-bg); color: var(--color-warn); }
.who-cell { display: flex; align-items: center; gap: var(--space-sm); min-width: 0; }
.row-role { display: block; color: var(--color-ink-2); max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-actions { width: 1%; text-align: right; white-space: nowrap; }
.c-updated { white-space: nowrap; }
.people-status td[data-label="Location"] { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-card { border: 1px solid var(--color-rule); border-radius: var(--radius-card); overflow: hidden; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; min-height: 3.5rem; padding: var(--space-xs) 0; border-top: 1px solid var(--color-rule); }
.pages { display: flex; gap: var(--space-2xs); }
.pages .page-num { min-width: var(--control-height-sm); padding: 0; }
.pages .page-num[aria-current="page"] { background: var(--color-action); border-color: var(--color-action); color: var(--color-action-ink); }

/* ---------- person panel ---------- */
.person-panel { min-width: 0; padding: var(--space-lg); border-left: 1px solid var(--color-rule); background: var(--color-surface); align-self: start; position: sticky; top: var(--space-xs); max-height: calc(100dvh - var(--space-xs)); overflow-y: auto; }
.person-panel > h2 { margin-top: var(--space-md); font-size: var(--text-xl); font-weight: 500; }
.person-headline { margin-top: var(--space-xs); font-size: var(--text-sm); color: var(--color-muted); }
.record-facts { display: grid; gap: var(--space-2xs); padding: 0; margin: var(--space-lg) 0; font-size: var(--text-sm); }
.record-facts dt { color: var(--color-muted); }
.record-facts dd { margin: 0 0 var(--space-sm); overflow-wrap: anywhere; }
.person-panel > .primary { margin-top: var(--space-lg); width: 100%; }
.person-next { margin-top: var(--space-lg); }
.person-next button { width: 100%; margin-top: var(--space-sm); }
.person-history { margin-top: var(--space-xl); padding-top: var(--space-lg); border-top: 1px solid var(--color-rule); }
.person-history h3 { font-size: var(--text-md); margin-bottom: var(--space-sm); }
.person-history ul { list-style: none; padding: 0; margin: 0; }
.action-record { display: grid; justify-content: start; width: 100%; padding: var(--space-sm) 0; white-space: normal; border: 0; border-bottom: 1px solid var(--color-rule); border-radius: 0; background: var(--color-clear); box-shadow: none; text-align: left; }
.action-record strong, .action-record span, .action-record time { display: block; font-size: var(--text-sm); }
.technical-detail { margin-top: var(--space-md); font-size: var(--text-sm); color: var(--color-muted); }
.technical-detail summary { min-height: 32px; cursor: pointer; }
.technical-detail code, .technical-detail p { display: block; margin-top: var(--space-xs); }

/* ---------- outreach ---------- */
.grid-side { display: grid; grid-template-columns: var(--list-pane) minmax(0, 1fr); gap: var(--space-xl); }
.list-index { min-width: 0; padding-right: var(--space-lg); border-right: 1px solid var(--color-rule); }
.pane-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-sm); }
.pane-label h3 { font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); letter-spacing: normal; }
.list-index .search-field { margin-bottom: var(--space-sm); }
.picklist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2xs); }
.picklist li { min-width: 0; }
.picklist button { justify-content: flex-start; width: 100%; min-width: 0; min-height: 2.75rem; gap: var(--space-xs); padding-inline: var(--space-sm); border-color: var(--color-clear); background: var(--color-clear); box-shadow: none; text-align: left; font-size: var(--text-md); }
.list-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.count-pill { flex: none; min-width: 2.2rem; padding: 0 var(--space-xs); border: 1px solid var(--color-rule); border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-ink); font-size: var(--text-sm); font-weight: 500; text-align: center; line-height: 1.6; font-variant-numeric: tabular-nums; }
.list-state { width: 1rem; height: 1rem; }
.list-state-active { color: var(--color-success); }
.list-state-paused, .list-state-draft { color: var(--color-muted); }
.list-dot { flex: none; width: .5rem; height: .5rem; margin-inline: .25rem; border-radius: var(--radius-pill); background: var(--color-faint); }
.picklist button[aria-pressed="true"] { background: var(--color-paper-2); box-shadow: inset 0 0 0 1px var(--color-rule); color: var(--color-ink-strong); }
.picklist button[aria-pressed="true"]:hover:not(:disabled) { background: var(--color-paper-2); }

.picklist button[aria-pressed="true"] .count-pill { border-color: var(--color-rule); background: var(--color-surface); color: var(--color-ink); }
.list-detail { min-width: 0; }
.pane-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; }
.pane-title { min-width: 0; }
.pane-head h3 { font-size: var(--text-xl); font-weight: 500; }
.pane-controls { display: flex; align-items: center; gap: var(--space-xs); flex-wrap: wrap; }
.campaign-pick { margin: 0; }
.campaign-pick select { width: auto; max-width: 240px; }
.campaign-state { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-xs); margin-top: var(--space-xs); font-size: var(--text-sm); color: var(--color-muted); max-width: none; }
.state-chip { display: inline-flex; align-items: center; gap: .375rem; min-height: 1.5rem; padding: 0 .625rem; border-radius: var(--radius-pill); font-size: var(--text-sm); font-weight: 500; }
.state-active { background: var(--color-success-bg); color: var(--color-success); }
.state-paused { background: var(--color-warn-bg); color: var(--color-warn); }
.state-draft, .state-none { background: var(--color-paper-2); color: var(--color-muted); }
.stats { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2xs) var(--space-md); margin: var(--space-md) 0 0; padding: var(--space-xs) var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-card); font-size: var(--text-sm); font-variant-numeric: tabular-nums; color: var(--color-muted); }
.stat-total strong { color: var(--color-ink); font-weight: 600; }
.stats > .stat { gap: var(--space-2xs); min-height: 1.9rem; padding: 0 var(--space-2xs); border: 0; border-radius: var(--radius-sm); background: none; box-shadow: none; font-size: var(--text-sm); font-weight: 400; color: var(--color-muted); }
.stats > .stat:hover:not(:disabled) { background: var(--color-paper-2); color: var(--color-ink); }
.stats > .stat[aria-pressed="true"] { background: var(--color-paper-2); color: var(--color-ink-strong); }
.stat-value { color: var(--color-ink); font-weight: 500; }
.stats .zero .stat-value { color: var(--color-muted); font-weight: 500; }
.stat-progress { margin-left: auto; }
.toolbar { display: flex; align-items: center; gap: var(--space-sm); margin: var(--space-md) 0; }
.toolbar .grow { flex: 1; min-width: 0; }
.toolbar select { width: 13rem; }
.people-status tbody th { width: 24%; }
.person-status { display: inline-flex; align-items: center; gap: var(--space-2xs); min-height: 1.5rem; padding: 0; font-size: var(--text-sm); font-weight: 500; white-space: nowrap; background: var(--color-clear); color: var(--color-ink-2); }
.person-status::before { content: ""; width: .5rem; height: .5rem; flex: none; border-radius: var(--radius-pill); background: var(--color-silver); }
.status-kind { display: block; margin-top: var(--space-3xs); font-size: var(--text-xs); color: var(--color-muted); }
.person-status-none, .person-status-cancelled { color: var(--color-muted); }
.person-status-draft::before { background: var(--color-warn-solid); }
.person-status-approved::before, .person-status-sending::before { background: var(--color-info); }
.person-status-sent::before { background: var(--color-success); }
.person-status-unknown { color: var(--color-error); }
.person-status-unknown::before { background: var(--color-error); }

/* ---------- campaigns ---------- */
.campaign-table > h3 { margin-bottom: var(--space-md); font-size: var(--text-md); }
.campaign-table .table-wrap { border: 1px solid var(--color-rule); border-radius: var(--radius-card); }
#campaign-rows > p { padding: var(--space-xl) var(--space-lg); }
.campaign-compose { margin-bottom: var(--space-xl); padding: var(--space-lg); border: 1px solid var(--color-rule); border-radius: var(--radius-card); }
.campaign-create { max-width: 720px; margin-top: var(--space-md); }
.form-grid, .composer-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-lg); }
.form-grid > div, .composer-grid > div { min-width: 0; }
.campaign-create .primary { margin-top: var(--space-md); }
.campaign-progress span { display: block; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; min-height: 1.5rem; padding: 0 var(--space-xs); border-radius: 4px; font-size: var(--text-xs); font-weight: 500; white-space: nowrap; background: var(--color-paper-2); }
.stamp { display: inline-flex; align-items: center; gap: var(--space-2xs); font-size: var(--text-sm); font-weight: 500; white-space: nowrap; color: var(--color-muted); }
.stamp .icon { width: .875rem; height: .875rem; }
.pill-active { color: var(--color-success); background: var(--color-success-bg); }
.pill-paused { color: var(--color-warn); background: var(--color-warn-bg); }
.stamp-unknown { color: var(--color-warn); }
.pill-draft { color: var(--color-muted); }
/* Approved and sent carry the stamp: a check and stamp ink, no box, so it never reads as a button */
.stamp-approved, .stamp-sending, .stamp-sent { color: var(--color-success); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-lg); }
td.actions { display: table-cell; margin: 0; white-space: nowrap; }
td.actions button + button { margin-left: var(--space-xs); }
td.actions button { vertical-align: middle; }
.panel { margin-top: var(--space-xl); padding: var(--space-lg); border: 1px solid var(--color-rule); border-radius: var(--radius-card); }
.panel > p { margin-top: var(--space-xs); font-size: var(--text-sm); }
.composer-grid { margin-top: var(--space-lg); }
.members { max-height: 320px; overflow-y: auto; }

/* ---------- review and inbox ---------- */
.review-assurance { font-size: var(--text-sm); color: var(--color-muted); margin-bottom: var(--space-md); }
.filters { display: flex; align-items: center; gap: var(--space-2xs); margin-bottom: var(--space-md); padding: var(--space-2xs); width: fit-content; max-width: 100%; border-radius: var(--radius-input); background: var(--color-paper-2); overflow-x: auto; }
.filters button { min-height: var(--control-height-sm); border-color: var(--color-clear); background: var(--color-clear); box-shadow: none; color: var(--color-muted); font-size: var(--text-sm); }
.filters button[aria-pressed="true"] { background: var(--color-surface); color: var(--color-ink); box-shadow: var(--shadow-card); }
.filters span { font-variant-numeric: tabular-nums; }
.review-workbench { display: grid; grid-template-columns: var(--queue-width) minmax(0, 1fr); min-height: 460px; border: 1px solid var(--color-rule); border-radius: var(--radius-card); overflow: hidden; }
.review-queue { min-width: 0; border-right: 1px solid var(--color-rule); max-height: calc(100dvh - 220px); overflow-y: auto; }
.queue-item { position: relative; padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--color-rule); }
.queue-item:hover { background: var(--color-paper-2); }
.queue-item:has([aria-pressed="true"]) { background: var(--color-paper-2); }
.queue-select { position: static; display: block; width: 100%; min-height: 0; padding: 0; border: 0; background: var(--color-clear); box-shadow: none; text-align: left; font-size: var(--text-md); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.queue-select::before { inset: 0; }
.queue-select:hover:not(:disabled) { background: var(--color-clear); color: var(--color-link); }
.queue-context, .queue-preview { display: block; font-size: var(--text-sm); color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-preview { display: -webkit-box; margin-top: var(--space-2xs); white-space: normal; overflow-wrap: anywhere; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.queue-meta { display: flex; justify-content: space-between; gap: var(--space-xs); margin-top: var(--space-xs); font-size: var(--text-xs); color: var(--color-muted); }
.queue-empty { padding: var(--space-lg); }
.queue-group { margin: 0; padding: var(--space-md) var(--space-md) var(--space-2xs); font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); border-top: 1px solid var(--color-rule); }
.queue-hold { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); padding: var(--space-2xs) var(--space-md) var(--space-xs); font-size: var(--text-sm); border-bottom: 1px solid var(--color-rule); }
.queue-item.unread .queue-select { font-weight: 600; color: var(--color-ink-strong); }
.queue-item:not(.unread) .queue-select { font-weight: 500; }
.queue-item.unread .queue-preview { color: var(--color-ink-2); }
#inbox-meta { margin-block: 0 var(--space-sm); }
#inbox-meta:empty { display: none; }
#inbox-meta, #net-meta { max-width: none; } /* one line across the page, not wrapped at the 75ch paragraph limit */
.conversation { padding: var(--space-lg); min-width: 0; }
.conversation .quote { font-size: var(--text-lg); line-height: 1.6; padding: var(--space-md); border-radius: var(--radius-card); background: var(--color-paper-2); }
.button-link { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: var(--control-height); padding: 0 var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-input); color: var(--color-ink); font-size: var(--text-md); font-weight: 500; text-decoration: none; }
.button-link:hover { background: var(--color-paper-2); }
.button-link:active { background: var(--color-paper-3); }
.button-link.primary-link { background: var(--color-action); border-color: var(--color-action); color: var(--color-action-ink); }
.button-link.primary-link:hover { background: var(--color-action-hover); }
.slips { min-width: 0; }
.slips > .empty-state { padding: var(--space-xl); }
.slip { display: grid; grid-template-columns: minmax(0, 1fr) 200px; column-gap: var(--space-lg); padding: var(--space-lg); min-width: 0; width: 100%; }
.slip-head { grid-column: 1 / -1; display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-md); padding-bottom: var(--space-md); margin-bottom: var(--space-md); border-bottom: 1px solid var(--color-rule); }
.slip-head h3 { font-size: var(--text-xl); }
.draft-context { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-sm); margin-top: var(--space-xs); font-size: var(--text-sm); color: var(--color-muted); }
.draft-context span + span { border-left: 1px solid var(--color-rule-2); padding-left: var(--space-sm); }
.stamps { display: grid; gap: var(--space-xs); justify-items: end; }
.letter { font: 400 var(--text-md)/1.65 var(--font-body); }
.slip > label { grid-column: 1; }
.slip textarea { grid-column: 1; min-height: 260px; padding: var(--space-md); }
.slip-meta { grid-column: 2; grid-row: 2 / span 2; display: flex; flex-direction: column-reverse; justify-content: flex-end; align-items: stretch; gap: var(--space-lg); padding-left: var(--space-lg); border-left: 1px solid var(--color-rule); }
.inline-label { display: grid; gap: var(--space-xs); margin: 0; }
.inline-label input { width: 100%; font-size: var(--text-sm); }
.blockers, .slip-note { grid-column: 1 / -1; font-size: var(--text-sm); color: var(--color-muted); margin-top: var(--space-md); }
.blockers.ready { color: var(--color-success); }
.slip .actions, .slip > .technical-detail, .slip > .problem { grid-column: 1 / -1; }
.slip .actions .danger { margin-left: auto; }
.quote { grid-column: 1 / -1; margin: var(--space-md) 0; padding: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.warnbox { grid-column: 1 / -1; padding: var(--space-md); border: 1px solid var(--color-rule-2); background: var(--color-paper-2); color: var(--color-ink-2); border-radius: var(--radius-input); }
.warnbox strong { color: var(--color-error); }

/* ---------- dashboard ---------- */
.overview { display: grid; gap: var(--space-md); margin-bottom: var(--space-md); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--space-md); }
.metric-card, .tasks-card { min-width: 0; padding: var(--space-lg); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); }
.metric-head, .tasks-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.metric-label, .card-title { font-size: var(--text-md); font-weight: 500; color: var(--color-ink); letter-spacing: normal; }
.metric-pick { margin: 0; }
.metric-pick select { field-sizing: content; width: auto; height: 2rem; padding-left: 0; padding-right: 1.25rem; background-position: calc(100% - 9px) 52%, calc(100% - 4px) 52%; border-color: var(--color-clear); background-color: var(--color-clear); font-size: var(--text-md); font-weight: 500; color: var(--color-muted); }
.metric-pick select:hover:not(:disabled) { border-color: var(--color-clear); color: var(--color-ink); }
.metric-range { display: inline-flex; align-items: center; gap: var(--space-2xs); min-height: 2rem; padding: 0 var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-input); font-size: var(--text-md); color: var(--color-ink-2); }
.metric-range .icon { width: 1rem; height: 1rem; color: var(--color-muted); }
.metric-value { margin-top: var(--space-xs); font: 500 var(--text-4xl)/1.1 var(--font-body); letter-spacing: -.02em; color: var(--color-ink-strong); font-variant-numeric: tabular-nums; }
.metric-unit { font-size: var(--text-lg); color: var(--color-faint); letter-spacing: normal; }
.chart-wrap { margin-top: var(--space-md); }
.metric-card { display: flex; flex-direction: column; }
.chart-wrap { display: flex; flex: 1; flex-direction: column; min-height: 13rem; }
.chart-plot { display: grid; flex: 1; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-sm); min-height: 0; }
.chart-ticks { display: flex; flex-direction: column; justify-content: space-between; height: 100%; padding: .125rem 0 1rem; line-height: .75rem; font-size: var(--text-sm); color: var(--color-faint); text-align: right; font-variant-numeric: tabular-nums; }
.chart-area-box { position: relative; min-height: 13rem; }
.chart { display: block; width: 100%; height: 100%; min-height: 13rem; overflow: visible; }
.chart-end { position: absolute; width: .625rem; height: .625rem; margin: -.3125rem 0 0 -.3125rem; border: 2px solid var(--color-surface); border-radius: var(--radius-pill); background: var(--color-chart); }
.chart-grid { stroke: var(--color-rule); stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.chart-line { fill: none; stroke: var(--color-chart); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-axis { display: flex; justify-content: space-between; margin: var(--space-xs) 0 0 var(--space-xl); padding-top: var(--space-xs); border-top: 1px solid var(--color-rule); font-size: var(--text-sm); color: var(--color-faint); }
.tasks-lead { display: grid; gap: var(--space-sm); justify-items: start; margin: var(--space-md) 0; padding-bottom: var(--space-md); border-bottom: 1px solid var(--color-rule); }
.tasks-lead p { font-size: var(--text-lg); font-weight: 500; color: var(--color-ink-strong); }
.side-stack { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: var(--space-md); min-width: 0; }
.tasks-card { padding: var(--space-md) var(--space-lg); }
.tasks-card .card-title { margin-bottom: var(--space-xs); }
.tasks-card .metric-head { margin-bottom: var(--space-xs); }
.task-text { display: grid; flex: 1; min-width: 0; }
.task-text .task-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-sub { font-size: var(--text-sm); font-weight: 400; color: var(--color-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-count.zero { color: var(--color-faint); }
.tasks { display: grid; gap: var(--space-2xs); margin: 0; padding: 0; list-style: none; }
.task { justify-content: flex-start; gap: var(--space-sm); width: 100%; min-height: 2.5rem; padding: 0 var(--space-xs); border-color: var(--color-clear); background: var(--color-clear); text-align: left; }
.task:hover:not(:disabled) { background: var(--color-mist); border-color: var(--color-clear); }
.task-hot { background: var(--color-mist); }
.task-icon { display: inline-grid; place-items: center; flex: none; width: 2rem; height: 2rem; border: 1px solid var(--color-rule); border-radius: var(--radius-input); background: var(--color-surface); color: var(--color-ink-2); }
.task-icon .icon { width: 1rem; height: 1rem; }
.task-label { flex: 1; font-weight: 500; color: var(--color-ink); }
.task-count { min-width: 1.75rem; padding: 0 var(--space-2xs); border-radius: var(--radius-sm); background: var(--color-clear); color: var(--color-ink-2); font-size: .8125rem; font-weight: 500; line-height: 1.75rem; text-align: center; font-variant-numeric: tabular-nums; }
.overview-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); font-variant-numeric: tabular-nums; }
.overview-card { display: grid; justify-content: stretch; justify-items: stretch; align-content: start; gap: var(--space-3xs); min-height: 0; padding: var(--space-md) var(--space-lg); border: 0; border-radius: 0; background: var(--color-surface); box-shadow: -1px -1px 0 var(--color-rule); text-align: left; white-space: normal; }
.overview-label { font-size: var(--text-sm); color: var(--color-muted); font-weight: 500; }
.overview-row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-sm); min-width: 0; }
.overview-note { font-size: var(--text-sm); font-weight: 400; color: var(--color-faint); }
.overview-value { font: 500 var(--text-2xl)/1.25 var(--font-body); color: var(--color-ink-strong); font-variant-numeric: tabular-nums; }
.overview-card:hover:not(:disabled) { background: var(--color-mist); }
.log-heading { display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-md) var(--space-lg) 0; font-size: var(--text-md); font-weight: 500; color: var(--color-ink); }
.activity-card { border: 1px solid var(--color-rule); border-radius: var(--radius-card); }
.log { padding: var(--space-xs) var(--space-lg) var(--space-sm); margin: 0; list-style: none; }
.log li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-sm); padding: var(--space-xs) 0; border-bottom: 1px solid var(--color-rule); align-items: center; }
.log-icon { width: 1.75rem; height: 1.75rem; }
.log li:last-child { border-bottom: 0; }
.log time { grid-column: 3; grid-row: 1; color: var(--color-muted); font-size: var(--text-sm); white-space: nowrap; }
.log .activity-text { font-size: var(--text-md); font-weight: 500; color: var(--color-ink); }

/* ---------- overlays ---------- */
.toasts { position: fixed; z-index: var(--z-toast); top: var(--space-lg); right: var(--space-lg); width: min(440px, calc(100% - var(--space-xl))); display: grid; gap: var(--space-xs); pointer-events: none; }
.toast { padding: var(--space-sm) var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); color: var(--color-ink); font-size: var(--text-md); box-shadow: var(--shadow-pop); }
.toast-stop { border-color: var(--color-error); color: var(--color-error); }
dialog { position: fixed; inset: 0; margin: auto; width: min(640px, calc(100% - var(--space-lg))); max-height: calc(100dvh - var(--space-xl)); padding: var(--space-xl); border: 1px solid var(--color-rule); border-radius: var(--radius-panel); background: var(--color-surface); color: var(--color-ink); z-index: var(--z-modal); overflow-y: auto; box-shadow: var(--shadow-pop); }
dialog::backdrop { background: var(--color-overlay); }
dialog h2 { font-size: var(--text-xl); margin-bottom: var(--space-sm); }
dialog p { font-size: var(--text-sm); color: var(--color-muted); }
/* 14px muted note lines in dialogs (08 UI-SPEC "New CSS"; generalizes .report-dialog p.dialog-note, which stays). */
dialog p.dialog-note { margin: 0; font-size: var(--text-md); color: var(--color-muted); }
.facts { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: var(--space-sm) var(--space-lg); font-size: var(--text-sm); padding: var(--space-lg) 0; margin: var(--space-lg) 0; border-block: 1px solid var(--color-rule); }
.facts dt { color: var(--color-muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
dialog .check { padding-top: var(--space-md); font-size: var(--text-sm); }
#ap-go { max-width: 100%; overflow: hidden; }

/* ---------- responsive ---------- */
@media (max-width: 100rem) {
  .c-updated, .people-status thead th.c-updated-h { display: none; }
}
@media (max-width: 80rem) {
  .overview-grid { grid-template-columns: minmax(0, 1fr); }
  .overview-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  :root { --person-width: 19rem; --queue-width: 15rem; --list-pane: 14rem; }
  .with-person .query-strip { grid-template-columns: minmax(0, 1fr); }
  .with-person .query-go { padding-top: 0; }
  .slip { display: block; }
  .slip-meta { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 0; padding: var(--space-md) 0; }
}
@media (max-width: 60rem) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .workspace-nav { z-index: var(--z-sticky-nav); height: auto; max-height: 100dvh; padding: var(--space-xs) var(--space-md); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .brand-row { margin: 0; min-height: 2.75rem; }
  /* Open or closed, the disclosure adds no box: the bar keeps its row and the menu drops below it at full width. */
  .navigation-disclosure, .navigation-disclosure[open] { display: contents; }
  .navigation-disclosure > summary { display: inline-grid; place-items: center; grid-column: 2; grid-row: 1; width: 2.75rem; height: 2.75rem; border: 1px solid var(--color-on-dark-rule); border-radius: var(--radius-input); color: var(--color-on-dark); cursor: pointer; list-style: none; }
  .navigation-disclosure > summary::-webkit-details-marker { display: none; }
  .navigation-disclosure > summary .icon { width: 1.2rem; height: 1.2rem; }
  .rail, .workspace-card { grid-column: 1 / -1; }
  .navigation-disclosure:not([open]) .rail, .navigation-disclosure:not([open]) .workspace-card, .navigation-disclosure:not([open]) .saved-navigation { display: none; }
  .saved-navigation { grid-column: 1 / -1; }
  .rail { padding: var(--space-xs) 0; }
  .workspace-card { margin: 0 0 var(--space-sm); }
  .shell { padding: var(--space-lg) var(--space-md); }
  .screen-head { margin-inline: calc(-1 * var(--space-md)); padding-inline: var(--space-md); }
  .banners { --banners-inline: var(--space-md); }
  .content-frame { min-height: 0; }
  .content-frame.with-person { grid-template-columns: minmax(0, 1fr); }
  .content-frame.with-person .shell { display: none; }
  .person-panel { position: static; width: 100%; max-height: none; border: 0; }
  .query-strip { grid-template-columns: minmax(0, 1fr); padding: var(--space-md); }
  .query-go { padding-top: 0; }
  .query-go button { width: 100%; }
  .query-note { flex-basis: 100%; margin: 0; }
  .grid-side { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
  .list-index { border-right: 0; padding: 0; }
  .picklist { max-height: 13rem; overflow-y: auto; border: 1px solid var(--color-rule); border-radius: var(--radius-card); padding: var(--space-2xs); }
}
@media (max-width: 40rem) {
  :root { --control-height: 3.2rem; --control-height-sm: 3rem; --hit-expand: 0px; }
  .screen-head { flex-wrap: wrap; gap: var(--space-md); }
  .screen-head h2 { font-size: var(--text-2xl); }
  .row { flex-wrap: wrap; }
  .row input { flex-basis: 100%; }
  .row button { width: 100%; }
  .chip, .person-open { min-height: 3rem; }
  .savebar { display: grid; grid-template-columns: minmax(0, 1fr); }
  .savebar input { width: 100%; }
  .form-grid, .composer-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-progress { margin-left: 0; }
  .overview-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-card { padding: var(--space-md); min-height: 6.5rem; }
  .next-step { flex-direction: column; align-items: stretch; padding: var(--space-md); }
  .pane-controls { width: 100%; }
  .pane-controls > button { flex: 1 1 auto; }
  .toolbar { flex-wrap: wrap; }
  .toolbar select { width: 100%; }
  .filters button { min-height: 3rem; }
  .review-workbench { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .review-queue { border-right: 0; border-bottom: 1px solid var(--color-rule); max-height: 22rem; }
  .people-status thead, .people-table thead th:not(.c-check) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .people-table thead tr { display: flex; height: auto; padding: var(--space-xs) var(--space-md); }
  .mobile-pick-label { display: inline; font-weight: 500; }
  .people-table thead .row-pick { justify-content: flex-start; }
  .people-table tr, .people-status tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2xs) var(--space-sm); height: auto; padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--color-rule); }
  .people-table td, .people-table th, .people-status td, .people-status th { display: block; padding: 0; border: 0; min-width: 0; width: auto; }
  .people-status tbody th, .people-table tbody th { grid-column: 1 / -1; width: auto; }
  .people-status .c-role { grid-column: 1 / -1; }
  .people-status td[data-label="Location"] { grid-column: 1; }
  .people-status td[data-label="Status"] { grid-column: 2; grid-row: 3 / span 2; text-align: right; }
  .people-status .c-actions { grid-column: 1; text-align: left; }
  .row-role { white-space: normal; }
  .people-table .c-check { grid-column: 2; grid-row: 1; width: auto; }
  .people-table td[data-label] { grid-column: 1 / -1; color: var(--color-muted); }
  .empty-row { display: block !important; }
  .table-foot { justify-content: center; }
  .log li { grid-template-columns: auto minmax(0, 1fr); gap: var(--space-2xs) var(--space-sm); }
  .log time { grid-column: 2; grid-row: 2; }
  .slip { padding: var(--space-md); }
  .conversation { padding: var(--space-md); }
}

/* ---------- inbox ---------- */
.inbox-shell { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); height: calc(100dvh - 3.75rem - var(--banners-h, 0px)); min-height: 34rem; /* fills the frame below its top padding */ border: 1px solid var(--color-rule); border-radius: var(--radius-card); overflow: hidden; }
.inbox-queue { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--color-rule); background: var(--color-surface); }
.inbox-tools { display: grid; gap: var(--space-sm); padding: var(--space-sm); border-bottom: 1px solid var(--color-rule); }
/* inbox filters: one row of underline tabs that scrolls sideways when the pane is narrow, never wraps */
.inbox-tools .filters { display: flex; flex-wrap: nowrap; gap: var(--space-sm); width: 100%; margin: 0; padding: 0; overflow-x: auto; border-radius: 0; border-bottom: 1px solid var(--color-rule); background: none; scrollbar-width: none; }
.inbox-tools .filters::-webkit-scrollbar { display: none; }
.inbox-tools .filters button { flex: none; gap: var(--space-2xs); min-height: 2.25rem; padding: 0 0 2px; border: 0; border-radius: 0; background: none; box-shadow: inset 0 -2px 0 var(--color-clear); color: var(--color-muted); font-size: var(--text-sm); font-weight: 500; white-space: nowrap; }
.inbox-tools .filters button:hover:not(:disabled) { background: none; color: var(--color-ink); }
.inbox-tools .filters button[aria-pressed="true"] { background: none; box-shadow: inset 0 -2px 0 var(--color-action); color: var(--color-ink-strong); }
.inbox-tools .filters .count { min-width: 0; padding: 0; background: none; color: var(--color-faint); font-family: var(--font-body); font-size: var(--text-sm); font-weight: 400; }
.inbox-tools .filters button[aria-pressed="true"] .count { color: var(--color-ink-2); }
.inbox-list { flex: 1; overflow-y: auto; }
.inbox-list .queue-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-sm); padding: var(--space-sm) var(--space-md); }
.queue-body { display: grid; gap: var(--space-3xs); min-width: 0; }
.queue-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-xs); min-width: 0; }
.queue-top .queue-select { flex: 1; min-width: 0; font-size: var(--text-md); white-space: nowrap; }
.queue-time { flex: none; font-size: var(--text-sm); color: var(--color-faint); }
.inbox-list .queue-preview { -webkit-line-clamp: 1; margin: 0; }
.queue-tags, .thread-tags { display: flex; flex-wrap: wrap; gap: var(--space-2xs); min-width: 0; }
.queue-tags:empty { display: none; }
.tag-chip { display: inline-flex; align-items: center; max-width: 100%; min-height: 1.5rem; padding: 0 var(--space-xs); border-radius: 4px; background: var(--color-paper-2); color: var(--color-muted); font-size: var(--text-sm); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag-blue { gap: var(--space-2xs); background: var(--color-info-bg); color: var(--color-info); }
.tag-blue .icon { width: .75rem; height: .75rem; }
.queue-tags { flex-wrap: nowrap; overflow: hidden; }
.tag-amber { background: var(--color-warn-bg); color: var(--color-warn); }
.avatar-sm { width: 1.75rem; height: 1.75rem; font-size: .625rem; }
.avatar-lg { width: 2.75rem; height: 2.75rem; font-size: var(--text-md); }
.inbox-thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--color-mist); }
.thread { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.thread-head { display: flex; align-items: flex-start; gap: var(--space-sm); padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--color-rule); background: var(--color-surface); }
.thread-who { flex: 1; display: grid; gap: var(--space-2xs); min-width: 0; }
.thread-who h3 { font-size: var(--text-xl); display: flex; align-items: center; gap: var(--space-2xs); }
.thread-actions { display: flex; gap: var(--space-xs); flex-wrap: wrap; justify-content: flex-end; }
.thread-actions .button-link { min-height: var(--control-height); font-size: var(--text-md); padding-inline: var(--space-sm); }
.thread-actions .button-link .icon { width: 1rem; height: 1rem; }
.thread-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-sm); padding: var(--space-lg); }
.thread-day { align-self: center; padding: 0 var(--space-sm); border-radius: var(--radius-pill); background: var(--color-surface); border: 1px solid var(--color-rule); font-size: var(--text-sm); color: var(--color-muted); line-height: 1.75rem; }
.bubble-row { display: flex; align-items: flex-end; gap: var(--space-xs); max-width: 78%; }
.bubble-row.mine { align-self: flex-end; flex-direction: row-reverse; }
.bubble { display: grid; gap: var(--space-2xs); padding: var(--space-sm) var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-card) var(--radius-card) var(--radius-card) var(--radius-sm); background: var(--color-surface); }
.bubble p { font-size: var(--text-lg); line-height: 1.5; color: var(--color-ink); max-width: none; overflow-wrap: anywhere; }
.bubble time { font-size: var(--text-sm); color: var(--color-faint); }
.bubble-deleted p { font-style: italic; color: var(--color-muted); }
/* Replies waiting to go out: same side as yours, dashed and quiet, with their own small actions. */
.mine .bubble.bubble-queued { border: 1.5px dashed var(--color-rule-2); background: transparent; color: var(--color-ink); }
.mine .bubble.bubble-queued p { color: var(--color-ink); }
.bubble-queued .queued-when { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-xs); color: var(--color-muted); }
.bubble-queued .queued-when .icon { width: .8rem; height: .8rem; }
.queued-actions { display: flex; align-self: center; gap: 2px; padding: 2px; border: 1px solid var(--color-rule); border-radius: 999px; background: var(--color-surface); }
.queued-actions button { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; min-height: 0; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--color-muted); }
.queued-actions button:hover { background: var(--color-surface-sunk); color: var(--color-ink); }
.queued-actions .icon { width: .9rem; height: .9rem; }
.bubble-target { outline: 2px solid var(--color-action); outline-offset: 2px; }
.composer-editing { display: flex; align-items: center; gap: var(--space-xs); margin-bottom: var(--space-xs); font-size: var(--text-sm); font-weight: 500; color: var(--color-ink); }
.composer-editing .icon { width: .9rem; height: .9rem; }
.composer-editing button { margin-left: auto; }
/* A small floating chip on the bubble's top edge, shown on hover, like LinkedIn's message actions. */
.bubble-row { position: relative; }
.bubble-stack { position: relative; }
.msg-actions { position: absolute; top: -10px; right: calc(100% - 14px); z-index: 2; display: flex; gap: 2px; padding: 2px; border: 1px solid var(--color-rule); border-radius: 999px; background: var(--color-surface); box-shadow: var(--shadow-pop); opacity: 0; visibility: hidden; transition: opacity var(--dur-micro) var(--ease-out), visibility var(--dur-micro) var(--ease-out); }
.bubble-row:hover .msg-actions, .msg-actions:hover, .msg-actions:focus-within { opacity: 1; visibility: visible; transition-delay: 0s; }
/* An invisible bridge to the bubble, and a short delay before hiding, so the chip stays while the pointer travels to it. */
.msg-actions::after { content: ""; position: absolute; inset: -6px -16px -6px -6px; z-index: -1; }
/* Their messages: the chip on the outer (right) corner, away from their avatar. */
.bubble-row:not(.mine) .msg-actions { right: auto; left: calc(100% - 14px); }
.bubble-row:not(.mine) .msg-actions::after { inset: -6px -6px -6px -16px; }
.bubble-row:not(:hover) .msg-actions:not(:hover) { transition-delay: .25s; }
.msg-actions button { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; min-height: 0; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--color-muted); }
.msg-actions button:hover { background: var(--color-surface-sunk); color: var(--color-ink); }
.msg-actions .msg-delete:hover { color: var(--color-error); }
.msg-actions .icon { width: .9rem; height: .9rem; }
@media (hover: none) { .msg-actions { opacity: 1; visibility: visible; } }
.mine .bubble { border-color: var(--color-action); border-radius: var(--radius-card) var(--radius-card) var(--radius-sm) var(--radius-card); background: var(--color-action); }
.mine .bubble p { color: var(--color-action-ink); }
.mine .bubble time { color: var(--color-silver); }
.thread-note { align-self: center; font-size: var(--text-sm); color: var(--color-muted); }
.thread-empty { margin: auto; display: grid; justify-items: center; text-align: center; }
.composer { display: grid; gap: var(--space-xs); padding: var(--space-md) var(--space-lg); border-top: 1px solid var(--color-rule); background: var(--color-surface); }
.composer textarea { min-height: 5.5rem; padding: var(--space-sm); font-size: var(--text-lg); }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; }
.composer-foot .hint { display: inline-flex; align-items: center; gap: var(--space-2xs); margin: 0; min-height: 0; }
.composer-foot .hint .icon { width: 1rem; height: 1rem; }
.composer-waiting { grid-template-columns: minmax(0, 1fr) auto; align-items: center; background: var(--color-paper-2); }
.composer-label { font-weight: 500; color: var(--color-ink); }
.composer-quote { margin-top: var(--space-3xs); color: var(--color-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60ch; }
@media (max-width: 60rem) {
  .inbox-shell { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  .inbox-queue { border-right: 0; border-bottom: 1px solid var(--color-rule); }
  .inbox-list { max-height: 20rem; }
  .bubble-row { max-width: 92%; }
  .thread-head { flex-wrap: wrap; }
  .thread-actions { width: 100%; justify-content: flex-start; }
}

/* Inbox: conversations lead; secondary filters and outcomes stay out of the reply path. */
#view-inbox .inbox-shell { grid-template-columns: minmax(19rem, 22rem) minmax(0, 1fr); }
#view-inbox .inbox-tools { padding: var(--space-md); gap: var(--space-xs); }
#view-inbox .tool-row { position: relative; display: flex; gap: var(--space-xs); align-items: center; }
#view-inbox .tool-row .search-field { flex: 1; min-width: 0; }
#view-inbox .inbox-filter-menu { flex: none; }
#view-inbox .inbox-filter-menu > summary, #view-inbox .thread-options > summary { display: flex; align-items: center; justify-content: center; min-height: 2.25rem; padding: 0 var(--space-sm); border: 1px solid var(--color-input-edge); border-radius: var(--radius-button); background: var(--color-surface); font-size: var(--text-md); cursor: pointer; list-style: none; white-space: nowrap; }
#view-inbox .inbox-filter-menu > summary::-webkit-details-marker, #view-inbox .thread-options > summary::-webkit-details-marker { display: none; }
#view-inbox .inbox-filter-menu[open] > summary, #view-inbox .thread-options[open] > summary { background: var(--color-paper-2); border-color: var(--color-ink-2); }
#view-inbox #inbox-filter-panel { position: absolute; top: calc(100% + var(--space-xs)); right: 0; z-index: var(--z-dropdown); width: min(18rem, calc(100vw - 4rem)); max-height: calc(100dvh - 14rem); overflow: auto; display: grid; gap: var(--space-md); padding: var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-lift); }
#view-inbox #inbox-filters:not([open]) #inbox-filter-panel, #view-inbox .thread-options:not([open]) .thread-options-menu { display: none; }
#view-inbox .inbox-subtools { display: grid; gap: var(--space-sm); }
#view-inbox .inbox-subtools .select-field { display: grid; gap: var(--space-xs); margin: 0; }
#view-inbox .inbox-subtools select { width: 100%; max-width: none; }
#view-inbox .inbox-filter-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); }
#view-inbox .inbox-filter-heading strong { font-size: var(--text-md); font-weight: 500; }
#view-inbox .inbox-secondary-views { display: grid; gap: var(--space-2xs); }
#view-inbox .inbox-filter-label { margin: 0 0 var(--space-2xs); font-size: var(--text-sm); color: var(--color-muted); }
#view-inbox .inbox-secondary-views button { justify-content: flex-start; min-height: 2.25rem; padding-inline: var(--space-xs); border-color: transparent; background: none; font-size: var(--text-md); font-weight: 400; }
#view-inbox .inbox-secondary-views button::before { content: ""; position: static; inset: auto; display: block; flex: none; width: 14px; height: 14px; border: 1px solid var(--color-input-edge); border-radius: 3px; background: var(--color-surface); }
#view-inbox .inbox-secondary-views button[aria-pressed="true"] { background: var(--color-paper-2); color: var(--color-ink); }
#view-inbox .inbox-secondary-views button[aria-pressed="true"]::before { border: 4px solid var(--color-ink); }
#view-inbox .inbox-secondary-views .count { margin-left: auto; min-width: 0; padding: 0; background: none; color: var(--color-muted); font-weight: 400; }
#view-inbox .inbox-utilities { display: flex; flex-wrap: wrap; gap: var(--space-xs); padding-top: var(--space-sm); border-top: 1px solid var(--color-rule); }
#view-inbox .inbox-utilities button { flex: 1; }
#view-inbox .inbox-tools .filters { justify-content: space-between; gap: var(--space-md); }
#view-inbox .inbox-tools .filters button { font-size: var(--text-md); }
#view-inbox .avatar { background: var(--color-paper-2); color: var(--color-muted); border: 1px solid var(--color-rule); }
#view-inbox .inbox-list .queue-item { padding: var(--space-md); gap: var(--space-sm); }
#view-inbox .inbox-list .queue-preview { -webkit-line-clamp: 2; font-size: var(--text-md); line-height: 1.5; color: var(--color-ink-2); }
#view-inbox .queue-tags .tag-chip { padding: 0; background: none; color: var(--color-muted); font-weight: 400; }
#view-inbox .queue-tags { gap: var(--space-xs); }
#view-inbox .inbox-list .queue-item.unread .queue-select { font-weight: 600; }
#view-inbox .thread-head { padding: var(--space-md); }
#view-inbox .thread-who h3 { font-size: var(--text-lg); }
#view-inbox .thread-name { text-decoration: none; }
#view-inbox .thread-actions { align-items: center; }
#view-inbox .thread-actions > button { min-height: 2.25rem; font-size: var(--text-md); }
#view-inbox .thread-options { position: relative; }
#view-inbox .thread-options-menu { position: absolute; top: calc(100% + var(--space-xs)); right: 0; z-index: var(--z-dropdown); width: 14rem; padding: var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-lift); }
#view-inbox .thread-options-menu > p { margin: 0 0 var(--space-xs); font-size: var(--text-sm); color: var(--color-muted); }
#view-inbox .thread-tags .tag-chip { padding: 0; min-height: 1.25rem; background: none; }
#view-inbox .thread-tags { gap: var(--space-sm); }
#view-inbox .thread-tags .tag-amber { color: var(--color-warn); }
#view-inbox .bubble-row { max-width: min(84%, 36rem); }
#view-inbox .bubble p { font-size: .9375rem; line-height: 1.6; }
#view-inbox .bubble-row:not(.mine) .bubble { border-color: var(--color-clear); background: var(--color-brand-wash); }
#view-inbox .mine .bubble:not(.bubble-queued) { background: var(--color-paper-2); border-color: var(--color-rule); }
#view-inbox .mine .bubble p { color: var(--color-ink); }
#view-inbox .mine .bubble time { color: var(--color-muted); }
#view-inbox .thread-day { padding: 0; border: 0; background: none; }
#view-inbox .thread-body > :first-child { margin-top: auto; }
#view-inbox .composer { position: relative; padding: var(--space-md); }
#view-inbox .composer .gif-picker { position: absolute; left: var(--space-md); bottom: calc(100% + var(--space-xs)); z-index: var(--z-dropdown); width: min(340px, calc(100% - 2 * var(--space-md))); max-height: max(0px, min(400px, 45dvh, calc(var(--thread-body-height, 0px) - var(--space-xs)))); margin: 0; overflow-y: auto; }
#view-inbox .composer textarea { min-height: 5rem; font-size: var(--text-md); }
#view-inbox .composer > .problem:empty, #view-inbox .composer-foot .hint:empty { display: none; }
#view-inbox .composer-actions { width: 100%; }
#view-inbox .composer-actions .send-split, #view-inbox .composer-actions > button[type="submit"] { margin-left: auto; }
#view-inbox #inbox-back { display: none; }
@media (max-width: 60rem) {
  /* The screen less the bar: its 2.75rem row and the padding above and below it. */
  #view-inbox .inbox-shell { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 3.75rem - var(--banners-h, 0px)); min-height: 0; }
  #view-inbox .inbox-queue { border: 0; }
  #view-inbox .inbox-list { max-height: none; }
  #view-inbox .inbox-secondary-views button { min-height: 2.75rem; }
  #view-inbox:not(.inbox-thread-open) .inbox-thread, #view-inbox.inbox-thread-open .inbox-queue { display: none; }
  #view-inbox #inbox-back { display: flex; flex: none; align-self: stretch; justify-content: flex-start; min-height: 2.75rem; padding-inline: var(--space-md); border: 0; border-bottom: 1px solid var(--color-rule); border-radius: 0; background: var(--color-surface); }
  #view-inbox .inbox-thread { overflow: hidden; }
  #view-inbox .thread-head { gap: var(--space-xs); }
  #view-inbox .thread-actions { gap: var(--space-xs); }
  #view-inbox .thread-actions > button, #view-inbox .thread-options > summary, #view-inbox .inbox-filter-menu > summary { min-height: 2.75rem; }
  #view-inbox .thread-options-menu { left: auto; right: 0; }
  #view-inbox .thread-body { padding: var(--space-md); }
  #view-inbox .bubble-row { max-width: 94%; }
  #view-inbox .composer { padding: var(--space-sm); }
  #view-inbox .composer .gif-picker { left: var(--space-sm); width: min(340px, calc(100% - 2 * var(--space-sm))); }
  #view-inbox .composer textarea { min-height: 4.5rem; height: 4.5rem; }
}

/* ---------- API and MCP settings ---------- */
.settings-card { display: grid; gap: var(--space-md); min-width: 0; padding: var(--space-lg); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); }
.settings-card > * { min-width: 0; }
.settings-head h3 { font-size: var(--text-lg); }
.settings-head p { margin-top: var(--space-2xs); font-size: var(--text-md); }
.key-form { display: flex; gap: var(--space-xs); }
.key-form input { flex: 1; }
.key-reveal { display: grid; gap: var(--space-xs); padding: var(--space-md); border: 1px solid var(--color-rule-2); border-radius: var(--radius-input); background: var(--color-paper-2); color: var(--color-ink-2); }
.key-reveal strong { color: var(--color-warn); }
.key-reveal > * { min-width: 0; }
.code-row { position: relative; min-width: 0; }
.copy-icon { position: absolute; top: .375rem; right: .375rem; display: grid; place-items: center; width: 2rem; height: 2rem; min-height: 0; padding: 0; border: 0; border-radius: var(--radius-sm); background: none; color: var(--color-muted); }
.copy-icon:hover { background: var(--color-paper-3); color: var(--color-ink); }
.copy-icon .icon { width: 1rem; height: 1rem; }
.code-row pre { min-width: 0; margin: 0; padding: var(--space-sm) 2.75rem var(--space-sm) var(--space-sm); overflow-x: auto; border: 1px solid var(--color-rule); border-radius: var(--radius-input); background: var(--color-mist); color: var(--color-ink); font: 400 var(--text-sm)/1.6 var(--font-mono); white-space: pre; }
.setting-label { font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }
#mcp-setup { display: grid; gap: var(--space-xs); }
#mcp-setup .code-row + .setting-label { margin-top: var(--space-sm); }
.keys-table tr.revoked th, .keys-table tr.revoked td { color: var(--color-faint); }
.keys-table tbody tr { height: 3rem; }
@media (max-width: 60rem) { .key-form { flex-wrap: wrap; } .keys-table th:nth-child(3), .keys-table td:nth-child(3), .keys-table th:nth-child(4), .keys-table td:nth-child(4) { display: none; } .keys-table th, .keys-table td { min-width: 0; } }

/* ---------- follow-ups and workflows ---------- */
#seq-dialog { width: min(720px, calc(100% - var(--space-lg))); }
.seq-list { display: grid; gap: var(--space-sm); margin: var(--space-md) 0; padding: 0; list-style: none; }
.seq-step { display: grid; gap: var(--space-xs); padding: var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-input); }
.seq-first { background: var(--color-mist); }
.seq-wait { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-xs); font-size: var(--text-md); }
.seq-wait label { margin: 0; font-size: var(--text-md); font-weight: 500; }
.seq-wait .quiet { margin-left: auto; }
.days-input { width: 4.5rem !important; }
.templates { margin-bottom: var(--space-lg); }
.templates .card-title { margin-bottom: var(--space-sm); }
.template-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-sm); }
.template { display: grid; justify-items: start; align-content: start; gap: var(--space-xs); min-height: 8.5rem; padding: var(--space-md); white-space: normal; text-align: left; }
.template-name { font-weight: 500; color: var(--color-ink); }
.template-blurb { font-size: var(--text-sm); font-weight: 400; color: var(--color-muted); line-height: 1.5; }
.workflow-form { margin-bottom: var(--space-lg); }
.wf-pair { display: grid; grid-template-columns: minmax(0, 1fr) 6rem; gap: var(--space-sm); }
.wf-days { display: flex; align-items: flex-end; flex-wrap: wrap; gap: var(--space-md); margin: 0; }
.wf-days legend { width: 100%; }
.day-row { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }
.day-pick { display: inline-flex; align-items: center; gap: var(--space-2xs); margin: 0; min-height: var(--control-height); padding: 0 var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-input); font-weight: 500; cursor: pointer; }
.day-pick:has(input:checked) { border-color: var(--color-ink); background: var(--color-surface); color: var(--color-ink-strong); }
.wf-time { display: flex; align-items: center; gap: var(--space-xs); }
.wf-time label { margin: 0; }
.wf-time input { width: auto; }
.workflow-list { display: grid; gap: var(--space-sm); }
.workflow { display: flex; align-items: center; justify-content: space-between; gap: var(--space-lg); padding: var(--space-md) var(--space-lg); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); }
.workflow.off { background: var(--color-mist); }
.workflow.off h3, .workflow.off .workflow-what { color: var(--color-muted); }
.workflow-main { display: grid; gap: var(--space-2xs); min-width: 0; }
.workflow-main h3 { font-size: var(--text-lg); }
.workflow-what { color: var(--color-ink-2); }
.workflow-when { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-xs); font-size: var(--text-sm); color: var(--color-ink-2); }
.workflow-when .icon { width: 1rem; height: 1rem; color: var(--color-muted); }
.workflow-actions { display: flex; align-items: center; gap: var(--space-xs); flex: none; }
.switch { position: relative; display: inline-block; width: 2.5rem; height: 1.5rem; margin: 0; cursor: pointer; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: var(--radius-pill); background: var(--color-rule-2); pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 1.125rem; height: 1.125rem; border-radius: var(--radius-pill); background: var(--color-surface); box-shadow: var(--shadow-card); transition: transform var(--dur-micro) var(--ease-out); }
.switch input:checked + span { background: var(--color-accent); }
.switch input:checked + span::after { transform: translateX(1rem); }
.switch input:focus-visible + span { outline: 2px solid var(--color-focus); outline-offset: 2px; }
@media (max-width: 80rem) { .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .template-grid { grid-template-columns: minmax(0, 1fr); } .workflow { flex-direction: column; align-items: stretch; } .workflow-actions { justify-content: flex-start; } }

/* ---------- invitations, posts, contact ---------- */
.network-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; margin-bottom: var(--space-md); }
.network-bar .filters { margin: 0; }
.net-bulk { display: flex; gap: var(--space-xs); }
.net-bulk select { width: auto; }
.net-older { display: flex; align-items: center; gap: var(--space-xs); white-space: nowrap; }
.net-older label { color: var(--color-muted); font-size: var(--text-sm); }
.net-note { max-width: 28rem; }
.net-age { white-space: nowrap; }
.pair-buttons { display: inline-flex; gap: var(--space-xs); }
.chip-button { min-height: 0; border: 0; cursor: pointer; }
.action-desc { grid-column: 1 / -1; padding: var(--space-md); border-radius: var(--radius-input); background: var(--color-mist); font-size: var(--text-lg); color: var(--color-ink); }
.person-extras { display: grid; gap: var(--space-xs); margin-top: var(--space-lg); padding-top: var(--space-lg); border-top: 1px solid var(--color-rule); justify-items: start; }
.person-extras h3 { font-size: var(--text-md); margin-top: var(--space-xs); }
.person-extras .record-facts { margin: 0; width: 100%; }
.post-list { display: grid; gap: var(--space-sm); width: 100%; margin: 0; padding: 0; list-style: none; }
.post { display: grid; gap: var(--space-xs); padding: var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-input); }
.post-text { font-size: var(--text-md); color: var(--color-ink); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; flex-wrap: wrap; gap: var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); }
.post-actions { display: flex; gap: var(--space-xs); align-items: center; }
.post-comment { display: grid; gap: var(--space-xs); }
.post-comment textarea { min-height: 3.5rem; }

/* The side panel narrows list tables, so they drop Location. A drawer floats over the page and narrows nothing. */
.with-person:not(.person-over) .people-status thead th:nth-child(3), .with-person:not(.person-over) .people-status td[data-label="Location"] { display: none; }

/* ---------- sending limits ---------- */
.usage-bar { display: block; height: .375rem; border-radius: var(--radius-pill); background: var(--color-paper-2); overflow: hidden; }
.usage-bar span { display: block; height: 100%; background: var(--color-accent); }
.limits-form { display: grid; gap: var(--space-md); }

/* ---------- connector and setup ---------- */
.tag-green { background: var(--color-success-bg); color: var(--color-success); }
.steps-list { display: grid; gap: var(--space-sm); margin: 0; padding-left: var(--space-lg); }
.steps-list li { padding-left: var(--space-2xs); }
.steps-list .code-row { margin-top: var(--space-xs); }
.pair-code { display: grid; gap: var(--space-2xs); justify-items: start; padding: var(--space-md); border: 1px solid var(--color-accent-soft); border-radius: var(--radius-input); background: var(--color-accent-wash); }
.pair-code strong { font: 600 var(--text-4xl)/1 var(--font-mono); letter-spacing: .18em; color: var(--color-ink); }
.setup-card { display: grid; gap: var(--space-sm); margin-bottom: var(--space-md); padding: var(--space-lg); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); }
.setup-list { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.task.done { opacity: 1; background: var(--color-mist); }
.task.done .task-label { color: var(--color-muted); text-decoration: line-through; }
.task.done .task-icon { color: var(--color-success); }

/* ---------- accounts ---------- */
.account-name { margin-left: auto; font-weight: 500; color: var(--color-ink); }
.account-menu summary { min-height: 2rem; display: flex; align-items: center; cursor: pointer; color: var(--color-link); list-style: none; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu ul { margin: 0 0 var(--space-xs); padding: 0; list-style: none; display: grid; gap: var(--space-2xs); }
/* The account card sits on the deep rail, so its name and its link take the on-dark inks. */
.workspace-card .account-name { color: var(--color-on-dark); font-weight: 500; }
.workspace-card .account-menu summary { color: var(--color-brand-on-dark); }
.workspace-card .account-menu summary:hover { color: var(--color-on-dark); }

/* ---------- direct send and schedule ---------- */
.composer-actions { display: flex; align-items: center; gap: var(--space-xs); flex-wrap: wrap; }
/* Send + caret, one button; the caret opens "Send later" above it. */
.send-split { position: relative; display: inline-flex; }
.send-split .send-main { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.send-split .send-caret { padding-inline: var(--space-xs); border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 1px solid var(--color-on-dark-rule); }
.send-menu, .send-menu * { box-sizing: border-box; }
.send-menu { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 5; display: grid; gap: 2px; width: 380px; max-width: calc(100vw - 2rem); grid-template-columns: minmax(0, 1fr); padding: var(--space-xs); overflow: hidden; border: 1px solid var(--color-rule); border-radius: var(--radius-panel, 12px); background: var(--color-surface); box-shadow: var(--shadow-pop); }
.send-menu:focus { outline: none; }
.send-menu-title { padding: var(--space-xs) var(--space-sm) 2px; font-size: var(--text-xs); font-weight: 500; color: var(--color-muted); }
.send-menu-item { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-sm); min-width: 0; min-height: 0; margin: 0; padding: var(--space-xs) var(--space-sm); box-shadow: none; outline: none; border: 0; border-radius: var(--radius-sm, 8px); background: none; color: var(--color-ink); font-weight: 500; text-align: left; }
.send-menu-item:hover, .send-menu-item:focus-visible { background: var(--color-surface-sunk); }
.send-menu-item:focus-visible { box-shadow: inset 0 0 0 2px var(--color-action); }
.send-menu-item { width: 100%; font-size: var(--text-sm); }
.send-menu-item > span { min-width: 0; white-space: nowrap; }
.send-menu-item > span:last-child { overflow: hidden; text-overflow: ellipsis; font-size: var(--text-xs); }
.send-menu-custom { display: grid; gap: var(--space-2xs, 4px); margin-top: var(--space-2xs, 4px); padding: var(--space-sm) var(--space-sm) var(--space-xs); border-top: 1px solid var(--color-rule); }
.send-menu-row { display: flex; gap: var(--space-xs); }
.send-menu-row input { flex: 1; min-width: 0; min-height: 2.1rem; }
.send-menu-row button { flex: none; }
.composer-schedule { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; padding: var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-input); }
.composer-schedule label { font-weight: 500; color: var(--color-ink); }
.composer-schedule input { min-height: 2.25rem; }

/* ---------- won / lost ---------- */
.outcome-toggle { display: inline-flex; border: 1px solid var(--color-rule); border-radius: var(--radius-input); overflow: hidden; }
.outcome-toggle button { border: 0; border-radius: 0; min-height: 2.25rem; padding: 0 var(--space-sm); background: var(--color-surface); }
.outcome-toggle button + button { border-left: 1px solid var(--color-rule); }
.outcome-toggle button[aria-pressed="true"] { background: var(--color-ink); color: var(--color-surface); }
/* In the More menu the outcomes share one row; "Meeting booked" may wrap inside its button, never mid-word. */
#view-inbox .thread-options-menu .outcome-toggle { display: flex; }
#view-inbox .thread-options-menu .outcome-toggle > button { flex: 1 1 0; min-width: 0; padding: var(--space-2xs, 4px) var(--space-xs); white-space: normal; overflow-wrap: normal; word-break: normal; line-height: 1.2; }

/* ---------- pipeline rates ---------- */
.rate-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md); margin-top: var(--space-xs); }
.rate-card { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; width: 100%; gap: var(--space-2xs); text-align: left; padding: var(--space-md) var(--space-lg); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); color: var(--color-ink); font: inherit; cursor: pointer; transition: border-color var(--dur-micro) var(--ease-out); }
.rate-card:hover { border-color: var(--color-input-edge); }
.rate-card:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.rate-value { font-family: var(--font-body); font-size: var(--text-3xl); font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) { .rate-cards { grid-template-columns: minmax(0, 1fr); } }

/* ---------- inbox list and follow-up filters ---------- */
.inbox-subtools { display: flex; gap: var(--space-sm); flex-wrap: wrap; align-items: center; }
.inbox-subtools .select-field { white-space: nowrap; display: inline-flex; align-items: center; gap: var(--space-2xs); color: var(--color-muted); font-size: var(--text-sm); }
.inbox-subtools select { min-height: 2rem; max-width: 14rem; }

/* ---------- autopilot ---------- */
button.autopilot-on { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-action-ink); }
button.autopilot-on .icon { color: var(--color-action-ink); }

/* ---------- unslop: one accent count ---------- */

/* ---------- sunlit workspace: flat ink actions, pearl buttons, frosted chrome ---------- */
/* Primary is flat ink. Every other button is a pearl fill with no border; quiet, ghost, link and icon rules clear it where they need to. */
button { border-radius: var(--radius-button); border-color: var(--color-rule-2); background: var(--color-paper); font-weight: 400; }
button:hover:not(:disabled) { background: var(--color-paper-2); border-color: var(--color-silver); }
button:active:not(:disabled) { background: var(--color-paper-3); }
button.primary, button.go { border-color: var(--color-clear); background: var(--color-action); font-weight: 400; transition: background-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
button.primary:hover:not(:disabled), button.go:hover:not(:disabled) { background: var(--color-action-hover); border-color: var(--color-clear); }
button.primary:active:not(:disabled), button.go:active:not(:disabled) { background: var(--color-action-hover); transform: scale(.98); }
button.danger:not(.quiet, .ghost) { background: var(--color-paper); color: var(--color-error); }

/* Frosted chrome: the page head stays readable over scrolling content */
.screen-head { position: sticky; top: 0; z-index: var(--z-sticky); padding-top: var(--space-md); background: var(--color-glass); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
dialog { border-color: var(--color-rule); border-radius: var(--radius-dialog); background: var(--color-surface); box-shadow: var(--shadow-pop); }
dialog::backdrop { background: var(--color-overlay); }
.toast { border-color: var(--color-clear); border-radius: var(--radius-card); background: var(--color-graphite); color: var(--color-on-dark); box-shadow: var(--shadow-pop); }
.toast-stop { display: flex; align-items: baseline; gap: var(--space-xs); background: var(--color-graphite); color: var(--color-on-dark); }
.toast-stop::before { content: ""; flex: none; box-sizing: border-box; width: .625rem; height: .625rem; border: 2px solid var(--color-error-bg); border-radius: var(--radius-pill); }

/* Dashboard moment: the brand wash with the next task on a white card */
.glass { border: 0; background: var(--color-surface); box-shadow: var(--shadow-lift); }

/* ---------- settings: three tabs ---------- */
.settings-layout { display: grid; grid-template-columns: 13rem minmax(0, 1fr); align-items: start; gap: var(--space-xl); }
.settings-tabs { position: sticky; top: var(--space-md); display: grid; gap: 2px; }
.settings-group { margin: var(--space-md) 0 var(--space-2xs); padding: 0 var(--space-sm); color: var(--color-muted); font-size: var(--text-sm); }
.settings-group:first-child { margin-top: 0; }
.settings-tabs button { justify-content: flex-start; width: 100%; min-height: 2.25rem; gap: var(--space-xs); padding: 0 var(--space-sm); border: 0; border-radius: 8px; background: var(--color-clear); box-shadow: none; color: var(--color-muted); font-weight: 500; text-align: left; }
.settings-tabs button .icon { width: 1rem; height: 1rem; }
.settings-tabs button:hover:not(:disabled) { background: var(--color-sheen); color: var(--color-ink); }
.settings-tabs button[aria-selected="true"] { background: var(--color-surface); color: var(--color-ink-strong); box-shadow: 0 0 0 1px var(--color-rule), var(--shadow-xs); }
.tab-state { padding: 0 var(--space-xs); border-radius: var(--radius-pill); background: var(--color-accent-soft); color: var(--color-ink); font-size: var(--text-xs); line-height: 1.25rem; }
.tab-state:empty { display: none; }
.settings-panel { display: grid; gap: var(--space-lg); max-width: 60rem; }
.settings-panel[hidden] { display: none; }
#panel-developers { max-width: none; }
.panel-intro h3 { font-size: var(--text-2xl); font-weight: 400; letter-spacing: -.014em; }
.panel-intro p { margin-top: var(--space-2xs); font-size: var(--text-md); }
.settings-head h3 { font-size: var(--text-lg); }
.settings-head p { margin-top: var(--space-2xs); font-size: var(--text-md); }

/* connection: mode note and a numbered checklist */
#connector { display: grid; gap: var(--space-lg); }
.csteps { display: grid; margin: 0; padding: 0; list-style: none; border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); }
.cstep { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: var(--space-md); padding: var(--space-lg); }
.cstep + .cstep { border-top: 1px solid var(--color-rule); }
.cstep-mark { display: grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid var(--color-rule-2); border-radius: var(--radius-pill); font-size: var(--text-md); font-weight: 500; color: var(--color-muted); font-variant-numeric: tabular-nums; }
.cstep-mark .icon { width: 1.25rem; height: 1.25rem; }
.cstep.is-done .cstep-mark { border-color: var(--color-brand); background: var(--color-clear); color: var(--color-brand); }
.cstep.is-current .cstep-mark { border-color: var(--color-action); background: var(--color-action); color: var(--color-action-ink); }
.cstep.is-later { opacity: .6; }
.cstep-body { display: grid; gap: var(--space-xs); min-width: 0; padding-top: 4px; }
.cstep-body h4 { margin: 0; font-size: var(--text-lg); font-weight: 500; color: var(--color-ink-strong); }
.cstep-body .steps-list { margin-top: var(--space-xs); }
.cstep-body .actions { margin-top: var(--space-sm); }
.unpair-row { display: flex; justify-content: flex-end; }

/* sending: today's figures, then labelled groups */
.usage-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); }
.usage { display: grid; gap: var(--space-3xs); padding: var(--space-md) var(--space-lg); box-shadow: -1px -1px 0 var(--color-rule); }
.usage-value { font: 500 var(--text-2xl)/1.25 var(--font-body); color: var(--color-ink-strong); font-variant-numeric: tabular-nums; }
.usage-of { font-size: var(--text-md); font-weight: 400; color: var(--color-faint); }
.limits-form { display: grid; border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); }
.limit-group { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: var(--space-xl); margin: 0; padding: var(--space-lg); border: 0; }
.limit-group + .limit-group { border-top: 1px solid var(--color-rule); }
.limit-title { font-weight: 500; color: var(--color-ink-strong); }
.limit-label .small { margin-top: var(--space-3xs); }
.limit-controls { display: grid; align-content: start; gap: var(--space-sm); min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: var(--space-sm); }
.field { display: grid; gap: var(--space-2xs); min-width: 0; }
.field label { margin: 0; font-size: var(--text-sm); color: var(--color-muted); }
.input-unit { display: flex; align-items: center; min-width: 0; border: 1px solid var(--color-input-edge); border-radius: var(--radius-input); background: var(--color-surface); }
.input-unit:focus-within { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.input-unit input { flex: 1; min-width: 0; border: 0; background: var(--color-clear); outline: none; font-variant-numeric: tabular-nums; }
.input-unit input:focus-visible { outline: none; }
.input-unit span { padding-right: var(--space-sm); font-size: var(--text-sm); color: var(--color-faint); white-space: nowrap; }
.switch-row { display: inline-flex; align-items: center; gap: var(--space-sm); margin: 0; font-weight: 500; color: var(--color-ink); cursor: pointer; }
.limits-form.limits-off .limit-group:not(:first-child) { opacity: .5; }
.limit-group .wf-days { padding: 0; border: 0; }
.day-pick { border-radius: var(--radius-pill); }
.day-pick input { position: absolute; opacity: 0; pointer-events: none; }
.day-pick:has(input:checked) { border-color: var(--color-clear); background: var(--color-accent-soft); color: var(--color-ink-strong); }
.day-pick:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.limits-form .problem:empty { display: none; }
.limits-form .problem { margin: 0 var(--space-lg) var(--space-md); }
.save-bar { position: sticky; bottom: var(--space-md); z-index: var(--z-sticky); display: flex; align-items: center; gap: var(--space-sm); margin: 0 var(--space-md) var(--space-md); padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-lg); border-radius: 14px; box-shadow: var(--shadow-float); }
.save-bar[hidden] { display: none; }
.save-bar p { flex: 1; font-size: var(--text-md); font-weight: 500; color: var(--color-ink); }

/* developers: keys and assistant side by side, then the tool table */
.connect-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-md); }
.connect-head .button-link { flex: none; }
.assistant-tabs { display: flex; flex-wrap: wrap; gap: var(--space-3xs); justify-self: start; padding: var(--space-3xs); border-radius: var(--radius-input); background: var(--color-paper-2); }
.assistant-tabs button { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 2.25rem; padding: 0 var(--space-sm); border: 0; border-radius: calc(var(--radius-input) - 2px); background: none; color: var(--color-muted); font-weight: 500; }
.assistant-tabs button:hover { color: var(--color-ink); }
.assistant-tabs button[aria-selected="true"] { background: var(--color-surface); color: var(--color-ink); box-shadow: var(--shadow-xs); }
.assistant-tabs .icon { display: inline-block; width: 1rem; height: 1rem; color: inherit; }
.connect-steps { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: var(--space-md); margin: var(--space-md) 0 0; padding: 0; list-style: none; counter-reset: step; }
.connect-steps > li { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: var(--space-xs); padding-left: 2.25rem; position: relative; line-height: 1.5; counter-increment: step; }
.connect-steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--color-paper-2); color: var(--color-muted); font-size: var(--text-sm); font-weight: 500; }
.connect-steps > li > p { margin: 0; }
.connect-steps > li > div:not(.code-row) { display: flex; gap: var(--space-xs); flex-wrap: wrap; }
.connect-steps .icon.brand { display: inline-block; width: 1rem; height: 1rem; color: inherit; }
.connect-steps .icon.brand svg { width: 100%; height: 100%; }
@media (max-width: 40rem) { .connect-steps > li { padding-left: 2rem; } }
.connect-steps code { font-family: var(--font-mono); font-size: .9em; }
.connect-foot { margin: var(--space-sm) 0 0; padding-top: var(--space-md); border-top: 1px solid var(--color-rule); }
.connect-foot a { text-decoration: underline; text-underline-offset: 2px; }
.code-more { margin-top: var(--space-sm); }
.code-more summary { cursor: pointer; font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }
.code-more[open] summary { margin-bottom: var(--space-xs); }
@media (max-width: 760px) {
  .settings-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
  .settings-tabs { position: static; display: flex; overflow-x: auto; gap: var(--space-3xs); padding-bottom: var(--space-2xs); }
  .settings-tabs button { flex: none; width: auto; padding-inline: var(--space-sm); white-space: nowrap; }
  .settings-group { display: none; }
  .usage-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .limit-group { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
}

/* connection: sign in to LinkedIn in outlo's own browser */
.signin-form { display: grid; gap: var(--space-sm); max-width: 36rem; margin-top: var(--space-xs); }
.signin-form .actions { margin-top: var(--space-2xs); }
.signin-form #signin-code { max-width: 12rem; font-size: var(--text-xl); letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.signin-note { padding: var(--space-sm) var(--space-md); border-radius: var(--radius-input); background: var(--color-accent-wash); color: var(--color-ink); font-size: var(--text-md); }
.signin-wait { display: flex; align-items: center; gap: var(--space-sm); margin-top: var(--space-xs); font-size: var(--text-md); color: var(--color-ink-2); }
.signin-wait[hidden] { display: none; }
.spinner { width: 14px; height: 14px; flex: none; border: 2px solid var(--color-accent); border-right-color: var(--color-clear); border-radius: var(--radius-pill); animation: progress-turn 900ms linear infinite; }
.cstep-body .problem:empty { display: none; }
.proxy-card .key-form input { font-family: var(--font-mono); font-size: var(--text-sm); }
.proxy-card .problem:empty { display: none; }
.mailbox-card .problem:empty { display: none; }
.mailbox-row { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; min-width: 0; }
.mailbox-who { min-width: 0; overflow-wrap: anywhere; }
.mailbox-address { font-weight: 500; }
.mailbox-form { display: grid; gap: var(--space-sm); }
.mailbox-form select { max-width: 22rem; }
.mailbox-password-part, .mailbox-steps-wrap { display: grid; gap: var(--space-sm); }
.mailbox-steps-wrap p { margin: 0; }
.mailbox-notice { display: grid; gap: var(--space-2xs); padding: var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-card); }
.mailbox-notice h4, .domain-check h4 { margin: 0; }
.mailbox-steps { margin: 0; padding-left: 1.25rem; display: grid; gap: var(--space-2xs); font-size: var(--text-sm); }
.mailbox-steps a { white-space: nowrap; }
.domain-check { display: grid; gap: var(--space-xs); }
.domain-check ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-xs); }
.domain-check li { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2xs) var(--space-sm); align-items: baseline; min-width: 0; overflow-wrap: anywhere; }
.domain-check li > p { grid-column: 2; margin: 0; }
.domain-check .link { justify-self: start; }
.sender-inbox { min-width: 0; overflow-wrap: anywhere; }
.task-optional { margin-left: var(--space-xs); }
.live-screen { position: relative; margin-top: var(--space-sm); overflow: hidden; border: 1px solid var(--color-rule-2); border-radius: var(--radius-card); background: var(--color-paper-2); aspect-ratio: 1280 / 860; cursor: pointer; }
.live-screen:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.live-screen img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; }
.live-screen img:not([src]) { visibility: hidden; }
.live-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: var(--space-sm); margin: 0; font-size: var(--text-md); color: var(--color-muted); }
.live-wait[hidden] { display: none; }

/* a notice: one line, its action as a link, a close button at the end */
.notice { display: flex; align-items: center; gap: var(--space-sm); width: fit-content; max-width: 100%; padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-md); border-radius: var(--radius-button); font-size: var(--text-sm); }
.notice p { margin: 0; }
.notice-stop { border: 1px solid var(--color-rule-2); background: var(--color-paper); color: var(--color-ink-2); }
.notice-stop::before { content: ""; flex: none; box-sizing: border-box; width: .625rem; height: .625rem; border: 2px solid var(--color-error); border-radius: var(--radius-pill); }
.notice-stop strong { color: var(--color-error); font-weight: 600; }
.notice .link { flex: none; color: var(--color-error); font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.notice .link:hover:not(:disabled) { color: var(--color-ink); }
.notice-close { flex: none; width: 1.75rem; min-height: 1.75rem; padding: 0; border: 0; border-radius: 6px; background: none; box-shadow: none; color: currentColor; }
.notice-close:hover:not(:disabled) { background: color-mix(in srgb, var(--color-error) 10%, transparent); border: 0; }
.notice-close .icon { width: .875rem; height: .875rem; }
/* a neutral notice (the roles upgrade): a hairline ring, and a close that hovers grey, not the error tint */
.notice-info { border: 1px solid var(--color-rule-2); background: var(--color-paper); color: var(--color-ink-2); }
.notice-info .notice-close:hover:not(:disabled) { background: var(--color-mist); }
/* the privacy update is a paragraph, not one line: a bar across the top like the Black Friday one (flush, square, an
   edge under it), stacked straight under that bar when both show, text filling it, close at the far end */
.privacy-notice { width: auto; max-width: none; margin-inline: calc(-1 * var(--banners-inline)); padding-inline: var(--banners-inline) var(--space-md); border: solid var(--color-rule-2); border-width: 0 0 1px; border-radius: 0; background: var(--color-paper); color: var(--color-ink-2); line-height: 1.4; }
.banners > .privacy-notice:first-child { margin-top: calc(-1 * var(--space-sm)); }
.banners > .sale-welcome:first-child + .privacy-notice { margin-top: calc(-1 * var(--space-xs)); }
.privacy-notice p { flex: 1; max-width: none; text-wrap: pretty; } /* the global p { max-width: 75ch } squeezed it into a column */
.privacy-notice strong { color: var(--color-ink-strong); font-weight: 600; }
.privacy-notice a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.privacy-notice .notice-close:hover:not(:disabled) { background: var(--color-mist); }
.account-add { display: flex; gap: var(--space-2xs); margin-bottom: var(--space-xs); }
.account-add input { flex: 1; min-width: 0; }

/* ---------- hosted: sign-in, sign-up, invite ---------- */
.auth-page { display: grid; place-items: center; padding: var(--space-lg); }
.auth-card { width: min(26rem, 100%); display: grid; gap: var(--space-md); padding: var(--space-xl); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-card); }
.auth-card .brand { display: flex; align-items: center; gap: var(--space-xs); font-weight: 500; }

.oauth-page { display: grid; place-items: center; padding: clamp(1rem, 4vw, 3rem); }
.oauth-card { width: min(45rem, 100%); min-width: 0; display: grid; gap: var(--space-md); padding: clamp(1rem, 4vw, 2rem); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); overflow-wrap: anywhere; }
.oauth-card h1 { max-width: none; font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 500; }
.oauth-card h2 { font-size: var(--text-lg); }
.oauth-access { display: grid; gap: var(--space-xs); padding: var(--space-md); background: var(--color-mist); border-radius: var(--radius-input); }
.oauth-card form { display: grid; gap: var(--space-md); }
.oauth-card fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.oauth-card legend, .oauth-ws-label { margin-bottom: var(--space-xs); padding: 0; font-weight: 500; }
.oauth-ws-choices { display: grid; gap: var(--space-xs); }
.oauth-ws { display: flex; align-items: center; gap: var(--space-sm); min-height: 2.75rem; max-width: none; padding: var(--space-xs) var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-input); background: var(--color-surface); }
label.oauth-ws { cursor: pointer; }
label.oauth-ws:hover { background: var(--color-mist); }
.oauth-ws:has(input:checked) { border-color: var(--color-focus); background: var(--color-mist); }
.oauth-ws input { flex: none; accent-color: var(--color-focus); }
.oauth-actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.oauth-actions button { min-height: 2.75rem; padding-inline: var(--space-lg); }
.oauth-card summary { cursor: pointer; width: fit-content; }
.oauth-card details p { margin-top: var(--space-xs); }
.auth-title { font-family: var(--font-display); font-size: var(--text-heading); font-weight: 500; line-height: 1.2; margin: 0; }
.auth-form { display: grid; gap: var(--space-sm); }
.auth-form button.primary { width: 100%; margin-top: var(--space-xs); }
.auth-field label { margin-bottom: var(--space-2xs); }
.team-list { list-style: none; margin: 0; padding: 0; display: grid; }
.team-list li { display: flex; align-items: center; gap: var(--space-sm); min-height: 2.75rem; border-top: 1px solid var(--color-rule); }
.team-list li > :first-child { font-weight: 500; }
.team-list li button { margin-left: auto; }
#team { display: grid; gap: var(--space-md); }
#auth { display: grid; gap: var(--space-sm); }

/* ---------- hosted: workspace switcher (top of the sidebar) ---------- */
.brand-row { flex-wrap: wrap; flex-shrink: 0; }
#ws-switch:empty { display: none; }
#ws-switch { width: 100%; }
.ws-menu { position: relative; }
.ws-menu > summary { display: flex; align-items: center; gap: var(--space-xs); min-height: 2.5rem; padding: 0 var(--space-xs); border: 1px solid var(--color-rule); border-radius: var(--radius-input); background: var(--color-surface); cursor: pointer; list-style: none; font-weight: 500; }
.ws-menu > summary::-webkit-details-marker { display: none; }
.ws-menu > summary:hover { border-color: var(--color-rule-2); }
/* On the deep rail the switcher is a deep control; its menu stays a light sheet. */
.workspace-nav .ws-menu > summary { border-color: var(--color-on-dark-rule); background: var(--color-deep-2); color: var(--color-on-dark); }
.workspace-nav .ws-menu > summary:hover { border-color: var(--color-on-dark-muted); }
.workspace-nav .ws-menu > summary .icon { color: var(--color-on-dark-muted); }
.workspace-nav .ws-menu > summary .ws-initial { background: var(--color-brand-on-dark); color: var(--color-deep); }
.workspace-nav .ws-pop { color: var(--color-ink); }
.workspace-nav .ws-pop :is(.muted, .hint) { color: var(--color-muted); }
.workspace-nav .ws-pop .text-link { color: var(--color-link); }
.workspace-nav .ws-pop .problem { color: var(--color-error); }
.ws-menu > summary .icon { margin-left: auto; color: var(--color-muted); }
.ws-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-initial { display: inline-grid; place-items: center; flex: none; width: 1.5rem; height: 1.5rem; border-radius: var(--radius-sm); background: var(--color-action); color: var(--color-action-ink); font-size: var(--text-xs); font-weight: 500; }
.ws-initial.ws-new { background: var(--color-mist); color: var(--color-ink-2); }
.ws-pop { position: absolute; z-index: 30; bottom: calc(100% + 4px); left: 0; right: 0; display: grid; gap: 2px; padding: var(--space-xs); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-card); }
.ws-pop-head { margin: var(--space-2xs) var(--space-xs) var(--space-xs); }
.ws-item { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-xs); border-radius: var(--radius-input); color: var(--color-ink); text-decoration: none; }
.ws-item > span:nth-child(2) { display: grid; min-width: 0; overflow-wrap: anywhere; }
.ws-item:hover { background: var(--color-mist); }
.ws-item .icon { margin-left: auto; color: var(--color-ink); }
.ws-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------- LinkedIn accounts (Settings) and a campaign's accounts ---------- */
#senders:empty { display: none; }
#senders { margin-bottom: var(--space-md); }
.sender-list { list-style: none; margin: 0; padding: 0; display: grid; }
.sender-list li { display: flex; align-items: center; gap: var(--space-sm); min-height: 3rem; border-top: 1px solid var(--color-rule); flex-wrap: wrap; }
.sender-list li.is-selected { background: var(--color-mist); margin-inline: calc(-1 * var(--space-sm)); padding-inline: var(--space-sm); border-radius: var(--radius-input); }
.sender-pick { display: flex; align-items: center; gap: var(--space-sm); border: 0; background: none; padding: 0; min-height: 2.5rem; }
.sender-pick:hover:not(:disabled) { background: none; }
/* The status chip sits right after the name and its edit icon. */
.sender-name { display: inline-flex; align-items: center; gap: .3em; min-width: 0; font-weight: 500; }
/* The borderless trash icon, not its empty box, lines up with the card's right edge. */
.sender-list li > button.quiet.icon-only:last-child { margin-right: -0.5rem; }
/* Grows into the free space and wraps its own text, so the buttons (Remove too) stay on the first line. */
.sender-today { margin-left: auto; flex: 1 1 0; text-align: right; }
/* A signed-out row also has "Reconnect link" (06-17): the day's counts keep a readable width (the row wraps instead). */
.sender-list li:has(> button[aria-label^="Create a reconnect link"]) .sender-today { min-width: 10rem; }
/* A link revealed in a dialog wraps inside the field, clear of its copy button, so all of it shows. */
.agency-dialog .code-row pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.sender-summary { display: grid; justify-items: start; gap: 0; min-height: 0; padding: var(--space-2xs) var(--space-xs); margin-left: calc(-1 * var(--space-xs)); border: 1px solid transparent; background: none; text-align: left; white-space: normal; font-size: var(--text-sm); }
.sender-summary:hover:not(:disabled) { border-color: var(--color-rule); background: var(--color-surface); }
.sender-summary .small { font-size: var(--text-xs); }
.search-with, .search-with > label { display: grid; gap: var(--space-sm); min-width: 0; margin: 0; }
.search-with select { width: 100%; min-width: 0; }
.search-with-hint { margin: 0; font-size: 12px; color: var(--color-muted); overflow-wrap: anywhere; }
.search-with-sales { color: var(--color-ink-2); }
.search-with-senders { margin: 0; }
.sender-dialog:has(.search-with) .actions { flex-wrap: wrap; }
.sender-dialog { width: min(28rem, calc(100% - 2rem)); padding: var(--space-lg); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-card); }
.sender-dialog::backdrop { background: var(--color-overlay); }
.sender-dialog form { display: grid; gap: var(--space-sm); }
.sender-dialog h3 { margin: 0; }
.sender-checks { display: grid; }
.sender-checks label.check span { display: inline; }
.sender-dialog .actions { display: flex; justify-content: flex-end; gap: var(--space-xs); }
.limits-for { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-md); max-width: 20rem; }
.limits-for span { white-space: nowrap; font-weight: 500; }
.ws-pop button.ws-item { width: 100%; min-height: 0; border: 0; background: none; justify-content: flex-start; font-weight: 400; text-align: left; }
.ws-pop button.ws-item:hover:not(:disabled) { background: var(--color-mist); }
.ws-rule { border: 0; border-top: 1px solid var(--color-rule); margin: var(--space-2xs) 0; }
.ws-create { display: flex; gap: var(--space-2xs); padding: 0 var(--space-xs) var(--space-xs); flex-wrap: wrap; }
.ws-create input { flex: 1; min-width: 0; }
.ws-create .problem { flex-basis: 100%; }

/* The bottom card in the workspace app: one status line. */
.workspace-card.compact { padding: 0; border: 0; background: none; box-shadow: none; }
.workspace-card.compact > :not(#ws-switch, #trial-chip) { display: none; }
#billing, #ws-general, #profile { display: grid; gap: var(--space-lg); }
.ws-status { width: 100%; justify-content: flex-start; gap: var(--space-xs); border: 0; background: none; font-size: var(--text-sm); font-weight: 500; color: var(--color-ink-2); }
.ws-status .icon { margin-left: auto; color: var(--color-muted); }
.lamp-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--color-muted); }
.lamp-dot.go { background: var(--color-success); }
.lamp-dot.warn { background: var(--color-warn-solid); }
.sender-head { display: flex; gap: var(--space-md); align-items: flex-start; justify-content: space-between; }
.sender-seats { display: flex; align-items: center; gap: var(--space-sm); flex: none; }
.sender-add { display: flex; gap: var(--space-xs); padding: var(--space-sm); margin-bottom: var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-input); background: var(--color-mist); }
.sender-add input { flex: 1; min-width: 0; max-width: 20rem; }
.risk-notice { display: grid; gap: var(--space-xs); padding: var(--space-md); margin-bottom: var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-input); background: var(--color-mist); }
.risk-notice h4, .risk-notice p { margin: 0; }
.sender-rename { display: flex; gap: var(--space-xs); flex: 1; min-width: 0; }
.sender-rename input { flex: 1; min-width: 0; max-width: 16rem; }
.sender-name .quiet { margin-left: var(--space-2xs); }
.team-list select { margin-left: auto; }
.team-list select + button { margin-left: 0; }
.ws-status > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-card > .metric-head { padding: var(--space-md) var(--space-lg) 0; align-items: center; }
.activity-card > .metric-head .log-heading { padding: 0; }

/* ---------- activity page ---------- */
.history-tools { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin-bottom: var(--space-md); }
.history-tools button[aria-pressed="true"] { background: var(--color-ink); color: var(--color-surface); border-color: var(--color-ink); }
.log .log-day { display: block; padding: var(--space-md) 0 var(--space-2xs); font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); border: 0; }
.keys-pop { border: 1px solid var(--color-rule); border-radius: 12px; padding: var(--space-md) var(--space-lg); max-width: 22rem; background: var(--color-surface); color: var(--color-ink); }
.keys-pop h3 { margin: 0 0 var(--space-sm); font-size: var(--text-md); }
.keys-pop dl { display: grid; grid-template-columns: auto 1fr; gap: var(--space-xs) var(--space-md); margin: 0 0 var(--space-sm); }
.keys-pop dt, .keys-pop dd { margin: 0; }
.keys-pop kbd { display: inline-block; min-width: 1.5em; padding: 0 var(--space-2xs); border: 1px solid var(--color-rule); border-radius: 4px; text-align: center; font-family: inherit; }
.history-system { display: inline-flex; align-items: center; gap: var(--space-xs); margin-left: auto; font-size: var(--text-sm); color: var(--color-muted); }
.history-foot { margin-top: var(--space-md); text-align: center; }

/* ---------- campaign type: recommended or custom ---------- */
.campaign-type { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--space-sm); border: 0; padding: 0; margin: 0 0 var(--space-md); }
.campaign-type legend { font-size: var(--text-sm); font-weight: 500; margin-bottom: var(--space-xs); }
.type-option { display: flex; gap: var(--space-sm); align-items: flex-start; margin: 0; padding: var(--space-sm) var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-input); background: var(--color-surface); cursor: pointer; font-weight: 400; }
.type-option:has(input:checked) { border-color: var(--color-accent); background: var(--color-mist); }
.type-option input { margin-top: 3px; }
.type-option > span { display: grid; gap: 2px; }
.recommended-fields { display: grid; gap: var(--space-xs); margin-bottom: var(--space-md); }
.recommended-fields[hidden] { display: none; }
.sequence-steps { list-style: none; margin: 0 0 var(--space-xs); padding: 0; display: grid; border: 1px solid var(--color-rule); border-radius: var(--radius-input); }
.sequence-steps li { display: grid; grid-template-columns: 8rem 1fr; gap: var(--space-sm); padding: var(--space-xs) var(--space-md); font-size: var(--text-sm); border-top: 1px solid var(--color-rule); }
.sequence-steps li:first-child { border-top: 0; }
.sequence-steps strong { font-weight: 500; }
.type-tag { margin-left: var(--space-xs); font-size: var(--text-xs); vertical-align: middle; }

/* ---------- Run a campaign (Outreach) ---------- */
.run-menu { position: relative; }
.run-menu > summary { list-style: none; display: inline-flex; align-items: center; gap: var(--space-xs); min-height: var(--control-height); padding: 0 var(--space-sm) 0 var(--space-md); border-radius: var(--radius-input); background: var(--color-action); color: var(--color-action-ink); font-weight: 500; cursor: pointer; box-shadow: var(--shadow-card); white-space: nowrap; }
.run-menu > summary::-webkit-details-marker { display: none; }
.run-menu > summary:hover { background: var(--color-action-hover); }
.run-menu .run-caret { display: inline-flex; transition: transform var(--dur-micro) var(--ease-out); }
.run-menu[open] .run-caret { transform: rotate(180deg); }
.run-pop { position: absolute; z-index: 40; top: calc(100% + 8px); right: 0; width: min(46rem, calc(100vw - 2rem)); display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); padding: var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-pop, var(--shadow-card)); }
.run-card { display: flex; flex-direction: column; gap: var(--space-xs); padding: var(--space-lg); border: 1px solid var(--color-rule); border-radius: var(--radius-card); }
.run-card h3 { margin: var(--space-xs) 0 0; font-size: var(--text-lg); font-weight: 500; }
.run-card > p { margin: 0; flex: 1; }
.run-card-top { display: flex; align-items: center; justify-content: space-between; }
.run-icon { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: var(--radius-input); background: var(--color-mist); }
.run-ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-xs); flex: 1; }
.run-ticks li { display: flex; gap: var(--space-xs); align-items: center; }
.run-ticks .icon { color: var(--color-accent); flex: none; }
.run-how { margin: 0; padding: var(--space-sm) var(--space-md); display: grid; gap: var(--space-2xs); font-size: var(--text-sm); background: var(--color-mist); border-radius: var(--radius-input); list-style: none; }
.run-how[hidden] { display: none; }
.run-how strong { font-weight: 600; }
.run-actions { display: flex; gap: var(--space-xs); margin-top: var(--space-sm); }
.run-actions > button { flex: 1; }
@media (max-width: 48rem) { .run-pop { grid-template-columns: 1fr; } }
.run-options { display: grid; gap: 0; }
.run-options label.check { min-height: 2rem; font-size: var(--text-sm); }

/* ---------- connections ---------- */
.conn-stages { margin-bottom: var(--space-sm); }
.conn-scope { display: inline-flex; gap: 0; margin-top: var(--space-sm); }
.conn-scope [role="tab"] { height: var(--control-height); border: 1px solid var(--color-rule); border-radius: 0; }
.conn-scope [role="tab"]:first-child { border-start-start-radius: var(--radius-input); border-end-start-radius: var(--radius-input); }
.conn-scope [role="tab"]:last-child { margin-inline-start: -1px; border-start-end-radius: var(--radius-input); border-end-end-radius: var(--radius-input); }
.conn-scope [role="tab"][aria-selected="true"] { background: var(--color-ink); border-color: var(--color-ink); color: var(--color-surface); }
.conn-scope [role="tab"]:focus-visible { position: relative; z-index: 1; }
.conn-tools { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-bottom: var(--space-md); }
.conn-tools .search-field { flex: 1; min-width: 14rem; }
.conn-person { display: flex; align-items: center; gap: var(--space-sm); min-width: 0; }
.conn-person > span:last-child { display: grid; min-width: 0; }
.conn-name { display: flex; align-items: center; gap: var(--space-2xs); min-width: 0; font-weight: 500; }
.conn-name .person-open { min-width: 0; }
.conn-headline { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 28rem; font-weight: 400; }
.button-link { display: inline-flex; align-items: center; gap: var(--space-2xs); text-decoration: none; color: var(--color-ink-2); padding: var(--space-2xs) var(--space-xs); border: 1px solid var(--color-rule); border-radius: var(--radius-input); }
.button-link:hover { background: var(--color-mist); }

/* ---------- person panel: full profile ---------- */
.profile-badges, .profile-skills { display: flex; flex-wrap: wrap; gap: var(--space-2xs); margin: 0; }
.profile-text { font-size: var(--text-sm); white-space: pre-line; margin: 0; }
.profile-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-sm); }
.profile-list li { display: grid; gap: 2px; padding-left: var(--space-sm); border-left: 2px solid var(--color-rule); }
.profile-list p { margin: 0; }
.profile-role { font-weight: 500; }

/* ---------- LinkedIn photos, logos and the "in" link ---------- */
.avatar { position: relative; overflow: hidden; flex: none; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.avatar-xl { width: 3.5rem; height: 3.5rem; font-size: var(--text-md); }
.li-link { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; flex: none; border-radius: var(--radius-sm); color: var(--color-linkedin); vertical-align: middle; }
.li-link .icon { width: .95rem; height: .95rem; }
.li-link:hover { background: var(--color-linkedin-wash); }
.li-link.li-premium { color: var(--color-premium); }
.li-link.li-premium:hover { background: var(--color-premium-wash); }
.person-title { display: flex; align-items: center; gap: var(--space-sm); }
.person-title h2 { margin: 0; flex: 1; min-width: 0; }
.who-cell .li-link { margin-left: auto; }
.profile-list li.with-logo { display: grid; grid-template-columns: 2.5rem 1fr; gap: var(--space-sm); padding-left: 0; border-left: 0; }
.profile-list li.with-logo > div { display: grid; gap: 2px; }
.org-logo { width: 2.5rem; height: 2.5rem; border-radius: var(--radius-sm); object-fit: contain; background: var(--color-surface); border: 1px solid var(--color-rule); }
.org-blank { display: grid; place-items: center; font-size: var(--text-xs); font-weight: 500; color: var(--color-muted); background: var(--color-mist); }
.profile-entry { display: grid; gap: 2px; min-width: 0; }
.profile-sublist { list-style: none; margin: var(--space-xs) 0 0; padding: 0 0 0 var(--space-sm); display: grid; gap: var(--space-sm); border-left: 2px solid var(--color-rule); }
.profile-sublist li { border-left: 0; padding-left: 0; }
.dm-link { border: 0; background: none; padding: 0; min-height: 0; color: var(--color-ink-2); cursor: pointer; }
.dm-link:hover:not(:disabled) { background: var(--color-mist); }
.dm-link::before { display: none; }

/* ---------- pages without headers: the sidebar shows where you are; actions sit in each page's toolbar ---------- */
.tool-row { display: flex; gap: var(--space-xs); align-items: center; }
.tool-row .search-field { flex: 1; min-width: 0; }
.icon-button { width: var(--control-height); padding: 0; flex: none; }
.network-bar #network-refresh { margin-left: auto; }
.campaign-table > .section-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.campaign-table > .section-heading h3 { margin: 0; }
.row-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.row-heading h3 { margin: 0; }
.row-heading .card-title { margin: 0; }

/* ---------- person panel: centered header, contact facts; inbox opens it ---------- */
.person-title { flex-direction: column; text-align: center; gap: var(--space-xs); padding-top: var(--space-sm); }
.person-title h2 { flex: none; }
.person-title + .person-headline { text-align: center; }
.person-name-row { display: flex; align-items: center; justify-content: center; gap: var(--space-2xs); max-width: 100%; }
.person-name-row h2 { flex: 0 1 auto; min-width: 0; }
.avatar-xl { width: 5rem; height: 5rem; font-size: var(--text-lg); }
.contact-facts dd { display: grid; gap: 2px; overflow-wrap: anywhere; }
.fact-line { display: block; }
.thread-person { padding: 0; border: 0; background: none; min-height: 0; border-radius: 50%; }
.thread-person::before { display: none; }
.thread-person:hover:not(:disabled) { background: none; opacity: .85; }
.thread-name { font: inherit; color: inherit; padding: 0; min-height: 0; border: 0; background: none; text-align: left; }
.thread-name:hover:not(:disabled) { background: none; text-decoration: underline; }
/* Inbox: the person panel is a drawer over the conversation, not a column that squeezes it. */
.content-frame.with-person.person-over { grid-template-columns: minmax(0, 1fr); }
.content-frame.person-over .person-panel { position: fixed; z-index: 30; align-self: stretch; /* start would size it to its content, so it never scrolls */ top: var(--space-xs); right: var(--space-xs); bottom: var(--space-xs); width: min(26rem, calc(100vw - 2rem)); max-height: none; border: 1px solid var(--color-rule); border-radius: var(--radius-card); box-shadow: var(--shadow-pop, var(--shadow-card)); }
.person-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2xs) var(--space-md); margin: var(--space-xs) 0 var(--space-md); font-size: var(--text-sm); color: var(--color-muted); }
.person-meta > span { display: inline-flex; align-items: center; gap: var(--space-2xs); }
.person-meta .icon { width: .9rem; height: .9rem; }

/* ---------- message attachments: voice notes, shared posts, photos, files ---------- */
.attachment { display: flex; flex-direction: column; gap: var(--space-xs); color: inherit; text-decoration: none; }
.attachment-label { display: inline-flex; align-items: center; gap: var(--space-xs); font-weight: 500; }
a.attachment:hover .attachment-label { text-decoration: underline; }
.attachment img { max-width: 260px; max-height: 260px; border-radius: var(--radius-sm, 8px); object-fit: cover; }
.bubble .attachment + p { margin-top: var(--space-xs); }
.voice-player { flex-direction: row; align-items: center; gap: var(--space-sm); width: 280px; max-width: 100%; padding: var(--space-xs) var(--space-sm) var(--space-xs) var(--space-xs); border-radius: 999px; background: var(--color-surface-sunk); }
.voice-btn { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; flex: none; padding: 0; border: 0; border-radius: 50%; background: var(--color-action); color: var(--color-action-ink); cursor: pointer; }
.voice-btn .icon { width: 1rem; height: 1rem; }
.voice-btn.busy { opacity: .6; }
.voice-seek { --p: 0%; flex: 1; min-width: 0; height: 4px; margin: 0; appearance: none; border-radius: 999px; background: linear-gradient(to right, var(--color-action) var(--p), var(--color-rule) var(--p)); cursor: pointer; }
.voice-seek::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--color-action); }
.voice-seek::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--color-action); }
.voice-time { font-size: var(--text-xs); font-variant-numeric: tabular-nums; color: var(--color-muted); min-width: 2.5rem; text-align: right; }
.attachment-image { padding: 0; border: 0; background: none; cursor: zoom-in; }
.file-card { flex-direction: row; align-items: center; gap: var(--space-sm); width: 280px; max-width: 100%; padding: var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-sm, 8px); background: var(--color-surface); }
.file-card:hover { border-color: var(--color-ink); }
.file-ext { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; flex: none; border-radius: var(--radius-sm, 8px); background: var(--color-surface-sunk); font-size: var(--text-xs); font-weight: 500; }
.file-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.composer-files { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin: var(--space-xs) 0 0; padding: 0; list-style: none; }
.composer-files li { display: flex; align-items: center; gap: var(--space-xs); max-width: 240px; padding: var(--space-2xs, 4px) var(--space-2xs, 4px) var(--space-2xs, 4px) var(--space-xs); border: 1px solid var(--color-rule); border-radius: var(--radius-sm, 8px); background: var(--color-surface); }
.composer-files img, .composer-files .file-ext { width: 2rem; height: 2rem; flex: none; border-radius: 6px; object-fit: cover; }
.attach-btn { display: inline-grid; place-items: center; min-width: 2.25rem; padding-inline: var(--space-xs); }
.attach-gif { font-size: var(--text-xs); font-weight: 500; letter-spacing: .02em; }
.attach-gif.on { background: var(--color-action); color: var(--color-action-ink); }
.attachment-gif { max-width: 260px; max-height: 260px; border-radius: var(--radius-sm, 8px); }
.gif-picker { display: flex; flex-direction: column; gap: var(--space-xs); width: min(340px, 100%); max-height: 400px; margin: 0 auto var(--space-sm) 0; padding: var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-panel, 12px); background: var(--color-surface); box-shadow: var(--shadow-pop); }
.gif-head { display: flex; align-items: center; gap: var(--space-xs); }
.gif-search { display: flex; flex: 1; align-items: center; gap: var(--space-xs); padding: 0 var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-sm, 8px); }
.gif-search:focus-within { border-color: var(--color-action); }
.gif-search input { flex: 1; min-width: 0; border: 0; padding: var(--space-xs) 0; background: none; outline: none; }
.gif-status:empty { display: none; }
.gif-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xs); overflow-y: auto; }
.gif-col { display: flex; flex-direction: column; gap: var(--space-xs); }
.gif-item { display: block; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: var(--color-surface-sunk); cursor: pointer; }
.gif-item img { display: block; width: 100%; height: auto; }
.gif-item:hover, .gif-item:focus-visible { outline: 2px solid var(--color-action); outline-offset: 1px; }
.gif-item.busy { opacity: .5; }
.gif-sk { display: block; height: 110px; border-radius: 6px; background: var(--color-surface-sunk); }
.gif-col:first-child .gif-sk:nth-child(2), .gif-col:last-child .gif-sk:nth-child(3) { height: 80px; }
.gif-col:first-child .gif-sk:nth-child(3), .gif-col:last-child .gif-sk:nth-child(2) { height: 140px; }
.composer.drop-target { outline: 2px dashed var(--color-action); outline-offset: 4px; }
.composer-quote-file { display: inline-flex; align-items: center; gap: 4px; margin-left: var(--space-xs); font-size: var(--text-xs); color: var(--color-muted); }
.composer-quote-file .icon { width: .85rem; height: .85rem; }
.attachment-quote { padding-left: var(--space-sm); border-left: 3px solid var(--color-rule); }
dialog.image-viewer { width: auto; max-width: calc(100vw - 2rem); max-height: calc(100dvh - 2rem); padding: var(--space-sm); display: flex; flex-direction: column; gap: var(--space-sm); }
dialog.image-viewer:not([open]) { display: none; }
.image-viewer img { max-width: 100%; max-height: calc(100dvh - 7rem); object-fit: contain; border-radius: var(--radius-sm, 8px); }
.image-viewer-bar { display: flex; justify-content: flex-end; gap: var(--space-xs); }
.image-viewer-bar a, .image-viewer-bar button { display: inline-flex; align-items: center; gap: var(--space-xs); text-decoration: none; color: inherit; }
.who-line { display: flex; align-items: center; gap: var(--space-xs); }
.who-line .person-open { width: auto; }
.who-cell .who-line .li-link { margin-left: 0; }
.intake-fields { display: grid; grid-template-columns: auto 1fr; gap: var(--space-xs) var(--space-sm); align-items: center; margin: var(--space-sm) 0; }

/* ---------- campaigns table: one line of facts under the name, settings behind a menu ---------- */
.campaign-list .campaign-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-weight: 400; min-width: 14rem; }
.campaign-list .campaign-name { display: inline-flex; align-items: center; gap: var(--space-xs); font-weight: 500; }
.campaign-list .campaign-cell .sender-summary { padding: 0; min-height: 0; }
.campaign-list .facts { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin: 2px 0 0; padding: 0; border: 0; grid-template-columns: none; font-size: inherit; }
.campaign-list .fact { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-xs, .75rem); color: var(--color-ink-2); }
.campaign-list .fact .icon { width: .8rem; height: .8rem; }
.campaign-list .fact.on { color: var(--color-accent); }
.campaign-list td.actions { white-space: nowrap; text-align: right; }
.campaign-list td.actions > * { vertical-align: middle; }
.campaign-list .campaign-progress { white-space: nowrap; }
.row-menu { position: relative; display: inline-block; margin-left: var(--space-xs); }
.row-menu > summary { list-style: none; display: inline-grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid var(--color-rule); border-radius: var(--radius-input); background: var(--color-surface); cursor: pointer; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu > summary:hover, .row-menu[open] > summary { background: var(--color-mist); }
.row-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 14rem; padding: 4px; border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-pop, var(--shadow-card)); text-align: left; }
.row-pop .menu-item { display: flex; width: 100%; align-items: center; gap: var(--space-xs); padding: 6px var(--space-sm); border: 0; background: none; box-shadow: none; min-height: 0; font-weight: 400; border-radius: var(--radius-sm, 6px); justify-content: flex-start; }
.row-pop .menu-item:hover { background: var(--color-mist); }
.row-pop .menu-item::before { display: none; }
.campaign-list .campaign-cell .sender-summary { flex-direction: row; align-items: baseline; gap: 6px; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; font-size: var(--text-sm, .85rem); font-weight: 400; color: var(--color-ink-2); }
.campaign-list .campaign-cell .sender-summary .muted { color: var(--color-accent); }
.campaign-list .campaign-cell .sender-summary::before { display: none; }


/* ---------- flow editor: a full-screen canvas ---------- */
.flow-summary { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm) var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); }
.flow-summary > div { display: grid; flex: 1; }
dialog.flow-editor { width: calc(100vw - 2rem); height: calc(100dvh - 2rem); max-width: none; max-height: none; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
dialog.flow-editor:not([open]) { display: none; }
.fe-bar { display: flex; align-items: center; gap: var(--space-md); padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--color-rule); }
.fe-title h2 { margin: 0; font-size: var(--text-md, 1rem); font-weight: 500; }
.fe-title p { margin: 0; }
.fe-problems { flex: 1; margin: 0; font-size: var(--text-sm, .85rem); color: var(--color-error); text-align: right; }
.fe-problems.ok { color: var(--color-ink-2); }
.fe-tools { display: flex; align-items: center; gap: var(--space-xs); }
.fe-zoom { min-width: 3rem; text-align: center; font-variant-numeric: tabular-nums; color: var(--color-ink-2); font-size: var(--text-sm, .85rem); }
.flow-editor > .problem { margin: 0; padding: 0 var(--space-md); }
.fe-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 13rem minmax(0, 1fr) 19rem; }
.fe-body.readonly { grid-template-columns: minmax(0, 1fr) 19rem; }
.fe-palette { overflow-y: auto; padding: var(--space-sm); border-right: 1px solid var(--color-rule); background: var(--color-surface); }
.fe-palette h4 { margin: var(--space-sm) 0 4px; font-size: var(--text-xs, .75rem); font-weight: 500; color: var(--color-ink-2); }
.fe-add { display: flex; width: 100%; align-items: center; gap: var(--space-xs); justify-content: flex-start; margin-bottom: 4px; padding: 6px var(--space-sm); min-height: 0; font-weight: 400; cursor: grab; }
.fe-canvas { position: relative; overflow: hidden; background-color: var(--color-mist); background-image: radial-gradient(circle, var(--color-dot-grid) 1px, transparent 1px); background-size: 20px 20px; cursor: grab; touch-action: none; outline: none; }
.fe-canvas.panning { cursor: grabbing; }
.fe-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.fe-links { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; }
.fe-link { fill: none; stroke: var(--color-silver); stroke-width: 2; pointer-events: none; }
.fe-link.fe-yes { stroke: var(--color-success); }
.fe-link.fe-no { stroke: var(--color-error); }
.fe-link.selected { stroke: var(--color-accent); stroke-width: 3; }
.fe-link.fe-temp { stroke-dasharray: 5 4; stroke: var(--color-accent); }
.fe-hit { fill: none; stroke: transparent; stroke-width: 14; cursor: pointer; pointer-events: stroke; }
.fe-node { position: absolute; }
.fe-card { display: flex; align-items: flex-start; gap: var(--space-xs); width: 100%; min-height: 74px; padding: 10px; text-align: left; border: 1px solid var(--color-rule); border-radius: 10px; background: var(--color-surface); box-shadow: var(--shadow-xs); font-weight: 400; cursor: pointer; }
.fe-card::before { display: none; }
.fe-node.selected .fe-card { border-color: var(--color-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 22%, transparent); }
.fe-node.fe-bad .fe-card { border-color: var(--color-warn-solid); border-style: dashed; }
.fe-start .fe-card { background: var(--color-action); color: var(--color-action-ink); border-color: transparent; }
.fe-start .fe-sub { color: inherit; opacity: .8; }
.fe-accepted .fe-card, .fe-split .fe-card { border-radius: 18px; background: var(--color-paper-3); }
.fe-icon { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; flex: none; border-radius: 8px; background: var(--color-mist); }
.fe-start .fe-icon { background: var(--color-on-dark-wash); }
.fe-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.fe-text strong { font-weight: 500; font-size: var(--text-sm, .88rem); }
.fe-sub { font-size: var(--text-xs, .75rem); color: var(--color-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fe-in, .fe-out { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--color-surface); border: 2px solid var(--color-silver); transform: translate(-50%, -50%); }
.fe-in { left: 50%; top: 0; }
.fe-out { top: 74px; cursor: crosshair; }
.fe-out:hover { background: var(--color-accent); border-color: var(--color-accent); }
.fe-out-next { left: 50%; }
.fe-out-yes { left: 25%; border-color: var(--color-success); }
.fe-out-no { left: 75%; border-color: var(--color-error); }
.fe-port-label { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); font-size: var(--text-xs); font-weight: 500; color: var(--color-ink-2); white-space: nowrap; }
.readonly .fe-out { cursor: default; }
.fe-quick { position: absolute; z-index: 5; display: grid; gap: 4px; width: 180px; padding: var(--space-xs); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-pop, var(--shadow-card)); }
.fe-quick p { margin: 0 0 2px; }
.fe-quick button { justify-content: flex-start; gap: var(--space-xs); }
.fe-inspector { overflow-y: auto; padding: var(--space-md); border-left: 1px solid var(--color-rule); background: var(--color-surface); display: grid; align-content: start; gap: var(--space-sm); }
.fe-inspector h3 { display: flex; align-items: center; gap: var(--space-xs); margin: 0; font-size: var(--text-md, 1rem); }
.fe-field { display: grid; gap: 4px; }
.fe-field > span:first-child { font-size: var(--text-sm, .85rem); font-weight: 500; }
.fe-field.check { display: flex; align-items: flex-start; gap: var(--space-xs); }
.fe-help { margin: 0; padding-left: 1rem; display: grid; gap: 4px; }
.fe-delete { justify-self: start; margin-top: var(--space-sm); }
@media (max-width: 60rem) { .fe-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; } .fe-palette { display: flex; overflow-x: auto; } .fe-inspector { max-height: 40dvh; } }
.fe-out-yes .fe-port-label { left: auto; right: 12px; top: -1px; transform: none; color: var(--color-success); }
.fe-out-no .fe-port-label { left: 12px; top: -1px; transform: none; color: var(--color-error); }
.fe-quick { overflow-y: auto; cursor: default; }
/* Step cards keep their own colours on hover (the page-wide button hover is light grey, which hid Start's white text). */
.fe-card:hover:not(:disabled) { background: var(--color-surface); border-color: var(--color-rule-2); }
.fe-start .fe-card:hover:not(:disabled) { background: var(--color-action); color: var(--color-action-ink); border-color: transparent; filter: brightness(1.12); }
.fe-accepted .fe-card:hover:not(:disabled), .fe-split .fe-card:hover:not(:disabled), .fe-replied .fe-card:hover:not(:disabled), .fe-has_post .fe-card:hover:not(:disabled), .fe-seen .fe-card:hover:not(:disabled), .fe-viewed .fe-card:hover:not(:disabled) { background: var(--color-control-hover); }
.fe-replied .fe-card, .fe-has_post .fe-card, .fe-seen .fe-card, .fe-viewed .fe-card { border-radius: 18px; background: var(--color-paper-3); }
.net-account-chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: var(--text-sm, .85rem); }
.avatar.avatar-xs { width: 1.4rem; height: 1.4rem; font-size: .6rem; }
.draft-from { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- search filters ---------- */
.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-xs); margin: var(--space-xs) 0 var(--space-sm); }
.filter-bar #filters-toggle { display: inline-flex; align-items: center; gap: 6px; }
.filter-bar .count:not(:empty) { display: inline-grid; place-items: center; min-width: 1.2rem; height: 1.2rem; padding: 0 4px; border-radius: 99px; background: var(--color-accent); color: var(--color-on-dark); font-size: 11px; }
.filters-panel { margin-bottom: var(--space-md); padding: var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); }
.filters-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-sm); }
.filters-head h3 { margin: 0; font-size: var(--text-md, 1rem); }
.filters-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: var(--space-md); }
.filter-group { margin: 0; padding: 0; border: 0; display: grid; gap: var(--space-xs); }
.filter-group legend, .filter-field > label, .filter-field > span:first-child { font-size: var(--text-sm, .85rem); font-weight: 500; padding: 0; margin-bottom: 4px; }
.filter-field { display: grid; gap: 4px; align-content: start; }
.filter-field .hint { margin: 0; }
.pick-choices { display: grid; gap: 2px; max-height: 12rem; overflow-y: auto; }
.pick-choices .check { font-size: var(--text-sm, .85rem); }
.toggle-row { display: flex; gap: var(--space-sm); flex-wrap: wrap; }
.toggle-row.wrap { max-height: 10rem; overflow-y: auto; gap: 4px var(--space-sm); }
.word-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xs); }
.filters-grid > .filter-group:last-child { grid-column: 1 / -1; }
.filters-grid > .filter-group:last-child .word-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.filters-foot { display: flex; justify-content: flex-end; gap: var(--space-xs); margin-top: var(--space-md); }
.filters-grid { align-items: start; }
.pick-box { position: relative; }
.pick-choices:empty { display: none; }
.pick-choices { position: absolute; z-index: 15; left: 0; right: 0; top: calc(100% + 4px); padding: 6px; border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-pop, var(--shadow-card)); max-height: 16rem; }
.pick-choices .check { padding: 4px 6px; border-radius: 6px; align-items: flex-start; }
.pick-choices .check:hover { background: var(--color-mist); }

/* ---------- search page: one search bar, a filter rail on the left, results on the right ---------- */
.search-bar { display: flex; align-items: center; gap: var(--space-xs); padding: 6px 6px 6px var(--space-md); margin-bottom: var(--space-md); border: 1px solid var(--color-rule); border-radius: 14px; background: var(--color-surface); box-shadow: var(--shadow-card); }
.search-bar > .icon { color: var(--color-ink-2); flex: none; }
.search-bar #keywords { flex: 1; min-width: 0; border: 0; box-shadow: none; background: none; font-size: var(--text-md, 1rem); padding: 10px 4px; }
.search-bar #keywords:focus { outline: none; }
.search-bar:focus-within { border-color: var(--color-focus); box-shadow: var(--ring-field); }
.search-bar .filters-toggle { display: none; align-items: center; gap: 6px; }
.search-bar .count:not(:empty), .sec-count:not(:empty) { display: inline-grid; place-items: center; min-width: 1.2rem; height: 1.2rem; padding: 0 5px; border-radius: 99px; background: var(--color-accent); color: var(--color-on-dark); font-size: 11px; font-weight: 500; }
.search-layout { display: grid; grid-template-columns: 17.5rem minmax(0, 1fr); gap: var(--space-md); align-items: start; }
.filter-rail { position: sticky; top: var(--space-sm); max-height: calc(100dvh - 2rem); overflow-y: auto; border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); }
.rail-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--color-rule); }
.rail-head h3 { margin: 0; font-size: var(--text-md, 1rem); }
.filter-sec { border-bottom: 1px solid var(--color-rule); }
.filter-sec:last-child { border-bottom: 0; }
.filter-sec > summary { display: flex; align-items: center; gap: var(--space-xs); padding: 10px var(--space-md); cursor: pointer; list-style: none; font-size: var(--text-sm, .88rem); font-weight: 500; }
.filter-sec > summary::-webkit-details-marker { display: none; }
.filter-sec > summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 1.5px solid var(--color-ink-2); border-bottom: 1.5px solid var(--color-ink-2); transform: rotate(45deg); transition: transform var(--dur-micro) var(--ease-out); }
.filter-sec[open] > summary::after { transform: rotate(-135deg); }
.filter-sec > summary:hover { background: var(--color-mist); }
.filter-sec > :not(summary) { margin: 0 var(--space-md) var(--space-sm); }
.filter-sec .filter-field { gap: 6px; margin-bottom: var(--space-xs); }
.filter-sec .chips { display: flex; flex-wrap: wrap; gap: 4px; }
.filter-sec .chips:empty { display: none; }
.filter-sec .hint:empty { display: none; }
.filter-sec .toggle-row { gap: var(--space-md); }
.lang-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px var(--space-sm); max-height: 12rem; overflow-y: auto; }
.lang-list .check, .filter-sec .check { font-size: var(--text-sm, .88rem); }
.filter-sec .chips .chip { height: auto; white-space: normal; overflow-wrap: anywhere; text-align: start; }
.filter-sec .lang-list { max-height: none; }
#geo-form { display: grid; gap: 6px; }
#geo-choices fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 2px; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.results-head h3 { margin: 0; }
.results-head p { margin: 2px 0 0; }
.stale-note { display: flex; align-items: center; gap: var(--space-xs); margin: 0; padding: 4px 4px 4px var(--space-sm); border: 1px solid var(--color-rule-2); border-radius: var(--radius-pill); background: var(--color-paper); color: var(--color-ink-2); font-size: var(--text-sm); }
.stale-note[hidden] { display: none; }
.active-chips { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 var(--space-md) var(--space-sm); }
.active-chips:empty { display: none; }
#results-body .empty-row td { padding: var(--space-xl, 3rem) var(--space-md); text-align: center; }
#results-body .empty-row td strong { display: block; font-size: var(--text-md, 1rem); font-weight: 500; margin-bottom: 4px; }
#results-body .empty-row td span { color: var(--color-ink-2); }
.pager { display: flex; align-items: center; justify-content: center; gap: var(--space-sm); }
.savebar { position: sticky; bottom: var(--space-sm); z-index: 5; box-shadow: var(--shadow-pop, var(--shadow-card)); }
@media (max-width: 60rem) {
  .search-layout { grid-template-columns: minmax(0, 1fr); }
  .search-bar .filters-toggle { display: inline-flex; }
  .filter-rail { display: none; position: static; max-height: none; }
  .filter-rail.open { display: block; }
}
/* On a phone there's no room for a drawer: the person's details replace the page, as before (Escape or Close brings it back). */
@media (max-width: 60rem) {
  .content-frame.person-over .person-panel { position: static; inset: auto; width: 100%; max-height: none; border: 0; border-radius: 0; box-shadow: none; }
  .content-frame.with-person.person-over .shell { display: none; }
}
@media (max-width: 60rem) {
  .search-bar { flex-wrap: wrap; padding: 6px; }
  .search-bar > .icon { margin-left: 8px; }
  .search-bar #keywords { flex-basis: calc(100% - 3rem); }
  .search-bar .filters-toggle, .search-bar #search-submit { flex: 1; justify-content: center; }
}

/* ---------- sunlit workspace: shared pieces ---------- */
/* Badges are pills. A tinted pill always means a state: success, warning, error or info. */
.pill, .tag-chip, .count { border-radius: var(--radius-pill); }
.pill, .tag-chip { padding-inline: var(--space-sm); }
.chip { border-radius: var(--radius-pill); border-color: var(--color-clear); background: var(--color-paper-3); }
.avatar { border: 0; color: var(--color-ink); font-weight: 500; }
.avatar[class*="tint-"] { background: var(--color-paper-3); color: var(--color-ink-2); }
.brand-mark { border-radius: var(--radius-button); }

/* ---------- sunlit workspace: search ---------- */
.search-bar { min-height: 3rem; border-radius: var(--radius-input); }
.search-bar:focus-within { border-color: var(--color-ink); box-shadow: none; }
.search-bar #keywords { font-size: var(--text-lg); }
.filter-sec > summary { font-weight: 400; color: var(--color-ink); }
.rail-head h3, .results-head h3 { font-size: var(--text-xl); font-weight: 400; letter-spacing: -.011em; }
#results-body .empty-row td strong { font-size: var(--text-2xl); font-weight: 400; letter-spacing: -.02em; margin-bottom: var(--space-xs); }
#results-body .empty-row td span { color: var(--color-muted); }

/* Search pilot: scope the treatment so approved tabs keep their existing layout. */
#view-research .search-intro { padding: var(--space-lg); margin-bottom: var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-paper-2); }
#view-research #h-research { font-size: 2rem; font-weight: 500; line-height: 1.2; letter-spacing: var(--tracking-display); }
#view-research .search-lead { margin-top: var(--space-xs); font-size: var(--text-md); line-height: 1.5; color: var(--color-ink-2); }
#view-research #source-switch { margin-top: var(--space-md); margin-bottom: 0; background: var(--color-surface); }
#view-research .search-bar { padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-md); margin: var(--space-md) 0 0; border-color: var(--color-input-edge); }
#view-research .search-bar:focus-within { border-color: var(--color-ink); outline: 2px solid var(--color-ink); outline-offset: 2px; }
#view-research .search-bar #keywords { padding-block: var(--space-xs); }
#view-research #search-submit { min-width: 6rem; min-height: 2.5rem; }
#view-research .search-layout { grid-template-columns: 16rem minmax(0, 1fr); gap: var(--space-lg); }
#view-research .rail-head { padding: var(--space-md); background: var(--color-paper-2); }
#view-research .rail-head h3, #view-research .results-head h3 { font-size: var(--text-lg); font-weight: 500; letter-spacing: normal; }
#view-research .filter-sec > summary { min-height: 2.75rem; padding: var(--space-sm) var(--space-md); font-size: var(--text-md); }
#view-research .filter-sec[open] { background: var(--color-mist); }
#view-research .filter-sec > :not(summary) { margin-bottom: var(--space-md); }
#view-research .sec-count:not(:empty) { background: var(--color-paper-3); color: var(--color-ink); font-weight: 500; }
/* Clip rounded edges without creating a scroll container that traps the sticky save bar. */
#view-research .results { min-width: 0; overflow: clip; }
#view-research .results-head { padding: var(--space-lg); border-bottom: 0; }
#view-research .results-head p { margin-top: var(--space-2xs); line-height: 1.5; }
#view-research .active-chips { gap: var(--space-xs); padding: 0 var(--space-lg) var(--space-md); }
#view-research .stale-note { border-radius: var(--radius-button); }
#view-research #results-table { table-layout: fixed; }
#view-research #results-table thead th:nth-child(2) { width: 30%; }
#view-research #results-table thead th:nth-child(3) { width: 38%; }
#view-research #results-table tbody th { width: auto; }
#view-research #results-table td[data-label] { font-size: var(--text-md); line-height: 1.5; overflow-wrap: anywhere; }
#view-research #results-table td[data-label="Location"] { color: var(--color-muted); font-size: var(--text-sm); }
#view-research .who-cell { gap: var(--space-xs); }
#view-research .who-cell .person-open { flex: 1; min-width: 0; max-width: none; white-space: normal; overflow-wrap: anywhere; }
#view-research .who-cell .who { min-width: 0; overflow-wrap: anywhere; }
#view-research .row-pick { min-height: 2.75rem; }
#view-research #results-body tr:has(input:checked) { background: var(--color-selected); }
#view-research #results-body .empty-row td { padding: var(--space-3xl) var(--space-lg); background: none; }
#view-research #results-body .empty-row td > strong { font-size: var(--text-2xl); font-weight: 500; }
#view-research #results-body .empty-row td > span { display: block; max-width: 42ch; margin-inline: auto; font-size: var(--text-md); line-height: 1.6; }
#view-research .results .pager { padding: var(--space-md); border-top: 1px solid var(--color-rule); }
#view-research .savebar { gap: var(--space-xs); box-shadow: var(--shadow-lift); }
#view-research #save-count { padding: var(--space-2xs) var(--space-sm); border-radius: var(--radius-pill); background: var(--color-brand-wash); color: var(--color-ink); font-weight: 500; }
#view-research #list-name { flex: 1 1 12rem; min-width: 0; }
@media (max-width: 60rem) {
  #view-research .search-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
  #view-research .search-bar { padding: var(--space-xs); }
  #view-research #filters-toggle, #view-research #search-submit { min-height: 2.75rem; }
}
@media (max-width: 40rem) {
  #view-research .search-intro, #view-research .results-head { padding: var(--space-md); }
  #view-research #h-research { font-size: 1.75rem; }
  #view-research #source-switch { flex-wrap: wrap; }
  #view-research #results-table thead th:nth-child(2), #view-research #results-table thead th:nth-child(3) { width: 1px; }
  #view-research #results-table tbody th { grid-column: 1; grid-row: 1; }
  #view-research #results-body .empty-row td { grid-column: 1 / -1; padding: var(--space-xl) var(--space-md); }
  #view-research #results-body .empty-row { padding: 0; }
  #view-research #results-body .empty-row td > strong { font-size: var(--text-xl); }
  #view-research .active-chips { padding-inline: var(--space-md); }
  #view-research .results .savebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: var(--space-sm); }
  #view-research #save-count { grid-column: 1 / -1; justify-self: start; margin: 0; }
  #view-research #list-name { grid-column: 1 / -1; width: 100%; }
  #view-research #save-btn, #view-research #clear-picks { min-height: 2.75rem; padding-inline: var(--space-xs); font-size: var(--text-sm); }
}

#view-research .search-selection { display: grid; justify-items: start; gap: var(--space-xs); padding: 0 var(--space-lg) var(--space-md); }
#view-research .search-selection:not(:has(button:not([hidden]))):not(:has(p:not(:empty))) { display: none; }
#view-research #selection-note { padding: var(--space-sm); border-radius: var(--radius-button); background: var(--color-brand-wash); color: var(--color-ink); }
.search-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-sm); }
.import-jobs { position: relative; width: fit-content; max-width: 100%; margin-left: auto; }
#view-lists > .import-jobs { margin-bottom: var(--space-md); }
.import-badge { display: flex; align-items: center; gap: var(--space-xs); min-height: 2.25rem; padding: var(--space-2xs) var(--space-sm); border: 1px solid var(--color-rule-2); border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-ink); font-size: var(--text-sm); font-weight: 500; cursor: pointer; list-style: none; }
.import-badge::-webkit-details-marker { display: none; }
.import-badge::after { content: ""; width: 6px; height: 6px; margin: -4px 0 0 var(--space-2xs); border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.import-jobs[open] > .import-badge::after { margin-top: 4px; transform: rotate(225deg); }
.import-badge:hover { background: var(--color-mist); }
.import-badge-count { padding: 2px var(--space-xs); border-radius: var(--radius-pill); background: var(--color-paper-2); font-variant-numeric: tabular-nums; }
.import-count-active { background: var(--color-brand-wash); color: var(--color-brand); }
.import-count-attention { background: var(--color-clear); box-shadow: inset 0 0 0 1px var(--color-warn-solid); color: var(--color-warn); }
.import-popover { position: absolute; top: calc(100% + var(--space-xs)); right: 0; z-index: var(--z-dropdown); width: min(36rem, calc(100vw - 4rem)); max-height: min(28rem, calc(100dvh - 10rem)); overflow: auto; overscroll-behavior: contain; overflow-wrap: anywhere; padding: var(--space-md); border: 1px solid var(--color-rule-2); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-lift); }
.import-popover > h3 { font-size: var(--text-lg); font-weight: 500; }
@media (max-width: 40rem) { .import-badge { min-height: 2.75rem; } }
.import-job { display: grid; gap: var(--space-xs); padding-top: var(--space-md); }
.import-job + .import-job { border-top: 1px solid var(--color-rule); margin-top: var(--space-md); }
.import-job-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-sm); }
.import-job .actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.import-job .actions:empty { display: none; }
.import-history { margin-top: var(--space-lg); padding-top: var(--space-sm); border-top: 1px solid var(--color-rule); }
.import-history-toggle { display: flex; align-items: center; gap: var(--space-xs); min-height: 2.75rem; cursor: pointer; font-size: var(--text-md); font-weight: 500; color: var(--color-ink); list-style: none; }
.import-history-toggle::-webkit-details-marker { display: none; }
.import-history-toggle::after { content: ""; width: 6px; height: 6px; margin-left: auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.import-history[open] > summary::after { transform: rotate(225deg); }
.import-history .import-popover { position: static; width: 100%; max-height: 16rem; margin-top: var(--space-xs); box-shadow: none; background: var(--color-mist); }
.import-job-name { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.import-source, .import-detail { color: var(--color-muted); font-size: var(--text-sm); overflow-wrap: anywhere; }
.import-job .problem { font-size: var(--text-sm); overflow-wrap: anywhere; }
:is(#content-frame #main, body) .import-job-head .import-state { gap: var(--space-2xs); }
:is(.import-state.tag-chip, .import-format-ok, .import-format-bad) { gap: var(--space-2xs); padding-inline: 0; background: none; color: var(--color-ink-2); }
:is(.import-state.tag-chip, .import-format-ok, .import-format-bad)::before { content: ""; flex: none; box-sizing: border-box; width: .625rem; height: .625rem; border: 2px solid var(--color-silver); border-radius: var(--radius-pill); }
.import-format-ok::before { border-color: var(--color-brand); background: var(--color-brand); }
.import-format-bad::before { border-color: var(--color-warn-solid); }
.import-dialog { width: min(44rem, calc(100% - var(--space-xl))); }
.import-form { display: grid; gap: var(--space-md); margin-top: var(--space-md); }
.import-field { display: grid; gap: var(--space-xs); min-width: 0; }
.import-form label, .import-form p { margin: 0; }
.import-file-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-xs); }
.import-sample { gap: var(--space-xs); }
.import-upload { position: relative; display: grid; justify-items: center; align-content: center; gap: var(--space-xs); min-height: 6.5rem; padding: var(--space-md); border: 1px dashed var(--color-silver); border-radius: var(--radius-card); background: var(--color-mist); text-align: center; cursor: pointer; }
.import-upload:hover, .import-upload.is-dragging { border-color: var(--color-ink); background: var(--color-paper-2); }
.import-upload:focus-within { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.import-upload strong { font-size: var(--text-lg); font-weight: 500; overflow-wrap: anywhere; }
.import-upload input { min-height: 0; }
.import-format-help { color: var(--color-ink-2); line-height: 1.5; }
.import-preview { display: grid; gap: var(--space-xs); min-width: 0; margin: 0; padding: var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-card); }
.import-check { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-xs); font-size: var(--text-sm); }
.import-preview .table-wrap { max-height: 10rem; overflow: auto; }
.import-preview table { table-layout: fixed; }
.import-preview th:first-child { width: 35%; }
.import-preview th, .import-preview td { min-width: 0; padding: var(--space-xs); font-size: var(--text-sm); white-space: normal; overflow-wrap: anywhere; }
.import-preview tbody tr { height: auto; }
.import-preview-errors { margin: 0; padding-left: var(--space-lg); font-size: var(--text-sm); color: var(--color-error); overflow-wrap: anywhere; }
.import-preview th:last-child { width: 5rem; }
.import-review-jump { align-items: center; }
.import-review-jump input { width: 6rem; min-width: 0; }
.import-editor { min-width: 0; padding-top: var(--space-sm); border-top: 1px solid var(--color-rule); }
.import-edit-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: var(--space-sm); margin-block: var(--space-sm); }
.import-edit-fields textarea { width: 100%; min-width: 0; min-height: 2.5rem; height: 2.5rem; padding: .5rem .625rem; line-height: 1.25; resize: vertical; }
.import-edit-fields #import-edit-headline, .import-edit-fields #import-edit-links { height: 4rem; }
#list-detail .pane-controls > button, #list-detail .enrich-summary button, #list-detail .run-button { min-height: 2rem; padding: .25rem .625rem; font-size: var(--text-sm); }
.import-form .actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.import-failures { max-height: 50dvh; overflow: auto; padding-left: var(--space-lg); margin-block: var(--space-md); }
.import-failures li { padding-bottom: var(--space-sm); overflow-wrap: anywhere; }
.list-import-button { width: 100%; margin-bottom: var(--space-sm); }
.tier-imported { --tier: var(--color-ink-2); --tier-bg: var(--color-paper-2); }

/* ---------- sunlit workspace: pastel tiles and marks ---------- */
/* The three rates are category tiles: flat colour, no border, no shadow. */
.rate-card { border: 0; background: var(--color-paper-2); color: var(--color-ink); }
.rate-card:hover:not(:disabled) { background: var(--color-paper-3); }
.rate-card .muted, .rate-card span { color: var(--color-ink-2); }
.rate-card .rate-value { color: var(--color-ink); font-weight: 400; letter-spacing: -.03em; }
/* Approved and sent wear the success pill. */
.stamp-approved, .stamp-sending, .stamp-sent { min-height: 1.5rem; padding: 0 var(--space-xs) 0 var(--space-2xs); border-radius: var(--radius-pill); background: var(--color-success-bg); color: var(--color-success); font-weight: 400; }

/* ---------- sunlit workspace: flow editor ---------- */
/* Steps are white cards with a neutral icon chip. Conditions are grey tiles. */
.fe-card { border-radius: var(--radius-card); box-shadow: none; }
.fe-node.selected .fe-card { border-color: var(--color-ink); box-shadow: 0 0 0 1px var(--color-ink); }
.fe-icon { border-radius: var(--radius-button); background: var(--color-paper-3); }
.fe-accepted .fe-card, .fe-split .fe-card, .fe-replied .fe-card, .fe-has_post .fe-card, .fe-seen .fe-card, .fe-viewed .fe-card { border-color: var(--color-clear); border-radius: var(--radius-card); background: var(--color-paper-3); }
.fe-accepted .fe-card:hover:not(:disabled), .fe-split .fe-card:hover:not(:disabled), .fe-replied .fe-card:hover:not(:disabled), .fe-has_post .fe-card:hover:not(:disabled), .fe-seen .fe-card:hover:not(:disabled), .fe-viewed .fe-card:hover:not(:disabled) { background: var(--color-control-hover); border-color: var(--color-clear); }
.fe-accepted .fe-icon, .fe-split .fe-icon, .fe-replied .fe-icon, .fe-has_post .fe-icon, .fe-seen .fe-icon, .fe-viewed .fe-icon { background: var(--color-sheen); }
.fe-start .fe-card:hover:not(:disabled) { filter: none; background: var(--color-action-hover); }
.fe-link { stroke: var(--color-silver); }
.fe-link.fe-yes, .fe-out-yes { stroke: var(--color-success); border-color: var(--color-success); }
.fe-link.fe-no, .fe-out-no { stroke: var(--color-error); border-color: var(--color-error); }
.fe-in, .fe-out { border-color: var(--color-silver); }
.fe-out-yes .fe-port-label { color: var(--color-success); }
.fe-out-no .fe-port-label { color: var(--color-error); }
.fe-node.fe-bad .fe-card { border-color: var(--color-warn-solid); }
.fe-add { background: var(--color-clear); }
.fe-add:hover:not(:disabled) { background: var(--color-paper-2); }
#results-body .empty-row td strong { color: var(--color-ink); }

/* ---------- sunlit workspace: sign-in ---------- */
.auth-card { gap: var(--space-lg); padding: var(--space-xl) var(--space-xl) var(--space-lg); border: 0; box-shadow: var(--shadow-pop); }
.auth-card .brand { font-weight: 500; }
.auth-title { font-size: 1.75rem; font-weight: 400; line-height: 1.1; letter-spacing: -.017em; }
.auth-form { gap: var(--space-md); }
.auth-form input, .auth-form button.primary { height: 2.75rem; font-size: var(--text-lg); }

/* ---------- loading ---------- */
/* The first child is the screen-reader line (a span), so items are counted with nth-of-type.
   While data loads, a screen shows grey bars in the shape of what is coming, with one calm pulse. No "Loading…" text. */
@keyframes sk-pulse { 50% { opacity: .5; } }
/* A light band sweeps across every grey bar, left to right. The band's ends are clear, so the repeat has no seam. */
@keyframes sk-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.sk { display: grid; justify-self: stretch; /* a parent with justify-items: start would shrink the bars to nothing */ }
:is(.sk-dot, .sk-lines i, .sk-card .sk-item, .sk-thread .sk-item, .today-sk i) {
  background-image: linear-gradient(90deg, transparent 20%, var(--color-sheen) 50%, transparent 80%);
  background-size: 200% 100%; animation: sk-shimmer 1.4s linear infinite;
}
.sk-item { display: flex; align-items: center; gap: var(--space-sm); min-height: var(--row-height); padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--color-rule); }
.sk-item:last-of-type { border-bottom: 0; }
.sk-dot { flex: none; width: 2rem; height: 2rem; border-radius: 50%; background: var(--color-paper-3); }
.sk-lines { flex: 1; display: grid; gap: var(--space-xs); }
.sk-lines i { height: .625rem; border-radius: 4px; background: var(--color-paper-3); }
.sk-lines i:first-child { width: 36%; }
.sk-lines i:last-child { width: 72%; background: var(--color-paper-2); }
.sk-item:nth-of-type(odd) .sk-lines i:first-child { width: 28%; }
.sk-item:nth-of-type(3n) .sk-lines i:last-child { width: 56%; }
.sk-card { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-md); }
.sk-card .sk-item { min-height: 9rem; border: 0; border-radius: var(--radius-card); background: var(--color-paper-2); }
/* the dashboard's shape: the chart, the side column, then a full row */
.sk-card .sk-item:nth-of-type(1) { grid-column: span 2; min-height: 18rem; }
.sk-card .sk-item:nth-of-type(2) { min-height: 18rem; }
.sk-card .sk-item:nth-of-type(3) { grid-column: 1 / -1; }
.sk-thread { align-content: start; gap: var(--space-md); padding: var(--space-lg); }
.sk-thread .sk-item { width: 56%; min-height: 4.5rem; border: 0; border-radius: var(--radius-card); background: var(--color-paper-3); }
.sk-thread .sk-item:nth-of-type(even) { justify-self: end; width: 44%; }
.sk-tr td, .log .sk-li { padding: 0; }
.log .sk-li { display: block; }
.log .sk-item { padding-inline: 0; }
/* A refresh button turns its own icon while it works. */
.turning .icon { animation: progress-turn 900ms linear infinite; }
@media (max-width: 760px) { .sk-card { grid-template-columns: minmax(0, 1fr); } .sk-card .sk-item:nth-of-type(1) { grid-column: auto; } }

/* ---------- contact search ---------- */
.c-contact { min-width: 9rem; max-width: 14rem; }
/* Room for the Contact column: the role gives up some width. */
#list-rows .row-role { max-width: 22ch; }
/* How sure: teal confirmed, amber likely, grey guess. The words say it too, so colour is never the only sign. */
.tier-confirmed { --tier: var(--color-brand); --tier-bg: var(--color-brand-wash); } .tier-likely { --tier: var(--color-warn); --tier-bg: var(--color-paper-2); } .tier-guess { --tier: var(--color-muted); --tier-bg: var(--color-paper-3); }
.c-icons { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.c-ic { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; min-height: 0; padding: 0; border: 0; border-radius: 6px; background: var(--tier-bg); color: var(--tier); }
.c-ic .icon { width: .9rem; height: .9rem; }
.c-chip, .c-chip-text { display: inline-grid; place-items: center; min-width: 1.75rem; height: 1.75rem; padding: 0 6px; border-radius: 6px; background: var(--tier-bg); color: var(--tier); font-family: var(--font-mono); font-size: 11px; font-weight: 500; text-decoration: none; }
.c-chip:hover, .c-ic:hover:not(:disabled) { filter: brightness(.95); background: var(--tier-bg); }
.c-dots { display: inline-flex; gap: 4px; } .c-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--color-silver); animation: sk-pulse 1.2s ease-in-out infinite; } .c-dots i:nth-child(2) { animation-delay: .2s; } .c-dots i:nth-child(3) { animation-delay: .4s; }
.found-list { display: grid; gap: var(--space-xs); width: 100%; margin: 0; padding: 0; list-style: none; }
.found-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-sm); padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-card); }
.found-card .c-ic { pointer-events: none; }
.found-card .c-ic .c-chip-text { background: none; padding: 0; min-width: 0; }
.found-body { display: grid; min-width: 0; }
.found-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.found-meta { font-size: var(--text-sm); color: var(--color-muted); }
.tier-word { color: var(--tier); font-weight: 500; }
.icon-only { width: 2rem; padding: 0; justify-content: center; }
.domain-row { display: grid; gap: 4px; width: 100%; margin-top: var(--space-xs); }
.domain-row label { font-size: var(--text-sm); color: var(--color-muted); }
.domain-edit { display: flex; gap: var(--space-xs); } .domain-edit input { flex: 1; min-width: 0; font-family: var(--font-mono); }
.enrich-progress { display: grid; gap: var(--space-xs); margin: 0 0 var(--space-sm); padding: var(--space-sm) var(--space-md); border-radius: var(--radius-card); background: var(--color-paper-2); font-size: var(--text-sm); }
.enrich-progress .icon { width: .9rem; height: .9rem; vertical-align: -2px; }
/* With the person panel open, the list toolbar wraps instead of crushing the search box. */
#list-detail .toolbar { flex-wrap: wrap; }
#list-detail .toolbar .search-field { min-width: 14rem; }
@media (min-width: 64rem) {
  #list-detail .toolbar { gap: var(--space-xs); }
  #list-detail .toolbar .search-field { min-width: 10rem; max-width: 18rem; }
  #list-detail .toolbar select { flex: 0 1 9rem; width: 9rem; min-width: 8rem; }
  #list-detail .toolbar > button { flex: none; }
  #list-detail .toolbar > button:first-of-type { margin-left: auto; }
}
.enrich-summary { display: inline-flex; align-items: center; gap: var(--space-xs); }
.enrich-counts { display: inline-flex; align-items: center; gap: 4px; padding: 0 var(--space-sm); height: 2.25rem; border: 1px solid var(--color-rule); border-radius: var(--radius-button); font-family: var(--font-mono); font-size: var(--text-sm); color: var(--color-ink-2); }
.enrich-counts .icon { width: .9rem; height: .9rem; color: var(--color-muted); margin-left: 4px; } .enrich-counts .icon:first-child { margin-left: 0; }
.searching-line { display: flex; align-items: center; gap: var(--space-xs); }
.found-foot .ghost { margin-left: 4px; }
.c-chip .brand, .c-ic .brand { width: .85rem; height: .85rem; }
.domain-line .text-link { padding: 0; border: 0; background: none; min-height: 0; font: inherit; }
.tier-word { cursor: help; text-decoration: underline dotted; text-underline-offset: 2px; }

/* The campaign line under a list's name. */
.campaign-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 0; font-size: var(--text-sm); }
.campaign-line .link-button { margin-left: var(--space-xs); }
.inline-pick { width: auto; max-width: 16rem; padding: 2px 24px 2px 6px; min-height: 0; font-weight: 500; font-size: var(--text-sm); }
.run-card-wide { grid-column: 1 / -1; }
.run-card-wide .run-actions select { flex: 1; min-width: 12rem; }
.pane-head { position: relative; }
.pane-head .run-menu { position: static; }
.pane-head .run-pop { left: 0; right: auto; width: min(46rem, 100%); }
.run-card-wide .run-actions button { flex: 0 0 auto; padding-inline: var(--space-lg); }
.pane-head { flex-wrap: nowrap; }
.pane-title { flex: 1; }
.pane-controls { flex-wrap: nowrap; }
.pane-head .run-pop { left: auto; right: 0; }
.campaign-line button.link-button { padding: 0; min-height: 0; border: 0; background: none; box-shadow: none; color: var(--color-ink); font-weight: 400; font-size: inherit; }
@media (max-width: 60rem) { .pane-head, .pane-controls { flex-wrap: wrap; } }
.campaign-line { margin: 2px 0 var(--space-sm); }
.auth-notice { margin: var(--space-sm) 0; padding: var(--space-sm) var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface-sunk); font-size: var(--text-sm); }
.auth-notice p { margin: 0 0 var(--space-xs); }
.auth-check { display: flex; align-items: center; gap: var(--space-xs); font-weight: 500; }
.auth-check input { width: auto; }
/* Phones: the list header is two tidy rows. Contact counts and Search again on top, then Start and the campaign menu side by side. */
@media (max-width: 40rem) {
  .pane-controls .enrich-summary { flex: 1 0 100%; justify-content: space-between; }
  .pane-controls > .campaign-toggle { flex: 0 0 auto; }
  .pane-controls > .run-menu { flex: 1 1 0; min-width: 0; }
  .pane-controls > .run-menu > summary { width: 100%; justify-content: center; padding-inline: var(--space-sm); }
  .pane-head + .campaign-line { margin-top: var(--space-xs); }
  .stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 var(--space-xs); padding: var(--space-xs); }
  .stats > .stat { justify-content: flex-start; }
  .stats > .stat-total, .stats > .stat-progress { grid-column: span 3; padding: 0 var(--space-2xs); }
}
@media (max-width: 40rem) {
  .network-bar .net-bulk { flex: 1 1 100%; flex-wrap: wrap; min-width: 0; order: 1; }
  .net-bulk > select { flex: 1 1 100%; min-width: 0; }
  /* Older than, its picker and Withdraw N share a row of their own below the account picker. */
  .net-older { flex: 1 1 100%; min-width: 0; }
  .net-older select { flex: 1 1 0; min-width: 0; }
}
/* Compact Outreach: list controls stay above the people, not beside them. */
#view-lists .outreach-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-sm); margin-bottom: var(--space-md); }
#view-lists .outreach-list-title { display: flex; align-items: center; gap: var(--space-sm); flex: 1 1 20rem; min-width: 0; }
#view-lists #list-total { flex: none; white-space: nowrap; }
#view-lists .list-switcher { position: relative; min-width: 0; max-width: 100%; }
#view-lists #list-switcher-toggle { display: flex; align-items: center; gap: var(--space-xs); min-height: 2.25rem; padding: var(--space-2xs) 0; list-style: none; cursor: pointer; }
#view-lists #list-switcher-toggle::-webkit-details-marker { display: none; }
#view-lists #list-switcher-toggle > .icon { flex: none; width: 1rem; height: 1rem; }
#view-lists .list-switcher-name { font-size: 1.5rem; font-weight: 500; line-height: 1.25; letter-spacing: -.02em; overflow-wrap: anywhere; }
#view-lists .list-index { position: absolute; top: calc(100% + var(--space-xs)); left: 0; z-index: var(--z-dropdown); width: min(26rem, calc(100vw - 2rem)); max-height: min(30rem, calc(100dvh - 8rem)); overflow: auto; padding: var(--space-md); border: 1px solid var(--color-rule-2); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-lift); }
#view-lists .pane-label { align-items: center; margin-bottom: var(--space-md); }
#view-lists .pane-label h3 { font-size: var(--text-lg); color: var(--color-ink); }
#view-lists .list-import-button { min-height: 2.25rem; margin-bottom: var(--space-sm); }
#view-lists .picklist { gap: var(--space-2xs); max-height: none; overflow: visible; padding: 0; border: 0; }
#view-lists .picklist button { align-items: center; padding: var(--space-sm); gap: var(--space-xs); white-space: normal; }
#view-lists .list-copy { display: grid; flex: 1; min-width: 0; gap: var(--space-2xs); }
#view-lists .list-name { white-space: normal; overflow: visible; overflow-wrap: anywhere; line-height: 1.4; }
#view-lists .list-meta { font-size: var(--text-sm); color: var(--color-muted); font-weight: 400; }
#view-lists .list-state { flex: none; }
#view-lists .count-pill { min-width: 2rem; padding: 0 var(--space-2xs); }
#view-lists .pane-controls { flex-wrap: wrap; gap: var(--space-xs); }
#view-lists .outreach-head .pane-controls button, #view-lists .campaign-controls > button, #view-lists .campaign-controls .run-button { min-height: 2rem; padding: var(--space-2xs) var(--space-sm); font-size: var(--text-sm); }
#view-lists .outreach-head .import-jobs { margin: 0 0 0 auto; }
#view-lists #list-add-people { min-height: 2.25rem; flex: none; }
#view-lists .outreach-summary { position: relative; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-sm); margin-bottom: var(--space-md); padding: var(--space-sm) var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-mist); }
#view-lists .outreach-summary-copy { flex: 1 1 14rem; min-width: 0; }
#view-lists .outreach-summary-copy p { margin: var(--space-2xs) 0 0; font-size: var(--text-sm); color: var(--color-muted); overflow-wrap: anywhere; }
#view-lists .outreach-summary-state { display: flex; align-items: center; gap: var(--space-xs); background: none; color: var(--color-ink); font-size: var(--text-md); font-weight: 500; }
#view-lists .outreach-summary-state::before { content: ""; width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--color-muted); }
#view-lists .outreach-summary-state.state-active::before { background: var(--color-success); }
#view-lists .outreach-summary-state.state-paused::before { background: var(--color-warn-solid); }
#view-lists .outreach-summary .campaign-toggle { min-height: 2.25rem; font-size: var(--text-md); }
#view-lists .outreach-summary > .run-menu, #view-lists .outreach-summary-actions > .run-menu { position: static; }
#view-lists .outreach-summary-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-xs); }
#view-lists .outreach-summary .run-pop { left: auto; right: 0; width: min(46rem, 100%); }
#view-lists .outreach-actions-panel .pane-controls { display: grid; justify-content: stretch; gap: var(--space-xs); }
#view-lists .outreach-actions-panel .pane-controls > button, #view-lists .outreach-actions-panel .enrich-summary button { width: 100%; justify-content: flex-start; }
#view-lists .outreach-actions-panel .enrich-summary { flex-wrap: wrap; }
#view-lists .outreach-settings { margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--color-rule); }
#view-lists .outreach-settings > summary { cursor: pointer; color: var(--color-ink-2); font-size: var(--text-md); }
#view-lists .outreach-settings:not([open]) .outreach-settings-body { display: none; }
#view-lists .outreach-settings-body .run-pop { position: static; width: 100%; }
#view-lists .outreach-row-tools { position: relative; display: flex; gap: var(--space-xs); margin-left: auto; }
#view-lists .outreach-row-tools .outreach-actions-panel { right: calc(-1 * var(--space-sm)); }
#view-lists #list-search { min-width: 0; }
#view-lists #list-search .search-field { max-width: 18rem; }
#view-lists .outreach-tool { flex: none; }
#view-lists .outreach-tool:not([open]) .outreach-actions-panel { display: none; }
#view-lists .outreach-tool > summary { display: flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 2.25rem; padding: 0 var(--space-sm); border: 1px solid var(--color-input-edge); border-radius: var(--radius-button); background: var(--color-surface); color: var(--color-ink-2); font-size: var(--text-md); font-weight: 500; white-space: nowrap; cursor: pointer; list-style: none; }
#view-lists .outreach-tool > summary::after { content: ""; width: 6px; height: 6px; margin-top: -4px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); }
#view-lists .outreach-tool > summary:hover, #view-lists .outreach-tool[open] > summary { background: var(--color-paper-2); border-color: var(--color-ink-2); color: var(--color-ink); }
#view-lists .outreach-tool > summary::-webkit-details-marker { display: none; }
#view-lists .outreach-actions-panel { position: absolute; right: 0; top: calc(100% + var(--space-xs)); z-index: var(--z-dropdown); width: min(34rem, calc(100vw - 2rem)); max-height: calc(100dvh - 10rem); overflow: auto; padding: var(--space-md); border: 1px solid var(--color-rule-2); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-lift); }
#view-lists #list-actions > .outreach-actions-panel { width: min(18rem, calc(100vw - 2rem)); }
#view-lists .outreach-settings-body .run-pop { grid-template-columns: minmax(0, 1fr); }
#view-lists .outreach-settings-body .run-card { min-width: 0; padding: var(--space-sm); }
#view-lists .outreach-settings-body .run-actions { flex-wrap: wrap; }
#view-lists .outreach-settings-body .run-actions select { min-width: 0; flex-basis: 100%; }
#view-lists .outreach-actions-panel .campaign-line, #view-lists .outreach-actions-panel .campaign-state { margin-block: var(--space-sm); }
#view-lists .outreach-actions-panel .campaign-controls { margin-left: 0; }
#view-lists .outreach-actions-panel .run-pop { position: static; width: 100%; }
#view-lists .outreach-filters { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
#view-lists .outreach-filters label { display: grid; gap: var(--space-xs); font-size: var(--text-sm); }
#view-lists .outreach-filters select { width: 9rem; max-width: 100%; }
#view-lists .campaign-line, #view-lists .campaign-state { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-xs); margin: 0; padding: var(--space-xs) 0; border-bottom: 1px solid var(--color-rule); font-size: var(--text-sm); }
#view-lists .campaign-description { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-xs); }
#view-lists .campaign-context-label { font-size: var(--text-sm); color: var(--color-muted); }
#view-lists .campaign-line strong { font-size: var(--text-md); font-weight: 500; overflow-wrap: anywhere; }
#view-lists .campaign-controls { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-xs); margin-left: auto; }
#view-lists .campaign-controls .run-menu { position: static; }
#view-lists .campaign-controls .run-pop { left: auto; right: 0; width: min(46rem, 100%); }
#view-lists .campaign-line .link-button { min-height: 2rem; margin-left: 0; padding: var(--space-2xs) var(--space-sm); border: 1px solid var(--color-input-edge); border-radius: var(--radius-button); background: var(--color-surface); font-size: var(--text-sm); }
#view-lists .campaign-line .link-button:hover:not(:disabled) { background: var(--color-paper-2); border-color: var(--color-ink); }
#view-lists .toolbar { margin: 0; padding: var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-card) var(--radius-card) 0 0; background: var(--color-mist); }
#view-lists .table-card { border-top: 0; border-radius: 0 0 var(--radius-card) var(--radius-card); }
#view-lists #enrich-progress .enrich-progress { margin: 0; border: 1px solid var(--color-rule); border-top: 0; border-radius: 0; }
#view-lists .people-status { table-layout: fixed; }
#view-lists .people-status thead { background: var(--color-surface); color: var(--color-muted); }
#view-lists .people-status thead th:nth-child(1) { width: 22%; }
#view-lists .people-status thead th:nth-child(2) { width: 26%; }
#view-lists .people-status thead th:nth-child(3) { width: 17%; }
#view-lists .people-status thead th:nth-child(4) { width: 12%; }
#view-lists .people-status thead th:nth-child(5) { width: 12%; }
/* Each person's Move / Remove menu. */
#view-lists .people-status thead th.c-actions { width: 3rem; }
#view-lists .people-status .c-actions { text-align: right; }
#view-lists .people-status tbody th { width: auto; }
#view-lists .people-status th, #view-lists .people-status td { padding: var(--space-sm) var(--space-md); overflow-wrap: anywhere; }
#view-lists .people-status .who-cell { gap: var(--space-sm); }
#view-lists .people-status .avatar { width: 1.75rem; height: 1.75rem; }
#view-lists .people-status .person-open { min-width: 0; white-space: normal; overflow-wrap: anywhere; font-size: var(--text-md); font-weight: 500; color: var(--color-ink); }
#view-lists .people-status tbody tr { height: 4rem; }
#view-lists #list-rows .row-role { max-width: none; white-space: normal; overflow: visible; font-size: var(--text-md); line-height: 1.5; }
#view-lists .people-status td[data-label="Location"] { max-width: none; white-space: normal; overflow: visible; font-size: var(--text-sm); line-height: 1.5; }
#view-lists .people-status .c-contact { min-width: 0; max-width: none; }
@media (min-width: 100.01rem) {
  #view-lists .people-status thead th:nth-child(1) { width: 22%; }
  #view-lists .people-status thead th:nth-child(2) { width: 30%; }
  #view-lists .people-status thead th:nth-child(3) { width: 15%; }
  #view-lists .people-status thead th:nth-child(4) { width: 10%; }
  #view-lists .people-status thead th:nth-child(6) { width: 10%; }
}
@media (max-width: 40rem) {
  #view-lists .outreach-list-title { flex: 1 1 0; flex-wrap: wrap; gap: var(--space-2xs); }
  #view-lists .outreach-tool > summary { min-height: 2.75rem; }
  #view-lists #list-add-people, #view-lists .outreach-summary .campaign-toggle { min-height: 2.75rem; }
  #view-lists .outreach-summary-copy { flex-basis: 8rem; }
  #view-lists #list-query { height: 2.75rem; }
  #view-lists #list-search { flex-basis: 100%; }
  #view-lists #list-search .search-field { max-width: none; }
  #view-lists .outreach-row-tools { flex: none; }
  #view-lists .toolbar .search-field { min-width: 0; }
  #view-lists .outreach-tool { flex: none; }
  #view-lists .outreach-head .pane-controls { justify-content: flex-start; }
  #view-lists .outreach-head .pane-controls .enrich-summary { flex: 0 1 auto; }
  #view-lists .outreach-actions-panel .pane-controls button, #view-lists .campaign-controls > button, #view-lists .campaign-controls .run-button { min-height: 2.75rem; }
  #view-lists .campaign-line .link-button { min-height: 2.75rem; }
  #view-lists .campaign-controls { margin-left: 0; }
  #view-lists .people-status th, #view-lists .people-status td { padding: 0; }
  #view-lists .people-status tbody tr { height: auto; gap: var(--space-xs); padding: var(--space-md); }
  #view-lists .people-status td[data-label="Status"] { white-space: normal; }
}
.queue-held { background: var(--color-surface-sunk); }
.queue-held .queue-hold .link-button { text-align: left; }
.queue-held .queue-hold button.link-button { flex: 1; min-width: 0; padding: 0; min-height: 0; border: 0; background: none; box-shadow: none; font: inherit; font-size: var(--text-sm); color: var(--color-ink); text-align: left; text-decoration: underline; text-decoration-color: var(--color-rule); text-underline-offset: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-held .queue-hold > button:not(.link-button) { flex: none; }
.queue-held .queue-hold button.link-button { display: block; justify-content: flex-start; }
.queue-group button.queue-fold { display: flex; align-items: center; gap: 6px; width: 100%; padding: 0; min-height: 0; border: 0; background: none; box-shadow: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.queue-group button.queue-fold { justify-content: flex-start; }
.queue-held-hint { margin: 0; padding: 0 var(--space-md) var(--space-xs); font-size: var(--text-sm); }
/* The in-app yes/no question and the in-app tooltip (the app never uses the browser's own popups). */
.ask-dialog { width: min(440px, calc(100% - var(--space-lg))); padding: var(--space-lg); }
.ask-dialog h3 { margin: 0 0 var(--space-xs); font-size: var(--text-lg); font-weight: 500; }
.ask-dialog p { margin: 0 0 var(--space-md); }
.ask-dialog .actions { display: flex; gap: var(--space-xs); }
.tip { position: fixed; z-index: calc(var(--z-modal) + 1); max-width: 280px; padding: 6px 10px; border-radius: 8px; background: var(--color-ink); color: var(--color-paper); font-size: var(--text-sm); line-height: 1.4; pointer-events: none; box-shadow: var(--shadow-pop); }
/* Phones: each campaign becomes a card (no sideways scrolling), and the Tasks tabs wrap into a 2 × 2 grid. */
@media (max-width: 40rem) {
  .campaign-list, .campaign-list tbody, .campaign-list tr, .campaign-list th, .campaign-list td { display: block; width: auto; }
  .campaign-list thead { display: none; }
  .campaign-list tr { height: auto; padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--color-rule); }
  .campaign-list tr:last-child { border-bottom: 0; }
  .campaign-list th, .campaign-list td { padding: 2px 0; border: 0; }
  .campaign-list td[data-label="Status"] { margin: var(--space-2xs) 0; }
  .campaign-list td.actions { display: flex; align-items: center; gap: var(--space-xs); justify-content: flex-start; padding-top: var(--space-xs); }
  #view-review .filters { display: grid; grid-template-columns: 1fr 1fr; width: 100%; overflow: visible; }
  #view-review .filters button { justify-content: space-between; }
}
.brand img.logo { display: block; height: 26px; width: auto; }
/* Dashboard: a ruled sheet. Hairlines divide it, not boxes. Teal is for the funnel, the chart, the rings and the headline's turn. */
#overview { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: var(--space-2xl); align-items: start; margin-bottom: 0; }
#overview > .today, #overview > .pipeline, #overview > .sk { grid-column: 1 / -1; }
#overview .today { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 19rem); gap: var(--space-2xl); align-items: end; padding: var(--space-sm) 0 var(--space-xl); }
#overview .today-kick { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--color-muted); }
#overview .today-head { max-width: 15em; margin-top: var(--space-sm); font-family: var(--font-display); font-weight: 500; font-size: var(--text-display); line-height: 1.05; letter-spacing: var(--tracking-display); color: var(--color-ink); text-wrap: balance; }
#overview .today-head em { color: var(--color-brand); font-style: normal; }
#overview .today-line { margin-top: var(--space-md); max-width: 40rem; font-size: var(--text-lg); line-height: 1.5; color: var(--color-ink-2); }
#overview .today-foot { display: flex; flex-direction: row-reverse; align-items: center; justify-content: flex-end; gap: var(--space-md); flex-wrap: wrap; margin-top: var(--space-lg); }
#overview .today-who { display: flex; align-items: center; gap: var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); }
#overview .today-faces { display: flex; flex: none; }
#overview .today-faces > * { margin-left: -8px; border: 2px solid var(--color-surface); }
#overview .today-faces > :first-child { margin-left: 0; }
/* The ledger: what went out and what came back. A heavy rule on top, hairlines between. */
#overview .today-ledger { display: grid; border-top: 2px solid var(--color-ink); font-size: var(--text-md); }
#overview .today-ledger [role="row"] { display: grid; grid-template-columns: minmax(0, 1fr) 3.5rem 4rem; align-items: baseline; padding: var(--space-xs) 0; border-bottom: 1px solid var(--color-rule); }
#overview .today-ledger [role="columnheader"] { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); text-align: right; }
#overview .today-ledger [role="rowheader"] { color: var(--color-ink-2); }
#overview .today-ledger [role="cell"] { font-family: var(--font-mono); color: var(--color-ink); text-align: right; font-variant-numeric: tabular-nums; }
#overview .today-ledger .is-hot [role="rowheader"] { color: var(--color-brand); font-weight: 500; }
/* The pipeline is one band that narrows. Each stage is still a button to its own page. */
#overview .pipeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: var(--space-lg) 0 var(--space-xl); border-top: 1px solid var(--color-rule-2); }
#overview .pipe-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-xs) var(--space-sm); grid-column: 1 / -1; padding-bottom: var(--space-md); font-size: var(--text-lg); font-weight: 500; color: var(--color-ink); }
#overview .pipe-title .muted { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 400; }
#overview .pipe-step { display: grid; align-content: start; justify-content: stretch; justify-items: start; gap: 0; min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--color-ink-2); text-align: left; white-space: normal; }
#overview .pipe-step:hover:not(:disabled), #overview .pipe-step:active:not(:disabled) { background: none; }
#overview .pipe-label { font-size: var(--text-md); color: var(--color-muted); }
#overview .pipe-step b { font-size: 2.75rem; line-height: 1.15; font-weight: 500; letter-spacing: var(--tracking-display); color: var(--color-ink); font-variant-numeric: tabular-nums; }
#overview .funnel-band { display: block; width: 100%; height: 5.5rem; margin: var(--space-sm) 0; }
#overview .funnel-band path { fill: var(--color-brand); transition: fill var(--dur-micro) var(--ease-out); }
#overview .pipe-step:hover .funnel-band path { fill: var(--color-brand-hover); }
#overview .pipe-foot { display: flex; align-items: center; gap: var(--space-xs); min-height: 1.25rem; }
#overview .pipe-rate { font-size: var(--text-sm); color: var(--color-muted); }
.rate-ring { flex: none; width: 1rem; height: 1rem; }
.rate-ring circle { fill: none; stroke-width: 3; }
.rate-ring-track { stroke: var(--color-paper-3); }
.rate-ring-fill { stroke: var(--color-brand); }
#overview .pipe-empty { grid-column: 1 / -1; font-size: var(--text-md); }
/* Needs you runs the full height on the left; the trend and the campaigns share the right. */
#overview .home-grid { display: contents; }
#overview .home-card, #overview .trend-card { min-width: 0; padding: var(--space-lg) 0 var(--space-xl); border: 0; border-top: 1px solid var(--color-rule-2); border-radius: 0; background: none; }
#overview .home-card:first-child { grid-column: 1; grid-row: 3 / span 2; }
#overview .trend-card { grid-column: 2; grid-row: 3; }
#overview .home-card:last-child { grid-column: 2; grid-row: 4; }
#overview .card-title { font-size: var(--text-lg); }
#overview .card-count { display: inline-block; margin-left: var(--space-xs); color: var(--color-muted); font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 500; line-height: 1.25rem; vertical-align: middle; }
#overview .home-empty { padding: var(--space-lg) 0 var(--space-xs); font-size: var(--text-md); line-height: 1.5; }
#overview .needs, #overview .camps { display: grid; margin: var(--space-sm) 0 0; padding: 0; list-style: none; }
#overview .needs li + li { border-top: 1px solid var(--color-rule); }
#overview .need { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-sm); width: calc(100% + 2 * var(--space-xs)); min-height: 3.25rem; margin-inline: calc(-1 * var(--space-xs)); padding: var(--space-xs); border: 0; border-radius: var(--radius-button); background: none; box-shadow: none; text-align: left; justify-content: stretch; }
#overview .need:hover:not(:disabled) { background: var(--color-paper-2); }
#overview .need-text { display: grid; min-width: 0; }
#overview .need-who { font-size: var(--text-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#overview .need-who b { font-weight: 500; color: var(--color-ink); }
#overview .need-quote { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-sm); font-weight: 400; line-height: 1.5; color: var(--color-muted); }
#overview .need-time { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); white-space: nowrap; }
#overview .camp { display: grid; gap: var(--space-xs); padding: var(--space-sm) 0; border-bottom: 1px solid var(--color-rule); }
#overview .camp:last-child { border-bottom: 0; padding-bottom: 0; }
#overview .camp-top { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-xs); }
#overview .camp-name { flex: 1 1 8rem; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
#overview .camp-state { padding: var(--space-2xs) var(--space-xs); border-radius: var(--radius-pill); font-size: var(--text-sm); color: var(--color-muted); background: var(--color-paper-2); }
#overview .camp-state.camp-active { color: var(--color-success); background: var(--color-success-bg); }
#overview .camp-state.camp-paused { color: var(--color-warn); background: var(--color-warn-bg); }
#overview .camp-bar { height: 6px; border-radius: var(--radius-pill); background: var(--color-paper-3); overflow: hidden; }
#overview .camp-fill { display: block; height: 100%; background: var(--color-brand); border-radius: var(--radius-pill); }
#overview .camp-note { display: flex; justify-content: space-between; gap: var(--space-sm); font-size: var(--text-sm); }
#overview .camp-pct { font-family: var(--font-mono); color: var(--color-ink); }
/* Both column heads are one height, so Needs you and Trend share a line whatever controls sit beside them. */
#overview .metric-head { min-height: 2.5rem; }
#overview .trend-card .metric-head { flex-wrap: wrap; }
#overview .metric-pick { margin-left: auto; }
#overview .metric-value { margin-top: var(--space-sm); font-size: 2.75rem; letter-spacing: var(--tracking-display); }
#overview .chart-wrap, #overview .chart-area-box, #overview .chart { min-height: 0; }
#overview .chart-wrap { flex: none; }
#overview .chart-area-box { height: 11rem; }
#overview .chart-area { fill: var(--color-brand-wash); stroke: none; }
#overview .chart-ticks, #overview .chart-axis { font-family: var(--font-mono); font-size: var(--text-xs); }
/* Recent activity closes the sheet: the same rule, timestamps in mono. */
#view-activity .activity-card { border: 0; border-top: 1px solid var(--color-rule-2); border-radius: 0; }
#view-activity .activity-card > .metric-head { padding: var(--space-lg) 0 0; }
#view-activity .activity-card .log-heading { font-size: var(--text-lg); }
#view-activity .log { padding: var(--space-xs) 0 0; }
#view-activity .log time { font-family: var(--font-mono); font-size: var(--text-xs); }
@media (max-width: 75rem) {
  #overview { grid-template-columns: minmax(0, 1fr); }
  #overview .home-card:first-child, #overview .home-card:last-child, #overview .trend-card { grid-column: auto; grid-row: auto; }
  #overview .today { gap: var(--space-xl); }
  #overview .today-head { font-size: var(--text-display-s); }
}
@media (max-width: 48rem) {
  #overview .today { grid-template-columns: minmax(0, 1fr); align-items: start; }
}
@media (max-width: 40rem) {
  #overview .today-head { font-size: var(--text-3xl); }
  #overview .today-foot { flex-direction: column-reverse; align-items: stretch; }
  #overview .today-who { flex-wrap: wrap; }
  #overview .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-lg); }
  #overview .pipe-step b { font-size: var(--text-4xl); }
  #overview .funnel-band { height: 4rem; }
  #overview .metric-pick { margin-left: 0; }
  #overview .metric-range { margin-left: auto; }
}
.camp-fill.w0 { width: 0%; }
.camp-fill.w5 { width: 5%; }
.camp-fill.w10 { width: 10%; }
.camp-fill.w15 { width: 15%; }
.camp-fill.w20 { width: 20%; }
.camp-fill.w25 { width: 25%; }
.camp-fill.w30 { width: 30%; }
.camp-fill.w35 { width: 35%; }
.camp-fill.w40 { width: 40%; }
.camp-fill.w45 { width: 45%; }
.camp-fill.w50 { width: 50%; }
.camp-fill.w55 { width: 55%; }
.camp-fill.w60 { width: 60%; }
.camp-fill.w65 { width: 65%; }
.camp-fill.w70 { width: 70%; }
.camp-fill.w75 { width: 75%; }
.camp-fill.w80 { width: 80%; }
.camp-fill.w85 { width: 85%; }
.camp-fill.w90 { width: 90%; }
.camp-fill.w95 { width: 95%; }
.camp-fill.w100 { width: 100%; }
/* Loading shapes for the home: the headline, the story line, the faces and the button. */
.today-sk { gap: var(--space-sm); margin-top: var(--space-xs); }
.today-sk i { display: block; border-radius: 8px; background: var(--color-paper-3); }
.today-sk .sk-head { height: 3rem; } .today-sk .sk-text { height: 1rem; margin-top: var(--space-xs); }
.today-sk .w70 { width: 70%; } .today-sk .w45 { width: 45%; } .today-sk .w55 { width: 55%; }
.today-sk .sk-row { display: flex; justify-content: space-between; align-items: center; margin-top: var(--space-sm); }
.today-sk .sk-faces { width: 9rem; height: 2rem; border-radius: 999px; } .today-sk .sk-btn { width: 9rem; height: 2.5rem; border-radius: var(--radius-input); }
.pipe-empty { font-size: var(--text-sm); }
.pipe-title .muted { font-size: var(--text-xs, .75rem); }
/* Trend: a range picker inside the calendar chip, and one day read out under the pointer. */
.metric-range select { field-sizing: content; width: auto; height: auto; min-height: 0; padding: 0 1rem 0 0; border: 0; background-color: transparent; background-position: calc(100% - 7px) 52%, calc(100% - 2px) 52%; box-shadow: none; font-size: var(--text-md); color: var(--color-ink-2); }
.metric-range:focus-within { border-color: var(--color-ink-2); }
.chart-area-box { cursor: crosshair; touch-action: pan-y; outline: none; }
.chart-area-box:focus-visible { box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-ink-2); border-radius: 4px; }
.chart-guide { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--color-silver); pointer-events: none; }
.chart-mark { pointer-events: none; }
.chart-tip { position: absolute; top: 0; display: grid; gap: 2px; padding: 6px 10px; transform: translateX(10px); border: 1px solid var(--color-rule); border-radius: var(--radius-input); background: var(--color-surface); box-shadow: var(--shadow-tip); font-size: var(--text-sm); color: var(--color-muted); white-space: nowrap; pointer-events: none; }
.chart-tip.flip { transform: translateX(calc(-100% - 10px)); }
.chart-tip b { font-weight: 600; color: var(--color-ink-strong); font-variant-numeric: tabular-nums; }
.chart-guide[hidden], .chart-mark[hidden], .chart-tip[hidden], .chart-end[hidden] { display: none; }
/* Sign-in and sign-up: the form on white at the left, a real moment from the product on warm grey at the right. */
.auth-page { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); place-items: stretch; padding: 0; background: var(--color-paper); }
.auth-page .auth-card { width: auto; align-content: center; justify-self: center; width: min(24rem, 100%); padding: var(--space-xl) var(--space-lg); border: 0; border-radius: 0; box-shadow: none; background: none; grid-template-rows: auto 1fr auto; min-height: 100dvh; gap: 0; }
.auth-page .auth-card .brand { align-self: start; padding-top: var(--space-md); }
.auth-page #auth { align-self: center; display: grid; gap: var(--space-md); }
.auth-page .auth-title { font-family: var(--font-display); font-weight: 400; font-size: 2.25rem; line-height: 1.1; letter-spacing: var(--tracking-display); color: var(--color-ink-strong); }
.auth-page .auth-form { gap: var(--space-md); }
.auth-page #auth .muted.small { font-size: 1rem; line-height: 1.5; color: var(--color-muted); }
.auth-page #auth .muted.small + .muted.small, .auth-page #auth > div > .muted.small + .muted.small { margin-top: var(--space-2xs); }
.auth-page #auth > div:last-child { display: grid; gap: var(--space-xs); padding-top: var(--space-2xs); }
.auth-page #auth a { color: var(--color-ink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--color-silver); }
.auth-page #auth a:hover { text-decoration-color: var(--color-ink); }
.auth-legal { align-self: end; padding-bottom: var(--space-md); }
.auth-legal a { color: var(--color-muted); }
.auth-side { display: grid; place-items: center; padding: var(--space-xl); margin: var(--space-sm); border-radius: 28px; background: var(--color-ink); }
.auth-side .auth-kick, .auth-side .auth-pipe { color: var(--color-on-dark-muted); }
.auth-side .auth-head, .auth-side .auth-pipe b { color: var(--color-on-dark); }
.auth-side .auth-pipe i { background: var(--color-on-dark-rule); }
.auth-side .auth-needs { border-color: transparent; box-shadow: var(--shadow-deep); }
.auth-show { width: min(30rem, 100%); display: grid; gap: var(--space-md); }
.auth-kick { font-size: var(--text-sm); color: var(--color-muted); }
.auth-head { font-family: var(--font-display); font-weight: 400; font-size: clamp(2rem, 3vw, 2.75rem); line-height: 1.1; letter-spacing: var(--tracking-display); color: var(--color-ink-strong); text-wrap: balance; }
.auth-head em { color: var(--color-brand-on-dark); font-style: normal; }
.auth-needs { display: grid; gap: 2px; margin: var(--space-xs) 0 0; padding: var(--space-xs); list-style: none; border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-soft); }
.auth-needs li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-sm); align-items: start; padding: var(--space-sm); }
.auth-needs li + li { border-top: 1px solid var(--color-rule); }
.auth-av { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; font-size: .75rem; font-weight: 500; background: var(--color-paper-3); color: var(--color-ink-2); }
.auth-need { display: grid; gap: 2px; min-width: 0; font-size: var(--text-sm); }
.auth-need b { font-weight: 600; color: var(--color-ink-strong); }
.auth-need span { color: var(--color-muted); font-size: var(--text-xs, .75rem); }
.auth-need q { color: var(--color-ink-2); quotes: "“" "”"; }
.auth-needs time { font-size: var(--text-xs, .75rem); color: var(--color-muted); }
.auth-pipe { display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; font-size: var(--text-sm); color: var(--color-muted); }
.auth-pipe b { font-size: var(--text-lg); font-weight: 600; color: var(--color-ink-strong); font-variant-numeric: tabular-nums; }
.auth-pipe i { width: 20px; height: 1px; background: var(--color-silver); }
@media (max-width: 900px) { .auth-page { grid-template-columns: 1fr; } .auth-side { display: none; } }
/* /pay: one wide column with Kelviq's checkout inside Outlo's page; no marketing panel. */
.auth-page.pay-page { grid-template-columns: 1fr; }
.pay-page .auth-side { display: none; }
.pay-page .auth-card { width: min(68rem, 100%); align-content: start; }
.pay-page #auth { align-self: start; padding-top: var(--space-lg); }
/* A connect link's page (/connect/{token}): the auth card alone, centered; no marketing panel, no footer. */
.auth-page.connect-page { grid-template-columns: 1fr; }
/* The card is #main, so the app's top band (#main) would paint a hard-edged box behind the mark on this one-column page. */
.connect-page #main { background-image: none; }
.connect-page .connect-step { display: grid; gap: var(--space-md); }
.connect-page .connect-step .auth-notice { margin: 0; }
.pay-page #auth a.pay-back { justify-self: start; font-size: var(--text-sm); text-decoration: none; color: var(--color-muted); }
.pay-page #auth a.pay-back:hover { color: var(--color-ink); }
.pay-page #auth .auth-title { font-size: var(--text-2xl); }
/* What you buy, as one short strip above Kelviq's checkout. The checkout keeps the full width: it shows plan and price in its
   own left column, and needs about 960px for its two columns. */
.pay-page #auth > div.pay-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-sm); align-items: start; padding-top: 0; }
.pay-summary { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--space-2xs) var(--space-md); padding: var(--space-sm) var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); }
.pay-summary p, .pay-summary h2 { margin: 0; }
.pay-plan { display: flex; align-items: baseline; gap: var(--space-xs); }
.pay-plan h2 { font-size: var(--text-xl); font-weight: 500; }
.pay-summary .pay-price { grid-row: 1; grid-column: 2; text-align: right; }
.pay-price b { font-size: var(--text-xl); font-weight: 500; color: var(--color-ink); font-variant-numeric: tabular-nums; }
.pay-summary .pay-price span { font-size: var(--text-sm); }
.pay-summary .plan-seats { grid-column: 1; }
.pay-summary .pay-month { grid-column: 2; text-align: right; }
.pay-offer { grid-column: 1 / -1; color: var(--color-brand); }
.pay-summary :is(.pay-facts, .pay-note) { display: none; }
/* Its room is kept while the plan loads, so the checkout below doesn't jump. */
.pay-summary[aria-busy="true"] { min-height: 4.5rem; }
@media (max-width: 48rem) { .pay-summary .pay-month { display: none; } }
.pay-frame { min-height: 40rem; border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); overflow: hidden; }
.pay-frame > p { padding: var(--space-lg); }
.pay-frame iframe { display: block; width: 100%; border: 0; }
.auth-page .auth-field label { font-size: var(--text-md); font-weight: 500; color: var(--color-ink-2); }
.auth-page #auth .auth-terms { margin-top: var(--space-sm); font-size: var(--text-sm); line-height: 1.5; color: var(--color-muted); }
.auth-page #auth .auth-terms a { color: var(--color-muted); font-weight: 400; text-decoration-color: var(--color-silver); }
.auth-page .auth-foot { margin-top: var(--space-xl); padding-top: var(--space-md); border-top: 1px solid var(--color-silver); font-size: var(--text-sm); line-height: 1.5; color: var(--color-muted); }
.auth-page .auth-foot p { margin: 0 0 var(--space-xs); }
.auth-page .auth-foot nav { display: flex; flex-wrap: wrap; gap: var(--space-md); }
.auth-page .auth-foot a { color: var(--color-muted); text-decoration-color: var(--color-silver); }
/* "Continue with Google": Google's button rules (white, outlined, the official G at the left). */
.auth-page .auth-google { display: flex; align-items: center; justify-content: center; gap: 10px; height: 2.75rem; border: 1px solid var(--color-silver); border-radius: var(--radius-input); background: var(--color-surface); color: var(--color-google-ink); font-size: var(--text-lg); font-weight: 500; text-decoration: none !important; }
.auth-page .auth-google:hover { background: var(--color-mist); border-color: var(--color-ink-2); }
.auth-page .auth-google svg { width: 18px; height: 18px; }
.auth-or { display: flex; align-items: center; gap: var(--space-sm); font-size: var(--text-sm); color: var(--color-muted); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--color-rule); }

/* Plan & billing, plan cards, the trial badge */
.plan-dialog { width: min(66rem, calc(100% - 2rem)); display: grid; gap: var(--space-sm); }
.plan-dialog h2 { margin: 0; }
/* The four plans side by side (two by two when narrow), so none sits alone on a second row. */
.plan-dialog .plan-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.plan-dialog .plan-card { padding: var(--space-md); }
@media (max-width: 60rem) { .plan-dialog .plan-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 34rem) { .plan-dialog .plan-cards { grid-template-columns: minmax(0, 1fr); } }
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--space-sm); margin: var(--space-xs) 0; padding: 0; list-style: none; }
/* A card: name, the price first, the LinkedIn accounts as slots, two facts, one button. Only the plan that fits is filled. */
.plan-card { display: flex; flex-direction: column; gap: var(--space-xs); padding: var(--space-lg); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); }
.plan-card.is-current { border-color: var(--color-brand); box-shadow: 0 0 0 1px var(--color-brand); }
.plan-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2xs) var(--space-xs); min-height: 1.5rem; }
/* A plan's name never breaks ("Tea / m"); a tag that doesn't fit beside it goes under it. */
.plan-card h3 { margin: 0; font-size: var(--text-lg); font-weight: 500; white-space: nowrap; }
.plan-card-head .tag-chip { white-space: nowrap; }
.plan-price { margin: var(--space-2xs) 0 0; }
.plan-price b { color: var(--color-ink); font-size: var(--text-3xl); font-weight: 500; font-variant-numeric: tabular-nums; }
.plan-facts { flex: 1; display: grid; align-content: start; gap: var(--space-2xs); margin: 0; padding: 0; list-style: none; color: var(--color-muted); font-size: var(--text-sm); }
.plan-card > button { justify-content: center; margin-top: var(--space-sm); }
/* On a card the slots sit on their own line, so 1, 3 and 10 take the same room. */
.plan-card .plan-seats { flex-direction: column; align-items: start; }
/* Agency+: a count instead of slots. */
.seat-count, .plan-card .seat-count { width: 6rem; font-variant-numeric: tabular-nums; }
.plan-card .plan-seats label { font-size: var(--text-sm); color: var(--color-muted); }
.seat-total { margin: 0; color: var(--color-ink); }
.seat-total.problem { min-height: 0; margin: 0; color: var(--color-error); }
.plan-card-action { display: contents; }
.plan-card-action > button { justify-content: center; margin-top: var(--space-sm); }
.tag-ink { background: var(--color-ink); color: var(--color-surface); }
.tag-brand { background: var(--color-brand-wash); color: var(--color-brand); }
/* LinkedIn accounts as slots: what a plan runs, filled in the brand color; in the current plan, hollow until used. */
.slots { display: inline-flex; flex-wrap: wrap; gap: var(--space-2xs); max-width: 100%; }
.slot { width: 12px; height: 12px; border-radius: 3px; background: var(--color-brand); }
.plan-seats { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs) var(--space-xs); margin: var(--space-2xs) 0; font-size: var(--text-md); color: var(--color-ink); }
.plan-meter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-sm); }
.plan-meter .slot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--color-brand); }
.plan-meter .slot.is-used { background: var(--color-brand); box-shadow: none; }
.plan-now .actions { margin-top: 0; }
.plan-chooser { display: grid; gap: var(--space-xs); }
.interval-toggle { display: flex; gap: var(--space-2xs); width: fit-content; max-width: 100%; padding: var(--space-2xs); border-radius: var(--radius-input); background: var(--color-paper-2); overflow-x: auto; }
.interval-toggle button { min-height: var(--control-height-sm); gap: var(--space-2xs); border-color: var(--color-clear); background: var(--color-clear); box-shadow: none; color: var(--color-muted); font-size: var(--text-sm); white-space: nowrap; }
.interval-toggle button[aria-pressed="true"] { background: var(--color-surface); color: var(--color-ink); box-shadow: var(--shadow-card); }
.interval-save { color: var(--color-accent); font-size: var(--text-xs, .75rem); font-weight: 500; }
.plan-per-month { margin: calc(-1 * var(--space-2xs)) 0 0; }
.change-dialog, .new-ws-dialog { display: grid; gap: var(--space-sm); }
.change-dialog h2, .new-ws-dialog h2, .change-dialog p { margin: 0; }
/* New workspace: name, then four plan cards with the period on their heading row, then what today costs. */
.new-ws-dialog { width: min(58rem, calc(100% - 2rem)); gap: var(--space-lg); }
.new-ws-dialog .ws-intro { display: grid; gap: var(--space-2xs); }
.new-ws-dialog h2 { font-family: var(--font-display); font-weight: 400; font-size: var(--text-2xl); letter-spacing: var(--tracking-display); color: var(--color-ink-strong); }
.ws-form { display: grid; gap: var(--space-lg); }
.ws-field { display: grid; gap: var(--space-2xs); max-width: 24rem; }
.ws-field label { font-weight: 500; color: var(--color-ink-2); }
.ws-plans { display: grid; gap: var(--space-sm); }
.ws-plans > p { margin: 0; }
.ws-plan-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xs) var(--space-sm); }
.ws-plan-head h3 { margin: 0; font-size: var(--text-md); font-weight: 500; color: var(--color-ink-2); }
.ws-plan-head .interval-toggle { min-width: 0; }
.ws-plan-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-sm); }
.ws-plan-card { display: flex; flex-direction: column; gap: var(--space-2xs); margin: 0; padding: var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); font-weight: 400; cursor: pointer; transition: border-color var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out); }
.ws-plan-card:hover { border-color: var(--color-rule-2); }
.ws-plan-card.is-picked { border-color: var(--color-ink); box-shadow: 0 0 0 1px var(--color-ink); }
.ws-plan-card:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.ws-plan-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); }
.ws-plan-name { font-size: var(--text-lg); font-weight: 500; color: var(--color-ink); }
.ws-plan-card input[type=radio] { margin: 0; accent-color: var(--color-ink); }
.ws-plan-card .plan-price { margin: var(--space-2xs) 0 0; }
.ws-plan-card .plan-price b { font-size: var(--text-2xl); }
/* The slots get their own line, so 1, 3 and 10 accounts take the same room on every card. */
.ws-plan-card .plan-seats { flex-direction: column; align-items: start; margin: var(--space-xs) 0 0; min-height: 3.25rem; font-size: var(--text-sm); }
.ws-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm); padding-top: var(--space-md); border-top: 1px solid var(--color-rule); }
.ws-due { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2xs) var(--space-xs); margin: 0; }
.ws-due b { font-size: var(--text-xl); font-weight: 500; color: var(--color-ink); font-variant-numeric: tabular-nums; }
.ws-foot .actions { margin: 0; }
@media (max-width: 40rem) {
  .ws-plan-cards { grid-template-columns: minmax(0, 1fr); }
  .ws-plan-card .plan-seats { min-height: 0; }
  .ws-plan-head .interval-toggle { width: 100%; }
  .ws-plan-head .interval-toggle button { flex: 1; justify-content: center; padding-inline: var(--space-2xs); }
  .ws-plan-head .interval-toggle .interval-save { display: none; }
  .ws-foot { flex-direction: column; align-items: stretch; }
  .ws-foot .actions { justify-content: stretch; } .ws-foot .actions button { flex: 1; justify-content: center; }
}
.sub-details { display: grid; gap: var(--space-sm); }
.sub-facts { display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-xl); margin: 0; }
.sub-facts dt { color: var(--color-muted); font-size: var(--text-sm); }
.sub-facts dd { margin: 0; color: var(--color-ink); }
.sub-details .banner, .locked-banner { width: 100%; border-radius: var(--radius-card); }
.invoices { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.invoices th, .invoices td { padding: var(--space-xs) var(--space-sm) var(--space-xs) 0; border-bottom: 1px solid var(--color-rule); text-align: left; }
.invoices th { color: var(--color-muted); font-weight: 500; }
.invoices td:last-child { text-align: right; padding-right: 0; }
@media (max-width: 40rem) { .invoices th:nth-child(2), .invoices td:nth-child(2) { display: none; } }
.settings-form { display: grid; gap: var(--space-2xs); max-width: 28rem; }
.settings-form label { margin-top: var(--space-xs); font-weight: 500; }
.settings-form .actions { margin-top: var(--space-sm); }
.trial-banner { border-radius: var(--radius-card); padding: var(--space-2xs) var(--space-2xs) var(--space-2xs) var(--space-sm); }
.trial-chip { display: flex; align-items: center; justify-content: space-between; gap: var(--space-xs); width: 100%; min-height: 2rem; margin-bottom: var(--space-xs); padding: 0 var(--space-xs) 0 var(--space-sm); border: 1px solid var(--color-rule); border-radius: 8px; background: var(--color-paper-2); box-shadow: none; color: var(--color-ink); font-size: var(--text-sm); font-weight: 500; }
.trial-chip-go { color: var(--color-accent); }
.trial-chip:hover:not(:disabled) { border-color: var(--color-ink); }
.trial-chip.is-urgent { border-color: var(--color-warn-solid); background: var(--color-paper); }

/* A problem line's fix button sits right after the message */
#inbox-meta button, #net-meta button, #inbox-meta a, #net-meta a { margin-left: var(--space-xs); }
.thread-empty > button { margin-top: var(--space-sm); }

/* General: the address field, with the fixed part in front */
.slug-field { display: flex; align-items: stretch; border: 1px solid var(--color-input-edge); border-radius: var(--radius-input); background: var(--color-surface); overflow: hidden; }
.slug-field:focus-within { border-color: var(--color-focus); box-shadow: var(--ring-field); }
.slug-prefix { display: flex; align-items: center; padding: 0 var(--space-2xs) 0 var(--space-sm); background: var(--color-paper-2); color: var(--color-muted); font-size: var(--text-sm); white-space: nowrap; }
.slug-field input { flex: 1; min-width: 0; border: 0; border-radius: 0; box-shadow: none; outline: none; }

/* Members: invite form, then people and pending invites in one list */
.invite-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-xs); }
.invite-form > .link { grid-column: 1 / -1; justify-self: start; }
.invite-link { display: grid; gap: var(--space-2xs); padding: var(--space-sm); border-radius: var(--radius-card); background: var(--color-paper-2); }
.member-list { display: grid; margin: 0; padding: 0; list-style: none; }
.member { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) 10rem 13rem; align-items: center; gap: var(--space-sm); padding: var(--space-xs) 0; border-top: 1px solid var(--color-rule); }
.member-av { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--color-paper-2); color: var(--color-ink); font-size: var(--text-sm); font-weight: 500; }
.member-av .icon { width: 1rem; height: 1rem; color: var(--color-muted); }
.member-who { display: grid; min-width: 0; }
.member-who > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-name { display: flex; align-items: center; gap: var(--space-xs); font-weight: 500; }
.member-role { width: 100%; }
.member > .tag-chip { justify-self: start; }
.member > button { justify-self: end; }
.member.is-pending .member-name { color: var(--color-muted); }
@media (max-width: 40rem) {
  .invite-form { grid-template-columns: minmax(0, 1fr) auto; }
  .invite-form > button.primary { grid-column: 1 / -1; }
  .member { grid-template-columns: 2.25rem minmax(0, 1fr) auto; }
  .member > :last-child, .member > .member-acts { grid-column: 2 / -1; justify-self: start; }
}
.member-acts { display: flex; justify-content: flex-end; gap: var(--space-2xs); }
.member > .member-acts { justify-self: end; }
.invite-form > #invite-summary { grid-column: 1 / -1; margin: 0; }

/* Customize access (04-07): one grid inside the member's own row. Radios look like the segmented toggle, scoped here only. */
.member > .access-grid { grid-column: 1 / -1; justify-self: stretch; }
.access-grid { display: grid; padding: var(--space-md); border-radius: var(--radius-card); background: var(--color-paper-2); }
.access-grid > p { margin: 0 0 var(--space-xs); }
.access-row, .access-owner-only { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-md); min-width: 0; margin: 0; padding: var(--space-sm) 0; border: 0; border-top: 1px solid var(--color-rule); }
.access-row > legend, .access-owner-only > legend { float: left; grid-column: 1; padding: 0; font-weight: 500; }
.access-row > p { grid-column: 1; margin: 0; }
/* Two fixed tracks (segments, then a slot for "Can reply"), so the segments line up on every row with or without the check. */
.access-row > .access-levels { display: grid; grid-template-columns: auto 6.5rem; align-items: center; gap: var(--space-sm); grid-column: 2; grid-row: 1 / span 2; }
.access-row > .access-levels > .check[hidden] { display: none; }
.access-owner-only > p { display: inline-flex; align-items: center; gap: var(--space-2xs); grid-column: 2; margin: 0; }
.access-owner-only .icon { width: 1rem; height: 1rem; }
/* overflow visible: the group's own overflow: hidden clipped the focus ring; the end segments round their own corners instead. */
.access-row .outcome-toggle { overflow: visible; }
.access-row .outcome-toggle label { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: var(--control-height-sm); margin: 0; padding: 0 var(--space-sm); background: var(--color-surface); font-size: var(--text-sm); font-weight: 500; cursor: pointer; transition: background-color var(--dur-micro), color var(--dur-micro); }
.access-row .outcome-toggle label:first-child { border-radius: calc(var(--radius-input) - 1px) 0 0 calc(var(--radius-input) - 1px); }
.access-row .outcome-toggle label:last-child { border-radius: 0 calc(var(--radius-input) - 1px) calc(var(--radius-input) - 1px) 0; }
/* The button.small hit area (--hit-expand), vertical only so neighbours don't overlap. */
.access-row .outcome-toggle label::before { content: ""; position: absolute; inset: calc(-1 * var(--hit-expand)) 0; }
.access-row .outcome-toggle label + label { border-left: 1px solid var(--color-rule); }
.access-row .outcome-toggle label:has(input:checked) { background: var(--color-ink); color: var(--color-surface); }
.access-row .outcome-toggle label:has(input:focus-visible) { z-index: 1; outline: 2px solid var(--color-focus); outline-offset: 2px; }
.access-grid > .actions { display: flex; justify-content: flex-end; gap: var(--space-xs); margin-top: var(--space-md); }
@media (max-width: 40rem) {
  .access-row, .access-owner-only { grid-template-columns: minmax(0, 1fr); }
  .access-row > .access-levels { display: flex; flex-wrap: wrap; grid-column: 1; grid-row: auto; margin-top: var(--space-xs); }
  .access-row .outcome-toggle { display: flex; flex: 1; }
  .access-row .outcome-toggle label { flex: 1; }
  .access-owner-only > p { grid-column: 1; }
}
/* Transfer ownership: last in the Members card, under a hairline. */
.owner-transfer { display: grid; gap: var(--space-xs); margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--color-rule); }
.owner-transfer p { margin: 0; }
.owner-transfer-title { font-weight: 500; }
.owner-transfer-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); margin-top: var(--space-xs); } /* title and sentence bind (8px); the controls sit 16px under them */
.owner-transfer-row select { flex: 1 1 14rem; width: auto; max-width: 24rem; }
/* LinkedIn account owner and privacy (UI-SPEC §5): one card per picked account, owner line in the account list. */
.privacy-card p { margin: 0; }
.privacy-card .account-owner-line { font-weight: 500; }
.privacy-card .switch-row { font-size: var(--text-md); } /* UI-SPEC: Body 14px/500, not the 12px global label */
.privacy-owner { display: grid; gap: var(--space-xs); padding-top: var(--space-md); border-top: 1px solid var(--color-rule); }
.privacy-owner h4 { margin: 0; font-size: var(--text-md); font-weight: 500; }
.privacy-owner-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.privacy-owner-row select { flex: 1 1 14rem; width: auto; max-width: 24rem; }
.account-owner { color: var(--color-muted); font-size: var(--text-sm); }
/* On a phone it wraps under the name (its own line in DOM order), before the status, usage and buttons. */
@media (max-width: 60rem) { .sender-list .account-owner { flex-basis: 100%; padding-left: calc(2.25rem + var(--space-sm)); } }
/* Inbox hidden count (UI-SPEC §6): a plain muted line under the count, no ring or box. */
#view-inbox .inbox-hidden { display: inline-flex; align-items: center; gap: var(--space-2xs); flex-basis: 100%; order: 4; margin: 0; color: var(--color-muted); font-variant-numeric: tabular-nums; }
#view-inbox .inbox-hidden .icon { width: 1rem; height: 1rem; }
#view-inbox .queue-tags .row-private { display: inline-flex; align-items: center; gap: var(--space-2xs); color: var(--color-muted); }
.row-private .icon { width: .875rem; height: .875rem; }
/* Template text the role doesn't show (UI-SPEC Templates area): one muted 12px line with the lock icon. */
.step-hidden { display: inline-flex; align-items: center; gap: var(--space-2xs); margin: 0; color: var(--color-muted); font-size: var(--text-sm); font-weight: 400; }
.step-hidden .icon { width: 1rem; height: 1rem; }
.view-hint:empty { display: none; }
/* A page's view-only hint keeps a gap above the content under it; the inbox's lines up with the inbox tools. */
:is([id^="view-"], [id^="panel-"]) > .view-hint { margin-bottom: var(--space-md); }
#view-inbox > .view-hint { margin: 0; padding: var(--space-sm) var(--space-xl) 0; }
@media (max-width: 60rem) { #view-inbox > .view-hint { padding-inline: var(--space-md); } }
.empty-row .empty-state { margin: 0 auto; padding: var(--space-md) 0; text-align: center; }
.empty-row .empty-state .task-icon { margin-inline: auto; }
.empty-row .empty-state h3 { color: var(--color-ink); }
.task[aria-disabled="true"] { cursor: default; }

/* Sales Navigator filter rail: group headings, choice rows with Include and Exclude, excluded chips */
.sn-group { margin: var(--space-md) 0 var(--space-xs); padding-inline: var(--space-md); font-size: var(--text-xs, .75rem); font-weight: 500; letter-spacing: .02em; color: var(--color-ink-2, inherit); }
.sn-toggle { padding-inline: var(--space-md); }
.sn-account { padding: var(--space-sm) var(--space-md); }
.sn-choices .sn-choice { display: flex; align-items: center; gap: var(--space-sm); padding: 4px 0; font-size: var(--text-sm); }
.sn-choice > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.chip.chip-excluded { color: var(--color-error); }
.sn-list { display: grid; gap: 2px; }
.sn-list .check { font-size: var(--text-sm, .88rem); }
.lead-off { border: 0; padding: 0; margin: 0; min-width: 0; opacity: .55; }
.lead-off .hint { opacity: 1; }
.lead-range { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); }

#view-research #source-switch button[aria-pressed="true"] { background: var(--color-selected); color: var(--color-ink); }
/* The Outlo Database is not mature yet: a small badge over its tab's corner says so. The strip lets it overhang. */
#view-research #source-switch { overflow: visible; }
#view-research #source-switch [data-source="leaddb"] { position: relative; }
.beta-tag { position: absolute; top: -.5rem; right: -.5rem; display: inline-flex; align-items: center; padding: 0 .3125rem; min-height: .875rem; border-radius: var(--radius-pill); background: var(--color-info-bg); box-shadow: 0 0 0 2px var(--color-surface); color: var(--color-info); font-size: .5625rem; font-weight: 500; line-height: 1; pointer-events: none; }
#view-lists .outreach-filters select:focus { outline-color: var(--color-ink); }
#view-inbox .inbox-tools { background: var(--color-header); }
#view-inbox .inbox-list .queue-item:has([aria-pressed="true"]), #view-review .queue-item:has([aria-pressed="true"]) { background: var(--color-brand-wash) linear-gradient(var(--color-brand), var(--color-brand)) left / 3px 100% no-repeat; box-shadow: none; }
.unread-count { flex: none; align-self: center; min-width: 1.25rem; padding: 0 .3rem; border-radius: var(--radius-pill); background: var(--color-brand); color: var(--color-on-dark); font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 600; line-height: 1.25rem; text-align: center; font-variant-numeric: tabular-nums; }
#view-inbox .inbox-secondary-views button[aria-pressed="true"] { background: var(--color-selected); color: var(--color-ink); }
#view-inbox .inbox-secondary-views button[aria-pressed="true"]::before { border-color: var(--color-ink); }
#view-settings .settings-tabs button[aria-selected="true"] { background: var(--color-selected); color: var(--color-ink); }
#view-settings .settings-tabs button[aria-selected="true"] .icon { color: var(--color-brand); }
#view-settings .settings-head { background: var(--color-header); border-radius: var(--radius-card); }
:is(#content-frame #main, body) .avatar { border: 0; background: var(--color-brand-wash); color: var(--color-brand); }
#view-research #results-body tr:has(input:checked) { background: var(--color-selected); }
#view-research .active-chips .chip { background: var(--color-selected); color: var(--color-ink); }

/* Color describes an action or state, never the page it belongs to.
   Buttons: ink for the one main action, a hairline for the rest. Pausing or removing changes the words, never the fill. */
#content-frame #main .view [data-intent="primary"] { background: var(--color-action); color: var(--color-action-ink); border-color: transparent; }
#content-frame #main .view [data-intent="primary"]:hover:not(:disabled) { background: var(--color-action-hover); }
#content-frame #main .view [data-intent="pause"] { background: var(--color-paper); color: var(--color-ink); border-color: var(--color-rule-2); box-shadow: none; }
#content-frame #main .view [data-intent="pause"]:hover:not(:disabled) { background: var(--color-paper-2); border-color: var(--color-silver); }
#content-frame #main .view :is(button.danger, [data-intent="danger"]) { background: var(--color-paper); color: var(--color-error); border-color: var(--color-rule-2); }
#content-frame #main .view :is(button.danger, [data-intent="danger"]):hover:not(:disabled) { background: var(--color-paper); border-color: var(--color-error); }
.ask-dialog button.danger { background: var(--color-error); border-color: var(--color-error); color: var(--color-on-dark); }
.ask-dialog button.danger:hover:not(:disabled) { background: var(--color-error); border-color: var(--color-error); opacity: .9; }
/* A state is the logo's ring and a word, never a tinted box. Solid teal: live or done. Open teal: under way.
   Amber: waiting on a person. Red: went wrong. Grey: not started. */
:is(#content-frame #main, body) :is(.pill, .stamp, .person-status, .outreach-summary-state, .camp-state, .tag-green, .tag-amber, .tag-blue, .tag-plain) { display: inline-flex; align-items: center; gap: var(--space-xs); min-height: 1.5rem; padding: 0; border: 0; border-radius: 0; background: none; color: var(--color-ink-2); font-size: var(--text-sm); font-weight: 500; }
:is(#content-frame #main, body) :is(.pill, .stamp, .person-status, .outreach-summary-state, .camp-state, .tag-green, .tag-amber, .tag-blue, .tag-plain)::before { content: ""; position: static; flex: none; box-sizing: border-box; width: .625rem; height: .625rem; border: 2px solid var(--color-silver); border-radius: var(--radius-pill); background: none; }
:is(#content-frame #main, body) :is(.pill-active, .state-active, .camp-active, .stamp-sent, .tag-green, .person-status-sent)::before { border-color: var(--color-brand); background: var(--color-brand); }
:is(#content-frame #main, body) :is(.stamp-approved, .stamp-sending, .tag-blue, .person-status-approved, .person-status-sending)::before { border-color: var(--color-brand); }
:is(#content-frame #main, body) :is(.pill-paused, .state-paused, .camp-paused, .stamp-draft, .tag-amber, .person-status-draft)::before { border-color: var(--color-warn-solid); }
:is(#content-frame #main, body) :is(.stamp-unknown, .stamp-failed, .person-status-unknown) { color: var(--color-error); }
:is(#content-frame #main, body) :is(.stamp-unknown, .stamp-failed, .person-status-unknown)::before { border-color: var(--color-error); }
:is(#content-frame #main, body) :is(.pill-draft, .state-none, .stamp-cancelled, .person-status-none, .person-status-cancelled) { color: var(--color-muted); }
:is(#content-frame #main, body) .stamp .icon { display: none; }
:is(#content-frame #main, body) .outreach-summary-state { color: var(--color-ink); font-size: var(--text-md); }
/* What kind of thing it is, not what state it is in: small mono, no ring. */
.type-tag { margin-left: var(--space-sm); font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 400; color: var(--color-muted); white-space: nowrap; }
#view-inbox [data-outcome="won"][aria-pressed="true"] { background: var(--color-brand-wash); color: var(--color-ink); }
#view-inbox [data-outcome="lost"][aria-pressed="true"] { background: var(--color-paper-3); color: var(--color-ink-2); }
#content-frame #main .view .usage-bar > span { background: var(--color-chart); }
#view-research .stale-note { border: 1px solid var(--color-rule-2); background: none; color: var(--color-ink-2); }

/* Remaining workspaces: a clear purpose, compact controls, and content-first layouts. */
.workspace-page-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-md); margin-bottom: var(--space-lg); }
.workspace-page-head > div { min-width: 0; flex: 1 1 20rem; }
.workspace-page-head h2 { margin: 0; font-size: 1.75rem; line-height: 1.25; font-weight: 500; letter-spacing: -.02em; }
.workspace-page-head p { margin: var(--space-xs) 0 0; max-width: 65ch; font-size: var(--text-md); line-height: 1.5; color: var(--color-muted); }
.workspace-page-head > button { flex: none; }
.workspace-guidance { margin: 0 0 var(--space-md); font-size: var(--text-sm); color: var(--color-muted); }
#view-review > .filters { margin-bottom: var(--space-md); }
#view-review .review-editor { min-width: 0; }
#view-review #review-back { display: none; }
#view-review .review-queue { max-height: calc(100dvh - 17rem); background: var(--color-surface); }
#view-review .queue-item { padding: var(--space-md); }
#view-review .queue-preview { font-size: var(--text-sm); line-height: 1.5; }
#view-review .slip { grid-template-columns: minmax(0, 1fr) 14rem; padding: var(--space-lg); }
#view-review .slip-head h3, #view-review .slip-head .person-open { font-size: var(--text-lg); }
#view-review .slip textarea { min-height: 13rem; }
#view-review .slip-meta { gap: var(--space-md); padding-left: var(--space-md); }
#view-review .slip .actions { margin-top: var(--space-md); }

.workspace-filter-menu { position: relative; flex: none; }
.workspace-filter-menu > summary { display: flex; align-items: center; min-height: 2.25rem; padding: 0 var(--space-sm); border: 1px solid var(--color-input-edge); border-radius: var(--radius-button); background: var(--color-surface); font-size: var(--text-md); cursor: pointer; list-style: none; white-space: nowrap; }
.workspace-filter-menu > summary::-webkit-details-marker { display: none; }
.workspace-filter-menu[open] > summary { background: var(--color-selected); color: var(--color-ink); }
.workspace-filter-panel { position: absolute; right: 0; top: calc(100% + var(--space-xs)); z-index: var(--z-dropdown); display: grid; gap: var(--space-md); width: min(18rem, calc(100vw - 2rem)); max-height: calc(100dvh - 12rem); overflow: auto; padding: var(--space-md); border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-lift); }
.workspace-filter-menu:not([open]) .workspace-filter-panel { display: none; }
.workspace-filter-panel > header { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.workspace-filter-panel > header strong { font-size: var(--text-md); font-weight: 500; }
.workspace-filter-panel .select-field { display: grid; gap: var(--space-xs); margin: 0; font-size: var(--text-sm); color: var(--color-muted); }
.workspace-filter-panel select { width: 100%; }
#view-connections .conn-tools { position: relative; align-items: center; flex-wrap: nowrap; margin: 0; padding: var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-card) var(--radius-card) 0 0; background: var(--color-header); }
#view-connections .conn-tools .search-field { min-width: 0; max-width: 24rem; }
#view-connections .workspace-filter-menu { margin-left: auto; }
#view-connections .workspace-filter-panel { right: calc(-1 * var(--space-sm)); }
#view-connections #conn-list { border: 1px solid var(--color-rule); border-top: 0; border-radius: 0 0 var(--radius-card) var(--radius-card); }
#view-connections .conn-table { table-layout: fixed; }
#view-connections .conn-table th:first-child { width: 42%; }
#view-connections .conn-table :is(th,td) { padding: var(--space-md); overflow-wrap: anywhere; }
#view-connections .conn-headline { white-space: normal; line-height: 1.5; }
#view-network .network-bar { padding: var(--space-xs); border: 1px solid var(--color-rule); gap: var(--space-sm); }
#view-network .net-table { table-layout: fixed; }
#view-network .net-table th:first-child { width: 40%; }
#view-network .net-table th.c-actions { width: 12rem; }
#view-network .net-table :is(th,td) { padding: var(--space-md); }
#view-network .net-table .row-role { white-space: normal; max-width: none; overflow-wrap: anywhere; line-height: 1.5; }
#view-network .net-note { overflow-wrap: anywhere; }
#view-network .net-note-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; cursor: pointer; }
#view-network .net-note-text[aria-expanded="true"] { -webkit-line-clamp: unset; }
#view-network .net-note-text:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
#view-campaigns .campaign-table { border: 1px solid var(--color-rule); border-radius: var(--radius-card); }
#view-campaigns .campaign-table > .section-heading { padding: var(--space-md); flex-wrap: wrap; gap: var(--space-xs); border-bottom: 1px solid var(--color-rule); border-radius: var(--radius-card) var(--radius-card) 0 0; }
#view-campaigns .campaign-table > .table-wrap { border: 0; border-radius: 0; }
#view-campaigns .campaign-list .campaign-name { font-size: var(--text-md); }
#view-campaigns .campaign-list :is(th,td) { padding: var(--space-md); }
#view-campaigns .campaign-list .campaign-progress { white-space: normal; line-height: 1.6; }
#view-campaigns .campaign-compose { padding: var(--space-lg); margin-bottom: var(--space-lg); border: 1px solid var(--color-rule); border-radius: var(--radius-card); }
#view-campaigns .campaign-compose > .hint { max-width: 70ch; font-size: var(--text-md); line-height: 1.6; }
#view-settings .settings-layout { gap: var(--space-lg); grid-template-columns: 12rem minmax(0, 1fr); }
#view-settings .settings-panels { min-width: 0; }
#view-settings .settings-panel { width: 100%; max-width: 64rem; }
#view-settings .panel-intro { padding-bottom: var(--space-md); border-bottom: 1px solid var(--color-rule); }
#view-settings .panel-intro h3 { font-size: var(--text-lg); font-weight: 500; letter-spacing: normal; }
#view-settings .panel-intro p { max-width: 65ch; line-height: 1.6; }
#view-settings #panel-connection { padding: var(--space-lg); border: 1px solid var(--color-rule); border-radius: var(--radius-card); }
#view-settings .settings-head { background: none; }
#view-settings .settings-card { border: 1px solid var(--color-rule); border-radius: var(--radius-card); padding: var(--space-lg); }
@media (max-width: 60rem) {
  .workspace-page-head { align-items: flex-start; margin-bottom: var(--space-md); gap: var(--space-sm); }
  .app-shell:has(:is(#view-review, #view-connections, #view-network, #view-campaigns, #view-settings):not([hidden])) { grid-template-rows: max-content minmax(0, 1fr); }
  .workspace-page-head > div { flex-basis: 14rem; }
  .workspace-page-head h2 { font-size: 1.5rem; }
  #view-review .review-workbench { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  #view-review:not(.review-detail-open) .review-editor, #view-review.review-detail-open .review-queue { display: none; }
  #view-review .review-queue { border: 0; max-height: none; }
  #view-review #review-back { display: flex; justify-content: flex-start; min-height: 2.75rem; width: 100%; padding-inline: var(--space-md); border: 0; border-bottom: 1px solid var(--color-rule); border-radius: 0; }
  #view-review .slip { grid-template-columns: minmax(0, 1fr); padding: var(--space-md); }
  #view-review .slip-meta { grid-column: 1; grid-row: auto; flex-direction: row; flex-wrap: wrap; border: 0; padding: 0; margin-top: var(--space-sm); }
  #view-review .slip textarea { min-height: 10rem; }
  #view-review .slip .actions { flex-wrap: wrap; gap: var(--space-xs); }
  #view-review .slip .actions button { min-height: 2.75rem; }
  #view-settings .settings-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
  #view-settings #panel-connection, #view-settings .settings-card { padding: var(--space-md); }
}
@media (max-width: 40rem) {
  .workspace-filter-menu > summary { min-height: 2.75rem; }
  #view-connections .conn-table, #view-connections .conn-table tbody { display: block; width: 100%; }
  #view-connections .conn-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #view-connections .conn-table tbody tr { display: grid; height: auto; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-sm); padding: var(--space-md); border-bottom: 1px solid var(--color-rule); }
  #view-connections .conn-table tbody tr:last-child { border-bottom: 0; }
  #view-connections .conn-table tbody :is(th,td) { display: block; min-width: 0; border: 0; }
  #view-connections .conn-table tbody th { grid-column: 1 / -1; }
  #view-connections .conn-table td[data-label="Campaign"] { grid-column: 1; font-size: var(--text-sm); color: var(--color-muted); }
  #view-connections .conn-table td[data-label="Stage"] { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
  #view-connections .conn-table td[data-label="Accepted"]::before { content: "Accepted "; color: var(--color-muted); }
  #view-connections .conn-table .conn-person, #view-connections .conn-table .conn-person > span { min-width: 0; }
  #view-connections .conn-table .conn-name { white-space: normal; }
  #view-connections .conn-table td.actions:empty { display: none; }
  #view-connections .conn-table :is(th,td), #view-network .net-table :is(th,td) { padding: 0; }
  #view-connections .conn-table th:first-child, #view-network .net-table th:first-child { width: auto; }
  #view-network .net-table th.c-actions { width: auto; }
  #view-campaigns .campaign-list :is(th,td) { padding: var(--space-2xs) 0; }
  #view-campaigns .campaign-list tr { padding: var(--space-md); }
  #view-campaigns .campaign-compose { padding: var(--space-md); }
}

/* Every view is the same ruled sheet as the Dashboard: a display title, hairlines between regions, no boxes.
   A table opens with one ink rule. Tabs carry their count as a figure. Working panes run to the edges of the page. */
.workspace-page-head { align-items: flex-end; margin-bottom: 0; padding: var(--space-sm) 0 var(--space-lg); }
.workspace-page-head h2, #view-research #h-research, #view-lists .list-switcher-name { font-family: var(--font-display); font-size: var(--text-display-s); font-weight: 500; line-height: 1.05; letter-spacing: var(--tracking-display); color: var(--color-ink); }
.workspace-page-head p { margin-top: var(--space-sm); max-width: 48rem; }
#main .view table thead { background: none; }
#main .view table thead th { border-top: 2px solid var(--color-ink); color: var(--color-muted); }
#main .view table :is(th, td):first-child { padding-left: 0; }
#main .view table :is(th, td):last-child { padding-right: 0; }
#main .view tbody tr:hover { background: none; }

/* Tabs that count: the figure leads, the label sits under it, the chosen one stands on a teal rule. */
:is(#view-review > .filters, #view-network .filters, #conn-stages, #list-figures) { gap: var(--space-xl); width: 100%; margin: 0; padding: 0; border-radius: 0; background: none; overflow: visible; }
:is(#view-review > .filters, #view-network .filters, #conn-stages, #list-figures) button { flex-direction: column-reverse; align-items: flex-start; justify-content: flex-end; gap: var(--space-3xs); min-width: 6.5rem; min-height: 0; height: auto; padding: var(--space-sm) 0; border: 0; border-bottom: 2px solid var(--color-clear); border-radius: 0; background: none; box-shadow: none; color: var(--color-muted); font-size: var(--text-sm); font-weight: 400; white-space: nowrap; }
:is(#view-review > .filters, #view-network .filters, #conn-stages, #list-figures) button:hover:not(:disabled) { background: none; color: var(--color-ink); }
:is(#view-review > .filters, #view-network .filters, #conn-stages, #list-figures) button[aria-pressed="true"] { border-bottom-color: var(--color-brand); background: none; box-shadow: none; color: var(--color-ink); }
:is(#view-review > .filters, #view-network .filters, #conn-stages, #list-figures) .count { display: block; min-width: 0; padding: 0; border-radius: 0; background: none; font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 500; line-height: 1.1; letter-spacing: var(--tracking-display); text-align: left; color: var(--color-ink-2); }
:is(#view-review > .filters, #view-network .filters, #conn-stages, #list-figures) .count:empty::before { content: "0"; }
:is(#view-review > .filters, #view-network .filters, #conn-stages, #list-figures) button[aria-pressed="true"] .count { color: var(--color-ink); }

/* Tasks: the queue and the draft fill the page under the tabs. */
#view-review:not([hidden]) { display: flex; flex-direction: column; height: calc(100dvh - var(--space-lg) - var(--banners-h, 0px)); min-height: 36rem; margin-bottom: calc(-1 * var(--space-xl)); }
#view-review .review-workbench { flex: 1; grid-template-columns: 21rem minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); min-height: 0; margin-inline: calc(-1 * var(--space-xl)); border: 0; border-top: 1px solid var(--color-rule); border-radius: 0; }
#view-review .review-queue { max-height: none; }
#view-review :is(.queue-item, .queue-group) { padding-left: var(--space-xl); }
#view-review .review-editor { overflow-y: auto; }
#view-review .slip { padding: var(--space-lg) var(--space-xl); }

/* Inbox: the conversation is the page. It starts under the header and runs to the window's edges. */
#view-inbox:not([hidden]) { margin: calc(-1 * var(--space-lg)) calc(-1 * var(--space-xl)) calc(-1 * var(--space-xl)); }
#view-inbox #inbox-meta { margin: 0; padding: var(--space-sm) var(--space-xl); }
#view-inbox #inbox-meta:empty { min-height: 0; padding: 0; }
/* Under the banners (--banners-h, measured in app.js), not a whole window tall: else they push the reply box off the bottom. */
#view-inbox .inbox-shell { grid-template-columns: minmax(20rem, 24rem) minmax(0, 1fr); height: calc(100dvh - var(--banners-h, 0px)); border: 0; border-radius: 0; }
#view-inbox .inbox-tools { padding-left: var(--space-xl); background: none; }
#view-inbox .inbox-list .queue-item { padding-left: var(--space-xl); }
#inbox-list .queue-time { font-family: var(--font-mono); font-size: var(--text-xs); word-spacing: -.25em; }

/* Search */
#view-research .search-intro { margin-bottom: var(--space-lg); padding: var(--space-sm) 0 var(--space-lg); border: 0; border-bottom: 1px solid var(--color-rule); border-radius: 0; background: none; }
#view-research .search-lead { margin-top: var(--space-sm); }
#view-research .search-layout { position: relative; gap: var(--space-2xl); }
#view-research .search-layout::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(16rem + var(--space-lg)); width: 1px; background: var(--color-rule); }
#view-research .filter-rail { border: 0; border-radius: 0; background: none; }
#view-research .rail-head { padding: 0 0 var(--space-md); background: none; }
#view-research .filter-sec[open] { background: none; }
#view-research .filter-sec > summary { padding-inline: 0; }
#view-research .filter-sec > summary:hover { background: none; color: var(--color-brand); }
#view-research .filter-sec > :not(summary) { margin-inline: 0; }
#view-research :is(.sn-group, .sn-toggle, .sn-account) { padding-inline: 0; }
#view-research .results { border: 0; border-radius: 0; }
#view-research .results-head { padding: 0 0 var(--space-md); }
#view-research .results :is(.pager, .savebar) { padding-inline: 0; }

/* Outreach */
#view-lists .outreach-head { align-items: flex-end; margin-bottom: 0; padding: var(--space-sm) 0 var(--space-md); }
/* The chevron rides the last line of the name, so a name that wraps keeps its caret. */
#view-lists #list-switcher-toggle { align-items: flex-end; }
#view-lists #list-switcher-toggle > .icon { width: 1.25rem; height: 1.25rem; margin-bottom: var(--space-xs); }
#view-lists .outreach-summary { margin-bottom: 0; padding: 0 0 var(--space-lg); border: 0; border-radius: 0; background: none; }
#view-lists .toolbar { padding: var(--space-xs) 0; border: 0; border-top: 1px solid var(--color-rule); border-radius: 0; background: none; }
#view-lists .table-card { border: 0; border-radius: 0; }
#view-lists #enrich-progress .enrich-progress { border-inline: 0; }

/* Campaigns: how far each one has got is a teal bar, the same one the Dashboard draws. */
#view-campaigns .campaign-table { border: 0; border-radius: 0; }
#view-campaigns .campaign-table > .section-heading { padding: 0 0 var(--space-sm); border: 0; border-radius: 0; background: none; }
#view-campaigns .campaign-compose { padding: var(--space-lg) 0; border: 0; border-top: 1px solid var(--color-rule); border-radius: 0; }
/* The name cell is a flex box, so the row carries the hairline: one unbroken rule under each campaign. */
#view-campaigns .campaign-list tbody :is(th, td) { border-bottom: 0; }
#view-campaigns .campaign-list tbody tr { border-bottom: 1px solid var(--color-rule); }
#campaign-rows .campaign-progress .fig { display: inline; font-family: var(--font-mono); color: var(--color-ink); }
#campaign-rows .camp-bar { width: min(100%, 14rem); height: 4px; margin: var(--space-2xs) 0; border-radius: var(--radius-pill); background: var(--color-paper-3); overflow: hidden; }
#campaign-rows .camp-fill { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--color-brand); }

/* Invitations */
#view-network .network-bar { align-items: flex-end; margin-bottom: var(--space-md); padding: 0; border: 0; border-bottom: 1px solid var(--color-rule); border-radius: 0; background: none; }
#view-network .network-bar .filters { width: auto; margin-bottom: -1px; }
#view-network .network-bar > :not(.filters) { margin-bottom: var(--space-sm); }
#view-network .net-bulk:empty { display: none; }
#view-network #net-list { border: 0; border-radius: 0; }
.net-table .net-age { font-family: var(--font-mono); font-size: var(--text-xs); word-spacing: -.25em; }

/* Connections */
#view-connections .conn-tools { padding: var(--space-sm) 0; border: 0; border-top: 1px solid var(--color-rule); border-radius: 0; background: none; }
#view-connections .workspace-filter-panel { right: 0; }
#view-connections #conn-list { border: 0; border-radius: 0; }
.conn-table td[data-label="Accepted"] { font-family: var(--font-mono); font-size: var(--text-xs); word-spacing: -.25em; }

/* Settings */
#view-settings .settings-layout { padding-top: var(--space-lg); border-top: 1px solid var(--color-rule); }
#view-settings #panel-connection { padding: 0; border: 0; border-radius: 0; }
#view-settings .settings-card { padding: var(--space-lg) 0 0; border: 0; border-top: 1px solid var(--color-rule); border-radius: 0; }
#view-settings :is(.limits-form, .usage-strip) { border: 0; border-top: 1px solid var(--color-rule); border-radius: 0; background: none; }
#view-settings .panel-intro + :is(.settings-card, .limits-form) { border-top: 0; padding-top: 0; }
#view-settings .limit-group { padding: var(--space-lg) 0; }
#view-settings .limits-form .problem { margin-inline: 0; }
#view-settings .usage { padding: var(--space-md) var(--space-lg) var(--space-md) 0; box-shadow: none; }
#view-settings .usage-value { font-family: var(--font-display); font-size: var(--text-3xl); letter-spacing: var(--tracking-display); line-height: 1.15; }

/* Figures open a list view, in the Dashboard's pipeline vocabulary: a label, a big number, a rate drawn as the logo's ring. */
.sheet-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-lg); padding: var(--space-md) 0 var(--space-xl); border-top: 1px solid var(--color-rule); }
.sheet-figures[hidden] { display: none; }
.sheet-figure { display: grid; align-content: start; min-width: 0; }
.sheet-figure-label { font-size: var(--text-md); color: var(--color-muted); }
.sheet-figure strong { font-family: var(--font-display); font-size: 2.75rem; font-weight: 500; line-height: 1.15; letter-spacing: var(--tracking-display); color: var(--color-ink); font-variant-numeric: tabular-nums; }
.sheet-figure-note { display: flex; align-items: center; gap: var(--space-xs); min-height: 1.25rem; font-size: var(--text-sm); color: var(--color-muted); }
#conn-stages { border-top: 1px solid var(--color-rule); }
/* Outreach: who is where on the left, whether it runs and the switch for it on the right, in one band. */
#view-lists .outreach-band { position: relative; display: flex; flex-wrap: wrap-reverse; align-items: center; gap: var(--space-md) var(--space-2xl); border-top: 1px solid var(--color-rule); }
#view-lists .outreach-band #list-figures { flex: 0 1 auto; width: auto; min-width: 0; max-width: 100%; }
#view-lists .outreach-band .outreach-summary { position: static; flex: 1 1 25rem; min-width: 0; padding: var(--space-sm) 0; }
#view-lists .outreach-row-tools .outreach-actions-panel { right: 0; }
/* The open person's row is marked the way an open task is. */
#main .view tbody tr.selected-record, #main .view tbody tr.selected-record:hover { background: var(--color-brand-wash); }
:is(#content-frame #main, body) tr.selected-record .avatar { background: var(--color-paper); }
#view-lists .outreach-band #list-figures[hidden] + .outreach-summary { flex: 1 1 auto; }
#list-figures[hidden] { display: none; }
#list-figures button[hidden] { display: none; }
#view-lists .toolbar, #view-connections .conn-tools { border-top-color: var(--color-rule); }
:is(#conn-stages, .outreach-band) + :is(.toolbar, .conn-tools) { margin-top: -1px; }
/* Search starts on the logo's ring, not a grey box. */
#view-research #results-body .empty-row td::before { content: ""; display: block; width: 2.5rem; height: 2.5rem; margin: 0 auto var(--space-lg); border: 6px solid var(--color-brand); border-radius: var(--radius-pill); }

@media (max-width: 60rem) {
  .workspace-page-head h2, #view-research #h-research, #view-lists .list-switcher-name { font-size: var(--text-3xl); }
  #view-review:not([hidden]) { display: block; height: auto; min-height: 0; margin-bottom: 0; }
  #view-review .review-workbench { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; margin-inline: calc(-1 * var(--space-md)); }
  #view-review :is(.queue-item, .queue-group) { padding-left: var(--space-md); }
  #view-review .review-editor { overflow: visible; }
  #view-review .slip { padding: var(--space-md); }
  #view-inbox:not([hidden]) { margin: calc(-1 * var(--space-lg)) calc(-1 * var(--space-md)) 0; }
  #view-inbox #inbox-meta { padding-inline: var(--space-md); }
  #view-inbox .inbox-shell { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 3.75rem - var(--banners-h, 0px)); }
  #view-inbox .inbox-tools, #view-inbox .inbox-list .queue-item { padding-left: var(--space-md); }
  /* The pane has no margin left to borrow, so the options menu opens from the action row's own left edge. */
  #view-inbox .thread-actions { position: relative; }
  #view-inbox .thread-options { position: static; }
  #view-inbox .thread-options-menu { left: 0; right: auto; }
  #view-research .search-layout::before { display: none; }
  #view-research .search-layout { gap: var(--space-md); }
  #view-lists .outreach-band { gap: 0 var(--space-2xl); }
}
@media (max-width: 40rem) {
  :is(#view-review > .filters, #view-network .filters, #conn-stages, #list-figures) { gap: 0 var(--space-md); }
  :is(#view-review > .filters, #view-network .filters, #conn-stages, #list-figures) .count { font-size: var(--text-2xl); }
  #list-figures { flex-wrap: wrap; }
  #conn-stages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :is(#conn-stages, #list-figures) button { min-width: 5rem; min-height: 2.75rem; }
  .sheet-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); padding-bottom: var(--space-lg); }
  .sheet-figure strong { font-size: var(--text-3xl); }
  #view-review > .filters button { justify-content: flex-end; }
  #view-network .network-bar .filters { flex: 1 1 0; min-width: 0; }
  #view-network .network-bar .filters button { flex: 1; }
  /* A phone row is a card with no box: it starts where the title starts, and the list itself carries the ink rule. */
  #main .view table tr { padding-inline: 0; }
  #main .view :is(.people-status, .conn-table, .campaign-list) { border-top: 2px solid var(--color-ink); }
  #main .view .people-table thead tr { border-top: 2px solid var(--color-ink); }
  #main .view .people-table thead th { border-top: 0; }
}

/* Inbox presence, as on LinkedIn: a solid dot when online, a ring when reachable on the phone app. */
.avatar-presence { position: relative; display: inline-flex; flex: none; align-self: flex-start; }
.presence { position: absolute; right: -1px; bottom: -1px; width: .7rem; height: .7rem; border-radius: var(--radius-pill); box-shadow: 0 0 0 2px var(--color-surface); }
.presence.online { background: var(--color-success); }
.presence.mobile { background: var(--color-surface); box-shadow: inset 0 0 0 2px var(--color-success), 0 0 0 2px var(--color-surface); }
.avatar-lg + .presence { width: .8rem; height: .8rem; }
.thread-presence { margin: 0; color: var(--color-muted); font-size: var(--text-sm); }
.star-mark { flex: none; align-self: center; display: inline-flex; color: var(--color-warn); }
.star-mark svg { width: .85rem; height: .85rem; fill: currentColor; }
.seen-receipt { margin: calc(-1 * var(--space-xs)) 0 0; align-self: flex-end; color: var(--color-faint); font-size: var(--text-xs); text-align: right; }

/* Conversation actions in More, and reactions under a message. */
.thread-options-list { display: grid; gap: 2px; margin: 0 0 var(--space-md); padding-bottom: var(--space-sm); border-bottom: 1px solid var(--color-rule); }
.thread-options-list:last-child { margin: 0; padding-bottom: 0; border-bottom: 0; } /* no Deal outcome under it (a Client): no divider */
.thread-option { justify-content: flex-start; width: 100%; min-height: 2rem; padding: 0 var(--space-xs); border: 0; background: none; color: var(--color-ink); font-weight: 400; text-align: left; }
.thread-option:hover { background: var(--color-surface-sunk); }
.bubble-stack { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bubble-row.mine .bubble-stack { align-items: flex-end; }
.reactions { display: flex; flex-wrap: wrap; gap: 4px; }
.reaction { min-height: 1.5rem; padding: 0 .45rem; border: 1px solid var(--color-rule); border-radius: var(--radius-pill); background: var(--color-surface); color: var(--color-ink-2); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.reaction.mine { border-color: var(--color-brand); background: var(--color-brand-wash); color: var(--color-ink-strong); }
.reaction:disabled { cursor: default; opacity: 1; }
.react-picker { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--color-rule); border-radius: var(--radius-pill); background: var(--color-surface); box-shadow: var(--shadow-pop); }
.react-picker button { width: 1.9rem; height: 1.9rem; min-height: 0; padding: 0; border: 0; border-radius: var(--radius-pill); background: none; font-size: 1rem; }
.react-picker button:hover { background: var(--color-surface-sunk); }
.react-open svg { width: .95rem; height: .95rem; }
/* Their avatar stays level with the bubble, not with the reactions under it. */
.bubble-row:not(.mine):has(> .bubble-stack > .reactions) > .avatar { margin-bottom: calc(1.5rem + 4px); }

/* Warmth: the landing page's light, carried inside. The sheet keeps its rules; a few surfaces gain paper, a wash and a soft lift.
   The hero is a washed panel, figures are tiles, a glow sits behind each title, a row answers the pointer, an empty page shows what comes. */
/* Every view opens on a band of the app wash that fades into the page. The dashboard keeps a faint glow: its hero panel is the wash. */
#main { background-image: var(--band-app); background-repeat: no-repeat; background-position: top; background-size: 100% 13rem; }
#main:has(> #view-activity:not([hidden])) { background-image: var(--glow-app); background-position: top right; background-size: auto; }
@keyframes view-enter { from { opacity: 0; } to { opacity: 1; } }
#main > .view:not([hidden]) { animation: view-enter var(--dur-short) var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) { #main > .view:not([hidden]) { animation: none; } }

/* Dashboard hero: the day's headline on the app wash, the ledger a white card lifted off it. */
#overview .today { align-items: center; margin-bottom: var(--space-xl); padding: var(--space-2xl) var(--space-xl); border-radius: var(--radius-dialog); background: var(--wash-app); }
#overview .today-ledger { padding: var(--space-xs) var(--space-lg); border-top: 0; border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-soft); }
#overview .today-ledger [role="row"] { padding: var(--space-sm) 0; }
#overview .today-ledger [role="row"]:last-child { border-bottom: 0; }
#overview .today-faces > * { border-color: var(--color-clear); box-shadow: 0 0 0 2px var(--color-surface); }
#overview .pipeline { border-top: 0; padding-top: 0; }

/* An empty pipeline is the funnel's shape in the brand wash: what will be there, drawn pale. */
#overview .pipeline.is-ghost .funnel-band path { fill: var(--color-brand-wash); }
#overview .pipeline.is-ghost .pipe-step b { color: var(--color-silver); }
#overview .pipeline.is-ghost .pipe-empty { padding-top: var(--space-xs); }

/* An empty dashboard list: a washed mark, what is true now, what comes next. */
#overview .home-empty { display: flex; align-items: center; gap: var(--space-sm); }
#overview .home-empty > p { display: grid; gap: var(--space-3xs); }
#overview .home-empty-title { font-weight: 500; color: var(--color-ink); }
.empty-mark { display: inline-grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem; border-radius: var(--radius-pill); background: var(--color-brand-wash); color: var(--color-brand); }
.empty-mark .icon { width: 1.125rem; height: 1.125rem; }

/* Get set up: four numbered steps side by side. The next one stands on the wash; a done one keeps a check. */
.setup-card { gap: var(--space-md); margin-bottom: var(--space-lg); border-color: var(--color-rule); box-shadow: var(--shadow-soft); }
.setup-list { gap: var(--space-xs); }
.setup-list .task { align-items: flex-start; height: 100%; min-height: 0; padding: var(--space-sm); border-radius: var(--radius-card); white-space: normal; }
.setup-list .task-text { gap: var(--space-3xs); }
.setup-list .task-text .task-label, .setup-list .task-sub { overflow: visible; text-overflow: clip; white-space: normal; }
.setup-list .task-sub { line-height: 1.45; }
.setup-list .step-mark { width: 1.75rem; height: 1.75rem; border-color: var(--color-rule-2); border-radius: var(--radius-pill); font-family: var(--font-mono); font-size: var(--text-sm); color: var(--color-muted); }
.setup-list .task.is-current, .setup-list .task.is-current:hover:not(:disabled) { background: var(--color-brand-wash); }
.setup-list .task.is-current .step-mark { border-color: var(--color-brand); background: var(--color-brand); color: var(--color-brand-ink); }
.setup-list .task.done { background: none; }
.setup-list .task.done .step-mark { border-color: var(--color-clear); background: var(--color-brand-wash); color: var(--color-brand); }

/* Every empty page leads with the same washed tile. */
.empty-state .task-icon { width: 2.5rem; height: 2.5rem; margin-bottom: var(--space-sm); border: 0; background: var(--color-brand-wash); color: var(--color-brand); }
.empty-state .task-icon .icon { width: 1.125rem; height: 1.125rem; }

/* Figures that open a view are tiles on warm paper. */
.sheet-figures { gap: var(--space-sm); padding: 0 0 var(--space-xl); border-top: 0; }
.sheet-figure { padding: var(--space-md) var(--space-lg); border-radius: var(--radius-card); background: var(--color-mist); box-shadow: var(--shadow-ring); }

/* A row answers the pointer with warm paper. The open person's row keeps the brand wash. */
#main .view tbody tr:not(.empty-row, .selected-record):hover { background: var(--color-mist); }

@media (max-width: 48rem) {
  #overview .today { padding: var(--space-lg) var(--space-md); }
}
@media (max-width: 40rem) {
  .sheet-figures { gap: var(--space-xs); padding-bottom: var(--space-lg); }
  .sheet-figure { padding: var(--space-sm) var(--space-md); }
}

/* An empty page is a small hero: a rounded panel on the app wash, a white mark, a headline, one line, the next step. */
div.empty-state:not(.empty-row *) { max-width: none; padding: var(--space-2xl) var(--space-xl); border-radius: var(--radius-dialog); background: var(--wash-app); }
div.empty-state:not(.empty-row *) .task-icon { background: var(--color-surface); box-shadow: var(--shadow-xs); }
div.empty-state:not(.empty-row *) h3 { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 500; line-height: 1.2; letter-spacing: var(--tracking-display); color: var(--color-ink); }
div.empty-state:not(.empty-row *) p { margin-bottom: var(--space-md); color: var(--color-ink-2); }
div.empty-state:not(.empty-row *) > :last-child { margin-bottom: 0; }
/* In the Tasks workbench the panel stands clear of the pane's edges, in line with a draft's text. */
#view-review .review-editor div.empty-state { margin: var(--space-lg) var(--space-xl); }
@media (max-width: 48rem) {
  div.empty-state:not(.empty-row *) { padding: var(--space-lg) var(--space-md); }
  #view-review .review-editor div.empty-state { margin: var(--space-md); }
}

/* Inbox: the conversation fills the frame, so there is no band. The open conversation's head is the wash, and with no conversation open
   the panel sits centred in the pane. */
#view-inbox .thread-head { background-image: var(--wash-app); }
#inbox-detail div.thread-empty { width: min(36rem, 100% - 2 * var(--space-md)); margin: auto; }

/* Inbox, second pass. The list opens on the band, mirrored, so its mint meets the rail and its cream meets the head of the conversation.
   The title and the number of people waiting sit on it. */
#view-inbox .inbox-head { position: relative; isolation: isolate; display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); padding: var(--space-lg) var(--space-md) 0 var(--space-xl); }
#view-inbox .inbox-head::before { content: ""; position: absolute; inset: 0 0 -4.25rem; z-index: -1; background: var(--band-app); transform: scaleX(-1); pointer-events: none; }
#view-inbox .inbox-head h2 { margin: 0; font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 500; line-height: 1.2; letter-spacing: var(--tracking-display); color: var(--color-ink); }
#view-inbox .inbox-count { margin: 0; font-family: var(--font-mono); font-size: var(--text-xs); word-spacing: -.25em; color: var(--color-brand); white-space: nowrap; }
#view-inbox .inbox-count:empty { display: none; }
#inbox-list .avatar { width: 2.5rem; height: 2.5rem; font-size: var(--text-sm); }
/* On the open conversation the face keeps its wash, ringed in white so it stands off the row. */
#inbox-list .queue-item:has([aria-pressed="true"]) .avatar { box-shadow: 0 0 0 2px var(--color-surface); }
/* An empty list shows where conversations will be. */
.queue-ghost-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-sm); padding: var(--space-md) var(--space-md) var(--space-md) var(--space-xl); border-bottom: 1px solid var(--color-rule); }
.queue-ghost-row:nth-child(2) { opacity: .6; }
.queue-ghost-row:nth-child(3) { opacity: .3; }
.queue-ghost-dot { width: 2.5rem; height: 2.5rem; border-radius: var(--radius-pill); background: var(--color-brand-wash); }
.queue-ghost-lines { display: grid; align-content: center; gap: var(--space-xs); }
.queue-ghost-lines i { height: .5rem; border-radius: var(--radius-pill); background: var(--color-paper-2); }
.queue-ghost-lines i:nth-child(1) { width: 38%; background: var(--color-paper-3); }
.queue-ghost-lines i:nth-child(2) { width: 86%; }
.queue-ghost-lines i:nth-child(3) { width: 54%; }

/* The head of the conversation: the name in the display face, the state as a white pill on the wash. */
#view-inbox .thread-head { padding: var(--space-lg) var(--space-lg) var(--space-md); }
#view-inbox .thread-who h3 { font-family: var(--font-display); font-size: var(--text-heading); font-weight: 500; letter-spacing: var(--tracking-display); }
#view-inbox .thread-tags { gap: var(--space-xs); margin-top: var(--space-2xs); }
#content-frame #main #view-inbox .thread-tags .tag-chip { min-height: 1.5rem; padding: 0 var(--space-sm); border-radius: var(--radius-pill); background: var(--color-surface); box-shadow: var(--shadow-xs); }
/* Where the conversation stands: small white pills right under the name. */
#view-inbox .thread-state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs); min-width: 0; max-width: none; margin: 0; }
#content-frame #main #view-inbox .thread-state .tag-chip { min-height: 1.125rem; padding: 0 var(--space-xs); border-radius: var(--radius-pill); background: var(--color-surface); box-shadow: var(--shadow-xs); font-size: var(--text-xs); }
#view-inbox .thread-state .tag-amber { color: var(--color-warn); }

/* The conversation: the head's light carries on behind it, it starts with who it is with, days are ruled labels, messages are soft bubbles. */
#view-inbox .thread-body { background: var(--glow-app) no-repeat; }
.thread-opener { align-self: center; display: grid; justify-items: center; gap: var(--space-2xs); padding: var(--space-lg) var(--space-md) var(--space-sm); text-align: center; }
#view-inbox .thread-opener .avatar { width: 3.5rem; height: 3.5rem; margin-bottom: var(--space-xs); font-size: var(--text-lg); box-shadow: 0 0 0 4px var(--color-surface), var(--shadow-lift); }
.thread-opener-title { margin: 0; font-family: var(--font-display); font-size: var(--text-lg); font-weight: 500; color: var(--color-ink); }
.thread-opener-sub { margin: 0; font-size: var(--text-sm); color: var(--color-muted); }
#view-inbox .thread-day { align-self: stretch; display: flex; align-items: center; gap: var(--space-sm); max-width: none; margin-block: var(--space-xs); font-family: var(--font-mono); font-size: var(--text-xs); word-spacing: -.25em; color: var(--color-muted); white-space: nowrap; }
#view-inbox .thread-day::before, #view-inbox .thread-day::after { content: ""; flex: 1; height: 1px; background: var(--color-rule); }
#view-inbox .bubble { border-radius: var(--radius-dialog) var(--radius-dialog) var(--radius-dialog) var(--radius-sm); }
#view-inbox .mine .bubble { border-radius: var(--radius-dialog) var(--radius-dialog) var(--radius-sm) var(--radius-dialog); }
#view-inbox .bubble time { font-family: var(--font-mono); font-size: var(--text-xs); word-spacing: -.25em; }

/* The reply box is one white card standing off the conversation. The field has no frame of its own: the card takes the focus mark. */
#view-inbox .composer { margin: 0 var(--space-md) var(--space-md); padding: var(--space-md); border: 1px solid var(--color-rule-2); border-radius: var(--radius-dialog); box-shadow: var(--shadow-lift); }
#view-inbox .composer textarea { min-height: 3.5rem; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
#view-inbox .composer textarea:focus-visible { outline: none; }
#view-inbox .composer:has(textarea:focus-visible) { border-color: var(--color-focus); outline: 1px solid var(--color-focus); outline-offset: 0; }
@media (max-width: 60rem) {
  #view-inbox .inbox-head { padding: var(--space-md) var(--space-md) 0; }
  .queue-ghost-row { padding-left: var(--space-md); }
  #view-inbox .thread-head { padding: var(--space-md); }
  #view-inbox .composer { margin: 0 var(--space-sm) var(--space-sm); padding: var(--space-sm); }
}

/* Inbox account switcher. With several LinkedIn accounts the list head carries the choice; the waiting count drops to its own line. */
#view-inbox .inbox-head { flex-wrap: wrap; row-gap: var(--space-2xs); }
#view-inbox .inbox-account { margin: 0 0 0 auto; min-width: 0; max-width: 60%; }
#view-inbox .inbox-account select { width: auto; max-width: 100%; min-height: var(--control-height-sm); padding-block: 0; border-radius: var(--radius-pill); background-color: var(--color-surface); font-size: var(--text-sm); font-weight: 500; text-overflow: ellipsis; }
#view-inbox .inbox-head:has(.inbox-account:not([hidden])) { align-items: center; }
#view-inbox .inbox-head:has(.inbox-account:not([hidden])) .inbox-count { order: 3; flex-basis: 100%; }

/* Conversation head: when they were last active reads on the same line as where the conversation stands. */
#view-inbox .thread-tags { align-items: center; }
#view-inbox .thread-tags .thread-presence { margin-right: var(--space-2xs); white-space: nowrap; }
#view-inbox .thread-head #inbox-back, #view-inbox .thread-actions .icon-only { display: none; }
#view-inbox #inbox-options-toggle > .icon { display: none; }
/* On a wide screen the state pills sit right under the name, beside the actions. What they do and presence share the line
   under that, which runs on under the actions. A long headline is cut to make room; in a pane too narrow for both, presence drops to its own line. */
#view-inbox .thread-line { display: grid; gap: var(--space-2xs); min-width: 0; }
@media (min-width: 60.01rem) {
  #view-inbox .thread-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-2xs) var(--space-sm); }
  #view-inbox .thread-head > .thread-person, #view-inbox .thread-head > .avatar { grid-row: 1 / span 2; align-self: start; }
  #view-inbox .thread-who { display: contents; }
  #view-inbox .thread-who h3 { grid-column: 2; grid-row: 1; min-width: 0; }
  #view-inbox .thread-state { grid-column: 2; grid-row: 2; }
  #view-inbox .thread-actions { grid-column: 3; grid-row: 1 / span 2; }
  #view-inbox .thread-line { grid-column: 2 / -1; grid-row: 3; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs) var(--space-sm); }
  #view-inbox .thread-headline { flex: 1 1 10rem; min-width: 0; max-width: max-content; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #view-inbox .thread-tags { flex: 0 1 auto; margin-top: 0; }
}
/* On a phone the head is one tight block under the bar: Back, the face, the name and two icon actions on the first row,
   the state pills under the name, then the headline on one line, then presence. */
@media (max-width: 60rem) {
  #view-inbox .thread-head { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-2xs) var(--space-xs); padding: var(--space-xs) var(--space-sm) var(--space-sm); }
  #view-inbox .thread-head #inbox-back { display: grid; place-items: center; width: 2.75rem; min-height: 2.75rem; margin-left: calc(-1 * var(--space-xs)); padding: 0; border: 0; border-radius: var(--radius-pill); background: none; box-shadow: none; }
  #view-inbox .thread-head #inbox-back .icon { width: 1.375rem; height: 1.375rem; }
  #view-inbox .thread-head .avatar-lg { width: 2.25rem; height: 2.25rem; font-size: var(--text-sm); }
  /* The name's box dissolves, so the name sits in the first row and the two lines under it run the full width. */
  #view-inbox .thread-who, #view-inbox .thread-line { display: contents; }
  #view-inbox .thread-who h3 { grid-column: 3; grid-row: 1; min-width: 0; margin-left: var(--space-2xs); font-size: var(--text-xl); }
  #view-inbox .thread-who .thread-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #view-inbox .thread-state { grid-column: 3 / -1; grid-row: 2; margin-left: var(--space-2xs); }
  #view-inbox .thread-actions { grid-column: 4; grid-row: 1; width: auto; flex-wrap: nowrap; gap: var(--space-2xs); }
  #view-inbox .thread-headline, #view-inbox .thread-tags { grid-column: 1 / -1; margin: 0; }
  #view-inbox .thread-headline { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #view-inbox .thread-actions .action-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  #view-inbox .thread-actions > button, #view-inbox .thread-options > summary { width: 2.75rem; min-height: 2.75rem; padding: 0; justify-content: center; }
  #view-inbox #inbox-options-toggle > .icon { display: block; }
  /* The actions sit at the right edge now, so their menu opens from the right. */
  #view-inbox .thread-options-menu { left: auto; right: 0; }
}

/* A figure that counts people is a way in to those people. A small arrow says so, and the figure answers the pointer:
   a tile lifts onto white paper, a pipeline stage and a ledger measure turn teal. */
.figure-go { width: 1rem; height: 1rem; color: var(--color-silver); transition: color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
button.sheet-figure { justify-content: stretch; justify-items: start; align-items: start; gap: 0; width: 100%; min-height: 0; border: 0; font-weight: 400; line-height: inherit; text-align: left; white-space: normal; transition: background-color var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out); }
button.sheet-figure .figure-go { position: absolute; top: var(--space-md); right: var(--space-md); }
button.sheet-figure:hover:not(:disabled), button.sheet-figure:focus-visible { background: var(--color-surface); box-shadow: var(--shadow-ring), var(--shadow-lift); }
button.sheet-figure:active:not(:disabled) { background: var(--color-paper-2); }
button.sheet-figure:hover .figure-go, button.sheet-figure:focus-visible .figure-go, #overview .pipe-step:hover .figure-go, #overview .pipe-step:focus-visible .figure-go { color: var(--color-brand); transform: translate(1px, -1px); }
#overview .pipe-label { display: inline-flex; align-items: center; gap: var(--space-2xs); transition: color var(--dur-micro) var(--ease-out); }
#overview .pipe-step:hover .pipe-label, #overview .pipe-step:focus-visible .pipe-label { color: var(--color-brand); }
#overview .ledger-go { justify-content: flex-start; gap: var(--space-2xs); min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; color: inherit; font-size: inherit; font-weight: inherit; }
#overview .ledger-go .figure-go { width: .875rem; height: .875rem; }
#overview .ledger-go:hover:not(:disabled) { background: none; color: var(--color-brand); }
#overview .ledger-go:hover .figure-go, #overview .ledger-go:focus-visible .figure-go { color: var(--color-brand); transform: translateX(2px); }
/* A campaign's own counts read as text in its row; the ones that lead somewhere are underlined. */
.campaign-progress .row-figure { display: inline; }
.campaign-progress button.row-figure { min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; text-decoration: underline; text-decoration-color: var(--color-rule-2); text-underline-offset: 3px; }
.campaign-progress button.row-figure:hover:not(:disabled) { background: none; color: var(--color-brand); text-decoration-color: currentColor; }
.campaign-progress button.row-figure:hover .fig { color: inherit; }
@media (max-width: 40rem) {
  button.sheet-figure .figure-go { top: var(--space-sm); right: var(--space-sm); }
}
@media (prefers-reduced-motion: reduce) {
  .figure-go { transition: none; }
  button.sheet-figure:hover .figure-go, #overview .pipe-step:hover .figure-go, #overview .ledger-go:hover .figure-go { transform: none; }
}

/* Black Friday price locked in (src/billing.ts SALE): the card after sign-up, the Plan & billing card, each plan's first payment. */
.sale-tag { flex: none; padding: 4px 8px; border-radius: var(--radius-pill); background: var(--color-deep); color: var(--color-brand-on-dark); font-size: .6875rem; font-weight: 500; line-height: 1; letter-spacing: .03em; text-transform: uppercase; }
/* One slim strip in the banner family: tag, one line of copy, the actions together on the right. Wraps only when narrow. */
.sale-welcome { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs) var(--space-sm); padding: var(--space-2xs) var(--space-2xs) var(--space-2xs) var(--space-xs); border: 1px solid color-mix(in srgb, var(--color-brand) 30%, var(--color-rule)); border-radius: var(--radius-card); background: var(--color-brand-wash); color: var(--color-ink-2); font-size: var(--text-sm); line-height: 1.4; }
.sale-welcome p { flex: 1 1 20rem; max-width: none; margin: 0; text-wrap: pretty; } /* the global p { max-width: 75ch } broke one line in two */
.sale-welcome strong { color: var(--color-ink-strong); font-weight: 600; }
.sale-welcome-actions { display: flex; align-items: center; gap: var(--space-2xs); margin-left: auto; }
.sale-welcome-close:hover:not(:disabled) { background: color-mix(in srgb, var(--color-brand) 14%, transparent); }
/* Plan & billing: the banner's strip, with no button; padded to the banner's height. */
.sale-deal-card { padding-block: var(--space-xs); }
/* While that strip is on screen the banner would say the same thing twice above it: it steps aside (and its row with it). */
body:has(#view-settings:not([hidden]) #panel-billing:not([hidden]) .sale-deal-card) #banners .sale-welcome { display: none; }
body:has(#view-settings:not([hidden]) #panel-billing:not([hidden]) .sale-deal-card) #banners:has(> .sale-welcome:only-child) { padding: 0; }
body:has(#view-settings:not([hidden]) #panel-billing:not([hidden]) .sale-deal-card) #banners > .sale-welcome:first-child + .privacy-notice { margin-top: calc(-1 * var(--space-sm)); } /* the bar it stacked under stepped aside */
.plan-sale-price, .plan-card .plan-sale-price { display: block; margin: var(--space-2xs) 0 0; color: var(--color-ink-2); }
.plan-sale-price b { color: var(--color-brand); font-variant-numeric: tabular-nums; }

/* ---------- the Agency page (05-11, 05-UI-SPEC §2): one column, cards 32px apart ---------- */
.agency-page { max-width: 64rem; }
.agency-page #agency-body { display: grid; gap: var(--space-xl); }
/* The head's buttons size to themselves (not the lede's 1 1 20rem), so they end on the page's right edge (07 UI-REVIEW). */
.agency-page #agency-head-actions { display: flex; flex-wrap: wrap; flex: 0 1 auto; gap: var(--space-xs); margin: 0; }
.agency-page .agency-notice { width: auto; }
.agency-figures { display: flex; flex-wrap: wrap; gap: var(--space-lg); margin: 0; }
.agency-figures > div { display: grid; gap: var(--space-xs); }
.agency-figures dt { color: var(--color-muted); font-size: var(--text-sm); }
.agency-figures dd { margin: 0; font-size: var(--text-lg); font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; }
.agency-page .agency-price, .agency-drop p { margin: 0; font-size: var(--text-md); font-variant-numeric: tabular-nums; }
.agency-drop { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.agency-page .agency-seat-actions { justify-content: flex-start; gap: var(--space-xs); margin: 0; }
/* The scroller holds the table's .sr spans (position: absolute), so they never widen the page on a phone. */
.agency-page .table-wrap { position: relative; }
.agency-table { font-size: var(--text-md); }
.agency-table thead { background: var(--color-paper-2); }
.agency-table th, .agency-table td { padding-block: var(--space-xs); padding-inline: var(--space-sm); }
.agency-table tbody tr { height: 3rem; }
.agency-table tbody th { min-width: 12rem; font-weight: 400; }
.agency-ws-line { display: flex; align-items: center; gap: var(--space-2xs); }
.agency-ws-line a { font-weight: 500; color: var(--color-brand); }
/* Accent rule 1: "Billing portal" is teal, in the stop notice too (where .notice .link is the error tint). */
.agency-page .agency-notice .link { color: var(--color-brand); }
.agency-slug { display: block; }
.agency-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.agency-num .tag-chip { margin-left: var(--space-2xs); }
.agency-table .c-actions > button { vertical-align: middle; }
/* Empty states inside the page's cards: a card heading (16/500), within the page's four sizes, not the display h3. */
.agency-page div.empty-state:not(.empty-row *) h3 { font: 500 var(--text-lg)/1.2 var(--font-body); letter-spacing: 0; }
.agency-page .invite-form > .agency-invite-summary { grid-column: 1 / -1; margin: 0; }
/* 14px/500 everywhere, also inside a dialog, where `dialog p` is 12px. */
.reveal-lead { color: var(--color-ink); font-size: var(--text-md); font-weight: 500; }
@media (max-width: 40rem) { .agency-table .agency-cost { display: none; } }
/* All clients: the two cards 32px apart, as the Clients and seats cards (07-UI-SPEC §3, UI-REVIEW). */
#mv-all { display: grid; gap: var(--space-xl); }
/* All clients: Account problems (07-12, 07-UI-SPEC §2). Rows are two lines tall: the ring and word, its detail under it. */
#mv-all .table-wrap { position: relative; }
#mv-all .mv-count, .problems-table .problem-since { font-variant-numeric: tabular-nums; }
.problems-table { font-size: var(--text-md); }
.problems-table thead { background: var(--color-paper-2); }
.problems-table th, .problems-table td { padding-block: var(--space-xs); padding-inline: var(--space-sm); vertical-align: top; text-align: left; }
.problems-table th { font-weight: 500; }
.problems-table tbody tr { height: auto; }
.problem-detail { display: block; font-size: var(--text-sm); color: var(--color-muted); }
.problems-table .problem-since { white-space: nowrap; }
.problem-fix a { color: var(--color-brand); }
.problem-fix .muted { font-size: var(--text-sm); }
.problems-ok { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.problems-ok p { margin: 0; font-size: var(--text-md); }
/* 14/500 for the empty line's ring word (the ring rule is 12px, at #main's specificity). */
#view-agency #mv-all .problems-ok .tag-green { font-size: var(--text-md); font-weight: 500; }
/* At ≤40rem each problem is a stacked block (lesson 4): Problem, account, then Workspace and Since on one line, then the fix. */
@media (max-width: 40rem) {
  .problems-table, .problems-table tbody, .problems-table tbody tr, .problems-table tbody th, .problems-table tbody td { display: block; width: auto; }
  .problems-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .problems-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-xs); padding: var(--space-sm) 0; border-bottom: 1px solid var(--color-rule); }
  .problems-table tbody tr:last-child { border-bottom: 0; }
  .problems-table tbody tr > :not([data-label]) { grid-column: 1 / -1; }
  .problems-table tbody th, .problems-table tbody td { padding: 0; border: 0; }
  .problems-table td[data-label]::before { content: attr(data-label) / ""; display: block; font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }
}
/* All clients: Results by workspace (07-13, 07-UI-SPEC §3). Teal only on workspace links; never on rates, figures or arrows. */
.mv-range, .mv-custom { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-xs); }
.mv-custom[hidden] { display: none; }
.mv-custom .mv-field { display: grid; gap: var(--space-2xs); }
.mv-custom label { margin: 0; }
.mv-custom .hint { flex: 1 0 100%; margin: 0; min-height: 0; }
.mv-custom .hint:empty { display: none; }
.mv-range-line { margin: 0; font-size: var(--text-md); font-variant-numeric: tabular-nums; }
.mv-range-line .mv-tz, .mv-updated, .mv-rate-note { font-size: var(--text-sm); color: var(--color-muted); }
.mv-updated, .mv-rate-note { margin: 0; font-variant-numeric: tabular-nums; }
/* Empty (an error, or no as_of): no blank line above the alert (UI-REVIEW). */
.mv-range-line:empty, .mv-updated:empty { display: none; }
/* The table, the all-zero line and the rate note, --space-xs apart. */
.mv-kpi-body { display: grid; gap: var(--space-xs); }
#mv-all .mv-zero { margin: 0; font-size: var(--text-md); }
.kpi-table { font-size: var(--text-md); }
.kpi-table thead { background: var(--color-paper-2); color: var(--color-ink); }
.kpi-table th, .kpi-table td { padding-block: var(--space-xs); padding-inline: var(--space-sm); text-align: left; font-variant-numeric: tabular-nums; }
.kpi-table th { font-weight: 500; }
.kpi-table tbody tr { height: 3rem; }
.kpi-table .kpi-num { text-align: right; white-space: nowrap; }
.kpi-table .kpi-sort-label { display: none; }
/* The sort buttons read as header text on a wide screen; at ≤40rem they are the small buttons of the Sort by bar. */
.kpi-table .kpi-sort { min-height: var(--control-height-sm); padding: 0; border: 0; background: transparent; gap: var(--space-2xs); font-size: var(--text-sm); font-weight: 500; color: inherit; }
.kpi-table .kpi-sort:hover:not(:disabled) { background: transparent; text-decoration: underline; }
.kpi-table .kpi-sort .icon { width: .875rem; height: .875rem; }
.kpi-rate { font-size: var(--text-sm); color: var(--color-muted); }
.kpi-total { background: var(--color-paper-2); font-weight: 500; }
.kpi-total th, .kpi-total td { border-bottom: 0; }
@media (max-width: 40rem) {
  .kpi-table, .kpi-table thead, .kpi-table tbody, .kpi-table tfoot, .kpi-table th, .kpi-table td { display: block; width: auto; }
  .kpi-table thead { background: transparent; }
  .kpi-table thead tr { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); padding-bottom: var(--space-sm); border-bottom: 1px solid var(--color-rule); }
  .kpi-table thead th, #main .view .kpi-table thead th { height: auto; padding: 0; border: 0; }
  .kpi-table thead th:first-child { display: flex; align-items: center; gap: var(--space-xs); }
  .kpi-table thead .kpi-actions { display: none; }
  .kpi-table .kpi-sort-label { display: inline; font-size: var(--text-sm); font-weight: 400; color: var(--color-muted); }
  .kpi-table .kpi-sort { min-height: var(--control-height-sm); padding-inline: var(--space-sm); border: 1px solid var(--color-rule); background: var(--color-surface); }
  .kpi-table .kpi-sort:hover:not(:disabled) { background: var(--color-mist); text-decoration: none; }
  .kpi-table tbody tr, .kpi-table tfoot tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-xs) var(--space-sm); height: auto; padding: var(--space-sm) 0; border-bottom: 1px solid var(--color-rule); }
  .kpi-table tfoot tr { border-bottom: 0; }
  .kpi-table tbody th, .kpi-table tbody td, .kpi-table tfoot th, .kpi-table tfoot td { padding: 0; border: 0; }
  .kpi-table tr > th { grid-column: 1 / -1; }
  /* The name and its chips take the whole line (the chips wrap under a long name), clear of the row menu on its right. */
  .kpi-table tr:has(> td.c-actions:not(:empty)) > th { grid-column: 1 / -1; grid-row: 1; padding-right: calc(var(--control-height-sm) + var(--space-xs)); }
  .kpi-table .agency-ws-line { flex-wrap: wrap; }
  .kpi-table td.c-actions { grid-row: 1; grid-column: 2; justify-self: end; }
  .kpi-table td.c-actions:empty { display: none; }
  .kpi-table .kpi-num { text-align: left; }
  .kpi-table td[data-label]::before { content: attr(data-label) / ""; display: block; font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }
}

/* ---------- Client inbox (07-14, 07-UI-SPEC §5; R18, lessons 1, 4, 6, 9) ---------- */
.mv-inbox-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.mv-inbox-filters .mv-filter { display: grid; gap: var(--space-2xs); min-width: 0; }
.mv-inbox-filters label { margin: 0; font-size: var(--text-sm); font-weight: 400; color: var(--color-muted); }
.mv-inbox-notes p { display: flex; align-items: center; gap: var(--space-2xs); margin: 0 0 var(--space-xs); font-size: var(--text-sm); color: var(--color-muted); }
.mv-inbox-notes .icon { width: .875rem; height: .875rem; flex: none; }
.mv-inbox { display: grid; grid-template-columns: var(--person-width) minmax(0, 1fr); gap: var(--space-md); height: min(48rem, calc(100dvh - 12rem)); }
.mv-inbox-list, .mv-inbox-thread { min-width: 0; min-height: 0; border: 1px solid var(--color-rule); border-radius: var(--radius-card); background: var(--color-paper); }
.mv-inbox-list { overflow-y: auto; }
.mv-inbox-list .queue-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--space-sm); }
.mv-inbox-list .queue-preview { -webkit-line-clamp: 1; margin: 0; }
/* No 600 on this screen: unread names and the badge stay at 500 (R18). */
.mv-inbox .queue-item.unread .queue-select { font-weight: 500; }
.mv-inbox .unread-count { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 500; }
.mv-ws-line { display: flex; align-items: center; gap: var(--space-2xs); min-width: 0; margin: 0; font-size: var(--text-sm); color: var(--color-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mv-ws-line .icon { width: .75rem; height: .75rem; flex: none; }
.mv-inbox-list > .problem, .mv-inbox-list > .queue-empty { margin: 0; padding: var(--space-md); }
.mv-inbox-list .queue-empty .link { margin: 0; }
.mv-more { display: flex; justify-content: center; gap: var(--space-xs); width: calc(100% - 2 * var(--space-md)); margin: var(--space-sm) var(--space-md); }
.mv-end { margin: 0; padding: var(--space-sm) var(--space-md); font-size: var(--text-sm); color: var(--color-muted); text-align: center; }
.mv-inbox-thread { display: flex; flex-direction: column; background: var(--color-mist); }
.mv-inbox-thread .thread-who h3 { font-size: var(--text-lg); font-weight: 500; }
.mv-inbox-thread .mv-from { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2xs); margin: 0; font-size: var(--text-sm); color: var(--color-muted); }
.mv-inbox-thread .thread-state { display: flex; flex-wrap: wrap; gap: var(--space-2xs); margin: 0; }
.mv-inbox-thread .thread-state:empty { display: none; }
.mv-outcome { display: grid; justify-items: start; gap: var(--space-2xs); }
.mv-outcome p { margin: 0; font-size: var(--text-sm); color: var(--color-muted); }
.mv-open { display: inline-flex; align-items: center; gap: var(--space-2xs); width: fit-content; font-size: var(--text-md); color: var(--color-link); }
.mv-open .icon { width: .875rem; height: .875rem; }
.mv-attachment { display: flex; align-items: center; gap: var(--space-2xs); }
.mv-inbox-thread .thread-body > :first-child { margin-top: auto; }
.mv-inbox-thread .composer textarea { min-height: 5rem; font-size: var(--text-md); }
.mv-inbox-thread .composer > .problem:empty, .mv-inbox-thread .composer-foot .hint:empty { display: none; }
.mv-inbox-thread .composer-actions { margin-left: auto; }
.mv-readonly { margin: 0; padding: var(--space-md); border-top: 1px solid var(--color-rule); background: var(--color-paper); font-size: var(--text-md); color: var(--color-muted); }
.mv-thread-error { display: grid; justify-items: start; gap: var(--space-sm); padding: var(--space-lg); }
.mv-thread-error .problem { margin: 0; }
#mv-back { display: none; }
@media (max-width: 60rem) {
  .mv-inbox { grid-template-columns: minmax(0, 1fr); height: auto; }
  .mv-inbox-list { overflow: visible; }
  .mv-inbox:not(.mv-thread-open) .mv-inbox-thread, .mv-inbox.mv-thread-open .mv-inbox-list { display: none; }
  .mv-inbox-thread .thread-body { max-height: 70dvh; }
  .mv-inbox-thread .thread-head { flex-wrap: wrap; gap: var(--space-xs); padding: var(--space-md); }
  #mv-back { display: inline-grid; place-items: center; }
}
@media (max-width: 40rem) {
  .mv-inbox-filters .mv-filter { flex: 1 1 100%; }
  .mv-inbox-filters select { width: 100%; }
  .mv-inbox-filters .outcome-toggle { flex: 1; }
  /* The toggle and Refresh share a row, above Outcome. */
  .mv-inbox-filters > button { order: 1; }
  .mv-inbox-filters .mv-filter-outcome { order: 2; }
  .mv-outcome { justify-items: stretch; }
  .mv-outcome .outcome-toggle { display: flex; }
  .mv-outcome .outcome-toggle button { flex: 1; white-space: normal; }
  .mv-inbox-thread .thread-body { padding: var(--space-md); }
  .mv-inbox-thread .bubble-row { max-width: 94%; }
  .mv-inbox-thread .composer { padding: var(--space-sm); }
}

/* ---------- Agency page tabs and the Brand tab (06-10, 06-UI-SPEC §1–§2) ---------- */
/* The tablist takes its own column, so the panels keep the 64rem column the Phase 5 cards were laid out in (the
   Client workspaces table must not scroll sideways on a desktop). */
.agency-page:has(.agency-layout) { max-width: calc(64rem + 12rem + var(--space-lg)); }
.agency-layout { grid-template-columns: 12rem minmax(0, 1fr); gap: var(--space-lg); margin-top: var(--space-lg); }
@media (max-width: 60rem) { .agency-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); } }
.agency-panel { display: grid; gap: var(--space-xl); min-width: 0; }
.agency-panel[hidden] { display: none; }
.agency-tabs button[aria-selected="true"] { background: var(--color-selected); color: var(--color-ink); }
.agency-tabs button[aria-selected="true"] .icon { color: var(--color-brand); }
.brand-form { display: grid; gap: var(--space-sm); max-width: 32rem; }
.brand-field { display: grid; gap: var(--space-2xs); min-width: 0; }
.brand-field label, .brand-label { margin: 0; font-size: var(--text-md); font-weight: 500; color: var(--color-ink); }
.brand-field .hint { margin: 0; min-height: 0; }
.brand-form .is-invalid { color: var(--color-error); }
.brand-form input[type="url"] { width: 100%; min-width: 0; height: var(--control-height); padding: 0 var(--space-sm); border: 1px solid var(--color-input-edge); border-radius: var(--radius-input); background: var(--color-surface); color: var(--color-ink); font-size: var(--text-md); line-height: 1.5; }
.brand-asset-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.brand-asset-row > button[hidden] { display: none; }
.brand-asset { display: flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 0; border: 1px solid var(--color-rule-2); border-radius: var(--radius-button); background: var(--color-paper); }
.brand-asset-logo { height: 40px; max-width: 12rem; padding: 0 var(--space-sm); }
.brand-asset-logo img { max-height: 28px; max-width: 10rem; object-fit: contain; }
.brand-asset-name { overflow: hidden; font-size: var(--text-md); font-weight: 500; color: var(--color-ink); white-space: nowrap; text-overflow: ellipsis; }
.brand-asset-icon { width: 40px; height: 40px; }
.brand-asset-icon img { width: 32px; height: 32px; object-fit: contain; }
.brand-asset-tile { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; background: var(--pv-action, var(--color-action)); color: var(--pv-action-ink, var(--color-action-ink)); font-size: var(--text-lg); font-weight: 500; }
.brand-color { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.brand-color label { margin: 0; }
.brand-picker { width: var(--control-height); height: var(--control-height); padding: 2px; border: 1px solid var(--color-input-edge); border-radius: var(--radius-button); background: var(--color-surface); cursor: pointer; }
.brand-color .brand-hex { width: 7rem; font-family: var(--font-mono); font-size: var(--text-sm); }
.brand-contrast { margin: 0; font-size: var(--text-sm); color: var(--color-ink-2); }
.brand-contrast .tag-chip { margin-right: var(--space-2xs); }
.brand-actions { justify-content: flex-start; gap: var(--space-xs); margin: var(--space-xs) 0 0; }
.brand-form .problem { margin: 0; }
/* The preview: three mocks, colored by the browser's brandTokens (--pv-*, set with CSSOM), never by the app's palette. */
.brand-preview { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-sm); padding: var(--space-sm); border-radius: var(--radius-card); background: var(--color-paper-2); }
@media (min-width: 64rem) { .brand-preview { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-lg); padding: var(--space-lg); } }
.brand-preview figure { display: grid; align-content: start; gap: var(--space-xs); min-width: 0; margin: 0; }
.brand-preview figcaption { font-size: var(--text-sm); color: var(--color-muted); }
.brand-preview figure > div { display: grid; align-content: start; gap: var(--space-xs); min-width: 0; min-height: 10rem; padding: var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-button); background: var(--color-paper); font-size: var(--text-sm); color: var(--color-ink); overflow-wrap: anywhere; }
.brand-preview .preview-logo { max-height: 20px; max-width: 100%; object-fit: contain; justify-self: start; }
.brand-preview .preview-name { font-weight: 500; }
.brand-preview .preview-heading { font-weight: 500; }
.brand-preview .preview-primary { justify-self: start; padding: var(--space-2xs) var(--space-xs); border-radius: var(--radius-sm); background: var(--pv-action, var(--color-action)); color: var(--pv-action-ink, var(--color-action-ink)); font-weight: 500; }
.brand-preview .preview-link { color: var(--pv-link, var(--color-link)); text-decoration: underline; text-underline-offset: 2px; }
.brand-preview figure { grid-template-rows: 1fr auto; }
.brand-preview .preview-app { grid-template-columns: 4.5rem minmax(0, 1fr); align-content: stretch; padding: 0; }
.preview-rail .preview-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.preview-rail { display: grid; align-content: start; gap: var(--space-xs); padding: var(--space-sm) var(--space-xs); border-right: 1px solid var(--color-rule); background: var(--color-paper-2); }
.preview-item { height: var(--space-xs); border-radius: var(--radius-sm); background: var(--color-rule-2); }
.preview-item.is-current { background: var(--pv-link, var(--color-link)); }
.preview-main { display: grid; align-content: start; gap: var(--space-xs); min-width: 0; padding: var(--space-sm); }
.preview-signin .preview-primary { justify-self: stretch; text-align: center; }
.preview-input { height: 1.5rem; border: 1px solid var(--color-input-edge); border-radius: var(--radius-sm); }
.preview-foot { display: flex; flex-wrap: wrap; gap: var(--space-xs); padding-top: var(--space-xs); border-top: 1px solid var(--color-rule); }
.brand-preview .preview-email { padding: 0 0 var(--space-sm); }
.brand-preview .preview-email > :not(.preview-banner) { margin-inline: var(--space-sm); }
.preview-banner { display: grid; padding: var(--space-sm); background: var(--color-paper-2); }
.preview-kicker { font-family: var(--font-mono); color: var(--pv-link, var(--color-link)); }
.dialog-live, .dialog-live p { margin: 0; font-size: var(--text-md); color: var(--color-ink); font-variant-numeric: tabular-nums; }
.dialog-live p.muted { color: var(--color-muted); }
.dialog-live:empty { display: none; }
div.dialog-live { display: grid; gap: var(--space-2xs); }
.dialog-live.is-invalid, .dialog-live.is-invalid p { color: var(--color-error); }
.agency-dialog label { margin: 0; }
.agency-dialog-body { display: grid; gap: var(--space-sm); }
.agency-dialog-body > h3, .agency-dialog-body > p { margin: 0; }
/* A dialog lead line is 14px on itself (06-UI-SPEC lesson 6); dialog p is 12px. */
dialog p.dialog-lead { font-size: var(--text-md); color: var(--color-ink-2); }
/* The field gap is the form's own 12px grid gap (--space-sm), not the house 24px above each label. */
.agency-dialog form > label:not(:first-child) { margin-top: 0; }
.agency-dialog .actions { margin-top: var(--space-2xs); }
/* The Client report dialog (07-15, 07-UI-SPEC §6). Notes are 14px muted (lesson 5); no focus ring is clipped (lesson 9). */
.report-dialog fieldset { margin: 0; display: grid; gap: var(--space-xs); }
.report-dialog fieldset[hidden] { display: none; }
.report-dialog legend { margin-bottom: var(--space-2xs); }
.report-dialog .mv-range { min-width: 0; }
.report-dialog p.report-range-line { margin: 0; font-size: var(--text-md); color: var(--color-ink); font-variant-numeric: tabular-nums; }
.report-dialog p.report-range-line:empty { display: none; }
.report-dialog p.dialog-note { margin: 0; font-size: var(--text-md); color: var(--color-muted); overflow-wrap: anywhere; }
.report-dialog p.dialog-note[hidden] { display: none; }
.report-accounts .report-accounts-body { display: grid; gap: 0; }
.report-accounts .report-accounts-body > p { margin: 0; }
.report-accounts-list { max-height: 16rem; overflow-y: auto; padding: var(--space-2xs) var(--space-2xs) var(--space-2xs) var(--space-xs); }
.report-accounts label.check { overflow-wrap: anywhere; }
.report-accounts p.hint.is-invalid { margin: 0; color: var(--color-error); font-size: var(--text-sm); }
.report-accounts p.hint.is-invalid:empty { display: none; }
/* Stacked (UI-REVIEW): the three links full width, the primary first, then Done on its own row at the end. */
.report-dialog .actions { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; gap: var(--space-xs); }
.report-dialog .actions > button { justify-self: end; }
/* The three links look like the house buttons (pearl, and the flat ink primary). */
.report-dialog .actions a.button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: var(--control-height); padding: 0 var(--space-sm);
  border: 1px solid var(--color-rule-2); border-radius: var(--radius-button); background: var(--color-paper); color: var(--color-ink); font-size: var(--text-md); font-weight: 400; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.report-dialog .actions a.button .icon { width: 1rem; height: 1rem; }
.report-dialog .actions a.button[href]:hover { background: var(--color-paper-2); border-color: var(--color-silver); }
.report-dialog .actions a.button.primary { background: var(--color-action); border-color: var(--color-clear); color: var(--color-action-ink); }
.report-dialog .actions a.button.primary[href]:hover { background: var(--color-action-hover); }
.report-dialog .actions a[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.report-dialog p.link-hint { margin: 0; font-size: var(--text-sm); color: var(--color-muted); }
.report-dialog p.link-hint:empty { display: none; }
.dialog-live .due-now { font-weight: 500; }
.agency-move { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); }
.agency-move > div { display: grid; gap: var(--space-xs); min-width: 0; }
.agency-move label { margin: 0; }
.sender-dialog .key-reveal p { margin: 0; }
@media (max-width: 40rem) { .agency-move { grid-template-columns: 1fr; } }
/* Plan & billing: Make this an agency (UI-SPEC §13a): the name, then the button, on one row; it wraps on a phone. */
.make-agency { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); }
.make-agency label { margin: 0; width: 100%; }
.make-agency input { flex: 1; min-width: 12rem; max-width: 24rem; }
.agency-client-billing > .link { justify-self: start; }
/* ---------- an agency's host (06-UI-SPEC §6, R4, R6): the agency logo or product name on a light rail ---------- */
.brand-row .logo { max-height: 28px; max-width: 10rem; object-fit: contain; }
/* The logo slot (06-UI-SPEC Spacing, Exceptions): 28px tall and 10rem wide at most, wherever the brand shows. */
.is-branded .brand img.logo { width: auto; height: auto; max-height: 28px; max-width: 10rem; object-fit: contain; }
.brand-row .brand-name { display: block; min-width: 0; max-width: 100%; overflow: hidden; font-size: var(--text-lg); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; color: var(--color-ink-strong); }
.is-branded .brand { min-width: 0; }
/* The light rail (R4): the rail's on-dark roles remapped to the light ones, scoped to the rail so toasts and tooltips keep
   theirs. Every pair passes on paper-2 (ink-2 9.9:1, muted 5.9:1, the link >= 4.5:1 by its guard). */
.is-branded .workspace-nav {
  --color-deep: var(--color-paper-2);
  --color-deep-2: var(--color-paper);
  --color-deep-ink: var(--color-ink);
  --color-on-dark: var(--color-ink);
  --color-on-dark-soft: var(--color-ink-2);
  --color-on-dark-muted: var(--color-muted);
  --color-on-dark-rule: var(--color-rule);
  --color-on-dark-wash: var(--color-surface-sunk);
  --color-brand-on-dark: var(--color-link);
  border-right: 1px solid var(--color-rule);
}
.is-branded .rail button[aria-current="page"] { box-shadow: 0 0 0 1px var(--color-rule); }
/* A light brand's wash is near white, so the chosen tab also gets a 2px bar in --color-brand (≥ 4.5:1 on paper and
   wash by its guard): along its start edge in the column, under it in the phone strip. */
.is-branded .settings-tabs button[aria-selected="true"] { box-shadow: inset 2px 0 0 var(--color-brand), 0 0 0 1px var(--color-rule), var(--shadow-xs); }
@media (max-width: 760px) { .is-branded .settings-tabs button[aria-selected="true"] { box-shadow: inset 0 -2px 0 var(--color-brand), 0 0 0 1px var(--color-rule); } }
/* The brand color is never heading text (06-UI-SPEC Color): the hero's accent words keep the heading's ink. */
.is-branded #overview .today-head em { color: inherit; }
/* A link never depends on hue alone: the brand color can be close to ink. */
.is-branded #main a:not(.button):not(.button-link) { text-decoration: underline; text-underline-offset: 2px; }
/* ---------- an agency's sign-in, invite and OAuth return (06-15, 06-UI-SPEC §7, §8): one column, no marketing side ---------- */
.auth-page.is-branded { grid-template-columns: minmax(0, 1fr); }
/* One stack in the middle of the screen: the brand, --space-xl, then the card body (§7); not the two-panel rows. */
.auth-page.is-branded .auth-card { grid-template-rows: auto auto auto; align-content: center; }
.auth-page.is-branded .auth-card .brand { padding-top: 0; margin-bottom: var(--space-xl); }
.auth-page.is-branded #auth > h1[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
.auth-page.is-branded #auth p { margin: 0; overflow-wrap: anywhere; }
.auth-page.is-branded #auth .auth-title { overflow-wrap: anywhere; }
.auth-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md); }
.auth-page .auth-card.oauth-return { padding-block: var(--space-2xl); }
/* Error pages (§9): the brand, h1, line and control as one centered stack, --space-2xl above and below. */
.auth-page .auth-card.error-page { grid-template-rows: none; grid-auto-rows: auto; align-content: center; justify-items: start; gap: var(--space-md); padding-block: var(--space-2xl); }
.auth-page.is-branded .auth-card.error-page .brand { margin-bottom: var(--space-md); }
.auth-card.error-page > :is(h1, p, form) { margin: 0; }
.oauth-return p[role="status"] { display: flex; align-items: center; gap: var(--space-xs); color: var(--color-ink-2); }
/* Without JavaScript the return page's server form finishes sign-in (06-14). */
.auth-page.is-branded > noscript form { display: grid; justify-items: center; padding: var(--space-lg); }
/* ---------- Agency page: the Domains tab (06-11, 06-UI-SPEC §3a, §3b) ---------- */
.domain-card > :is(p, h4, form, div) { margin: 0; }
.domain-card { display: grid; gap: var(--space-sm); }
.domain-links { display: grid; gap: var(--space-2xs); justify-items: start; }
.domain-links p { margin: 0; }
.domain-open { display: inline-flex; align-items: center; gap: var(--space-2xs); color: var(--color-link); font-size: var(--text-md); }
.domain-open .icon { width: 1rem; height: 1rem; }
.domain-change { justify-self: start; }
.domain-form { display: grid; gap: var(--space-xs); max-width: 32rem; min-width: 0; }
.domain-form label { margin: 0; font-size: var(--text-md); font-weight: 500; color: var(--color-ink); }
.domain-form .input-unit input { font-variant-numeric: normal; }
.domain-form .actions { justify-content: flex-start; gap: var(--space-xs); margin: 0; }
.domain-form .problem { margin: 0; }
.domain-add-row { display: flex; flex-wrap: wrap; gap: var(--space-xs); min-width: 0; }
.domain-add-row input { flex: 1; min-width: 12rem; }
.domain-status { display: grid; gap: var(--space-2xs); justify-items: start; }
.domain-status p { margin: 0; font-size: var(--text-md); color: var(--color-ink-2); }
.domain-status p.muted { font-size: var(--text-sm); color: var(--color-muted); }
.domain-status .domain-name { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); color: var(--color-ink); }
.domain-host { font-weight: 500; overflow-wrap: anywhere; }
.domain-checked { margin: 0; font-size: var(--text-sm); color: var(--color-muted); }
.domain-checked:empty { display: none; }
.domain-card h4 { margin: var(--space-xs) 0 0; font-size: var(--text-md); font-weight: 500; color: var(--color-ink); }
.domain-actions { justify-content: flex-start; gap: var(--space-xs); margin: 0; }
/* The DNS records: a real table; Name and Value wrap anywhere and sit in their own cells, so no button covers them. */
.table-wrap.dns-wrap { position: relative; }
.dns-table th, .dns-table td { padding: var(--space-xs) var(--space-sm) var(--space-xs) 0; vertical-align: top; }
.dns-table thead th { padding-inline: 0 var(--space-sm); }
.dns-table tbody th { min-width: 0; width: 4.5rem; font-weight: 500; }
.dns-table tbody tr { height: auto; }
.dns-table tbody tr:hover { background: none; }
.dns-mono { display: block; font: 400 var(--text-sm)/1.5 var(--font-mono); color: var(--color-ink); overflow-wrap: anywhere; }
.dns-extra { display: block; }
.dns-status { white-space: nowrap; }
.dns-status.is-missing { color: var(--color-muted); }
/* Each copy button sits right after the name or value it copies (--space-xs), never over it. */
.dns-cell { display: flex; align-items: flex-start; gap: var(--space-xs); min-width: 0; }
.dns-cell .dns-mono { flex: 1 1 auto; min-width: 0; padding-top: var(--space-2xs); }
.dns-copy-button { flex: none; width: 2rem; }
.dns-copy-button .icon { width: 1rem; height: 1rem; }
/* At ≤40rem each record is a stacked block: Type, then Name, Value, Priority and Status, each under a small label. */
@media (max-width: 40rem) {
  .dns-table, .dns-table tbody, .dns-table tbody tr, .dns-table tbody th, .dns-table tbody td { display: block; width: auto; }
  .dns-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .dns-table tbody tr { display: grid; gap: var(--space-xs); padding: var(--space-sm) 0; border-bottom: 1px solid var(--color-rule); }
  .dns-table tbody tr:last-child { border-bottom: 0; }
  .dns-table tbody th, .dns-table tbody td { padding: 0; border: 0; }
  .dns-table td[data-label]::before { content: attr(data-label) / ""; display: block; font-size: var(--text-sm); font-weight: 500; color: var(--color-muted); }
}
.dns-priority { white-space: nowrap; }
/* The Sender email and Tag Manager tabs (06-23, UI-SPEC §4, §5): the Domains card look, a field per row. */
.sender-field { display: grid; gap: var(--space-2xs); min-width: 0; }
.sender-field p, .gtm-form p { margin: 0; }
.sender-dmarc { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); overflow-wrap: anywhere; }
.sender-dmarc span { min-width: 0; }
.gtm-id { font-family: var(--font-mono); max-width: 16rem; }
/* The branded help center (06-21, UI-SPEC §13): server-rendered, outside the app shell, a 45rem column, articles at 70ch. */
.help-page { display: flex; flex-direction: column; background: var(--color-paper); }
.help-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--color-rule); }
.help-head .brand { display: inline-flex; align-items: center; min-width: 0; color: var(--color-ink-strong); text-decoration: none; }
.help-head .logo { display: block; max-height: 28px; max-width: 10rem; object-fit: contain; }
.help-head .brand-name { display: block; min-width: 0; overflow: hidden; font-size: var(--text-lg); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.help-head > a:last-child { flex: none; font-size: var(--text-md); color: var(--color-ink); text-decoration: underline; text-underline-offset: 3px; }
.help-main { flex: 1; width: min(45rem, 100%); margin-inline: auto; padding: var(--space-2xl) var(--space-lg) var(--space-3xl); min-width: 0; }
.help-page .help-title { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); font-size: var(--text-display-s); line-height: 1.1; letter-spacing: var(--tracking-display); color: var(--color-ink-strong); overflow-wrap: anywhere; }
.help-lead { margin: var(--space-xs) 0 0; font-size: var(--text-md); color: var(--color-muted); }
.help-search { display: flex; gap: var(--space-xs); margin-top: var(--space-xl); }
.help-search input { flex: 1; min-width: 0; }
.help-search button { flex: none; }
.help-results { margin: var(--space-xl) 0 0; font-size: var(--text-md); font-weight: 500; color: var(--color-ink); }
.help-results:focus { outline: none; }
.help-results + .muted { margin: var(--space-2xs) 0 0; font-size: var(--text-md); }
.help-category { margin-top: var(--space-2xl); }
.help-category h2 { margin: 0; font-size: var(--text-lg); font-weight: 500; line-height: 1.2; color: var(--color-ink-strong); }
.help-category > .muted { margin: var(--space-2xs) 0 0; font-size: var(--text-sm); color: var(--color-muted); }
.help-list { display: grid; gap: var(--space-sm); margin: var(--space-md) 0 0; padding: 0; list-style: none; }
.help-list li { display: grid; gap: var(--space-3xs); min-width: 0; }
.help-list a { font-size: var(--text-md); color: var(--color-ink); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.help-list .muted { font-size: var(--text-sm); color: var(--color-muted); }
.help-crumbs { margin-bottom: var(--space-md); font-size: var(--text-sm); color: var(--color-muted); }
.help-crumbs a { color: var(--color-muted); text-decoration: underline; text-underline-offset: 3px; }
.help-article { max-width: 70ch; margin-top: var(--space-xl); font-size: var(--text-lg); font-weight: 400; line-height: 1.6; color: var(--color-ink); overflow-wrap: anywhere; }
.help-article > :first-child { margin-top: 0; }
.help-article p, .help-article ul, .help-article ol, .help-article table, .help-article pre { margin: var(--space-md) 0 0; }
.help-article ul, .help-article ol { padding-left: var(--space-lg); }
.help-article h2, .help-article h3 { margin: var(--space-xl) 0 0; font-size: var(--text-lg); font-weight: 500; line-height: 1.2; color: var(--color-ink-strong); }
.help-article a { color: var(--color-ink); text-decoration: underline; text-underline-offset: 3px; }
.help-article code { font-family: var(--font-mono); font-size: var(--text-sm); }
.help-article pre { overflow-x: auto; padding: var(--space-sm); border: 1px solid var(--color-rule); border-radius: var(--radius-sm); background: var(--color-surface-sunk); }
.help-article table { display: block; overflow-x: auto; border-collapse: collapse; font-size: var(--text-md); }
.help-article th, .help-article td { padding: var(--space-xs) var(--space-sm) var(--space-xs) 0; border-bottom: 1px solid var(--color-rule); text-align: left; vertical-align: top; }
/* Cells wrap between words only; a table wider than the column scrolls inside itself (display: block; overflow-x: auto). */
.help-article th, .help-article td { overflow-wrap: normal; word-break: normal; }
.help-article td:first-child, .help-article th:first-child { white-space: nowrap; }
/* Markdown bold is 500 here, like every other emphasis (no 600 anywhere). */
.help-article strong, .help-article b { font-weight: 500; }
.help-back { margin: var(--space-2xl) 0 0; font-size: var(--text-md); }
.help-back a { color: var(--color-ink); text-decoration: underline; text-underline-offset: 3px; }
.help-foot { display: flex; flex-wrap: wrap; gap: var(--space-md); padding: var(--space-lg); border-top: 1px solid var(--color-rule); font-size: var(--text-sm); color: var(--color-muted); }
.help-foot a { color: var(--color-muted); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 40rem) { .help-search { flex-wrap: wrap; } .help-search button { width: 100%; } }
