/* ice lab outbound: one accent, quiet borders, an 8px rhythm and a 15px base; light and dark follow the system. */
:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --sunk: #f1f3f6;
  --ink: #16181d;
  --ink-2: #4b5260;
  --muted: #6b7280;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-ink: #ffffff;
  --accent-soft: #eef0ff;
  --focus: #6366f1;
  --mark: #fff3bf;
  --slot: #eef0ff;
  --slot-line: #a5b4fc;
  --good: #067647;
  --good-soft: #e7f6ee;
  --warn: #b54708;
  --warn-soft: #fef4e6;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.05), 0 1px 3px rgb(16 24 40 / 0.06);
  --radius: 10px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --panel: #161a20;
    --sunk: #1c2028;
    --ink: #eceef2;
    --ink-2: #c3c8d1;
    --muted: #9aa3b2;
    --line: #262b34;
    --line-strong: #353b47;
    --accent: #818cf8;
    --accent-hover: #a5b4fc;
    --accent-ink: #0f1115;
    --accent-soft: #1f2340;
    --focus: #a5b4fc;
    --mark: #4a3f12;
    --slot: #232848;
    --slot-line: #6366f1;
    --good: #4ade80;
    --good-soft: #10291b;
    --warn: #fbbf24;
    --warn-soft: #2c2210;
    --bad: #f87171;
    --bad-soft: #2f1414;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.busy { cursor: progress; }
h1, h2, h3 { margin: 0; line-height: 1.3; }
h1 { font-size: 1.25rem; font-weight: 650; }
h2 { font-size: 0.8rem; font-weight: 650; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
h3 { font-size: 0.85rem; font-weight: 600; color: var(--ink-2); margin: var(--s5) 0 var(--s2); }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 2px; }
code, kbd { font: 0.82em ui-monospace, SFMono-Regular, Menlo, monospace; }
kbd { border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; color: var(--ink-2); background: var(--panel); }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
.good { color: var(--good); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }
[hidden] { display: none !important; }

/* controls */
button, input, select { font: inherit; color: inherit; }
button, a.button {
  display: inline-flex; align-items: center; gap: var(--s2); justify-content: center;
  min-height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--panel); cursor: pointer; font-weight: 550; white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
a.button { color: var(--ink); text-decoration: none; }
button:hover:not(:disabled), a.button:hover { background: var(--sunk); text-decoration: none; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.primary, a.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.primary:hover:not(:disabled), a.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.primary kbd { background: transparent; color: inherit; border-color: currentColor; opacity: 0.7; }
button.quiet, a.button.quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
button.danger-quiet { color: var(--bad); }
button.small { min-height: 30px; padding: 0 10px; font-size: 0.85rem; }
button.wide, a.button.wide { width: 100%; box-sizing: border-box; }
button.loading { position: relative; }
input[type=text], input[type=password], input[type=search], select {
  min-height: 36px; padding: 0 var(--s3); border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel); min-width: 0;
}
input::placeholder { color: var(--muted); }
:focus-visible, .slot:focus { outline: 2px solid var(--focus); outline-offset: 2px; }
label.check { display: inline-flex; align-items: center; gap: var(--s2); cursor: pointer; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }

/* wordmark */
.wordmark { display: inline-flex; align-items: center; gap: var(--s2); font-size: 1rem; letter-spacing: -0.01em; white-space: nowrap; }
.wordmark b { color: var(--accent); font-weight: 700; }
.wordmark .mark { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.wordmark.large { font-size: 1.4rem; }
.wordmark.large .mark { width: 30px; height: 30px; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: var(--s4);
  background: radial-gradient(1200px 600px at 50% -10%, var(--accent-soft), transparent 60%), var(--bg); }
.login-card { width: min(380px, 100%); display: grid; gap: var(--s3); padding: var(--s6); background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.login-card .tagline { color: var(--muted); margin: calc(-1 * var(--s1)) 0 var(--s3); }
.login-card label[for] { font-weight: 550; font-size: 0.9rem; }
.login-card .button { min-height: 44px; text-decoration: none; }
.login-card .primary { margin-top: var(--s2); }
.login-card .google-mark { width: 18px; height: 18px; }
.login-card .fine-print { text-align: center; margin: 0; }
.error { color: var(--bad); min-height: 1.5em; font-size: 0.9rem; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s4); padding: 0 var(--s4);
  min-height: 56px; background: var(--panel); border-bottom: 1px solid var(--line); }
#app-view:not([hidden]) { display: flex; flex-direction: column; height: 100vh; }
.view-tabs { display: flex; gap: var(--s1); }
.view-tab { border: none; background: transparent; color: var(--muted); border-radius: 6px; min-height: 32px; }
.view-tab[aria-selected="true"] { color: var(--ink); background: var(--sunk); }
/* the ten mailboxes get their own row under the bar, so every count and health reads at a glance */
.mailbox-strip { order: 10; flex: 1 0 100%; display: flex; gap: var(--s1); list-style: none; margin: 0 calc(-1 * var(--s4)); padding: 6px var(--s4);
  overflow-x: auto; min-width: 0; scrollbar-width: none; border-top: 1px solid var(--line); background: var(--bg); }
.mailbox-strip::before { content: "Mailboxes today"; font-size: 0.72rem; font-weight: 600; color: var(--muted); align-self: center; margin-right: var(--s2); white-space: nowrap; }
.view-tabs + .mailbox-strip + .global-status { margin-left: auto; }
.mailbox { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 999px; font-size: 0.75rem;
  border: 1px solid var(--line); background: var(--sunk); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mailbox .mb-name { color: var(--ink-2); max-width: 9em; overflow: hidden; text-overflow: ellipsis; }
.mailbox .mb-count { font-weight: 600; }
.mailbox .mb-health { color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; display: inline-block; }
.mailbox.good .dot, .mailbox-now.good .dot { background: var(--good); }
.mailbox.warn .dot, .mailbox-now.warn .dot { background: var(--warn); }
.mailbox.bad .dot { background: var(--bad); }
.global-status { font-size: 0.85rem; color: var(--ink-2); white-space: nowrap; display: inline-flex; align-items: center; gap: var(--s2); }
.global-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.global-status.on::before { background: var(--good); }
.global-status.off::before { background: var(--warn); }

/* prospects layout */
.prospects { display: grid; grid-template-columns: minmax(340px, 400px) minmax(0, 1fr); flex: 1; min-height: 0; }
.list-pane { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--panel); }
.list-head { display: grid; gap: var(--s3); padding: var(--s4) var(--s4) var(--s3); border-bottom: 1px solid var(--line); }
.status-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; padding: 3px; background: var(--sunk); border-radius: 9px; }
.status-tab { flex-direction: column; gap: 0; min-height: 48px; padding: 4px 6px; border: none; background: transparent; color: var(--muted);
  font-size: 0.75rem; font-weight: 550; line-height: 1.2; white-space: normal; text-align: center; }
.status-tab .count { font-size: 1rem; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.status-tab[aria-selected="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.status-tab[aria-selected="true"] .count { color: var(--accent); }
.filters { display: grid; grid-template-columns: 1fr auto; gap: var(--s2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 28px; padding: 0 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 500; color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.list-tools { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: var(--ink-2); }
.people { list-style: none; margin: 0; padding: var(--s2); overflow-y: auto; flex: 1; min-height: 0; }
.row { display: grid; grid-template-columns: auto 1fr; gap: var(--s3); padding: var(--s3); border-radius: 8px; cursor: pointer;
  border: 1px solid transparent; }
.row + .row { margin-top: 2px; }
.row:hover { background: var(--sunk); }
.row.active { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.row.checked:not(.active) { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
.row-check { margin-top: 3px; }
.row-main { min-width: 0; display: grid; gap: 2px; }
.row-top { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); }
.row .who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { font-size: 0.85rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-signal { display: flex; gap: var(--s2); align-items: baseline; font-size: 0.82rem; color: var(--muted); min-width: 0; }
.row-signal .snippet { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-empty { padding: var(--s5); text-align: center; }
.bulk-bar { position: sticky; bottom: 0; display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; padding: var(--s3) var(--s4);
  background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -4px 12px rgb(16 24 40 / 0.06); font-weight: 600; }
.bulk-bar.working { opacity: 0.6; pointer-events: none; }
.spacer { flex: 1; }
.keys { padding: var(--s2) var(--s4) var(--s3); border-top: 1px solid var(--line); }

/* pills and chips */
.pill { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; white-space: nowrap;
  background: var(--sunk); color: var(--ink-2); border: 1px solid var(--line); }
.pill.big { font-size: 0.8rem; padding: 3px 10px; }
.pill.waiting { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.pill.approved, .pill.sent { background: var(--good-soft); color: var(--good); border-color: transparent; }
.pill.edited_after_approval, .pill.regenerating, .pill.pending { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.skipped, .pill.retired { background: var(--sunk); color: var(--muted); }
.seg { font-size: 0.72rem; font-weight: 600; padding: 0 6px; border-radius: 4px; background: var(--sunk); color: var(--ink-2); white-space: nowrap; flex: none; }
.badge { font-size: 0.72rem; font-weight: 600; padding: 0 6px; border-radius: 4px; background: var(--sunk); color: var(--muted); margin-left: var(--s1); }
.badge.good { background: var(--good-soft); color: var(--good); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }

/* detail */
.detail-pane { overflow-y: auto; min-height: 0; container: detail / inline-size; }
.detail-body { padding: var(--s5); display: grid; gap: var(--s4); max-width: 1400px; }
.detail-head { display: flex; align-items: center; gap: var(--s4); }
.detail-head .who-block { flex: 1; min-width: 0; }
.detail-head .sub { color: var(--ink-2); }
.detail-head .back { display: none; }
.detail-grid { display: grid; gap: var(--s4); align-items: start; }
@container detail (min-width: 820px) {
  .detail-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
}
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); box-shadow: var(--shadow); min-width: 0; }
.card > h2 { margin-bottom: var(--s3); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); margin-bottom: var(--s3); flex-wrap: wrap; }
.headline { font-weight: 600; margin-bottom: var(--s2); }
.quote { margin: 0 0 var(--s2); padding: var(--s3) var(--s4); border-left: 3px solid var(--accent); background: var(--sunk); border-radius: 0 8px 8px 0; font-size: 1rem; }
.quote mark { background: var(--mark); color: inherit; padding: 1px 2px; border-radius: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.source { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); font-size: 0.85rem; color: var(--muted); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px var(--s4); margin: 0; font-size: 0.92rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.summary { margin-top: var(--s3); color: var(--ink-2); font-size: 0.92rem; }
.colleagues { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.colleagues li { display: flex; align-items: center; gap: var(--s1); flex-wrap: wrap; }
.colleagues .pill { margin-left: auto; }

.note { padding: var(--s2) var(--s3); border-radius: 8px; background: var(--accent-soft); margin-bottom: var(--s3); font-size: 0.9rem; }
.note.warn { background: var(--warn-soft); }
.holds { list-style: none; margin: 0 0 var(--s3); padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.holds li { font-size: 0.8rem; padding: 2px 10px; border-radius: 999px; background: var(--bad-soft); color: var(--bad); }
.subject { font-weight: 600; margin-bottom: var(--s2); }
.subject .muted { font-weight: 500; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; margin-right: var(--s1); }
.body { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; padding: var(--s4);
  font-size: 0.97rem; line-height: 1.6; }
.body.readonly { background: transparent; font-size: 0.92rem; color: var(--ink-2); }
.slot { background: var(--slot); box-shadow: inset 0 -2px 0 var(--slot-line); border-radius: 3px; padding: 1px 2px; cursor: text; }
.slot[contenteditable]:hover { background: color-mix(in srgb, var(--slot) 70%, var(--slot-line)); }
.slot-signal_line { --slot-line: var(--accent); }
.meter { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); font-size: 0.82rem; margin: var(--s2) 0 0; }
.lint { color: var(--muted); }
.lint b { color: var(--ink-2); font-weight: 600; }
.lint.good b::before { content: "✓ "; color: var(--good); }
.lint.bad, .lint.bad b { color: var(--bad); }
.hint { margin-top: var(--s1); }
.previous { margin-top: var(--s3); padding: var(--s2) var(--s3); border: 1px dashed var(--line-strong); border-radius: 8px; font-size: 0.9rem; }
.previous summary { cursor: pointer; color: var(--ink-2); font-weight: 550; }
.previous p { margin: var(--s2) 0; }
.follow-ups { margin-top: var(--s2); }
.follow-up { border: 1px solid var(--line); border-radius: 8px; margin-top: var(--s2); }
.follow-up summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3); padding: var(--s2) var(--s3); cursor: pointer; font-size: 0.9rem; }
.follow-up .body { border: none; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.step { font-weight: 650; }
.subject-line { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 28ch; }
.wait { color: var(--muted); font-size: 0.82rem; margin-left: auto; }
.dock { position: sticky; bottom: calc(-1 * var(--s5)); margin: var(--s4) calc(-1 * var(--s5)) calc(-1 * var(--s5)); padding: var(--s4) var(--s5) var(--s5);
  background: var(--panel); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 -6px 16px rgb(16 24 40 / 0.06); }
.send-footer { display: grid; gap: var(--s2); }
.from { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--s3); }
.from label { font-weight: 600; font-size: 0.9rem; }
.from select { width: 100%; }
.mailbox-now { display: flex; align-items: center; gap: var(--s2); font-size: 0.85rem; color: var(--ink-2); }
.plan { font-size: 0.9rem; font-weight: 550; }
.actions-wrap { margin-top: var(--s3); display: grid; gap: var(--s3); }
.rewrite { display: grid; grid-template-columns: 1fr auto; gap: var(--s2); align-items: center; }
.rewrite .muted { grid-column: 1 / -1; }
.actions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; }
.actions #skip-reason { flex: 0 1 180px; }
.send-why { margin-top: calc(-1 * var(--s1)); }

.empty { display: grid; place-items: center; align-content: center; text-align: center; gap: var(--s2); padding: var(--s6); }
.people:empty { flex: 0; padding: 0; }
.empty.big { min-height: 60vh; }
.empty h2 { font-size: 1.15rem; text-transform: none; letter-spacing: 0; color: var(--ink); }
.empty p { max-width: 42ch; }
.empty .empty-mark { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; background: var(--accent-soft); color: var(--accent); }
.empty button { margin-top: var(--s3); }
.bar { height: 12px; border-radius: 6px; background: var(--sunk); margin: var(--s2) 0; animation: pulse 1.2s ease-in-out infinite; }
.w60 { width: 60%; } .w80 { width: 80%; } .w90 { width: 90%; }
.row.skeleton { display: block; cursor: default; }
@keyframes pulse { 50% { opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) { .bar { animation: none; } * { transition: none !important; } }

/* templates */
.templates-view { flex: 1; min-height: 0; overflow-y: auto; }
.templates { max-width: 980px; margin: 0 auto; padding: var(--s5) var(--s4) var(--s6); display: grid; gap: var(--s5); }
.tpl-intro { display: grid; gap: var(--s2); }
.tpl-group { display: grid; gap: var(--s3); }
.tpl-group-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.tpl-head { display: grid; grid-template-columns: 1fr auto auto; gap: var(--s3); align-items: center; }
.tpl-head h3 { margin: 0; font-size: 1rem; color: var(--ink); }
.tpl-actions { display: flex; gap: var(--s2); }
.fingerprint { margin-top: var(--s2); }
.tpl-example { margin-top: var(--s3); }
.tpl-example summary { cursor: pointer; color: var(--ink-2); font-weight: 550; font-size: 0.9rem; }
.tpl-step { margin-top: var(--s3); }
.tpl-step-head { display: flex; gap: var(--s3); align-items: baseline; margin-bottom: var(--s1); }

/* dialog and toasts */
.dialog { border: 1px solid var(--line); border-radius: 14px; padding: var(--s5); background: var(--panel); color: var(--ink); width: min(560px, calc(100vw - 32px)); box-shadow: 0 20px 50px rgb(0 0 0 / 0.25); }
.dialog::backdrop { background: rgb(15 17 21 / 0.45); }
.dialog h2 { font-size: 1rem; text-transform: none; letter-spacing: 0; color: var(--ink); margin-bottom: var(--s3); }
.dialog code { overflow-wrap: anywhere; }
.dialog #confirm-body { display: grid; gap: var(--s2); max-height: 40vh; overflow-y: auto; font-size: 0.9rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s5); }
/* send now: each warning or block on its own tinted line */
.send-warnings { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s1); }
.send-warnings li { padding: var(--s2) var(--s3); border-radius: 8px; border-left: 3px solid currentColor; font-weight: 500; }
.send-warnings.warn li { background: var(--warn-soft); color: var(--warn); }
.send-warnings.bad li { background: var(--bad-soft); color: var(--bad); }
.override-note { margin-top: var(--s2); padding: var(--s2) var(--s3); border-radius: 8px; background: var(--warn-soft); color: var(--warn); font-size: 0.88rem; }
.toasts { position: fixed; bottom: var(--s4); left: 50%; transform: translateX(-50%); display: grid; gap: var(--s2); z-index: 20; width: min(520px, calc(100vw - 32px)); }
.toast { padding: var(--s3) var(--s4); border-radius: 10px; background: var(--ink); color: var(--bg); box-shadow: 0 8px 24px rgb(0 0 0 / 0.2); font-size: 0.92rem; transition: opacity 0.3s; }
.toast.good { background: var(--good); color: #fff; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.leaving { opacity: 0; }

/* medium: the mailbox strip shortens */
@media (max-width: 1600px) {
  .mailbox-strip { flex-wrap: wrap; }
  .mailbox { padding: 2px 7px; }
}

/* phone and small tablet: one column, the detail opens as its own view with a back button */
@media (max-width: 899px) {
  #app-view:not([hidden]) { height: auto; min-height: 100vh; }
  .topbar { padding: var(--s2) var(--s4) 0; gap: var(--s2) var(--s3); }
  .global-status { order: 4; flex: 1 0 100%; white-space: normal; padding-bottom: var(--s2); }
  .mailbox-strip { flex-wrap: nowrap; }
  #logout { margin-left: auto; }
  .prospects { grid-template-columns: 1fr; }
  .dock { position: static; margin: var(--s4) 0 0; padding: var(--s4) 0 0; box-shadow: none; border-radius: 0; }
  .list-pane { border-right: none; }
  .people { overflow: visible; }
  .detail-pane { display: none; }
  body.show-detail .list-pane { display: none; }
  body.show-detail .detail-pane { display: block; }
  .detail-body { padding: var(--s4); }
  .detail-head { flex-wrap: wrap; }
  .detail-head .back { display: inline-flex; width: 100%; justify-content: flex-start; padding: 0; }
  .keys { display: none; }
  .tpl-head { grid-template-columns: 1fr auto; }
  .tpl-actions { grid-column: 1 / -1; }
}

/* collapsible sections: a quiet summary row with a turning chevron. */
.fold { border-top: 1px solid var(--line); padding: var(--s2) 0; }
.card > .fold:first-of-type, .card-head + .fold { border-top: none; }
.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--s2); padding: var(--s2) 0;
  font-weight: 600; font-size: 0.95rem; user-select: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(-45deg); transition: transform 0.15s ease; opacity: 0.6; }
.fold[open] > summary::before { transform: rotate(45deg); }
.fold > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.fold-body { padding-top: var(--s2); }

/* who is signed in, beside sign out; the phone layout has no room for it */
.signed-in-as { white-space: nowrap; }
@media (max-width: 899px) { .signed-in-as { display: none; } }
