/* ═══════════════════════════════════════════════════════════════════
   Nexus Dashboard: M1 rooms (shell, room kit, Campaigns, CRM, Social)

   Linked right after dashboard.css in BOTH hosts. Every new class is prefixed
   os-. Colours come only from the tokens on :root in dashboard.css, mapped by
   property: text from --text-1..4, --accent and --status-*; borders from
   --border, --border-strong, --chip-border, --pane-border, --accent-line and
   --status-*; fills from --bg-0..3, --pane-bg and the *-soft and *-wash tokens.

   Hosted-only presentation sits behind body[data-nexus-app]; the extension
   page keeps its existing top bar and sidebar look.

   Sections, so the four screen builders each append in their own block:
     1. Top bar           4. Room kit components
     2. Sidebar           5. Campaigns room       (dashboard-campaigns-room.js)
     3. Room chrome       6. CRM map and dossier  (dashboard-crm-map.js)
                          7. Social room          (dashboard-social-room.js)
                          8. Requests             (dashboard-requests-view.js)
                          9. Review queue         (dashboard-crm-review.js)
                          10. Client invoices      (dashboard-client-command-center.js)
                          11. Knowledge map        (dashboard-knowledge-map.js)
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. Top bar ─────────────────────────────────────────────────── */
.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-1);
  text-decoration: none;
  flex: none;
}
.topbar-brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
.os-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-ink);
}
.os-brand-text {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}
.os-brand-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-1);
}
.os-brand-sub {
  font-size: 11px;
  color: var(--text-3);
}
.topbar-action .i {
  flex: none;
}
.os-topbar-search .topbar-action-label {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--status-idle);
  flex: none;
}
#topbar-research-btn[data-state="active"] .os-pill-dot {
  background: var(--status-ok);
}
#topbar-research-btn[data-state="setup"] .os-pill-dot {
  background: var(--status-warn);
}
#topbar-research-btn[data-state="unknown"] .os-pill-dot,
#topbar-research-btn[data-state="failing"] .os-pill-dot {
  background: var(--status-bad);
}
#topbar-research-btn[data-state="degraded"] .os-pill-dot {
  background: var(--status-warn);
}
.os-pill-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
}
.os-pill-count[hidden],
#topbar-research-btn[hidden] {
  display: none;
}
.os-avatar-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  justify-content: center;
  border-radius: var(--radius-full);
}
.os-avatar-initials {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-1);
}
.os-avatar-menu {
  min-width: 280px;
}
.os-avatar-who {
  padding: 8px 12px 6px;
}
.os-avatar-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  overflow-wrap: anywhere;
}
.os-avatar-sub {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-3);
  overflow-wrap: anywhere;
}
.os-avatar-menu button.topbar-account-menu-item {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
}
.os-avatar-menu .topbar-account-menu-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* Workspace switcher rows: the name switches (double-click renames), then a
   pencil and a cross. The row holds real buttons, so it keeps no padding of
   its own and the name button fills it. */
.topbar-account-menu-item.topbar-ws-row {
  padding: 0 4px 0 0;
  gap: 2px;
  cursor: default;
}
.topbar-ws-switch {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.topbar-ws-text {
  display: block;
  min-width: 0;
}
.topbar-ws-name {
  display: block;
  overflow-wrap: anywhere;
}
.topbar-ws-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}
.topbar-ws-icon:hover {
  border-color: var(--border-strong);
  color: var(--text-1);
}
.topbar-ws-delete:not(.is-off):hover {
  color: var(--status-bad);
}
.topbar-ws-icon.is-off {
  color: var(--text-4);
  cursor: not-allowed;
}
.topbar-ws-icon.is-off:hover {
  border-color: transparent;
  color: var(--text-4);
}
.topbar-ws-switch:focus-visible,
.topbar-ws-icon:focus-visible,
.toast-action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.topbar-ws-edit {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px 6px 0;
}
.topbar-ws-rename-input {
  width: 100%;
  box-sizing: border-box;
}
.topbar-ws-rename-input[aria-invalid="true"] {
  border-color: var(--status-bad);
}
.topbar-ws-rename-hint {
  font-size: 11px;
  line-height: 1.3;
  color: var(--text-3);
}
/* Recently deleted: archived workspaces an owner can still restore. */
.topbar-ws-deleted {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 12px;
  font-size: 13px;
  color: var(--text-2);
}
.topbar-ws-deleted .topbar-ws-text {
  flex: 1;
}
.topbar-ws-confirm {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}
/* The Undo in a toast: a real button, so a keyboard can reach it. */
.toast-action {
  flex: 0 0 auto;
  padding: 2px 8px;
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* Hosted top bar: the target layout. The extension keeps its own bar. */
body[data-nexus-app] .topbar {
  height: var(--topbar-h);
  background: var(--bg-0);
  border-bottom: 1px solid var(--border-strong);
  padding: 0 16px 0 20px;
  gap: 16px;
}
body[data-nexus-app] .topbar-left {
  gap: 16px;
  flex: 1;
  min-width: 0;
}
body[data-nexus-app] .topbar-brand {
  padding-right: 16px;
  border-right: 1px solid var(--border-strong);
}
body[data-nexus-app] .topbar-action {
  height: 34px;
  padding: 0 12px;
  background: var(--bg-0);
  border-color: var(--border-strong);
  color: var(--text-1);
  font-size: 13px;
  gap: 8px;
}
body[data-nexus-app] .topbar-action:hover {
  background: var(--bg-2);
  border-color: var(--text-4);
}
body[data-nexus-app] .topbar-action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
body[data-nexus-app] #topbar-ws-btn {
  min-width: 160px;
  justify-content: space-between;
  font-weight: 500;
}
body[data-nexus-app] .os-topbar-search {
  flex: 1 1 420px;
  max-width: 460px;
  min-width: 0;
  color: var(--text-3);
}
body[data-nexus-app] .os-topbar-search .topbar-action-kbd {
  background: var(--bg-2);
  color: var(--text-3);
  border-color: var(--border-strong);
  font-family: var(--font-mono);
}
/* For someone who cannot change it, the outbound pill is a status ("Outbound
   paused"), not a dead control: it keeps the pill's own fill, edge and ink,
   with no hover and no pointer. */
body[data-nexus-app] #topbar-outbound-btn:disabled,
body[data-nexus-app] #topbar-outbound-btn:disabled:hover {
  cursor: default;
  background: var(--bg-0);
  border-color: var(--border-strong);
  color: var(--text-1);
}
body[data-nexus-app] #topbar-notif-btn {
  width: 34px;
  padding: 0;
  justify-content: center;
  border-color: transparent;
  background: transparent;
}
body[data-nexus-app] #topbar-notif-btn .topbar-badge {
  position: absolute;
  top: -2px;
  right: -4px;
}
/* Kept in the DOM for the scripts that write them, but not part of the target
   bar: the route title, the runtime chip (its content is in the avatar menu),
   the connection pill and the manual refresh. */
body[data-nexus-app] #topbar-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
body[data-nexus-app] .topbar-runtime-wrap,
body[data-nexus-app] #status-pill,
body[data-nexus-app] #refresh-btn {
  display: none;
}
/* Full permission mode is the one state worth a chip in the bar. */
body[data-nexus-app] #topbar-permission-mode:not([data-mode="full"]) {
  display: none;
}
@media (max-width: 1180px) {
  body[data-nexus-app] .os-brand-sub,
  body[data-nexus-app] .os-topbar-search .topbar-action-kbd {
    display: none;
  }
  body[data-nexus-app] #topbar-ws-btn {
    min-width: 0;
  }
}
@media (max-width: 960px) {
  body[data-nexus-app] .os-topbar-search {
    flex: 0 0 auto;
  }
  body[data-nexus-app] .os-topbar-search .topbar-action-label,
  body[data-nexus-app] #topbar-browsers-btn .topbar-action-label {
    display: none;
  }
}
@media (max-width: 600px) {
  body[data-nexus-app] .topbar {
    height: auto;
    padding: 8px 12px;
  }
  body[data-nexus-app] .topbar-brand {
    padding-right: 0;
    border-right: 0;
  }
  body[data-nexus-app] .os-brand-name {
    font-size: 15px;
  }
  body[data-nexus-app] #topbar-research-btn .topbar-action-label,
  body[data-nexus-app] #topbar-outbound-btn .topbar-action-label {
    display: none;
  }
  .topbar-avatar-wrap {
    position: static;
  }
  .topbar-avatar-wrap .topbar-account-menu {
    left: 12px;
    right: 12px;
    min-width: 0;
  }
}

/* ── 2. Sidebar (hosted) ─────────────────────────────────────────── */
.os-ws {
  padding: 4px 16px 16px;
}
.os-ws-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  overflow-wrap: anywhere;
}
.os-ws-kind {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-3);
}
.os-nav-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-2);
}
.os-nav-count[hidden] {
  display: none;
}
.os-nav-divider {
  height: 1px;
  margin: 8px 16px;
  background: var(--border-strong);
}
.os-nav-spacer {
  flex: 1;
}
body[data-nexus-app] .sidebar.sidebar-v3 {
  background: var(--bg-0);
  border-right-color: var(--border-strong);
}
/* On a phone the sidebar is a full-width bar above the page, from 701 to
   880px a 52px icon rail and from 881 to 1024px a 170px labelled column
   (dashboard.css). A fixed width here, loaded later at the same specificity,
   overrode all three: it squeezed the phone bar into a 200px column, and
   widened the icon rail to 200px with its labels still hidden. */
@media (min-width: 1025px) {
  body[data-nexus-app] .sidebar.sidebar-v3 {
    width: var(--sidebar-w);
  }
}
body[data-nexus-app] .sidebar.sidebar-v3 > nav {
  border-top: 0;
}
body[data-nexus-app] .sidebar.sidebar-v3 .nav-kbd {
  display: none;
}
body[data-nexus-app] .sidebar.sidebar-v3 .nav-item {
  min-height: 36px;
  margin: 0;
  padding: 8px 8px;
  gap: 8px;
  color: var(--text-1);
  font-size: 14px;
}
body[data-nexus-app] .sidebar.sidebar-v3 .nav-label {
  white-space: nowrap;
  overflow: clip;
  text-overflow: ellipsis;
}
body[data-nexus-app] .sidebar.sidebar-v3 .nav-item .nav-icon {
  opacity: 1;
  color: var(--text-2);
}
body[data-nexus-app] .sidebar.sidebar-v3 .nav-item.active {
  background: var(--accent-wash);
  color: var(--accent);
}
body[data-nexus-app] .sidebar.sidebar-v3 .nav-item.active .nav-icon {
  color: var(--accent);
}
body[data-nexus-app] .sidebar.sidebar-v3 .nav-item.active::before,
body[data-nexus-app] .sidebar.sidebar-v3 .nav-item-primary.active::before {
  display: none;
}
body[data-nexus-app] .sidebar.sidebar-v3 .os-nav-bottom {
  padding-top: 8px;
  border-top: 1px solid var(--border-strong);
  margin: 0 8px;
}
/* Supporting destinations live in the tools disclosure only on a phone. It
   hides only once dashboard.js has moved them out (.sidebar-v3-compact gone):
   hidden at the resize itself, a focused link inside it would lose focus. */
@media (min-width: 701px) {
  body[data-nexus-app] .sidebar.sidebar-v3:not(.sidebar-v3-compact) .workspace-tools {
    display: none;
  }
}
@media (max-width: 1024px) {
  body[data-nexus-app] .sidebar.sidebar-v3 .os-ws,
  body[data-nexus-app] .sidebar.sidebar-v3 .os-nav-count {
    display: none;
  }
}
@media (min-width: 881px) and (max-width: 1024px) {
  body[data-nexus-app] .sidebar.sidebar-v3 .os-ws {
    display: block;
  }
}

/* ── 3. Room chrome: breadcrumb, header, tabs ───────────────────── */
.os-room {
  min-width: 0;
}
.os-room-chrome {
  display: block;
}
.os-room-header {
  margin-bottom: 12px;
}
.os-crumbs {
  min-width: 0;
}
.os-crumbs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  font-size: 13px;
}
.os-crumbs-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
}
.os-crumbs-item + .os-crumbs-item::before {
  content: "/";
  color: var(--text-4);
}
.os-crumb {
  color: var(--text-2);
  text-decoration: none;
}
a.os-crumb:hover {
  color: var(--text-1);
  text-decoration: underline;
}
.os-crumb[aria-current="page"] {
  color: var(--text-1);
  font-weight: 500;
}
.os-room-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.os-room-titles {
  min-width: 0;
}
.os-room-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.os-room-title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-1);
}
.os-room-subtitle {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-2);
}
.os-room-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.os-tabs {
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.os-tabs .tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
}
.os-tabs .tab.active {
  color: var(--text-1);
  font-weight: 600;
}
.os-tabs .tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.os-tab-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

/* ── 4. Room kit components ─────────────────────────────────────── */
.os-segmented {
  display: inline-flex;
  gap: 4px;
  padding: 2px;
}
.os-seg {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}
.os-seg:hover {
  color: var(--text-1);
}
.os-seg-active {
  background: var(--bg-2);
  border-color: var(--border-strong);
  color: var(--text-1);
}
.os-seg:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.os-seg:disabled {
  cursor: not-allowed;
  color: var(--text-4);
}
.os-select-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 32px 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-0);
  font-size: 13px;
  min-width: 0;
}
.os-select-pill:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.os-select-label {
  color: var(--text-2);
  white-space: nowrap;
}
.os-select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
  max-width: 260px;
  border: 0;
  background: transparent;
  color: var(--text-1);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  outline: none;
}
.os-select option {
  background: var(--bg-1);
  color: var(--text-1);
}
.os-select-caret {
  position: absolute;
  right: 10px;
  display: inline-flex;
  color: var(--text-2);
  pointer-events: none;
}
.os-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid var(--chip-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}
.os-chip-ok {
  border-color: var(--status-ok);
  background: var(--status-ok-soft);
  color: var(--status-ok);
}
.os-chip-warn {
  border-color: var(--status-warn);
  background: var(--status-warn-soft);
  color: var(--status-warn);
}
.os-chip-bad {
  border-color: var(--status-bad);
  background: var(--status-bad-soft);
  color: var(--status-bad);
}
.os-chip-neutral {
  border-color: var(--border-strong);
  color: var(--text-2);
}
.os-chip-tag {
  border-color: var(--accent-line);
  color: var(--accent);
}
.os-pane {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--pane-border);
  border-radius: var(--radius-md);
  background: var(--pane-bg);
}
.os-pane-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.os-pane-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
}
.os-pane-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}
.os-pane-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.os-pane-body {
  min-width: 0;
  padding: 12px 16px;
}
.os-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  background: var(--bg-2);
  color: var(--text-1);
  font-size: 12px;
  font-weight: 600;
}
.os-avatar-square {
  border-radius: var(--radius-sm);
}
.os-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-1);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.os-row:hover {
  background: var(--bg-2);
}
.os-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.os-row-selected,
.os-row-selected:hover {
  border-color: var(--accent-line);
  background: var(--accent-wash);
}
.os-row-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.os-row-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.os-row-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}
.os-row-meta {
  flex: none;
  font-size: 12px;
  color: var(--text-3);
}
.os-row-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--text-2);
}
.os-row-trailing {
  flex: none;
  align-self: flex-end;
  color: var(--text-3);
}
.os-kv {
  display: grid;
  grid-template-columns: minmax(96px, max-content) 1fr;
  gap: 8px 16px;
  margin: 0;
  font-size: 13px;
}
.os-kv-label {
  color: var(--text-3);
}
.os-kv-value {
  margin: 0;
  min-width: 0;
  color: var(--text-1);
  overflow-wrap: anywhere;
}
.os-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}
.os-timeline-item {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 0 0 16px;
}
.os-timeline-item + .os-timeline-item::before {
  content: "";
  position: absolute;
  left: 4px;
  top: -14px;
  height: 14px;
  width: 1px;
  background: var(--border-strong);
}
.os-timeline-dot {
  flex: none;
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-full);
  background: var(--accent-wash);
}
.os-timeline-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.os-timeline-when {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-3);
}
.os-timeline-title {
  font-size: 13px;
  color: var(--text-1);
}
.os-timeline-detail {
  font-size: 12px;
  color: var(--text-2);
  overflow-wrap: anywhere;
}
.os-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--text-2);
}
.os-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.os-legend-swatch {
  display: inline-block;
  width: 22px;
  height: 0;
  border-top: 2px solid var(--map-edge);
}
.os-legend-dashed {
  border-top-style: dashed;
}
.os-legend-dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--accent);
}
.os-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}
.os-icon-btn:hover {
  background: var(--bg-2);
  color: var(--text-1);
}
.os-icon-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.os-icon-btn:disabled {
  cursor: not-allowed;
  color: var(--text-4);
}
.os-menu {
  position: relative;
  display: inline-block;
}
.os-menu > summary {
  list-style: none;
}
.os-menu > summary::-webkit-details-marker {
  display: none;
}
.os-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  cursor: pointer;
}
.os-menu-trigger:hover,
.os-menu[open] > .os-menu-trigger {
  background: var(--bg-2);
  border-color: var(--border-strong);
  color: var(--text-1);
}
.os-menu-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.os-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  min-width: 220px;
  padding: 4px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-1);
  box-shadow: var(--shadow-menu);
}
.os-menu-item {
  display: block;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-1);
  font: inherit;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.os-menu-item:hover {
  background: var(--bg-3);
}
.os-menu-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.os-menu-item:disabled {
  cursor: not-allowed;
  color: var(--text-3);
}
.os-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 40px 24px;
  text-align: center;
}
.os-empty-icon {
  display: inline-flex;
  color: var(--text-3);
}
.os-empty-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
}
.os-empty-hint {
  margin: 0;
  max-width: 520px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}
.os-empty-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}
/* Company Knowledge's view body (dashboard-company-knowledge.js) had no rule. */
.knowledge-body {
  min-width: 0;
}
.os-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── 5. Campaigns room (dashboard-campaigns-room.js) ─────────────── */
.os-campaigns-room,
.os-ideas-room,
.os-portfolio-room,
.os-experiments-room {
  min-width: 0;
}

/* Ideas & strategies: filters, rail, table, detail, footer. The room is one
   screen: the header, filters and footer take their own height and the body
   takes the rest, however many rows the filters wrap to. */
.os-ideas-room {
  display: flex;
  flex-direction: column;
  height: max(600px, calc(100vh - var(--topbar-h) - 44px));
}
/* The content area's 80px bottom padding would push the footer off a
   one-screen room. Only where the room is one screen. */
@media (min-width: 1101px) {
  #content-wrap:has(.os-ideas-room) {
    padding-bottom: 20px;
  }
}
.os-ideas-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.os-ideas-filters-main,
.os-ideas-filters-side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.os-ideas-filters-main .os-select-pill {
  min-width: 200px;
}
/* A native select is as wide as its longest option; a teammate's long email
   in Owner must not push the filters onto a second row. */
.os-ideas-filters-side .os-select {
  max-width: 120px;
  text-overflow: ellipsis;
}
.os-ideas-body {
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr) clamp(320px, 25vw, 400px);
  gap: 12px;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
  /* The table and the detail scroll inside; the page does not. */
  min-height: 360px;
}
.os-ideas-rail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  overflow-y: auto;
}
.os-ideas-rail-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.os-ideas-rail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.os-ideas-rail-item:hover {
  color: var(--text-1);
  background: var(--bg-2);
}
.os-ideas-rail-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.os-ideas-rail-active,
.os-ideas-rail-active:hover {
  color: var(--text-1);
  background: var(--bg-2);
  font-weight: 500;
}
.os-ideas-rail-icon {
  display: inline-flex;
  color: var(--text-3);
}
.os-ideas-rail-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-ideas-rail-count {
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.os-ideas-rail-heading {
  margin: 16px 8px 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.os-ideas-rail-select {
  display: none;
}
.os-ideas-card {
  container: os-ideas-card / inline-size;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--pane-border);
  border-radius: var(--radius-md);
  background: var(--pane-bg);
  overflow: hidden;
}
.os-ideas-card .skeleton-row {
  margin: 10px 12px;
}
.os-ideas-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.os-ideas-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.os-ideas-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--pane-bg);
  padding: 8px;
  height: 40px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
.os-ideas-table td {
  padding: 8px;
  border-top: 1px solid transparent;
  border-bottom: 1px solid var(--border);
  color: var(--text-1);
  vertical-align: middle;
}
.os-ideas-row {
  cursor: pointer;
}
.os-ideas-row:hover td {
  background: var(--bg-2);
}
.os-ideas-row-selected td,
.os-ideas-row-selected:hover td {
  border-top-color: var(--accent-line);
  border-bottom-color: var(--accent-line);
  background: var(--accent-wash);
}
.os-ideas-row-selected td:first-child {
  border-left: 1px solid var(--accent-line);
}
.os-ideas-row-selected td:last-child {
  border-right: 1px solid var(--accent-line);
}
.os-ideas-check-cell {
  width: 36px;
}
.os-ideas-check {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.os-ideas-name {
  display: block;
  max-width: 210px;
  padding: 8px 0;
  margin-block: -8px;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: var(--text-1);
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
/* The trigger and channels under the name, only while their own columns
   are hidden. */
.os-ideas-name-sub {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 1px;
  color: var(--text-2);
  font-size: 12px;
  line-height: 16px;
}
.os-ideas-name-trigger {
  display: none;
}
.os-ideas-name-channels {
  display: none;
}
.os-ideas-name:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.os-ideas-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  margin-block: -8px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.os-ideas-sort:hover {
  color: var(--text-1);
}
.os-ideas-sort:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.os-ideas-sort-mark {
  display: inline-flex;
}
.os-ideas-sort-up {
  transform: rotate(180deg);
}
.os-ideas-muted {
  color: var(--text-2);
}
.os-ideas-channels {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  color: var(--text-2);
  font-size: 12px;
}
.os-ideas-channel {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
/* Channels are named in words: the X and LinkedIn glyphs alone were hard to
   tell apart at this size. The names wrap within the cell when it is narrow. */
.os-ideas-channel-icon {
  display: none;
}
.os-ideas-channel-name {
  white-space: nowrap;
}
/* Below 700px the Trigger column moves under the strategy name, so the
   Readiness column never scrolls out of view. */
@container os-ideas-card (max-width: 699px) {
  .os-ideas-trigger-cell {
    display: none;
  }
  .os-ideas-name-sub,
  .os-ideas-name-trigger {
    display: flex;
  }
}
/* Below 560px the channels join it, and long names give way first. */
@container os-ideas-card (max-width: 559px) {
  .os-ideas-channels-cell {
    display: none;
  }
  .os-ideas-name-channels {
    display: inline-flex;
  }
  .os-ideas-name {
    max-width: 180px;
  }
}
.os-ideas-detail {
  container: os-ideas-detail / inline-size;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--pane-border);
  border-radius: var(--radius-md);
  background: var(--pane-bg);
}
.os-ideas-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.os-ideas-detail-title {
  margin: 0;
  color: var(--text-1);
  font-size: 17px;
  font-weight: 600;
}
.os-ideas-detail-body {
  flex: 1;
  min-height: 0;
  padding: 4px 16px 8px;
  overflow-y: auto;
}
.os-ideas-section {
  padding: 8px 0 4px;
}
.os-ideas-section-label {
  margin: 0 0 8px;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.os-ideas-text {
  margin: 0;
  color: var(--text-1);
  font-size: 13px;
  line-height: 1.5;
}
.os-ideas-list {
  margin: 0;
  padding-left: 16px;
  color: var(--text-1);
  font-size: 13px;
  line-height: 1.6;
}
.os-ideas-list-numbered {
  padding-left: 20px;
}
.os-ideas-evidence {
  margin-top: 8px;
  border-top: 1px solid var(--border);
}
.os-ideas-evidence-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.os-ideas-evidence-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.os-ideas-evidence-icon {
  display: inline-flex;
  color: var(--text-3);
}
/* "open CRM map" in the Evidence heading reads as a link, not a caption. */
.os-ideas-evidence-map {
  color: var(--accent);
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
}
.os-ideas-evidence-map:hover {
  text-decoration: underline;
}
.os-ideas-evidence-link {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--text-1);
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}
a.os-ideas-evidence-link:hover {
  text-decoration: underline;
}
.os-ideas-evidence-out {
  width: 26px;
  height: 26px;
}
.os-ideas-notice {
  margin: 0 14px 8px;
  font-size: 13px;
}
.os-ideas-notice-ok {
  color: var(--status-ok);
}
.os-ideas-notice-bad {
  color: var(--status-bad);
}
.os-ideas-notice-link {
  margin-left: 8px;
  color: var(--accent);
}
.os-ideas-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 8px;
  border-top: 1px solid var(--border);
  background: var(--pane-bg);
}
.os-ideas-viewer-note {
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
}
/* Two full-width buttons stacked in a narrow panel; one row once it fits. */
.os-ideas-action-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.os-ideas-action-row > .btn,
.os-ideas-action-row > .os-ideas-pick > .btn {
  width: 100%;
}
@container os-ideas-detail (min-width: 340px) {
  .os-ideas-action-row {
    flex-direction: row;
    justify-content: flex-end;
  }
  .os-ideas-action-row > *,
  .os-ideas-action-row > .btn,
  .os-ideas-action-row > .os-ideas-pick > .btn {
    flex: 0 0 auto;
    width: auto;
  }
  /* The first button carries a campaign name; it gives way, never the row. */
  .os-ideas-action-row > :first-child {
    flex: 0 1 auto;
    min-width: 0;
  }
  .os-ideas-action-row > .btn:first-child,
  .os-ideas-action-row > .os-ideas-pick > .btn {
    display: block;
    width: auto;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
.os-ideas-pick {
  position: relative;
}
.os-ideas-pick > summary {
  list-style: none;
}
.os-ideas-pick > summary::-webkit-details-marker {
  display: none;
}
.os-ideas-pick-list {
  right: auto;
  left: 0;
  top: auto;
  bottom: calc(100% + 6px);
}
.os-ideas-pick-empty {
  margin: 0;
  padding: 8px 10px;
  color: var(--text-2);
  font-size: 13px;
}
.os-ideas-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.os-ideas-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding: 12px 2px 0;
  border-top: 1px solid var(--border);
  color: var(--text-3);
  font-size: 13px;
}
.os-ideas-footer-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.os-ideas-footer-count {
  font-variant-numeric: tabular-nums;
}
.os-ideas-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.os-ideas-field,
.os-ideas-fieldset {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}
.os-ideas-field-label {
  padding: 0;
  color: var(--text-2);
  font-size: 13px;
}
.os-ideas-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-0);
  color: var(--text-1);
  font: inherit;
}
.os-ideas-check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-1);
  font-size: 13px;
}
.os-ideas-form-status {
  min-height: 1em;
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
}
.os-ideas-form-actions {
  display: flex;
  gap: 8px;
}

/* Portfolio and Experiments tables. */
.os-portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.os-portfolio-search {
  min-width: 240px;
  max-width: 360px;
}
.os-portfolio-table {
  min-width: 0;
  margin-bottom: 16px;
  overflow-x: auto;
  border: 1px solid var(--pane-border);
  border-radius: var(--radius-md);
  background: var(--pane-bg);
}
.os-portfolio-table .os-empty,
.os-portfolio-table .skeleton-row {
  margin: 12px;
}
.os-portfolio-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.os-portfolio-grid th {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
.os-portfolio-grid td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-1);
  vertical-align: top;
}
.os-portfolio-row {
  cursor: pointer;
}
.os-portfolio-row:hover td {
  background: var(--bg-2);
}
.os-portfolio-name {
  color: var(--text-1);
  font-weight: 600;
  text-decoration: none;
}
.os-portfolio-name:hover {
  text-decoration: underline;
}
.os-portfolio-sub {
  display: block;
  margin-top: 2px;
  color: var(--text-3);
  font-size: 12px;
}
.os-portfolio-more {
  margin-bottom: 12px;
  padding: 0 14px;
  border: 1px solid var(--pane-border);
  border-radius: var(--radius-md);
  background: var(--pane-bg);
}
.os-portfolio-more[open] {
  padding-bottom: 14px;
}
.os-portfolio-more-summary {
  padding: 12px 0;
  color: var(--text-1);
  font-weight: 500;
  cursor: pointer;
}
.os-portfolio-more-hint {
  margin: 0 0 10px;
  color: var(--text-2);
  font-size: 13px;
}
.os-portfolio-tools-tabs {
  margin-bottom: 10px;
}
.os-experiment-variants {
  margin: 10px 0;
}
.os-experiment-result {
  margin-bottom: 16px;
}

@media (max-width: 1100px) {
  .os-ideas-room {
    height: auto;
  }
  .os-ideas-body {
    grid-template-columns: 170px minmax(0, 1fr);
    min-height: 0;
  }
  .os-ideas-table-wrap {
    max-height: 70vh;
  }
  .os-ideas-detail {
    grid-column: 1 / -1;
  }
}
@media (max-width: 760px) {
  .os-ideas-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .os-ideas-rail-group,
  .os-ideas-rail-heading {
    display: none;
  }
  .os-ideas-rail-select {
    display: block;
  }
  .os-ideas-filters-main .os-select-pill {
    min-width: 0;
  }
  .os-ideas-table thead,
  .os-ideas-channels-cell {
    display: none;
  }
  .os-ideas-table tr {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    border-bottom: 1px solid var(--border);
  }
  .os-ideas-table td {
    padding: 8px 8px;
    border: 0;
  }
  .os-ideas-table td:nth-child(3),
  .os-ideas-table td:nth-child(4) {
    grid-column: 2 / -1;
    padding-top: 0;
  }
  .os-ideas-table td:nth-child(6) {
    grid-column: 3;
    grid-row: 1;
  }
  .os-portfolio-search {
    min-width: 0;
    width: 100%;
    max-width: none;
  }
}

/* ── 6. CRM map and dossier (dashboard-crm-map.js), prefix os-map- ─ */
.os-map-room {
  min-width: 0;
}
.os-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 16px;
}
.os-map-network-link {
  flex: none;
}
.os-map-toolbar-segment {
  display: contents;
}
.os-map-search {
  position: relative;
  flex: 1 1 260px;
  min-width: 200px;
  display: flex;
  align-items: center;
  height: 34px;
  padding: 0 8px;
  gap: 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-0);
}
.os-map-search:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.os-map-search-icon {
  display: inline-flex;
  color: var(--text-3);
}
.os-map-search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--text-1);
  font: inherit;
  font-size: 13px;
  outline: none;
}
.os-map-search-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  padding: 4px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-1);
}
.os-map-search-results[hidden] {
  display: none;
}
.os-map-search-result {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-1);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.os-map-search-result:hover,
.os-map-search-result:focus-visible {
  background: var(--bg-2);
  outline: none;
}
.os-map-search-name {
  font-weight: 500;
}
.os-map-segments,
.os-map-entities,
.os-map-edge-slot {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.os-map-search-sub {
  font-size: 12px;
  color: var(--text-3);
}
.os-map-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: stretch;
  height: max(520px, calc(100vh - var(--topbar-h) - 262px));
}
.os-map-full .os-map-grid {
  grid-template-columns: minmax(0, 1fr);
}
.os-map-full .os-map-side,
.os-map-full .os-map-dossier {
  display: none;
}
.os-map-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  min-height: 0;
}
.os-map-segments-pane .os-pane-body,
.os-map-entities-pane .os-pane-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
}
.os-map-entities-pane {
  flex: 1;
  min-height: 0;
}
.os-map-entities-pane .os-pane-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.os-map-seg-icon {
  display: inline-flex;
  margin-top: 1px;
  color: var(--text-2);
}
.os-row-selected .os-map-seg-icon {
  color: var(--accent);
}
.os-map-seg-count {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}
/* Saved segments sit close, as in the target; the selected one is a wash. */
.os-map-segments .os-row {
  align-items: center;
  padding: 4px 8px;
  line-height: 1.35;
  min-height: 32px;
}
.os-map-segments .os-row-main {
  gap: 0;
}
.os-map-segments .os-map-seg-icon {
  margin-top: 0;
}
.os-map-segments .os-row-trailing {
  align-self: center;
}
.os-map-segments .os-row-selected,
.os-map-segments .os-row-selected:hover {
  border-color: transparent;
}
/* The selected entity is the whole row, its menu inside the outline. */
.os-map-entity {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-right: 4px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
}
.os-map-entity:hover {
  background: var(--bg-2);
}
.os-map-entity-on,
.os-map-entity-on:hover {
  border-color: var(--accent-line);
  background: var(--accent-wash);
}
.os-map-entity .os-row {
  flex: 1;
  min-width: 0;
  padding: 8px 8px 8px 8px;
}
.os-map-entity .os-row:hover {
  background: transparent;
}
.os-map-muted {
  margin: 0;
  padding: 8px;
  font-size: 13px;
  color: var(--text-3);
}
.os-map-centre {
  min-height: 0;
}
.os-map-head-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.os-map-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-map-counts {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
  white-space: nowrap;
}
.os-map-centre .os-pane-actions {
  margin-left: 8px;
}
.os-map-body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 8px;
}
.os-map-canvas {
  position: relative;
  flex: 1;
  min-height: 360px;
  overflow: hidden;
}
.os-map-edges {
  position: absolute;
  inset: 0;
  overflow: visible;
}
.os-map-layer {
  position: absolute;
  inset: 0;
}
.os-map-edge {
  fill: none;
  stroke: var(--map-edge);
  stroke-width: 1.4;
  transition: stroke var(--transition);
}
.os-map-edge-inferred {
  stroke-dasharray: 5 4;
}
.os-map-edge-on,
.os-map-edge.os-map-hot {
  stroke: var(--map-edge-active);
  stroke-width: 1.8;
}
.os-map-marker {
  color: var(--map-edge);
}
.os-map-marker-on {
  color: var(--map-edge-active);
}
.os-map-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--map-node-bg);
  color: var(--text-1);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color var(--transition),
    opacity var(--transition);
}
.os-map-node:hover {
  border-color: var(--accent-line);
}
.os-map-node:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.os-map-node-focus {
  padding: 8px 16px;
  border: 2px solid var(--accent);
  background: var(--accent-wash);
  cursor: default;
}
.os-map-node-type {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: var(--text-3);
}
.os-map-node-name {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}
.os-map-node-focus .os-map-node-name {
  font-size: 16px;
}
.os-map-node-ticker {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}
.os-map-chip {
  position: absolute;
  transform: translate(-50%, -50%);
  max-width: 180px;
  padding: 2px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--chip-border);
  border-radius: var(--radius-sm);
  background: var(--bg-1);
  color: var(--text-2);
  font: inherit;
  font-size: 11px;
  line-height: 16px;
  cursor: pointer;
}
.os-map-chip:hover,
.os-map-chip.os-map-hot {
  border-color: var(--accent-line);
  color: var(--text-1);
}
.os-map-chip-on {
  border-color: var(--accent);
  color: var(--accent);
}
.os-map-chip-inferred {
  border-style: dashed;
}
.os-map-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.os-map-dim {
  opacity: 0.3;
}
.os-map-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 8px 16px;
  border-top: 1px solid var(--border);
}
.os-map-footnote {
  margin: 0;
  font-size: 12px;
  color: var(--text-3);
}
.os-map-more-people {
  padding: 2px 10px;
  border: 1px solid var(--chip-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.os-map-table-wrap {
  overflow: auto;
}
.os-map-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.os-map-table th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  text-align: left;
}
.os-map-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: top;
}
.os-map-tr:hover td {
  background: var(--bg-2);
}
.os-map-row-on td {
  background: var(--accent-wash);
}
.os-map-table-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-1);
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  cursor: pointer;
}
.os-map-table-link[aria-pressed="true"] {
  color: var(--accent);
}
.os-map-table-focus {
  color: var(--text-1);
  font-weight: 600;
}
.os-map-table-when {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.os-map-dossier {
  min-height: 0;
  padding: 16px;
  gap: 12px;
  overflow-y: auto;
}
/* The pane is a flex column of fixed height that scrolls: without this its
   children shrink to fit it and the tabs collapse to a hairline. */
.os-map-dossier > * {
  flex-shrink: 0;
}
.os-map-room .os-timeline-when {
  font-family: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.os-map-dossier-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.os-map-dossier-titles {
  flex: 1;
  min-width: 0;
}
.os-map-overline {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
}
.os-map-dossier-name {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--text-1);
  overflow-wrap: anywhere;
}
.os-map-dossier-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.os-map-dossier-tabs {
  margin: 0;
}
.os-map-dossier-tabs .tab {
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.os-map-dossier-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.os-map-section-title {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}
.os-map-edge-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-0);
}
.os-map-edge-card-top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.os-map-edge-card-text {
  flex: 1;
  min-width: 0;
}
.os-map-edge-sentence {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}
.os-map-edge-source {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-3);
}
.os-map-quote {
  margin: 0;
  padding-left: 10px;
  border-left: 2px solid var(--border-strong);
  font-size: 12px;
  color: var(--text-2);
}
.os-map-caveat {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  color: var(--text-2);
}
.os-map-caveat-icon {
  display: inline-flex;
  margin-top: 1px;
  color: var(--text-3);
}
/* The longest label gets the widest column, so none wraps past two lines. */
.os-map-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}
.os-map-action {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px;
  line-height: 1.3;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-0);
  color: var(--text-1);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.os-map-action:hover {
  border-color: var(--accent-line);
}
.os-map-action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.os-map-action:disabled {
  color: var(--text-4);
  cursor: not-allowed;
}
.os-map-action-icon {
  display: inline-flex;
  flex: none;
  color: var(--text-2);
}
.os-map-action-label {
  min-width: 0;
}
.os-map-evidence {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.os-map-evidence-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.os-map-evidence-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  font-size: 13px;
}
.os-map-evidence-title {
  color: var(--text-1);
}
.os-map-evidence-detail {
  font-size: 12px;
  color: var(--text-3);
}
.os-open-in-map {
  display: inline-flex;
  align-items: center;
  align-self: center;
  margin-left: auto;
  padding: 4px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: 12px;
  text-decoration: none;
}
.os-open-in-map:hover {
  border-color: var(--accent-line);
}
.os-crm-research {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.os-crm-research-text {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--text-2);
}
.os-crm-research-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.os-crm-research-loading {
  margin: 0;
  font-size: 13px;
  color: var(--text-3);
}
@media (max-width: 1279px) {
  .os-map-grid {
    grid-template-columns: 220px minmax(0, 1fr) 320px;
  }
  .os-map-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 1100px) {
  .os-map-grid {
    grid-template-columns: 220px minmax(0, 1fr);
    grid-template-rows: max(520px, calc(100vh - var(--topbar-h) - 262px)) auto;
    height: auto;
  }
  .os-map-dossier {
    grid-column: 1 / -1;
  }
}
@media (max-width: 760px) {
  .os-map-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    height: auto;
  }
  .os-map-side .os-map-segments-pane {
    display: none;
  }
  .os-map-canvas {
    min-height: 380px;
  }
}

/* A suggestion decided from the dossier (Review queue, M1.1). */
.os-map-review {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--pane-border);
}
.os-map-review-ask {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}
.os-map-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.os-map-review-status {
  margin: 0;
  font-size: 13px;
  color: var(--status-warn);
}
.os-map-review-status:empty {
  display: none;
}

/* CRM research started from the dossier (M4b): what it found, and Review. */
.os-map-research {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}
.os-map-research:empty {
  display: none;
}
.os-map-research a {
  color: var(--accent);
}
/* What a research suggestion's evidence said, under its source line. */
.os-map-edge-fact {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}

/* ── 7. Social room (dashboard-social-room.js), prefix os-social- ── */
.os-social-room {
  min-width: 0;
  color: var(--text-1);
  /* Columns fold by the room's own width: the sidebar takes part of the window. */
  container: os-social / inline-size;
}
.os-social-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.os-social-ask {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.os-social-views {
  margin: -4px 0 16px;
}
.os-social-views .os-segmented {
  flex-wrap: wrap;
}
/* One bordered block with shared 1px column rules, as in the target. Its
   height is the window below the room header (--os-social-top is measured by
   the room), so the composer stays in view and every pane scrolls by itself. */
.os-social-grid {
  position: relative;
  display: grid;
  grid-template-columns: 172px 264px minmax(0, 1fr) 288px;
  grid-template-rows: minmax(0, 1fr);
  height: calc(100dvh - var(--os-social-top, 300px) - 20px);
  min-height: 520px;
  border: 1px solid var(--pane-border);
  border-radius: var(--radius-md);
  background: var(--pane-bg);
  overflow: hidden;
}
.os-social-grid > * {
  min-width: 0;
  min-height: 0;
}
.os-social-grid > * + * {
  border-left: 1px solid var(--pane-border);
}
.os-social-rail-slot,
.os-social-context-slot {
  overflow-y: auto;
}
.os-social-rail-body,
.os-social-context-body {
  min-width: 0;
}
.os-social-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 12px 16px;
}
.os-social-rail-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.os-social-rail-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}
.os-social-account {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 32px 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-0);
}
.os-social-account:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.os-social-account .os-social-select {
  flex: 1;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
}
.os-social-select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-0);
  color: var(--text-1);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.os-social-select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.os-social-select option {
  background: var(--bg-1);
  color: var(--text-1);
}
.os-social-select-caret {
  position: absolute;
  right: 8px;
  display: inline-flex;
  color: var(--text-2);
  pointer-events: none;
}
.os-social-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--text-4);
}
.os-social-dot-ok {
  background: var(--status-ok);
}
.os-social-dot-off {
  background: var(--status-warn);
}
.os-social-queues {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.os-social-queue {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13px;
  text-decoration: none;
}
.os-social-queue:hover {
  background: var(--bg-2);
  color: var(--text-1);
}
.os-social-queue:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.os-social-queue-active,
.os-social-queue-active:hover {
  border-color: var(--accent-line);
  background: var(--accent-wash);
  color: var(--text-1);
}
.os-social-queue-dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--text-3);
}
.os-social-queue-active .os-social-queue-dot {
  background: var(--accent);
}
.os-social-queue-label {
  flex: 1;
  min-width: 0;
}
.os-social-queue-count {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text-2);
}
.os-social-filter {
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.os-social-filter > summary {
  list-style: none;
}
.os-social-filter > summary::-webkit-details-marker {
  display: none;
}
.os-social-filter-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  cursor: pointer;
}
.os-social-filter-title:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.os-social-filter-caret {
  display: inline-flex;
  color: var(--text-2);
  transition: transform 0.15s ease;
}
.os-social-filter:not([open]) .os-social-filter-caret {
  transform: rotate(-90deg);
}
.os-social-filter-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0 2px;
}
.os-social-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
}
.os-social-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}
.os-social-check-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-1);
}
.os-social-check-count {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text-3);
}
.os-social-type {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.os-social-type .os-social-select {
  font-size: 12px;
}
.os-social-type-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}
.os-social-clear {
  align-self: flex-start;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
}
.os-social-clear:hover {
  color: var(--text-1);
  text-decoration: underline;
}
.os-social-grid > .os-social-list-pane,
.os-social-thread,
.os-social-context {
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  background: transparent;
}
.os-social-list-pane {
  overflow: hidden;
}
.os-social-list-pane .os-pane-head {
  gap: 8px;
  padding: 8px 12px;
}
.os-social-list-pane .os-pane-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-social-sort {
  height: 30px;
  padding: 0 8px;
}
.os-social-window {
  margin: 0;
  padding: 8px 12px 0;
  font-size: 12px;
  color: var(--text-3);
}
.os-social-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  padding: 8px;
  overflow-y: auto;
}
.os-social-list:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.os-social-row {
  align-items: center;
}
.os-social-row .os-row-title {
  font-weight: 400;
}
.os-social-row-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.os-social-row-bottom .os-row-preview {
  flex: 1;
  min-width: 0;
}
.os-social-name {
  display: flex;
  align-items: baseline;
  min-width: 0;
}
.os-social-name-person {
  flex: none;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  color: var(--text-1);
}
.os-social-name-company {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: pre;
  color: var(--text-2);
}
.os-social-unread {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--accent);
}
.os-social-platform {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
}
.os-social-thread {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.os-social-thread:focus {
  outline: none;
}
.os-social-thread > .os-empty {
  margin: auto 0;
}
.os-social-thread-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.os-social-back {
  display: none;
  align-self: flex-start;
  align-items: center;
  gap: 8px;
  margin: 12px 16px 0;
}
.os-social-thread-head {
  display: flex;
  flex: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--border);
}
.os-social-thread-titles {
  flex: 1 1 auto;
  min-width: 0;
}
.os-social-thread-title,
.os-social-thread-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-social-thread-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-1);
}
.os-social-thread-meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-2);
}
.os-social-thread-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}
.os-social-done {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.os-social-outcome {
  flex: none;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border);
}
.os-social-messages {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 16px;
  min-height: 0;
  margin: 0;
  padding: 16px;
  list-style: none;
  overflow-y: auto;
}
.os-social-day {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-2);
}
.os-social-day::before,
.os-social-day::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.os-social-msg {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 82%;
}
.os-social-msg-out {
  align-self: flex-end;
  justify-content: flex-end;
}
.os-social-msg-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.os-social-msg-out .os-social-msg-body {
  align-items: flex-end;
}
.os-social-msg-caption {
  font-size: 12px;
  color: var(--text-2);
}
.os-social-bubble {
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-2);
  color: var(--text-1);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.os-social-msg-out .os-social-bubble {
  border-color: var(--accent-line);
  background: var(--accent-wash);
}
.os-social-msg-empty {
  font-size: 13px;
  color: var(--text-2);
}
.os-social-composer-slot {
  flex: none;
  padding: 8px 12px 12px;
  border-top: 1px solid var(--border);
}
.os-social-composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-1);
}
.os-social-composer-off {
  padding: 12px;
}
.os-social-composer-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  min-width: 0;
}
.os-social-composer-label {
  flex: none;
  font-size: 13px;
  color: var(--text-2);
}
.os-social-composer-suggest {
  flex: none;
  margin-left: auto;
}
.os-social-replyas {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-0);
  color: var(--text-1);
  font-size: 13px;
}
.os-social-replyas > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-social-signin {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--status-warn);
  text-decoration: none;
  white-space: nowrap;
}
.os-social-signin:hover {
  text-decoration: underline;
}
.os-social-signin:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.os-social-suggest {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.os-social-field {
  box-sizing: border-box;
  width: 100%;
  min-height: 64px;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-0);
  color: var(--text-1);
  font: inherit;
  font-size: 13px;
  resize: vertical;
}
.os-social-field:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.os-social-composer-foot {
  display: flex;
  align-items: center;
  gap: 12px;
}
.os-social-counter {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--text-3);
}
.os-social-composer-status {
  margin-left: auto;
}
.os-social-paused {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
}
/* Beats the app's primary button colours (body[data-nexus-app] .btn-primary). */
.os-social-composer .os-social-send:disabled,
.os-social-composer .os-social-send:disabled:hover {
  border-color: var(--border-strong);
  background: var(--bg-2);
  color: var(--text-3);
  opacity: 1;
  cursor: not-allowed;
}
.os-social-context {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 16px 16px;
  border-left: 0;
}
.os-social-context-slot {
  min-width: 0;
}
.os-social-context-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
}
.os-social-context-heading {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}
.os-social-context-block + .os-social-context-block {
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.os-social-context .os-kv {
  grid-template-columns: minmax(104px, max-content) 1fr;
}
.os-social-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-2);
}
.os-social-link {
  color: var(--accent);
  text-decoration: none;
}
.os-social-link:hover {
  text-decoration: underline;
}
.os-social-map-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 13px;
}
.os-social-chain {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.os-social-chain-node {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 72px;
  max-width: 120px;
  padding: 8px 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--map-node-bg);
  text-align: center;
}
.os-social-chain-root {
  border-color: var(--accent-line);
  background: var(--accent-wash);
}
.os-social-chain-kind {
  font-size: 11px;
  color: var(--text-3);
}
.os-social-chain-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-1);
  overflow-wrap: anywhere;
}
.os-social-chain-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-2);
}
.os-social-chain-relation {
  font-size: 11px;
}
.os-social-chain-arrow {
  display: inline-flex;
}
.os-social-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-1);
}
.os-social-results {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
}
.os-social-tab-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.os-studio-stack,
.os-studio-field {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.os-studio-stack > button {
  justify-self: start;
}
.os-studio-stack summary {
  cursor: pointer;
}
.os-studio-stack details > form,
.os-studio-stack details > details {
  margin-top: 12px;
}
.os-studio-stack textarea,
.os-studio-stack select,
.os-studio-stack input:not([type="checkbox"]) {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--pane-bg);
  color: var(--text-1);
  font: inherit;
}
.os-studio-field[hidden],
.os-studio-stack > button[hidden] {
  display: none;
}
.os-studio-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.os-studio-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}
.os-studio-copy {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.os-studio-original {
  padding-block: 12px;
  border-bottom: 1px solid var(--border);
}
.os-social-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--status-warn);
  border-radius: var(--radius-sm);
  background: var(--status-warn-soft);
  color: var(--text-1);
  font-size: 13px;
}
.os-social-publishing-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.os-social-publishing-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.os-social-publishing-kind {
  font-weight: 600;
  color: var(--text-1);
}
.os-social-publishing-when {
  color: var(--text-2);
}
.os-social-elsewhere {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.os-social-elsewhere-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: 13px;
  text-decoration: none;
}
.os-social-elsewhere-link > span:nth-child(2) {
  flex: 1;
}
.os-social-elsewhere-link:hover {
  background: var(--bg-2);
}
.os-social-activity {
  min-width: 0;
}
.os-social-xchat,
.os-social-publishing-list,
.os-social-name {
  min-width: 0;
}
.os-social-kind,
.os-social-replyas-select {
  width: 100%;
  max-width: 260px;
}
.os-social-done-label,
.os-social-next-text {
  white-space: nowrap;
}
.os-social-suggest-note:empty {
  display: none;
}
/* Folded panels: hidden in a wide room, opened by their toggle when narrow. */
.os-social-fold-toggle,
.os-social-fold-close {
  display: none;
}
.os-social-fold-toggle {
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
}
.os-social-fold-toggle[aria-expanded="true"] {
  border-color: var(--accent-line);
  color: var(--accent);
}
.os-social-fold-close {
  align-items: center;
  gap: 8px;
  margin: 12px 12px 0;
}
/* Below four columns: queues and filters fold behind the list's toggle. */
@container os-social (max-width: 1123px) {
  .os-social-grid {
    grid-template-columns: 264px minmax(0, 1fr) 288px;
  }
  .os-social-rail-slot {
    display: none;
  }
  .os-social-grid > .os-social-list-pane {
    border-left: 0;
  }
  .os-social-list-pane .os-social-fold-toggle,
  .os-social-rail-slot .os-social-fold-close {
    display: inline-flex;
  }
  .os-social-grid.os-social-rail-open > .os-social-rail-slot {
    display: block;
    grid-column: 1;
    grid-row: 1;
  }
  .os-social-grid.os-social-rail-open > .os-social-list-pane {
    display: none;
  }
}
/* Below three columns: the context folds behind the thread's toggle. */
@container os-social (max-width: 899px) {
  .os-social-grid {
    grid-template-columns: minmax(220px, 248px) minmax(0, 1fr);
  }
  .os-social-context-slot {
    display: none;
  }
  .os-social-thread-head .os-social-fold-toggle,
  .os-social-context-slot .os-social-fold-close {
    display: inline-flex;
  }
  .os-social-grid.os-social-context-open > .os-social-context-slot {
    display: block;
    grid-column: 2;
    grid-row: 1;
  }
  .os-social-grid.os-social-context-open > .os-social-thread {
    display: none;
  }
}
/* One column (phone): the list, then the opened thread with its context below. */
@container os-social (max-width: 599px) {
  .os-social-grid {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  .os-social-grid > * + * {
    border-left: 0;
    border-top: 1px solid var(--pane-border);
  }
  .os-social-grid > .os-social-list-pane,
  .os-social-grid.os-social-rail-open > .os-social-list-pane {
    display: flex;
  }
  .os-social-grid.os-social-rail-open > .os-social-rail-slot {
    display: block;
  }
  .os-social-thread,
  .os-social-grid > .os-social-context-slot,
  .os-social-grid.os-social-context-open > .os-social-context-slot,
  .os-social-context-slot .os-social-fold-close,
  .os-social-thread-head .os-social-fold-toggle {
    display: none;
  }
  .os-social-grid.social-detail-open > .os-social-list-pane,
  .os-social-grid.social-detail-open > .os-social-rail-slot {
    display: none;
  }
  .os-social-grid.social-detail-open > .os-social-thread {
    display: flex;
    border-top: 0;
    overflow: visible;
  }
  .os-social-grid.social-detail-open > .os-social-context-slot {
    display: block;
  }
  .os-social-back {
    display: inline-flex;
  }
  .os-social-msg {
    max-width: 100%;
  }
  .os-social-list {
    max-height: none;
  }
  .os-social-composer-top {
    flex-wrap: wrap;
  }
  .os-social-thread-title,
  .os-social-thread-meta {
    white-space: normal;
  }
  .os-social-thread-title .os-social-name {
    flex-wrap: wrap;
  }
}
@media (max-width: 600px) {
  .os-social-pills {
    width: 100%;
  }
  .os-social-thread {
    scroll-margin-top: 12px;
  }
}

/* ── 8. Requests (dashboard-requests-view.js), prefix os-req- ─────── */
.os-req-room {
  min-width: 0;
}
.os-req-switch {
  margin: -4px 0 16px;
}
.os-req-intro {
  margin-bottom: 14px;
}
.os-req-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-1);
}
.os-req-subtitle {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--text-2);
}
.os-req-summary {
  margin: 6px 0 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-3);
}
.os-req-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.os-req-layout-panel {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
}
.os-req-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.os-req-banners,
.os-req-notice-slot,
.os-req-selected-slot,
.os-req-play-slot {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.os-req-banners:empty,
.os-req-notice-slot:empty,
.os-req-selected-slot:empty,
.os-req-play-slot:empty,
.os-req-more:empty,
.os-req-confirm-slot:empty,
.os-req-card-status:empty,
.os-req-panel-status:empty {
  display: none;
}
.os-req-banner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--status-warn);
  border-radius: var(--radius-sm);
  background: var(--status-warn-soft);
  color: var(--text-1);
  font-size: 13px;
}
.os-req-banner .i {
  color: var(--status-warn);
}
.os-req-banner a {
  color: var(--accent);
}
.os-req-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 14px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  background: var(--accent-wash);
  color: var(--text-1);
  font-size: 13px;
}
.os-req-notice-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.os-req-notice-close {
  width: 28px;
  height: 28px;
  border-color: transparent;
}
.os-req-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.os-req-states {
  overflow-x: auto;
  scrollbar-width: none;
}
.os-req-states .os-seg {
  white-space: nowrap;
}
.os-req-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.os-req-play-filter {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--text-2);
}
.os-req-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.os-req-more {
  display: flex;
  justify-content: center;
}
.os-req-muted {
  margin: 0;
  font-size: 13px;
  color: var(--text-3);
}
.os-req-error {
  padding: 16px;
  border: 1px solid var(--status-bad);
  border-radius: var(--radius-md);
  background: var(--status-bad-soft);
  color: var(--text-1);
  font-size: 13px;
}
.os-req-error p {
  margin: 6px 0 12px;
  overflow-wrap: anywhere;
}
.os-req-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--pane-border);
  border-radius: var(--radius-md);
  background: var(--pane-bg);
  scroll-margin-top: 16px;
}
.os-req-card-selected {
  border-color: var(--accent-line);
  background: var(--accent-wash);
}
.os-req-category {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.os-req-selected {
  display: flex;
  flex-direction: column;
}
.os-req-card-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.os-req-fit {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-2);
  white-space: nowrap;
}
.os-req-fit[data-band="high"] {
  border-color: var(--status-ok);
  background: var(--status-ok-soft);
  color: var(--status-ok);
}
.os-req-fit[data-band="medium"] {
  border-color: var(--status-warn);
  background: var(--status-warn-soft);
  color: var(--status-warn);
}
.os-req-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  margin-left: auto;
  font-size: 12px;
  color: var(--text-3);
}
.os-req-group {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-2);
}
.os-req-dot {
  color: var(--text-4);
}
.os-req-when {
  white-space: nowrap;
}
.os-req-text {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-1);
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.os-req-text-open {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: none;
}
.os-req-quote {
  border-radius: 3px;
  background: var(--accent-wash);
  color: var(--text-1);
}
.os-req-more-text {
  align-self: flex-start;
  margin-top: -6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.os-req-more-text:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.os-req-readas {
  margin: 0;
  font-size: 13px;
  font-style: italic;
  color: var(--text-3);
}
.os-req-author {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
}
.os-req-author .os-avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
}
.os-req-author-name {
  font-weight: 600;
  color: var(--text-1);
}
.os-req-author-name:empty {
  display: none;
}
.os-req-handle {
  color: var(--text-2);
}
.os-req-crm {
  padding: 1px 8px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 12px;
  text-decoration: none;
}
.os-req-crm:hover {
  background: var(--accent-wash);
}
.os-req-via {
  white-space: nowrap;
}
.os-req-offer-none {
  color: var(--text-3);
}
.os-req-label {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-2);
}
.os-req-why {
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.os-req-reasons {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0 0 0 18px;
  font-size: 13px;
  color: var(--text-2);
}
.os-req-reason::marker {
  color: var(--text-4);
}
.os-req-reason-line {
  margin: 0;
  font-size: 13px;
  color: var(--text-2);
}
.os-req-offer {
  margin: 0;
  font-size: 13px;
  color: var(--text-1);
}
.os-req-label-inline {
  color: var(--text-3);
}
.os-req-state-line {
  margin: 0;
  font-size: 13px;
  color: var(--text-2);
}
.os-req-state-line a {
  color: var(--accent);
}
.os-req-campaigns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.os-req-campaign-chip {
  gap: 6px;
  white-space: normal;
}
.os-req-chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}
.os-req-chip-x:hover {
  background: var(--bg-3);
  color: var(--text-1);
}
.os-req-chip-x:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.os-req-draft {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-0);
}
.os-req-draft-text {
  width: 100%;
  resize: vertical;
}
.os-req-draft-note {
  margin: 0;
  font-size: 12px;
  color: var(--text-3);
}
.os-req-community {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}
.os-req-community summary {
  cursor: pointer;
  min-height: 32px;
  padding-block: 6px;
  font-weight: 600;
}
.os-req-community-content {
  display: grid;
  min-width: 0;
  gap: 8px;
}
.os-req-community-content:empty {
  display: none;
}
.os-req-community-content p {
  margin: 0;
}
.os-req-community-content .nx-input {
  box-sizing: border-box;
  width: 100%;
  margin-top: 4px;
}
.os-req-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.os-req-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}
.os-req-open:hover {
  text-decoration: underline;
}
.os-req-open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.os-req-menu {
  position: relative;
  display: inline-block;
}
.os-req-menu > summary {
  list-style: none;
}
.os-req-menu > summary::-webkit-details-marker {
  display: none;
}
.os-req-menu-trigger {
  cursor: pointer;
}
.os-req-menu-list {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: max-content;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 32px));
  padding: 6px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-1);
  box-shadow: var(--shadow-menu);
}
.os-req-dismiss .os-menu-item,
.os-req-campaign .os-menu-item {
  white-space: normal;
}
.os-req-menu-hint {
  margin: 2px 6px 4px;
  font-size: 12px;
  color: var(--text-3);
}
.os-req-note {
  margin-top: 4px;
  width: 100%;
  font-size: 13px;
  resize: vertical;
}
.os-req-confirm {
  padding: 12px;
  border: 1px solid var(--status-warn);
  border-radius: var(--radius-sm);
  background: var(--status-warn-soft);
  font-size: 13px;
  color: var(--text-1);
}
.os-req-confirm p {
  margin: 0 0 10px;
}
.os-req-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.os-req-card-status,
.os-req-panel-status {
  margin: 0;
  font-size: 13px;
  color: var(--status-warn);
}
.os-req-panel {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 120px);
}
.os-req-panel .os-pane-body {
  overflow-y: auto;
}
.os-req-panel-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.os-req-panel-section {
  min-width: 0;
}
.os-req-sources {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.os-req-source {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-0);
}
.os-req-source-off {
  opacity: 0.7;
}
.os-req-source-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.os-req-source-main > .btn {
  margin-left: auto;
}
.os-req-source-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  overflow-wrap: anywhere;
}
.os-req-source-meta {
  margin: 0;
  font-size: 12px;
  color: var(--text-3);
  overflow-wrap: anywhere;
}
.os-req-source-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.os-req-account-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.os-req-footnote {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-3);
}
.os-req-setting {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.os-req-setting-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.os-req-toggle {
  position: relative;
  flex: none;
  width: 40px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-full);
  background: var(--bg-3);
  cursor: pointer;
}
.os-req-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: var(--text-3);
  transition: transform var(--transition);
}
.os-req-toggle-on {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.os-req-toggle-on .os-req-toggle-knob {
  transform: translateX(18px);
  background: var(--accent);
}
.os-req-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.os-req-toggle:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
@media (prefers-reduced-motion: reduce) {
  .os-req-toggle-knob {
    transition: none;
  }
}
@media (max-width: 900px) {
  .os-req-layout-panel {
    grid-template-columns: minmax(0, 1fr);
  }
  .os-req-panel-slot {
    order: -1;
  }
  .os-req-panel {
    position: static;
    max-height: none;
  }
}
@media (max-width: 600px) {
  .os-req-meta {
    width: 100%;
    margin-left: 0;
  }
  /* The states scroll sideways here: a fade at the edge says there is more. */
  .os-req-states {
    mask-image: linear-gradient(to right, black calc(100% - 28px), transparent);
  }
  .os-req-open {
    margin-left: 0;
  }
  .os-req-pills .os-select-pill {
    flex: 1 1 calc(50% - 8px);
  }
  .os-req-pills .os-select {
    max-width: 100%;
  }
}

/* ── 9. Review queue (dashboard-crm-review.js), prefix os-review- ── */
/* One column of cards, each a decision: what waits, why, and its buttons. */
.os-review-room {
  min-width: 0;
}
.os-review-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.os-review-body > .os-segmented {
  align-self: flex-start;
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
}
.os-review-body > .os-segmented .os-seg {
  flex: none;
  white-space: nowrap;
}
.os-review-pane .os-pane-body {
  padding: 16px;
}
.os-review-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.os-review-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--pane-border);
  border-radius: var(--radius-md);
  background: var(--pane-bg);
}
.os-review-card-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.os-review-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-1);
  overflow-wrap: anywhere;
}
.os-review-title a {
  color: inherit;
}
.os-review-card .os-kv {
  margin: 0;
}
.os-review-card .os-kv-value {
  overflow-wrap: anywhere;
}
.os-review-meta,
.os-review-note,
.os-review-muted {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
  overflow-wrap: anywhere;
}
.os-review-muted {
  color: var(--text-3);
}
.os-review-meta a,
.os-review-note a {
  color: var(--accent);
}
.os-review-note-warn {
  color: var(--status-warn);
}
.os-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}
.os-review-status {
  margin: 0;
  font-size: 13px;
  color: var(--status-warn);
}
.os-review-status:empty {
  display: none;
}
.os-review-flash,
.os-review-banner {
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--pane-border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-1);
}
.os-review-flash {
  border-color: var(--status-ok);
  background: var(--status-ok-soft);
}
.os-review-banner {
  border-color: var(--status-warn);
  background: var(--status-warn-soft);
}
@media (max-width: 560px) {
  .os-review-pane .os-pane-body,
  .os-review-card {
    padding: 12px;
  }
  .os-review-actions .btn {
    flex: 1 1 auto;
  }
}
/* ── 10. Client invoices: derived status and payments (dashboard-client-command-center.js), prefix os-invoice- ── */
.os-invoice-entry {
  display: grid;
  gap: 6px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.os-invoice-money {
  display: grid;
  gap: 6px;
}
.os-invoice-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--text-1);
  font-size: 13px;
}
.os-invoice-matches {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: var(--text-2);
  font-size: 13px;
}
.os-invoice-matches li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.os-invoice-undone {
  color: var(--text-3);
}
.os-invoice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.os-invoice-form {
  display: grid;
  gap: 12px;
}
.os-invoice-form .nx-label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

/* ── 11. Knowledge map (dashboard-knowledge-map.js), prefix os-km- ── */
.os-km-room {
  min-width: 0;
}
.os-km-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 4px 0 8px;
}
.os-km-search {
  display: flex;
  flex: 1 1 240px;
  align-items: center;
  gap: 6px;
  max-width: 360px;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-1);
}
.os-km-search:focus-within {
  border-color: var(--accent-line);
}
.os-km-search-icon {
  display: inline-flex;
  color: var(--text-3);
}
.os-km-search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-1);
  font: inherit;
  font-size: 13px;
  outline: none;
}
.os-km-search-status {
  font-size: 12px;
  color: var(--text-3);
}
.os-km-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
}
.os-km-type-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--chip-border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-3);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition:
    border-color var(--transition),
    color var(--transition);
}
.os-km-type-toggle:hover {
  border-color: var(--accent-line);
}
.os-km-type-toggle-on {
  border-color: var(--border-strong);
  background: var(--bg-2);
  color: var(--text-1);
}
.os-km-type-toggle:not(.os-km-type-toggle-on) .os-km-swatch {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--km-c, var(--km-source));
}
.os-km-type-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.os-km-type-count {
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
}
.os-km-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: stretch;
  height: max(600px, calc(100vh - var(--topbar-h) - 280px));
}
.os-km-pane {
  min-height: 0;
}
.os-km-head-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.os-km-counts {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
}
.os-km-body {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: 8px;
}
.os-km-canvas {
  position: relative;
  flex: 1;
  min-height: 360px;
  overflow: hidden;
}
.os-km-edges {
  position: absolute;
  inset: 0;
  overflow: visible;
}
.os-km-layer {
  position: absolute;
  inset: 0;
}
.os-km-edge {
  fill: none;
  stroke: var(--map-edge);
  stroke-width: 1.2;
  opacity: 0.6;
  transition:
    stroke var(--transition),
    opacity var(--transition);
}
.os-km-edge-soft {
  stroke-dasharray: 4 4;
}
.os-km-edge-on,
.os-km-edge.os-km-hot {
  stroke: var(--map-edge-active);
  stroke-width: 1.6;
  opacity: 1;
}
.os-km-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  font: inherit;
  cursor: pointer;
  transition: opacity var(--transition);
}
.os-km-node:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.os-km-dot {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--km-c, var(--km-source));
  color: var(--km-dot-ink);
  box-shadow: 0 0 0 3px var(--pane-bg);
  transition: box-shadow var(--transition);
}
.os-km-node:hover .os-km-dot {
  box-shadow:
    0 0 0 3px var(--pane-bg),
    0 0 0 5px var(--accent-line);
}
.os-km-node-on .os-km-dot,
.os-km-node-on:hover .os-km-dot {
  box-shadow:
    0 0 0 3px var(--pane-bg),
    0 0 0 5px var(--accent);
}
.os-km-label {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 18px;
  color: var(--text-2);
}
.os-km-node:hover .os-km-label,
.os-km-node-on .os-km-label,
.os-km-match .os-km-label {
  color: var(--text-1);
}
.os-km-node-company .os-km-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}
.os-km-compact .os-km-label {
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  z-index: 1;
  max-width: 140px;
  padding: 0 4px;
  border-radius: var(--radius-sm);
  background: var(--pane-bg);
  transform: translateX(-50%);
}
.os-km-compact
  .os-km-node:not(.os-km-node-on):not(.os-km-node-company):not(.os-km-match):not(:hover):not(
    :focus-visible
  )
  .os-km-label {
  display: none;
}
.os-km-compact .os-km-node:hover,
.os-km-compact .os-km-node:focus-visible {
  z-index: 3;
}
.os-km-dim {
  opacity: 0.25;
}
.os-km-chip {
  position: absolute;
  z-index: 2;
  padding: 2px 8px;
  border: 1px solid var(--chip-border);
  border-radius: var(--radius-sm);
  background: var(--bg-1);
  color: var(--text-2);
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.os-km-swatch {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: var(--km-c, var(--km-source));
  color: var(--km-dot-ink);
}
.os-km-t-company {
  --km-c: var(--km-company);
}
.os-km-t-offer {
  --km-c: var(--km-offer);
}
.os-km-t-audience {
  --km-c: var(--km-audience);
}
.os-km-t-differentiator {
  --km-c: var(--km-differentiator);
}
.os-km-t-topic {
  --km-c: var(--km-topic);
}
.os-km-t-objection {
  --km-c: var(--km-objection);
}
.os-km-t-question {
  --km-c: var(--km-question);
}
.os-km-t-person {
  --km-c: var(--km-person);
}
.os-km-t-organization {
  --km-c: var(--km-organization);
}
.os-km-t-source {
  --km-c: var(--km-source);
}
.os-km-foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 16px 12px;
  border-top: 1px solid var(--border);
}
.os-km-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--text-2);
}
.os-km-legend-type,
.os-km-legend-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.os-km-line {
  display: inline-block;
  width: 22px;
  height: 0;
  border-top: 2px solid var(--map-edge);
}
.os-km-line-soft {
  border-top-style: dashed;
}
.os-km-footnote {
  margin: 0;
  font-size: 12px;
  color: var(--text-3);
}
.os-km-panel {
  min-height: 0;
  overflow-y: auto;
}
.os-km-panel-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}
.os-km-panel-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
}
.os-km-panel-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-1);
  overflow-wrap: anywhere;
}
.os-km-detail {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
  overflow-wrap: anywhere;
}
.os-km-opens {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.os-km-open {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: 12px;
  text-decoration: none;
}
.os-km-open:hover {
  border-color: var(--accent-line);
}
.os-km-open:focus-visible,
.os-km-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.os-km-panel-heading {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}
.os-km-sources,
.os-km-links {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}
.os-km-source,
.os-km-links li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.os-km-source-title {
  font-size: 13px;
  color: var(--text-1);
  overflow-wrap: anywhere;
}
.os-km-source-meta {
  font-size: 12px;
  color: var(--text-3);
}
.os-km-link {
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-1);
  font: inherit;
  font-size: 13px;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.os-km-link:hover {
  color: var(--accent);
}
.os-km-link:disabled {
  color: var(--text-3);
  cursor: default;
}
.os-km-loading {
  margin: 16px 0;
  font-size: 13px;
  color: var(--text-2);
}
.os-km-error {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 0;
  color: var(--text-2);
}
.os-km-retry {
  align-self: flex-start;
}
@media (max-width: 1100px) {
  .os-km-grid {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
  }
  .os-km-canvas {
    flex: none;
    height: 520px;
  }
}
@media (max-width: 600px) {
  .os-km-search {
    flex-basis: 100%;
    max-width: none;
  }
  .os-km-canvas {
    height: 440px;
  }
}

/* ── CRM network map (NAH-222, dashboard-crm-network.js) ───────────────
   The map is the room: a canvas that fills the screen under one quiet row
   of filters, the selection beside it. Colours come from the --net-* tokens,
   which the canvas reads as well, so a dot and its legend key always agree. */
.os-net-room {
  min-width: 0;
}
.os-net-overview {
  min-width: 0;
}
.os-net-overview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 16px;
}
.os-net-overview-head h2 {
  margin: 0;
  font-size: 24px;
}
.os-net-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 31%);
  grid-template-areas:
    "preview side"
    "purpose side";
  align-items: start;
  gap: 12px;
}
.os-net-overview-grid > .os-net-overview-panel {
  grid-area: preview;
}
.os-net-overview-side {
  grid-area: side;
  display: grid;
  gap: 12px;
}
.os-net-overview-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-1);
}
.os-net-overview-panel h3 {
  margin: 0 0 8px;
  font-size: 16px;
}
.os-net-preview-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  place-content: center;
  gap: 8px;
  min-height: clamp(232px, 34vh, 308px);
  padding: 12px;
  border: 1px solid var(--pane-border);
  border-radius: var(--radius-md);
  color: var(--text-2);
  background:
    radial-gradient(ellipse at 50% 44%, var(--accent-wash), transparent 66%),
    radial-gradient(circle, var(--border-strong) 1px, transparent 1px) 50% 50% / 22px 22px,
    var(--net-ground);
  text-align: center;
}
.os-net-preview-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.os-net-preview-lines line {
  stroke: var(--net-field-edge);
  stroke-width: 1.5;
  transition: stroke var(--transition);
}
.os-net-preview-lines line[data-active="true"] {
  stroke: var(--net-select);
  stroke-width: 2;
}
.os-net-preview-node,
.os-net-preview-option {
  color: var(--text-1);
  cursor: pointer;
  font: inherit;
}
.os-net-preview-node {
  position: absolute;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  width: max-content;
  min-width: 44px;
  max-width: 28%;
  gap: 4px;
  padding: 0;
  transform: translate(-50%, -19px);
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
}
.os-net-preview-node .os-net-swatch {
  width: 38px;
  height: 38px;
  border: 2px solid var(--net-ground);
  box-shadow: 0 0 0 1px var(--border-strong);
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}
.os-net-preview-node:hover,
.os-net-preview-node:focus-visible {
  z-index: 2;
}
.os-net-preview-node:hover .os-net-swatch,
.os-net-preview-node:focus-visible .os-net-swatch {
  transform: scale(1.12);
}
.os-net-preview-node[aria-pressed="true"] .os-net-swatch {
  box-shadow: 0 0 0 2px var(--net-select);
}
.os-net-preview-node > span:last-child {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 2px 6px;
  border-radius: var(--radius-md);
  background: var(--bg-1);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.os-net-preview-caption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 12px;
  margin-top: 10px;
  color: var(--text-2);
  font-size: 13px;
}
.os-net-preview-caption details[open] {
  flex-basis: 100%;
}
.os-net-preview-caption summary,
.os-net-recent-body summary {
  color: var(--text-1);
  cursor: pointer;
}
.os-net-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr));
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.os-net-preview-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-1);
  text-align: left;
  overflow-wrap: anywhere;
}
.os-net-preview-option:hover,
.os-net-preview-option[aria-pressed="true"] {
  border-color: var(--net-select);
  background: var(--accent-wash);
}
.os-net-preview-node:focus-visible,
.os-net-preview-option:focus-visible {
  outline: 2px solid var(--net-select);
  outline-offset: 3px;
}
.os-net-dossier-summary {
  min-height: 72px;
  overflow-wrap: anywhere;
}
.os-net-dossier-summary p {
  margin: 3px 0;
  color: var(--text-2);
  font-size: 13px;
}
.os-net-dossier-summary a {
  display: inline-block;
  margin-top: 4px;
  color: var(--accent);
}
@media (prefers-reduced-motion: reduce) {
  .os-net-preview-lines line,
  .os-net-preview-node .os-net-swatch {
    transition: none;
    transform: none;
  }
}
@media (max-width: 760px) {
  .os-net-overview-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "preview" "side" "purpose";
  }
  .os-net-overview-panel {
    padding: 12px;
  }
}
.os-net-overview-groups {
  grid-area: purpose;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 12px;
}
.os-net-objectives,
.os-net-recent-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.os-net-objectives li + li,
.os-net-recent-list li + li {
  border-top: 1px solid var(--border);
}
.os-net-objective,
.os-net-recent-list a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 4px;
  color: var(--text-1);
  overflow-wrap: anywhere;
}
.os-net-objective:hover,
.os-net-recent-list a:hover {
  text-decoration: underline;
}
.os-net-objective-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--accent);
  background: var(--bg-2);
}
.os-net-objective-arrow,
.os-net-recent-kind,
.os-net-recent-list time,
.os-net-recent-body {
  color: var(--text-2);
}
.os-net-recent-kind {
  display: block;
  font-size: 12px;
}
.os-net-overview-back {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--text-2);
}
.os-net-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
}
.os-net-objective-row,
.os-net-plan-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.os-net-objective-row {
  margin: 4px 0 12px;
  color: var(--text-2);
}
.os-net-plan {
  margin-bottom: 12px;
  padding: 12px 16px;
  border: 1px solid var(--pane-border);
  border-radius: var(--radius-md);
  background: var(--bg-1);
  overflow-wrap: anywhere;
}
.os-net-objective-tools[hidden],
.os-net-objective-form button[hidden] {
  display: none;
}
.os-net-objective-form fieldset {
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}
.os-net-objective-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.os-net-objective-fields label {
  display: grid;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}
.os-net-objective-fields :is(input, select) {
  box-sizing: border-box;
  width: 100%;
  min-height: 36px;
  padding: 4px 8px;
  color: var(--text-1);
  background: var(--bg-1);
  border: 1px solid var(--pane-border);
  border-radius: var(--radius-md);
}
.os-net-objective-form [role="status"] {
  margin: 8px 0 0;
}
.os-net-plan h2,
.os-net-plan p {
  margin: 0 0 6px;
}
.os-net-plan h2 {
  font-size: 16px;
}
.os-net-plan-actions,
.os-net-plan details {
  margin-top: 8px;
}
.os-net-audience-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 4px 12px;
  padding-top: 8px;
}
.os-net-audience-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  font-size: 13px;
  color: var(--text-1);
}
.os-net-audience-option input {
  accent-color: var(--accent);
}
.os-net-fit-strong {
  color: var(--success);
}
.os-net-fit-possible {
  color: var(--text-2);
  text-decoration: underline var(--yellow);
}
.os-net-fit-poor {
  color: var(--danger);
}
.os-net-find {
  position: relative;
  flex: 0 1 340px;
  min-width: 200px;
}
.os-net-find-icon {
  position: absolute;
  top: 50%;
  left: 10px;
  display: inline-flex;
  color: var(--text-3);
  transform: translateY(-50%);
  pointer-events: none;
}
.os-net-find-input {
  width: 100%;
  height: 34px;
  padding: 0 8px 0 32px;
  border: 1px solid var(--net-field-edge);
  border-radius: var(--radius-sm);
  background: var(--bg-0);
  color: var(--text-1);
  font: inherit;
  font-size: 13px;
}
.os-net-find-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.os-net-find-results {
  position: absolute;
  z-index: 25;
  top: calc(100% + 4px);
  left: 0;
  width: max(100%, 320px);
  display: flex;
  flex-direction: column;
  padding: 4px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-1);
  box-shadow: var(--shadow-popover);
}
.os-net-find-results[hidden] {
  display: none;
}
.os-net-find-result {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 40px;
  padding: 8px 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-1);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.os-net-find-result:hover,
.os-net-find-result:focus-visible {
  background: var(--bg-2);
  outline: none;
  box-shadow: inset 2px 0 0 var(--accent);
}
.os-net-find-name {
  font-weight: 500;
}
.os-net-find-sub {
  font-size: 12px;
  color: var(--text-3);
}
/* The search and the saved views share the first row; the filters run the
   full width under them. */
.os-net-filters {
  order: 3;
  display: flex;
  flex: 1 1 100%;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.os-net-kinds {
  display: flex;
  gap: 8px;
}
.os-net-rule {
  width: 1px;
  height: 22px;
  margin: 0 4px;
  background: var(--border-strong);
}
.os-net-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-1);
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--transition),
    border-color var(--transition),
    color var(--transition);
}
.os-net-chip:hover {
  border-color: var(--border-hover);
  color: var(--text-1);
}
.os-net-chip-on {
  border-color: var(--accent-line);
  background: var(--accent-wash);
  color: var(--text-1);
}
.os-net-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.os-net-swatch {
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
}
.os-net-swatch-company {
  background: var(--net-company);
}
.os-net-swatch-person {
  background: var(--net-person);
}
.os-net-swatch-community {
  background: var(--net-community);
}
.os-net-icp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-1);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
}
.os-net-icp-label {
  color: var(--text-2);
}
.os-net-icp-sheet {
  justify-content: space-between;
  width: 100%;
}
.os-net-icp-range {
  width: 96px;
  accent-color: var(--accent);
}
.os-net-icp-value {
  min-width: 26px;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
.os-net-sheet-btn {
  display: none;
}
.os-net-saved {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.os-net-save {
  white-space: nowrap;
}
.os-net-save-form {
  display: flex;
  align-items: center;
  gap: 8px;
}
.os-net-save-input {
  width: 220px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--net-field-edge);
  border-radius: var(--radius-sm);
  background: var(--bg-0);
  color: var(--text-1);
  font: inherit;
  font-size: 13px;
}
.os-net-drawer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 12px;
  padding: 16px;
  border: 1px solid var(--pane-border);
  border-radius: var(--radius-md);
  background: var(--pane-bg);
}
.os-net-drawer[hidden] {
  display: none;
}
.os-net-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.os-net-drawer-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
}
.os-net-drawer-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.os-net-drawer-note {
  margin: 0;
  font-size: 13px;
  color: var(--text-3);
}
.os-net-drawer-actions {
  display: flex;
  gap: 8px;
}
.os-net-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  height: max(520px, calc(100vh - var(--topbar-h) - 280px));
}
.os-net-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--pane-border);
  border-radius: var(--radius-md);
  background: var(--net-ground);
}
.os-net-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}
.os-net-canvas:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.os-net-top {
  position: absolute;
  top: 12px;
  right: 12px;
  left: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}
.os-net-top > * {
  pointer-events: auto;
}
.os-net-status {
  max-width: 56ch;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--net-glass);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.45;
}
.os-net-status:empty {
  display: none;
}
.os-net-tools {
  display: flex;
  flex: none;
  align-items: center;
  gap: 8px;
}
.os-net-tools .os-segmented {
  background: var(--net-glass);
}
.os-net-zoom {
  display: flex;
  gap: 4px;
  padding: 2px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--net-glass);
}
.os-net-legend {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  padding: 4px 12px 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--net-glass);
  color: var(--text-2);
  font-size: 12px;
}
.os-net-legend-toggle {
  display: flex;
  align-items: center;
  min-height: 32px;
  color: var(--text-1);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.os-net-legend-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.os-net-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}
.os-net-key {
  display: inline-block;
  flex: none;
  width: 12px;
  height: 12px;
}
.os-net-key-company,
.os-net-key-person,
.os-net-key-community,
.os-net-key-telegram {
  border-radius: var(--radius-full);
}
.os-net-key-company {
  background: var(--net-company);
}
.os-net-key-person {
  width: 9px;
  height: 9px;
  margin: 0 1.5px;
  background: var(--net-person);
}
.os-net-key-community {
  background: var(--net-community);
}
.os-net-key-warm {
  border: 2.5px solid var(--net-warm);
  border-radius: var(--radius-full);
}
.os-net-key-token {
  width: 8px;
  height: 8px;
  margin: 0 2px;
  background: var(--net-token);
  transform: rotate(45deg);
}
.os-net-key-telegram {
  width: 8px;
  height: 8px;
  margin: 0 2px;
  background: var(--net-telegram);
}
.os-net-key-campaign {
  width: 8px;
  height: 8px;
  margin: 0 2px;
  background: var(--net-campaign);
}
.os-net-key-observed,
.os-net-key-recorded,
.os-net-key-suggested,
.os-net-key-confirmed {
  width: 18px;
  height: 0;
  border-top: 2px solid var(--net-edge);
}
.os-net-key-recorded {
  border-top-color: var(--net-edge-recorded);
}
.os-net-key-suggested {
  border-top: 2px dashed var(--net-edge-suggested);
}
.os-net-key-confirmed {
  border-top: 3px solid var(--net-edge-confirmed);
}
.os-net-pathbar {
  position: absolute;
  top: 64px;
  left: 12px;
  max-width: min(46ch, calc(100% - 24px));
  margin: 0;
  padding: 8px 12px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  background: var(--net-glass);
  color: var(--text-1);
  font-size: 13px;
  line-height: 1.45;
}
.os-net-pathbar[hidden] {
  display: none;
}
.os-net-stage .os-empty {
  position: absolute;
  inset: 0;
  height: fit-content;
  margin: auto;
}
.os-net-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 16px;
  overflow-y: auto;
  border: 1px solid var(--pane-border);
  border-radius: var(--radius-md);
  background: var(--pane-bg);
}
.os-net-side > * {
  flex-shrink: 0;
}
.os-net-side-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
}
.os-net-counts {
  display: grid;
  margin: 0;
}
.os-net-count {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.os-net-count dt {
  color: var(--text-2);
  font-size: 13px;
}
.os-net-count dd {
  margin: 0;
  color: var(--text-1);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.os-net-hint {
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.5;
}
.os-net-footnote {
  font-size: 12px;
}
.os-net-side-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.os-net-side-head-company,
.os-net-side-head-person {
  justify-content: space-between;
}
.os-net-side-head .os-net-swatch {
  margin-top: 8px;
}
.os-net-side-titles {
  flex: 1;
  min-width: 0;
}
.os-net-side-name {
  margin: 0;
  color: var(--text-1);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.os-net-side-kind {
  margin: 2px 0 0;
  color: var(--text-3);
  font-size: 13px;
}
.os-net-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.os-net-badge {
  padding: 4px 8px;
  border: 1px solid var(--chip-border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 12px;
}
.os-net-badge-warm {
  border-color: var(--net-warm);
  color: var(--text-1);
}
.os-net-side-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.os-net-side-link {
  flex: none;
  color: var(--accent);
}
.os-net-dossier.os-map-dossier {
  padding: 0;
  overflow: visible;
}
@media (max-width: 1279px) {
  .os-net-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}
@media (max-width: 1100px) {
  .os-net-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: max(520px, calc(100vh - var(--topbar-h) - 260px)) auto;
    height: auto;
  }
}
@media (max-width: 760px) {
  .os-net-filters,
  .os-net-saved {
    display: none;
  }
  .os-net-find {
    flex: 1 1 auto;
  }
  .os-net-sheet-btn {
    display: inline-flex;
  }
  .os-net-grid {
    grid-template-rows: none;
  }
  .os-net-stage {
    height: max(420px, calc(100svh - var(--topbar-h) - 240px));
  }
  .os-net-tools .os-segmented {
    display: none;
  }
  .os-net-legend-list {
    gap: 8px 12px;
  }
  .os-net-side {
    display: none;
  }
  .os-net-side.os-net-side-open {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    max-height: 72vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-overlay);
  }
  .os-net-drawer.os-net-sheet {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    max-height: 80vh;
    margin: 0;
    overflow-y: auto;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: var(--shadow-overlay);
  }
}

/* ── Back to map (nexus-viewstate.js): shown above a room reached from the map ── */
.os-viewstate-back {
  display: flex;
  margin: 0 0 12px;
}
.os-viewstate-back[hidden] {
  display: none;
}
.os-viewstate-back-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
}
