@import url("colors_and_type.css");

html, body, #app { height: 100%; margin: 0; }
*, *::before, *::after { box-sizing: border-box; }
body {
  background: var(--bg-subtle);
  color: var(--fg);
  overflow: hidden;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
}
button { font-family: inherit; }

/* ===== Micro scrollbars: ALWAYS 3px everywhere ===== */
* { scrollbar-width: thin; scrollbar-color: rgba(13,19,33,0.20) transparent; }
.dark * { scrollbar-color: rgba(255,255,255,0.20) transparent; }
*::-webkit-scrollbar { width: 3px; height: 3px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: rgba(13,19,33,0.20); border-radius: 999px; }
.dark *::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.20); }

/* ============================================================
   APP SHELL
   ============================================================ */
.app {
  display: grid;
  grid-template-columns: 264px 1fr;
  height: 100vh;
  background: var(--bg-subtle);
  transition: grid-template-columns var(--dur-slow) var(--ease-emphasis);
}
.app.app--collapsed { grid-template-columns: 64px 1fr; }
.main-col {
  display: grid;
  grid-template-rows: 60px auto 1fr;
  min-width: 0;
  overflow: hidden;
}

/* ============================================================
   AVATARS (shared)
   ============================================================ */
.av {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
  font-family: var(--font-display); font-weight: 700;
  color: #fff; line-height: 1; letter-spacing: -0.02em;
  user-select: none;
}
.av--logo { font-weight: 800; letter-spacing: -0.01em; }
.av--photo img { border-radius: inherit; }
.av--pax {
  background: linear-gradient(135deg, var(--paciva-gradient-orange) 0%, var(--paciva-gradient-blue) 100%);
  border: 1px solid var(--border);
  color: var(--paciva-ink);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  border-right: 1px solid var(--border);
  /* Left rail is the warm tan canvas; white content + cards float on top of it,
     giving the page layered dimension instead of an all-white slab. */
  background: var(--bg-subtle);
  display: flex; flex-direction: column;
  min-height: 0; overflow: hidden; position: relative;
}
.dark .sidebar { background: var(--surface); }
.sidebar-brand {
  display: flex; align-items: center;
  padding: 16px 40px 16px 20px;
  position: sticky; top: 0; z-index: 4;
  background: var(--bg-subtle);
  flex-shrink: 0;
}
.dark .sidebar-brand { background: var(--surface); }
.sidebar-brand__lockup { height: 26px; width: auto; display: block; object-fit: contain; }
.sidebar-brand__pax { display: flex; justify-content: center; margin: 0 auto; }
.sidebar-collapse {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--border); color: var(--fg-muted);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; z-index: 5;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.sidebar-collapse:hover { background: var(--paciva-tan-50); color: var(--fg); border-color: var(--border-strong); }
.dark .sidebar-collapse { background: var(--surface); }
.dark .sidebar-collapse:hover { background: var(--surface-raised); }

.sidebar-scroll {
  flex: 1; overflow-y: auto;
  padding: 6px 12px 12px;
  display: flex; flex-direction: column; gap: 1px;
}

.sidebar--collapsed .sidebar-brand { justify-content: center; padding: 16px 0; }
.sidebar--collapsed .sidebar-scroll { padding: 6px 10px; }
.sidebar--collapsed .nav-item { justify-content: center; padding: 9px 0; }
.sidebar--collapsed .nav-item__label,
.sidebar--collapsed .nav-item__badge,
.sidebar--collapsed .nav-item__chev,
.sidebar--collapsed .sidebar-section,
.sidebar--collapsed .acct-tree,
.sidebar--collapsed .saved-card__meta,
.sidebar--collapsed .user-card__chev,
.sidebar--collapsed .user-card__meta { display: none; }
.sidebar--collapsed .saved-card {
  width: 44px; height: 44px; padding: 0; gap: 0;
  justify-content: center; margin: 6px auto;
}
.sidebar--collapsed .user-card {
  width: 44px; height: 44px; padding: 0; gap: 0;
  justify-content: center; margin: 8px auto;
}
.sidebar--collapsed .user-card__avatar { width: 30px; height: 30px; }
/* collapsed: the account menu escapes the narrow rail via fixed positioning */
.sidebar--collapsed .acct-menu {
  position: fixed; left: 70px; bottom: 18px; right: auto; top: auto; width: 212px;
}

.sidebar-section { padding: 14px 8px 5px; }
.sidebar-section .t-eyebrow {
  font-weight: 500; font-size: 11px; letter-spacing: 0.10em;
  color: var(--fg-muted); text-transform: uppercase;
}

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px; border-radius: var(--r-button);
  color: var(--fg); cursor: pointer; user-select: none;
  font-size: 14px; position: relative;
  border: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease-standard), border-color var(--dur-fast) var(--ease-standard);
}
.nav-item:hover { background: var(--paciva-tan-100); }
.dark .nav-item:hover { background: var(--surface-raised); }
/* Selected = a white card lifted off the tan rail (soft hairline, no shadow). */
.nav-item.active { background: var(--surface); border-color: var(--border); font-weight: 500; }
.dark .nav-item.active { background: var(--surface-raised); border-color: var(--border); }
.nav-item__icon { color: var(--fg); flex-shrink: 0; display: inline-flex; }
.nav-item.active .nav-item__icon { color: var(--fg); }
/* Pax in the rail: one 18px box (same as every other icon) with two perfectly
   overlapping layers — monochrome ink by default, true brand color on
   hover/active. currentColor handles light (ink) vs dark (white) automatically. */
.nav-item__pax { position: relative; width: 18px; height: 18px; flex-shrink: 0; display: inline-flex; color: var(--fg); }
.nav-item__pax .pax-mono,
.nav-item__pax .pax-color { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: inline-flex; transition: opacity var(--dur-fast); }
.nav-item__pax .pax-color { opacity: 0; }
.nav-item:hover .nav-item__pax .pax-mono,
.nav-item.active .nav-item__pax .pax-mono { opacity: 0; }
.nav-item:hover .nav-item__pax .pax-color,
.nav-item.active .nav-item__pax .pax-color { opacity: 1; }
.nav-item__label { flex: 1; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item__badge {
  background: var(--paciva-tan-100); color: var(--fg-muted);
  padding: 1px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.nav-item.active .nav-item__badge { background: var(--primary); color: var(--primary-fg); }
.dark .nav-item__badge { background: rgba(255,255,255,0.08); }
.nav-item__badge--accent { background: var(--paciva-orange); color: #fff; }
.nav-item__chev {
  color: var(--fg-subtle); display: inline-flex;
  transition: transform var(--dur-base) var(--ease-standard);
  margin: -4px -2px -4px 0;
}
.nav-item__chev.open { transform: rotate(180deg); }
.nav-item__channel { width: 18px; display: inline-flex; justify-content: center; flex-shrink: 0; }
/* Real channel logos, full fidelity. Desaturated to ink-grayscale by default in
   the rail; snap to true brand color on hover / active. */
.nav-item__channel img { filter: grayscale(1) brightness(0.55); transition: filter var(--dur-fast); }
.dark .nav-item__channel img { filter: grayscale(1) brightness(1.7); }
.nav-item:hover .nav-item__channel img,
.nav-item.active .nav-item__channel img,
.dark .nav-item:hover .nav-item__channel img,
.dark .nav-item.active .nav-item__channel img { filter: none; }
/* LinkedIn rail mark: identical master geometry in both states (mono square via
   currentColor by default, real brand blue on hover/active) — only the color
   treatment changes, never the shape. */
.nav-item__channel--li { position: relative; width: 18px; height: 18px; }
.nav-item__channel--li .li-mono,
.nav-item__channel--li .li-color { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: inline-flex; transition: opacity var(--dur-fast); }
.nav-item__channel--li .li-mono { color: #474c57; }
.dark .nav-item__channel--li .li-mono { color: #7b8190; }
.nav-item__channel--li .li-color { opacity: 0; }
.nav-item:hover .nav-item__channel--li .li-mono,
.nav-item.active .nav-item__channel--li .li-mono { opacity: 0; }
.nav-item:hover .nav-item__channel--li .li-color,
.nav-item.active .nav-item__channel--li .li-color { opacity: 1; }

/* nested account tree */
.acct-tree {
  display: flex; flex-direction: column; gap: 1px;
  margin: 1px 0 2px;
  padding-left: 17px;
  position: relative;
}
.acct-tree::before {
  content: ''; position: absolute; left: 18px; top: 2px; bottom: 14px;
  width: 1px; background: var(--border);
}
.acct-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px 7px 18px; border-radius: var(--r-button);
  border: 1px solid transparent;
  cursor: pointer; font-size: 13px; color: var(--fg-muted);
  position: relative;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.acct-item:hover { background: var(--paciva-tan-100); color: var(--fg); }
.dark .acct-item:hover { background: var(--surface-raised); }
.acct-item.active { background: var(--surface); border-color: var(--border); color: var(--fg); font-weight: 500; }
.dark .acct-item.active { background: var(--surface-raised); border-color: var(--border); color: #fff; }
.acct-item__dot {
  width: 7px; height: 7px; border-radius: 999px; flex-shrink: 0;
  background: var(--paciva-tan-200);
}
.acct-item.active .acct-item__dot { background: var(--paciva-orange); }
.acct-item__label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-item__badge {
  font-size: 11px; color: var(--fg-muted); font-variant-numeric: tabular-nums;
}

.sidebar-divider { height: 1px; background: var(--border); margin: 10px 6px; }

.saved-card {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface); margin: 6px 0;
}
.dark .saved-card { background: var(--surface-raised); }
.saved-card__icon {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: rgba(241,90,41,0.12); color: var(--paciva-orange);
  display: inline-flex; align-items: center; justify-content: center;
}
.saved-card__meta { display: flex; flex-direction: column; min-width: 0; }
.saved-card__big { font-family: var(--font-display); font-weight: 800; font-size: 13px; color: var(--fg); letter-spacing: -0.01em; }
.saved-card__sub { font-size: 11px; color: var(--fg-muted); }

.nav-item--quiet { color: var(--fg-muted); }
.nav-item--quiet .nav-item__icon { color: var(--fg-subtle); }

/* ===== Account bubble + pop-up menu ===== */
.acct { position: relative; margin-top: 8px; }
.user-card {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: var(--r-button);
  border: 1px solid var(--border);
  background: var(--paciva-tan-50);
  cursor: pointer; text-align: left; font: inherit; color: var(--fg);
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.user-card:hover { background: var(--paciva-tan-100); }
.user-card--open { background: var(--paciva-tan-100); border-color: var(--border-strong); }
.dark .user-card { background: var(--surface-raised); }
.dark .user-card:hover, .dark .user-card--open { background: var(--surface-sunken); border-color: var(--border-strong); }
.user-card__chev { margin-left: auto; color: var(--fg-subtle); display: inline-flex; flex-shrink: 0; transition: transform var(--dur-base) var(--ease-standard); }
.user-card--open .user-card__chev { transform: rotate(180deg); }

.acct-menu-scrim { position: fixed; inset: 0; z-index: 50; }
.acct-menu {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 60;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-container); box-shadow: var(--shadow-overlay);
  padding: 6px; transform-origin: bottom center;
  animation: acct-pop var(--dur-base) var(--ease-emphasis);
}
@keyframes acct-pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }
.acct-menu__item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 10px; border-radius: var(--r-button);
  border: none; background: none; cursor: pointer; text-align: left;
  font: inherit; font-size: 13.5px; color: var(--fg); white-space: nowrap;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.acct-menu__item svg { color: var(--fg-muted); flex-shrink: 0; }
.acct-menu__item:hover { background: var(--paciva-tan-50); }
.acct-menu__item:hover svg { color: var(--fg); }
.dark .acct-menu__item:hover { background: var(--surface-raised); }
.acct-menu__div { height: 1px; background: var(--border); margin: 6px 8px; }
.acct-menu__build { padding: 9px 10px 5px; font-size: 11px; color: var(--fg-subtle); font-variant-numeric: tabular-nums; }
.user-card__avatar { width: 32px; height: 32px; border-radius: 999px; overflow: hidden; flex-shrink: 0; }
.user-card__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-card__meta { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.user-card__name { font-size: 13px; font-weight: 600; }
.user-card__email { font-size: 12px; color: var(--fg-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  height: 60px; display: flex; align-items: center; gap: 16px;
  padding: 0 20px; border-bottom: 1px solid var(--border); background: var(--surface);
}
.topbar__title-wrap { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.topbar__title { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.01em; color: var(--fg); white-space: nowrap; }
.topbar__sub { font-size: 13px; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__spacer { flex: 1; }
.topbar__menu {
  display: none; width: 36px; height: 36px; border-radius: var(--r-button);
  border: 1px solid var(--border); background: var(--bg); cursor: pointer;
  align-items: center; justify-content: center; color: var(--fg);
}
.insight-strip {
  display: inline-flex; align-items: center; gap: 9px;
  height: 36px; padding: 0 8px 0 14px; border-radius: 999px;
  background: linear-gradient(100deg, var(--paciva-gradient-orange), var(--paciva-gradient-blue));
  font-size: 12.5px; color: var(--paciva-ink); white-space: nowrap; max-width: 100%;
}
.dark .insight-strip { background: rgba(241,90,41,0.12); color: var(--fg); }
.insight-strip__icon { color: var(--paciva-orange); display: inline-flex; }
.insight-strip__link { font-weight: 600; cursor: pointer; }
.insight-strip__x {
  width: 22px; height: 22px; border-radius: 999px; border: none; cursor: pointer;
  background: rgba(13,19,33,0.06); color: var(--paciva-ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.insight-strip__x:hover { background: rgba(13,19,33,0.12); }
.dark .insight-strip__x { background: rgba(255,255,255,0.10); color: #fff; }

.icon-btn {
  width: 36px; height: 36px; border: 1px solid var(--border); background: var(--bg);
  border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--fg); position: relative; flex-shrink: 0;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.icon-btn:hover { background: var(--paciva-tan-50); }
.dark .icon-btn { background: var(--surface); }
.dark .icon-btn:hover { background: var(--surface-raised); }
.icon-btn__dot {
  position: absolute; top: 6px; right: 7px; width: 8px; height: 8px;
  border-radius: 999px; background: var(--paciva-orange); border: 1.5px solid var(--bg);
}
.icon-btn--active { background: var(--paciva-tan-100); border-color: var(--border-strong); }
.dark .icon-btn--active { background: var(--surface-raised); }
.icon-btn__count {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 999px; background: var(--paciva-orange);
  color: #fff; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center;
  font-variant-numeric: tabular-nums; border: 2px solid var(--surface); box-sizing: content-box;
}
.dark .icon-btn__count { border-color: var(--bg); }

/* ============================================================
   CHECK-IN BAND — "Since you were away".
   Full-width band under the topbar. Calm warm-tan surface, hairline,
   the only accent is Pax's orange shield. NOT a yellow alarm. Persistent
   (never a modal): collapsed = one headline you can Open / dismiss to
   advance; expanded = the full triage stack worked in place.
   ============================================================ */
.checkin-band {
  /* The check-in band is its own always-dark ink surface: it pulls the eye by
     contrast against the calm white inbox, not by flooding orange. Orange stays
     scarce (Pax's shield + the single eyebrow spark). Local token overrides
     re-skin every descendant rule for the dark context in both app modes. */
  background: var(--paciva-ink);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  animation: checkin-in var(--dur-base) var(--ease-standard);
  --fg: #ffffff;
  --fg-muted: #b8b3a4;
  --fg-subtle: #8a8578;
  --border: rgba(255,255,255,0.12);
  --border-strong: rgba(255,255,255,0.24);
  /* Literal ink-elevation values — the band is dark in BOTH app modes, so it
     can't lean on --surface-raised (which is white in light mode). */
  --surface: #161d34;
  --paciva-tan-50: rgba(255,255,255,0.05);
}
.dark .checkin-band { background: var(--paciva-ink); }
@keyframes checkin-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.checkin__mark { display: inline-flex; flex-shrink: 0; }

/* ---- collapsed bar ---- */
.checkin--collapsed {
  display: flex; align-items: center; gap: 22px;
  min-height: 60px; padding: 11px 24px;
}
.checkin__lead {
  display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0;
  background: none; border: none; padding: 5px 6px 5px 0; cursor: pointer;
  border-radius: var(--r-input); color: inherit; text-align: left;
}
.checkin__leadtext { font-size: 13px; font-weight: 500; color: var(--fg-muted); }
.checkin__lead:hover .checkin__leadtext { color: #fff; }
.checkin__leadchev { display: inline-flex; color: var(--fg-subtle); margin-left: -5px; }

.checkin__current {
  flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 11px;
  background: none; border: none; cursor: pointer; padding: 7px 10px; margin: -7px -10px;
  border-radius: var(--r-input); color: inherit; text-align: left;
  transition: background var(--dur-fast) var(--ease-standard);
}
.checkin__current:hover { background: rgba(255,255,255,0.05); }
.checkin__chan { display: inline-flex; flex-shrink: 0; }
.checkin__sender { font-weight: 600; font-size: 13.5px; color: #fff; white-space: nowrap; flex-shrink: 0; }
.checkin__headline {
  font-size: 13.5px; font-weight: 300; color: var(--fg-muted); min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.checkin__actions { display: inline-flex; align-items: center; gap: 14px; flex-shrink: 0; }
.checkin__progress {
  font-size: 12px; color: var(--fg-subtle); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.checkin__progress b { font-weight: 600; color: var(--fg-muted); }
.checkin__dismiss {
  width: 30px; height: 30px; border-radius: var(--r-button); border: none;
  background: none; color: var(--fg-subtle); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.checkin__dismiss:hover { background: rgba(255,255,255,0.09); color: #fff; }
.checkin__open {
  height: 32px; padding: 0 18px; border-radius: var(--r-button); border: none; cursor: pointer;
  background: #ffffff; color: var(--paciva-ink); font-size: 13px; font-weight: 600;
  transition: background var(--dur-fast) var(--ease-standard);
}
.checkin__open:hover { background: var(--paciva-tan-200); }

/* ---- reason (quiet text, no color dot — keeps the band calm) ---- */
.ck-reason {
  font-size: 11.5px; font-weight: 400; color: var(--fg-subtle);
  white-space: nowrap; flex-shrink: 0; letter-spacing: 0.01em;
}

/* ---- expanded triage stack ---- */
.checkin--expanded { padding: 14px 20px 16px; }
.checkin-head { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 11px; }
.checkin-head__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.checkin-head__title {
  font-family: var(--font-display); font-weight: 800; font-size: 15px;
  letter-spacing: -0.01em; color: var(--fg);
}
.checkin-head__sub { font-size: 12.5px; color: var(--fg-muted); }
.checkin-head__actions { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.checkin__textbtn {
  height: 30px; padding: 0 12px; border-radius: var(--r-button); cursor: pointer;
  background: none; border: 1px solid var(--border); color: var(--fg-muted);
  font-size: 12.5px; font-weight: 500;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.checkin__textbtn:hover { background: var(--surface); color: var(--fg); border-color: var(--border-strong); }
.checkin__collapse {
  display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px;
  border-radius: var(--r-button); cursor: pointer; background: none; border: none;
  color: var(--fg-muted); font-size: 12.5px; font-weight: 500;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.checkin__collapse:hover { background: rgba(255,255,255,0.09); color: #fff; }

.checkin-list {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-container); overflow: hidden;
}
.ck-row {
  display: flex; align-items: center; gap: 13px; padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--dur-fast) var(--ease-standard);
}
.ck-row:last-child { border-bottom: none; }
.ck-row:hover { background: rgba(255,255,255,0.04); }
.ck-row__chan { display: inline-flex; flex-shrink: 0; }
.ck-row__avatar { display: inline-flex; flex-shrink: 0; }
.ck-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ck-row__top { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ck-row__name { font-weight: 600; font-size: 13.5px; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ck-row__headline { font-size: 13px; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-row__meta { font-size: 11.5px; color: var(--fg-subtle); }
.ck-row__actions { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.ck-row__dismiss {
  width: 32px; height: 32px; border-radius: var(--r-button); border: 1px solid transparent;
  background: none; color: var(--fg-muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.ck-row__dismiss:hover { background: rgba(255,255,255,0.09); color: #fff; }
.ck-row__read {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px;
  border-radius: var(--r-button); border: 1px solid var(--border); cursor: pointer;
  background: var(--surface); color: var(--fg); font-size: 13px; font-weight: 500;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.ck-row__read:hover { background: rgba(255,255,255,0.07); border-color: var(--border-strong); }

/* ============================================================
   SLACK CHANNEL LIST — middle pane (channels + DMs + groups)
   ============================================================ */
.slkc { display: flex; flex-direction: column; padding: 4px 0 16px; }
.slkc__ws + .slkc__ws { margin-top: 6px; }
.slkc__wshead {
  display: flex; align-items: center; gap: 8px; padding: 14px 20px 6px;
  border-top: 1px solid var(--border);
}
.slkc__ws:first-child .slkc__wshead { border-top: none; }
.slkc__wsname {
  font-family: var(--font-display); font-weight: 800; font-size: 13px;
  letter-spacing: -0.01em; color: var(--fg);
}
.slkc__group { display: flex; flex-direction: column; }
.slkc__eyebrow {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 20px 5px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--fg-subtle);
}
.slkc__eyebrow-n {
  font-size: 11px; font-weight: 600; color: var(--fg-muted);
  background: var(--paciva-tan-100); padding: 0 7px; border-radius: var(--r-pill);
  font-variant-numeric: tabular-nums; letter-spacing: 0;
}
.dark .slkc__eyebrow-n { background: rgba(255,255,255,0.08); }

.slkc-row {
  display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 12px; align-items: start;
  width: 100%; text-align: left; cursor: pointer;
  padding: 12px 20px; border: none; border-left: 2px solid transparent;
  background: none; color: var(--fg);
  transition: background var(--dur-fast) var(--ease-standard);
}
.slkc-row:hover { background: var(--paciva-tan-50); }
.dark .slkc-row:hover { background: rgba(255,255,255,0.04); }
.slkc-row.active { background: var(--paciva-tan-100); border-left-color: var(--paciva-ink); }
.dark .slkc-row.active { background: var(--surface-raised); border-left-color: var(--paciva-orange); }

.slkc-row__lead { display: inline-flex; align-items: center; justify-content: center; padding-top: 1px; }
.slkc-row__hash {
  width: 30px; height: 30px; border-radius: var(--r-input);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--paciva-tan-100); color: var(--fg-muted); font-weight: 700; font-size: 15px;
}
.dark .slkc-row__hash { background: rgba(255,255,255,0.07); }
.slkc-row__av { display: inline-flex; }
.slkc-row__stack { display: inline-flex; }
.slkc-row__stackav { width: 26px; height: 26px; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 2px var(--surface); }
.dark .slkc-row__stackav { box-shadow: 0 0 0 2px var(--surface-raised); }
.slkc-row__stackav:not(:first-child) { margin-left: -10px; }

.slkc-row__body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.slkc-row__top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.slkc-row__name { font-weight: 600; font-size: 14px; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slkc-row--unread .slkc-row__name { font-weight: 800; }
.slkc-row__app {
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em; color: var(--fg-muted);
  background: var(--paciva-tan-100); padding: 1px 5px; border-radius: 3px; flex-shrink: 0;
}
.dark .slkc-row__app { background: rgba(255,255,255,0.08); }
.slkc-row__mention {
  display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0;
  font-size: 10.5px; font-weight: 600; color: var(--paciva-orange);
  background: var(--accent-tint); padding: 1px 7px; border-radius: var(--r-pill);
}
.slkc-row__time { margin-left: auto; font-size: 11.5px; color: var(--fg-subtle); flex-shrink: 0; white-space: nowrap; }
.slkc-row__preview {
  font-size: 12.5px; color: var(--fg-muted); line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.slkc-row--unread .slkc-row__preview { color: var(--fg); }
.slkc-row__foot { display: flex; align-items: center; gap: 12px; margin-top: 1px; }
.slkc-row__status { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; }
.slkc-row__statusdot { width: 6px; height: 6px; border-radius: 999px; flex-shrink: 0; }
.slkc-row__chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--fg-subtle); font-variant-numeric: tabular-nums; }
.slkc-row__unreaddot { width: 8px; height: 8px; border-radius: 999px; background: var(--paciva-orange); align-self: center; flex-shrink: 0; }

.slkc--empty {
  flex: 1; align-items: center; justify-content: center; gap: 10px;
  padding: 60px 24px; text-align: center; color: var(--fg-muted);
}
.slkc-empty__title { font-family: var(--font-display); font-weight: 800; font-size: 16px; color: var(--fg); }
.slkc-empty__sub { font-size: 13px; color: var(--fg-muted); }

/* quiet rows — channels you're in that Pax hasn't surfaced a conversation from */
.slkc-row--quiet .slkc-row__name { font-weight: 600; color: var(--fg-muted); }
.slkc-row--quiet .slkc-row__hash { background: var(--paciva-tan-50); color: var(--fg-subtle); }
.dark .slkc-row--quiet .slkc-row__hash { background: rgba(255,255,255,0.04); }
.slkc-row__quiettext { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-subtle); }
.slkc-row__unreadcount {
  align-self: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--paciva-orange); color: #fff; font-size: 11px; font-weight: 700;
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}

/* calm "caught up" channel view (member of, but quiet for you) */
.slk-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 12px; padding: 60px 32px 40px; max-width: 460px; margin: 0 auto;
}
.slk-empty__title { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -0.01em; color: var(--fg); }
.slk-empty__sub { font-size: 14px; line-height: 1.55; color: var(--fg-muted); }
.slk-empty__hint {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 4px;
  font-size: 12.5px; color: var(--fg-subtle); background: var(--paciva-tan-100);
  padding: 5px 12px; border-radius: var(--r-pill); font-variant-numeric: tabular-nums;
}
.dark .slk-empty__hint { background: rgba(255,255,255,0.06); }

/* ---- all-clear ---- */
.checkin--clear { display: flex; align-items: center; gap: 11px; min-height: 52px; padding: 8px 20px; }
.checkin__cleartext { font-size: 13.5px; color: var(--fg-muted); }
.checkin__cleartext strong { color: var(--fg); font-weight: 600; }
.checkin__flex { flex: 1; }

@media (max-width: 720px) {
  .checkin__current { display: none; }
  .checkin__lead { flex: 1; }
}

/* ============================================================
   NOTIFICATION CENTER — bell dropdown + toasts (TailAdmin pattern,
   Paciva re-skin: floating white surface, hairline, overlay shadow)
   ============================================================ */
.nc-wrap { position: relative; display: inline-flex; }
.nc-scrim { position: fixed; inset: 0; z-index: 60; }
.nc-panel {
  position: fixed; top: 64px; right: 16px; z-index: 61;
  width: 384px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 80px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-container); box-shadow: var(--shadow-overlay);
  display: flex; flex-direction: column; overflow: hidden;
  animation: nc-pop var(--dur-base) var(--ease-emphasis);
}
@keyframes nc-pop {
  from { opacity: 0; transform: translateY(-6px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
.nc-panel__head {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 12px 12px 16px; border-bottom: 1px solid var(--border);
}
.nc-panel__title { font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--fg); letter-spacing: -0.01em; }
.nc-panel__count {
  font-size: 11px; font-weight: 600; color: var(--paciva-orange);
  background: var(--accent-tint); padding: 1px 7px; border-radius: 999px;
}
.nc-panel__spacer { flex: 1; }
.nc-panel__action {
  border: none; background: none; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 500; color: var(--fg-muted);
  padding: 4px 6px; border-radius: var(--r-button); transition: background var(--dur-fast), color var(--dur-fast);
}
.nc-panel__action:hover { background: var(--paciva-tan-50); color: var(--fg); }
.dark .nc-panel__action:hover { background: var(--surface-raised); }
.nc-panel__close {
  width: 28px; height: 28px; border: none; background: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-button); color: var(--fg-muted); transition: background var(--dur-fast), color var(--dur-fast);
}
.nc-panel__close:hover { background: var(--paciva-tan-50); color: var(--fg); }
.dark .nc-panel__close:hover { background: var(--surface-raised); }

.nc-list { flex: 1; min-height: 0; overflow-y: auto; padding: 4px; }

.nc-row {
  display: flex; align-items: flex-start; gap: 11px; position: relative;
  padding: 11px 12px 11px 12px; border-radius: 8px; cursor: pointer;
  transition: background var(--dur-fast);
}
.nc-row:hover { background: var(--paciva-tan-50); }
.dark .nc-row:hover { background: var(--surface-raised); }
.nc-row--unread { background: var(--paciva-tan-25); }
.dark .nc-row--unread { background: rgba(255,255,255,0.03); }

.nc-chip {
  flex-shrink: 0; width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
}
/* Only Pax sits on a circle (its gradient disc). Channel logos and agent
   icons render bare \u2014 no circle. */
.nc-chip--channel { background: none; }
.nc-chip--agent { background: none; color: var(--fg); }
.nc-chip--pax { background: none; }

.nc-row__body { flex: 1; min-width: 0; }
.nc-row__top { display: flex; align-items: baseline; gap: 7px; }
.nc-row__provider { font-size: 13px; font-weight: 600; color: var(--fg); white-space: nowrap; }
.nc-row__title { font-size: 12px; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.nc-row__time { font-size: 11px; color: var(--fg-subtle); white-space: nowrap; font-variant-numeric: tabular-nums; }
.nc-row__text {
  font-size: 12.5px; color: var(--fg-muted); line-height: 1.45; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nc-row__from { color: var(--fg); font-weight: 500; }
.nc-row__dot {
  position: absolute; top: 16px; right: 12px; width: 7px; height: 7px;
  border-radius: 999px; background: var(--paciva-orange); flex-shrink: 0;
}
.nc-row--unread .nc-row__text, .nc-row--unread .nc-row__title { padding-right: 10px; }

.nc-empty { padding: 36px 24px; text-align: center; color: var(--fg-muted); font-size: 13px; }

.nc-panel__foot { border-top: 1px solid var(--border); padding: 8px; }
.nc-foot-link {
  width: 100%; border: none; background: none; cursor: pointer; font: inherit;
  font-size: 13px; font-weight: 500; color: var(--fg); padding: 8px; border-radius: var(--r-button);
  transition: background var(--dur-fast);
}
.nc-foot-link:hover { background: var(--paciva-tan-50); }
.dark .nc-foot-link:hover { background: var(--surface-raised); }

/* ----- Toasts: pop in from the top-right corner ----- */
.toast-stack {
  position: fixed; top: 72px; right: 20px; z-index: 200;
  display: flex; flex-direction: column; gap: 10px;
  width: 360px; max-width: calc(100vw - 40px); pointer-events: none;
}
.toast {
  pointer-events: auto; position: relative; overflow: hidden;
  display: flex; align-items: flex-start; gap: 11px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-container); box-shadow: var(--shadow-overlay);
  padding: 13px 14px 13px 13px;
  animation: toast-in var(--dur-slow) var(--ease-emphasis);
}
.toast--leave { animation: toast-out 360ms var(--ease-standard) forwards; }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(24px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
@keyframes toast-out {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: translateX(24px) scale(0.98); }
}
.toast__body { flex: 1; min-width: 0; }
.toast__title { font-size: 13.5px; font-weight: 600; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast__text {
  font-size: 12.5px; color: var(--fg-muted); line-height: 1.4; margin-top: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.toast__x {
  flex-shrink: 0; width: 24px; height: 24px; border: none; background: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-button);
  color: var(--fg-subtle); transition: background var(--dur-fast), color var(--dur-fast);
}
.toast__x:hover { background: var(--paciva-tan-50); color: var(--fg); }
.dark .toast__x:hover { background: var(--surface-raised); }

@media (prefers-reduced-motion: reduce) {
  .nc-panel, .toast { animation: none; }
}

/* layout toggle segmented */
.layout-toggle {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 3px; border-radius: 999px; background: var(--paciva-tan-100);
}
.dark .layout-toggle { background: var(--surface-sunken); }
.layout-toggle__btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 12px; border: none; background: transparent; cursor: pointer;
  border-radius: 999px; color: var(--fg-muted); font-size: 12.5px; font-weight: 500;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.layout-toggle__btn:hover { color: var(--fg); }
.layout-toggle__btn.active { background: var(--bg); color: var(--fg); box-shadow: var(--shadow-input); }
.dark .layout-toggle__btn.active { background: var(--surface-raised); color: #fff; }
.layout-toggle__glyph { display: inline-flex; }
.layout-toggle__label { display: inline; }
@media (max-width: 1180px) { .layout-toggle__label { display: none; } }

/* ============================================================
   CONTENT — panels grid
   ============================================================ */
.content {
  display: grid; min-width: 0; min-height: 0; overflow: hidden;
  /* The canvas base — warm tan in light, deep ink in dark — shows in the
     resizer seams so the panels read as floating, layered surfaces. */
  background: var(--bg-subtle);
}
.panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); }
.panel + .panel { border-left: 1px solid var(--border); }
.panel__head {
  flex-shrink: 0; padding: 16px 20px 0; display: flex; flex-direction: column; gap: 14px;
}
.panel__scroll { flex: 1; overflow-y: auto; min-height: 0; }

/* list panel header row */
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.list-head__title { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.01em; color: var(--fg); }
.btn-compose {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px;
  border-radius: 5px; border: none; background: var(--paciva-ink); color: #fff;
  font-size: 14px; font-weight: 500; cursor: pointer; transition: background var(--dur-fast);
}
.btn-compose:hover { background: var(--paciva-ink-hover); }
/* Primary stays ink in dark mode too — Paciva never uses white buttons. */
.dark .btn-compose { background: var(--paciva-ink); color: #fff; border: 1px solid var(--border); }
.dark .btn-compose:hover { background: var(--paciva-ink-hover); }

/* search */
.searchbar {
  display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg);
  box-shadow: var(--shadow-input); color: var(--fg-muted);
}
.searchbar:focus-within { border-color: var(--border-strong); }
.searchbar input { flex: 1; border: none; outline: none; background: transparent; font-family: inherit; font-size: 14px; color: var(--fg); min-width: 0; }
.searchbar input::placeholder { color: var(--fg-subtle); }
.searchbar__mic { color: var(--fg-subtle); cursor: pointer; display: inline-flex; }

/* ============================================================
   FILTER + SORT BAR  (the redesign)
   ============================================================ */
.filterbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.status-seg {
  display: inline-flex; align-items: center; gap: 2px; padding: 3px;
  border-radius: 999px; background: var(--paciva-tan-100); flex-wrap: wrap;
}
.dark .status-seg { background: var(--surface-sunken); }
.status-seg__btn {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 13px;
  border: none; background: transparent; cursor: pointer; border-radius: 999px;
  color: var(--fg-muted); font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.status-seg__btn:hover { color: var(--fg); }
.status-seg__btn.active { background: var(--bg); color: var(--fg); box-shadow: var(--shadow-input); }
.dark .status-seg__btn.active { background: var(--surface-raised); color: #fff; }
.status-seg__dot { width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0; }
.status-seg__count {
  font-size: 11px; font-variant-numeric: tabular-nums; color: var(--fg-subtle);
  background: var(--bg); padding: 0 6px; border-radius: 999px; line-height: 17px; min-width: 18px; text-align: center;
}
.status-seg__btn.active .status-seg__count { background: var(--paciva-tan-100); color: var(--fg-muted); }
.dark .status-seg__count { background: var(--surface); }
.dark .status-seg__btn.active .status-seg__count { background: rgba(255,255,255,0.14); color: #fff; }

.dot-clean { background: var(--success-500); }
.dot-review { background: var(--warning-500); }
.dot-assisted { background: var(--ink-400); }
.dot-pacified { background: var(--danger-500); }
.dot-all { background: var(--fg-subtle); }

/* scope segmented (full-width, compact) */
.status-seg--scope {
  display: flex; width: 100%; gap: 4px; padding: 4px; flex-wrap: nowrap;
  background: var(--paciva-tan-50); border: 1px solid var(--border); border-radius: var(--r-container);
}
.dark .status-seg--scope { background: var(--surface-sunken); }
.status-seg--scope .status-seg__btn {
  flex: 1; justify-content: center; gap: 6px; height: 32px; padding: 0 8px; min-width: 0;
  font-size: 12.5px; border-radius: var(--r-button);
}
.status-seg--scope .status-seg__btn.active { background: var(--bg); color: var(--fg); box-shadow: var(--shadow-input); }
.dark .status-seg--scope .status-seg__btn.active { background: var(--surface-raised); color: #fff; }
.status-seg--scope .status-seg__count {
  background: none; padding: 0; min-width: 0; line-height: 1; font-size: 11px; color: var(--fg-subtle);
}
.status-seg--scope .status-seg__btn.active .status-seg__count { background: none; color: var(--fg-muted); }
.dark .status-seg--scope .status-seg__btn.active .status-seg__count { color: rgba(255,255,255,0.7); }

.fb-spacer { flex: 1; }
.fb-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg); cursor: pointer;
  color: var(--fg); font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.fb-btn:hover { background: var(--paciva-tan-50); border-color: var(--border-strong); }
.dark .fb-btn { background: var(--surface); }
.dark .fb-btn:hover { background: var(--surface-raised); }
.fb-btn__count {
  background: var(--paciva-orange); color: #fff; font-size: 11px; font-weight: 600;
  border-radius: 999px; padding: 0 6px; line-height: 16px; min-width: 16px; text-align: center;
}
.fb-btn .chev { color: var(--fg-subtle); }

/* popover */
.popover-wrap { position: relative; }
.popover {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 40;
  width: 280px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-overlay); padding: 6px;
}
.popover--sort { width: 220px; }
.popover--left { left: 0; right: auto; }
.scope-select {
  display: inline-flex; align-items: center; gap: 9px; height: 36px; padding: 0 11px 0 12px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg); cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 500; color: var(--fg);
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.scope-select:hover { background: var(--paciva-tan-50); border-color: var(--border-strong); }
.dark .scope-select { background: var(--surface); }
.dark .scope-select:hover { background: var(--surface-raised); }
.scope-select__glyph { display: inline-flex; align-items: center; }
.scope-select__count { font-size: 11px; color: var(--fg-subtle); font-variant-numeric: tabular-nums; }
.scope-select__chev { color: var(--fg-subtle); margin-left: 2px; }
.scope-menu { width: 252px; }
.scope-opt__glyph { display: inline-flex; align-items: center; width: 16px; justify-content: center; }
.scope-opt__count { margin-left: auto; font-size: 11px; color: var(--fg-subtle); font-variant-numeric: tabular-nums; }
.popover__group { padding: 8px 8px 4px; }
.popover__group-label { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted); padding: 0 4px 6px; }
.popover__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px 6px; }
.pop-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg); cursor: pointer;
  font-size: 12.5px; color: var(--fg); transition: background var(--dur-fast), border-color var(--dur-fast);
}
.pop-chip:hover { background: var(--paciva-tan-50); }
.pop-chip.active { background: var(--paciva-ink); color: #fff; border-color: var(--paciva-ink); }
.dark .pop-chip { background: var(--surface-raised); }
.dark .pop-chip.active { background: #fff; color: var(--paciva-ink); }
.pop-opt {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-button);
  cursor: pointer; font-size: 13.5px; color: var(--fg);
}
.pop-opt:hover { background: var(--paciva-tan-50); }
.dark .pop-opt:hover { background: var(--surface-raised); }
.pop-opt__check { margin-left: auto; color: var(--paciva-orange); display: inline-flex; opacity: 0; }
.pop-opt.active .pop-opt__check { opacity: 1; }
.pop-opt.active { font-weight: 500; }
.popover__divider { height: 1px; background: var(--border); margin: 4px 4px; }
.popover__foot { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 6px; }
.popover__clear { background: none; border: none; cursor: pointer; color: var(--fg-muted); font-size: 12.5px; font-family: inherit; }
.popover__clear:hover { color: var(--paciva-orange); }

/* select-all + count row above list */
.list-meta {
  display: flex; align-items: center; gap: 10px; padding: 4px 2px 0;
  font-size: 12.5px; color: var(--fg-muted);
}
.list-meta__check {
  width: 18px; height: 18px; cursor: pointer; color: var(--fg-subtle);
  display: inline-flex; align-items: center; justify-content: center;
}
.list-meta__check:hover { color: var(--fg); }
.list-meta__count { font-variant-numeric: tabular-nums; }
.list-meta__refresh { margin-left: auto; cursor: pointer; color: var(--fg-subtle); display: inline-flex; }
.list-meta__refresh:hover { color: var(--fg); }

/* ============================================================
   MESSAGE LIST
   ============================================================ */
.msglist { display: flex; flex-direction: column; padding: 14px 16px 36px; gap: 10px; }
.msglist--compact { padding: 4px 0 36px; gap: 0; }

.msgrow {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start;
  padding: 13px 12px; border-radius: var(--r-card); cursor: pointer; position: relative;
  transition: background var(--dur-fast);
}
.msgrow:hover { background: var(--paciva-tan-25); }
.dark .msgrow:hover { background: var(--surface-raised); }
.msgrow.active { background: var(--paciva-tan-50); }
.dark .msgrow.active { background: var(--surface-raised); }
.msgrow.unread .msgrow__name { font-weight: 700; }
.msgrow.unread .msgrow__preview { color: var(--fg); }
.msgrow__unread-dot {
  position: absolute; left: 3px; top: 50%; transform: translateY(-50%);
  width: 7px; height: 7px; border-radius: 999px; background: var(--paciva-orange);
}
.msgrow__avatar { position: relative; }
.msgrow__ch {
  position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px;
  border-radius: 4px; background: var(--bg); display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--bg);
}
.dark .msgrow__ch { box-shadow: 0 0 0 2px var(--surface); }
.msgrow__main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.msgrow__top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.msgrow__name { font-size: 14px; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.msgrow__group-badge {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  padding: 1px 7px 1px 5px; border-radius: 999px; background: var(--paciva-tan-100);
  color: var(--fg-muted); font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.dark .msgrow__group-badge { background: rgba(255,255,255,0.08); }
.msgrow__subject { font-size: 13.5px; color: var(--fg); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msgrow.unread .msgrow__subject { font-weight: 700; }
.msgrow__preview {
  font-size: 13px; color: var(--fg-muted); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.msgrow__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.msgrow__time { font-size: 12px; color: var(--fg-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.msgrow__star { color: var(--fg-subtle); cursor: pointer; display: inline-flex; opacity: 0; transition: opacity var(--dur-fast); }
.msgrow:hover .msgrow__star { opacity: 1; }
.msgrow__star.on { opacity: 1; color: var(--warning-500); }
.msgrow__star.on svg { fill: var(--warning-500); }
.msgrow__badges { display: flex; gap: 6px; align-items: center; }

/* status badge (soft pill) */
.sbadge {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 500; white-space: nowrap;
}
/* Soft pill badges — exact DS recipe: lightest tint bg + darkest readable text, no border, no solid fills. */
.sbadge--clean { background: var(--success-50); color: var(--success-600); }
.sbadge--review { background: var(--warning-50); color: var(--warning-600); }
.sbadge--assisted { background: var(--paciva-tan-100); color: var(--ink-600); }
.sbadge--pacified { background: var(--danger-50); color: var(--danger-600); }
.sbadge--routed { background: var(--info-50); color: var(--info-600); }
.dark .sbadge--clean { background: color-mix(in srgb, var(--success-500) 18%, transparent); color: color-mix(in srgb, var(--success-500) 52%, var(--white)); }
.dark .sbadge--review { background: color-mix(in srgb, var(--warning-500) 18%, transparent); color: color-mix(in srgb, var(--warning-500) 55%, var(--white)); }
.dark .sbadge--assisted { background: color-mix(in srgb, var(--white) 10%, transparent); color: var(--fg-muted); }
.dark .sbadge--pacified { background: color-mix(in srgb, var(--danger-500) 18%, transparent); color: color-mix(in srgb, var(--danger-500) 58%, var(--white)); }
.dark .sbadge--routed { background: color-mix(in srgb, var(--signal-blue) 18%, transparent); color: color-mix(in srgb, var(--signal-blue) 55%, var(--white)); }

/* ---- card-style comfortable rows (quad / 3-panel) ---- */
.mcard {
  position: relative; display: grid;
  grid-template-columns: 46px minmax(0,1fr) auto;
  gap: 14px; align-items: start;
  padding: 13px 16px 13px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  cursor: pointer; transition: background var(--dur-fast), border-color var(--dur-fast);
}
.mcard:hover { background: var(--paciva-tan-25); border-color: var(--border-strong); }
.dark .mcard:hover { background: var(--surface-raised); }
.mcard.active { background: var(--paciva-tan-50); border-color: var(--border-strong); }
.dark .mcard.active { background: var(--surface-raised); border-color: var(--border-strong); }
.mcard__bar { position: absolute; left: 0; top: 13px; bottom: 13px; width: 3px; border-radius: 0 4px 4px 0; }
.bar--clean { background: var(--success-500); }
.bar--review { background: var(--warning-500); }
.bar--assisted { background: var(--ink-400); }
.bar--pacified { background: var(--danger-500); }
.mcard__left { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mcard__time { font-size: 10.5px; color: var(--fg-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mcard__body { min-width: 0; display: flex; flex-direction: column; gap: 5px; padding-top: 1px; }
.mcard__namerow { display: flex; align-items: center; gap: 7px; min-width: 0; }
.mcard__name { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: -0.005em; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mcard.unread .mcard__name { font-weight: 800; }
.mcard__type { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; padding: 1px 7px; border-radius: 999px; background: var(--paciva-tan-50); color: var(--fg-muted); font-size: 10.5px; font-weight: 500; }
.dark .mcard__type { background: var(--surface-raised); }
.mcard__type--invite { background: var(--paciva-tan-100); color: var(--fg); }
.dark .mcard__type--invite { background: rgba(255,255,255,0.10); color: #fff; }
.mcard__groupbadge { display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0; padding: 1px 7px; border-radius: 999px; background: var(--paciva-tan-100); color: var(--fg-muted); font-size: 10.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
.dark .mcard__groupbadge { background: rgba(255,255,255,0.08); }
.mcard__preview { font-size: 12.5px; line-height: 1.45; color: var(--fg-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mcard.unread .mcard__preview { color: var(--fg); }
.mcard__right { display: flex; flex-direction: column; align-items: center; justify-content: space-between; align-self: stretch; gap: 10px; flex-shrink: 0; position: relative; }
.mcard__more { width: 26px; height: 26px; border-radius: 7px; border: none; background: transparent; cursor: pointer; color: var(--fg-subtle); display: inline-flex; align-items: center; justify-content: center; }
.mcard__more:hover { background: var(--paciva-tan-100); color: var(--fg); }
.dark .mcard__more:hover { background: rgba(255,255,255,0.08); }
.mcard__channel { display: inline-flex; align-items: center; justify-content: center; }
.mcard__star { color: var(--fg-subtle); cursor: pointer; display: inline-flex; }
.mcard__star.on { color: var(--warning-500); }
.mcard__star.on svg { fill: var(--warning-500); }

/* status legend key */
.legend { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-left: auto; }
.legend__item { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font-size: 11px; color: var(--fg-muted); border: none; background: none; font-family: inherit; padding: 0; }
.legend__item:hover { color: var(--fg); }
.legend__item.dim { opacity: 0.35; }
.legend__dot { width: 7px; height: 7px; border-radius: 999px; flex-shrink: 0; }

/* card tags row + quick-action menu */
.mcard__tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sbadge--xs { font-size: 10px; padding: 1px 7px; font-weight: 600; }
.row-menu-wrap { position: relative; display: inline-flex; }
.mcard__more--sm { width: 24px; height: 24px; border-radius: 6px; }
.row-menu {
  position: absolute; top: calc(100% + 4px); right: 0; z-index: 46; width: 188px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-overlay); padding: 5px;
}
.row-menu button {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: none;
  background: none; cursor: pointer; font-family: inherit; font-size: 13px; color: var(--fg);
  border-radius: 6px; text-align: left;
}
.row-menu button:hover { background: var(--paciva-tan-50); }
.dark .row-menu button:hover { background: var(--surface-raised); }
.row-menu button .ic { color: var(--fg-muted); }
.row-menu__scrim { position: fixed; inset: 0; z-index: 45; }

/* column resizer — the seam between panes is ALWAYS exactly 1px; a wider
   invisible zone keeps it grabbable without thickening the visible line. */
.col-resizer { cursor: col-resize; position: relative; background: var(--border); z-index: 2; transition: background var(--dur-fast); }
.col-resizer::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 11px;
}
.col-resizer:hover { background: var(--border-strong); }
.col-resizer.dragging { background: var(--paciva-orange); }

/* static seam — a fixed-width panel that can't be dragged (the right info panel) */
.col-divider { background: var(--border); }

/* compact (Gmail-style) rows for 2-panel */
.msgrow--compact {
  grid-template-columns: auto auto auto auto minmax(0,1fr) auto; align-items: center;
  gap: 14px; padding: 0 20px; min-height: 60px; border-radius: 0;
  border-bottom: 1px solid var(--border);
}
.msgrow--compact .msgrow__star { opacity: 1; }
.msgrow--compact .msgrow__type { display: inline-flex; color: var(--fg-subtle); flex-shrink: 0; }
.msgrow--compact .msgrow__name { width: 190px; flex: none; font-size: 13.5px; }
.msgrow--compact .msgrow__line { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.msgrow--compact .msgrow__subject { flex-shrink: 0; max-width: 50%; }
.msgrow--compact .msgrow__preview {
  -webkit-line-clamp: 1; display: inline; color: var(--fg-subtle); font-size: 13px;
}
.msgrow--compact .msgrow__preview::before { content: '— '; }
.msgrow--compact.unread { background: var(--bg); }
.msgrow--compact.unread .msgrow__line .msgrow__subject { color: var(--fg); }
.msgrow--compact .msgrow__meta { flex-direction: row; align-items: center; gap: 10px; }

.list-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 12px; padding: 80px 24px; color: var(--fg-muted);
}
.list-empty__icon {
  width: 56px; height: 56px; border-radius: 999px; background: var(--paciva-tan-50);
  display: inline-flex; align-items: center; justify-content: center; color: var(--success-500);
}
.list-empty__title { font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--fg); }
.list-empty__sub { font-size: 13.5px; max-width: 280px; }

/* group separator (newsletters) */
.list-group-label {
  display: flex; align-items: center; gap: 8px; padding: 16px 14px 6px;
  font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-muted);
}
.list-group-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ============================================================
   MESSAGE VIEW (window)
   ============================================================ */
.msgview { display: flex; flex-direction: column; height: 100%; min-width: 0; }
.msgview__bar {
  flex-shrink: 0; display: flex; align-items: center; gap: 12px;
  padding: 13px 20px; border-bottom: 1px solid var(--border);
}
.msgview__chan {
  display: inline-flex; align-items: center; gap: 9px; font-weight: 500; font-size: 14px; color: var(--fg);
}
.msgview__chan .badge-soft { margin-left: 2px; }
.msgview__bar-spacer { flex: 1; }
.msgview__nav { display: inline-flex; align-items: center; gap: 4px; color: var(--fg-muted); font-size: 12.5px; }
.msgview__navbtn {
  width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--border); background: var(--bg);
  cursor: pointer; color: var(--fg); display: inline-flex; align-items: center; justify-content: center;
}
.msgview__navbtn:hover { background: var(--paciva-tan-50); }
.dark .msgview__navbtn { background: var(--surface); }
.msgview__count { font-variant-numeric: tabular-nums; padding: 0 6px; }
.msgview__back {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 8px;
  border-radius: 7px; border: 1px solid var(--border); background: var(--bg); cursor: pointer;
  color: var(--fg); font-size: 13px; font-weight: 500;
}
.msgview__back:hover { background: var(--paciva-tan-50); }

.msgview__scroll { flex: 1; overflow-y: auto; min-height: 0; }
.msgview__inner { max-width: 760px; margin: 0 auto; padding: 24px 28px 32px; }

/* sender header inside message */
.msg-sender { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 22px; }
.msg-sender__meta { flex: 1; min-width: 0; }
.msg-sender__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.msg-sender__name { font-family: var(--font-display); font-weight: 800; font-size: 18px; color: var(--fg); letter-spacing: -0.01em; }
.msg-sender__role { font-size: 13px; color: var(--fg-muted); margin-top: 2px; }
.msg-sender__score {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  background: var(--paciva-tan-50); font-size: 12px; color: var(--fg-muted); font-variant-numeric: tabular-nums;
}
.dark .msg-sender__score { background: var(--surface-raised); }
.msg-sender__issue {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--fg-muted);
  cursor: pointer; margin-left: auto;
}
.msg-sender__issue:hover { color: var(--warning-600); }
.msg-subject {
  font-family: var(--font-display); font-weight: 800; font-size: 23px; line-height: 1.25;
  letter-spacing: -0.015em; color: var(--fg); margin-bottom: 14px;
}

/* conversation activity timeline — Pax (auto) + You (manual) status events */
.tactivity { display: flex; flex-direction: column; gap: 14px; margin: 20px 0 6px; }
.tevent { display: flex; align-items: center; gap: 14px; }
.tevent__rule { flex: 1; height: 1px; background: var(--border); }
.tevent__inner { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.tevent__tag {
  font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
  line-height: 1.5; letter-spacing: 0.005em;
}
.tevent__tag--you { background: var(--info-50); color: var(--info-600); }
.dark .tevent__tag--you { background: rgba(58,118,240,0.18); color: #a9c0ef; }
.tevent__tag--pax { background: var(--accent-tint); color: var(--paciva-orange); }
.tevent__label { font-size: 13px; color: var(--fg-muted); }
.tevent__time { font-size: 12px; color: var(--fg-subtle); font-variant-numeric: tabular-nums; }

/* conversation thread bubbles */
.thread { display: flex; flex-direction: column; gap: 16px; }
.tmsg { display: flex; gap: 11px; max-width: 86%; }
.tmsg__avatar { flex-shrink: 0; margin-top: 2px; }
.tmsg__col { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tmsg__author { font-size: 12px; color: var(--fg-muted); font-weight: 500; }
.tmsg__bubble {
  background: var(--paciva-tan-50); border: 1px solid var(--paciva-tan-100);
  border-radius: 10px; padding: 13px 16px; font-size: 14.5px; line-height: 1.55; color: var(--fg);
}
.dark .tmsg__bubble { background: var(--surface-raised); border-color: var(--border); }
.tmsg__time { font-size: 11px; color: var(--fg-subtle); font-variant-numeric: tabular-nums; }
.tmsg--you { margin-left: auto; flex-direction: row-reverse; }
.tmsg--you .tmsg__col { align-items: flex-end; }
.tmsg--you .tmsg__bubble { background: var(--paciva-ink); border-color: var(--paciva-ink); color: #fff; }
.dark .tmsg--you .tmsg__bubble { background: #fff; border-color: #fff; color: var(--paciva-ink); }
.tmsg--pax .tmsg__bubble {
  background: linear-gradient(120deg, var(--paciva-gradient-orange), var(--paciva-gradient-blue));
  border-color: rgba(241,90,41,0.18); color: var(--paciva-ink);
}
.dark .tmsg--pax .tmsg__bubble { background: rgba(241,90,41,0.12); border-color: rgba(241,90,41,0.28); color: #fff; }
.tmsg__react { display: inline-flex; gap: 4px; align-items: center; margin-top: 2px; }
.tmsg__why { font-size: 12px; color: var(--fg-muted); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.tmsg__rbtn { width: 26px; height: 26px; border-radius: var(--r-button); border: 1px solid var(--border); background: var(--bg); cursor: pointer; color: var(--fg-muted); display: inline-flex; align-items: center; justify-content: center; }
.tmsg__rbtn:hover { background: var(--paciva-tan-50); color: var(--fg); }

/* ---- Gatekeeper auto-reply: the decline Pax SENT to the sender on the user's behalf ---- */
.tmsg--gk { margin-left: auto; max-width: 90%; }
.tmsg--gk .tmsg__col { align-items: flex-end; width: 100%; }
.tmsg__author--gk { display: inline-flex; align-items: center; gap: 6px; color: var(--fg-muted); }
.tmsg__gkmark { display: inline-flex; color: var(--fg-muted); }
.tmsg__bubble--gk {
  background: var(--paciva-tan-50); border: 1px solid var(--paciva-tan-200);
  border-radius: 10px; padding: 13px 16px; font-size: 14.5px; line-height: 1.55; color: var(--fg);
  width: 100%;
}
.dark .tmsg__bubble--gk { background: var(--surface-raised); border-color: var(--border); }
.tmsg__gkp { margin: 0 0 10px; }
.tmsg__gkp:last-of-type { margin-bottom: 0; }
.tmsg__gklink {
  margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--fg-muted);
}
.tmsg__gklink a { color: var(--paciva-orange); text-decoration: none; }
.tmsg__gklink a:hover { color: var(--paciva-orange-hover); text-decoration: underline; }
.tmsg__gkmeta { display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; }
.tmsg__sent { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--success-600); font-variant-numeric: tabular-nums; margin-right: 4px; }

/* ---- Routed: a message Pax forwarded to the right teammate ---- */
.tmsg__col--routed { width: 100%; max-width: 92%; }
.tmsg__author--routed { display: inline-flex; align-items: center; gap: 6px; color: var(--info-600); font-weight: 600; }
.dark .tmsg__author--routed { color: #a9c0ef; }
.tmsg__bubble--routed {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 0; overflow: hidden;
}
.tmsg__routedhead {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; background: var(--info-50); border-bottom: 1px solid var(--border);
}
.dark .tmsg__routedhead { background: color-mix(in srgb, var(--signal-blue) 14%, transparent); }
.tmsg__routedwho { display: flex; flex-direction: column; min-width: 0; }
.tmsg__routedname { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--fg); letter-spacing: -0.005em; }
.tmsg__routedrole { font-size: 12px; color: var(--fg-muted); }
.tmsg__routedtag { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--info-600); white-space: nowrap; }
.dark .tmsg__routedtag { color: #a9c0ef; }
.tmsg__routednote { padding: 13px 16px; font-size: 14.5px; line-height: 1.55; color: var(--fg); }

/* plain text email body */
.email-text { font-size: 15px; line-height: 1.65; color: var(--fg); }
.email-text p { margin: 0 0 15px; }
.email-text__sig { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--fg-muted); white-space: pre-line; }

/* html email iframe */
.email-html-wrap { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.email-html-toolbar {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 1px solid var(--border);
  background: var(--paciva-tan-50); font-size: 12px; color: var(--fg-muted);
}
.dark .email-html-toolbar { background: var(--surface-raised); }
.email-html-toolbar__spacer { flex: 1; }
.email-html-toolbar__btn { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; color: var(--fg-muted); }
.email-html-toolbar__btn:hover { color: var(--fg); }
.email-html { width: 100%; border: none; display: block; background: #fff; }

/* digest (rolled-up newsletter) */
.digest { }
.digest__pax { display: flex; gap: 12px; }
.digest__bubble {
  flex: 1; background: var(--paciva-tan-50); border: 1px solid var(--paciva-tan-100);
  border-radius: 10px; padding: 18px 20px;
}
.dark .digest__bubble { background: var(--surface-raised); border-color: var(--border); }
.digest__intro { font-size: 14.5px; line-height: 1.6; color: var(--fg); }
.digest__list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.digest__list li { position: relative; padding-left: 18px; font-size: 14px; color: var(--fg); line-height: 1.4; }
.digest__list li::before { content: ''; position: absolute; left: 2px; top: 8px; width: 5px; height: 5px; border-radius: 999px; background: var(--paciva-orange); }
.digest__foot { margin-top: 16px; font-size: 12.5px; color: var(--fg-muted); }
.digest__actions { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.digest__react { display: flex; gap: 6px; margin-right: auto; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px; border-radius: 5px;
  border: 1px solid transparent; font-family: inherit; font-size: 13.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap; transition: background var(--dur-fast), border-color var(--dur-fast); color: var(--fg);
}
.btn--primary { background: var(--paciva-ink); color: #fff; }
.btn--primary:hover { background: var(--paciva-ink-hover); }
/* Primary stays ink in dark mode too — never inverted to white. */
.dark .btn--primary { background: var(--paciva-ink); color: #fff; border-color: var(--border); }
.dark .btn--primary:hover { background: var(--paciva-ink-hover); }
.btn--accent { background: var(--paciva-orange); color: #fff; }
.btn--accent:hover { background: var(--paciva-orange-hover); }
.btn--ghost { background: var(--bg); border-color: var(--border); }
.btn--ghost:hover { background: var(--paciva-tan-50); border-color: var(--border-strong); }
.dark .btn--ghost { background: var(--surface); }
.btn--soft { background: var(--paciva-tan-50); }
.btn--soft:hover { background: var(--paciva-tan-100); }
.dark .btn--soft { background: var(--surface-raised); }
.btn--sm { padding: 7px 12px; font-size: 13px; }
.btn--block { width: 100%; justify-content: center; }

/* composer */
.composer { flex-shrink: 0; border-top: 1px solid var(--border); padding: 14px 20px; background: var(--surface); }
.composer__draft {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--paciva-tan-25);
  color: var(--fg); font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  margin-bottom: 12px; transition: background var(--dur-fast), border-color var(--dur-fast);
}
.composer__draft:hover { background: var(--paciva-tan-50); border-color: var(--border-strong); }
.dark .composer__draft { background: var(--surface-raised); border-color: var(--border); }
.dark .composer__draft:hover { background: rgba(255,255,255,0.06); }
.composer__draft .sp { color: var(--paciva-orange); }
.composer__row { display: flex; align-items: center; gap: 10px; }
.composer__field {
  flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 44px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg); box-shadow: var(--shadow-input);
}
.composer__field input { flex: 1; border: none; outline: none; background: transparent; font-family: inherit; font-size: 14px; color: var(--fg); }
.composer__field input::placeholder { color: var(--fg-subtle); }
.composer__ico { color: var(--fg-subtle); cursor: pointer; display: inline-flex; }
.composer__ico:hover { color: var(--fg); }

/* Pax reply drafting — intents + drafted state */
.composer__draft.open { background: var(--paciva-tan-50); border-color: var(--border-strong); }
.composer__intents { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.composer__intent {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: var(--r-pill);
  border: 1px solid var(--border); background: var(--surface); color: var(--fg-muted);
  font-family: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer;
  transition: color var(--dur-fast), border-color var(--dur-fast);
}
.composer__intent:hover { color: var(--fg); border-color: var(--border-strong); }
.composer__paxbar {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: var(--r-card);
  background: linear-gradient(118deg, var(--paciva-gradient-orange), var(--paciva-gradient-blue));
}
.dark .composer__paxbar { background: var(--surface-raised); }
.composer__paxmark { display: inline-flex; flex-shrink: 0; }
.composer__paxlabel { font-family: var(--font-display); font-weight: 800; font-size: 13px; color: var(--fg); }
.composer__paxnote { font-size: 11.5px; color: var(--fg-muted); }
.composer__stepper { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; }
.composer__step {
  width: 22px; height: 22px; border: 1px solid var(--border); background: var(--surface); border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center; color: var(--fg-muted); cursor: pointer;
}
.composer__step:hover:not(:disabled) { color: var(--fg); border-color: var(--border-strong); }
.composer__step:disabled { opacity: 0.4; cursor: default; }
.composer__stepnum { font-size: 11.5px; font-weight: 500; color: var(--fg-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* reply composer bottom tool row */
.composer__toolrow { display: flex; align-items: center; gap: 2px; margin-top: 10px; }
.composer__tool {
  position: relative; width: 32px; height: 32px; border: none; background: transparent; color: var(--fg-muted);
  border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.composer__tool:hover { background: var(--paciva-tan-50); color: var(--fg); }
.dark .composer__tool:hover { background: var(--surface-raised); }
.composer__tool.active { background: var(--paciva-tan-50); color: var(--fg); }
.composer__tool--pax { color: var(--fg); }
.composer__tool--pax:hover { background: var(--accent-tint); }
.composer__pick { position: relative; }
.composer__menu {
  position: absolute; bottom: calc(100% + 8px); left: 0; min-width: 230px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-pop);
  padding: 6px; z-index: 30;
}
.composer__menu--right { left: auto; right: 0; }
.composer__menu-head { display: flex; align-items: center; gap: 7px; padding: 6px 8px 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-subtle); }
.composer__menu-item { width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px; border: none; background: transparent; border-radius: 6px; cursor: pointer; text-align: left; font-family: inherit; font-size: 13px; font-weight: 500; color: var(--fg); }
.composer__menu-item:hover { background: var(--paciva-tan-50); }
.dark .composer__menu-item:hover { background: var(--surface-raised); }
.composer__menu-item svg { color: var(--fg-muted); flex-shrink: 0; }
.composer__menu-item--accent { color: var(--paciva-orange); font-weight: 600; }
.composer__menu-item--accent svg { color: var(--paciva-orange); }
.composer__menu-item--accent:hover { background: var(--accent-tint); }
.composer__menu-item--mute svg { color: var(--fg-muted); }
.composer__menu-item--two { flex-direction: column; align-items: flex-start; gap: 2px; }
.composer__menu-sep { height: 1px; background: var(--border); margin: 5px 4px; }

/* Pax confirmation banner (pacified / sent) */
.composer__confirm {
  display: flex; align-items: center; gap: 9px; margin-bottom: 12px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--r-card);
  background: linear-gradient(118deg, var(--paciva-gradient-orange), var(--paciva-gradient-blue));
}
.dark .composer__confirm { background: var(--surface-raised); }
.composer__confirm-text { font-size: 13px; color: var(--fg); line-height: 1.4; }
.composer__confirm-x { margin-left: auto; border: none; background: transparent; color: var(--fg-subtle); cursor: pointer; display: inline-flex; padding: 0; flex-shrink: 0; }
.composer__confirm-x:hover { color: var(--fg); }
.composer__paxlink { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; border: none; background: transparent; font-family: inherit; font-size: 12px; font-weight: 500; color: var(--fg-muted); cursor: pointer; }
.composer__paxlink + .composer__paxlink { margin-left: 12px; }
.composer__paxlink:hover { color: var(--paciva-orange); }

.msgview-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; color: var(--fg-muted); text-align: center; padding: 40px;
}
.msgview-empty__mark { opacity: 0.5; }
.msgview-empty__title { font-size: 15px; }

/* ============================================================
   INFO / CLASSIFICATION / ACTION PANEL
   ============================================================ */
.info { display: flex; flex-direction: column; height: 100%; }
.info__scroll { flex: 1; overflow-y: auto; min-height: 0; padding: 22px 20px 28px; }
.info__sec { margin-bottom: 22px; }
.info__sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.info__label { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-muted); }
.info__link { font-size: 12.5px; color: var(--paciva-orange); cursor: pointer; font-weight: 500; }
.info__link:hover { color: var(--paciva-orange-hover); }

.info-status {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
}
.info-status__desc { font-size: 12.5px; color: var(--fg-muted); margin-top: 8px; line-height: 1.5; }

.info-actions { display: flex; flex-direction: column; gap: 9px; }
.info-actions__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.action-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 14px;
  border-radius: var(--r-button); border: 1px solid var(--border); background: var(--bg); cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 500; color: var(--fg); white-space: nowrap;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.action-btn svg { flex-shrink: 0; }
.action-btn:hover { background: var(--paciva-tan-50); border-color: var(--border-strong); }
.dark .action-btn { background: var(--surface); }
.dark .action-btn:hover { background: var(--surface-raised); }
.action-btn--accent { background: var(--paciva-orange); border-color: var(--paciva-orange); color: #fff; }
.action-btn--accent:hover { background: var(--paciva-orange-hover); border-color: var(--paciva-orange-hover); }
.action-btn--ink { background: var(--paciva-ink); border-color: var(--paciva-ink); color: #fff; }
.action-btn--ink:hover { background: var(--paciva-ink-hover); }
.dark .action-btn--ink { background: var(--paciva-ink); color: #fff; border-color: var(--border); }

/* Clean action mirrors the Clean status chip: authorized --success tokens only. */
.action-btn--clean { background: var(--success-50); border-color: transparent; color: var(--success-600); }
.action-btn--clean svg { color: var(--success-600); }
.action-btn--clean:hover { background: var(--success-50); border-color: var(--success-500); }
.dark .action-btn--clean { background: color-mix(in srgb, var(--success-500) 18%, transparent); color: color-mix(in srgb, var(--success-500) 52%, var(--white)); border-color: transparent; }
.dark .action-btn--clean svg { color: color-mix(in srgb, var(--success-500) 52%, var(--white)); }
.dark .action-btn--clean:hover { border-color: color-mix(in srgb, var(--success-500) 50%, transparent); }
.action-btn__pax { display: inline-flex; flex-shrink: 0; }

.info-check { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 13.5px; color: var(--fg); cursor: pointer; }
.info-check__box {
  width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff;
}
.info-check.on .info-check__box { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }

/* pax insight cards / flags */
.info-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.flag-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  background: var(--paciva-tan-50); font-size: 12px; color: var(--fg); font-variant-numeric: tabular-nums;
}
.dark .flag-chip { background: var(--surface-raised); }
.pax-verdict {
  display: flex; gap: 11px; padding: 14px 15px; border-radius: 10px;
  background: linear-gradient(120deg, var(--paciva-gradient-orange), var(--paciva-gradient-blue));
  border: 1px solid rgba(241,90,41,0.16);
}
.dark .pax-verdict { background: rgba(241,90,41,0.10); border-color: rgba(241,90,41,0.26); }
.pax-verdict__body { font-size: 13.5px; line-height: 1.55; color: var(--paciva-ink); }
.dark .pax-verdict__body { color: #fff; }
.pax-verdict__lead { font-weight: 600; display: block; margin-bottom: 3px; }

/* collapsible rows */
.info-collapse { border-top: 1px solid var(--border); }
.info-collapse__head {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 0;
  background: none; border: none; cursor: pointer; font-family: inherit; font-size: 13px;
  font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-muted);
}
.info-collapse__head:hover { color: var(--fg); }
.info-collapse__chev { margin-left: auto; transition: transform var(--dur-base); }
.info-collapse__chev.open { transform: rotate(180deg); }
.info-collapse__body { padding: 0 0 16px; }

.info-confidence { margin-top: 12px; }
.info-confidence__row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--fg-muted); margin-bottom: 6px; }
.info-confidence__track { height: 6px; border-radius: 999px; background: var(--paciva-tan-100); overflow: hidden; }
.info-confidence__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--paciva-orange), #ff8254); }
.info-select {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg);
  cursor: pointer; font-family: inherit; font-size: 13.5px; color: var(--fg);
}
.info-select:hover { border-color: var(--border-strong); }
.info-trace { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 13px; color: var(--fg); cursor: pointer; }
.info-trace:hover { color: var(--paciva-orange); }
.info-trace .ic { color: var(--fg-muted); }
.info-trace:hover .ic { color: var(--paciva-orange); }

.info-empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; color: var(--fg-muted); text-align: center; padding: 40px 26px;
}
.info-empty__title { font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--fg); letter-spacing: -0.01em; margin-top: 4px; }
.info-empty__body { font-size: 13px; line-height: 1.55; max-width: 260px; }
.info-empty__stat {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 8px 14px;
  border-radius: 999px; background: var(--paciva-tan-50); font-size: 12.5px; color: var(--fg);
}
.dark .info-empty__stat { background: var(--surface-raised); }
.info-empty__stat strong { font-family: var(--font-display); font-weight: 800; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
.sidebar-scrim { display: none; }
@media (max-width: 1100px) {
  .app { grid-template-columns: 64px 1fr; }
}
@media (max-width: 920px) {
  .app, .app.app--collapsed { grid-template-columns: 1fr; }
  .topbar__menu { display: inline-flex; }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 280px; z-index: 90;
    transform: translateX(-100%); transition: transform var(--dur-slow) var(--ease-emphasis);
    box-shadow: var(--shadow-overlay);
  }
  .sidebar.sidebar--mobile-open { transform: translateX(0); }
  .sidebar--collapsed { grid-template-columns: none; }
  .sidebar-scrim {
    display: block; position: fixed; inset: 0; background: rgba(13,19,33,0.36);
    opacity: 0; pointer-events: none; transition: opacity var(--dur-base); z-index: 85;
  }
  .sidebar-scrim.open { opacity: 1; pointer-events: auto; }
}

/* ============================================================
   REVISIONS — compact rows, timeline pills, resizer, unsubscribe,
   richer toasts, and the Slack surface
   ============================================================ */

/* ---- 2-panel (compact) rows: airier + hover + hover quick-actions ---- */
.msgrow--compact { min-height: 74px; padding: 10px 18px; gap: 15px; }
.msgrow--compact:hover { background: var(--paciva-tan-25); }
.dark .msgrow--compact:hover { background: var(--surface-raised); }
.msgrow--compact.active { background: var(--paciva-tan-50); }
.dark .msgrow--compact.active { background: var(--surface-raised); }
.msgrow--compact .msgrow__name { width: 200px; }
.msgrow--compact .msgrow__meta { gap: 12px; }
/* quick actions sit hidden until hover, then swap in over the status/time */
.msgrow__quick { display: none; align-items: center; gap: 2px; }
.msgrow__quick button {
  width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--bg); color: var(--fg-muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.msgrow__quick button:hover { background: var(--paciva-tan-100); color: var(--fg); border-color: var(--border-strong); }
.dark .msgrow__quick button { background: var(--surface); }
.dark .msgrow__quick button:hover { background: var(--surface-raised); }
.msgrow__quick button:nth-child(3):hover { color: var(--paciva-orange); border-color: var(--paciva-orange); }
.msgrow__rest { display: inline-flex; align-items: center; gap: 10px; }
.msgrow--compact:hover .msgrow__rest { display: none; }
.msgrow--compact:hover .msgrow__quick { display: inline-flex; }

/* workspace chip on Slack list cards */
.mcard__groupbadge--ws { background: var(--paciva-tan-50); padding-left: 5px; }
.dark .mcard__groupbadge--ws { background: var(--surface-raised); }

/* ---- thread timeline pills: ~20% smaller + Pax brand mark ---- */
.tevent__inner { gap: 9px; }
.tevent__tag { font-size: 10px; padding: 2px 8px; letter-spacing: 0.01em; }
.tevent__paxmark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 999px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--paciva-gradient-orange), var(--paciva-gradient-blue));
  border: 1px solid rgba(241,90,41,0.18); margin-right: -3px;
}
.dark .tevent__paxmark { background: rgba(241,90,41,0.14); border-color: rgba(241,90,41,0.28); }
.tevent__youmark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 999px; overflow: hidden; flex-shrink: 0; margin-right: -3px;
  border: 1px solid var(--border);
}
.tevent__label { font-size: 12.5px; }

/* ---- "Unsubscribe to save" — resting tint = old hover, hover one shade darker ---- */
.btn--unsub { background: var(--paciva-tan-100); color: var(--fg); }
.btn--unsub:hover { background: var(--paciva-tan-200); }
.dark .btn--unsub { background: var(--surface-raised); }
.dark .btn--unsub:hover { background: rgba(255,255,255,0.10); }

/* ---- resizable column: discoverable grip ---- */
.col-resizer__grip {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 4px; height: 30px; border-radius: 999px; background: var(--border-strong);
  opacity: 0; transition: opacity var(--dur-fast), background var(--dur-fast);
  pointer-events: none;
}
.col-resizer:hover .col-resizer__grip { opacity: 0.7; }
.col-resizer.dragging .col-resizer__grip { opacity: 1; background: var(--paciva-orange); }
.col-resizer.dragging { background: var(--paciva-orange); }

/* ---- richer notification toasts ---- */
.toast { padding: 14px 14px 18px 13px; }
.toast__top { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.toast__type {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--fg-muted);
}
/* Notification eyebrows are uniform — one neutral tone for every type
   (Pax, Sentinel, message, invitation). No per-type color. */
.toast__chan {
  font-size: 10.5px; font-weight: 600; color: var(--fg-muted);
  background: var(--paciva-tan-100); padding: 1px 7px; border-radius: 999px;
}
.dark .toast__chan { background: rgba(255,255,255,0.08); }
.toast__time { margin-left: auto; font-size: 11px; color: var(--fg-subtle); font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 18px; }
.toast__actions { display: flex; gap: 8px; margin-top: 10px; }
.toast__act {
  height: 30px; padding: 0 13px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg); color: var(--fg); font-family: inherit; font-size: 12.5px; font-weight: 500;
  cursor: pointer; transition: background var(--dur-fast), border-color var(--dur-fast);
}
.toast__act:hover { background: var(--paciva-tan-50); border-color: var(--border-strong); }
.toast__act--primary { background: var(--paciva-ink); color: #fff; border-color: var(--paciva-ink); }
.toast__act--primary:hover { background: var(--paciva-ink-hover); border-color: var(--paciva-ink-hover); }
.dark .toast__act { background: var(--surface-raised); }
.dark .toast__act--primary { background: var(--paciva-ink); color: #fff; }

/* ============================================================
   SLACK SURFACE — Pax operating directly inside Slack
   ============================================================ */
.slk { display: flex; flex-direction: column; }
.slk-head {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 15px;
  background: var(--paciva-tan-25); margin-bottom: 20px;
}
.dark .slk-head { background: var(--surface-raised); }
.slk-head__row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.slk-head__ws { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-weight: 800; font-size: 14px; color: var(--fg); letter-spacing: -0.01em; }
.slk-head__sep { color: var(--fg-subtle); }
.slk-head__chan { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; color: var(--fg); }
.slk-head__spacer { flex: 1; }
.slk-head__members { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.slk-head__topic { font-size: 12.5px; color: var(--fg-muted); margin-top: 7px; line-height: 1.45; }

.slk-tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
  background: var(--paciva-tan-100); color: var(--fg-muted);
}
.dark .slk-tag { background: rgba(255,255,255,0.10); }
.slk-tag--app { background: var(--ink-100); color: var(--fg-muted); }
.dark .slk-tag--app { background: rgba(255,255,255,0.12); color: #cfd3da; }
.slk-tag--mention { background: var(--accent-tint); color: var(--paciva-orange); text-transform: none; letter-spacing: 0; font-weight: 600; }
.dark .slk-tag--mention { background: rgba(241,90,41,0.16); }

.slk-stream { display: flex; flex-direction: column; gap: 17px; }
.slk-msg { display: flex; gap: 11px; }
.slk-msg__avatar { flex-shrink: 0; }
.slk-msg__col { min-width: 0; flex: 1; }
.slk-msg__head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.slk-msg__author { font-family: var(--font-display); font-weight: 800; font-size: 14px; color: var(--fg); letter-spacing: -0.005em; }
.slk-msg__time { font-size: 11.5px; color: var(--fg-subtle); font-variant-numeric: tabular-nums; }
.slk-msg__text { font-size: 14.5px; line-height: 1.55; color: var(--fg); }
.slk-msg__text strong { font-weight: 700; }
.slk-code { font-family: var(--font-mono, monospace); font-size: 12.5px; background: var(--paciva-tan-100); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; color: var(--danger-600); }
.dark .slk-code { background: rgba(255,255,255,0.08); color: #f0a594; }
.slk-link { color: var(--linkedin-blue, #1264a3); text-decoration: none; }
.slk-link:hover { text-decoration: underline; }
.slk-mention { color: var(--linkedin-blue, #1264a3); background: rgba(18,100,163,0.10); border-radius: 3px; padding: 0 3px; font-weight: 600; }
.dark .slk-mention { color: #7cb3e8; background: rgba(124,179,232,0.14); }
.slk-channel { color: var(--linkedin-blue, #1264a3); font-weight: 600; }
.dark .slk-channel { color: #7cb3e8; }

/* Pax operating in Slack — branded, tinted block */
.slk-msg--pax .slk-msg__text {
  background: linear-gradient(120deg, var(--paciva-gradient-orange), var(--paciva-gradient-blue));
  border: 1px solid rgba(241,90,41,0.16); border-radius: 10px; padding: 12px 14px; margin-top: 3px;
  color: var(--paciva-ink);
}
.dark .slk-msg--pax .slk-msg__text { background: rgba(241,90,41,0.10); border-color: rgba(241,90,41,0.26); color: #fff; }

/* file / drive / attachment cards */
.slk-att {
  display: flex; align-items: center; gap: 12px; margin-top: 9px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg); max-width: 420px;
}
.dark .slk-att { background: var(--surface); }
.slk-att__tile {
  width: 38px; height: 38px; border-radius: 7px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 12px; letter-spacing: 0.02em;
}
.slk-att__tile--canvas { background: var(--paciva-tan-100); color: var(--fg-muted); }
.dark .slk-att__tile--canvas { background: rgba(255,255,255,0.10); }
.slk-att__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.slk-att__name { font-size: 13.5px; font-weight: 600; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slk-att__sub { font-size: 11.5px; color: var(--fg-muted); }
.slk-att__btn { width: 32px; height: 32px; border-radius: 7px; border: 1px solid var(--border); background: var(--bg); color: var(--fg-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.slk-att__btn:hover { background: var(--paciva-tan-50); color: var(--fg); }
.dark .slk-att__btn { background: var(--surface-raised); }

/* link unfurl */
.slk-unfurl { margin-top: 9px; padding: 4px 0 4px 14px; border-left: 3px solid var(--paciva-orange); max-width: 460px; }
.slk-unfurl__site { font-size: 12px; font-weight: 600; color: var(--fg-muted); margin-bottom: 3px; }
.slk-unfurl__title { font-size: 14px; font-weight: 700; color: var(--linkedin-blue, #1264a3); }
.dark .slk-unfurl__title { color: #7cb3e8; }
.slk-unfurl__desc { font-size: 13px; color: var(--fg-muted); line-height: 1.5; margin-top: 3px; }

/* task list */
.slk-tasks { margin-top: 11px; display: flex; flex-direction: column; gap: 2px; max-width: 460px; }
.slk-task { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; transition: background var(--dur-fast); }
.slk-task:hover { background: var(--paciva-tan-50); }
.dark .slk-task:hover { background: var(--surface-raised); }
.slk-task__box {
  width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-strong); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; color: #fff;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.slk-task.done .slk-task__box { background: var(--success-500); border-color: var(--success-500); }
.slk-task__text { flex: 1; min-width: 0; font-size: 13.5px; color: var(--fg); }
.slk-task.done .slk-task__text { color: var(--fg-muted); text-decoration: line-through; }
.slk-task__who { font-size: 11.5px; color: var(--fg-muted); flex-shrink: 0; }

/* reactions */
.slk-reacts { display: flex; align-items: center; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.slk-react {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--paciva-tan-25);
  font-size: 11.5px; font-weight: 600; color: var(--fg-muted); font-variant-numeric: tabular-nums; cursor: pointer;
}
.slk-react:hover { border-color: var(--border-strong); }
.dark .slk-react { background: var(--surface-raised); }
.slk-react__e { font-size: 13px; }
.slk-react__add { color: var(--fg-subtle); padding: 0 8px; }

.slk-replies {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 9px 13px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg);
  font-size: 12.5px; font-weight: 500; color: var(--linkedin-blue, #1264a3); align-self: flex-start; cursor: pointer;
}
.slk-replies:hover { background: var(--paciva-tan-50); }
.dark .slk-replies { background: var(--surface); color: #7cb3e8; }

/* ---- Slack workspace icon tiles in the sidebar ---- */
.acct-item--ws { gap: 10px; }
.acct-item__ws { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.acct-item__tile {
  width: 20px; height: 20px; border-radius: 5px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 9px; letter-spacing: 0.01em;
  color: #fff;
}

/* ---- Slack workspace expand: nested channels + people ---- */
.acct-item__chev {
  color: var(--fg-subtle); display: inline-flex; flex-shrink: 0;
  transition: transform var(--dur-base) var(--ease-standard);
  margin: -4px -2px -4px 0; padding: 2px; border-radius: 4px;
}
.acct-item__chev:hover { color: var(--fg); background: var(--paciva-tan-200); }
.dark .acct-item__chev:hover { background: rgba(255,255,255,0.08); }
.acct-item__chev.open { transform: rotate(180deg); }

.slk-nav { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px; padding-left: 30px; }
.slk-nav__eyebrow {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--fg-subtle); padding: 7px 8px 3px;
}
.slk-nav__item {
  display: flex; align-items: center; gap: 8px; padding: 5px 10px;
  border-radius: var(--r-button); cursor: pointer; color: var(--fg-muted);
  font-size: 13px; border: 1px solid transparent;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.slk-nav__item:hover { background: var(--paciva-tan-100); color: var(--fg); }
.dark .slk-nav__item:hover { background: var(--surface-raised); }
.slk-nav__item.active { background: var(--surface); border-color: var(--border); color: var(--fg); font-weight: 500; }
.dark .slk-nav__item.active { background: var(--surface-raised); border-color: var(--border); color: #fff; }
.slk-nav__hash { width: 14px; text-align: center; color: var(--fg-subtle); font-weight: 600; flex-shrink: 0; }
.slk-nav__item.active .slk-nav__hash { color: var(--fg-muted); }
.slk-nav__label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slk-nav__badge {
  font-size: 11px; color: var(--fg-muted); background: var(--paciva-tan-100);
  padding: 1px 7px; border-radius: 999px; font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.dark .slk-nav__badge { background: rgba(255,255,255,0.08); }
.slk-nav__av { position: relative; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.slk-nav__presence {
  position: absolute; right: -2px; bottom: -2px; width: 8px; height: 8px; border-radius: 999px;
  border: 2px solid var(--surface);
}
.dark .slk-nav__presence { border-color: var(--surface-raised); }
.slk-nav__presence--active { background: var(--success-500); }
.slk-nav__presence--away { background: var(--surface); border: 1.5px solid var(--fg-subtle); }
.dark .slk-nav__presence--away { background: var(--surface-raised); }
.slk-nav__stack { display: inline-flex; flex-shrink: 0; width: 24px; }
.slk-nav__stackav { width: 15px; height: 15px; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 1.5px var(--surface); }
.dark .slk-nav__stackav { box-shadow: 0 0 0 1.5px var(--surface-raised); }
.slk-nav__stackav:not(:first-child) { margin-left: -6px; }

/* ---- Slack group-chat header (member avatar stack) ---- */
.slk-head__chan--group { gap: 8px; }
.slk-head__stack { display: inline-flex; flex-shrink: 0; }
.slk-head__stackav { width: 22px; height: 22px; border-radius: 5px; overflow: hidden; box-shadow: 0 0 0 2px var(--surface); }
.dark .slk-head__stackav { box-shadow: 0 0 0 2px var(--surface-raised); }
.slk-head__stackav:not(:first-child) { margin-left: -8px; }

/* ---- Slack sidebar unread + thread hints ---- */
.acct-item__badge--unread { background: var(--primary); color: var(--primary-fg); font-weight: 600; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-variant-numeric: tabular-nums; }
.dark .acct-item__badge--unread { background: var(--paciva-orange); color: #fff; }
.slk-nav__threads { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--fg-subtle); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.slk-nav__item--unread .slk-nav__label { color: var(--fg); font-weight: 600; }
.slk-nav__item--unread .slk-nav__hash { color: var(--fg-muted); }
.slk-nav__item--unread .slk-nav__badge { background: var(--primary); color: var(--primary-fg); font-weight: 600; }
.dark .slk-nav__item--unread .slk-nav__badge { background: var(--paciva-orange); color: #fff; }

/* ---- Slack threads (reply chains in the channel view) ---- */
.slk-thread { margin-top: 8px; }
.slk-thread__bar {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 5px 10px 5px 6px; border: 1px solid transparent; border-radius: var(--r-button);
  background: transparent; cursor: pointer; font-size: 12.5px; font-weight: 600;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.slk-thread__bar:hover { background: var(--surface); border-color: var(--border); }
.dark .slk-thread__bar:hover { background: var(--surface-raised); }
.slk-thread__avs { display: inline-flex; flex-shrink: 0; }
.slk-thread__av { width: 20px; height: 20px; border-radius: 5px; overflow: hidden; box-shadow: 0 0 0 1.5px var(--surface); }
.dark .slk-thread__av { box-shadow: 0 0 0 1.5px var(--surface-raised); }
.slk-thread__av:not(:first-child) { margin-left: -6px; }
.slk-thread__count { color: var(--linkedin-blue); }
.slk-thread__last { color: var(--fg-subtle); font-weight: 400; }
.slk-thread__chev { color: var(--fg-subtle); margin-left: auto; flex-shrink: 0; }
.slk-thread__replies {
  margin: 8px 0 2px 13px; padding-left: 15px; border-left: 2px solid var(--border);
  display: flex; flex-direction: column; gap: 13px;
}
.slk-reply { display: flex; gap: 9px; }
.slk-reply__av { flex-shrink: 0; }
.slk-reply__col { min-width: 0; }
.slk-reply__head { display: flex; align-items: baseline; gap: 7px; }
.slk-reply__author { font-weight: 700; font-size: 13px; color: var(--fg); }
.slk-reply__time { font-size: 11px; color: var(--fg-subtle); }
.slk-reply__text { font-size: 13.5px; color: var(--fg); line-height: 1.45; margin-top: 1px; }

/* ---- channel/group row hints in the message list ---- */
.mcard__groupbadge--unread { background: var(--accent-tint); color: var(--paciva-orange); font-weight: 600; }

/* ============================================================
   LinkedIn profile preview — hover card
   ============================================================ */
.li-hover { cursor: pointer; }
.li-pc-layer { position: fixed; inset: 0; z-index: 120; pointer-events: none; }
.li-pc {
  position: fixed; width: 308px; pointer-events: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-container); box-shadow: var(--shadow-overlay);
  overflow: hidden;
  animation: li-pc-in var(--dur-base) var(--ease-emphasis);
}
@keyframes li-pc-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.li-pc__cover { height: 56px; background: #0a66c2; position: relative; }
.dark .li-pc__cover { background: #0a66c2; }
/* LinkedIn mark on the cover band \u2014 a shade lighter than the strip so it reads
   as a quiet watermark, not a hard sticker. */
.li-pc__logo {
  position: absolute; top: 11px; right: 13px;
  display: inline-flex; color: #4e95e6;
  opacity: 0.95; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.12));
}
.li-pc__av {
  position: absolute; left: 16px; top: 56px; transform: translateY(-50%);
  border-radius: 50%; box-shadow: 0 0 0 3px var(--surface);
  display: inline-flex;
}
.li-pc__body { padding: 40px 16px 14px; }
.li-pc__namerow { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.li-pc__name {
  font-family: var(--font-display); font-weight: 800; font-size: 17px;
  letter-spacing: -0.01em; color: var(--fg); line-height: 1.2;
}
.li-pc__verified { color: var(--success-600); display: inline-flex; align-self: center; }
.li-pc__deg { font-size: 12.5px; font-weight: 500; color: var(--fg-subtle); }
.li-pc__head { margin-top: 5px; font-size: 13px; line-height: 1.4; color: var(--fg-muted); }
.li-pc__loc {
  margin-top: 6px; font-size: 12px; color: var(--fg-subtle);
  display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
}
.li-pc__dot { color: var(--fg-subtle); }
.li-pc__exp {
  margin-top: 12px; display: flex; align-items: center; gap: 9px;
  padding-top: 12px; border-top: 1px solid var(--border);
}
.li-pc__exp-tile {
  width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 11px;
}
.li-pc__exp-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.li-pc__exp-role { font-size: 12.5px; font-weight: 600; color: var(--fg); }
.li-pc__exp-org { font-size: 12px; color: var(--fg-muted); }
.li-pc__mutual {
  margin-top: 11px; display: flex; align-items: center; gap: 8px;
}
.li-pc__mutual--none { color: var(--fg-subtle); }
.li-pc__faces { display: inline-flex; }
.li-pc__face {
  width: 22px; height: 22px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--surface); margin-left: -7px;
}
.li-pc__face:first-child { margin-left: 0; }
.li-pc__mutual-text { font-size: 12px; color: var(--fg-muted); }
.li-pc__btns { margin-top: 14px; display: flex; gap: 8px; }
.li-pc__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: var(--r-pill);
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: background-color var(--dur-fast) var(--ease-standard);
}
.li-pc__btn--primary { background: #0a66c2; color: #fff; flex: 1; }
.li-pc__btn--primary:hover { background: #084e96; }
.li-pc__btn--ghost { background: transparent; color: var(--fg-muted); border-color: var(--border-strong); }
.li-pc__btn--ghost:hover { background: var(--paciva-tan-50); color: var(--fg); }
.dark .li-pc__btn--ghost:hover { background: var(--surface-raised); }
.li-pc__btn--pending { background: var(--paciva-tan-100); color: var(--fg-muted); flex: 1; cursor: default; }
.dark .li-pc__btn--pending { background: var(--surface-raised); }
.li-pc__pax {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 11.5px; line-height: 1.4; color: var(--fg-muted);
}
.li-pc__pax-mark { flex-shrink: 0; margin-top: 1px; color: var(--fg-subtle); }
.li-pc__pax--pacified .li-pc__pax-mark { color: var(--danger-600); }
.li-pc__pax--review .li-pc__pax-mark { color: var(--warning-600); }
.li-pc__pax--clean .li-pc__pax-mark { color: var(--success-600); }

/* ============================================================
   Compose window — Gmail-style pop-up
   ============================================================ */
.cw-host { position: fixed; inset: 0; z-index: 200; pointer-events: none; }
.cw-host--max { pointer-events: auto; }
.cw-backdrop { position: absolute; inset: 0; background: rgba(13,19,33,0.28); animation: cw-fade var(--dur-base) var(--ease-standard); }
@keyframes cw-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cw-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.cw {
  position: absolute; pointer-events: auto;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-overlay); overflow: hidden;
}
.cw--normal {
  right: 24px; bottom: 0; width: 488px; height: 580px; max-height: calc(100vh - 24px);
  border-radius: var(--r-container) var(--r-container) 0 0;
  animation: cw-rise var(--dur-base) var(--ease-emphasis);
}
/* drag-to-resize grip, top-left corner (window is anchored bottom-right) */
.cw__resize {
  position: absolute; top: 0; left: 0; width: 18px; height: 18px; z-index: 6;
  cursor: nwse-resize; color: var(--fg-subtle);
  display: flex; align-items: flex-start; justify-content: flex-start; padding: 4px;
}
.cw__resize svg { opacity: 0; transition: opacity var(--dur-fast); }
.cw:hover .cw__resize svg { opacity: 0.5; }
.cw__resize:hover svg { opacity: 0.9; }
.cw--min {
  right: 24px; bottom: 0; width: 320px; height: auto;
  border-radius: var(--r-container) var(--r-container) 0 0;
}
.cw--max {
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 80vw; height: 88vh;
  border-radius: var(--r-container);
  animation: cw-fade var(--dur-base) var(--ease-standard);
}

/* title bar */
.cw__bar {
  flex-shrink: 0; display: flex; align-items: center; gap: 2px;
  height: 48px; padding: 0 8px 0 18px; background: var(--surface); color: var(--fg);
  cursor: default;
}
.cw--min .cw__bar { cursor: pointer; border-bottom: 1px solid var(--border); background: var(--bg-subtle); }
.dark .cw--min .cw__bar { background: var(--surface); }
.cw__title { font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: -0.01em; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw__bar-spacer { flex: 1; }
.cw__barbtn {
  width: 30px; height: 30px; border: none; background: transparent; color: var(--fg-subtle);
  border-radius: 5px; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--dur-fast), color var(--dur-fast);
}
.cw__barbtn:hover { background: var(--paciva-tan-50); color: var(--fg); }
.dark .cw__barbtn:hover { background: var(--surface-raised); }

/* channel tabs */
.cw__tabs { flex-shrink: 0; display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.cw__tab {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px 11px;
  border: none; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 13.5px; font-weight: 500; color: var(--fg-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color var(--dur-fast);
}
.cw__tab:hover { color: var(--fg); }
.cw__tab.active { color: var(--fg); font-weight: 600; border-bottom-color: var(--paciva-orange); }

/* form */
.cw__form { flex: 1; overflow-y: auto; padding: 4px 0; display: flex; flex-direction: column; }
.cw-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 18px; border-bottom: 1px solid var(--border); }
.cw-row__label { flex-shrink: 0; width: 38px; padding-top: 7px; font-size: 13px; color: var(--fg-subtle); }
.cw-torow { position: relative; display: flex; align-items: flex-start; }
.cw-torow .cw-row { flex: 1; }
.cw-cclink {
  position: absolute; right: 18px; top: 14px; border: none; background: transparent;
  font-family: inherit; font-size: 12.5px; font-weight: 500; color: var(--fg-subtle); cursor: pointer;
}
.cw-cclink:hover { color: var(--paciva-orange); }

/* select */
.cw-select { position: relative; flex: 1; }
.cw-select select {
  width: 100%; appearance: none; -webkit-appearance: none;
  border: 1px solid var(--border); border-radius: var(--r-input); background: var(--bg);
  padding: 8px 36px 8px 12px; font-family: inherit; font-size: 13.5px; color: var(--fg);
  box-shadow: var(--shadow-input); cursor: pointer;
}
.cw-select__chev { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--fg-subtle); pointer-events: none; }

/* chip field */
.cw-chipfield {
  flex: 1; min-height: 38px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 4px 2px; cursor: text;
}
.cw-chipfield__input { flex: 1; min-width: 120px; border: none; outline: none; background: transparent; font-family: inherit; font-size: 13.5px; color: var(--fg); padding: 4px 0; }
.cw-chipfield__input::placeholder { color: var(--fg-subtle); }
.cw-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 6px 0 6px;
  background: var(--paciva-tan-50); border: 1px solid var(--border); border-radius: var(--r-pill);
  font-size: 12.5px; color: var(--fg); max-width: 100%;
}
.dark .cw-chip { background: var(--surface-raised); }
.cw-chip__av {
  width: 18px; height: 18px; border-radius: 50%; background: var(--paciva-ink); color: #fff;
  font-size: 8.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cw-chip__pre { font-weight: 700; color: var(--fg-muted); }
.cw-chip__x { border: none; background: transparent; color: var(--fg-subtle); cursor: pointer; display: inline-flex; padding: 0; }
.cw-chip__x:hover { color: var(--danger-600); }

/* typeahead */
.cw-suggest {
  position: absolute; left: 18px; right: 18px; top: calc(100% - 2px); z-index: 5;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  box-shadow: var(--shadow-pop); padding: 5px; max-height: 268px; overflow-y: auto;
}
.cw-suggest__item {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 9px; border: none;
  background: transparent; border-radius: 6px; cursor: pointer; text-align: left;
}
.cw-suggest__item:hover { background: var(--paciva-tan-50); }
.dark .cw-suggest__item:hover { background: var(--surface-raised); }
.cw-suggest__av {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: var(--paciva-tan-100); color: var(--fg); font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.dark .cw-suggest__av { background: var(--surface-raised); }
.cw-suggest__av--channel, .cw-suggest__av--dm { font-size: 15px; color: var(--fg-muted); }
.cw-suggest__txt { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.cw-suggest__name { font-size: 13px; font-weight: 500; color: var(--fg); }
.cw-suggest__deg { font-weight: 400; color: var(--fg-subtle); font-size: 12px; }
.cw-suggest__sub { font-size: 11.5px; color: var(--fg-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* subject */
.cw-row--line { padding: 0 18px; }
.cw-subject { width: 100%; border: none; outline: none; background: transparent; padding: 13px 0; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--fg); }
.cw-subject::placeholder { color: var(--fg-subtle); font-weight: 400; }

/* body */
.cw-bodywrap { flex: 1; display: flex; flex-direction: column; padding: 12px 18px 16px; }

/* Pax drafting panel — the one place the Paciva "AI is active" gradient wash is
   allowed. Front and center: it sits above the body so writing with Pax is the
   default path, not a buried button. */
.cw-pax {
  margin: 12px 18px 0; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: linear-gradient(118deg, var(--paciva-gradient-orange), var(--paciva-gradient-blue));
}
.dark .cw-pax { background: var(--surface-raised); border-color: var(--border); }
.cw-pax__head { display: flex; align-items: center; gap: 8px; }
.cw-pax__mark { display: inline-flex; flex-shrink: 0; }
.cw-pax__title { font-family: var(--font-display); font-weight: 800; font-size: 13.5px; letter-spacing: -0.005em; color: var(--fg); }
.cw-pax__hint { margin-left: auto; font-size: 11.5px; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-pax__actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.cw-pax__stepper { display: inline-flex; align-items: center; gap: 4px; }
.cw-pax__step {
  width: 22px; height: 22px; border: 1px solid var(--border); background: var(--surface); border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center; color: var(--fg-muted); cursor: pointer;
}
.cw-pax__step:hover:not(:disabled) { color: var(--fg); border-color: var(--border-strong); }
.cw-pax__step:disabled { opacity: 0.4; cursor: default; }
.cw-pax__stepnum { font-size: 11.5px; font-weight: 500; color: var(--fg-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cw-pax__link { display: inline-flex; align-items: center; gap: 4px; border: none; background: transparent; font-family: inherit; font-size: 12px; font-weight: 500; color: var(--fg-muted); cursor: pointer; }
.cw-pax__link:hover { color: var(--paciva-orange); }
.cw-pax__prompt { margin-top: 10px; display: flex; gap: 8px; }
.cw-pax__prompt input {
  flex: 1; min-width: 0; height: 36px; padding: 0 12px; border: 1px solid var(--border);
  border-radius: var(--r-input); background: var(--surface); font-family: inherit; font-size: 13px; color: var(--fg);
}
.cw-pax__prompt input::placeholder { color: var(--fg-subtle); }
.cw-pax__draft {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 15px;
  border: none; border-radius: var(--r-button); background: var(--paciva-orange); color: #fff;
  font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background var(--dur-fast);
}
.cw-pax__draft:hover { background: var(--paciva-orange-hover); }
.cw-pax__draft:disabled { opacity: 0.75; cursor: default; }
.cw-pax__spin {
  width: 13px; height: 13px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff; animation: cw-spin 0.7s linear infinite;
}
@keyframes cw-spin { to { transform: rotate(360deg); } }
.cw-pax__chips { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 6px; }
.cw-pax__chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: var(--r-pill);
  border: 1px solid var(--border); background: var(--surface); color: var(--fg-muted);
  font-family: inherit; font-size: 12px; font-weight: 500; cursor: pointer; transition: color var(--dur-fast), border-color var(--dur-fast);
}
.cw-pax__chip:hover { color: var(--fg); border-color: var(--border-strong); }
.cw-pax__chip:disabled { opacity: 0.5; cursor: default; }

.cw-body { flex: 1; min-height: 120px; border: none; outline: none; resize: none; background: transparent; font-family: var(--font-body); font-size: 14px; line-height: 1.55; color: var(--fg); }
.cw-body::placeholder { color: var(--fg-subtle); }
.cw-sig { margin-top: 16px; font-size: 13px; line-height: 1.5; color: var(--fg-muted); }
.cw-sig__name { font-weight: 600; color: var(--fg); }

/* attachments */
.cw-attachments { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.cw-attach {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px;
  border: 1px solid var(--border); border-radius: var(--r-card); background: var(--bg-subtle);
  font-size: 12.5px; color: var(--fg);
}
.cw-attach__name { font-weight: 500; }
.cw-attach__size { color: var(--fg-subtle); font-size: 11.5px; }
.cw-attach__x { border: none; background: transparent; color: var(--fg-subtle); cursor: pointer; display: inline-flex; padding: 0; }
.cw-attach__x:hover { color: var(--danger-600); }

/* footer */
.cw__foot { flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface); }
.cw-send {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 20px;
  border: none; border-radius: var(--r-button); background: var(--paciva-ink); color: #fff;
  font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer; transition: background var(--dur-fast);
}
.cw-send:hover { background: var(--paciva-ink-hover); }
.cw__tools { display: flex; align-items: center; gap: 2px; margin-left: 6px; }
.cw-tool {
  width: 34px; height: 34px; border: none; background: transparent; color: var(--fg-muted);
  border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.cw-tool:hover { background: var(--paciva-tan-50); color: var(--fg); }
.dark .cw-tool:hover { background: var(--surface-raised); }
.cw-tool.active { background: var(--paciva-tan-50); color: var(--fg); }
.cw-discard {
  margin-left: auto; width: 36px; height: 36px; border: none; background: transparent; color: var(--fg-subtle);
  border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.cw-discard:hover { background: var(--danger-tint); color: var(--danger-600); }

/* footer wrapper holds the optional formatting toolbar above the action row */
.cw__footwrap { flex-shrink: 0; }

/* Gmail-style formatting toolbar */
.cw-fmt {
  display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
  padding: 7px 14px; border-top: 1px solid var(--border); background: var(--bg-subtle);
}
.dark .cw-fmt { background: var(--surface-raised); }
.cw-fmt__sel { position: relative; display: inline-flex; }
.cw-fmt__sel select {
  appearance: none; -webkit-appearance: none; border: 1px solid var(--border); border-radius: 5px;
  background: var(--surface); padding: 5px 24px 5px 9px; font-family: inherit; font-size: 12.5px; color: var(--fg); cursor: pointer;
}
.cw-fmt__sel--sm select { padding-right: 22px; }
.cw-fmt__chev { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); color: var(--fg-subtle); pointer-events: none; }
.cw-fmt__div { width: 1px; height: 18px; background: var(--border); margin: 0 5px; }
.cw-fmt__btn {
  position: relative; width: 28px; height: 28px; border: none; background: transparent; color: var(--fg-muted);
  border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.cw-fmt__btn:hover { background: var(--paciva-tan-100); color: var(--fg); }
.dark .cw-fmt__btn:hover { background: rgba(255,255,255,0.08); }
.cw-fmt__btn.active { background: var(--paciva-ink); color: #fff; }
.cw-fmt__colorbar { position: absolute; left: 6px; right: 6px; bottom: 4px; height: 3px; border-radius: 2px; }
.cw-fmt__colorpick { position: relative; }
.cw-fmt__swatches {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-pop); z-index: 8;
}
.cw-fmt__swatch { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.12); cursor: pointer; padding: 0; }
.cw-fmt__swatch.active { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--paciva-orange); }

/* Pax + Calendly popmenus */
.cw-paxpick, .cw-calpick { position: relative; }
.cw-tool--pax { color: var(--fg); }
.cw-tool--pax:hover { background: var(--accent-tint); }
.cw-popmenu {
  position: absolute; bottom: calc(100% + 8px); left: 0; min-width: 220px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-pop);
  padding: 6px; z-index: 9;
}
.cw-popmenu--cal { left: auto; right: 0; }
.cw-popmenu__head { display: flex; align-items: center; gap: 7px; padding: 6px 8px 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-subtle); }
.cw-popmenu__item { width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 9px; border: none; background: transparent; border-radius: 6px; cursor: pointer; text-align: left; font-family: inherit; font-size: 13px; font-weight: 500; color: var(--fg); }
.cw-popmenu__item:hover { background: var(--paciva-tan-50); }
.dark .cw-popmenu__item:hover { background: var(--surface-raised); }
.cw-popmenu__item .icon, .cw-popmenu__item svg { color: var(--fg-muted); flex-shrink: 0; }
.cw-popmenu__item--two { flex-direction: column; align-items: flex-start; gap: 2px; }
.cw-popmenu__item--accent { color: var(--paciva-orange); font-weight: 600; }
.cw-popmenu__item--accent svg { color: var(--paciva-orange); }
.cw-popmenu__item--accent:hover { background: var(--accent-tint); }
.cw-popmenu__sep { height: 1px; background: var(--border); margin: 5px 4px; }
.cw-popmenu__lbl { font-size: 13px; font-weight: 500; color: var(--fg); }
.cw-popmenu__sub { font-size: 11.5px; font-weight: 400; color: var(--fg-subtle); }
.cw-cal__logo { width: 16px; height: 16px; border-radius: 4px; background: #006bff; color: #fff; font-weight: 800; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }

/* signature picker */
.cw-sigpick { position: relative; }
.cw-sigmenu {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: 248px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  box-shadow: var(--shadow-pop); padding: 6px;
}
.cw-sigmenu__head { padding: 6px 8px 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fg-subtle); }
.cw-sigmenu__item { width: 100%; display: flex; align-items: flex-start; gap: 8px; padding: 8px; border: none; background: transparent; border-radius: 6px; cursor: pointer; text-align: left; }
.cw-sigmenu__item:hover { background: var(--paciva-tan-50); }
.dark .cw-sigmenu__item:hover { background: var(--surface-raised); }
.cw-sigmenu__radio { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; color: var(--paciva-orange); display: inline-flex; align-items: center; justify-content: center; }
.cw-sigmenu__label { display: block; font-size: 13px; font-weight: 500; color: var(--fg); }
.cw-sigmenu__sub { display: block; font-size: 11.5px; color: var(--fg-subtle); }

@media (max-width: 560px) {
  .cw--normal, .cw--min { right: 0; left: 0; width: auto; }
}

/* ============================================================
   EMBEDDING SAFETY — restores the full-height the sidebar had as
   a CSS-grid item when it is mounted inside a DC x-import wrapper.
   No visual/behavioral change to the sidebar itself.
   ============================================================ */
.app { display: flex; }
.app > .sc-host-x { flex-shrink: 0; display: block; }
.app .sidebar { height: 100%; width: 100%; }

/* Defense Center — thin, strokeless range sliders */
.dc-slider { -webkit-appearance: none; appearance: none; height: 4px; border-radius: 999px; background: var(--bg-muted); outline: none; padding: 0; }
.dc-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--primary); border: none; cursor: pointer; }
.dc-slider::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--primary); border: none; cursor: pointer; }
.dc-slider::-moz-range-track { height: 4px; border-radius: 999px; background: var(--bg-muted); }
.dc-slider:focus-visible { outline: 2px solid var(--paciva-orange); outline-offset: 3px; }

/* Defense Center — clickable stat cell hover */
.dc-statbtn { transition: background var(--dur-fast) var(--ease-standard); }
.dc-statbtn:hover { background: var(--paciva-tan-50); }
.dark .dc-statbtn:hover { background: var(--surface-raised); }

/* Defense Center — LinkedIn profile preview on avatar hover (unified-inbox li-pc card) */
.dc-liwrap { position: relative; display: inline-flex; }
.dc-lipop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 200; width: 308px; opacity: 0; visibility: hidden; transform: translateY(4px); transition: opacity var(--dur-fast) var(--ease-standard), transform var(--dur-fast) var(--ease-standard); pointer-events: none; }
.dc-liwrap:hover .dc-lipop { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
