/* ============================================================
   Bullet · Support — page-scoped styles
   ------------------------------------------------------------
   Loaded AFTER dashboard.css and only by /dashboard/support.
   Everything here is new layout for the three-pane helpdesk
   (list | ticket | customer). Tokens, chips, btn-mini, kv-list,
   drawer__h4, signals and the topbar all come from dashboard.css
   so the two tools stay visually identical.
   ============================================================ */

.page--support { padding-bottom: 24px; }

/* ─── Learning strip ──────────────────────────────────────────
   What's being asked, grouped — the route to auto-answering. */
.learn {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 12px 16px;
}
.learn__head {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}
.learn__head::-webkit-details-marker { display: none; }
.learn__chev {
  width: 14px; height: 14px;
  color: var(--faint);
  flex: 0 0 auto;
  transition: transform 0.12s ease;
}
.learn[open] .learn__chev { transform: rotate(90deg); }
.learn__title { font-size: 13px; font-weight: 700; color: var(--ink); }
.learn__sub { font-size: 12px; color: var(--muted); }
.learn__body { padding-top: 12px; }
.learn__themes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.learn-theme {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  padding: 5px 12px 5px 6px;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: border-color 0.08s ease, background 0.08s ease;
}
.learn-theme:hover { border-color: var(--hairline-strong); }
.learn-theme.is-active { background: var(--ink); border-color: var(--ink); color: var(--ink-contrast); }
.learn-theme.is-active .learn-theme__n { background: var(--ink-contrast); color: var(--ink); }
.learn-theme.is-active .learn-theme__tag { color: var(--tooltip-soft); border-color: var(--tooltip-line); }
.learn-theme__n {
  min-width: 22px;
  height: 22px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--hairline);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}
.learn-theme__label { font-weight: 600; }
.learn-theme__tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
  border-left: 1px solid var(--hairline);
  padding-left: 8px;
}
.learn-theme__tag--ready { color: var(--good); }
.learn-theme--gap { border-style: dashed; }
.learn-group {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-basis: 100%;
  margin-top: 4px;
}
.learn-group:first-child { margin-top: 0; }
.learn-group__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.learn-group__note { font-size: 11.5px; color: var(--faint); }
.learn__note {
  margin: 12px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--faint);
}
.learn__note strong { color: var(--muted); }
.learn__note a { color: var(--warn); font-weight: 600; }

.sup {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

/* ─── Ticket list ─────────────────────────────────────────── */
.sup-list {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 104px);
  display: flex;
  flex-direction: column;
}
.sup-list__head {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--hairline);
}
.sup-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  padding: 7px 10px;
}
.sup-search svg { width: 15px; height: 15px; color: var(--faint); flex: 0 0 auto; }
.sup-search input {
  appearance: none;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  width: 100%;
  outline: none;
}
.sup-list__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.sup-list__count {
  margin: 10px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
}

.sup-list__rows {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
}
.sup-row {
  padding: 12px 14px;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 0.08s ease;
}
.sup-row:hover { background: var(--bg); }
.sup-row.is-active { background: var(--accent-bg-1); }
.sup-row.is-active .sup-row__subject { color: var(--ink); }
.sup-row--closed { opacity: 0.62; }
.sup-row__top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
/* Same disengagement light as the onboarding board. */
.sup-row__top .pri-dot { flex: 0 0 auto; align-self: center; }
.sup-row__who {
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sup-row__time {
  margin-left: auto;
  font-size: 11px;
  color: var(--faint);
  white-space: nowrap;
}
.sup-row__subject {
  font-size: 13px;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sup-row__biz { font-size: 12px; color: var(--muted); }
.sup-row__pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }

.sup-list__empty {
  margin: 0;
  padding: 24px 14px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* Small state pills — flag / snoozed / closed / channel. */
.sup-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline);
  background: var(--bg);
  color: var(--muted);
}
.sup-pill--flag   { background: var(--warn-bg-2); border-color: var(--warn-line-1); color: var(--warn); }
.sup-pill--snooze { background: var(--info-bg-1); border-color: var(--info-line-1); color: var(--info-ink-2); }
.sup-pill--closed { background: var(--good-bg-2); border-color: var(--good-line-2); color: var(--good); }

/* ─── Ticket reader ───────────────────────────────────────── */
.sup-ticket {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  min-height: 420px;
  min-width: 0;
}
/* `hidden` vs author display rules: a `display: flex` here would beat the
   attribute's UA display:none, so guard every element we toggle with it. */
.sup-ticket__none[hidden],
.sup-ticket__body[hidden],
.sup-profile[hidden],
.sup-list__empty[hidden],
.sup-ticket__source[hidden],
.sup-warn[hidden] { display: none; }

.sup-ticket__none {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  color: var(--faint);
  font-size: 13px;
}
.sup-ticket__head {
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--hairline);
}
.sup-ticket__subject {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}
.sup-ticket__meta { margin: 5px 0 0; font-size: 12px; color: var(--muted); }
.sup-ticket__source {
  margin: 10px 0 0;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--muted);
}
.sup-ticket__source strong { color: var(--ink-soft); }

.sup-ticket__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--hairline);
}
.sup-ticket__actions .btn-mini.is-on {
  background: var(--warn-bg-2);
  border-color: var(--warn-line-3);
  color: var(--warn);
}
.sup-state {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
}
.sup-snooze { position: relative; }
.sup-snooze > summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.sup-snooze > summary::-webkit-details-marker { display: none; }
.sup-snooze > summary svg { width: 12px; height: 12px; }
.sup-snooze .menu-dd__panel { min-width: 170px; }
.sup-snooze .menu-dd__panel button {
  appearance: none;
  background: none;
  border: 0;
  text-align: left;
  width: 100%;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--ink-soft);
  border-radius: var(--r-sm);
}
.sup-snooze .menu-dd__panel button:hover { background: var(--bg); }

/* Thread */
.sup-thread {
  list-style: none;
  margin: 0;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sup-msg {
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 12px 14px;
  background: var(--surface);
  max-width: 86%;
}
.sup-msg--agent {
  align-self: flex-end;
  background: var(--bg);
}
.sup-msg__who {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 6px;
  display: flex;
  gap: 8px;
}
.sup-msg__body { font-size: 13.5px; color: var(--ink-soft); }
.sup-msg__body p { margin: 0 0 8px; }
.sup-msg__body p:last-child { margin-bottom: 0; }
.sup-msg__body ul { margin: 0 0 8px; padding-left: 20px; }
.sup-msg__body a { color: var(--ink); }

.sup-attachments {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.sup-attachment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-sm);
  padding: 4px 8px;
}
.sup-attachment svg { width: 12px; height: 12px; color: var(--faint); }
.sup-attachment__size { color: var(--faint); }
.sup-attachment__x {
  appearance: none;
  border: 0;
  background: none;
  padding: 0 0 0 2px;
  font-size: 13px;
  line-height: 1;
  color: var(--faint);
}
.sup-attachment__x:hover { color: var(--bad); }

.sup-thread__empty {
  font-size: 13px;
  color: var(--faint);
  text-align: center;
  padding: 18px 0;
}

/* Suggested reply — shown, never sent. */
.sup-suggest {
  border: 1px solid var(--good-line-1);
  border-left: 3px solid var(--good);
  background: var(--good-bg-1);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 12px;
}
.sup-suggest[hidden] { display: none; }
.sup-suggest__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.sup-suggest__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--good);
}
.sup-suggest__meta { font-size: 11.5px; color: var(--muted); }
.sup-suggest__body { font-size: 13px; color: var(--ink-soft); }
.sup-suggest__body p { margin: 0 0 6px; }
.sup-suggest__body p:last-child { margin-bottom: 0; }
.sup-suggest__actions { display: flex; gap: 6px; margin-top: 10px; }

/* Reply composer */
.sup-reply {
  border-top: 1px solid var(--hairline);
  padding: 14px 20px 18px;
}
.sup-reply__bar {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}
.sup-reply__tool {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  min-width: 30px;
  height: 28px;
  font-size: 12px;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.sup-reply__tool:hover { background: var(--bg); border-color: var(--hairline-strong); }
.sup-reply__tool svg { width: 14px; height: 14px; }
.sup-reply__tool--wide { padding: 0 10px; font-weight: 600; }
.sup-reply__sep {
  width: 1px;
  height: 18px;
  background: var(--hairline);
  margin: 0 4px;
}
.sup-reply__box {
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-md);
  padding: 10px 12px;
  min-height: 96px;
  font-size: 13.5px;
  color: var(--ink-soft);
  outline: none;
}
.sup-reply__box:focus { border-color: var(--ink); }
.sup-reply__box:empty::before {
  content: attr(data-placeholder);
  color: var(--faint);
}
.sup-reply__box p { margin: 0 0 8px; }
.sup-reply__box ul { margin: 0 0 8px; padding-left: 20px; }
.sup-reply__send {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.sup-reply__note { font-size: 11px; color: var(--faint); }

/* ─── Customer profile ────────────────────────────────────── */
.sup-profile {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  padding: 18px;
  position: sticky;
  top: 84px;
}
.sup-profile__name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}
.sup-profile__biz { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.sup-profile .drawer__h4 { display: block; margin: 18px 0 8px; }
/* Narrower label column than the drawer's — the values here (emails,
   company names) need the room more than the labels do. */
.sup-profile .kv-list { grid-template-columns: 88px 1fr; gap: 8px 12px; }

.sup-status {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sup-status__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.sup-status__value { font-size: 14px; font-weight: 700; color: var(--ink); }
.sup-status__detail { font-size: 12px; color: var(--muted); }
.sup-status--live { background: var(--good-bg-2); border-color: var(--good-line-2); }
.sup-status--live .sup-status__value { color: var(--good); }

.sup-warn {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--warn-line-1);
  border-radius: var(--r-md);
  background: var(--warn-bg-1);
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.sup-warn strong { color: var(--warn); }
.sup-warn__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  font-size: 12px;
  color: var(--ink);
  text-decoration: none;
  margin-top: 2px;
}
.sup-warn__link svg { width: 13px; height: 13px; }
.sup-warn__link[hidden] { display: none; }
.sup-warn__link:hover { text-decoration: underline; }

/* Profile tabs — Billing · Revenue · Details · Tickets (invoices pattern).
   Problem tabs carry a dot; clean ones are just labels. */
.sup-ptabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 18px 0 12px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}
.sup-ptabs .chip { display: inline-flex; align-items: center; gap: 6px; }
.sup-ptab__dot { width: 7px; height: 7px; border-radius: 50%; }
.sup-ptab__dot[hidden] { display: none; }
.sup-ptab__dot--bad { background: var(--bad); }
.sup-ptab__dot--warn { background: var(--warn); }
.sup-ptab__count {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  padding: 0 6px;
}
.sup-ptab__count[hidden] { display: none; }
[data-p-pane][hidden] { display: none; }
[data-p-pane] > :first-child { margin-top: 0; }

/* Billing (mock, state-aware) */
.sup-billing__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}
.sup-bill-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline);
  background: var(--bg);
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
}
.sup-bill-chip[data-state="active"]   { background: var(--good-bg-2); border-color: var(--good-line-2); color: var(--good); }
.sup-bill-chip[data-state="trialing"] { background: var(--warn-bg-1); border-color: var(--warn-line-1); color: var(--warn); }
.sup-bill-chip[data-state="past_due"] { background: var(--bad-bg-1); border-color: var(--bad-line-1); color: var(--bad); }
.sup-billing__reason { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.sup-billing__reason[hidden] { display: none; }
.sup-billing .kv-list { margin-top: 10px; }
.sup-billing__warn {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--bad-line-1);
  border-radius: var(--r-md);
  background: var(--bad-bg-1);
  font-size: 12.5px;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sup-billing__warn[hidden] { display: none; }
.sup-billing__warn strong { color: var(--bad); display: inline-flex; align-items: center; gap: 6px; }
.sup-bill-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--bad);
  background: var(--bad-line-2);
  border-radius: 4px;
  padding: 1px 6px;
}
.sup-bill-code[hidden] { display: none; }
.sup-billing__stripe {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sup-billing__stripe[hidden] { display: none; }
.sup-billing__stripe svg { width: 13px; height: 13px; }
.sup-billing__mock {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  font-style: italic;
  color: var(--faint);
}

/* Revenue (ROS) — quiet when fine, loud when not */
.sup-ros__issues { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.sup-ros__issues[hidden] { display: none; }
.sup-ros__issue {
  padding: 10px 12px;
  border-radius: var(--r-md);
  font-size: 12.5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--ink-soft);
}
.sup-ros__issue--warn { background: var(--warn-bg-1); border: 1px solid var(--warn-line-1); }
.sup-ros__issue--warn strong { color: var(--warn); }
.sup-ros__issue--bad { background: var(--bad-bg-1); border: 1px solid var(--bad-line-1); }
.sup-ros__issue--bad strong { color: var(--bad); }
.sup-ros .kv-list { margin-top: 10px; }
.sup-ros__filings { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sup-ros__filing {
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--bg);
  padding: 9px 12px;
}
.sup-ros__filing.is-done { opacity: 0.75; }   /* settled periods recede */
.sup-ros__filing-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.sup-ros__filing-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ros-pips { display: inline-flex; gap: 4px; }
.ros-pip {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--hairline-strong);
  background: transparent;
}
.ros-pip--on { background: var(--good); border-color: var(--good); }
.sup-ros__links { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.sup-ros__links [hidden] { display: none; }
.sup-ros__open { display: inline-flex; align-items: center; gap: 6px; }
.sup-ros__open[hidden] { display: none; }
.sup-ros__open svg { width: 13px; height: 13px; }

/* ROS-agent note in the conversation thread — a logged event, not a person */
.sup-msg--ros { background: var(--warn-bg-1); border: 1px dashed var(--warn-line-1); }
.sup-msg--ros .sup-msg__who span:first-child { color: var(--warn); }

/* Get into their account */
.sup-connect {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sup-connect__btn {
  justify-content: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
}
.sup-connect__btn svg { width: 14px; height: 14px; }
.sup-connect__btn.is-disabled {
  background: var(--bg);
  color: var(--faint);
  border-color: var(--hairline);
  cursor: not-allowed;
}
.sup-connect__note { font-size: 11px; line-height: 1.45; color: var(--faint); }

/* Click-to-copy email (profile + ticket meta). Long addresses wrap
   instead of pushing the column sideways. */
.sup-copy {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
  word-break: break-word;
  border-bottom: 1px dotted var(--hairline-strong);
}
.sup-copy:hover { color: var(--ink); border-bottom-color: var(--ink); }
.sup-copy.is-copied { color: var(--good); border-bottom-color: transparent; font-weight: 600; }
.kv-list__copy { min-width: 0; overflow-wrap: anywhere; }
.sup-ticket__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.sup-ticket__meta .pri-dot { flex: 0 0 auto; }
.sup-dot-sep { color: var(--faint); }

.sup-profile__others {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sup-other {
  font-size: 12.5px;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  padding: 7px 9px;
  cursor: pointer;
}
.sup-other:hover { border-color: var(--hairline-strong); }
.sup-other__meta { display: block; font-size: 11px; color: var(--faint); margin-top: 2px; }
.sup-profile__others--empty {
  font-size: 12.5px;
  color: var(--faint);
}
.sup-profile__honesty {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--faint);
}
.sup-profile__honesty strong { color: var(--muted); }

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 1180px) {
  .sup { grid-template-columns: 300px minmax(0, 1fr); }
  .sup-profile { grid-column: 1 / -1; position: static; }
}
@media (max-width: 820px) {
  .sup { grid-template-columns: 1fr; }
  .sup-list { position: static; max-height: none; }
  .sup-list__rows { max-height: 46vh; }
  .sup-msg { max-width: 100%; }
  .sup-ticket__actions { gap: 6px; }
  .sup-state { margin-left: 0; width: 100%; }
}

/* Revenue standing — agent links, mandates, registrations.
   Read-and-chase: quiet rows, loud problems. */
.sup-rev { display: flex; flex-direction: column; gap: 14px; margin-bottom: 16px; }
.sup-rev[hidden] { display: none; }
.sup-rev__block { display: flex; flex-direction: column; gap: 6px; }
.sup-rev__h {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--faint);
}
.sup-rev__links, .sup-rev__sigs, .sup-rev__regs { list-style: none; margin: 0; padding: 0; }
.sup-rev__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 12.5px;
}
.sup-rev__row:last-child { border-bottom: 0; }
.sup-rev__name { font-weight: 600; color: var(--ink); display: flex; flex-direction: column; }
.sup-rev__cap { font-size: 10.5px; font-weight: 400; color: var(--faint); }
.sup-rev__state {
  justify-self: end;
  font-size: 10.5px; font-weight: 700;
  padding: 2px 8px; border-radius: var(--r-pill);
  border: 1px solid var(--hairline); background: var(--bg); color: var(--muted);
  text-transform: capitalize;
}
.sup-rev__state--ok   { color: var(--good); background: var(--good-bg-2); border-color: var(--good-line-2); }
.sup-rev__state--warn { color: var(--warn); background: var(--warn-bg-1); border-color: var(--warn-line-1); }
.sup-rev__state--bad  { color: var(--bad);  background: var(--bad-bg-1); border-color: var(--bad-line-1); }
.sup-rev__when { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }
.sup-rev__when a { color: var(--ink); font-weight: 600; }
.sup-rev__fix { font-size: 11.5px; font-weight: 700; color: var(--ink); text-decoration: none; margin-top: 2px; }
.sup-rev__fix:hover { text-decoration: underline; }
.sup-rev__a1 {
  margin: 2px 0 0; padding: 9px 11px;
  border: 1px solid var(--hairline); border-radius: var(--r-md);
  background: var(--bg); font-size: 12px; color: var(--ink-soft);
}
.sup-rev__a1[hidden] { display: none; }
.sup-rev__a1 em { color: var(--faint); font-size: 11px; display: block; margin-top: 2px; }
.sup-rev__a1.is-warn { background: var(--warn-bg-1); border-color: var(--warn-line-1); }
.sup-rev__a1.is-warn strong { color: var(--warn); }
.sup-rev__a1.is-bad { background: var(--bad-bg-1); border-color: var(--bad-line-1); }
.sup-rev__a1.is-bad strong { color: var(--bad); }

/* Permission level — sits with link status. FILE is the only one that
   can submit; anything less is a broken filing path (error 9001). */
.sup-rev__states { justify-self: end; display: inline-flex; align-items: center; gap: 5px; }
.sup-rev__perm {
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.05em;
  padding: 2px 6px; border-radius: 3px;
  background: var(--bg); border: 1px solid var(--hairline); color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.sup-rev__perm.is-warn { background: var(--warn-bg-2); border-color: var(--warn-line-1); color: var(--warn); }
.sup-rev__nofile { color: var(--warn); font-weight: 600; }

/* Who fixes it + what to do — no issue is ever a technical dead end. */
.sup-own {
  float: right;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 2px 7px; border-radius: var(--r-pill); margin-left: 8px;
}
.sup-own--us   { background: var(--info-bg-2); color: var(--info-ink); }
.sup-own--them { background: var(--warn-bg-2); color: var(--warn); }
.sup-todo {
  display: block; margin-top: 4px; padding-top: 5px;
  border-top: 1px dashed rgba(0,0,0,0.08);
  color: var(--ink-soft);
}
.sup-todo b { color: var(--ink); }

/* Their Revenue inbox — read-only mirror of the customer's ROS post.
   Plain language leads; the jargon title lives inside the letter. */
.sup-inbox { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.sup-inbox[hidden] { display: none; }
.sup-inbox__ro {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em;
  background: var(--bg); border: 1px solid var(--hairline);
  border-radius: var(--r-pill); padding: 1px 7px; color: var(--muted); margin-left: 6px;
}
.sup-inbox__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sup-inbox__empty { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.sup-inbox__empty[hidden] { display: none; }
.sup-note {
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  background: var(--bg);
  padding: 10px 12px;
  font-size: 12.5px;
}
.sup-note.is-action { background: var(--surface); border-color: var(--hairline-strong); }
.sup-note.is-done { opacity: 0.66; }
.sup-note__top { display: flex; align-items: baseline; gap: 6px; }
.sup-note__new {
  font-size: 9px; font-weight: 800; letter-spacing: 0.05em;
  background: var(--ink); color: var(--ink-contrast); border-radius: 3px; padding: 1px 5px;
}
.sup-note__about { font-weight: 700; color: var(--ink); }
.sup-note__when { margin-left: auto; font-size: 11px; color: var(--faint); white-space: nowrap; }
.sup-note__summary { margin: 4px 0 0; color: var(--ink-soft); }
.sup-note__action { margin: 5px 0 0; color: var(--ink-soft); }
.sup-note__action b { color: var(--ink); }
.sup-note__pay {
  margin: 5px 0 0; font-weight: 700; color: var(--ink);
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-sm); padding: 5px 8px; display: inline-block;
}
.sup-note__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 7px; font-size: 11px; }
.sup-note__due { font-weight: 700; color: var(--muted); }
.sup-note__due.is-soon { color: var(--bad); }
.sup-note__closed { color: var(--good); font-weight: 600; }
.sup-note__fyi { color: var(--faint); }
.sup-note__raw {
  appearance: none; border: 0; background: none; padding: 0;
  margin-left: auto; font-family: inherit; font-size: 11px; font-weight: 700;
  color: var(--ink); text-decoration: underline; cursor: pointer;
}
.sup-note__letter {
  margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed var(--hairline-strong);
  color: var(--muted); font-size: 11.5px;
}
.sup-note__letter[hidden] { display: none; }
.sup-note__title { display: block; font-weight: 700; color: var(--ink-soft); margin-bottom: 3px; }

/* ── The wire: selection ring, bell/mute, note mode ─────────── */
/* Bullet's selection convention: a 1px yellow ring that moves nothing.
   Selecting never reorders the list. */
.sup-row.is-active {
  background: var(--accent-bg-1);
  box-shadow: inset 0 0 0 1px var(--color-hilite-strong, #ffe135);
}
.sup-list__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sup-bell { position: relative; }
.sup-bell__btn {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--muted);
}
.sup-bell__btn::-webkit-details-marker { display: none; }
.sup-bell__btn svg { width: 14px; height: 14px; }
.sup-bell__state { font-weight: 700; }
.sup-bell__state.is-muted { color: var(--warn); }
.sup-bell__panel { right: 0; left: auto; }
.sup-bell__panel button {
  appearance: none; border: 0; background: transparent; width: 100%;
  text-align: left; font-family: inherit; cursor: pointer;
  padding: 8px 10px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--ink);
}
.sup-bell__panel button:hover { background: var(--surface-2, var(--chip-bg)); }

/* Compose mode + internal notes — visibly not a reply. */
.sup-mode { display: flex; gap: 6px; margin-bottom: 8px; }
.sup-reply__box.is-note { background: var(--warn-bg-1); border-color: var(--warn-line-1); }
.sup-note-save { background: var(--warn-bg-2); border-color: var(--warn-line-1); color: var(--warn); font-weight: 700; }
.sup-note-save[hidden], [data-reply-send][hidden], [data-reply-send-close][hidden] { display: none; }
.sup-msg--note {
  background: var(--warn-bg-1);
  border: 1px solid var(--warn-line-1);
  position: relative;
}
.sup-msg--note .sup-msg__who span:first-child { color: var(--warn); }


/* ---- The loop buttons (the form itself is the shared .devloop in dashboard.css) ---- */
.sup-loop { display: inline-flex; gap: 6px; margin-left: auto; }
.chip__n { margin-left: 5px; opacity: .6; font-size: 11px; }

/* Waiting-on tags (9 Sep): the number Mariana manages by. */
.sup-pill--wait-us { border-color: var(--warn-line-1); color: var(--warn); }
.sup-pill--wait-them { color: var(--muted); }
.sup-pill--late { border-color: var(--bad-line-1); color: var(--bad); font-weight: 700; }
/* The loop scoreboard reuses the Ask engine's answer card, flat inside the strip. */
.answer--board { box-shadow: none; border: 0; padding: 4px 0 0; background: transparent; }
.answer--board .answer__close { display: none; }
