/* ============================================================
   Mailman console — chrome & screen layout.
   Everything visual-system lives in tokens.css; this file is the
   structural chrome from the approved prototype: 54px anthracite
   top bar, 196px rail, the 6-column approvals grid, 1080px
   breakpoint with 44px targets, empty/loading states.
   ============================================================ */

/* ---------- Fonts (self-hosted; graceful system fallback) ---------- */
@font-face { font-family: "MetaPro"; src: url("fonts/MetaPro-Medium.otf") format("opentype");
  font-weight: 400 500; font-style: normal; font-display: swap; }
@font-face { font-family: "MetaPro"; src: url("fonts/MetaPro-Bold.otf") format("opentype");
  font-weight: 600 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Sekate"; src: url("fonts/Sekate.otf") format("opentype");
  font-weight: 400 800; font-style: normal; font-display: swap; }

/* ---------- Top bar ---------- */
.topbar { background: var(--anthracite); color: var(--white);
  display: flex; align-items: center; gap: 16px; padding: 0 18px;
  min-height: 54px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand-mark { height: 20px; width: auto; display: block; }
.wordmark { font-family: var(--font-rounded); text-transform: uppercase;
  font-size: 19px; letter-spacing: .03em; line-height: 1; }
.topbar .daemon { font-size: 13px; color: rgba(255,255,255,.85);
  display: inline-flex; align-items: center; gap: 7px; }
.topbar .who { font-size: 12.5px; color: rgba(255,255,255,.7); }
.spacer { flex: 1; }
.inline-form { display: inline; }
.linklike { background: none; border: none; text-decoration: underline;
  cursor: pointer; font: inherit; color: var(--anthracite); padding: 0; }
.linklike--onbar { color: rgba(255,255,255,.7); font-size: 12.5px; }

.dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; }
.dot--live { background: var(--pistachio-dark); }
.dot--stale { background: #EFAF6A; }
.dot--paused, .dot--starting { background: var(--pigeon-base); }

/* ---------- Layout ---------- */
.layout { display: flex; align-items: stretch; min-height: calc(100vh - 54px); }
.rail { width: 196px; flex: none; background: var(--bg-tint);
  border-right: 1px solid var(--hairline); padding: 14px 0; }
.rail-item { display: flex; align-items: center; justify-content: space-between;
  padding: 9px 18px; color: var(--anthracite); font-size: 14px;
  text-decoration: none; }
.rail-item:hover { background: rgba(24,62,91,.06); }
.rail-item--active { background: var(--anthracite); color: var(--white);
  font-weight: 700; }
.rail-badge { background: var(--hairline); color: var(--fg-soft);
  border-radius: 999px; padding: 1px 8px; font-size: 11.5px; font-weight: 700; }
.rail-item--active .rail-badge { background: rgba(255,255,255,.25);
  color: var(--white); }
/* Grouped nav: collapsible <details> disclosures (Advanced, Admin). The
   native <summary> is keyboard-accessible (focus + Enter/Space toggles). */
.rail-group { margin-top: 8px; }
.rail-group__summary { display: flex; align-items: center; gap: 7px;
  padding: 8px 18px; cursor: pointer; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--fg-soft);
  list-style: none; user-select: none; }
.rail-group__summary::-webkit-details-marker { display: none; }
.rail-group__summary::before { content: "\25B8"; font-size: 10px;
  transition: transform .15s ease; }
.rail-group[open] > .rail-group__summary::before { transform: rotate(90deg); }
.rail-group__summary:focus-visible { outline: 2px solid var(--anthracite);
  outline-offset: -2px; }
.rail-group__summary:hover { color: var(--anthracite); }
.content { flex: 1; min-width: 0; padding: 26px 32px 48px; }

.screen-title { font-family: var(--font-rounded); text-transform: uppercase;
  font-size: 24px; letter-spacing: .03em; color: var(--anthracite);
  margin: 0; line-height: 1.15; }
.subtitle { margin: 5px 0 0; font-size: 13.5px; color: var(--fg-soft); }
.eyebrow { font: 700 var(--t-micro) var(--font-sans); text-transform: uppercase;
  letter-spacing: .12em; color: var(--fg-soft); margin: 26px 0 12px; }
.footnote { margin-top: 22px; font-size: 13px; color: var(--fg-soft); }
.danger-text { color: var(--danger); }
.rule-note { font-size: 12px; color: var(--fg-soft); }
/* Everyone still outstanding on a collapsed broadcast. Wraps rather than
   truncating: a hidden name is a person the operator cannot see is missing. */
.broadcast-list { font-size: 12px; color: var(--fg-soft); margin-top: 3px;
  overflow-wrap: anywhere; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.filterpill { font: 600 13px var(--font-sans); background: var(--white);
  color: var(--fg-soft); border: 1.5px solid var(--hairline);
  border-radius: 999px; padding: 6px 14px; text-decoration: none;
  display: inline-flex; align-items: center; }
.filterpill:hover { border-color: var(--pigeon-base); }
.filterpill--active { font-weight: 700; background: var(--anthracite);
  color: var(--white); border-color: var(--anthracite); }

/* ---------- Approvals grid ---------- */
.rowgrid { display: grid;
  /* Last column fits Approve+Decline side by side (~194px) plus the
     never-touch link on the line below. At 178px the inline pair overflowed. */
  grid-template-columns: 92px minmax(0,1.15fr) minmax(0,1fr) 52px 62px 200px;
  gap: 16px; align-items: start; }
.rowhead { padding: 12px 12px 8px; margin-top: 14px; }
.row { padding: 16px 12px; }
.right { text-align: right; }
.action-label { font-size: 13px; font-weight: 700; color: var(--anthracite);
  padding-top: 8px; }
.action-label--danger { color: var(--danger); }
.cell-message { min-width: 0; }
.cell-chips { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap;
  align-items: center; }
.cell-why { font-size: 13px; color: var(--fg-soft); line-height: 1.45;
  padding-top: 6px; }
.cell-conf { font-size: 14.5px; font-weight: 700; padding-top: 7px; }
.cell-age { font-size: 12px; color: var(--fg-caption); padding-top: 9px; }
.cell-actions { display: flex; flex-direction: column; gap: 6px;
  align-items: flex-end; padding-top: 4px; }
.cell-actions form { display: inline; }
/* Approve + Decline are peer decisions and read as one control: keep them on
   ONE line. The never-touch link is a different weight of choice and sits on
   its own line underneath. */
.action-buttons { display: flex; gap: 6px; }
/* Follow-up overflow: one tap for a week, a disclosure for the rarer
   durations. Plain <details> — no display:contents (Safari). */
.snooze-more summary { list-style: none; display: inline-block; cursor: pointer; }
.snooze-more summary::-webkit-details-marker { display: none; }
.snooze-more__opts { display: flex; gap: 6px; margin-top: 6px;
  justify-content: flex-end; }
.mail-quote--legacy { font-size: 13px; color: var(--fg-soft); font-style: italic; }
.preview { margin-top: 7px; }
.preview summary { font: 600 12.5px var(--font-sans); color: var(--anthracite);
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.preview-body { white-space: pre-wrap; font-size: 13px; margin-top: 4px; }
.filter-empty { margin-top: 24px; font-size: 13.5px; color: var(--fg-soft); }

/* ---------- Empty states ---------- */
.empty-state { text-align: center; padding: 72px 20px 60px; }
.empty-mark { height: 44px; width: auto; opacity: .85; }
.empty-title { font-family: var(--font-rounded); text-transform: uppercase;
  font-size: 18px; letter-spacing: .04em; color: var(--anthracite);
  margin-top: 14px; }
.empty-sub { font-size: 13.5px; color: var(--fg-soft); margin-top: 6px;
  max-width: 380px; margin-left: auto; margin-right: auto; }

/* ---------- Dashboard ---------- */
.heartbeats { display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.hb-card { border: 1px solid var(--hairline); border-radius: var(--r-md);
  padding: 16px 18px; background: var(--white); }
.hb-card--stale { border-color: #E8D9A8; background: #FFFDF2; }
.hb-card--paused, .hb-card--starting { background: var(--bg-tint); }
.hb-head { display: flex; align-items: center; gap: 8px; }
.hb-name { font-size: 16px; font-weight: 700; }
.hb-state { font-size: 12px; font-weight: 700; color: var(--fg-soft); }
.hb-card--live .hb-state { color: var(--ok); }
.hb-card--stale .hb-state { color: var(--warn); }
.hb-line { font-size: 13px; color: var(--fg-soft); margin-top: 8px; }
.hb-line--warn { color: var(--warn); font-weight: 600; }
.hb-figures { display: flex; gap: 16px; margin-top: 12px; font-size: 13px;
  color: var(--fg-soft); }
.hb-figures strong { color: var(--anthracite); font-size: 17px; }

.figures-row { display: flex; border-top: 2px solid var(--line-strong); }
.figure { flex: 1; padding: 14px 16px; border-right: 1px solid var(--hairline);
  text-decoration: none; color: inherit; display: block; }
.figure:last-child { border-right: none; }
.figure-n { display: block; font-size: 26px; font-weight: 700; }
.figure-l { display: block; font-size: 13px; color: var(--fg-soft); }
.figure--danger .figure-n, .figure--danger .figure-l { color: var(--danger); }

/* ---------- Autonomy ---------- */
.ladder-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.ladder-action { font-size: 14px; font-weight: 700; width: 100px; }
.ladder { display: inline-flex; border: 1.5px solid var(--anthracite);
  border-radius: 999px; overflow: hidden; }
.ladder-seg { font: 600 12.5px var(--font-sans); padding: 7px 14px;
  color: var(--fg-soft); text-decoration: none;
  border-left: 1.5px solid var(--hairline); }
.ladder-seg:first-child { border-left: none; }
.ladder-seg:hover { background: var(--bg-tint); }
.ladder-seg--active { font-weight: 700; background: var(--anthracite);
  color: var(--white); }
.ladder-counts { display: flex; gap: 14px; font-size: 11.5px;
  color: var(--fg-caption); flex-wrap: wrap; }

/* ---------- Flip dialog (page) ---------- */
.flip-card { border: 2px solid var(--anthracite); border-radius: var(--r-md);
  overflow: hidden; max-width: 720px; box-shadow: var(--shadow-lg);
  margin-top: 22px; }
.flip-head { background: var(--anthracite); color: var(--white);
  padding: 14px 20px; font-size: 15px; font-weight: 700; }
.flip-body { padding: 20px; font-size: 14px; line-height: 1.55; }
.flip-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 16px; }
.flip-option { border: 1.5px solid var(--hairline); border-radius: var(--r-md);
  padding: 14px 16px; cursor: pointer; display: block; }
.flip-option:hover { border-color: var(--pigeon-base); }
/* Design review fix 13: the selected state exists. */
.flip-option:has(input:checked) { border: 2px solid var(--anthracite);
  padding: 13px 15px; }
.flip-option input { accent-color: var(--anthracite); margin-right: 8px; }
.flip-option-title { font-size: 14px; font-weight: 700; }
.flip-option-sub { display: block; font-size: 12.5px; color: var(--fg-soft);
  margin-top: 7px; line-height: 1.5; }
.flip-actions { display: flex; gap: 10px; justify-content: flex-end;
  margin-top: 18px; }
/* Confirm disabled until a card is chosen (CSS-only enforcement layer;
   the server enforces it for real). */
.flip-form:has(input[name="backlog"]):not(:has(input[name="backlog"]:checked))
  button[type="submit"] { opacity: .45; pointer-events: none; }

/* ---------- Login ---------- */
.login-body { display: flex; align-items: center; justify-content: center;
  min-height: 100vh; background: var(--bg-tint); }
.login-card { background: var(--white); border: 1px solid var(--hairline);
  border-radius: var(--r-md); box-shadow: var(--shadow-md);
  padding: 40px 36px; max-width: 380px; text-align: center; }
.login-mark { height: 44px; }
.login-title { font-family: var(--font-rounded); text-transform: uppercase;
  font-size: 26px; letter-spacing: .03em; margin: 12px 0 0; }
.login-sub { font-size: 13.5px; color: var(--fg-soft); margin: 6px 0 20px; }
.login-btn { display: block; text-decoration: none; text-align: center;
  line-height: 44px; padding: 0 16px; }
.login-note { font-size: 12px; color: var(--fg-caption); margin-top: 16px;
  line-height: 1.5; }
.login-card .banner--error { margin-bottom: 16px; text-align: left; }

/* ---------- Toast auto-dismiss (CSS-only) ---------- */
@keyframes toast-rise { from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toast-fade { to { opacity: 0; visibility: hidden; } }
.toast--auto { animation: toast-rise .22s ease-out,
  toast-fade .4s ease-in 4.2s forwards; }

/* ---------- Loading skeletons (design review fix 11 — no shimmer) ---------- */
.skeleton-row { display: grid;
  grid-template-columns: 92px minmax(0,1.15fr) minmax(0,1fr) 52px 62px 178px;
  gap: 16px; padding: 16px 12px; border-bottom: 1px solid var(--hairline); }
.skeleton-row .skeleton { min-height: 16px; }

/* ---------- Narrow (<1080px, design review fix 7) ---------- */
@media (max-width: 1079px) {
  .layout { flex-direction: column; }
  /* Surface pills WRAP into rows (no horizontal-scroll, no stretch); the
     Advanced/Admin <details> each take a full-width line BELOW and expand
     vertically like a normal disclosure. No display:contents (Safari renders
     it inconsistently — it left group items as a tall vertical stack that
     ballooned the rail). align-items:flex-start so nothing stretches. */
  .rail { display: flex; flex-wrap: wrap; align-items: flex-start; width: auto;
    padding: 10px 12px; gap: 6px; border-right: none;
    border-bottom: 1px solid var(--hairline); }
  .rail-item { flex: 0 0 auto; border-radius: 999px; border: 1px solid var(--hairline);
    background: var(--white); min-height: 40px; white-space: nowrap; }
  .rail-item--active { background: var(--white); color: var(--anthracite);
    border-color: var(--anthracite); font-weight: 700; }
  .rail-item--active .rail-badge { background: var(--hairline); color: var(--fg-soft); }
  .rail-group { flex: 0 0 100%; width: 100%; margin: 4px 0 0; }
  .rail-group__items { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 0; }
  .content { padding: 20px 16px 40px; }
  .rowhead { display: none; }
  .rowgrid { grid-template-columns: 1fr; gap: 8px; padding: 14px 2px; }
  .cell-actions { flex-direction: row; align-items: stretch; flex-wrap: wrap; }
  .cell-actions form { flex: 1; display: block; }
  .cell-actions .btn { width: 100%; min-height: 44px; }
  /* Approve/Decline take a full-width line and split it evenly; the
     never-touch link takes the next line rather than becoming a third column. */
  .cell-actions .action-buttons { flex-basis: 100%; }
  .cell-actions form.row-allowlist { flex-basis: 100%; }
  .row-allowlist .undo-link { min-height: 44px; }
  /* Same treatment for the follow-up pair: the overflow disclosure and the
     per-thread dismiss each take their own full-width line, 44px tall. */
  .cell-actions details.snooze-more { flex-basis: 100%; }
  .cell-actions form.row-dismiss { flex-basis: 100%; }
  .snooze-more summary, .row-dismiss .undo-link { min-height: 44px; }
  .snooze-more__opts form { flex: 1; }
  .filterpill { min-height: 44px; }
  .figures-row { flex-wrap: wrap; }
  .figure { min-width: 45%; border-bottom: 1px solid var(--hairline); }
  .flip-options { grid-template-columns: 1fr; }
}

/* ---------- Dead-letter (W3) ---------- */
.dl-list { margin-top: 14px; border-top: 2px solid var(--line-strong); }
.dl-row { border-bottom: 1px solid var(--hairline); padding: 14px 4px; }
.dl-main { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.dl-status { font: 700 11px var(--font-sans); border-radius: 999px;
  padding: 3px 10px; letter-spacing: .06em; }
.dl-status--failed { background: var(--danger-bg); color: var(--danger); }
.dl-status--unknown { background: var(--warn-bg); color: var(--warn); }
.dl-action { font-size: 13.5px; font-weight: 700; }
.dl-context { flex: 1; min-width: 200px; }
.dl-error { font-size: 12.5px; color: var(--danger); }
.dl-trail { font-size: 12px; color: var(--fg-caption); margin-top: 6px; }
.dl-actions { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.dl-actions form { display: inline; }
.dl-confirm summary { list-style: none; display: inline-block; }
.dl-confirm-body { margin-top: 10px; max-width: 420px; }
.dl-warn { font-size: 13px; color: var(--danger); }

/* ---------- Stats (W3) ---------- */
.chart-scroll { overflow-x: auto; margin-top: 6px; }
.chart-svg { max-width: 100%; height: auto; }
.chart-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--fg-soft); }
.legend-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.stats-table { border-collapse: collapse; min-width: 480px; margin-top: 8px; }
.stats-table th, .stats-table td { padding: 6px 12px; border-bottom: 1px solid var(--hairline); }

/* ---------- Policy editor (W4) ---------- */
.policy-form { margin-top: 16px; }
.policy-editor { width: 100%; box-sizing: border-box; font: 13px ui-monospace,
  Menlo, monospace; border: 1.5px solid var(--quarantine-border);
  border-radius: var(--r-sm); padding: 12px; line-height: 1.5; color: var(--anthracite); }
.policy-savebar { display: flex; gap: 12px; align-items: flex-end; margin-top: 12px;
  flex-wrap: wrap; }
.policy-comment-label { font-size: 13px; font-weight: 700; display: block; }
.policy-comment { display: block; margin-top: 4px; min-width: 320px;
  font: 14px var(--font-sans); border: 1.5px solid var(--quarantine-border);
  border-radius: 8px; padding: 9px 12px; }
.versiongrid { display: grid; grid-template-columns: 200px minmax(0,1fr) 90px 220px;
  gap: 14px; align-items: baseline; }
.version-actions { display: flex; gap: 10px; align-items: center; }
.version-actions form { display: inline; }
.diff-wrap table.diff { font: 12px ui-monospace, Menlo, monospace;
  border-collapse: collapse; }
.diff-wrap td.diff_header { color: var(--fg-caption); padding: 0 6px; }
.diff-wrap .diff_next { background: var(--bg-tint); }
.diff-wrap .diff_add { background: #DCE4DE; }
.diff-wrap .diff_sub { background: #F0DCDC; }
.diff-wrap .diff_chg { background: #FFF0B3; }

/* Mailboxes header stat cards (accounts redesign P2). Token-driven, mirroring
   the Claude Design mockup. The 3-up grid reflows to a stack on narrow widths
   rather than squeezing (design review P6). */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 20px 0 8px; }
.stat-card {
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 16px 18px;
  background: var(--bg-tint); }
.stat-num {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  color: var(--anthracite);
  font-variant-numeric: tabular-nums; }
.stat-label {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--fg-caption); }
@media (max-width: 640px) {
  .stat-row { grid-template-columns: 1fr; } }

/* Mailboxes list: the mockup's status table (accounts redesign P3). Structural
   colours use tokens; the status palette uses literal hex to match the comp
   exactly and to avoid depending on tokens that may not exist. */
.mbx-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; }
.mbx-scroll { overflow-x: auto; margin-top: 20px; }
.mbx-table { min-width: 760px; }
.mbx-thead, .mbx-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 96px 132px 88px 76px 132px;
  gap: 14px; align-items: center; }
.mbx-thead {
  padding: 0 0 8px; border-bottom: 2px solid var(--anthracite);
  font: 700 10px var(--font-sans); text-transform: uppercase;
  letter-spacing: .1em; color: var(--fg-caption); }
.mbx-rowwrap { border-bottom: 1px solid var(--hairline); }
.mbx-row { padding: 14px 0; }
.mbx-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mbx-id__text { min-width: 0; }
.mbx-dot { width: 9px; height: 9px; border-radius: 999px; flex: none;
  background: #C7D2DB; }
.mbx-dot--active   { background: #5F796A; }
.mbx-dot--error    { background: #8C4A4A; }
.mbx-dot--stale    { background: #96602A; }
.mbx-dot--starting { background: #4C5C6E; }
.mbx-dot--disabled { background: #C7D2DB; }
.mbx-name {
  display: block; font-family: var(--font-rounded); text-transform: uppercase;
  font-size: 15px; letter-spacing: .02em; color: var(--anthracite);
  text-decoration: none; }
.mbx-sub {
  display: block; font-size: 12px; color: var(--fg-soft);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbx-check { font-size: 13px; color: var(--anthracite); }
.mbx-r { text-align: right; }
.mbx-num { font-size: 13.5px; font-weight: 700; color: var(--anthracite);
  font-variant-numeric: tabular-nums; }
.pill {
  display: inline-block; font: 700 11px var(--font-sans);
  border-radius: 999px; padding: 3px 10px;
  background: #E6EAED; color: #5C6871; }
.pill--active   { background: #DCE4DE; color: #4E655A; }
.pill--error    { background: #EDD8D8; color: #8C4A4A; }
.pill--stale    { background: #F4E2CB; color: #96602A; }
.pill--starting { background: #CED4DD; color: #4C5C6E; }
.pill--disabled { background: #E6EAED; color: #5C6871; }
.mbx-actions {
  display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.mbx-switch {
  width: 38px; height: 22px; border-radius: 999px; border: 0; cursor: pointer;
  position: relative; padding: 0; flex: none; background: #C7D2DB;
  transition: background .18s; }
.mbx-switch--on { background: var(--anthracite); }
.mbx-knob {
  position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(24,62,91,.3);
  transition: left .18s; }
.mbx-switch--on .mbx-knob { left: 19px; }
.mbx-view {
  font: 700 13px var(--font-sans); color: var(--anthracite);
  text-decoration: underline; text-underline-offset: 2px; }
.mbx-x {
  font: 600 17px var(--font-sans); line-height: 1; color: #8F4444;
  text-decoration: none; }
.mbx-empty {
  margin-top: 18px; border: 1.5px dashed var(--hairline); border-radius: 12px;
  padding: 44px 20px; text-align: center; }
.mbx-empty__text { font-size: 15px; color: var(--fg-soft); margin-bottom: 14px; }
.mbx-confirm {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: rgba(255,222,141,.16); border-radius: 10px;
  padding: 10px 14px; margin: 0 0 12px; }
.mbx-confirm__msg { font-weight: 700; font-size: 13px; color: #8F4444; }
.mbx-confirm__actions {
  display: flex; align-items: center; gap: 10px; margin-left: auto; }
.btn--danger { background: #8F4444; color: #fff; border-color: #8F4444; }

/* Mailbox detail: header + connection cards (accounts redesign P3). */
.mbx-back {
  display: inline-block; font: 600 13px var(--font-sans);
  color: var(--fg-soft); text-decoration: none; margin-bottom: 8px; }
.mbx-detail-head { display: flex; align-items: center; gap: 11px; }
.mbx-detail-head .screen-title { margin: 0; }
.mbx-detail-head__spacer { flex: 1; }
.conn-head {
  margin-top: 22px; padding-top: 12px; border-top: 2px solid var(--anthracite);
  font: 700 10px var(--font-sans); text-transform: uppercase;
  letter-spacing: .1em; color: var(--anthracite); }
.conn-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 24px;
  margin-top: 2px; }
.conn-card { padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.conn-card__label {
  font: 700 10px var(--font-sans); text-transform: uppercase;
  letter-spacing: .1em; color: var(--fg-soft); }
.conn-card__val { margin-top: 4px; font-size: 14px; color: var(--anthracite); }
@media (max-width: 640px) { .conn-grid { grid-template-columns: 1fr; } }
