/* NOS 2.1 SPMC — Sovereign browser surfaces (Spaces Navigator, L00, channels) */
/* Shared Nexus N2.1 template: ../nos-templates/assets/nexus-n21-browser.css (trunk link in index.html) */

:root {
  --bg: #f8fafc;
  --bg-panel: #ffffff;
  --bg-dark: #2a3f5a;
  --text: #1a2744;
  --text-muted: #64748b;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --green: #22c55e;
  --border: rgba(30, 58, 95, 0.12);
  --border-light: rgba(30, 58, 95, 0.06);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* WASM shell — scroll lives in route panes, not the browser document */
html, body {
  height: 100%;
  overflow: hidden;
}

/* ── Canvas window manager (Phase 2) ─────────────────────────────── */
.spmc-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 40; }
.spmc-canvas > * { pointer-events: auto; }
.spmc-canvas-launch {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  text-align: center;
}
.spmc-canvas-launch-hint { color: var(--text-muted); font-size: 9pt; margin-bottom: 8px; }
.spmc-canvas-launch-row { display: flex; gap: 6px; }
.spmc-canvas-launch-btn {
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 10px; font-size: 8pt; cursor: pointer; color: var(--text);
}
.spmc-canvas-launch-btn:hover { border-color: var(--accent); color: var(--accent); }
.spmc-drag-layer {
  position: fixed; inset: 0; z-index: 9999; cursor: grabbing;
  touch-action: none;
}
/* Injected LiveDOC fixed layers must not steal shell clicks */
.nos-spaces-nav--l0 .ch-doc-body [id="npTrackLayer"],
.nos-spaces-nav--l0 .ch-doc-body [id="watermarkLayer"],
.nos-spaces-nav--l0 .ch-doc-body .np-track-layer,
.nos-spaces-nav--l0 .ch-doc-body .watermark-layer {
  pointer-events: none !important;
}

/* ── NOS Canvas L00 — blank base viewport (NOS-CANVAS-L00-BLANK) ─── */
.nos-canvas-l00 {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  z-index: 0;
  overflow: hidden;
}
.nos-canvas-l00--grid .nos-canvas-l00-viewport {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
}
.nos-canvas-l00-viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
/* L00 cold-start ops metrics — thin header (journal #142); no live fetch */
.nos-l00-ops-metrics {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding: 3px 14px;
  min-height: 22px;
  font-size: 9px;
  font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace;
  letter-spacing: 0.03em;
  color: #64748b;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.04) 0%, transparent 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}
.nos-l00-ops-metrics--hidden { display: none !important; }
.nos-l00-ops-metrics-label {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 8px;
  color: #94a3b8;
  flex-shrink: 0;
}
.nos-l00-ops-metrics-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  min-width: 0;
}
.nos-l00-ops-metrics-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  opacity: 0.72;
}
.nos-l00-ops-metrics-chip-name { color: #475569; }
.nos-l00-ops-metrics-chip-val { color: #94a3b8; }
.nos-l00-ops-metrics-hint {
  font-size: 7px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #cbd5e1;
  flex-shrink: 0;
}
.nos-desktop .nos-l00-ops-metrics {
  margin: 0;
}
.nos-canvas-l00-lab {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 14px 18px;
}
.nos-canvas-l00-lab-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-shrink: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.nos-canvas-l00-home {
  font-size: 16pt;
  color: var(--accent);
  text-decoration: none;
  line-height: 1;
}
.nos-canvas-l00-lab-title h1 {
  font-size: 11pt;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.3px;
}
.nos-canvas-l00-lab-title p {
  margin-top: 4px;
  font-size: 7.5pt;
  color: var(--text-muted);
}
.nos-canvas-l00-lab-rec { margin-left: auto; }
.nos-canvas-l00-lab-body {
  position: relative;
  flex: 1;
  min-height: 0;
  margin-top: 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--bg-panel);
}
.nos-canvas-l00-origin {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 7pt;
  color: #64748b;
}
.nos-canvas-l00-origin-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.45);
}
.nos-canvas-l00-lab-hint {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  font-size: 8pt;
  color: #64748b;
  text-align: center;
}
.nos-canvas-l00-lab-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  padding-top: 10px;
  font-size: 7pt;
  color: #64748b;
}
.nos-canvas-l00-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(79, 195, 247, 0.15);
  border: 1px solid rgba(79, 195, 247, 0.35);
  color: #4fc3f7;
  font-weight: 800;
  font-size: 7.5pt;
}
.nos-canvas-l00-meta { color: #475569; }
.nos-canvas-l00-link {
  margin-left: auto;
  color: #4fc3f7;
  text-decoration: none;
  font-size: 7.5pt;
}
.nos-canvas-l00-link:hover { text-decoration: underline; }
.nos-canvas-l00-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 30;
}
.nos-canvas-l00-overlay > * { pointer-events: auto; }
.nos-canvas-l00-overlay .nos-window { pointer-events: auto; }
.nos-canvas-l00-tile-body {
  padding: 12px 14px;
  font-size: 8pt;
  color: var(--text-muted);
  line-height: 1.45;
}
.nos-canvas-l00-tile-lead {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.nos-canvas-l00-strip-status {
  position: absolute;
  top: 14px;
  left: 16px;
  font-size: 7.5pt;
  color: #64748b;
}

/* ── L0 desktop + unified bottom toolbar ─────────────────────────── */
.nos-desktop--l0 {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.nos-desktop-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 12px;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}
/* L0 desktop `/` — full viewport width tile band (journal #100 / OS REF) */
.nos-desktop.nos-home {
  align-items: stretch;
  width: 100%;
  max-width: none;
  padding: 1.25rem 1.5rem 2rem;
  box-sizing: border-box;
}
.nos-desktop--l0 .nos-launch-dock-shell,
.nos-spaces-nav--l0 .nos-launch-dock-shell {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 30;
}
.nos-spaces-nav--l0 {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
}
.nos-spaces-nav-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* NOS 2.1 sandwich — channel shell must shrink inside toolbar + dock, not 100vh */
.nos-spaces-nav--l0 .ch-shell {
  height: 100%;
  max-height: 100%;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}
.nos-spaces-nav--l0 .ch-shell-body {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}
.nos-spaces-nav--l0 .ch-shell-main {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}
.nos-spaces-nav--l0 .ch-shell-content {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* N2.1 — doc/catalog fill entire content column */
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
}
.nos-spaces-nav--l0 .ch-shell-content > .spaces-nav-doc-view {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}
.nos-spaces-nav--l0 .spaces-nav-doc-view > .ch-doc-body {
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  outline: none;
  padding-left: 0;
  padding-right: 0;
  width: 100% !important;
  max-width: 100% !important;
  pointer-events: auto;
}
/* Investor-intelligence inject — block scroll pane (flex doc-body breaks clicks on long TOP10-class docs) */
.nos-spaces-nav--l0 .spaces-nav-doc-view > .ch-doc-body:is(.ch-tpl-investor-intelligence, .ch-tpl-nexus-n21) {
  display: block !important;
}
.nos-spaces-nav--l0 .spaces-nav-doc-view > .ch-doc-body:is(.ch-tpl-investor-intelligence, .ch-tpl-nexus-n21) .page-wrap {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: auto !important;
  flex: none !important;
}
.nos-spaces-nav--l0 .spaces-nav-doc-view > .ch-doc-body:is(.ch-tpl-investor-intelligence, .ch-tpl-nexus-n21) .page-wrap > .container {
  display: block !important;
  flex: none !important;
  min-height: auto !important;
}
/* JiveTalk pop is shell-owned — in-doc copy from ingest must not steal hits */
.nos-spaces-nav--l0 .ch-doc-body #orient-pop,
.ch-doc-body #orient-pop {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.nos-spaces-nav--l0 .spaces-nav-doc-view > .ch-doc-body:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.35);
}
/* LiveDOC page footer scrolls inside the doc pane — shell footer is redundant here */
.nos-spaces-nav--l0 .ch-footer {
  display: none;
}
/* Title duplicates wireframe crumb + in-doc header */
.nos-spaces-nav--l0 .ch-shell-main-head {
  display: none;
}
.nos-spaces-nav--l0 .ch-doc-body iframe,
.nos-spaces-nav--l0 .ch-doc-iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  height: 100%;
  max-height: none;
  border: none;
}
.nos-spaces-nav-crumb-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 18px;
  background: #1e3a5f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.nos-spaces-nav-channel-back {
  flex-shrink: 0;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 8pt;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid #1d4ed8;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
}
.nos-spaces-nav-channel-back:hover {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
}
.nos-spaces-nav-channel-back--ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
  color: #f8fafc;
}
.nos-spaces-nav-channel-back--ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Focused Space-Tree / Project View — second chrome band (NOS light-blue) */
.nos-spaces-nav-focused-bar {
  flex-shrink: 0;
  background: #f4f7fc;
  border-bottom: 1px solid rgba(30, 58, 95, 0.18);
  color: #1a2744;
}
.nos-spaces-nav-focused-bar-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 8px 18px 4px;
}
.nos-spaces-nav-focused-back,
.nos-spaces-nav-focused-exit {
  font-size: 11px;
  font-weight: 600;
  color: #1e3a5f;
  text-decoration: none;
  white-space: nowrap;
}
.nos-spaces-nav-focused-back:hover,
.nos-spaces-nav-focused-exit:hover {
  color: #3b82f6;
  text-decoration: underline;
}
.nos-spaces-nav-focused-exit {
  justify-self: end;
  text-align: right;
}
.nos-spaces-nav-focused-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  min-width: 0;
}
.nos-spaces-nav-focused-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1e3a5f;
}
.nos-spaces-nav-focused-project {
  font-size: 13px;
  font-weight: 600;
  color: #1a2744;
}
.nos-spaces-nav-focused-invitee {
  font-size: 10px;
  color: #4a6080;
}
.nos-spaces-nav-focused-crumb {
  padding: 0 18px 6px;
  font-size: 10px;
  justify-content: center;
}
.nos-spaces-nav-focused-crumb a,
.nos-spaces-nav-focused-crumb span {
  color: #4a6080 !important;
}
.nos-spaces-nav-focused-crumb a:hover {
  color: #1e3a5f !important;
}
.nos-spaces-nav-focused-crumb .nos-wireframe-path-current {
  color: #1a2744 !important;
  font-weight: 600;
}

.spaces-nav-focused-entry {
  margin: 12px 0 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(244, 247, 252, 0.95));
  border: 1px solid rgba(30, 58, 95, 0.14);
}
.spaces-nav-focused-entry--child {
  margin-top: 8px;
  padding: 10px 12px;
}
.spaces-nav-focused-entry-link {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: #1e3a5f;
  text-decoration: none;
}
.spaces-nav-focused-entry-link:hover {
  color: #3b82f6;
  text-decoration: underline;
}
.spaces-nav-focused-entry-hint,
.spaces-nav-focused-entry-label {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #4a6080;
}
.nos-spaces-nav--l0 .nos-spaces-nav-crumb-bar .nos-wireframe-path,
.nos-spaces-nav--l0 .nos-spaces-nav-crumb-bar .nos-wireframe-path a,
.nos-spaces-nav--l0 .nos-spaces-nav-crumb-bar .nos-wireframe-path span {
  color: rgba(248, 250, 252, 0.88);
}
.nos-spaces-nav--l0 .nos-spaces-nav-crumb-bar .nos-wireframe-path a:hover {
  color: #ffffff;
}
.nos-spaces-nav--l0 .nos-spaces-nav-crumb-bar .nos-wireframe-path-current {
  color: #ffffff;
  font-weight: 700;
}
.nos-spaces-nav-crumb-bar .nos-wireframe-path {
  margin: 0;
  flex: 1;
  min-width: 0;
  justify-content: flex-start;
  text-align: left;
}
.nos-wireframe-path-current {
  color: var(--text);
  font-weight: 600;
}
.nos-l00-system-windows {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 35;
}
/* Only real floaters capture hits — never a nested host shell (was full-screen click trap on spaces-nav). */
.nos-l00-system-windows > .nos-window,
.nos-l00-system-windows > .spmc-drag-layer {
  pointer-events: auto;
}
.nos-l00-system-windows > .nos-l00-system-windows {
  position: static;
  inset: auto;
  width: auto;
  height: auto;
  pointer-events: none !important;
}
.nos-l00-win-body { padding: 8px 10px; }
.nos-l00-win-body:has(.nos-l00-journal) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
  height: 100%;
}
.nos-l00-clock-panel { padding: 8px 4px; }
.nos-l00-clock-panel-text {
  font-size: 11pt;
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-mono);
  line-height: 1.4;
}
.nos-l00-clock-panel-hint {
  margin-top: 8px;
  font-size: 7.5pt;
  color: var(--text-muted);
}
.nos-l00-calendar {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(30, 58, 95, 0.08);
  padding: 10px 12px 12px;
  min-width: 200px;
}
.nos-l00-calendar-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.nos-l00-calendar-nav {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12pt;
  line-height: 1;
}
.nos-l00-calendar-nav:hover { border-color: var(--accent); color: var(--accent); }
.nos-l00-calendar-selected { flex: 1; text-align: center; }
.nos-l00-calendar-selected-label {
  display: block;
  font-size: 6pt;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.nos-l00-calendar-selected-date {
  display: block;
  font-size: 8.5pt;
  font-weight: 800;
  color: var(--text);
  margin-top: 2px;
}
.nos-l00-calendar-grid-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}
.nos-l00-calendar-dow {
  font-size: 6pt;
  font-weight: 700;
  text-align: center;
  color: var(--text-muted);
}
.nos-l00-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.nos-l00-calendar-pad { min-height: 22px; }
.nos-l00-calendar-day {
  min-height: 22px;
  border: none;
  border-radius: 5px;
  background: transparent;
  font-size: 7.5pt;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.nos-l00-calendar-day:hover { background: rgba(59, 130, 246, 0.1); }
.nos-l00-calendar-day--today {
  box-shadow: inset 0 0 0 1px var(--accent);
  color: var(--accent);
}
.nos-l00-calendar-day--selected {
  background: var(--accent);
  color: #fff;
}

/* L0 Journal floating panel */
.nos-l00-journal { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.nos-l00-journal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.nos-l00-journal-title { font-size: 9pt; font-weight: 800; }
.nos-l00-journal-refresh {
  border: 1px solid var(--border); background: transparent; border-radius: 6px;
  padding: 2px 8px; cursor: pointer; font-size: 10pt;
}
.nos-l00-journal-hint { font-size: 6.5pt; color: var(--text-muted); margin: 0 0 8px; }
.nos-l00-journal-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 10px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.nos-l00-journal-list {
  list-style: none;
  margin: 0;
  padding: 0;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.nos-l00-journal-row {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; text-align: left; padding: 8px 10px; border: none; border-bottom: 1px solid var(--border);
  background: transparent; cursor: pointer; font-size: 7pt;
}
.nos-l00-journal-row:hover { background: rgba(59, 130, 246, 0.08); }
.nos-l00-journal-row--active { background: rgba(59, 130, 246, 0.14); }
.nos-l00-journal-row-id { font-weight: 800; color: var(--accent); font-size: 6.5pt; }
.nos-l00-journal-row-brief { font-weight: 600; line-height: 1.3; }
.nos-l00-journal-row-meta, .nos-l00-journal-row-origin {
  font-size: 6pt; color: var(--text-muted); font-family: var(--mono);
}
.nos-l00-journal-preview {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
}
.nos-l00-journal-img { max-width: 100%; border-radius: 6px; border: 1px solid var(--border); }
.nos-l00-journal-detail-title { font-size: 8pt; margin: 0 0 4px; }
.nos-l00-journal-detail-meta { font-size: 6.5pt; color: var(--text-muted); margin: 0 0 8px; }
.nos-l00-journal-regions {
  margin: 8px 0; padding: 8px; border-radius: 8px;
  background: #fff; border: 1px solid var(--border);
}
.nos-l00-journal-region-list {
  list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px;
}
.nos-l00-journal-region {
  display: flex; align-items: center; gap: 8px; font-size: 7pt;
}
.nos-l00-journal-region-swatch {
  flex-shrink: 0; width: 28px; height: 18px; border-radius: 4px;
  border: 1px solid rgba(15, 23, 42, 0.18); font-size: 6pt;
  display: flex; align-items: center; justify-content: center;
}
.nos-l00-journal-region-meta { line-height: 1.35; color: var(--text); }
.nos-l00-journal-dom {
  margin: 8px 0; padding: 8px; border-radius: 8px;
  background: #f8fafc; border: 1px solid var(--border);
}
.nos-l00-journal-dom-title {
  margin: 0 0 6px; font-size: 7pt; font-weight: 800; color: var(--accent);
}
.nos-l00-journal-dom-notice {
  margin: 0 0 8px; font-size: 6.5pt; line-height: 1.4; color: var(--text-muted);
}
.nos-l00-journal-dom-preview-wrap {
  margin: 8px 0; border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; background: #fff;
}
.nos-l00-journal-dom-preview-label {
  display: block; padding: 4px 8px; font-size: 6pt; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted);
  background: #f1f5f9; border-bottom: 1px solid var(--border);
}
.nos-l00-journal-dom-frame {
  display: block; width: 100%; height: 220px; border: none; background: #f8fafc;
}
.nos-l00-journal-dom-text {
  margin: 0; font-size: 7.5pt; line-height: 1.45; white-space: pre-wrap;
  word-break: break-word; max-height: 200px; overflow: auto;
  color: var(--text); font-family: inherit;
}
.nos-l00-journal-dom-toggle {
  margin-top: 6px; font-size: 6.5pt; background: none; border: none;
  color: var(--accent); cursor: pointer; padding: 0;
}
.nos-l00-journal-dom-raw {
  margin: 6px 0 0; font-size: 6pt; font-family: var(--mono);
  max-height: 120px; overflow: auto; background: #fff;
  border: 1px solid var(--border); border-radius: 6px; padding: 6px;
}
.nos-l00-journal-note {
  font-size: 10pt; white-space: pre-wrap; margin: 8px 0 0;
  max-height: 200px; overflow-y: auto; line-height: 1.45;
}
.nos-l00-journal-detail-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
}
.nos-l00-journal-detail-actions {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px; flex-shrink: 0;
}
.nos-l00-journal-gps-chip {
  display: inline-flex; align-items: center; gap: 5px;
  max-width: min(42vw, 240px);
  font-size: 7pt; font-family: var(--mono);
  padding: 4px 10px; border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #eff6ff; color: #1d4ed8;
  cursor: pointer;
}
.nos-l00-journal-gps-chip:hover { background: #dbeafe; }
.nos-l00-journal-gps-chip-label { font-weight: 800; flex-shrink: 0; }
.nos-l00-journal-gps-chip code {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: min(36vw, 180px);
}
.nos-l00-journal-edit-btn {
  flex-shrink: 0; font-size: 7pt; padding: 3px 10px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--bg-elevated, #fff);
  color: var(--accent); cursor: pointer; font-weight: 600;
}
.nos-l00-journal-edit-label {
  display: block; font-size: 10.5pt; font-weight: 700; color: var(--text-muted);
  margin: 8px 0 4px;
}
.nos-l00-journal-edit-input, .nos-l00-journal-edit-textarea {
  width: 100%; box-sizing: border-box;
  font-size: 12pt; padding: 8px 10px; border-radius: 6px;
  border: 1px solid var(--border); background: #fff; color: var(--text);
  font-family: inherit;
}
.nos-l00-journal-edit-textarea { min-height: 150px; resize: vertical; line-height: 1.45; }
.nos-l00-journal-attach-block { margin-top: 10px; }
.nos-l00-journal-attach-drop {
  border: 2px dashed rgba(59, 130, 246, 0.35);
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.04);
  padding: 12px;
  text-align: center;
  outline: none;
}
.nos-l00-journal-attach-drop:focus-visible {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.25);
}
.nos-l00-journal-attach-hint {
  font-size: 10pt; color: var(--text-muted); margin: 0 0 8px;
}
.nos-l00-journal-attach-input {
  position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none;
}
.nos-l00-journal-attach-list {
  list-style: none; margin: 10px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.nos-l00-journal-attach-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 6px;
  border: 1px solid var(--border); background: #fff;
}
.nos-l00-journal-attach-thumb {
  width: 56px; height: 42px; object-fit: cover; border-radius: 4px;
  border: 1px solid var(--border); flex-shrink: 0;
}
.nos-l00-journal-attach-name {
  flex: 1; font-size: 10pt; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nos-l00-journal-attach-remove {
  flex-shrink: 0; border: none; background: transparent;
  color: #b91c1c; cursor: pointer; font-size: 11pt; padding: 2px 6px;
}
.nos-l00-journal-attach-gallery { margin-top: 10px; }
.nos-l00-journal-attach-gallery-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.nos-l00-journal-attach-gallery-img {
  width: 100%; max-height: 140px; object-fit: contain;
  border-radius: 6px; border: 1px solid var(--border); background: #fff;
}
.nos-l00-journal-attach-gallery-name {
  display: block; font-size: 9pt; margin-top: 4px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nos-l00-journal-edit-actions {
  display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px;
}
.nos-l00-journal-btn {
  font-size: 7.5pt; padding: 5px 12px; border-radius: 6px;
  border: 1px solid var(--border); background: #fff; cursor: pointer;
}
.nos-l00-journal-btn--primary {
  border-color: var(--accent); background: var(--accent); color: #fff; font-weight: 700;
}
.nos-l00-journal-empty, .nos-l00-journal-status {
  font-size: 7pt; color: var(--text-muted); text-align: center; padding: 12px;
}
.nos-doc-strip-thumb--journal { font-size: 14pt; line-height: 1; }

.nos-doc-strip-inner {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}
.nos-doc-strip-spacer { flex: 1; min-width: 12px; }
.nos-doc-strip-system {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
  padding-left: 8px;
  border-left: 1px solid rgba(147, 197, 253, 0.28);
}
.nos-doc-strip-thumb {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: linear-gradient(180deg, #fff 0%, #f1f5f9 100%);
  line-height: 1;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.28);
}
.nos-doc-strip-thumb--cal {
  background: linear-gradient(180deg, #fff 0%, #f1f5f9 100%);
}
.nos-doc-strip-thumb-mon {
  font-size: 5.5pt;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent);
  letter-spacing: 0.3px;
}
.nos-doc-strip-thumb-day {
  font-size: 12pt;
  font-weight: 900;
  color: var(--text);
  margin-top: 1px;
}
.nos-doc-strip-thumb--clock { gap: 0; }
.nos-doc-strip-thumb-time {
  font-size: 8pt;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-mono);
}
.nos-doc-strip-thumb-ampm {
  font-size: 5pt;
  font-weight: 700;
  color: var(--text-muted);
}
.nos-doc-strip-thumb--osref {
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.06);
  gap: 2px;
}
.nos-doc-strip-thumb-osref-label {
  font-size: 5.5pt;
  font-weight: 900;
  color: #dc2626;
  letter-spacing: 0.5px;
}
.nos-doc-strip-tool--osref {
  border-color: rgba(239, 68, 68, 0.25) !important;
}
.nos-doc-strip-tool--osref:hover {
  border-color: rgba(239, 68, 68, 0.45) !important;
  color: #dc2626 !important;
}
.nos-doc-strip-tool--osref.recording {
  animation: nos-osref-pulse 1s ease infinite;
}
.nos-doc-strip-tool--osref .nos-osref-rec-dot {
  width: 7px;
  height: 7px;
}
.nos-osref-rec {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 72px;
  padding: 10px 12px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.06);
  color: #dc2626;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(30, 58, 95, 0.06);
  transition: background 0.15s, border-color 0.15s;
}
.nos-osref-rec:hover { background: rgba(239, 68, 68, 0.12); }
.nos-osref-rec.recording {
  border-color: rgba(239, 68, 68, 0.6);
  animation: nos-osref-pulse 1s ease infinite;
}
@keyframes nos-osref-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.25); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}
.nos-osref-rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.nos-osref-rec-label {
  font-size: 7pt;
  font-weight: 900;
  letter-spacing: 1px;
  font-family: var(--font-mono);
}
.nos-osref-rec-sub {
  font-size: 6pt;
  font-weight: 700;
  opacity: 0.85;
}

.nos-canvas-l00-desktop {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 14px 18px 88px;
}
/* L00 clearing — operator confirmation substrate (data-nos-clearing="l00") */
[data-nos-clearing="l00"] .nos-canvas-l00-desktop-head {
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.65) 0%, transparent 100%);
}
.nos-canvas-l00-desktop-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex-shrink: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.nos-canvas-l00-layer-badge {
  margin-left: auto;
  font-size: 7pt;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--accent);
  font-family: var(--font-mono);
}
.nos-canvas-l00-desktop-body { flex: 1; position: relative; min-height: 0; }
/* Blind layout URL — live chrome, simulated middle only (journal #160) */
.nos-canvas-l00-desktop--layout-blind .nos-canvas-l00-desktop-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 12px 12px;
}
.nos-layout-blind-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 8px;
}
.nos-layout-blind-banner {
  flex-shrink: 0;
  margin: 0;
  padding: 6px 10px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.nos-layout-blind-banner-slug {
  font-family: var(--font-mono);
  color: #3b82f6;
  text-transform: none;
  letter-spacing: 0;
}
.nos-layout-blind-banner-link {
  margin-left: auto;
  font-size: 0.65rem;
  text-transform: none;
  color: #3b82f6;
  text-decoration: none;
}
.nos-layout-blind-banner-link:hover { text-decoration: underline; }
.nos-layout-blind-slot {
  flex: 1;
  min-height: 280px;
  border-radius: 10px;
  border: 2px dashed #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background: #fff;
}
.nos-layout-blind-slot--grid {
  background:
    repeating-linear-gradient(0deg, transparent, transparent 23px, rgba(148, 163, 184, 0.18) 23px, rgba(148, 163, 184, 0.18) 24px),
    repeating-linear-gradient(90deg, transparent, transparent 23px, rgba(148, 163, 184, 0.18) 23px, rgba(148, 163, 184, 0.18) 24px),
    #f8fafc;
}
.nos-layout-blind-slot-inner { max-width: 22rem; }
.nos-layout-blind-slot-kicker {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.5rem;
}
.nos-layout-blind-slot-title {
  display: block;
  font-size: 1rem;
  color: #1a2744;
  margin-bottom: 0.5rem;
}
.nos-layout-blind-slot-hint {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.nos-layout-blind-slot--pub3 {
  padding: 12px;
  gap: 10px;
  align-items: stretch;
  background: #f1f5f9;
}
.nos-layout-blind-col {
  flex: 1;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.6);
}
.nos-layout-blind-col--center { flex: 1.4; border-color: #94a3b8; color: #64748b; }
.nos-layout-blind-col-kicker {
  display: block;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  opacity: 0.75;
  margin-bottom: 0.35rem;
}
/* L01/L02 layer blind chrome strips */
.nos-layer-blind-chrome {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 2px dashed #64748b;
  background: linear-gradient(90deg, rgba(30, 58, 95, 0.08), rgba(59, 130, 246, 0.06));
  font-size: 0.72rem;
}
.nos-layer-blind-chrome--L01 { border-color: #0ea5e9; }
.nos-layer-blind-chrome--L02 { border-color: #3b82f6; background: linear-gradient(90deg, rgba(26, 39, 68, 0.1), rgba(59, 130, 246, 0.08)); }
.nos-layer-blind-chrome-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 4px;
  background: #1a2744;
  color: #f8fafc;
}
.nos-layer-blind-chrome-title { font-weight: 600; color: #1a2744; flex: 1; }
.nos-layer-blind-chrome-live {
  font-size: 0.62rem;
  color: #64748b;
  font-family: var(--font-mono);
}
.nos-layer-blind-pass {
  flex: 1;
  min-height: 120px;
  border: 2px dashed #cbd5e1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  background: rgba(248, 250, 252, 0.9);
}
.nos-layer-blind-ref {
  flex-shrink: 0;
  margin: 0;
  font-size: 0.72rem;
  color: #64748b;
}
.nos-layer-blind-ref a { color: #3b82f6; }
/* Compose blind stack */
.nos-compose-blind-wrap { gap: 10px; }
.nos-compose-blind-main {
  flex: 1;
  display: flex;
  gap: 12px;
  min-height: 0;
}
.nos-compose-blind-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.nos-compose-blind-l00 {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  font-size: 0.68rem;
  color: #64748b;
  border-left: 3px solid #1a2744;
}
.nos-compose-blind-l00-badge {
  font-weight: 700;
  color: #1a2744;
}
.nos-compose-blind-canisters {
  flex-shrink: 0;
  width: 14rem;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.68rem;
  overflow-y: auto;
}
.nos-compose-blind-canisters-title {
  margin: 0 0 8px;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
}
.nos-compose-blind-canisters-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.nos-compose-blind-canisters-list li {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}
.nos-compose-blind-canister-id { display: block; font-size: 0.62rem; color: #3b82f6; }
.nos-compose-blind-canister-slot { display: block; color: #64748b; }
.nos-compose-blind-canister-desc { display: block; color: #94a3b8; margin-top: 2px; }
/* Template layer library gallery */
.nos-tpl-lib-wrap {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-bottom: 1rem;
}
.nos-tpl-lib-section-title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: #1a2744;
}
.nos-tpl-lib-section-hint {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.45;
}
.nos-tpl-lib-layer-group { margin-bottom: 0.5rem; }
.nos-tpl-lib-layer-head {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nos-tpl-lib-layer-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: #1a2744;
  color: #fff;
}
.nos-tpl-lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 8px;
}
.nos-tpl-lib-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.nos-tpl-lib-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.12);
}
.nos-tpl-lib-card-layer {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #64748b;
}
.nos-tpl-lib-card-title { font-size: 0.78rem; color: #1a2744; }
.nos-tpl-lib-card-id {
  font-size: 0.62rem;
  color: #3b82f6;
  background: #f1f5f9;
  padding: 1px 4px;
  border-radius: 3px;
  align-self: flex-start;
}
.nos-tpl-lib-card-status {
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}
.nos-tpl-lib-card-status[data-status="canonical"] { color: #16a34a; }
.nos-tpl-lib-card-slots { font-size: 0.62rem; color: #94a3b8; }
.nos-tpl-lib-card-ref { font-size: 0.6rem; color: #64748b; }
.nos-tpl-lib-canister-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.72rem;
}
.nos-tpl-lib-canister-row {
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: grid;
  gap: 2px;
}
.nos-tpl-lib-canister-row code { color: #3b82f6; font-size: 0.68rem; }
.nos-tpl-lib-bindings { display: flex; flex-direction: column; gap: 6px; font-size: 0.72rem; }
.nos-tpl-lib-binding-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: #f8fafc;
  border-radius: 6px;
}
.nos-tpl-lib-binding-match { color: #1a2744; font-weight: 600; }
.nos-tpl-lib-binding-layout { color: #94a3b8; }
.nos-canvas-l00-hint {
  position: absolute;
  bottom: 12px;
  left: 16px;
  right: 320px;
  font-size: 7.5pt;
  color: var(--text-muted);
}

/* ── L00 investor deck (canvas substrate) ─ */
.nos-l00-investor-deck {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.nos-l00-investor-head h2 {
  font-size: 13pt;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.nos-l00-investor-head p {
  font-size: 8pt;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.nos-l00-investor-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 7.5pt;
  color: var(--text-muted);
}
.nos-l00-investor-links a {
  color: var(--accent);
  text-decoration: none;
}
.nos-l00-investor-links a:hover { text-decoration: underline; }
.nos-l00-investor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
}
.nos-l00-investor-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.nos-l00-investor-tile:hover {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}
.nos-l00-investor-tile-icon { font-size: 16pt; line-height: 1; }
.nos-l00-investor-tile-title {
  font-size: 9pt;
  font-weight: 700;
  color: var(--text);
}
.nos-l00-investor-tile-sub {
  font-size: 7pt;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.nos-l00-investor-capture-hint {
  font-size: 7.5pt;
  color: var(--text-muted);
  padding-top: 4px;
  border-top: 1px solid var(--border-light);
}
.nos-l00-investor-status {
  font-size: 7pt;
  color: var(--accent);
  font-family: var(--font-mono);
  min-height: 1em;
}

/* ── L00 channels deck (canvas substrate) ─ */
.nos-l00-channels-deck {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nos-l00-channels-head h2 {
  font-size: 13pt;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.nos-l00-channels-head p {
  font-size: 8pt;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.nos-l00-channels-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 7.5pt;
  color: var(--text-muted);
}
.nos-l00-channels-links a {
  color: var(--accent);
  text-decoration: none;
}
.nos-l00-channels-links a:hover { text-decoration: underline; }
.nos-l00-channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
}
.nos-l00-channels-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.nos-l00-channels-tile:hover {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}
.nos-l00-channels-tile-icon { font-size: 16pt; line-height: 1; }
.nos-l00-channels-tile-title {
  font-size: 9pt;
  font-weight: 700;
  color: var(--text);
}
.nos-l00-channels-tile-sub {
  font-size: 7pt;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.nos-l00-channels-hint {
  font-size: 7.5pt;
  color: var(--text-muted);
  padding-top: 4px;
  border-top: 1px solid var(--border-light);
}
.nos-l00-channels-status {
  font-size: 7pt;
  color: var(--accent);
  font-family: var(--font-mono);
  min-height: 1em;
}

.nos-canvas-l00-decks {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  min-height: 0;
  overflow: auto;
}
.nos-canvas-l00-deck-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid var(--border-light);
}
.nos-canvas-l00-deck-link {
  font-size: 8pt;
  color: var(--accent);
  text-decoration: none;
}
.nos-canvas-l00-deck-link:hover { text-decoration: underline; }
.nos-canvas-l00-desktop--channels .nos-canvas-l00-desktop-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.nos-l00-doc-win {
  height: 100%;
  overflow: auto;
  background: #f8fafc;
}
.nos-l00-doc-loading,
.nos-l00-doc-error {
  font-size: 8pt;
  padding: 12px;
  color: var(--text-muted);
}
.nos-l00-doc-error { color: #b91c1c; }
.ch-doc-body--l00 {
  padding: 0 0 24px;
  min-height: 100%;
}

/* ── NOS 2.1 launch dock — navy bar + embossed N only (journal #144) ─ */
.nos-launch-dock-shell {
  flex-shrink: 0;
  padding: 0 12px 10px env(safe-area-inset-bottom, 0);
  z-index: 20;
}
.nos-launch-dock-bevel {
  height: 3px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(200, 210, 225, 0.35) 40%,
    rgba(26, 39, 68, 0.15) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}
.nos-launch-n-slot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  align-self: center;
  padding: 0 12px 0 4px;
  margin-right: 2px;
}
.nos-launch-dock-bar .nos-doc-strip-inner .nos-launch-n-slot {
  align-self: center;
}
.nos-launch-n-emboss {
  font-size: 2.35rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(168deg, #f8fafc 0%, #e2e8f0 12%, #94a3b8 35%,
    #64748b 50%, #cbd5e1 70%, #f1f5f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.9))
    drop-shadow(0 2px 2px rgba(71, 85, 105, 0.45))
    drop-shadow(0 -1px 0 rgba(51, 65, 85, 0.55));
  user-select: none;
  pointer-events: none;
}
.nos-launch-dock-bar.nos-doc-strip {
  min-height: 54px;
  padding: 6px 14px 6px 10px;
  border-radius: 0 14px 14px 14px;
  background:
    repeating-linear-gradient(90deg, transparent 0, transparent 2px,
      rgba(255, 255, 255, 0.025) 2px, rgba(255, 255, 255, 0.025) 4px),
    linear-gradient(180deg, #2a3f63 0%, #1a2744 12%, #152238 48%, #0f1a2e 100%);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-top: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -2px 6px rgba(0, 0, 0, 0.28),
    0 -10px 32px rgba(26, 39, 68, 0.32),
    0 4px 14px rgba(15, 23, 42, 0.2);
}
.nos-launch-dock-bar .nos-doc-strip-inner {
  align-items: center;
  padding-bottom: 0;
}
.nos-launch-dock-bar .nos-doc-strip-system {
  align-items: center;
}
.nos-launch-dock-bar .nos-doc-strip-tool {
  min-width: 46px;
  padding: 3px 7px 2px;
  gap: 2px;
  border-radius: 10px;
}
.nos-launch-dock-bar .nos-doc-strip-tool:hover {
  transform: translateY(-2px);
}
.nos-launch-dock-bar .nos-doc-strip-icon {
  font-size: 15pt;
}
.nos-launch-dock-bar .nos-doc-strip-label {
  font-size: 6pt;
  line-height: 1.1;
}
/* Right cluster: flatten thumbs to match left icon scale */
.nos-launch-dock-bar .nos-doc-strip-thumb {
  width: auto;
  height: auto;
  min-height: 1.05em;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
.nos-launch-dock-bar .nos-doc-strip-thumb--cal {
  gap: 0;
  line-height: 1;
}
.nos-launch-dock-bar .nos-doc-strip-thumb-mon {
  font-size: 4.5pt;
}
.nos-launch-dock-bar .nos-doc-strip-thumb-day {
  font-size: 9pt;
  margin-top: 0;
}
.nos-launch-dock-bar .nos-doc-strip-thumb--journal {
  font-size: 15pt;
}
.nos-launch-dock-bar .nos-doc-strip-thumb--clock {
  gap: 0;
  line-height: 1;
}
.nos-launch-dock-bar .nos-doc-strip-thumb-time {
  font-size: 7pt;
}
.nos-launch-dock-bar .nos-doc-strip-thumb-ampm {
  font-size: 4.5pt;
}
.nos-launch-dock-bar .nos-doc-strip-thumb--osref {
  flex-direction: row;
  align-items: center;
  gap: 2px;
  background: transparent;
  border: none;
}
.nos-launch-dock-bar .nos-doc-strip-thumb-osref-label {
  font-size: 5pt;
}
.nos-launch-dock-bar .nos-doc-strip-tool--osref .nos-osref-rec-dot {
  width: 5px;
  height: 5px;
}
.nos-launch-dock-bar .nos-launch-n-emboss {
  font-size: 2rem;
}
.nos-doc-strip-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 56px;
  padding: 8px 10px 6px;
  border: 1px solid rgba(191, 219, 254, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18);
}
.nos-doc-strip-tool:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(147, 197, 253, 0.65);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.28);
}
.nos-doc-strip-tool--active {
  background: rgba(59, 130, 246, 0.28);
  border-color: #93c5fd;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(147, 197, 253, 0.35), 0 6px 16px rgba(15, 23, 42, 0.24);
}
.nos-doc-strip-icon { font-size: 16pt; line-height: 1; filter: drop-shadow(0 1px 1px rgba(15, 23, 42, 0.25)); }
.nos-doc-strip-label {
  font-size: 6.5pt;
  font-family: var(--font-mono);
  letter-spacing: 0.2px;
  color: rgba(226, 232, 240, 0.92);
}

/* ── L0 Settings panel (os_settings groups) ──────────────────────── */
.nos-os-settings {
  display: flex;
  gap: 10px;
  min-height: 320px;
  font-size: 8pt;
}
.nos-os-settings-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  width: 128px;
  border-right: 1px solid var(--border);
  padding-right: 8px;
}
.nos-os-settings-nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 7.5pt;
}
.nos-os-settings-nav-btn:hover {
  background: rgba(59, 130, 246, 0.08);
  color: var(--text);
}
.nos-os-settings-nav-btn--active {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.25);
  color: var(--accent);
  font-weight: 700;
}
.nos-os-settings-nav-icon { font-size: 10pt; line-height: 1; }
.nos-os-settings-body { flex: 1; min-width: 0; }
.nos-os-settings-head { margin-bottom: 10px; }
.nos-os-settings-title {
  font-size: 9.5pt;
  font-weight: 800;
  color: var(--text);
}
.nos-os-settings-desc {
  margin-top: 4px;
  font-size: 7pt;
  color: var(--text-muted);
  line-height: 1.4;
}
.nos-os-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.nos-os-settings-k {
  font-size: 7.5pt;
  font-weight: 700;
  color: var(--text-muted);
}
.nos-os-settings-v {
  font-size: 7.5pt;
  font-family: var(--font-mono);
  color: var(--text);
}
.nos-os-settings-input {
  flex: 1;
  min-width: 100px;
  max-width: 160px;
  font-size: 8pt;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.nos-os-settings-btn {
  margin-top: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--accent);
  font-size: 7.5pt;
  font-weight: 700;
  cursor: pointer;
}
.nos-os-settings-btn:hover { border-color: var(--accent); }
.nos-os-settings-note {
  margin-top: 10px;
  font-size: 7pt;
  color: var(--text-muted);
  line-height: 1.45;
}
.nos-os-settings-status {
  margin-top: 10px;
  font-size: 7pt;
  font-family: var(--font-mono);
  color: var(--accent);
  min-height: 1.2em;
}
.nos-os-settings-doctrine {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nos-os-settings-doctrine li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid var(--border-light);
}
.nos-os-settings-doctrine-id {
  font-size: 6.5pt;
  font-family: var(--font-mono);
  color: var(--accent);
}
.nos-l00-tool-stub { padding: 4px 2px; }
.nos-l00-tile-lead {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  font-size: 8pt;
}
.nos-l00-tile-copy {
  font-size: 7.5pt;
  color: var(--text-muted);
  line-height: 1.4;
}

/* NosWindow frame (consumer-provided CSS for the nos-templates primitive) */
.nos-window {
  position: absolute; display: flex; flex-direction: column;
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18); overflow: hidden;
  min-width: 220px; min-height: 140px;
}
.nos-window-bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 28px; padding: 0 8px; background: #eef2f7;
  border-bottom: 1px solid var(--border); cursor: move; user-select: none; flex-shrink: 0;
}
.nos-window-title {
  font-size: 8pt; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.nos-window-ctrls { display: flex; gap: 4px; }
.nos-window-ctrl {
  width: 18px; height: 18px; border: none; background: transparent; border-radius: 4px;
  cursor: pointer; color: var(--text-muted); font-size: 11pt; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.nos-window-ctrl:hover { background: rgba(0, 0, 0, 0.06); color: var(--text); }
.nos-window-close:hover { background: #ef4444; color: #fff; }
.nos-window-body { flex: 1; overflow: auto; min-height: 0; }
.nos-window-min { height: auto !important; }
.nos-window-min .nos-window-body { display: none; }
.nos-window-resize { position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; cursor: se-resize; }
.nos-window-resize::after {
  content: ""; position: absolute; right: 3px; bottom: 3px; width: 6px; height: 6px;
  border-right: 2px solid var(--border); border-bottom: 2px solid var(--border);
}
.nos-surf-stub { padding: 16px; color: var(--text-muted); font-size: 9pt; }

/* ROSA-lite IRIS (distribution simple assistant) */
.iris-lite { display: flex; flex-direction: column; height: 100%; }
.iris-lite-dialog { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.iris-lite .iris-send-bar { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--border); }
.iris-lite .iris-send-input { flex: 1; resize: none; }

body {
  font-family: var(--font);
  font-size: 9pt;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

/* ── SPMC Root Layout ─────────────────────────────────── */
.spmc-root {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* NexOS (Tauri) — sovereign URL bar; desktop has no browser chrome to paste into */
.nos-tauri-urlbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  -webkit-app-region: drag;
}
.nos-tauri-urlbar-label {
  font-weight: 900;
  font-size: 8pt;
  letter-spacing: 1.5px;
  color: var(--text);
  flex-shrink: 0;
  -webkit-app-region: drag;
}
.nos-tauri-urlbar-input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  color: var(--text);
  font-size: 9pt;
  font-family: var(--font-mono);
  -webkit-app-region: no-drag;
}
.nos-tauri-urlbar-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.12);
}
.nos-tauri-urlbar-go {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 8pt;
  font-weight: 600;
  cursor: pointer;
  -webkit-app-region: no-drag;
}
.nos-tauri-urlbar-go:hover { background: #2563eb; }

.spmc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  gap: 0.5rem;
  background: var(--bg-dark);
  color: #cbd5e1;
  font-size: 8pt;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.spmc-breadcrumb {
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  overflow: hidden;
  flex: 1;
  min-width: 0;
  font-size: 7pt;
}
.spmc-breadcrumb .spmc-home-link { color: #94a3b8; text-decoration: none; flex-shrink: 0; }
.spmc-breadcrumb .spmc-home-link:hover { color: #fff; }
.spmc-crumb {
  color: #64748b;
  text-decoration: none;
  white-space: nowrap;
  font-size: 7pt;
  transition: color .1s;
}
.spmc-crumb:hover { color: #cbd5e1; }
.spmc-crumb-sep { color: #334155; font-size: 7pt; flex-shrink: 0; }
.spmc-crumb-current {
  color: #e2e8f0;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 7pt;
}
.spmc-crumb-tab {
  color: #60a5fa;
  font-weight: 600;
  white-space: nowrap;
  font-size: 7pt;
  flex-shrink: 0;
}

/* Toolbar buttons — shared base */
.spmc-gps-btn,
.spmc-rec-btn,
.spmc-refresh-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  color: #94a3b8;
  font-size: 7.5pt;
  font-family: var(--font-mono);
  font-weight: 600;
  cursor: pointer;
  padding: 3px 10px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.spmc-gps-btn:hover,
.spmc-rec-btn:hover,
.spmc-refresh-btn:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}

/* Live GPS chip — IRIS DEV topbar */
.spmc-gps-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
  max-width: min(48vw, 520px);
  margin: 0 0.35rem;
  padding: 2px 8px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(217, 119, 6, 0.45);
  background: rgba(217, 119, 6, 0.12);
  color: #fbbf24;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: background 0.1s, border-color 0.1s;
}
.spmc-gps-chip:hover {
  background: rgba(217, 119, 6, 0.22);
  border-color: rgba(251, 191, 36, 0.55);
}
.spmc-gps-chip-label {
  font-size: 7pt;
  font-weight: 800;
  letter-spacing: 0.4px;
  flex-shrink: 0;
  color: #fcd34d;
}
.spmc-gps-chip-uri {
  font-size: 6.5pt;
  color: #fde68a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* System tiles in topbar */
.spmc-sys-tiles {
  display: flex;
  gap: 2px;
  margin-left: 1rem;
}

.spmc-sys-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  font-size: 11pt;
  text-decoration: none;
  opacity: 0.5;
  transition: opacity 0.15s, background 0.15s;
}
.spmc-sys-tile:hover {
  opacity: 1;
  background: rgba(255,255,255,0.08);
}

.spmc-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-left: auto;
}

.spmc-rec-btn { gap: 4px; font-weight: 700; flex-shrink: 0; }
.spmc-rec-btn.recording { color: #ef4444; border-color: rgba(239,68,68,0.4); }

.spmc-rec-btn-compact {
  width: auto;
  min-width: 3.25rem;
  padding: 4px 8px;
  flex-shrink: 0;
}

.rec-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #475569;
}
.spmc-rec-btn.recording .rec-dot {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239,68,68,0.6);
}

/* ── REC Dropdown ───────────────────────────────────── */
.spmc-rec-wrapper {
  position: relative;
}

.rec-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--bg-dark);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 4px;
  min-width: 180px;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.rec-menu-item {
  display: block;
  width: 100%;
  padding: 6px 10px;
  background: none;
  border: none;
  border-radius: 4px;
  color: #cbd5e1;
  font-size: 7.5pt;
  font-family: var(--font);
  cursor: pointer;
  text-align: left;
}
.rec-menu-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* ── Snapshot Browser Tab ──────────────────────────── */
.spmc-snapshots-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.spmc-snapshots-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.spmc-snapshots-title {
  font-size: 9pt;
  font-weight: 700;
  color: var(--text);
}

.spmc-snapshots-toggle {
  display: flex;
  gap: 2px;
}

.spmc-view-btn {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: none;
  color: var(--text-muted);
  font-size: 6.5pt;
  font-family: var(--font-mono);
  cursor: pointer;
}
.spmc-view-btn.active {
  background: rgba(59,130,246,0.1);
  color: var(--accent);
  border-color: var(--accent);
}

.spmc-snapshots-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.spmc-snapshot-card {
  padding: 0.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.spmc-snapshot-card:hover { border-color: var(--accent); }

.spmc-snapshot-title {
  font-size: 8pt;
  font-weight: 700;
  color: var(--text);
}

.spmc-snapshot-meta {
  display: flex;
  justify-content: space-between;
  font-size: 6.5pt;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 0.15rem;
}

.spmc-snapshot-notes {
  font-size: 7pt;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-style: italic;
}

/* ── Full Scroll Viewer ───────────────────────────────── */
.spmc-scroll-full {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.scroll-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.4rem;
  flex-shrink: 0;
}

.scroll-session-id {
  font-family: var(--font-mono);
  font-size: 8pt;
  color: var(--accent);
  font-weight: 600;
}

.scroll-line-count {
  font-size: 7pt;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.scroll-content-filter {
  margin-bottom: 0.4rem;
  flex-shrink: 0;
}

.scroll-lines {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.scroll-line {
  padding: 0.4rem 0.5rem;
  border-radius: 4px;
  background: var(--bg-panel);
}
.scroll-line:hover { background: var(--border-light); }

.scroll-line-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.15rem;
}

.scroll-line-speaker {
  font-size: 7pt;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.scroll-line-time {
  font-size: 6.5pt;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.scroll-line-content {
  font-size: 8pt;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}

/* refresh-btn styles merged into shared toolbar base above */

.spmc-status { color: var(--green); font-weight: 700; }

/* ── Multi-Column Layout ──────────────────────────────── */
/* Flex row, not grid: the layout now has 6 children (left, center, content
   window, right + their resize handles). The resize handles set explicit px
   `width` on the column elements, so flex with fixed-basis side columns is the
   correct model. (A fixed 3-track grid wrapped children 4-6 onto a 2nd row,
   dropping the right sidebar to the bottom-left and breaking the dividers.) */
.spmc-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.spmc-left {
  width: 15rem;
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  padding: 0.75rem;
  overflow-y: auto;
}

.spmc-center {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0.75rem;
}

.spmc-right {
  width: 15rem;
  flex-shrink: 0;
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  padding: 0.75rem;
  overflow-y: auto;
}

.spmc-tree-header,
.spmc-refs-header,
.spmc-context-header {
  font-size: 7pt;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin: 0.75rem 0 0.5rem;
}

.spmc-tree-header:first-child { margin-top: 0; }

/* ── Mini Scroll ──────────────────────────────────────── */
.nos-mini-scroll {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.nos-mini-scroll-header {
  font-family: var(--font-mono);
  font-size: 8pt;
  color: var(--accent);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 0.5rem;
}

.nos-mini-scroll-filter { margin-bottom: 0.5rem; }

.nos-mini-scroll-lines {
  flex: 1;
  overflow-y: auto;
}

.nos-scroll-line {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0.5rem;
  margin-bottom: 2px;
  border-radius: 4px;
}
.nos-scroll-line:hover { background: var(--border-light); }

.nos-scroll-icon {
  flex-shrink: 0;
  width: 1.25rem;
  text-align: center;
}

.nos-scroll-body { flex: 1; min-width: 0; }

.nos-scroll-content {
  font-size: 8.5pt;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Quick Note ───────────────────────────────────────── */
.spmc-quick-note {
  flex-shrink: 0;
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-light);
  margin-top: 0.5rem;
}

.spmc-note-mode {
  display: flex;
  gap: 2px;
  margin-bottom: 0.25rem;
}

.spmc-mode-btn {
  padding: 1px 8px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: none;
  color: var(--text-muted);
  font-size: 6.5pt;
  font-family: var(--font-mono);
  font-weight: 700;
  cursor: pointer;
}
.spmc-mode-btn.active {
  background: rgba(59,130,246,0.1);
  color: var(--accent);
  border-color: var(--accent);
}

.spmc-note-area {
  flex: 1;
  resize: none;
}

/* ── Shared Components ────────────────────────────────── */
.nos-input {
  width: 100%;
  padding: 0.4rem 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 8pt;
  font-family: var(--font);
  color: var(--text);
}
.nos-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.nos-btn {
  border: none;
  border-radius: 5px;
  padding: 0.4rem 1rem;
  font-size: 8pt;
  font-weight: 700;
  font-family: var(--font-mono);
  cursor: pointer;
  letter-spacing: 0.3px;
}
.nos-btn-primary {
  background: var(--accent);
  color: #fff;
}
.nos-btn-primary:hover { background: var(--accent-hover); }
.nos-btn-muted {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.nos-section-header { margin-bottom: 1rem; }
.nos-section-callsign {
  font-size: 7pt;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}
.nos-section-name {
  font-size: 16pt;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
}

.nos-tag-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 6.5pt;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #fff;
  letter-spacing: 0.5px;
}

.nos-loading {
  color: var(--text-muted);
  font-size: 8pt;
  padding: 1rem;
  text-align: center;
}

.nos-section-subtitle {
  font-size: 8.5pt;
  color: var(--text-muted);
}

/* ── NOS 2.0 Home Screen ─────────────────────────────── */
.nos-home {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 3rem 2rem 2rem;
  background: var(--bg);
}

.nos-home-header {
  text-align: center;
  margin-bottom: 2rem;
}

.nos-home-logo {
  font-size: 36pt;
  margin-bottom: 0.25rem;
  color: var(--accent);
}

.nos-home-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.nos-home-title {
  font-size: 22pt;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  margin: 0;
}

.nos-refresh-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 14pt;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color 0.15s, border-color 0.15s;
}
.nos-refresh-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.nos-home-subtitle {
  font-size: 9pt;
  color: var(--text-muted);
  margin: 0.25rem 0 0;
  font-weight: 500;
}

.nos-home-desktop-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 8pt;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.nos-home-desktop-link:hover { text-decoration: underline; }

/* ── NOS 2.0 Desktop (`/`) ─────────────────────────── */
.nos-wireframe-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  margin: 0.5rem 0 0.25rem;
  font-size: 0.78rem;
  color: var(--text-sec);
}
.nos-wireframe-path a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.nos-wireframe-path a:hover {
  text-decoration: underline;
}
.nos-wireframe-path span {
  color: var(--muted);
  user-select: none;
}

.nos-desktop-hint {
  margin-top: 0.35rem;
  font-size: 7.5pt;
  color: var(--text-muted);
  font-weight: 500;
}

.nos-desktop-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: none;
  width: 100%;
  margin: 0 auto;
}
@media (max-width: 1100px) {
  .nos-desktop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .nos-desktop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .nos-desktop-grid { grid-template-columns: 1fr; }
}

.nos-tile-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: grab;
  transition: border-color 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.nos-tile-wrap:active { cursor: grabbing; }
.nos-tile-wrap:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.08);
}
.nos-tile-wrap.nos-desktop-tile {
  padding: 1.5rem 1rem 1rem;
}

.nos-tile-fav {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 2;
  border: none;
  background: transparent;
  font-size: 13pt;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  opacity: 0.45;
  padding: 0.1rem 0.2rem;
  border-radius: 4px;
  transition: color 0.15s, opacity 0.15s, transform 0.1s;
}
.nos-tile-fav:hover {
  opacity: 1;
  color: var(--text);
  transform: scale(1.1);
}
.nos-tile-fav.active {
  opacity: 1;
  color: var(--text);
}
.nos-tile-fav.active:hover { color: #1a2744; }

.nos-tile-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  cursor: pointer;
  outline: none;
}
.nos-tile-body:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.nos-desktop-tile .nos-tile-body {
  padding-top: 0.25rem;
}

/* My Spaces launcher — wider grid for 10 theme tiles */
.nos-spaces .nos-tile-grid {
  max-width: 1100px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.nos-spaces .nos-quick-grid {
  max-width: 1100px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.nos-spaces .nos-quick-section {
  max-width: 1100px;
}

/* ── Persona Simulator ─────────────────────────────── */
.nos-persona-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.4rem 0.75rem;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 6px;
  font-size: 8pt;
}

.nos-persona-label {
  color: var(--text-muted);
  font-weight: 600;
}

.nos-persona-select {
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 8pt;
  font-family: var(--font);
  background: var(--bg-panel);
  color: var(--text);
  cursor: pointer;
}

.nos-persona-level {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 7pt;
}

.nos-home-breadcrumb {
  margin-bottom: 1rem;
  font-size: 8.5pt;
}

.nos-home-back {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
}
.nos-home-back:hover { text-decoration: underline; }

.nos-home-sep { color: var(--text-muted); }

.nos-home-crumb-label {
  font-weight: 700;
  color: var(--text);
}

/* ── Quick access (pinned home tiles) ─────────────────── */
.nos-quick-section {
  margin-bottom: 1.25rem;
  max-width: 720px;
  width: 100%;
}

.nos-quick-label {
  font-size: 7.5pt;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.nos-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.nos-quick-tile {
  padding: 1rem 0.75rem;
}

/* ── Tile Grid ────────────────────────────────────────── */
.nos-tile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  max-width: 720px;
  width: 100%;
}

@media (max-width: 640px) {
  .nos-tile-grid { grid-template-columns: repeat(2, 1fr); }
}

.nos-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem 0.75rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.nos-tile:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(59, 130, 246, 0.08);
}

.nos-tile-icon {
  font-size: 24pt;
  margin-bottom: 0.4rem;
}

.nos-tile-icon-lg {
  font-size: 30pt;
}

.nos-tile-name {
  font-size: 8.5pt;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.nos-tile-ext {
  font-size: 7pt;
  color: var(--text-muted);
  font-weight: 400;
}

.nos-tile-desc {
  font-size: 7pt;
  color: var(--text-muted);
  line-height: 1.4;
}

.nos-tile-count {
  margin-top: 0.5rem;
  font-size: 7pt;
  color: var(--text-muted);
  font-weight: 600;
}

/* ── PMC Tree (left panel) ───────────────────────── */
.spmc-tree-list {
  overflow-y: auto;
  margin-bottom: 0.5rem;
}

/* Space / channel tree right-click menu */
.spmc-ctx-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120000;
  background: transparent;
}
.spmc-ctx-menu {
  position: fixed;
  z-index: 120001;
  min-width: 11rem;
  max-width: 18rem;
  padding: 4px 0;
  border-radius: 8px;
  border: 1px solid rgba(30, 58, 95, 0.18);
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  font-size: 8.5pt;
}
.spmc-ctx-item {
  display: block;
  width: 100%;
  padding: 7px 12px;
  border: none;
  background: transparent;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.spmc-ctx-item:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent);
}

.spmc-tree-sep {
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.spmc-collapsible {
  cursor: pointer;
  user-select: none;
}
.spmc-collapsible:hover { color: var(--accent); }

.spmc-tree-count {
  font-size: 6.5pt;
  color: var(--text-muted);
  font-weight: 400;
  font-family: var(--font-mono);
}

/* ── Files sidebar tree ───────────────────────────── */
.fs-tree {
  overflow-y: auto;
  padding: 0.3rem 0;
  font-size: 6.5pt;
}
.fs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0.3rem 0.4rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.2rem;
}
.fs-back-btn {
  font-size: 8pt;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--accent);
  flex-shrink: 0;
}
.fs-cur-path {
  font-size: 5.5pt;
  font-family: var(--font-mono);
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fs-root-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  border-radius: 3px;
  font-size: 7pt;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.fs-root-item:hover { background: var(--border-light); color: var(--accent); }
.fs-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  cursor: pointer;
  color: var(--text);
  margin-bottom: 1px;
}
.fs-item:hover { background: var(--border-light); }
.fs-item.fs-active { background: rgba(59,130,246,.1); color: var(--accent); border-left: 2px solid var(--accent); }
.fs-dir { font-weight: 600; }
.fs-file { color: var(--text-muted); }
.fs-icon { font-size: 8pt; flex-shrink: 0; }
.fs-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-size { font-size: 5.5pt; color: var(--text-muted); font-family: var(--font-mono); flex-shrink: 0; }
.fs-empty { font-size: 6.5pt; color: var(--text-muted); padding: 0.5rem; text-align: center; }

/* LFV content styles */
.lfw-primary {
  background: rgba(59,130,246,.12) !important;
  color: var(--accent) !important;
  border-color: rgba(59,130,246,.3) !important;
  font-weight: 700 !important;
}
.lfw-pre {
  font-family: var(--font-mono);
  font-size: 6pt;
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.5;
  color: var(--text);
  margin: 0;
}
.lfw-img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
}

/* ── Content Window (4th column canvas) ─────────────── */
.spmc-content-win {
  display: flex;
  flex-direction: row;
  flex-shrink: 0;
  width: 300px;
  min-width: 24px;
  background: var(--bg);
  border-left: 1px solid var(--border);
  overflow: hidden;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.spmc-content-win.cw-closed {
  width: 24px !important;
  min-width: 24px !important;
}

/* Slide-out tab */
.content-tab {
  width: 24px;
  min-width: 24px;
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: background .15s;
}
.content-tab:hover { background: rgba(59,130,246,.06); }
.content-tab-label {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 6pt;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.5px;
  user-select: none;
  white-space: nowrap;
}
.content-tab:hover .content-tab-label { color: var(--accent); }

/* Content panel (shown when open) */
.content-panel {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ── Resizable divider template ───────────────────────────────────────────
   Shared by EVERY column divider (left, content-window, right, and the IRIS
   reasoning|dialogue split). Dark-blue track + centered grip = a visible
   "slider" affordance signalling the divider is draggable. Restyle here to
   change all dividers at once. */
.col-resize-handle {
  position: relative;
  width: 6px;
  flex-shrink: 0;
  cursor: col-resize;
  background: #1e3a5f;            /* dark blue track */
  transition: background .15s;
  z-index: 10;
}
/* Centered grip bar — the slider handle indicator. */
.col-resize-handle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 30px;
  border-radius: 2px;
  background: #3b82f6;
  opacity: 0.5;
  transition: opacity .15s, height .15s;
}
.col-resize-handle:hover { background: #2a4d75; }
.col-resize-handle:hover::before { opacity: 1; height: 48px; }

/* Horizontal variant — same dark-blue slider template, for vertical (row)
   resizing (e.g. the terminal height divider). Drag up/down (ns-resize). */
.row-resize-handle {
  position: relative;
  height: 6px;
  flex-shrink: 0;
  cursor: ns-resize;
  background: #1e3a5f;
  transition: background .15s;
  z-index: 10;
}
.row-resize-handle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 2px;
  width: 30px;
  border-radius: 2px;
  background: #3b82f6;
  opacity: 0.5;
  transition: opacity .15s, width .15s;
}
.row-resize-handle:hover { background: #2a4d75; }
.row-resize-handle:hover::before { opacity: 1; width: 48px; }

/* Content window header */
.cw-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  flex-shrink: 0;
}
.cw-header-icon { font-size: 9pt; }
.cw-header-title {
  font-size: 7.5pt;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cw-header-badge {
  font-size: 5.5pt;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 1px 4px;
  background: rgba(59,130,246,.12);
  border-radius: 3px;
  color: var(--accent);
  flex-shrink: 0;
}
.cw-section-label {
  font-size: 6pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 0.4rem 0.6rem 0.2rem;
  flex-shrink: 0;
}

/* Mode 0: SPMCG card grid */
.cw-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  padding: 0.3rem 0.5rem;
}
.cw-node-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.5rem;
  text-align: center;
  transition: border-color .12s;
}
.cw-node-card:hover { border-color: var(--accent); }
.cw-card-icon { font-size: 12pt; margin-bottom: 2px; }
.cw-card-name { font-size: 6pt; font-weight: 600; color: var(--text); word-break: break-word; line-height: 1.3; }
.cw-card-count { font-size: 5.5pt; color: var(--text-muted); margin-top: 2px; font-family: var(--font-mono); }

/* Mode 0: channel list within SPMCG */
.cw-ch-list { padding: 0 0.4rem 0.5rem; }
.cw-ch-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.2rem 0.3rem;
  border-radius: 3px;
  font-size: 6.5pt;
  color: var(--text);
  margin-bottom: 1px;
}
.cw-ch-item:hover { background: var(--border-light); color: var(--accent); }

/* Mode 1: channel publication page (N1 look & feel) */
.ch-pub-hdr { border-bottom-color: rgba(59,130,246,.25); }
.ch-pub-sub { padding-bottom: 0.35rem; }
.ch-pub-grid {
  flex: 1;
  overflow-y: auto;
  padding: 0.35rem 0.5rem 0.6rem;
}
.ch-pub-card { cursor: pointer; }
.ch-pub-card:hover {
  border-color: var(--accent);
  background: rgba(59,130,246,.04);
}

/* Mode 1: doc list (legacy inline list) */
.cw-doc-list { padding: 0.2rem 0.4rem; flex: 1; overflow-y: auto; }
.cw-doc-item {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 0.3rem 0.3rem;
  border-radius: 3px;
  cursor: pointer;
  margin-bottom: 2px;
}
.cw-doc-item:hover { background: var(--border-light); }
.cw-doc-item.active {
  background: rgba(59,130,246,.1);
  border-left: 2px solid var(--accent);
  padding-left: calc(0.3rem - 2px);
}
.cw-doc-icon { font-size: 7pt; flex-shrink: 0; margin-top: 1px; }
.cw-doc-title { font-size: 6.5pt; color: var(--text); line-height: 1.35; word-break: break-word; }

/* Mode 2: doc viewer */
.cw-doc-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  flex-shrink: 0;
}
.cw-back-btn {
  font-size: 7pt;
  padding: 2px 7px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  color: var(--accent);
  font-family: var(--font);
  flex-shrink: 0;
}
.cw-back-btn:hover { border-color: var(--accent); }
.cw-doc-nav-title {
  font-size: 7pt;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cw-doc-toolbar {
  display: flex;
  gap: 4px;
  padding: 0.3rem 0.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  flex-shrink: 0;
}
.cw-tool-btn {
  font-size: 6.5pt;
  padding: 2px 7px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  color: var(--text-muted);
  font-family: var(--font);
}
.cw-tool-btn:hover { border-color: var(--accent); color: var(--accent); }
.cw-doc-render {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.1rem;
}
.cw-doc-h1 {
  font-size: 9pt;
  font-weight: 700;
  margin: 0 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.cw-doc-editor {
  width: 100%;
  min-height: 320px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8.5pt;
  line-height: 1.45;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  resize: vertical;
}
.cw-doc-editor-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
}
.cw-tool-btn-primary {
  border-color: var(--accent);
  color: var(--accent);
}
.cw-edit-status {
  font-size: 7.5pt;
  color: var(--text-muted);
  margin-left: auto;
}
.cw-version-list {
  border-bottom: 1px solid var(--border);
  max-height: 120px;
  overflow-y: auto;
  padding: 0.35rem 0.75rem;
  background: rgba(59, 130, 246, 0.04);
}
.cw-version-row {
  display: flex;
  gap: 0.6rem;
  font-size: 7.5pt;
  padding: 0.2rem 0;
  color: var(--text-muted);
}
.cw-version-no { font-weight: 600; color: var(--accent); min-width: 2rem; }
.cw-version-empty { font-size: 7.5pt; color: var(--text-muted); }

/* ── Sidecar ───────────────────────────────────────────────── */
.sidecar {
  position: fixed;
  right: 24px;
  top: 52px;
  width: 520px;
  height: 640px;
  min-width: 300px;
  min-height: 200px;
  resize: both;
  overflow: hidden;
  z-index: 3000;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 48px rgba(0,0,0,.35);
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 7.5pt;
}

/* Tab bar */
.sidecar-tabs {
  display: flex;
  align-items: center;
  padding: 4px 6px 0;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  gap: 2px;
  min-height: 30px;
  overflow-x: auto;
  flex-shrink: 0;
  cursor: grab;
  user-select: none;
}
.sidecar-tabs:active { cursor: grabbing; }
.sidecar-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 4px;
  font-size: 6.5pt;
  font-family: var(--font);
  background: var(--bg);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  color: var(--text-muted);
  white-space: nowrap;
  max-width: 160px;
}
.sidecar-tab.active {
  background: var(--bg-panel);
  color: var(--text);
  border-color: var(--border);
  font-weight: 600;
}
.sidecar-tab-x {
  font-size: 8pt;
  opacity: .5;
  margin-left: 2px;
  cursor: pointer;
  line-height: 1;
}
.sidecar-tab-x:hover { opacity: 1; color: #ef4444; }
.sidecar-add {
  font-size: 11pt;
  padding: 2px 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 3px;
  line-height: 1;
  flex-shrink: 0;
}
.sidecar-add:hover { background: var(--border); color: var(--text); }
.sidecar-controls { margin-left: auto; display: flex; gap: 3px; flex-shrink: 0; }
.sidecar-ctrl {
  font-size: 12pt;
  padding: 1px 5px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 3px;
  line-height: 1;
}
.sidecar-ctrl:hover { background: rgba(239,68,68,.12); color: #ef4444; }
.sidecar-popout:hover { background: rgba(59,130,246,.12) !important; color: #60a5fa !important; }

/* Channel header */
.sidecar-ch-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.3rem 0.6rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  flex-shrink: 0;
}
.sidecar-ch-name {
  font-size: 7.5pt;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidecar-doc-count {
  font-size: 6pt;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Body split */
.sidecar-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}
.sidecar-doc-list {
  width: 180px;
  min-width: 120px;
  max-width: 220px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: 0.4rem;
  flex-shrink: 0;
}
.sidecar-empty {
  font-size: 6.5pt;
  color: var(--text-muted);
  padding: 0.5rem;
  text-align: center;
}
.sidecar-doc-item {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 0.25rem 0.3rem;
  border-radius: 3px;
  cursor: pointer;
  margin-bottom: 1px;
}
.sidecar-doc-item:hover { background: var(--border-light); }
.sidecar-doc-item.active {
  background: rgba(59,130,246,.1);
  border-left: 2px solid var(--accent);
  padding-left: calc(0.3rem - 2px);
}
.sidecar-doc-icon { font-size: 7pt; flex-shrink: 0; margin-top: 1px; }
.sidecar-doc-title {
  font-size: 6.5pt;
  color: var(--text);
  line-height: 1.35;
  word-break: break-word;
}

/* Render area */
.sidecar-doc-render {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.2rem;
  min-width: 0;
}
.sidecar-render-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.sidecar-render-hint {
  font-size: 7.5pt;
  color: var(--text-muted);
  font-style: italic;
}
.sidecar-render-title {
  font-size: 9pt;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.sidecar-render-content { max-width: 100%; }

/* ld-* fragment styles for inline LiveDoc rendering (no wrapper page needed) */
.ld-content { font-size: 7.5pt; color: var(--text); line-height: 1.6; }
.ld-content .ld-heading { color: var(--text); border-bottom: 1px solid var(--border); padding-bottom: .2rem; margin: 1rem 0 .4rem; }
.ld-content .ld-para { color: var(--text); margin: .4rem 0; }
.ld-content .ld-table-wrap { overflow-x: auto; margin: .6rem 0; border: 1px solid var(--border); border-radius: 4px; }
.ld-content .ld-table-wrap table { width: 100%; border-collapse: collapse; font-size: 6.5pt; }
.ld-content .ld-table-wrap th { background: rgba(59,130,246,.08); font-weight: 700; }
.ld-content .ld-table-wrap th, .ld-content .ld-table-wrap td { padding: .3rem .5rem; border: 1px solid rgba(176,208,248,.2); }
.ld-content .ld-list-wrap { margin: .4rem 0 .4rem 1.2rem; }
.ld-content pre.ld-code { background: rgba(0,0,0,.04); border: 1px solid var(--border); border-radius: 3px; padding: .6rem; font-size: 6pt; overflow-x: auto; margin: .6rem 0; }
.ld-content hr.ld-separator { border: none; border-top: 1px solid var(--border); margin: 1rem 0; }
.ld-content blockquote.ld-blockquote { border-left: 2px solid var(--accent); padding: .4rem .8rem; margin: .6rem 0; color: var(--text-muted); font-style: italic; }

/* ── Sidebar mode toggle [ Tree | Channels ] ── */
.sidebar-mode-toggle {
  display: flex;
  gap: 2px;
  margin-bottom: 0.4rem;
  padding: 3px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
}
.sidebar-mode-btn {
  flex: 1;
  font-size: 6.5pt;
  font-weight: 700;
  padding: 3px 6px;
  background: transparent;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  color: var(--text-muted);
  font-family: var(--font);
  transition: background .1s;
}
.sidebar-mode-btn:hover { color: var(--accent); }
.sidebar-mode-btn.active {
  background: rgba(59,130,246,.12);
  color: var(--accent);
}
.sidebar-mode-toggle-4 .sidebar-mode-btn {
  font-size: 5.5pt;
  padding: 3px 4px;
}

/* ── Documents lens ───────────────────────────────── */
.spmc-docs-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  flex: 1;
}
/* Documents lens — minimal channels tree (phase 1) */
.docs-ch-tree {
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
  padding-bottom: 0.2rem;
}
.docs-ch-tree-hdr {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0.25rem 0.35rem;
  font-size: 6.5pt;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.docs-ch-tree-hdr:hover { color: var(--accent); }
.docs-ch-root { margin: 0 0.2rem 0.15rem 0.6rem; }
.docs-ch-root-hdr {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0.15rem 0.2rem;
  font-size: 6pt;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.docs-ch-root-hdr:hover { color: var(--accent); }

.docs-sort-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.25rem 0.35rem;
  margin-bottom: 0.25rem;
  font-size: 6pt;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}
.docs-sort-label { font-weight: 700; margin-right: 2px; }
.docs-sort-btn {
  font-size: 6pt;
  font-weight: 600;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font);
}
.docs-sort-btn:hover { border-color: var(--accent); color: var(--accent); }
.docs-sort-btn.active {
  background: rgba(59,130,246,.12);
  border-color: var(--accent);
  color: var(--accent);
}
.docs-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 5.5pt;
}
.docs-loading, .docs-empty {
  padding: 1rem 0.5rem;
  font-size: 7pt;
  color: var(--text-muted);
  text-align: center;
}
.spmc-doc-item {
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 7pt;
}
.spmc-doc-item:hover { background: var(--border-light); }
.spmc-doc-item.active {
  background: rgba(59,130,246,.08);
  border-left: 2px solid var(--accent);
}
.spmc-doc-name-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  overflow: hidden;
}
.spmc-doc-icon { flex-shrink: 0; font-size: 8pt; }
.spmc-doc-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}
.spmc-doc-meta-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.1rem;
  padding-left: 1.1rem;
  font-size: 6pt;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.spmc-doc-slug {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spmc-doc-ver {
  background: var(--border-light);
  border-radius: 3px;
  padding: 0 4px;
}
.spmc-doc-ts { flex-shrink: 0; }

/* ── Channel Tree mode ────────────────────────────── */
.ch-tree {
  overflow-y: auto;
  font-size: 6.5pt;
}
.ch-tree-root {
  margin-bottom: 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}
.ch-tree-root:last-child { border-bottom: none; }
.ch-tree-root-hdr {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0;
  font-weight: 700;
  font-size: 7pt;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.ch-tree-root-name { flex: 1; }
.ch-tree-cnt {
  font-size: 5.5pt;
  font-family: var(--font-mono);
  background: var(--border);
  border-radius: 6px;
  padding: 1px 4px;
  color: var(--text-muted);
}
.ch-tree-section {
  margin: 0.25rem 0 0.25rem 0.5rem;
  border-left: 1px solid var(--border);
  padding-left: 0.4rem;
}
.ch-tree-section-hdr {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 6.5pt;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.1rem 0 0.2rem;
}
.ch-tree-section-name { flex: 1; }

.ch-tree-unassigned .ch-tree-root-hdr {
  color: var(--text-muted);
}
.spmc-guide-admin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  background: var(--surface-2, rgba(255,255,255,.03));
}
.spmc-guide-admin-title {
  font-size: 7.5pt;
  font-weight: 600;
  color: var(--text);
}

/* Channel item — shared by both tree mode and Channel Tree */
.ch-node {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.2rem 0.3rem;
  border-radius: 3px;
  font-size: 6.5pt;
  color: var(--text);
  margin-bottom: 1px;
  transition: background .1s;
}
.ch-node:hover { background: var(--border-light); color: var(--accent); }
.ch-node.active {
  background: rgba(59,130,246,.1);
  color: var(--accent);
  border-left: 2px solid var(--accent);
  font-weight: 600;
  padding-left: calc(0.3rem - 2px);
}
.ch-badge {
  font-size: 5pt;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 1px 4px;
  background: rgba(59,130,246,.12);
  border-radius: 3px;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}
.ch-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ch-docs {
  font-size: 5.5pt;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: var(--border);
  border-radius: 4px;
  padding: 1px 4px;
  flex-shrink: 0;
}

/* Inline channel sub-list in PMC Tree mode */
.tree-ch-section {
  margin: 0.2rem 0 0.2rem 1.25rem;
}
.tree-ch-hdr {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0.15rem 0;
  font-size: 6pt;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.tree-ch-hdr:hover { color: var(--accent); }
.tree-ch-icon { font-size: 7pt; }
.tree-ch-label { font-weight: 600; }
.tree-ch-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 6pt;
  color: var(--text-muted);
  margin-bottom: 1px;
  cursor: pointer;
}
.tree-ch-item:hover { background: var(--border-light); color: var(--accent); }
.tree-ch-item.active {
  background: rgba(59,130,246,.1);
  color: var(--accent);
  border-left: 2px solid var(--accent);
  font-weight: 600;
  padding-left: calc(0.4rem - 2px);
}

/* ── Elements Sidebar ─────────────────────────────────────── */
.spmc-element-info-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0.4rem 0 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.4rem;
}
.spmc-info-pill {
  font-size: 6pt;
  font-family: var(--font-mono);
  padding: 2px 6px;
  background: rgba(59,130,246,.08);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
}

/* Accordion element block */
.spmc-element {
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.1rem;
}
.spmc-element-hdr {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.1rem;
  cursor: pointer;
  user-select: none;
  font-size: 7pt;
  font-weight: 700;
  color: var(--text);
}
.spmc-element-hdr:hover { color: var(--accent); }
.spmc-element-arrow { font-size: 7pt; color: var(--text-muted); min-width: 10px; }
.spmc-element-icon { font-size: 9pt; }
.spmc-element-name { flex: 1; font-size: 7pt; }
.spmc-element-cnt {
  font-size: 6pt;
  font-family: var(--font-mono);
  background: var(--border);
  border-radius: 6px;
  padding: 1px 5px;
  color: var(--text-muted);
}
.spmc-element-body {
  padding: 0.3rem 0 0.5rem;
}

/* Channel / All scope toggle inside element header */
.spmc-el-scope {
  display: flex;
  gap: 2px;
  margin-left: auto;
}
.spmc-scope-btn {
  font-size: 5.5pt;
  padding: 1px 5px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font);
}
.spmc-scope-btn:hover { border-color: var(--accent); color: var(--accent); }
.spmc-scope-btn.active {
  background: rgba(59,130,246,.12);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

/* ── Snapshot thumbnail grid ─────────────────────────────── */
.snap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  padding: 0.25rem 0;
}
.snap-thumb {
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.4rem;
  cursor: pointer;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  transition: border-color .15s;
}
.snap-thumb:hover { border-color: var(--accent); }
.snap-thumb.snap-checked { border-color: #f59e0b; background: rgba(245,158,11,.07); }
.snap-check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  cursor: pointer;
  z-index: 1;
}
.snap-thumb-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.snap-tab-badge {
  font-size: 5.5pt;
  font-weight: 700;
  padding: 1px 4px;
  background: rgba(59,130,246,.12);
  border-radius: 3px;
  color: var(--accent);
  text-transform: uppercase;
  width: fit-content;
}
.snap-thumb-time {
  font-size: 5.5pt;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Delete bar */
.snap-delete-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  background: rgba(245,158,11,.08);
  border: 1px solid rgba(245,158,11,.3);
  border-radius: 4px;
  margin-bottom: 6px;
  font-size: 6.5pt;
  color: #d97706;
}
.snap-delete-btn {
  font-size: 6.5pt;
  padding: 2px 7px;
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-weight: 700;
}
.snap-delete-btn:hover { background: #dc2626; }
.snap-cancel-btn {
  font-size: 9pt;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  margin-left: auto;
  line-height: 1;
}

/* ── Snapshot overlay (80% viewport) ───────────────────── */
.snap-overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.snap-overlay-modal {
  width: 80vw;
  height: 80vh;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.4);
}
.snap-overlay-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  flex-shrink: 0;
}
.snap-overlay-title {
  font-size: 8pt;
  font-weight: 700;
  flex: 1;
  color: var(--text);
  font-family: var(--font-mono);
}
.snap-overlay-delete {
  font-size: 7pt;
  padding: 3px 8px;
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}
.snap-overlay-delete:hover { background: #dc2626; }
.snap-overlay-close {
  font-size: 14pt;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.snap-overlay-close:hover { color: var(--text); }
.snap-overlay-frame {
  flex: 1;
  border: none;
  width: 100%;
  background: #fff;
}

/* ── TACKS ─────────────────────────────────────────── */
.tack-card {
  padding: 0.35rem 0.5rem;
  border-left: 2px solid var(--border);
  margin-bottom: 0.3rem;
  font-size: 7pt;
  background: var(--bg-panel);
  border-radius: 0 4px 4px 0;
}
.tack-card.tack-pinned {
  border-left-color: #f59e0b;
  background: rgba(245,158,11,.05);
}
.tack-content { color: var(--text); line-height: 1.4; margin-bottom: 3px; }
.tack-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.tack-pin-badge { font-size: 7pt; }
.tack-channel-badge {
  font-size: 5.5pt;
  padding: 1px 4px;
  background: rgba(59,130,246,.08);
  border-radius: 3px;
  color: var(--accent);
  font-family: var(--font-mono);
}
.tack-time {
  font-size: 5.5pt;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-left: auto;
}
.tack-add-bar { padding: 0.3rem 0 0; }
.tack-add-input {
  width: 100%;
  padding: 0.3rem 0.4rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 7pt;
  font-family: var(--font);
  color: var(--text);
}
.tack-add-input:focus {
  outline: none;
  border-color: var(--accent);
}

.spmc-tree-node { margin-bottom: 0.25rem; }

/* Each root-peer SPMCG gets a visually separated block */
.spmc-tree-spmcg {
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
}
.spmc-tree-spmcg:last-child { border-bottom: none; }

.spmc-tree-org {
  font-size: 7.5pt;
  font-weight: 700;
  color: var(--text);
  padding: 0.2rem 0;
}

.spmc-tree-child {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0 0.15rem 0.75rem;
  font-size: 7pt;
  color: var(--text);
  font-weight: 600;
  border-left: 2px solid transparent;
  border-radius: 3px;
}
.spmc-tree-child.active {
  background: rgba(59,130,246,.1);
  color: var(--accent);
  border-left-color: var(--accent);
}

.spmc-tree-grandchild {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0 0.1rem 1.5rem;
  font-size: 6.5pt;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 3px;
}
.spmc-tree-grandchild:hover {
  background: var(--border-light);
  color: var(--accent);
}
.spmc-tree-grandchild.active {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  border-left: 2px solid var(--accent);
  font-weight: 600;
}

/* ── UniSearch ───────────────────────────────────────── */
/* unisearch-bar base moved below with position:relative */

.unisearch-input {
  width: 100%;
  padding: 0.35rem 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 7.5pt;
  font-family: var(--font);
  color: var(--text);
}
.unisearch-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12pt;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.unisearch-clear:hover { color: var(--accent); }

.unisearch-bar {
  position: relative;
}

.unisearch-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.unisearch-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding-bottom: 0.4rem;
}

.unisearch-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px;
  font-size: 6.5pt;
  color: var(--accent);
  font-weight: 600;
}

.chip-op-select {
  appearance: none;
  background: rgba(59, 130, 246, 0.15);
  border: none;
  border-radius: 3px;
  color: var(--text-muted);
  font-size: 7pt;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 0 4px;
  cursor: pointer;
  letter-spacing: 0.5px;
}
.chip-op-select:focus { outline: none; }
.chip-op-select option {
  background: var(--bg-dark);
  color: #cbd5e1;
}

.chip-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 9pt;
  padding: 0;
  line-height: 1;
}
.chip-remove:hover { color: #ef4444; }

.spmc-tree-filter-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 8pt;
  cursor: pointer;
  padding: 0 2px;
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.15s;
}
.spmc-tree-child:hover .spmc-tree-filter-btn { opacity: 0.6; }
.spmc-tree-filter-btn:hover { opacity: 1 !important; color: var(--accent); }

.spmc-tree-icon { flex-shrink: 0; }
.spmc-tree-sublabel {
  display: block;
  font-size: 0.68rem;
  color: var(--text-sec);
  font-weight: 400;
  margin-top: 0.1rem;
}
.spmc-tree-docleaf {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem 0.2rem 1.6rem;
  font-size: 0.78rem;
  color: var(--text-sec);
  cursor: pointer;
}
.spmc-tree-docleaf:hover {
  background: var(--border-light);
  color: var(--accent);
}
.spmc-tree-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── SPMC Session List (left tree) ────────────────── */
.spmc-home-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}
.spmc-home-link:hover { text-decoration: underline; }

.spmc-session-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow-y: auto;
  flex: 1;
}

.spmc-session-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
  text-decoration: none;
  color: var(--text);
  font-size: 7.5pt;
  cursor: pointer;
}
.spmc-session-item:hover { background: var(--border-light); }
.spmc-session-item.active {
  background: rgba(59, 130, 246, 0.08);
  border-left: 2px solid var(--accent);
}

.spmc-session-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spmc-session-count {
  font-size: 6.5pt;
  color: var(--text-muted);
  font-family: var(--font-mono);
  flex-shrink: 0;
  margin-left: 0.5rem;
}

/* ── Tab Bar ────────────────────────────────────────── */
.spmc-tab-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.spmc-tab {
  padding: 0.25rem 0.75rem;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  font-size: 7.5pt;
  font-weight: 700;
  font-family: var(--font-mono);
  cursor: pointer;
  letter-spacing: 0.3px;
}
.spmc-tab:hover { background: var(--border-light); }
.spmc-tab-home { font-size: 10pt; padding: 0.15rem 0.5rem; }
.spmc-tab.active {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
}

.spmc-tab-channel {
  margin-left: auto;
  font-size: 7pt;
  color: var(--text-muted);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Guide View ─────────────────────────────────────── */
.spmc-guide {
  flex: 1;
  overflow-y: auto;
}

.spmc-guide-note {
  font-size: 8pt;
  line-height: 1.6;
  color: var(--text);
  padding: 0.5rem;
  background: rgba(59, 130, 246, 0.04);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  margin-bottom: 0.75rem;
}
.spmc-guide-note p { margin: 0.25rem 0; }
.spmc-guide-note ul { margin: 0.25rem 0; padding-left: 1.25rem; }
.spmc-guide-note li { margin: 0.1rem 0; }

.spmc-doc-grid {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.spmc-doc-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.5rem 0.6rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 5px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}
.spmc-doc-card:hover {
  border-color: var(--accent);
}
.spmc-doc-card--shared { border-color: #22c55e; }
.spmc-doc-card--unshared { border-color: var(--border); }
.spmc-doc-card--blocked { border-color: #ef4444; }
.spmc-doc-card-body {
  display: block;
  color: inherit;
}
.ch-share-toggle {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.ch-share-btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 4px 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--bg-panel);
  color: var(--text-muted);
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.ch-share-btn--shared.active {
  background: #16a34a;
  border-color: #15803d;
  color: #fff;
}
.ch-share-btn--unshared.active {
  background: #94a3b8;
  border-color: #64748b;
  color: #fff;
}
.ch-share-btn--blocked.active {
  background: #dc2626;
  border-color: #b91c1c;
  color: #fff;
}
.ch-share-btn:not(.active):hover {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.spmc-doc-title {
  font-size: 8pt;
  font-weight: 700;
  color: var(--text);
}

.spmc-doc-slug {
  font-size: 6.5pt;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.spmc-doc-desc {
  font-size: 7pt;
  color: var(--text-muted);
  margin-top: 0.15rem;
  line-height: 1.4;
}

.spmc-scroll-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── IRIS Split Layout ───────────────────────────────── */
/* Flex row so the reasoning|dialogue divider can be dragged (see
   #iris-split-resize-h, wired in lib.rs). Reasoning has a fixed basis; the
   dialogue fills the rest. */
.iris-split {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.iris-reasoning-panel {
  width: 40%;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(124, 58, 237, 0.04);
  border-right: 1px solid rgba(124, 58, 237, 0.12);
  padding: 0.5rem;
}

.iris-dialog-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0.5rem;
}

.iris-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 7pt;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 0.4rem;
  flex-shrink: 0;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.iris-wip-sw-btn {
  font-size: 7pt;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  padding: 0.12rem 0.45rem;
  margin-left: auto;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 4px;
  color: #22c55e;
  cursor: pointer;
}
.iris-wip-sw-btn:hover {
  background: rgba(34, 197, 94, 0.16);
}

/* Context selector chips */
.iris-context-chips {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 0.3rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.iris-ctx-chip {
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 6pt;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: 0.5px;
  cursor: pointer;
  background: var(--border-light);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.iris-ctx-chip.active {
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent);
  border-color: var(--accent);
}
.iris-ctx-chip:hover { opacity: 0.8; }

.iris-sweep-group {
  display: flex;
  gap: 0.3rem;
  margin-left: auto;
}

.iris-sweep {
  font-size: 5.5pt;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

/* Agent roster */
.iris-agents {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 0.4rem;
  flex-shrink: 0;
}

.iris-agents-label {
  font-size: 6pt;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.iris-agent-chip {
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 6.5pt;
  font-weight: 700;
  cursor: pointer;
}
.iris-agent-chip.active {
  background: rgba(124, 58, 237, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(124, 58, 237, 0.3);
}
.iris-agent-chip.inactive {
  background: var(--border-light);
  color: var(--text-muted);
  border: 1px solid var(--border);
  opacity: 0.6;
}
/* passive = always listening (reasoning only, not dialog) */
.iris-agent-chip.passive {
  background: rgba(124, 58, 237, 0.06);
  color: #9d71e8;
  border: 1px dashed rgba(124, 58, 237, 0.3);
  opacity: 0.8;
}
.iris-agent-chip:hover { opacity: 1; }

.iris-agent-add {
  background: none;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 6.5pt;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-mono);
}
.iris-agent-add:hover { border-color: var(--accent); color: var(--accent); }

.iris-scope-label {
  font-size: 6.5pt;
  font-weight: 600;
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0;
}

.iris-reasoning-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.iris-reasoning-line {
  padding: 0.3rem;
  border-radius: 4px;
  background: rgba(124, 58, 237, 0.04);
  border-left: 2px solid transparent;
}
.iris-reasoning-line.agent-line {
  background: rgba(124, 58, 237, 0.08);
  border-left-color: #a78bfa;
}

.iris-reasoning-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.iris-reasoning-speaker {
  font-size: 6pt;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a78bfa;
}
/* Speaker color coding */
.iris-reasoning-speaker[data-speaker="paul"],
.iris-reasoning-speaker[data-speaker="user"] { color: #3b82f6; }
.iris-reasoning-speaker[data-speaker="rosa"] { color: #a78bfa; }
/* rosa-think = passive reasoning (chip off); same purple but dimmer */
.iris-reasoning-speaker[data-speaker="rosa-think"] { color: #9d71e8; opacity: 0.8; }
/* rosa-thinking = raw qwen3 chain-of-thought; shown as collapsible trace */
.iris-reasoning-speaker[data-speaker="rosa-thinking"] { color: #f59e0b; opacity: 0.9; }
.iris-reasoning-speaker[data-speaker="warp"],
.iris-reasoning-speaker[data-speaker="rai"] { color: #22c55e; }
/* rai-thinking = RAI chain-of-thought; shown as collapsible trace */
.iris-reasoning-speaker[data-speaker="warp-thinking"],
.iris-reasoning-speaker[data-speaker="oz-thinking"],
.iris-reasoning-speaker[data-speaker="rai-thinking"] { color: #22c55e; opacity: 0.9; }
.iris-reasoning-speaker[data-speaker="grok"] { color: #f59e0b; }
.iris-reasoning-speaker[data-speaker="system"] { color: #94a3b8; }

/* ROSA chain-of-thought trace — collapsible <details> block (amber) */
.iris-thinking-trace {
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-left: 2px solid #f59e0b;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.04);
  margin: 0;
}
.iris-thinking-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0.4rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  outline: none;
}
.iris-thinking-summary::-webkit-details-marker { display: none; }
.iris-thinking-summary:hover { background: rgba(245, 158, 11, 0.06); }
.iris-thinking-body {
  padding: 0.3rem 0.5rem 0.4rem;
  font-size: 7pt;
  line-height: 1.55;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
  border-top: 1px solid rgba(245, 158, 11, 0.15);
}
/* WARP chain-of-thought trace — green variant */
.iris-thinking-trace.warp-trace {
  border-color: rgba(34, 197, 94, 0.2);
  border-left-color: #22c55e;
  background: rgba(34, 197, 94, 0.04);
}
.iris-thinking-trace.warp-trace .iris-thinking-summary:hover {
  background: rgba(34, 197, 94, 0.06);
}
.iris-thinking-trace.warp-trace .iris-thinking-body {
  border-top-color: rgba(34, 197, 94, 0.15);
}

.iris-reasoning-time {
  font-size: 5.5pt;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.iris-reasoning-text {
  font-size: 7.5pt;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 0.1rem;
}

.iris-reasoning-badge {
  font-size: 6pt;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #a78bfa;
  background: rgba(124, 58, 237, 0.12);
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 1px;
}

.iris-backend-badge {
  font-size: 6pt;
  font-weight: 800;
  font-family: var(--font-mono);
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.iris-backend-badge-compact {
  margin-left: 0.35rem;
}

.iris-dialog {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 0.5rem;
}

.iris-line {
  padding: 0.35rem 0.5rem;
  border-radius: 4px;
}
.iris-line:hover { background: var(--border-light); }

.iris-line-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
}

.iris-line-meta-end {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.iris-line-copy-btn,
.iris-line-reply-btn {
  opacity: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 8pt;
  line-height: 1;
  padding: 0 0.15rem;
  cursor: pointer;
  border-radius: 3px;
}
.iris-line:hover .iris-line-copy-btn,
.iris-line:hover .iris-line-reply-btn,
.iris-line-copy-btn:focus-visible,
.iris-line-reply-btn:focus-visible {
  opacity: 1;
}
.iris-line-copy-btn:hover,
.iris-line-reply-btn:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.12);
}

.iris-reply-anchor {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0.25rem 0 0.35rem;
  padding: 0.25rem 0.45rem;
  border-left: 2px solid #3b82f6;
  background: rgba(59, 130, 246, 0.08);
  border-radius: 4px;
  font-size: 7.5pt;
}
.iris-reply-anchor-label {
  font-weight: 700;
  color: #60a5fa;
  white-space: nowrap;
}
.iris-reply-anchor-excerpt {
  flex: 1;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.iris-reply-anchor-clear {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 9pt;
  line-height: 1;
  padding: 0 0.15rem;
}
.iris-thinking-trace.grok-trace > summary {
  color: #f59e0b;
}

.iris-line-speaker {
  font-size: 6.5pt;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.iris-line-content {
  font-size: 8pt;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  margin-top: 0.1rem;
}

.iris-send-bar {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.iris-send-row {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
}

.iris-mic-btn {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 11pt;
  line-height: 1;
  cursor: pointer;
}
.iris-mic-btn:hover {
  border-color: #a78bfa;
  background: rgba(124, 58, 237, 0.06);
}
.iris-mic-btn.listening {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

.iris-send-input {
  flex: 1;
  width: 100%;
  padding: 0.5rem 0.6rem;
  background: var(--bg);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 6px;
  font-size: 8.5pt;
  font-family: var(--font);
  color: var(--text);
  resize: vertical;
  overflow-y: auto;
  min-height: 2.5rem;
  max-height: min(40vh, 20rem);
  box-sizing: border-box;
  line-height: 1.5;
  display: block;
}
.iris-send-input:focus {
  outline: none;
  border-color: #a78bfa;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1);
}

.iris-send-hint {
  font-size: 6pt;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.iris-attach-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.25rem 0;
}

.iris-attach-chip {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.3);
  background: var(--bg);
}

.iris-attach-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.iris-attach-rm {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
}

.iris-attach-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 6px;
  background: var(--bg);
  font-size: 11pt;
  cursor: pointer;
}
.iris-attach-btn:hover {
  border-color: #a78bfa;
  background: rgba(124, 58, 237, 0.06);
}

.iris-attach-file {
  display: none;
}

.iris-attach-bucket {
  margin: 0.35rem 0.5rem 0;
  border: 1px dashed rgba(124, 58, 237, 0.35);
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.04);
}

.iris-attach-bucket.collapsed .iris-attach-bucket-body {
  display: none;
}

.iris-attach-bucket-hdr {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  user-select: none;
}

.iris-attach-bucket-title {
  flex: 1;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a78bfa;
}

.iris-attach-bucket-tag {
  margin-left: 0.4rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.02em;
  color: var(--text-muted);
}

.iris-attach-bucket-cnt {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.iris-attach-bucket-toggle {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.iris-attach-bucket-body {
  padding: 0 0.5rem 0.5rem;
  outline: none;
}

.iris-attach-bucket-body:focus {
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.25);
  border-radius: 0 0 6px 6px;
}

.iris-attach-bucket-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.iris-attach-bucket-row {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.iris-attach-bucket-add {
  font-size: 0.68rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 4px;
  cursor: pointer;
  color: #a78bfa;
}

.iris-attach-bucket-add:hover {
  background: rgba(124, 58, 237, 0.08);
}

.iris-attach-bucket-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.iris-attach-bucket-item {
  position: relative;
}

.iris-attach-bucket-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(124, 58, 237, 0.25);
  display: block;
}

.iris-attach-bucket-file {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 96px;
  max-width: 140px;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(124, 58, 237, 0.25);
  background: var(--bg);
  text-decoration: none;
  color: inherit;
  font-size: 0.65rem;
}

.iris-attach-bucket-file-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.iris-attach-bucket-file-mime {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
}

.iris-attach-bucket-rm {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
}

.scroll-line-attach-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.scroll-attach-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.scroll-attach-link {
  display: block;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.2);
  max-width: 100%;
}

.scroll-attach-img {
  display: block;
  max-width: min(100%, 320px);
  max-height: 220px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.04);
}

/* ── Placeholder Tabs ─────────────────────────────── */
.spmc-placeholder-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem;
  color: var(--text-muted);
}

.spmc-placeholder-icon { font-size: 28pt; }
.spmc-placeholder-title { font-size: 11pt; font-weight: 700; }
.spmc-placeholder-desc { font-size: 7.5pt; max-width: 280px; text-align: center; line-height: 1.5; }

/* ── Context Panel Meta ─────────────────────────────── */
.spmc-context-meta {
  padding: 0.5rem 0;
}

.spmc-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 7.5pt;
  padding: 0.15rem 0;
}

.spmc-meta-label { color: var(--text-muted); }
.spmc-meta-value { color: var(--text); font-weight: 600; font-family: var(--font-mono); }

/* ── Sidebar Snapshot Timeline ─────────────────────── */
.spmc-sidebar-snapshots {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-height: 40vh;
  overflow-y: auto;
}

.spmc-sidebar-snap {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  cursor: pointer;
  border-left: 3px solid var(--accent);
}
.spmc-sidebar-snap:hover { background: var(--border-light); }

.spmc-snap-indicator { flex-shrink: 0; }

.spmc-snap-tab-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 5.5pt;
  font-weight: 800;
  font-family: var(--font-mono);
  background: rgba(59,130,246,0.12);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.spmc-snap-info { flex: 1; min-width: 0; }

.spmc-snap-time {
  font-size: 6.5pt;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.spmc-snap-route {
  font-size: 6pt;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spmc-context-empty {
  font-size: 7pt;
  color: var(--text-muted);
  padding: 0.5rem 0;
  font-style: italic;
}

/* ── IRIS DEV QC capture (production journal snapshots) ─────────────── */
.iris-qc-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.35rem;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.08);
}
.iris-qc-label {
  font-size: 6.5pt;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #1d4ed8;
}
.iris-qc-btn {
  font-size: 6.5pt;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  border: 1px solid rgba(59, 130, 246, 0.4);
  background: #fff;
  color: #1e40af;
  cursor: pointer;
}
.iris-qc-btn:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.12);
}
.iris-qc-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.iris-qc-btn--region {
  border-color: rgba(245, 158, 11, 0.45);
  color: #b45309;
}
.iris-qc-hint {
  font-size: 6pt;
  color: var(--text-muted, #64748b);
  font-style: italic;
  margin-left: 0.15rem;
}
.iris-qc-rail-hint {
  margin: 0 0 0.4rem;
  padding: 0.25rem 0.45rem;
  font-size: 6pt;
  line-height: 1.4;
  color: var(--text-muted, #64748b);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

/* ── IRIS captured-PTY terminal drawer ──────────────────────────────── */
.iris-terminal-shell {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border, #1e293b);
  background: rgba(11, 15, 23, 0.35);
}
.iris-terminal-shell--collapsed .iris-terminal-resize-h {
  display: none;
}
.iris-terminal-shell:not(.iris-terminal-shell--live) .iris-terminal-resize-h {
  display: none;
}
.iris-terminal-resize-h {
  height: 6px;
  cursor: row-resize;
  background: var(--border, #1e293b);
  flex-shrink: 0;
  transition: background 0.12s;
}
.iris-terminal-resize-h:hover {
  background: var(--accent, #3b82f6);
  opacity: 0.75;
}

.iris-terminal-drawer {
  display: flex;
  flex-direction: column;
}

.iris-terminal-hdr {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  font-size: 7.5pt;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  user-select: none;
}
.iris-terminal-shell--live .iris-terminal-hdr {
  color: #94a3b8;
}
.iris-terminal-shell--live.iris-terminal-shell--collapsed .iris-terminal-hdr {
  background: rgba(34, 197, 94, 0.08);
  border-bottom: 1px solid rgba(34, 197, 94, 0.2);
}

.iris-terminal-hdr:hover { color: var(--text, #e2e8f0); }

.iris-terminal-arrow { width: 0.7rem; display: inline-block; }

.iris-terminal-label { font-weight: 600; }

.iris-terminal-live-badge {
  font-size: 6pt;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4ade80;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  background: rgba(34, 197, 94, 0.15);
}

.iris-terminal-hint {
  margin-left: auto;
  font-size: 6.5pt;
  font-style: italic;
  opacity: 0.7;
}
.iris-terminal-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.iris-terminal-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem 0.35rem;
  border-bottom: 1px solid rgba(30, 41, 59, 0.35);
}

.iris-terminal-btn {
  font-size: 7pt;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  border: 1px solid #2563eb;
  background: rgba(37, 99, 235, 0.12);
  color: #93c5fd;
  cursor: pointer;
}

.iris-terminal-btn:hover {
  background: rgba(37, 99, 235, 0.22);
}

.iris-terminal-btn-off {
  border-color: #64748b;
  background: rgba(100, 116, 139, 0.15);
  color: #cbd5e1;
}

.iris-terminal-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.iris-terminal-grok-toggle {
  border-color: #64748b;
  background: rgba(100, 116, 139, 0.12);
  color: #94a3b8;
}

.iris-terminal-grok-toggle.iris-terminal-grok-on {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.18);
  color: #86efac;
  font-weight: 600;
}

.iris-terminal-idle {
  padding: 0.55rem 0.65rem;
  font-size: 7pt;
  line-height: 1.45;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.35);
  border-bottom: 1px solid rgba(30, 41, 59, 0.25);
}

/* ── Global Scroll ──────────────────────────────────────────── */
.global-scroll-root {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--bg, #f4f7fc);
}

.global-scroll-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Left panel — session list */
.global-scroll-left {
  width: 18rem;
  min-width: 12rem;
  max-width: 26rem;
  border-right: 1px solid var(--border, #1e3a5f);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(176,208,248,0.04);
  min-height: 0;
}
/* Dev tools + WIP + Elements — scroll independently of session list */
.global-scroll-left-rail {
  flex: 0 1 auto;
  max-height: min(48vh, 22rem);
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.35rem 0.4rem 0.25rem;
  border-bottom: 1px solid rgba(30, 58, 95, 0.12);
}

.global-scroll-sessions {
  flex: 1;
  overflow-y: auto;
  padding: 0.25rem 0;
}

.gs-session-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.1s;
}
.gs-session-item:hover  { background: rgba(176,208,248,0.10); }
.gs-session-item.gs-session-tty-bound {
  box-shadow: inset 2px 0 0 #22c55e;
}
.gs-session-tty-pin {
  margin-right: 3px;
  font-size: 8pt;
  opacity: 0.85;
}
.gs-session-item.active {
  border-left-color: var(--accent, #3b82f6);
  background: rgba(59,130,246,0.07);
}

.gs-session-label {
  font-size: 7.5pt;
  color: var(--text, #1a2744);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.gs-session-cnt {
  font-size: 6pt;
  color: var(--text-muted, #4a6080);
  font-family: var(--font-mono, monospace);
  flex-shrink: 0;
}

/* Date badge inline with session name */
.gs-session-date {
  font-size: 6.5pt;
  color: var(--text-muted, #4a6080);
  font-family: var(--font-mono, monospace);
  margin-left: 0.3rem;
  opacity: 0.75;
  white-space: nowrap;
}

/* Sessions list header — label + sort toggle */
.gs-tree-btn {
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid rgba(176,208,248,0.25);
  background: transparent;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  margin-left: auto;
}
.gs-tree-btn.active {
  background: rgba(34,197,94,0.15);
  border-color: rgba(34,197,94,0.45);
  color: #86efac;
}
.gs-session-child .gs-session-label {
  font-size: 0.82rem;
}
.gs-session-fork-mark {
  color: rgba(34,197,94,0.75);
  font-size: 0.75rem;
}
.gs-fork-btn {
  margin-left: auto;
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  border: 1px solid rgba(245,158,11,0.45);
  background: rgba(245,158,11,0.12);
  color: #fcd34d;
  cursor: pointer;
}
.gs-fork-btn:hover:not(:disabled) { background: rgba(245,158,11,0.22); }
.gs-fork-btn:disabled { opacity: 0.5; cursor: default; }
.gs-fork-err {
  font-size: 7pt;
  color: #ef4444;
  margin-top: 4px;
}
.gs-parent-link {
  font-size: 0.68rem;
  padding: 0.15rem 0.4rem;
  border: none;
  background: rgba(59,130,246,0.12);
  color: #93c5fd;
  border-radius: 4px;
  cursor: pointer;
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gs-parent-link:hover { background: rgba(59,130,246,0.22); }
.gs-fork-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem 0.5rem;
  border-bottom: 1px solid rgba(176,208,248,0.12);
}
.gs-fork-form-sidebar {
  background: rgba(245,158,11,0.08);
  border-bottom: 1px solid rgba(245,158,11,0.2);
}
.gs-fork-cancel {
  font-size: 7pt;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  cursor: pointer;
  border: 1px solid rgba(176,208,248,0.2);
  background: rgba(255,255,255,0.08);
  color: var(--text-muted, #4a6080);
}
.gs-fork-input {
  flex: 1 1 8rem;
  min-width: 6rem;
  font-size: 0.75rem;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  border: 1px solid rgba(176,208,248,0.2);
  background: rgba(0,0,0,0.25);
  color: inherit;
}
.gs-fork-submit {
  font-size: 0.72rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  border: 1px solid rgba(34,197,94,0.45);
  background: rgba(34,197,94,0.15);
  color: #86efac;
  cursor: pointer;
}
.gs-fork-submit:disabled { opacity: 0.45; cursor: default; }

.gs-sessions-hdr {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem 0.15rem;
  flex-shrink: 0;
}

.gs-new-sess-btn {
  font-size: 9pt;
  font-weight: 700;
  width: 1.35rem;
  height: 1.35rem;
  line-height: 1;
  border-radius: 4px;
  border: 1px solid rgba(59,130,246,0.35);
  background: rgba(59,130,246,0.12);
  color: var(--accent, #3b82f6);
  cursor: pointer;
}
.gs-new-sess-btn:hover { background: rgba(59,130,246,0.22); }

.gs-new-sess-form {
  display: flex;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem 0.4rem;
  flex-shrink: 0;
}

.gs-session-row-wrap {
  display: flex;
  align-items: stretch;
}
.gs-session-row-wrap .gs-session-item { flex: 1; }
.gs-session-fork-btn {
  opacity: 0;
  align-self: center;
  font-size: 7pt;
  padding: 0.15rem 0.35rem;
  margin-right: 0.35rem;
  border: none;
  background: rgba(245,158,11,0.15);
  border-radius: 3px;
  cursor: pointer;
  transition: opacity 0.1s;
}
.gs-session-row-wrap:hover .gs-session-fork-btn { opacity: 1; }
.gs-session-fork-btn:disabled { opacity: 0.3; cursor: default; }

.gs-fork-from {
  font-size: 7pt;
  font-family: var(--font-mono, monospace);
  color: var(--text-muted, #4a6080);
  align-self: center;
}

.gs-sessions-hdr-label {
  flex: 1;
  font-size: 6.5pt;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted, #4a6080);
}

.gs-sort-btn {
  font-size: 6.5pt;
  font-family: var(--font-mono, monospace);
  color: var(--accent, #3b82f6);
  background: none;
  border: none;
  padding: 0.1rem 0.3rem;
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.1s;
}
.gs-sort-btn:hover { background: rgba(59,130,246,0.12); }

/* ── Session Admin strip ────────────────────────────────────── */
.gs-admin-panel {
  height: 9rem;
  min-height: 3.5rem;
  overflow-y: auto;
  flex-shrink: 0;
  background: rgba(176,208,248,0.04);
  padding: 0.4rem 0.75rem 0.3rem;
  border-bottom: none; /* replaced by resize handle */
}

.gs-admin-resize-h {
  height: 6px;
  cursor: row-resize;
  background: var(--border, #1e3a5f);
  flex-shrink: 0;
  transition: background 0.12s;
}
.gs-admin-resize-h:hover { background: var(--accent, #3b82f6); opacity: 0.7; }

.gs-admin-header {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.3rem;
  flex-wrap: wrap;
}

.gs-admin-session-id {
  font-size: 7.5pt;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  color: var(--text, #1a2744);
}

.gs-admin-date {
  font-size: 6.5pt;
  color: var(--text-muted, #4a6080);
  font-family: var(--font-mono, monospace);
  opacity: 0.85;
}

.gs-admin-section {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
  flex-wrap: wrap;
}

.gs-admin-section-label {
  font-size: 5.5pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted, #4a6080);
  white-space: nowrap;
  min-width: 4rem;
  padding-top: 0.15rem;
  flex-shrink: 0;
}

.gs-admin-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  flex: 1;
}

/* GPS chip — clickable PMC destination */
.gs-admin-gps-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 6.5pt;
  font-family: var(--font-mono, monospace);
  background: rgba(59,130,246,0.10);
  border: 1px solid rgba(59,130,246,0.28);
  color: var(--accent, #3b82f6);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s;
}
.gs-admin-gps-chip:hover { background: rgba(59,130,246,0.22); }

/* Neutral provenance chip */
.gs-admin-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 6pt;
  font-family: var(--font-mono, monospace);
  background: rgba(176,208,248,0.08);
  border: 1px solid rgba(176,208,248,0.18);
  color: var(--text-muted, #4a6080);
  white-space: nowrap;
}

.gs-chip-branch { background: rgba(34,197,94,0.08);  border-color: rgba(34,197,94,0.22);  color: #22c55e; }
.gs-chip-author { background: rgba(59,130,246,0.07);  border-color: rgba(59,130,246,0.18); }
.gs-chip-model  { background: rgba(167,139,250,0.09); border-color: rgba(167,139,250,0.22); color: #a78bfa; }
.gs-chip-type   { background: rgba(148,163,184,0.08); border-color: rgba(148,163,184,0.22); }
.gs-chip-nexmem { background: rgba(34,197,94,0.08);  border-color: rgba(34,197,94,0.22);  color: #22c55e; }

/* ── Book / chapter view ─────────────────────────────────────── */
.gs-chapter-wrap {
  margin-bottom: 0.1rem;
}

.gs-chapter-heading {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.75rem;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg, #f4f7fc);
  border-top:    1px solid var(--border, #1e3a5f);
  border-bottom: 1px solid var(--border, #1e3a5f);
  margin-bottom: 0.1rem;
}

.gs-chapter-name {
  font-size: 7pt;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  color: var(--accent, #3b82f6);
  flex: 1;
}

.gs-chapter-count {
  font-size: 6pt;
  color: var(--text-muted, #4a6080);
  font-family: var(--font-mono, monospace);
}

.gs-chapter-open-btn {
  font-size: 7pt;
  padding: 0.05rem 0.35rem;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 3px;
  color: var(--accent, #3b82f6);
  cursor: pointer;
  transition: background 0.1s;
}
.gs-chapter-open-btn:hover { background: rgba(59,130,246,0.18); }

.gs-chapter-lines {}

/* ── LiveDoc popup modal ──────────────────────────────────── */
.livedoc-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.52);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3vh 0 2vh;
}

.livedoc-modal {
  width: min(860px, 94vw);
  max-height: 94vh;
  background: var(--bg, #f4f7fc);
  border-radius: 8px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.livedoc-modal-hdr {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--border, #1e3a5f);
  flex-shrink: 0;
  flex-wrap: wrap;
  background: rgba(176,208,248,0.06);
}

.livedoc-modal-title {
  font-size: 8.5pt;
  font-weight: 700;
  color: var(--text, #1a2744);
}

.livedoc-modal-sid {
  font-size: 7pt;
  font-family: var(--font-mono, monospace);
  color: var(--accent, #3b82f6);
  font-weight: 600;
}

.livedoc-modal-date {
  font-size: 6.5pt;
  color: var(--text-muted, #4a6080);
  font-family: var(--font-mono, monospace);
}

.livedoc-modal-count {
  font-size: 6.5pt;
  color: var(--text-muted, #4a6080);
  font-family: var(--font-mono, monospace);
  margin-right: auto;
}

.livedoc-noise-btn {
  font-size: 6.5pt;
  font-family: var(--font-mono, monospace);
  padding: 0.15rem 0.5rem;
  background: rgba(176,208,248,0.1);
  border: 1px solid rgba(176,208,248,0.25);
  border-radius: 999px;
  color: var(--text-muted, #4a6080);
  cursor: pointer;
  transition: background 0.1s;
}
.livedoc-noise-btn:hover { background: rgba(176,208,248,0.22); }

.livedoc-close-btn {
  font-size: 9pt;
  font-weight: 700;
  padding: 0.1rem 0.5rem;
  background: none;
  border: 1px solid rgba(176,208,248,0.2);
  border-radius: 4px;
  color: var(--text-muted, #4a6080);
  cursor: pointer;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.livedoc-close-btn:hover {
  background: rgba(239,68,68,0.08);
  color: #ef4444;
  border-color: rgba(239,68,68,0.3);
}

/* Find-in-document */
.livedoc-search-input {
  width: 10rem;
  padding: 0.15rem 0.45rem;
  font-size: 7pt;
  font-family: var(--font, sans-serif);
  border: 1px solid rgba(176,208,248,0.3);
  border-radius: 4px;
  background: rgba(176,208,248,0.07);
  color: var(--text, #1a2744);
  outline: none;
}
.livedoc-search-input:focus { border-color: var(--accent, #3b82f6); }

.livedoc-match-count {
  font-size: 6.5pt;
  font-family: var(--font-mono, monospace);
  color: var(--text-muted, #4a6080);
  white-space: nowrap;
  min-width: 3.5rem;
  text-align: center;
}

.livedoc-nav-btn {
  font-size: 8pt;
  padding: 0.1rem 0.35rem;
  background: rgba(176,208,248,0.09);
  border: 1px solid rgba(176,208,248,0.25);
  border-radius: 3px;
  color: var(--text-muted, #4a6080);
  cursor: pointer;
  transition: background 0.1s;
}
.livedoc-nav-btn:hover { background: rgba(176,208,248,0.22); }

/* Highlight marks */
mark.livedoc-hl {
  background: #fef08a;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}
mark.livedoc-hl-active {
  background: #f59e0b;
  color: #fff;
  border-radius: 2px;
  outline: 2px solid #f59e0b;
  padding: 0 1px;
}

.livedoc-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem 2rem;
}

.livedoc-chapter {
  margin-bottom: 1.75rem;
}

.livedoc-chapter-hdr {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 2px solid var(--accent, #3b82f6);
  margin-bottom: 0.5rem;
  position: sticky;
  top: 0;
  background: var(--bg, #f4f7fc);
  z-index: 2;
}

.livedoc-chapter-name {
  font-size: 8.5pt;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  color: var(--accent, #3b82f6);
  flex: 1;
}

.livedoc-chapter-cnt {
  font-size: 6.5pt;
  color: var(--text-muted, #4a6080);
  font-family: var(--font-mono, monospace);
}

.livedoc-chapter-open {
  font-size: 6.5pt;
  padding: 0.1rem 0.45rem;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 3px;
  color: var(--accent, #3b82f6);
  cursor: pointer;
  transition: background 0.1s;
}
.livedoc-chapter-open:hover { background: rgba(59,130,246,0.18); }

.livedoc-line {
  padding: 0.45rem 0.65rem;
  margin-bottom: 0.35rem;
  border-radius: 0 4px 4px 0;
  background: rgba(176,208,248,0.04);
}

.livedoc-line-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.18rem;
}

.livedoc-speaker {
  font-size: 6.5pt;
  font-weight: 600;
  color: var(--text-muted, #4a6080);
}

.livedoc-time {
  font-size: 6pt;
  font-family: var(--font-mono, monospace);
  color: var(--text-muted, #4a6080);
  opacity: 0.7;
}

.livedoc-content {
  font-size: 8.5pt;
  line-height: 1.65;
  color: var(--text, #1a2744);
  white-space: pre-wrap;
  word-break: break-word;
}

/* LiveDoc button in lines header */
.gs-livedoc-btn {
  font-size: 6.5pt;
  font-family: var(--font, sans-serif);
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.22);
  border-radius: 4px;
  color: var(--accent, #3b82f6);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.1s;
}
.gs-livedoc-btn:hover { background: rgba(59,130,246,0.18); }

/* NexMEM distilled summary card (LiveDoc focused mode) */
.livedoc-summary-card {
  margin-bottom: 1.25rem;
  border: 1px solid rgba(34,197,94,0.22);
  border-radius: 6px;
  background: rgba(34,197,94,0.04);
  overflow: hidden;
}

.livedoc-summary-title {
  font-size: 7pt;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
  color: #22c55e;
  padding: 0.3rem 0.75rem;
  background: rgba(34,197,94,0.08);
  border-bottom: 1px solid rgba(34,197,94,0.15);
  white-space: pre-wrap;
  word-break: break-word;
}

.livedoc-summary-body {
  font-size: 8pt;
  line-height: 1.65;
  color: var(--text, #1a2744);
  white-space: pre-wrap;
  word-break: break-word;
  padding: 0.6rem 0.75rem;
}

/* Right panel — lines viewer */
/* IRIS DEV floor — ROSA | dialogue | track rail */
.gs-iris-floor {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.gs-rosa-col {
  width: 20rem;
  min-width: 14rem;
  max-width: 28rem;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border, #1e3a5f);
  background: rgba(167, 139, 250, 0.04);
}
.gs-rosa-hdr {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
  flex-shrink: 0;
}
.gs-rosa-hdr-titles {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.gs-rosa-hdr-title {
  font-size: 8pt;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7c3aed;
}
.gs-rosa-hdr-sub {
  font-weight: 400;
  font-size: 6.5pt;
  line-height: 1.35;
  color: var(--text-muted);
}
.gs-rosa-hdr .iris-agents {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}
.iris-agents-compact {
  flex-wrap: wrap;
  gap: 0.25rem;
}
.gs-rosa-from-section {
  margin-bottom: 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(124, 58, 237, 0.18);
}
.gs-rosa-from-label {
  font-size: 6.5pt;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #a78bfa;
  margin-bottom: 0.3rem;
}
.gs-rosa-empty p {
  margin: 0 0 0.35rem;
}
.gs-rosa-empty-hint {
  font-size: 6pt;
  line-height: 1.45;
  color: var(--text-muted);
  font-style: normal;
}
.gs-rosa-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0.35rem 0.45rem;
  font-size: 7pt;
}
.gs-rosa-empty {
  color: var(--text-muted);
  font-style: italic;
  padding: 0.5rem;
}
.gs-rosa-line {
  margin-bottom: 0.45rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
}
.gs-rosa-line-meta {
  display: flex;
  justify-content: space-between;
  font-size: 6pt;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}
.gs-rosa-speaker { color: #a78bfa; font-weight: 600; }
.gs-rosa-text {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 6.5pt;
}
.gs-rosa-line--sleuth .gs-rosa-speaker { color: #f59e0b; }
.gs-rosa-line--learn {
  margin-top: 0.2rem;
  padding: 0.25rem 0.3rem;
  border-left: 2px solid #22c55e;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.08), rgba(234, 179, 8, 0.06));
  border-radius: 0 3px 3px 0;
}
.gs-rosa-line--learn .gs-rosa-speaker { color: #eab308; font-weight: 700; }
.gs-rosa-line--learn .gs-rosa-text { color: var(--text, #1a2744); }
.gs-track-tool-link {
  display: block;
  font-size: 7pt;
  font-weight: 600;
  color: #22c55e;
  text-decoration: none;
  margin-bottom: 0.35rem;
}
.gs-track-tool-link:hover { color: #eab308; text-decoration: underline; }
.gs-cognition-bundle {
  margin-bottom: 0.5rem;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.04);
}
.gs-cognition-bundle-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0.4rem;
  cursor: pointer;
  font-size: 6.5pt;
  font-weight: 600;
  color: #f59e0b;
  list-style: none;
}
.gs-cognition-bundle-hdr::-webkit-details-marker { display: none; }
.gs-cognition-bundle-meta {
  font-weight: 400;
  font-size: 6pt;
  color: var(--text-muted);
}
.gs-cognition-bundle-body {
  padding: 0 0.35rem 0.35rem;
  border-top: 1px solid rgba(245, 158, 11, 0.15);
}
.gs-cognition-loose {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px dashed rgba(124, 58, 237, 0.2);
}
.gs-cognition-loose-label {
  font-size: 6pt;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
  padding: 0 0.15rem;
}
.gs-rosa-note {
  display: flex;
  gap: 0.35rem;
  align-items: flex-end;
  padding: 0.35rem 0.45rem;
  border-top: 1px solid rgba(124, 58, 237, 0.2);
  background: rgba(124, 58, 237, 0.06);
}
.gs-rosa-note-input {
  flex: 1;
  min-height: 2.5rem;
  font-size: 7pt;
  resize: vertical;
}
.gs-rosa-note-post {
  flex-shrink: 0;
  font-size: 7pt;
  padding: 0.25rem 0.5rem;
}
.gs-rosa-attach {
  border-top: 1px dashed rgba(124, 58, 237, 0.35);
  padding: 0.35rem 0.45rem 0.5rem;
  background: rgba(124, 58, 237, 0.05);
  max-height: 11rem;
  display: flex;
  flex-direction: column;
}
.gs-rosa-attach-hdr {
  display: flex;
  justify-content: space-between;
  font-size: 7pt;
  font-weight: 600;
  color: #a78bfa;
}
.gs-rosa-attach-hint {
  font-size: 6pt;
  color: var(--text-muted);
  margin: 0.2rem 0;
}
.gs-rosa-attach-body {
  flex: 1;
  overflow-y: auto;
  min-height: 2.5rem;
  outline: none;
}
.gs-rosa-attach-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.gs-rosa-attach-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
}
.gs-rosa-attach-file {
  font-size: 6pt;
  text-decoration: none;
  color: inherit;
}
.gs-rosa-attach-empty {
  font-size: 6pt;
  color: var(--text-muted);
  font-style: italic;
}
.gs-rosa-attach-add {
  font-size: 6.5pt;
  cursor: pointer;
  color: #a78bfa;
}
.gs-main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.gs-track-rail {
  width: 14rem;
  min-width: 2rem;
  border-left: 1px solid var(--border, #1e3a5f);
  display: flex;
  background: rgba(176, 208, 248, 0.05);
  position: relative;
}
.gs-track-rail.collapsed {
  width: 1.6rem;
}
.gs-track-rail-toggle {
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 1.4rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 8pt;
  color: var(--text-muted);
  z-index: 2;
}
.gs-track-rail-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-left: 1.4rem;
  min-width: 0;
}
.gs-track-rail.collapsed .gs-track-rail-inner {
  display: none;
}
.gs-track-tabs {
  display: flex;
  gap: 0.2rem;
  padding: 0.3rem 0.35rem;
  border-bottom: 1px solid var(--border, #1e3a5f);
}
.gs-track-tab {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 9pt;
  padding: 0.15rem 0.3rem;
  border-radius: 4px;
  opacity: 0.6;
}
.gs-track-tab.active {
  opacity: 1;
  background: rgba(59, 130, 246, 0.12);
}
.gs-track-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.4rem;
  font-size: 7pt;
}
.gs-scratchpad {
  width: 100%;
  min-height: 12rem;
  resize: vertical;
  font-size: 7pt;
  font-family: var(--font-mono, monospace);
  border: 1px solid var(--border, #1e3a5f);
  border-radius: 4px;
  padding: 0.35rem;
}
.gs-track-muted {
  color: var(--text-muted);
  font-size: 6.5pt;
}
.gs-track-att-row {
  display: flex;
  gap: 0.3rem;
  align-items: baseline;
  text-decoration: none;
  color: inherit;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(30, 58, 95, 0.1);
  font-size: 6.5pt;
}
.gs-track-att-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-scroll-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gs-lines-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.gs-lines-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--border, #1e3a5f);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.gs-dialogue-head {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  margin-right: 0.35rem;
}
.gs-dialogue-title {
  font-size: 8pt;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent, #3b82f6);
}
.gs-dialogue-sub {
  font-size: 6pt;
  color: var(--text-muted);
}
.gs-dialogue-empty {
  padding: 1rem 0.75rem;
  color: var(--text-muted);
  font-size: 7.5pt;
}
.gs-dialogue-empty p {
  margin: 0 0 0.35rem;
}
.gs-dialogue-empty-hint {
  font-size: 6.5pt;
  line-height: 1.45;
  font-style: italic;
}

.gs-line-filter {
  margin-left: auto;
  width: 13rem;
  padding: 0.2rem 0.45rem;
  font-size: 7.5pt;
}
.gs-lane-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-bottom: 1px solid var(--border, #1e3a5f);
  background: rgba(176, 208, 248, 0.03);
  flex-shrink: 0;
}
.gs-lane-chip {
  border: 1px solid var(--border, #1e3a5f);
  background: rgba(15, 23, 42, 0.55);
  color: var(--text-muted, #94a3b8);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 7pt;
  cursor: pointer;
  line-height: 1.35;
}
.gs-lane-chip:hover {
  border-color: #3b82f6;
  color: #e2e8f0;
}
.gs-lane-chip--active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.18);
  color: #dbeafe;
}

/* Append bar */
.global-scroll-append {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--border, #1e3a5f);
  background: rgba(176,208,248,0.04);
}

.gs-append-target {
  font-size: 6.5pt;
  font-family: var(--font-mono, monospace);
  color: var(--text-muted, #4a6080);
  white-space: nowrap;
  padding-top: 0.5rem;
  flex-shrink: 0;
}

.gs-append-agents {
  font-size: 6.5pt;
  color: var(--text-muted, #6b8aab);
  white-space: nowrap;
  padding-top: 0.5rem;
  flex-shrink: 0;
  opacity: 0.85;
}

.gs-append-input {
  flex: 1;
  resize: none;
  font-size: 8pt;
  min-height: 2.5rem;
  max-height: 6rem;
}

/* Sidebar shortcut button */
.gs-sidebar-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.4rem;
  background: rgba(59,130,246,0.06);
  border: 1px solid rgba(59,130,246,0.18);
  border-radius: 5px;
  color: var(--accent, #3b82f6);
  font-size: 7.5pt;
  font-weight: 700;
  font-family: var(--font, sans-serif);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, border-color 0.12s;
  box-sizing: border-box;
}
.gs-sidebar-btn:hover {
  background: rgba(59,130,246,0.13);
  border-color: rgba(59,130,246,0.38);
}
.gs-sidebar-btn-secondary {
  background: rgba(148,163,184,0.06);
  border-color: rgba(148,163,184,0.22);
  color: var(--text-muted, #4a6080);
  font-weight: 600;
}
.gs-sidebar-btn-secondary:hover {
  background: rgba(148,163,184,0.14);
  border-color: rgba(148,163,184,0.35);
  color: var(--text, #1a2744);
}

/* ── Dev rules sidebar ─────────────────────────────────────── */
.gs-dev-tools {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.45rem;
}
.gs-guideposts-group {
  margin-bottom: 0.5rem;
  border: 1px solid rgba(124, 58, 237, 0.35);
  border-radius: 5px;
  overflow: hidden;
  background: rgba(124, 58, 237, 0.06);
}
.gs-guideposts-hdr {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem;
  font-size: 7pt;
  font-weight: 700;
  color: #7c3aed;
  cursor: pointer;
}
.gs-guideposts-label { flex: 0 0 auto; }
.gs-guideposts-plane {
  flex: 1;
  text-align: right;
  font-size: 6pt;
  font-family: var(--font-mono, monospace);
  color: var(--text-muted, #4a6080);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gs-guideposts-body {
  border-top: 1px solid rgba(124, 58, 237, 0.2);
  padding: 0.4rem 0.5rem 0.5rem;
}
.gs-guideposts-gps {
  display: block;
  font-size: 6pt;
  word-break: break-all;
  margin-bottom: 0.35rem;
  color: var(--text-muted, #4a6080);
}
.gs-guideposts-list {
  margin: 0;
  padding: 0 0 0 0.9rem;
  font-size: 6.5pt;
  line-height: 1.35;
}
.gs-guidepost-item { margin-bottom: 0.25rem; }
.gs-guidepost-tag {
  font-family: var(--font-mono, monospace);
  font-size: 5.5pt;
  color: #a78bfa;
  margin-right: 0.25rem;
}
.gs-guideposts-copy {
  margin-top: 0.35rem;
  font-size: 6.5pt;
  padding: 0.2rem 0.45rem;
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 4px;
  background: transparent;
  color: #7c3aed;
  cursor: pointer;
}
.gs-guideposts-copy:hover {
  background: rgba(124, 58, 237, 0.1);
}

/* ── Dev Admin panel (IRIS DEV left rail) ──────────────────── */
.gs-dev-admin-panel {
  margin-bottom: 0.45rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 5px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.04);
}
.gs-dev-admin-panel--active {
  border-color: rgba(239, 68, 68, 0.55);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(245, 158, 11, 0.06));
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.12);
}
.gs-dev-admin-hdr {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.5rem;
  font-size: 7pt;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
}
.gs-dev-admin-panel--active .gs-dev-admin-hdr { color: #b91c1c; }
.gs-dev-admin-title { flex: 0 0 auto; }
.gs-dev-admin-live {
  flex: 1;
  text-align: right;
  font-size: 6pt;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #dc2626;
  animation: gs-dev-admin-pulse 2s ease-in-out infinite;
}
@keyframes gs-dev-admin-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.gs-dev-admin-body {
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  padding: 0.4rem 0.5rem 0.5rem;
}
.gs-dev-admin-hint {
  margin: 0 0 0.45rem;
  font-size: 6.5pt;
  line-height: 1.45;
  color: var(--text-muted, #64748b);
}
.gs-dev-admin-hint code {
  font-size: 6pt;
  background: rgba(15, 23, 42, 0.06);
  padding: 0.05rem 0.2rem;
  border-radius: 2px;
}
.gs-dev-admin-switch {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0.05rem 0.4rem;
  align-items: center;
  padding: 0.35rem 0.25rem;
  margin-bottom: 0.15rem;
  border-radius: 4px;
  cursor: pointer;
}
.gs-dev-admin-switch:hover { background: rgba(15, 23, 42, 0.04); }
.gs-dev-admin-switch input { grid-row: 1 / 3; accent-color: #64748b; }
.gs-dev-admin-switch--primary input { accent-color: #d97706; }
.gs-dev-admin-switch--danger input { accent-color: #dc2626; }
.gs-dev-admin-switch-label {
  font-size: 8pt;
  font-weight: 800;
  color: #0f172a;
}
.gs-dev-admin-switch-sub {
  grid-column: 2;
  font-size: 6.5pt;
  color: var(--text-muted, #64748b);
  line-height: 1.35;
}
.gs-dev-admin-expires {
  font-size: 6pt;
  font-family: var(--font-mono, monospace);
  color: #94a3b8;
  margin: 0.2rem 0 0.35rem;
}
.gs-dev-admin-actions {
  display: flex;
  gap: 0.35rem;
  margin: 0.35rem 0;
}
.gs-dev-admin-copy,
.gs-dev-admin-clear {
  flex: 1;
  font-size: 6.5pt;
  font-weight: 700;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.08);
  color: #1d4ed8;
  cursor: pointer;
}
.gs-dev-admin-clear {
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(148, 163, 184, 0.08);
  color: #475569;
}
.gs-dev-admin-clear:disabled { opacity: 0.45; cursor: default; }
.gs-dev-admin-rules-detail {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  margin-top: 0.25rem;
  padding-top: 0.2rem;
}
.gs-dev-admin-rules-hdr {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 6.5pt;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  padding: 0.2rem 0;
}
.gs-dev-admin-rules-cnt {
  flex: 1;
  text-align: right;
  font-family: var(--font-mono, monospace);
  font-size: 6pt;
}
.gs-dev-admin-rules-list {
  max-height: 7rem;
  overflow-y: auto;
  margin-top: 0.2rem;
}
.gs-dev-admin-banner {
  font-size: 6.5pt;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.45rem;
  border-radius: 3px;
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.gs-dev-admin-banner--full {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
  border-color: rgba(239, 68, 68, 0.45);
  animation: gs-dev-admin-pulse 2s ease-in-out infinite;
}
html[data-nos-dev-admin="autopilot"] .global-scroll-root {
  outline: 1px solid rgba(239, 68, 68, 0.12);
}

/* ── IRIS DEV QC capture (production journal snapshots) ───── */
.iris-qc-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.35rem;
  padding: 0.1rem 0.25rem;
  border-radius: 4px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.06);
}
.iris-qc-label {
  font-size: 6.5pt;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #1d4ed8;
  padding: 0 0.15rem;
}
.iris-qc-btn {
  font-size: 6.5pt;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  border: 1px solid rgba(59, 130, 246, 0.4);
  background: rgba(255, 255, 255, 0.7);
  color: #1e40af;
  cursor: pointer;
}
.iris-qc-btn:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.12);
}
.iris-qc-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.iris-qc-btn--region {
  border-color: rgba(245, 158, 11, 0.45);
  color: #b45309;
}
.iris-qc-hint {
  font-size: 6pt;
  color: var(--text-muted, #64748b);
  font-style: italic;
  padding-left: 0.15rem;
}
.iris-qc-rail-hint {
  margin: 0 0 0.35rem;
  padding: 0.25rem 0.35rem;
  font-size: 6pt;
  line-height: 1.4;
  color: var(--text-muted, #64748b);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

/* ── Elements stack (IRIS DEV sidebar) ─────────────────────── */
.gs-elements-stack {
  margin-bottom: 0.5rem;
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 5px;
  overflow: hidden;
  background: rgba(59, 130, 246, 0.04);
}
.gs-elements-hdr {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem;
  font-size: 7pt;
  font-weight: 700;
  color: var(--accent, #3b82f6);
  cursor: pointer;
}
.gs-elements-title { flex: 0 0 auto; }
.gs-elements-plane {
  flex: 1;
  text-align: right;
  font-size: 6pt;
  font-family: var(--font-mono, monospace);
  color: var(--text-muted, #4a6080);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gs-elements-body {
  border-top: 1px solid rgba(59, 130, 246, 0.15);
  padding: 0.15rem 0.35rem 0.35rem;
  max-height: 14rem;
  overflow-x: hidden;
  overflow-y: auto;
}
.gs-wip-panel {
  margin-bottom: 0.45rem;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 5px;
  overflow: hidden;
  background: rgba(245, 158, 11, 0.06);
}
.gs-wip-panel-hdr {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem;
  font-size: 7pt;
  font-weight: 700;
  color: #b45309;
  cursor: pointer;
}
.gs-wip-panel-title { flex: 0 0 auto; }
.gs-wip-panel-cnt {
  flex: 1;
  text-align: right;
  font-size: 6pt;
  font-family: var(--font-mono, monospace);
  color: var(--text-muted, #4a6080);
}
.gs-wip-panel-body {
  border-top: 1px solid rgba(245, 158, 11, 0.2);
  padding: 0.35rem 0.5rem 0.45rem;
  max-height: 9rem;
  overflow-y: auto;
}
.gs-sidebar-btn-wip {
  border-color: rgba(245, 158, 11, 0.35);
  color: #b45309;
}
.gs-element-nested {
  border-bottom: none;
  margin-bottom: 0;
}
.gs-element-nested .spmc-element-hdr {
  padding: 0.3rem 0.15rem;
}
.gs-elements-guideposts {
  margin: 0.25rem 0 0.35rem;
  padding-left: 0.75rem;
}
.gs-elements-rules {
  max-height: 8rem;
  overflow-y: auto;
  border-top: 1px solid var(--border, #1e3a5f);
  border-radius: 4px;
}
.gs-wip-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.gs-wip-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(30, 58, 95, 0.08);
}
.gs-wip-item:last-child { border-bottom: none; }
.gs-wip-lane {
  font-size: 7pt;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d97706;
}
.gs-wip-title {
  font-size: 8.5pt;
  font-weight: 700;
  color: #0a1628;
  line-height: 1.35;
}
.gs-wip-note {
  font-size: 7.5pt;
  color: #64748b;
  line-height: 1.4;
}
.gs-wip-sw-btn {
  margin-top: 0.5rem;
  font-size: 8pt;
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid rgba(30, 58, 95, 0.2);
  background: #fff;
  color: #1e3a5f;
  cursor: pointer;
}
.gs-wip-sw-btn:hover:not(:disabled) { background: #f1f5f9; }
.gs-wip-sw-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* IRIS DEV — TOO doc chain crib (user-only channel index + preview) */
.gs-too-panel {
  margin: 0.35rem 0 0.5rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  background: #fafbfc;
  font-size: 0.72rem;
}
.gs-too-panel-hdr {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  color: var(--text-muted, #64748b);
}
.gs-too-panel-title { flex: 0 0 auto; }
.gs-too-panel-cnt {
  margin-left: auto;
  font-size: 0.65rem;
  background: #e2e8f0;
  border-radius: 8px;
  padding: 0 0.35rem;
}
.gs-too-panel-body { padding: 0.35rem 0.5rem 0.5rem; }
.gs-too-hint {
  margin: 0 0 0.45rem;
  color: var(--text-muted, #64748b);
  line-height: 1.35;
}
.gs-too-list { list-style: none; margin: 0; padding: 0; }
.gs-too-item {
  border-top: 1px solid #e8edf2;
  padding: 0.4rem 0;
}
.gs-too-item:first-child { border-top: none; }
.gs-too-item-hdr { display: flex; align-items: baseline; gap: 0.35rem; }
.gs-too-title { font-weight: 600; color: #0f172a; }
.gs-too-role { display: block; color: #64748b; margin: 0.15rem 0 0.3rem; }
.gs-too-status {
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 3px;
}
.gs-too-status--too { background: #dbeafe; color: #1d4ed8; }
.gs-too-status--doctrine { background: #dcfce7; color: #15803d; }
.gs-too-status--doe { background: #fef3c7; color: #b45309; }
.gs-too-status--wip { background: #fce7f3; color: #be185d; }
.gs-too-status--planned { background: #f1f5f9; color: #475569; border: 1px dashed #94a3b8; }
.gs-too-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.25rem; }
.gs-too-link, .gs-too-link-btn, .gs-too-gps-btn {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  cursor: pointer;
  text-decoration: none;
}
.gs-too-link-btn.active { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
.gs-too-sources { margin: 0; padding-left: 0.85rem; color: #64748b; }
.gs-too-src { font-size: 0.62rem; word-break: break-all; }
.gs-too-preview {
  margin-top: 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.gs-too-preview-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0.45rem;
  background: #0a1628;
  color: #94a3b8;
  font-size: 0.65rem;
}
.gs-too-preview-close {
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.85rem;
}
.gs-too-preview-frame {
  width: 100%;
  height: 14rem;
  border: none;
  background: #f8fafc;
}

.gs-elements-empty,
.gs-elements-hint {
  font-size: 6.5pt;
  color: var(--text-muted, #4a6080);
  padding: 0.35rem 0.15rem;
  font-style: italic;
}
.gs-session-rules-prep { margin-bottom: 0.35rem; }
.gs-session-rules-list {
  margin: 0;
  padding: 0 0 0 0.85rem;
  font-size: 6.5pt;
  line-height: 1.35;
  max-height: 6rem;
  overflow-y: auto;
}
.gs-session-rule-item { margin-bottom: 0.2rem; }
.gs-session-rules-label {
  display: block;
  font-size: 6pt;
  font-weight: 700;
  color: var(--text-muted, #4a6080);
  margin: 0.25rem 0 0.15rem;
}
.gs-session-rules-edit {
  width: 100%;
  min-height: 3.5rem;
  max-height: 6rem;
  font-size: 6.5pt;
  font-family: var(--font, sans-serif);
  border: 1px solid var(--border, #1e3a5f);
  border-radius: 4px;
  padding: 0.35rem;
  resize: vertical;
  box-sizing: border-box;
  background: var(--bg-panel, #fff);
}
.gs-notes-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.25rem;
}
.gs-notes-add-btn {
  font-size: 6.5pt;
  padding: 0.15rem 0.45rem;
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: 4px;
  background: rgba(217, 119, 6, 0.08);
  color: #b45309;
  cursor: pointer;
}
.gs-notes-add-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.gs-session-note-card {
  border: 1px solid var(--border, #1e3a5f);
  border-radius: 4px;
  padding: 0.35rem;
  margin-bottom: 0.35rem;
  background: var(--bg-panel, #fff);
}
.gs-session-note-meta {
  display: flex;
  justify-content: space-between;
  font-size: 6pt;
  font-family: var(--font-mono, monospace);
  color: var(--text-muted, #4a6080);
  margin-bottom: 0.2rem;
}
.gs-session-note-text {
  font-size: 6.5pt;
  line-height: 1.35;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 0.25rem;
}
.gs-session-note-thumb {
  display: block;
  width: 100%;
  max-height: 5rem;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid var(--border, #1e3a5f);
  cursor: pointer;
  margin-top: 0.15rem;
}
.gs-session-note-thumb:hover {
  border-color: var(--accent, #3b82f6);
}
.gs-note-overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.gs-note-overlay-modal {
  background: var(--bg-panel, #fff);
  border-radius: 8px;
  max-width: min(92vw, 720px);
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  padding: 0.5rem 0.65rem 0.75rem;
}
.gs-note-overlay-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}
.gs-note-overlay-title {
  font-size: 8pt;
  font-weight: 700;
}
.gs-note-overlay-close {
  border: none;
  background: transparent;
  font-size: 14pt;
  cursor: pointer;
  color: var(--text-muted, #4a6080);
  line-height: 1;
}
.gs-note-overlay-note {
  font-size: 7pt;
  line-height: 1.4;
  white-space: pre-wrap;
  margin-bottom: 0.5rem;
}
.gs-note-overlay-img {
  display: block;
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--border, #1e3a5f);
}

.spmc-uturn-stub {
  border: 1px dashed rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.06);
  margin: 1rem;
  border-radius: 8px;
  padding: 1.5rem;
}
.spmc-uturn-stub .spmc-placeholder-title {
  color: #d97706;
}

.gs-rules-group {
  margin-bottom: 0.5rem;
  border: 1px solid var(--border, #1e3a5f);
  border-radius: 5px;
  overflow: hidden;
  background: rgba(176,208,248,0.04);
}
.gs-rules-hdr {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem;
  font-size: 7pt;
  font-weight: 700;
  color: var(--text, #1a2744);
}
.gs-rules-arrow { font-size: 7pt; color: var(--text-muted); width: 0.7rem; }
.gs-rules-label { flex: 1; }
.gs-rules-count {
  font-size: 6pt;
  font-family: var(--font-mono, monospace);
  color: var(--text-muted, #4a6080);
}
.gs-rules-list {
  border-top: 1px solid var(--border, #1e3a5f);
  max-height: 11rem;
  overflow-y: auto;
}
.gs-rule-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid rgba(30,58,95,0.12);
  font-size: 6.5pt;
}
.gs-rule-item:last-child { border-bottom: none; }
.gs-rule-bypassed .gs-rule-text {
  opacity: 0.45;
  text-decoration: line-through;
}
.gs-rule-toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}
.gs-rule-toggle input { accent-color: #f59e0b; cursor: pointer; }
.gs-rule-cat {
  font-size: 6pt;
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent, #3b82f6);
  letter-spacing: 0.03em;
}
.gs-rule-bypassed .gs-rule-cat { color: #f59e0b; }
.gs-rule-text {
  color: var(--text-muted, #4a6080);
  line-height: 1.35;
  padding-left: 1.1rem;
}

/* ── Dictionary pane + popup ───────────────────────────────── */
.gs-dict-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.gs-dict-hdr, .dict-popup-hdr {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border, #1e3a5f);
  background: rgba(176,208,248,0.06);
  flex-shrink: 0;
}
.gs-dict-title, .dict-popup-title {
  font-size: 8.5pt;
  font-weight: 700;
}
.gs-dict-badge, .dict-popup-badge {
  font-size: 6pt;
  font-family: var(--font-mono, monospace);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.22);
  color: var(--accent, #3b82f6);
}
.dict-popup-badge {
  background: rgba(148,163,184,0.1);
  border-color: rgba(148,163,184,0.25);
  color: var(--text-muted, #4a6080);
}
.gs-dict-back {
  margin-left: auto;
  font-size: 7pt;
  padding: 0.2rem 0.5rem;
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 4px;
  color: var(--accent, #3b82f6);
  cursor: pointer;
}
.gs-dict-body, .dict-popup-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.6rem 0.75rem;
}
.gs-dict-entry {
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(30,58,95,0.1);
}
.gs-dict-entry:last-child { border-bottom: none; margin-bottom: 0; }
.gs-dict-term {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}
.gs-dict-name {
  font-size: 8pt;
  font-weight: 700;
  color: var(--text, #1a2744);
}
.gs-dict-kind {
  font-size: 6pt;
  font-family: var(--font-mono, monospace);
  color: var(--text-muted, #4a6080);
  text-transform: uppercase;
}
.gs-dict-def {
  font-size: 7pt;
  color: var(--text-muted, #4a6080);
  line-height: 1.45;
}
.dict-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 0 2vh;
}
.dict-popup-modal {
  width: min(640px, 92vw);
  max-height: 80vh;
  background: var(--bg, #f4f7fc);
  border-radius: 8px;
  box-shadow: 0 6px 36px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dict-popup-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 10pt;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.1rem 0.3rem;
}
.dict-popup-close:hover { color: var(--text); }

.iris-terminal-host {
  height: 240px;
  background: #0b0f17;
  padding: 4px 6px;
  overflow: hidden;
}

/* xterm fills the host */
.iris-terminal-host .xterm { height: 100%; }

/* ── Sidebar content creation toolbar ─────────────────────────────────── */
.sidebar-create-bar {
  padding: 4px 8px 2px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-create-row {
  display: flex;
  align-items: stretch;
  gap: 4px;
}
.sidebar-create-row .sidebar-new-btn {
  flex: 1;
  min-width: 0;
}
.sidebar-new-btn {
  width: 100%;
  background: #0f2540;
  color: #7dd3fc;
  border: 1px solid #1e4a7a;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.72rem;
  text-align: left;
  transition: background 0.15s;
}
.sidebar-new-btn:hover { background: #1a3f6e; }
.sidebar-new-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 0 4px;
}
.sidebar-new-input {
  background: #070f1a;
  border: 1px solid #1e4a7a;
  color: #cbd5e1;
  border-radius: 3px;
  padding: 4px 7px;
  font-size: 0.72rem;
  outline: none;
}
.sidebar-new-input:focus { border-color: #3b82f6; }
.sidebar-new-slug {
  color: #64748b;
  font-family: monospace;
  font-size: 0.68rem;
}
.sidebar-new-select {
  background: #070f1a;
  border: 1px solid #1e4a7a;
  color: #94a3b8;
  border-radius: 3px;
  padding: 4px 7px;
  font-size: 0.72rem;
}
.sidebar-new-submit {
  background: #0f3320;
  color: #6ee7b7;
  border: 1px solid #1a6040;
  border-radius: 3px;
  padding: 3px 12px;
  cursor: pointer;
  font-size: 0.72rem;
  align-self: flex-end;
  transition: background 0.15s;
}
.sidebar-new-submit:hover { background: #1a6040; }

/* ── IP Lockbox — Tier 2 Sovereign Slate (vault theme) ─────── */
.ip-slate-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(165deg, #faf6ef 0%, #f4f7fc 45%, #eef2f7 100%);
}

.ip-slate-topbar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem;
  background: #1a1625;
  color: #e8dcc8;
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
  flex-shrink: 0;
}

.ip-slate-home {
  color: #c4b5a0;
  text-decoration: none;
  font-size: 11pt;
  flex-shrink: 0;
}
.ip-slate-home:hover { color: #fcd34d; }

.ip-slate-brand {
  font-size: 11pt;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.ip-slate-tier {
  font-size: 7pt;
  font-family: var(--font-mono);
  color: #a78bfa;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.28);
}

.ip-slate-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.45rem 0.85rem;
  background: rgba(26, 22, 37, 0.04);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow-x: auto;
}

.ip-slate-tab {
  font-size: 8pt;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.ip-slate-tab:hover {
  color: var(--text);
  background: rgba(245, 158, 11, 0.06);
}
.ip-slate-tab.active {
  color: #92400e;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.35);
}

.ip-slate-main {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem;
  min-height: 0;
}

.ip-slate-panel {
  max-width: 56rem;
  margin: 0 auto;
}

.ip-slate-h2 {
  font-size: 12pt;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.ip-slate-lead {
  font-size: 8.5pt;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
  max-width: 42rem;
}

.ip-slate-loading,
.ip-slate-empty {
  font-size: 8pt;
  font-family: var(--font-mono);
  color: var(--text-muted);
  padding: 1.2rem;
  border: 1px dashed rgba(30, 58, 95, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.55);
}

.ip-plb-card {
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-panel);
  transition: border-color 0.12s;
}
.ip-plb-card:hover { border-color: rgba(245, 158, 11, 0.45); }

.ip-plb-title {
  font-size: 9pt;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.ip-plb-snippet {
  font-size: 8pt;
  color: var(--text-muted);
  line-height: 1.45;
}

.ip-plb-session {
  font-size: 7pt;
  font-family: var(--font-mono);
  color: var(--accent);
  margin-top: 0.35rem;
}

.ip-track-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8pt;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.ip-track-table th {
  text-align: left;
  padding: 0.45rem 0.65rem;
  background: rgba(26, 22, 37, 0.06);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 7pt;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}
.ip-track-table td {
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}
.ip-track-table tr:last-child td { border-bottom: none; }
.ip-track-table tr:hover td { background: rgba(245, 158, 11, 0.04); }

.ip-status-draft { color: #d97706; font-weight: 700; }
.ip-status-active { color: #16a34a; font-weight: 700; }
.ip-status-filed { color: #2563eb; font-weight: 700; }

.ip-modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}

.ip-mod-card {
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
}
.ip-mod-card h3 {
  font-size: 9pt;
  font-weight: 800;
  margin-bottom: 0.4rem;
}
.ip-mod-card ul {
  list-style: none;
  font-size: 8pt;
  color: var(--text-muted);
  line-height: 1.55;
}
.ip-mod-card li::before {
  content: "· ";
  color: var(--accent);
  font-weight: 700;
}

.ip-mod-sw { border-left: 3px solid #22c55e; }
.ip-mod-slate { border-left: 3px solid #a78bfa; }
.ip-mod-kernel { border-left: 3px solid #3b82f6; }

.ip-decision-rule {
  font-size: 8pt;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: var(--text);
}

/* ── NexOS Canvas — canonical chrome (browser + Tauri) ─────────────── */
.nos-canvas-chrome {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.nos-canvas-chrome--channel .ch-shell-toolbar {
  border-bottom: 1px solid rgba(30, 58, 95, 0.12);
}

/* ── NosBlueToolbar — N2 template standard: dark navy + white type ─ */
.nos-blue-toolbar {
  background: #0f2744;
  color: #f8fafc;
  padding: 8px 18px;
  font-size: 8pt;
  font-family: var(--font-mono);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.nos-blue-toolbar-left,
.nos-blue-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nos-blue-toolbar-brand {
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
  font-size: 10pt;
}
.nos-blue-toolbar-brand:hover { color: #bfdbfe; }
.nos-blue-toolbar-sub { color: rgba(248, 250, 252, 0.72); font-size: 7.5pt; }
.nos-blue-toolbar .nos-rec-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fecaca;
}
.nos-blue-toolbar .nos-rec-btn:hover { background: rgba(255, 255, 255, 0.14); }

/* nos-templates primitives on sovereign slates */
.nos-rec-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 8pt;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  margin-left: auto;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 4px;
  color: #dc2626;
  cursor: pointer;
}
.nos-rec-btn:hover { background: rgba(239, 68, 68, 0.14); }
.nos-rec-btn.recording {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.5);
}
.nos-rec-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.nos-rec-btn.recording .nos-rec-dot {
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
}

.nos-builder-sig {
  position: fixed;
  right: 14px;
  bottom: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 9pt;
  z-index: 50;
  pointer-events: none;
  opacity: 0.88;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.nos-builder-sig-n {
  position: absolute;
  font-size: 6pt;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.55;
  line-height: 1;
}
.nos-builder-sig-letter {
  margin-top: 4px;
  line-height: 1;
}
.nos-sig-grok { color: #f59e0b; }
.nos-sig-rosa { color: #a78bfa; }
.nos-sig-joint { color: #22c55e; font-size: 7pt; }

/* Stack-Binders host frames */
.nos-iwc-host {
  width: 100%;
  flex: 1;
  min-height: 12rem;
  border: none;
  background: transparent;
}
.gs-iwc-tree { min-height: 18rem; }

.nos-mw-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(15, 23, 42, 0.45);
  pointer-events: none;
}
.nos-mw-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: auto;
  background: transparent;
}
.nos-mw-modal {
  position: absolute;
  z-index: 1;
  pointer-events: auto;
  min-width: 360px;
  min-height: 280px;
  max-width: 96vw;
  max-height: 92vh;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.nos-mw-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.55rem;
  border-bottom: 1px solid var(--border);
  background: rgba(217, 119, 6, 0.08);
  cursor: move;
  user-select: none;
  flex-shrink: 0;
}
.nos-mw-title { font-weight: 800; font-size: 9pt; }
.nos-mw-close {
  border: none;
  background: transparent;
  font-size: 14pt;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
}
.nos-mw-frame {
  width: 100%;
  border: none;
  flex: 1;
  min-height: 0;
}
.nos-mw-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 14px;
  height: 14px;
  cursor: se-resize;
}
.nos-mw-resize::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
}


.gs-sidebar-btn-journal { border-color: rgba(217, 119, 6, 0.35); color: #b45309; }
.gs-sidebar-btn-iwc { border-color: rgba(167, 139, 250, 0.35); color: #7c3aed; }
.gs-sidebar-btn-iwc.active { background: rgba(167, 139, 250, 0.12); }

/* ── DocREPO browser pages ───────────────────────────────────────── */
.docrepo-page {
  min-height: 100vh; padding: 24px 32px; background: var(--bg);
}
.docrepo-hdr { margin-bottom: 16px; }
.docrepo-home-link {
  font-size: 8pt; color: var(--accent); text-decoration: none; display: inline-block; margin-bottom: 8px;
}
.docrepo-home-link:hover { text-decoration: underline; }
.docrepo-title { font-size: 16pt; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.docrepo-subtitle { font-size: 9pt; color: var(--text-muted); }
.docrepo-toolbar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.docrepo-search {
  flex: 1; max-width: 320px; padding: 6px 10px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 9pt;
}
.docrepo-count { font-size: 8pt; color: var(--text-muted); }
.docrepo-split {
  display: grid; grid-template-columns: 280px 1fr; gap: 16px; min-height: 60vh;
}
.docrepo-list {
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 8px;
  overflow-y: auto; max-height: 70vh;
}
.docrepo-item {
  padding: 10px 12px; border-bottom: 1px solid var(--border-light); cursor: pointer;
}
.docrepo-item:hover { background: rgba(59, 130, 246, 0.06); }
.docrepo-item.active { background: rgba(59, 130, 246, 0.12); border-left: 3px solid var(--accent); }
.docrepo-item-title { font-weight: 600; font-size: 9pt; margin-bottom: 2px; }
.docrepo-item-meta { font-size: 7.5pt; color: var(--text-muted); display: flex; gap: 8px; align-items: center; }
.docrepo-slug { font-family: var(--font-mono); }
.docrepo-ver { color: var(--accent); }
.docrepo-preview {
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 8px;
  padding: 16px; overflow-y: auto; max-height: 70vh;
}
.docrepo-preview-body { font-size: 9pt; line-height: 1.5; }
.docrepo-preview-empty, .docrepo-empty, .docrepo-loading {
  padding: 24px; color: var(--text-muted); font-size: 9pt; text-align: center;
}
.docrepo-fs-roots { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.docrepo-root-btn {
  padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg-panel); font-size: 8pt; cursor: pointer;
}
.docrepo-root-btn:hover { border-color: var(--accent); color: var(--accent); }
.docrepo-root-btn--active {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.docrepo-path-bar { margin-bottom: 10px; font-size: 8pt; }
.docrepo-path-label { color: var(--text-muted); margin-right: 6px; }
.docrepo-path { font-family: var(--font-mono); font-size: 8pt; word-break: break-all; }
.docrepo-pin-btn {
  margin-left: auto; padding: 2px 8px; font-size: 7pt; border: 1px solid var(--border);
  border-radius: 4px; background: transparent; cursor: pointer; color: var(--accent);
}
.docrepo-pin-btn:hover { background: rgba(59, 130, 246, 0.1); }
.docrepo-registered-hdr { font-size: 8pt; font-weight: 600; margin-bottom: 8px; color: var(--text-muted); }
.docrepo-reg-item { padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.docrepo-reg-title { font-weight: 600; font-size: 9pt; }
.docrepo-reg-path { font-size: 7pt; font-family: var(--font-mono); color: var(--text-muted); word-break: break-all; }

/* ── Global legacy import modal (spaces-nav) ─────────────────────── */
.nos-legacy-import-backdrop {
  position: fixed; inset: 0; z-index: 12000;
  background: rgba(15, 23, 42, 0.55);
  /* journal #117 — backdrop click must not dismiss before Space+D capture */
  cursor: default;
}
/* NOS standard dialog: 30% × 80% viewport (os_ref_modal_geom / journal #109) */
.nos-legacy-import-modal {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.nos-legacy-import-modal--nos-std {
  position: fixed;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px 20px;
  max-width: none;
  max-height: none;
}
.nos-legacy-import-list-meta { flex-shrink: 0; }
.nos-legacy-import-search-block {
  margin-bottom: 12px; padding: 10px 12px;
  background: var(--bg-muted); border-radius: 6px; border: 1px solid var(--border-light);
}
.nos-legacy-import-search-label { font-size: 8pt; font-weight: 600; display: block; margin-bottom: 6px; }
.nos-legacy-import-search-row { display: flex; gap: 8px; margin-bottom: 8px; }
.nos-legacy-import-search-input {
  flex: 1; padding: 8px 10px; font-size: 9pt;
  border: 1px solid var(--border); border-radius: 4px;
}
.nos-legacy-import-search-filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 8pt;
}
.nos-legacy-import-select, .nos-legacy-import-ext {
  padding: 4px 8px; border: 1px solid var(--border); border-radius: 4px; font-size: 8pt;
}
.nos-legacy-import-ext { width: 4rem; }
.nos-legacy-import-list-hint { font-size: 8pt; color: var(--text-muted); margin: 4px 0; }
.nos-legacy-import-name-block { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nos-legacy-import-path-line {
  font-size: 7pt; color: var(--text-muted); word-break: break-all;
  font-family: var(--font-mono);
}
.nos-legacy-import-selected-count { font-size: 8pt; color: var(--text-muted); margin-right: auto; }
.nos-legacy-import-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.nos-legacy-import-hdr h2 { font-size: 12pt; margin: 0; }
.nos-legacy-import-close { border: none; background: transparent; cursor: pointer; font-size: 14pt; }
.nos-legacy-import-hint { font-size: 8.5pt; color: var(--text-muted); margin: 0 0 12px; }
.nos-legacy-import-row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; font-size: 8pt; }
.nos-legacy-import-row input { flex: 1; padding: 4px 8px; border: 1px solid var(--border); border-radius: 4px; }
.nos-legacy-import-roots { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.nos-legacy-import-list {
  flex: 1;
  min-height: 120px;
  overflow: auto;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  padding: 6px;
  margin: 8px 0;
}
.nos-legacy-import-item { display: flex; gap: 8px; align-items: flex-start; padding: 4px 2px; font-size: 8.5pt; cursor: pointer; }
.nos-legacy-import-item--pinned {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 4px;
  padding: 6px 4px;
  margin-bottom: 4px;
}
.nos-legacy-import-check {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--accent, #2563eb);
  cursor: pointer;
}
.nos-legacy-import-pinned-tag {
  font-size: 7pt;
  font-weight: 600;
  color: var(--accent, #2563eb);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.nos-legacy-import-name { flex: 1; }
.nos-legacy-import-status { font-size: 7.5pt; background: var(--bg-muted); padding: 8px; border-radius: 4px; white-space: pre-wrap; }
.nos-legacy-import-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.nos-legacy-import-inbox-link { font-size: 8pt; color: var(--accent); }
.spaces-nav-import-inbox-empty { padding: 8px 0 16px; }
.spaces-nav-import-inbox-notice {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(46, 160, 87, 0.12);
  border: 1px solid rgba(46, 160, 87, 0.35);
  color: var(--text, #e8e8e8);
  font-size: 0.9rem;
}
.spaces-nav-import-inbox-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.spaces-nav-empty--hint { font-size: 8pt; opacity: 0.9; }
.nos-legacy-mirror-view { padding: 12px 0; }
.nos-legacy-mirror-path code { font-size: 8pt; word-break: break-all; }
.nos-legacy-pdf-frame { width: 100%; min-height: 70vh; border: 1px solid var(--border); border-radius: 4px; }

/* ── Channels browser (show / distribution) ──────────────────────── */
.chbrowser-page {
  min-height: 100vh; padding: 16px 24px 32px; background: var(--bg);
}
.chbrowser-page--canvas {
  min-height: 0;
  flex: 1;
  padding: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.chbrowser-page--canvas .chbrowser-hdr { flex-shrink: 0; margin-bottom: 8px; }
.chbrowser-page--canvas .chbrowser-title { font-size: 11pt; }
.chbrowser-page--canvas .chbrowser-layout {
  flex: 1;
  min-height: 0;
  max-height: none;
}
.chbrowser-page--canvas .chbrowser-tree,
.chbrowser-page--canvas .chbrowser-picks,
.chbrowser-page--canvas .chbrowser-preview,
.chbrowser-page--canvas .chbrowser-admin {
  max-height: none;
  height: 100%;
  min-height: 280px;
}
.chbrowser-hdr { margin-bottom: 12px; }
.chbrowser-home-link {
  font-size: 8pt; color: var(--accent); text-decoration: none; display: inline-block; margin-bottom: 6px;
}
.chbrowser-home-link:hover { text-decoration: underline; }
.chbrowser-title { font-size: 16pt; font-weight: 700; color: var(--text); margin: 0 0 4px; }
.chbrowser-subtitle { font-size: 9pt; color: var(--text-muted); margin: 0; max-width: 52rem; line-height: 1.45; }
.chbrowser-toolbar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.chbrowser-search {
  flex: 1; max-width: 360px; padding: 6px 10px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 9pt;
}
.chbrowser-count { font-size: 8pt; color: var(--text-muted); }
.chbrowser-layout {
  display: grid;
  grid-template-columns: 220px 260px minmax(0, 1fr) 280px;
  gap: 12px;
  min-height: 62vh;
  align-items: start;
}
.chbrowser-tree, .chbrowser-picks, .chbrowser-preview, .chbrowser-admin {
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px; max-height: 74vh; overflow-y: auto;
}
.chbrowser-panel-title {
  font-size: 7.5pt; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--text-muted); margin: 0 0 10px;
}
.chbrowser-group-list { list-style: none; margin: 0; padding: 0; }
.chbrowser-group { margin-bottom: 10px; }
.chbrowser-group-head {
  display: flex; align-items: center; gap: 6px; font-size: 8pt; font-weight: 700;
  color: #1e3a5f; margin-bottom: 4px;
}
.chbrowser-group-count {
  margin-left: auto; font-size: 7pt; color: var(--text-muted);
  background: rgba(30, 58, 95, 0.08); padding: 1px 6px; border-radius: 8px;
}
.chbrowser-channel-list { list-style: none; margin: 0; padding: 0 0 0 4px; }
.chbrowser-channel-btn {
  width: 100%; text-align: left; border: none; background: transparent;
  padding: 8px 8px; border-radius: 6px; cursor: pointer;
  border-left: 3px solid transparent;
}
.chbrowser-channel-btn:hover { background: rgba(59, 130, 246, 0.06); }
.chbrowser-channel-btn.active {
  background: rgba(59, 130, 246, 0.12); border-left-color: var(--accent);
}
.chbrowser-channel-name { display: block; font-size: 9pt; font-weight: 600; }
.chbrowser-channel-meta {
  display: flex; justify-content: space-between; gap: 6px; font-size: 7pt; color: var(--text-muted);
}
.chbrowser-channel-slug { font-family: var(--font-mono); }
.chbrowser-pick-list { list-style: none; margin: 0; padding: 0; }
.chbrowser-pick-btn {
  width: 100%; display: flex; align-items: flex-start; gap: 8px;
  text-align: left; border: none; background: transparent;
  padding: 8px; border-radius: 6px; cursor: pointer; border-bottom: 1px solid var(--border-light);
}
.chbrowser-pick-btn:hover { background: rgba(59, 130, 246, 0.06); }
.chbrowser-pick-btn.active { background: rgba(59, 130, 246, 0.12); }
.chbrowser-pick-seq {
  font-size: 8pt; font-weight: 700; color: var(--accent); min-width: 1.2rem;
}
.chbrowser-pick-body { flex: 1; min-width: 0; }
.chbrowser-pick-title { display: block; font-size: 9pt; font-weight: 600; }
.chbrowser-pick-slug {
  display: block; font-size: 7pt; font-family: var(--font-mono); color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chbrowser-pick-status { font-size: 7pt; color: var(--text-muted); text-transform: uppercase; }
.chbrowser-preview-body { font-size: 9pt; line-height: 1.5; }
.chbrowser-empty {
  padding: 20px 8px; color: var(--text-muted); font-size: 8.5pt; text-align: center; line-height: 1.45;
}
.chbrowser-admin-card {
  margin-bottom: 14px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}
.chbrowser-admin-card:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.chbrowser-admin-subtitle {
  font-size: 8pt; font-weight: 700; color: #1e3a5f; margin: 0 0 6px;
}
.chbrowser-admin-kicker { font-size: 9pt; font-weight: 600; margin: 0 0 4px; }
.chbrowser-admin-meta { font-size: 7.5pt; color: var(--text-muted); margin: 0 0 4px; line-height: 1.4; }
.chbrowser-admin-hint { font-size: 7.5pt; color: var(--text-muted); margin: 0 0 8px; line-height: 1.4; }
/* Journal #175 · capture #270 — right rail dormant until pick select / Activate */
.chbrowser-admin--dormant {
  opacity: 0.92;
  background: linear-gradient(180deg, rgba(30, 58, 95, 0.03), transparent 48px);
}
.chbrowser-admin-card--dormant {
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 0;
  border-bottom: 1px dashed var(--border);
}
.chbrowser-door-link {
  display: inline-block; margin-top: 6px; font-size: 8pt; color: var(--accent); text-decoration: none;
}
.chbrowser-door-link:hover { text-decoration: underline; }
.chbrowser-sec-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chbrowser-sec {
  font-size: 7pt; padding: 3px 8px; border-radius: 4px; border: 1px solid var(--border);
}
.chbrowser-sec--allow { background: rgba(34, 197, 94, 0.08); color: #166534; }
.chbrowser-sec--block { background: rgba(239, 68, 68, 0.08); color: #991b1b; }
.chbrowser-sec-label { margin-right: 4px; font-weight: 600; }
.chbrowser-ack { font-size: 7pt; color: var(--text-muted); font-style: italic; margin: 6px 0 0; }
.chbrowser-label { display: block; font-size: 7.5pt; color: var(--text-muted); margin-bottom: 4px; }
.chbrowser-select {
  width: 100%; font-size: 8pt; padding: 5px 8px; border: 1px solid var(--border);
  border-radius: 4px; margin-bottom: 8px;
}
.chbrowser-btn {
  font-size: 8pt; padding: 6px 10px; border-radius: 4px; border: 1px solid var(--border);
  background: #fff; color: #1e3a5f; cursor: pointer; width: 100%;
}
.chbrowser-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.chbrowser-btn--primary { background: #1e3a5f; color: #fff; border-color: #1e3a5f; }
@media (max-width: 1100px) {
  .chbrowser-layout {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .chbrowser-preview { grid-column: 1 / -1; }
  .chbrowser-admin { grid-column: 1 / -1; }
}

/* ── Orientation Dictionary page ─────────────────────────────────── */
.dict-page {
  min-height: 100vh; padding: 24px 32px; background: var(--bg);
  max-width: 1100px;
}
.dict-hdr { margin-bottom: 12px; }
.dict-hdr-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dict-home-link {
  font-size: 8pt; color: var(--accent); text-decoration: none; display: inline-block; margin-bottom: 8px;
}
.dict-home-link:hover { text-decoration: underline; }
.dict-title { font-size: 16pt; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.dict-subtitle { font-size: 9pt; color: var(--text-muted); margin: 0 0 4px; }
.dict-hint {
  font-size: 7.5pt; color: var(--text-muted); margin: 0; line-height: 1.4; max-width: 52rem;
}
.dict-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px;
  position: sticky; top: 0; z-index: 2; padding: 8px 0; background: var(--bg);
}
.dict-search {
  flex: 1 1 200px; min-width: 160px; padding: 6px 10px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 9pt;
}
.dict-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.dict-space-select {
  padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg-panel); font-size: 8pt; color: var(--text);
}
.dict-tab {
  padding: 4px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg-panel); font-size: 8pt; cursor: pointer; color: var(--text-muted);
}
.dict-tab:hover { border-color: var(--accent); color: var(--accent); }
.dict-tab.active { background: rgba(59, 130, 246, 0.12); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.dict-body { display: flex; flex-direction: column; gap: 8px; }
.dict-count {
  font-size: 7.5pt; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.dict-list {
  display: flex; flex-direction: column; gap: 0;
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden;
}
.dict-row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.45rem;
  padding: 7px 12px; border-bottom: 1px solid var(--border-light);
  font-size: 8.5pt; line-height: 1.45;
}
.dict-row:last-child { border-bottom: none; }
.dict-row:hover { background: rgba(59, 130, 246, 0.04); }
.dict-row-term {
  font-weight: 700; color: var(--text); text-decoration: none; flex-shrink: 0;
}
.dict-row-term:hover { color: var(--accent); text-decoration: underline; }
.dict-row-sep { color: var(--text-muted); flex-shrink: 0; user-select: none; }
.dict-row-def {
  flex: 1 1 14rem; color: var(--text); min-width: 0;
}
.dict-row-badge {
  font-size: 6.5pt; font-weight: 700; padding: 1px 5px; border-radius: 3px;
  background: rgba(59, 130, 246, 0.1); color: var(--accent); flex-shrink: 0;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.dict-row-badge-vocab { background: rgba(16, 185, 129, 0.12); color: #059669; }
.dict-row-formerly {
  font-size: 7.5pt; color: var(--text-muted); font-style: italic; flex-shrink: 0;
}
.dict-row-spaces {
  display: inline-flex; flex-wrap: wrap; gap: 3px; flex-shrink: 0;
}
.dict-space-tag {
  font-size: 6.5pt; font-weight: 600; padding: 1px 5px; border-radius: 3px;
  border: 1px solid rgba(100, 116, 139, 0.25); background: rgba(100, 116, 139, 0.08);
  color: var(--text-muted); cursor: pointer; font-family: inherit;
  letter-spacing: 0.03em;
}
.dict-space-tag:hover {
  border-color: var(--accent); color: var(--accent); background: rgba(59, 130, 246, 0.08);
}
.dict-loading, .dict-empty, .dict-error {
  padding: 24px; color: var(--text-muted); font-size: 9pt; text-align: center;
}
.dict-error { color: #b45309; }

/* ── Templates catalog page ────────────────────────────────────────── */
.tpl-page {
  min-height: 100vh; padding: 24px 32px; background: var(--bg);
  max-width: 1100px;
}
.tpl-hdr { margin-bottom: 12px; }
.tpl-hdr-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tpl-home-link {
  font-size: 8pt; color: var(--accent); text-decoration: none; display: inline-block; margin-bottom: 8px;
}
.tpl-home-link:hover { text-decoration: underline; }
.tpl-title { font-size: 16pt; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.tpl-subtitle { font-size: 9pt; color: var(--text-muted); margin: 0 0 4px; }
.tpl-hint {
  font-size: 7.5pt; color: var(--amber, #b45309); margin: 0; line-height: 1.4; max-width: 52rem;
}
.tpl-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px;
  position: sticky; top: 0; z-index: 2; padding: 8px 0; background: var(--bg);
}
.tpl-search {
  flex: 1 1 200px; min-width: 160px; padding: 6px 10px; border: 1px solid var(--border);
  border-radius: 6px; font-size: 9pt;
}
.tpl-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tpl-filter-select {
  padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg-panel); font-size: 8pt; color: var(--text);
}
.tpl-tab {
  padding: 4px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg-panel); font-size: 8pt; cursor: pointer; color: var(--text-muted);
}
.tpl-tab:hover { border-color: var(--accent); color: var(--accent); }
.tpl-tab.active { background: rgba(59, 130, 246, 0.12); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.tpl-body { display: flex; flex-direction: column; gap: 16px; }
.tpl-count {
  font-size: 7.5pt; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.tpl-section { scroll-margin-top: 4rem; }
.tpl-section-hdr {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  margin-bottom: 6px; padding-bottom: 6px; border-bottom: 2px solid var(--border);
}
.tpl-section-title { font-size: 10pt; font-weight: 700; color: var(--text); }
.tpl-section-audience {
  font-size: 7.5pt; color: var(--text-muted); font-style: italic;
}
.tpl-list {
  display: flex; flex-direction: column; gap: 0;
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; margin-bottom: 8px;
}
.tpl-row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.45rem;
  padding: 7px 12px; border-bottom: 1px solid var(--border-light);
  font-size: 8pt; line-height: 1.45;
}
.tpl-row:last-child { border-bottom: none; }
.tpl-row:hover { background: rgba(59, 130, 246, 0.04); }
.tpl-row-id {
  font-family: var(--font-mono); font-size: 7.5pt; font-weight: 600;
  color: var(--accent); background: rgba(59, 130, 246, 0.08);
  padding: 1px 5px; border-radius: 3px; flex-shrink: 0;
}
.tpl-row-sep { color: var(--text-muted); user-select: none; }
.tpl-row-title { font-weight: 700; color: var(--text); flex-shrink: 0; }
.tpl-row-note { flex: 1 1 14rem; color: var(--text-muted); min-width: 0; }
.tpl-row-badge {
  font-size: 6.5pt; font-weight: 700; padding: 1px 5px; border-radius: 3px;
  background: rgba(100, 116, 139, 0.12); color: var(--text-muted);
  text-transform: uppercase; flex-shrink: 0;
}
.tpl-row-badge-req { background: rgba(239, 68, 68, 0.12); color: #b91c1c; }
.tpl-row-meta, .tpl-row-src {
  font-size: 7pt; color: var(--text-muted); font-family: var(--font-mono); flex-shrink: 0;
}
.tpl-row-link {
  font-size: 7.5pt; color: var(--accent); text-decoration: none; flex-shrink: 0;
}
.tpl-row-link:hover { text-decoration: underline; }
.tpl-loading, .tpl-empty, .tpl-error {
  padding: 24px; color: var(--text-muted); font-size: 9pt; text-align: center;
}
.tpl-error { color: #b45309; }

/* ── NosNOTE composer (global primitive — light, readable) ───────────────── */
.nos-note-overlay {
  position: fixed; inset: 0; z-index: 210000;
  background: rgba(15, 23, 42, 0.42);
  pointer-events: none;
}
.nos-note-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: auto;
  background: transparent;
}
.nos-note-backdrop--capture-safe {
  cursor: default;
}
.nos-note-overlay--pending {
  background: transparent;
  pointer-events: none;
}
.nos-note-overlay--pending .nos-note-modal {
  display: flex; align-items: center; gap: 12px; padding: 20px 24px;
  pointer-events: auto;
}
.nos-note-modal {
  position: fixed;
  z-index: 1;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 16px);
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}
.nos-note-hdr {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
  padding: 12px 16px 10px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.nos-note-hdr--drag { cursor: grab; user-select: none; touch-action: none; }
.nos-note-hdr--drag:active { cursor: grabbing; }
.nos-note-brand { font-weight: 800; font-size: 11pt; color: #1e3a5f; }
.nos-note-badge { font-size: 6.5pt; font-family: var(--mono); color: #64748b; }
.nos-note-close {
  margin-left: auto; background: none; border: none;
  color: #64748b; font-size: 16pt; cursor: pointer; line-height: 1;
}
.nos-note-close:hover { color: #0f172a; }
.nos-note-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px 8px;
}
.nos-note-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.nos-note-row--stack { flex-direction: column; align-items: stretch; gap: 4px; }
.nos-note-row label { font-size: 7.5pt; font-weight: 700; color: #475569; min-width: 88px; }
.nos-note-row--stack label { min-width: 0; }
.nos-note-select, .nos-note-input, .nos-note-textarea {
  flex: 1; min-width: 140px; width: 100%;
  font-size: 9pt; padding: 6px 10px; border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff; color: #0f172a;
  font-family: inherit;
}
.nos-note-textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.45;
  overflow-y: hidden;
  field-sizing: content;
}
.nos-note-textarea--os-ref {
  min-height: 160px;
  max-height: min(52vh, 640px);
  resize: both;
  overflow-y: auto;
}
.nos-note-modal--os-ref {
  min-height: 0;
}
.nos-note-select:focus, .nos-note-input:focus, .nos-note-textarea:focus {
  outline: 2px solid rgba(59, 130, 246, 0.35);
  border-color: #3b82f6;
}
.nos-note-star {
  border: 1px solid #fbbf24; background: #fffbeb;
  border-radius: 6px; padding: 2px 8px; cursor: pointer; color: #b45309;
}
.nos-note-gps-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.nos-note-gps-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 6.5pt; font-family: var(--mono);
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f1f5f9; color: #334155;
  cursor: pointer; max-width: 100%;
}
.nos-note-gps-chip code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.nos-note-redo {
  margin-left: auto; font-size: 7pt; padding: 4px 10px;
  border-radius: 6px; border: 1px dashed #94a3b8;
  background: #fff; color: #475569; cursor: pointer;
}
.nos-note-dom { margin: 8px 0; }
.nos-note-dom-toggle { font-size: 7pt; background: none; border: none; color: #64748b; cursor: pointer; }
.nos-note-dom-pre {
  font-size: 6pt; font-family: var(--mono); max-height: 100px; overflow: auto;
  background: #f1f5f9; color: #334155; padding: 6px; border-radius: 6px; margin-top: 4px;
  border: 1px solid #e2e8f0;
}
.nos-note-footer {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  margin-top: 0;
  border-top: 1px solid #e2e8f0;
  padding: 10px 16px 12px;
  background: #f8fafc;
}
.nos-note-status { flex: 1; font-size: 7pt; color: #64748b; font-family: var(--mono); }
.nos-note-btn {
  font-size: 8.5pt; padding: 6px 14px; border-radius: 8px;
  border: 1px solid #cbd5e1; background: #fff; color: #334155; cursor: pointer;
}
.nos-note-btn:hover { background: #f1f5f9; }
.nos-note-save {
  border-color: #2563eb; background: #2563eb; color: #fff; font-weight: 700;
}
.nos-note-save:hover { background: #1d4ed8; }
.nos-note-save:disabled { opacity: 0.55; cursor: not-allowed; }
.nos-note-modal .nos-attach-preview {
  background: #f8fafc; border-color: #e2e8f0;
}
.nos-note-modal .nos-attach-preview-empty { color: #64748b; }
.nos-note-modal .nos-attach-paste {
  border-color: #cbd5e1; color: #64748b; background: #fff;
}
.nos-note-modal .nos-attach-thumb {
  border-color: #e2e8f0; background: #fff;
}

/* OS REF visual QC — pre-save verify + post-save confirmation */
/* OS REF geometry set in note_composer (30% × 80% centered) */
.nos-note-modal--saved-qc .nos-note-body { display: none; }
.nos-note-qc-panel {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #bfdbfe;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
}
.nos-note-qc-panel-hdr {
  display: flex; flex-direction: column; gap: 2px;
  margin-bottom: 8px;
}
.nos-note-qc-panel-title {
  font-size: 9pt; font-weight: 800; color: #1e3a5f;
}
.nos-note-qc-panel-sub {
  font-size: 7pt; color: #64748b; font-family: var(--mono);
}
.nos-note-qc-preview {
  min-height: 160px; max-height: min(52vh, 480px);
  display: flex; align-items: flex-start; justify-content: center;
  border-radius: 8px; overflow: auto;
  border: 1px solid #cbd5e1;
  background: #0f172a;
}
.nos-note-qc-preview--saved {
  min-height: 220px; max-height: min(58vh, 560px);
  margin: 0 16px;
}
.nos-note-qc-img {
  max-width: 100%; height: auto;
  object-fit: contain; display: block;
}
.nos-note-qc-preview--saved .nos-note-qc-img { max-height: none; }
.nos-note-qc-missing {
  padding: 20px 16px; text-align: center;
  font-size: 8pt; line-height: 1.45;
  color: #fcd34d; background: #1e293b;
}
.nos-note-qc-badges {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 8px;
}
.nos-note-qc-badge {
  font-size: 6.5pt; font-family: var(--mono);
  padding: 3px 8px; border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff; color: #475569;
}
.nos-note-qc-badge--ok {
  border-color: #86efac; background: #f0fdf4; color: #166534;
}
.nos-note-qc-badge--warn {
  border-color: #fcd34d; background: #fffbeb; color: #b45309;
}
.nos-note-qc-badge--muted { color: #94a3b8; }
.nos-note-qc-saved {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  padding: 12px 0 0;
}
.nos-note-qc-saved-hint {
  padding: 0 16px 10px;
  font-size: 8pt; color: #475569; line-height: 1.4;
}
.nos-note-qc-bar {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 10px 16px 12px;
  border-top: 1px solid #e2e8f0;
  background: #f1f5f9;
}
.nos-note-qc-pill {
  display: inline-flex; align-items: center; gap: 5px;
  max-width: 100%;
  font-size: 6.5pt; font-family: var(--mono);
  padding: 6px 12px; border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #fff; color: #334155;
  cursor: pointer;
}
.nos-note-qc-pill:hover { background: #e2e8f0; }
.nos-note-qc-pill--primary {
  border-color: #2563eb; background: #eff6ff; color: #1d4ed8;
  font-weight: 700;
}
.nos-note-qc-pill--primary:hover { background: #dbeafe; }
.nos-note-qc-pill-label { font-weight: 800; flex-shrink: 0; }
.nos-note-qc-pill code {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: min(52vw, 280px);
}

/* NosAttachStrip */
.nos-attach-strip { margin: 8px 0; }
.nos-attach-preview {
  min-height: 140px; max-height: 200px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.2); border-radius: 8px; overflow: hidden;
  border: 1px solid rgba(148,163,184,0.15);
}
.nos-attach-preview-img { max-width: 100%; max-height: 200px; object-fit: contain; }
.nos-attach-preview-empty { font-size: 8pt; color: var(--muted); padding: 20px; text-align: center; }
.nos-attach-paste {
  margin-top: 6px; padding: 10px; text-align: center;
  border: 1px dashed rgba(148,163,184,0.35); border-radius: 8px;
  font-size: 7.5pt; color: var(--muted); cursor: text;
}
.nos-attach-paperclip { border: none; background: none; cursor: pointer; font-size: 11pt; }
.nos-attach-file-input { display: none; }
.nos-attach-thumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.nos-attach-thumb {
  position: relative; width: 56px; height: 56px; padding: 0;
  border: 2px solid transparent; border-radius: 6px; overflow: hidden; cursor: pointer;
}
.nos-attach-thumb.selected { border-color: #f59e0b; }
.nos-attach-thumb.primary { box-shadow: 0 0 0 1px #fbbf24; }
.nos-attach-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nos-attach-rm {
  position: absolute; top: 0; right: 0; width: 16px; height: 16px;
  font-size: 9pt; line-height: 1; border: none; background: rgba(0,0,0,0.65); color: #fff; cursor: pointer;
}

/* ── NosChannelShell (/spaces-nav, publication wireframe) ─────────── */
.ch-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100vh;
  background: #f4f7fc;
  color: #1a2744;
  overflow: hidden;
}
.ch-shell-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid rgba(30, 58, 95, 0.12);
  flex-shrink: 0;
}
.ch-shell-toolbar-left, .ch-shell-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ch-shell-brand {
  font-weight: 800;
  color: #1a2744;
  text-decoration: none;
  font-size: 10pt;
}
.ch-shell-sep { color: #64748b; }
.ch-shell-channel { font-weight: 600; color: #1e3a5f; }
.ch-shell-admin-btn {
  font-size: 7.5pt;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid rgba(30, 58, 95, 0.2);
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.08);
  color: #3b82f6;
  cursor: pointer;
}
.ch-shell-body {
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}
.ch-shell-sidebar {
  display: flex;
  flex-direction: column;
  background: #fff;
  flex-shrink: 0;
  min-height: 0;
  overflow: hidden;
}
.ch-shell-sidebar-left {
  width: 18vw;
  min-width: 200px;
  max-width: 45vw;
  border-right: none;
  flex-shrink: 0;
}
.ch-shell-resize-handle {
  flex: 0 0 4px;
  cursor: col-resize;
  background: transparent;
  position: relative;
  z-index: 2;
}
.ch-shell-resize-handle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 32px;
  border-radius: 1px;
  background: rgba(100, 116, 139, 0.35);
  opacity: 0;
  transition: opacity 0.15s, height 0.15s;
}
.ch-shell-resize-handle:hover { background: rgba(42, 77, 117, 0.12); }
.ch-shell-resize-handle:hover::before { opacity: 1; height: 48px; }
.ch-publication-panel {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid rgba(176, 208, 248, 0.15);
  flex-shrink: 0;
  max-height: 40%;
  overflow: hidden;
}
.ch-publication-count {
  margin-left: auto;
  font-size: 7pt;
  font-weight: 700;
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.12);
  border-radius: 8px;
  padding: 1px 6px;
}
.ch-publication-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 8.5pt;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #1e3a5f;
  width: 100%;
  text-align: left;
}
.ch-publication-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 12px 12px;
}
.ch-publication-empty {
  font-size: 8pt;
  color: #64748b;
  font-style: italic;
  padding: 4px 2px 8px;
}
.ch-publication-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ch-publication-item { margin: 4px 0; }
.ch-publication-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  text-decoration: none;
  color: #1a2744;
  font-size: 8.5pt;
  background: rgba(59, 130, 246, 0.04);
  border: 1px solid rgba(59, 130, 246, 0.12);
}
.ch-publication-link:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.25);
}
.ch-publication-shield { flex-shrink: 0; font-size: 9pt; }
.ch-publication-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ch-publication-channel {
  font-weight: 600;
  color: #1d4ed8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ch-publication-doc {
  font-size: 7.5pt;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ch-shell-sidebar-right {
  width: 22vw;
  min-width: 220px;
  max-width: 45vw;
  border-left: 2px solid rgba(176, 208, 248, 0.15);
}
.ch-shell-sidebar-right.spaces-nav-golden-compare-rail {
  width: 44vw;
  min-width: 340px;
  max-width: 56vw;
}
.ch-shell-resize-handle--right {
  border-left: 1px solid rgba(176, 208, 248, 0.12);
}
.ch-shell-search {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(176, 208, 248, 0.15);
  flex-shrink: 0;
}
.ch-shell-search:has(.spaces-nav-search-bar) {
  padding: 14px 14px 12px;
}
.ch-shell-sidebar-left > .spaces-nav-tree {
  flex: 1;
  min-height: 0;
}
.ch-nav-tree {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0 12px;
}
.ch-nav-section-head {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 14px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 7.5pt;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #1e3a5f;
  text-align: left;
}
.ch-nav-items { list-style: none; padding: 0 8px 6px 18px; }
.ch-nav-item { margin: 2px 0; }
.ch-nav-link, .ch-nav-stub {
  display: block;
  padding: 5px 8px;
  border-radius: 4px;
  font-size: 8.5pt;
  text-decoration: none;
  color: #1a2744;
}
.ch-nav-link:hover { background: rgba(59, 130, 246, 0.08); }
.ch-nav-item--active .ch-nav-link {
  background: rgba(59, 130, 246, 0.14);
  color: #1d4ed8;
  font-weight: 600;
}
.ch-nav-stub { color: #64748b; font-style: italic; }
.ch-shell-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.ch-shell-main-head {
  padding: 14px 20px 8px;
  border-bottom: 1px solid rgba(176, 208, 248, 0.15);
  flex-shrink: 0;
}
.ch-shell-page-title {
  font-size: 14pt;
  font-weight: 700;
  color: #0a1628;
}
.ch-shell-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  padding: 16px 20px;
  box-sizing: border-box;
}
/* Browse / placeholder / loading — scroll inside the column */
.ch-shell-content > .spaces-nav-browse,
.ch-shell-content > .spaces-nav-placeholder,
.ch-shell-content > .ch-loading,
.ch-shell-content > .ch-doc-error {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
}
.ch-shell-content > .spaces-nav-doc-view {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.ch-footer {
  padding: 8px 20px;
  font-size: 7pt;
  color: #64748b;
  border-top: 1px solid rgba(176, 208, 248, 0.15);
  flex-shrink: 0;
}
.ch-producer {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.ch-producer-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid rgba(176, 208, 248, 0.15);
  background: none;
  cursor: pointer;
  font-size: 8.5pt;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #1e3a5f;
}
.ch-producer-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.ch-producer-section {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(176, 208, 248, 0.15);
}
.ch-producer-section-title {
  font-size: 7pt;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #1e3a5f;
  margin-bottom: 8px;
}
.ch-producer-input, .ch-producer-textarea, .ch-producer-select {
  width: 100%;
  margin-bottom: 6px;
  padding: 6px 8px;
  border: 1px solid rgba(30, 58, 95, 0.18);
  border-radius: 4px;
  font-size: 8.5pt;
  font-family: inherit;
}
.ch-producer-textarea { min-height: 72px; resize: vertical; }
.ch-producer-btn, .ch-producer-line-btn {
  font-size: 8pt;
  padding: 5px 10px;
  border: 1px solid rgba(30, 58, 95, 0.2);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}
.ch-producer-btn:hover:not(:disabled) { border-color: #3b82f6; color: #3b82f6; }
.ch-producer-btn:disabled,
.ch-producer-btn--disabled {
  opacity: 0.45;
  cursor: default;
  color: #94a3b8;
  border-color: rgba(100, 116, 139, 0.25);
  background: #f1f5f9;
}
.ch-producer-status { padding: 8px 14px; font-size: 8pt; color: #16a34a; }
.ch-producer-lines { list-style: none; padding: 0; margin-top: 8px; }
.ch-producer-line {
  padding: 6px 0;
  border-bottom: 1px solid rgba(176, 208, 248, 0.1);
  font-size: 8pt;
}
.ch-producer-line-speaker { font-weight: 700; margin-right: 6px; }
.ch-search-panel { position: relative; }
.ch-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  background: #fff;
  border: 1px solid rgba(30, 58, 95, 0.15);
  border-radius: 4px;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 4px 16px rgba(10, 22, 40, 0.12);
}
.ch-search-status { padding: 8px 10px; font-size: 8pt; color: #64748b; }
.ch-search-list { list-style: none; }
.ch-search-link {
  display: block;
  padding: 6px 10px;
  text-decoration: none;
  color: inherit;
  font-size: 8pt;
}
.ch-search-link:hover { background: rgba(59, 130, 246, 0.08); }
.ch-loading, .ch-doc-error {
  padding: 16px;
  font-size: 9pt;
  color: #64748b;
}
.ch-doc-error { color: #dc2626; font-weight: 600; margin-bottom: 12px; }
/* LiveDOC viewer — mirrors channel-ui .doc-body (SPA owns block styling) */
.ch-doc-body {
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.65;
  color: #1a2744;
  max-width: 100%;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.ch-doc-body--live {
  padding: 0 4px 2rem;
}
.nos-spaces-nav--l0 .spaces-nav-doc-view .ch-doc-body--live {
  padding-left: 0;
  padding-right: 0;
}
.ch-doc-body img,
.ch-doc-body table,
.ch-doc-body pre,
.ch-doc-body .ld-table-wrap,
.ch-doc-body .pdf-ingest {
  max-width: 100%;
  overflow-wrap: break-word;
}
/* PDF-ingest — defeat pdftohtml absolute layout (prevents spaces-nav freeze) */
.ch-doc-body .pdf-ingest [id^="page"] {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 2rem !important;
  contain: layout style paint;
}
.ch-doc-body .pdf-ingest p,
.ch-doc-body .pdf-ingest .pdf-flow {
  position: static !important;
  top: auto !important;
  left: auto !important;
  white-space: normal !important;
  display: block !important;
  margin: 0 0 0.4rem !important;
}
.ch-doc-body .pdf-ingest .pdf-page {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(30, 58, 95, 0.08);
}
/* Spaces-nav operator shell — no in-canvas NexPROTECT banner (recipient door owns subtle overlay) */
/* Sovereign compare / snapshot — hide in-doc NexPROTECT (top dock owns banner) */
.ch-doc-body.admin-mode .np-track-layer,
.ch-doc-body.admin-mode .watermark-layer,
.ch-doc-body.admin-mode .np-track-text,
.ch-doc-body.admin-mode .watermark-text,
.ch-doc-body.admin-mode .watermark-tile,
.ch-doc-body.admin-mode .nexprotect-banner:not([data-nexos-canvas-banner]),
.ch-doc-body.admin-mode .stray-watermark,
.ch-doc-body.admin-mode #watermarkLayer,
.ch-doc-body.admin-mode #npTrackLayer,
.ch-doc-body.admin-mode #npTrackLayer canvas,
.nos-spaces-nav--l0 .ch-doc-body .np-track-layer,
.nos-spaces-nav--l0 .ch-doc-body .watermark-layer,
.nos-spaces-nav--l0 .ch-doc-body .np-track-text,
.nos-spaces-nav--l0 .ch-doc-body .watermark-text,
.nos-spaces-nav--l0 .ch-doc-body .watermark-tile,
.nos-spaces-nav--l0 .ch-doc-body .page-wrap > .nexprotect-banner,
.nos-spaces-nav--l0 .ch-doc-body .ld-html-fragment > .nexprotect-banner,
.nos-spaces-nav--l0 .ch-doc-body #watermarkLayer,
.nos-spaces-nav--l0 .ch-doc-body #npTrackLayer,
.nos-spaces-nav--l0 .spaces-nav-preview-body .np-track-layer,
.nos-spaces-nav--l0 .spaces-nav-preview-body .watermark-layer,
.nos-spaces-nav--l0 .spaces-nav-preview-body .watermark-text,
.nos-spaces-nav--l0 .spaces-nav-preview-body .np-track-text,
.nos-spaces-nav--l0 .spaces-nav-preview-body .watermark-tile,
.ch-doc-body.admin-mode .pdf-ingest p.ft115,
.ch-doc-body.admin-mode .pdf-ingest p.ft215,
.ch-doc-body.admin-mode .pdf-ingest p.ft116,
.ch-doc-body.admin-mode .pdf-ingest p.ft216,
.ch-doc-body.admin-mode .pdf-ingest p.ft315,
.ch-doc-body.admin-mode .pdf-ingest p.ft316,
.ch-doc-body.admin-mode .pdf-ingest p.ft415,
.ch-doc-body.admin-mode .pdf-ingest p.ft416,
.nos-spaces-nav--l0 .ch-doc-body .pdf-ingest p.ft115,
.nos-spaces-nav--l0 .ch-doc-body .pdf-ingest p.ft215,
.nos-spaces-nav--l0 .ch-doc-body .pdf-ingest p.ft116,
.nos-spaces-nav--l0 .ch-doc-body .pdf-ingest p.ft216,
.nos-spaces-nav--l0 .ch-doc-body .pdf-ingest p.ft315,
.nos-spaces-nav--l0 .ch-doc-body .pdf-ingest p.ft316,
.nos-spaces-nav--l0 .ch-doc-body .pdf-ingest p.ft415,
.nos-spaces-nav--l0 .ch-doc-body .pdf-ingest p.ft416,
.nos-spaces-nav--l0 .ch-doc-body .pdf-ingest p.ft10,
.nos-spaces-nav--l0 .ch-doc-body .pdf-ingest p.ft11,
.nos-spaces-nav--l0 .ch-doc-body .pdf-ingest p.ft12,
.nos-spaces-nav--l0 .ch-doc-body .pdf-ingest p.ft13,
.nos-spaces-nav--l0 .ch-doc-body .pdf-ingest p.ft14,
.nos-spaces-nav--l0 .ch-doc-body .pdf-ingest p.ft15,
.nos-spaces-nav--l0 .ch-doc-body .pdf-ingest p.ft16,
.nos-spaces-nav--l0 .ch-doc-body .pdf-ingest p.ft17,
.nos-spaces-nav--l0 .ch-doc-body .pdf-ingest p.ft18 {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}
.ch-doc-body.admin-mode {
  user-select: text !important;
  -webkit-user-select: text !important;
}
.ch-doc-body .ld-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a2744;
  border-bottom: 2px solid #3b82f6;
  padding-bottom: 0.35rem;
  margin: 1.8rem 0 0.7rem;
}
.ch-doc-body p,
.ch-doc-body .ld-para {
  color: #1e3a5f;
  margin: 0.55rem 0;
  text-align: justify;
  hyphens: auto;
}
.ch-doc-body .ld-table-wrap {
  overflow-x: auto;
  margin: 1.2rem 0;
  border: 1px solid rgba(30, 58, 95, 0.2);
  border-radius: 6px;
}
.ch-doc-body .ld-table-wrap table { width: 100%; border-collapse: collapse; }
.ch-doc-body .ld-table-wrap th,
.ch-doc-body .ld-table-wrap td {
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(176, 208, 248, 0.3);
  font-size: 0.9rem;
}
.ch-doc-body .ld-table-wrap th {
  background: rgba(59, 130, 246, 0.08);
  font-weight: 600;
}
.ch-doc-body .ld-list-wrap {
  margin: 0.8rem 0 0.8rem 1.4rem;
  color: #1e3a5f;
}
.ch-doc-body .ld-list-wrap li { margin: 0.3rem 0; }
.ch-doc-body pre.ld-code {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(30, 58, 95, 0.2);
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.85rem;
  margin: 1rem 0;
}
.ch-doc-body blockquote.ld-blockquote {
  border-left: 3px solid #3b82f6;
  padding: 0.6rem 1rem;
  margin: 1rem 0;
  color: #4a6080;
  font-style: italic;
  background: rgba(59, 130, 246, 0.04);
}
.ch-doc-body hr.ld-separator {
  border: none;
  border-top: 1px solid rgba(30, 58, 95, 0.2);
  margin: 1.6rem 0;
}
/* Phase 0: SPA owns width — doc-embedded layout CSS is stripped at inject time */
.ch-doc-body .ld-html-fragment,
.ch-doc-body .page-wrap {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0;
  flex: none !important;
  display: block !important;
  box-sizing: border-box;
}
.ch-doc-body .page-wrap > .header,
.ch-doc-body .page-wrap > .recordbar,
.ch-doc-body .page-wrap > .container,
.ch-doc-body .page-wrap > .footer {
  width: 100% !important;
}
.ch-doc-body .page-wrap .header .subtitle { max-width: none !important; }
/* Nexus LiveDOC page-wrap template (investor / DOE decks) — SPA-owned when blob has no <style> */
.ch-doc-body .page-wrap {
  --ld-navy: #0a1628;
  --ld-navy-mid: #132238;
  --ld-accent: #3b82f6;
  --ld-accent-light: #60a5fa;
  --ld-green: #22c55e;
  --ld-amber: #f59e0b;
  --ld-gold: #c9a13f;
  --ld-text: #0f172a;
  --ld-muted: #475569;
  --ld-border: #e2e8f0;
  --ld-bg: #f8fafc;
  --ld-card: #ffffff;
  background: var(--ld-bg);
  color: var(--ld-text);
  line-height: 1.6;
  font-size: 15px;
}
.ch-doc-body .page-wrap .header {
  background: linear-gradient(135deg, var(--ld-navy) 0%, var(--ld-navy-mid) 100%);
  color: #fff;
  padding: 2.5rem 2rem 2rem;
  border-bottom: 3px solid var(--ld-gold);
}
.ch-doc-body .page-wrap .header .brand {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ld-accent-light);
  margin-bottom: 0.5rem;
}
.ch-doc-body .page-wrap .header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}
.ch-doc-body .page-wrap .header .subtitle {
  color: #cbd5e1;
  font-size: 0.95rem;
}
.ch-doc-body .page-wrap .recordbar {
  background: var(--ld-navy-mid);
  color: #cbd5e1;
  padding: 0.6rem 2rem;
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  border-bottom: none;
}
.ch-doc-body .page-wrap .recordbar span strong { color: #f1f5f9; }
.ch-doc-body .page-wrap .recordbar a { color: #93c5fd; }
.ch-doc-body .page-wrap .container {
  flex: 1;
  max-width: none;
  margin: 0;
  padding: 2rem 1.5rem 4rem;
}
.ch-doc-body .page-wrap .footer {
  text-align: center;
  color: var(--ld-muted);
  font-size: 0.8rem;
  padding: 2rem;
  border-top: 1px solid var(--ld-border);
  margin-top: auto;
}
.ch-doc-body .page-wrap h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ld-navy);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--ld-border);
}
.ch-doc-body .page-wrap h2 .n { color: var(--ld-accent); margin-right: 0.5rem; }
.ch-doc-body .page-wrap h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ld-navy-mid);
  margin: 1.5rem 0 0.75rem;
}
.ch-doc-body .page-wrap table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.88rem;
  background: var(--ld-card);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.ch-doc-body .page-wrap th {
  background: var(--ld-navy);
  color: #fff;
  padding: 0.65rem 0.85rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.ch-doc-body .page-wrap td {
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--ld-border);
  vertical-align: top;
  color: var(--ld-text);
}
.ch-doc-body .page-wrap tr:nth-child(even) td { background: #f1f5f9; }
.ch-doc-body .page-wrap .callout {
  border-left: 4px solid var(--ld-accent);
  background: #eff6ff;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  border-radius: 0 8px 8px 0;
  font-size: 0.92rem;
}
.ch-doc-body .page-wrap .callout.warn { border-left-color: var(--ld-amber); background: #fffbeb; }
.ch-doc-body .page-wrap .callout.green { border-left-color: var(--ld-green); background: #f0fdf4; }
.ch-doc-body .page-wrap .callout.gold { border-left-color: var(--ld-gold); background: #fffaef; }
.ch-doc-body .page-wrap .tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: #eff6ff;
  color: #1d4ed8;
}
.ch-doc-body .page-wrap .assumption {
  font-size: 0.82rem;
  color: var(--ld-muted);
  font-style: italic;
}
.ch-doc-body .page-wrap .section-tail {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--ld-muted);
  margin-left: 0.35rem;
}
.ch-doc-body .page-wrap .plain {
  font-size: 0.92rem;
  color: var(--ld-text);
  background: #fff;
  border-left: 3px solid var(--ld-accent);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}
.ch-doc-iframe {
  display: block;
  width: 100%;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  border: none;
  background: #f4f7fc;
}
.ch-doc-iframe--compact {
  min-height: 36vh;
  max-height: 48vh;
  border: 1px solid rgba(176, 208, 248, 0.25);
  border-radius: 6px;
}
.spaces-nav-doc-view {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
}
.spaces-nav-doc-staging {
  flex: 0 0 auto;
  margin: 0.5rem 1rem 0.75rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}
/* Templates → TEMPLATES LAYOUT — center is the layout picture (journal #159–#160) */
.spaces-nav-doc-view--layout-template {
  align-items: center;
  justify-content: flex-start;
  background: linear-gradient(180deg, #cbd5e1 0%, #e2e8f0 48%, #f1f5f9 100%);
  overflow-y: auto;
  padding: 0.75rem 1rem 1.5rem;
}
.spaces-nav-layout-template-head {
  width: 100%;
  max-width: 640px;
  margin: 0 auto 0.65rem;
  text-align: center;
}
.spaces-nav-layout-template-kicker {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #475569;
  font-weight: 700;
}
.spaces-nav-layout-template-hint {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.45;
}
.spaces-nav-doc-view--layout-template > .ch-doc-body {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  flex: 0 0 auto;
  overflow: visible;
  background: transparent;
}
.spaces-nav-doc-view--layout-template .layout-preview-wrap {
  max-width: 100%;
  padding: 0;
}
.spaces-nav-doc-view--layout-template .layout-preview-frame {
  min-height: 460px;
}
.spaces-nav-doc-view--layout-template .layout-preview-caption,
.spaces-nav-doc-view--layout-template .layout-variants {
  font-size: 0.72rem;
}
/* LiveDOC body — fill column below crumb, scroll inside pane */
.spaces-nav-doc-view > .ch-doc-body {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: auto;
}
.spaces-nav-doc-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  padding: 8px 12px 10px;
  border-bottom: 1px solid rgba(176, 208, 248, 0.25);
  font-size: 8.5pt;
  flex-shrink: 0;
}
.spaces-nav-back-link {
  font-weight: 700;
  color: #3b82f6;
  text-decoration: none;
}
.spaces-nav-back-link:hover { text-decoration: underline; }
.spaces-nav-crumb-sep { color: #94a3b8; }
.spaces-nav-crumb-link {
  color: #64748b;
  text-decoration: none;
}
.spaces-nav-crumb-link:hover { color: #3b82f6; text-decoration: underline; }
.spaces-nav-crumb-current {
  color: #0a1628;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spaces-nav-placeholder {
  padding: 32px 16px;
  text-align: center;
  color: #64748b;
}
.spaces-nav-placeholder-title {
  font-size: 12pt;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 8px;
}
.spaces-nav-placeholder-hint { font-size: 9pt; margin: 4px 0; }
.spaces-nav-placeholder-hint a { color: #3b82f6; }
.spaces-nav-browse { max-width: 100%; width: 100%; }
.nos-spaces-nav--l0 .spaces-nav-browse {
  max-width: 100%;
  width: 100%;
  padding: 16px 12px 24px;
  box-sizing: border-box;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.spaces-nav-admin-details {
  margin-top: 8px;
  margin-bottom: 20px;
  border-radius: 8px;
  border: 1px solid rgba(30, 58, 95, 0.12);
  background: rgba(59, 130, 246, 0.04);
}
.spaces-nav-admin-details[open] {
  background: rgba(59, 130, 246, 0.06);
}
.spaces-nav-admin-summary {
  cursor: pointer;
  padding: 12px 16px;
  font-size: 8pt;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #1e3a5f;
  list-style: none;
}
.spaces-nav-admin-summary::-webkit-details-marker { display: none; }
.spaces-nav-admin-panel--nested {
  margin: 0;
  border: none;
  border-radius: 0;
  border-top: 1px solid rgba(30, 58, 95, 0.1);
}
.spaces-nav-browse-head { margin-bottom: 20px; }
.spaces-nav-browse-kicker {
  font-size: 7pt; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: #64748b;
}
.spaces-nav-browse-title {
  font-size: 18pt; font-weight: 700; color: #0a1628; margin: 4px 0;
}
.spaces-nav-browse-meta { font-size: 9pt; color: #64748b; }
.spaces-nav-browse-hint {
  font-size: 8.5pt; color: #64748b; margin-top: 6px;
  padding: 8px 10px; border-radius: 6px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.spaces-nav-admin-panel {
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(30, 58, 95, 0.12);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.spaces-nav-admin-title {
  font-size: 8pt; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; color: #1e3a5f; margin-bottom: 10px;
}
.spaces-nav-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.spaces-nav-admin-btn {
  font-size: 8pt; padding: 6px 12px; border-radius: 4px;
  border: 1px solid rgba(30, 58, 95, 0.2); background: #fff;
  color: #1e3a5f; cursor: pointer;
}
.spaces-nav-admin-btn:disabled {
  cursor: not-allowed; opacity: 0.55;
}
.spaces-nav-admin-btn--primary {
  background: #1e3a5f; color: #fff; border-color: #1e3a5f;
}
.spaces-nav-admin-btn--primary:hover:not(:disabled) {
  background: #2a4a73;
}
.spaces-nav-admin-hint { font-size: 7.5pt; color: #64748b; margin-top: 8px; }
.spaces-nav-admin-notice {
  margin-bottom: 12px; padding: 8px 12px; border-radius: 6px;
  background: rgba(59, 130, 246, 0.1); color: #1e3a5f; font-size: 8.5pt;
}
.spaces-nav-admin-chrome {
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 24;
}
.spaces-nav-admin-chrome-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}
/* Doc-reading context — names + expand toggles for admin cards */
.spaces-nav-admin-namebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  min-height: 42px;
  padding: 6px 16px 6px 12px;
  background: linear-gradient(90deg, #1e3a5f 0%, #2a4d75 38%, #2a4d75 100%);
  border-bottom: 2px solid #f59e0b;
  box-shadow: 0 2px 8px rgba(15, 39, 68, 0.22);
  font-size: 9pt;
  font-family: var(--font-mono);
}
.spaces-nav-admin-namebar-context {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}
.spaces-nav-admin-namebar-label,
.spaces-nav-admin-namebar-manage-label {
  font-size: 7pt;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.62);
  user-select: none;
}
.spaces-nav-admin-namebar-manage-label {
  color: #fde68a;
  margin-right: 2px;
}
.spaces-nav-admin-namebar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
.spaces-nav-admin-namebar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 8.5pt;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: #f8fafc;
  color: #0f2744;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(15, 39, 68, 0.18);
}
.spaces-nav-admin-namebar-toggle:hover {
  background: #ffffff;
  border-color: #f59e0b;
  color: #0f2744;
}
.spaces-nav-admin-namebar-toggle--open {
  background: #fff7ed;
  border-color: #f59e0b;
  color: #9a3412;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.35);
}
.spaces-nav-admin-namebar-toggle-icon {
  font-size: 9pt;
  line-height: 1;
}
.spaces-nav-admin-namebar-toggle-chevron {
  font-size: 8pt;
  line-height: 1;
  opacity: 0.85;
}
.spaces-nav-admin-chrome-drawer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  padding: 10px 18px 12px;
  background: #f1f5f9;
  border-bottom: 1px solid rgba(30, 58, 95, 0.12);
}
.spaces-nav-admin-chrome-hint {
  padding: 8px 18px 10px;
  background: #fff7ed;
  border-bottom: 1px solid rgba(245, 158, 11, 0.35);
  color: #9a3412;
  font-size: 8pt;
  font-family: var(--font-mono);
}
.spaces-nav-admin-chrome-hint strong {
  color: #7c2d12;
}
.spaces-nav-admin-notice--chrome {
  margin: 0 18px 8px;
}
.spaces-nav-admin-namebar-chip {
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  padding: 2px 0;
  max-width: min(42vw, 320px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spaces-nav-admin-namebar-chip:hover { color: #bfdbfe; }
.spaces-nav-admin-namebar-chip--group { color: rgba(248, 250, 252, 0.92); }
.spaces-nav-admin-namebar-chip--space { color: #ffffff; }
.spaces-nav-admin-namebar-sep {
  color: rgba(248, 250, 252, 0.45);
  font-weight: 700;
  user-select: none;
}
.spaces-nav-admin-panel--chrome {
  margin-bottom: 0;
  padding: 10px 12px;
}
.spaces-nav-admin-panel--chrome .spaces-nav-admin-title {
  margin-bottom: 6px;
  font-size: 7pt;
}
.spaces-nav-admin-kicker {
  font-size: 8pt;
  color: #475569;
  margin: 0 0 8px;
}
.spaces-nav-admin-btn--danger {
  border-color: rgba(185, 28, 28, 0.35);
  color: #b91c1c;
  background: rgba(254, 226, 226, 0.5);
}
.spaces-nav-admin-btn--danger:hover:not(:disabled) {
  background: rgba(254, 202, 202, 0.85);
}
.spaces-nav-admin-confirm {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(254, 226, 226, 0.35);
  border: 1px solid rgba(185, 28, 28, 0.2);
}
.spaces-nav-admin-confirm-text {
  font-size: 8pt;
  color: #7f1d1d;
  margin: 0 0 8px;
  line-height: 1.45;
}
.spaces-nav-admin-block {
  margin-bottom: 14px; padding-bottom: 14px;
  border-bottom: 1px solid rgba(30, 58, 95, 0.08);
}
.spaces-nav-admin-block:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.spaces-nav-admin-subtitle {
  font-size: 7.5pt; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: #64748b; margin: 0 0 8px;
}
.spaces-nav-stats {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px;
}
.spaces-nav-stat {
  font-size: 8pt; padding: 3px 8px; border-radius: 10px;
  background: rgba(30, 58, 95, 0.08); color: #1e3a5f;
}
.spaces-nav-form-row {
  display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px;
}
.spaces-nav-label {
  font-size: 7pt; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.4px; color: #64748b;
}
.spaces-nav-input, .spaces-nav-select {
  font-size: 9pt; padding: 6px 10px; border-radius: 4px;
  border: 1px solid rgba(30, 58, 95, 0.2); background: #fff; color: #0a1628;
  max-width: 360px;
}
.spaces-nav-input--readonly { background: #f8fafc; color: #64748b; }
.spaces-nav-inline-form {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 8px;
}
.spaces-nav-member-table {
  width: 100%; border-collapse: collapse; font-size: 8.5pt; margin-bottom: 10px;
}
.spaces-nav-member-table th {
  text-align: left; font-size: 7pt; text-transform: uppercase;
  letter-spacing: 0.4px; color: #64748b; padding: 4px 8px;
  border-bottom: 1px solid rgba(30, 58, 95, 0.12);
}
.spaces-nav-member-table td {
  padding: 6px 8px; border-bottom: 1px solid rgba(30, 58, 95, 0.06);
}
.spaces-nav-member-link { color: #1e3a5f; text-decoration: none; font-weight: 600; }
.spaces-nav-member-link:hover { text-decoration: underline; }
.spaces-nav-membership-actions {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.spaces-nav-access-hint { font-size: 8pt; color: #64748b; margin: 0 0 8px; }
.spaces-nav-access-soon { color: #d97706; font-weight: 600; }

/* Group collaborator admin */
.spaces-nav-collab-share { margin-bottom: 14px; }
.spaces-nav-collab-share-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}
.spaces-nav-collab-share-row .spaces-nav-input { flex: 1; min-width: 0; }
.spaces-nav-collab-hint {
  font-size: 7.5pt;
  color: #64748b;
  margin: 6px 0 0;
  line-height: 1.45;
}
.spaces-nav-collab-hint code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 7pt;
  background: rgba(30, 58, 95, 0.06);
  padding: 1px 4px;
  border-radius: 3px;
}
.spaces-nav-collab-invite { margin-bottom: 12px; }
.spaces-nav-collab-invite-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin: 6px 0 8px;
}
.spaces-nav-collab-email { width: 100%; margin-bottom: 8px; resize: vertical; }
.spaces-nav-collab-toast {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 8.5pt;
  border: 1px solid var(--border-light);
  background: var(--bg-muted);
}
.spaces-nav-collab-toast--ok {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}
.spaces-nav-collab-toast--err {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #991b1b;
}
.spaces-nav-collab-generated-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 8.5pt;
}
.spaces-nav-collab-generated {
  background: #ecfdf5;
  border: 1px solid #86efac;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.spaces-nav-collab-generated-row { margin-bottom: 8px; }
.spaces-nav-collab-generated-row:last-child { margin-bottom: 0; }
.spaces-nav-collab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
}
.spaces-nav-collab-roles-details summary {
  cursor: pointer;
  list-style: none;
}
.spaces-nav-invitee-banner {
  margin: 0 12px 8px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #93c5fd;
  background: #eff6ff;
  color: #1e3a5f;
  font-size: 9pt;
}
.spaces-nav-invitee-banner-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.spaces-nav-invitee-roles {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 8.5pt;
  line-height: 1.45;
}
.spaces-nav-invitee-roles--compact { margin-top: 6px; }
/* Nexus user badge — toolbar initials (PG) + account menu */
.nos-user-badge { position: relative; margin-right: 8px; }
.nos-user-badge-btn {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(248, 250, 252, 0.35);
  background: linear-gradient(145deg, #1e40af, #0f2744);
  color: #f8fafc;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono, ui-monospace, monospace);
  letter-spacing: 0.02em;
}
.nos-user-badge-btn::-webkit-details-marker { display: none; }
.nos-user-badge-initials { line-height: 1; pointer-events: none; }
.nos-user-badge-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 1200;
  min-width: 220px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
  border: 1px solid #cbd5e1;
}
.nos-user-badge-name {
  margin: 0 0 4px;
  font-size: 9pt;
  font-weight: 600;
  word-break: break-word;
}
.nos-user-badge-role {
  margin: 0 0 10px;
  font-size: 8pt;
  color: #475569;
}
.nos-user-badge-hint {
  margin: 0;
  font-size: 8pt;
  color: #64748b;
  line-height: 1.4;
}
.nos-user-badge-pref,
.nos-user-badge-logout {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  font-size: 8.5pt;
  text-align: center;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f2744;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}
.nos-user-badge-pref:disabled { opacity: 0.55; cursor: not-allowed; }
.nos-user-badge-logout { background: #0f2744; color: #f8fafc; border-color: #0f2744; }
.nos-desktop-login { margin: 0; max-width: none; width: 100%; }
.nos-desktop-login-card { text-align: left; }
.nos-desktop-login-paste { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #e2e8f0; }
.nos-desktop-tiles-wrap--locked {
  opacity: 0.35;
  pointer-events: none;
  filter: grayscale(0.4);
  user-select: none;
}

.nos-spaces-nav-session-chip {
  font-size: 8pt;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--bg-muted, #1a2744);
  color: var(--text-muted, #94a3b8);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spaces-nav-collab-email-label {
  display: block;
  font-size: 8pt;
  font-weight: 600;
  margin-bottom: 4px;
}
.spaces-nav-collab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 7.5pt;
  margin-bottom: 10px;
}
.spaces-nav-collab-table th {
  text-align: left;
  font-size: 7pt;
  font-weight: 700;
  color: #1a2744;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 5px 6px;
  background: #f1f5f9;
}
.spaces-nav-collab-table td {
  padding: 5px 6px;
  border-bottom: 1px solid rgba(176, 208, 248, 0.2);
  vertical-align: middle;
}
.spaces-nav-collab-mono {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 7pt;
}
.spaces-nav-collab-status {
  display: inline-block;
  font-size: 7pt;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.spaces-nav-collab-status--active {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}
.spaces-nav-collab-status--pending {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}
.spaces-nav-collab-status--muted {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}
.spaces-nav-collab-actions {
  white-space: nowrap;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.spaces-nav-collab-footer { margin-top: 8px; }

.spaces-nav-collab-th-expand { width: 28px; }
.spaces-nav-collab-summary td { vertical-align: middle; }
.spaces-nav-collab-expand-cell { width: 28px; text-align: center; }
.spaces-nav-collab-expand {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 8pt;
  color: #64748b;
  padding: 2px 4px;
  line-height: 1;
}
.spaces-nav-collab-expand:hover { color: #1e3a5f; }
.spaces-nav-collab-person { display: flex; flex-direction: column; gap: 2px; }
.spaces-nav-collab-person-name { font-weight: 600; font-size: 8.5pt; color: #0f172a; }
.spaces-nav-collab-person-email { font-size: 7pt; }
.spaces-nav-collab-muted { font-size: 7.5pt; color: #64748b; }
.spaces-nav-collab-biscuit-pill {
  display: inline-block;
  font-size: 7pt;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(30, 58, 95, 0.08);
  color: #334155;
}
.spaces-nav-collab-biscuit-pill--multi {
  background: rgba(59, 130, 246, 0.12);
  color: #1d4ed8;
}
.spaces-nav-collab-detail td {
  padding: 0 6px 10px !important;
  border-bottom: 1px solid rgba(176, 208, 248, 0.25);
  background: rgba(248, 250, 252, 0.9);
}
.spaces-nav-collab-detail-inner {
  margin: 4px 0 6px 28px;
  padding: 10px 12px;
  border: 1px solid rgba(176, 208, 248, 0.2);
  border-radius: 6px;
  background: #fff;
}
.spaces-nav-collab-detail-block + .spaces-nav-collab-detail-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(176, 208, 248, 0.15);
}
.spaces-nav-collab-detail-title {
  font-size: 7pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  color: #1a2744;
  margin-bottom: 4px;
}
.spaces-nav-collab-detail-hint {
  font-size: 7pt;
  color: #64748b;
  margin: 0 0 8px;
  line-height: 1.45;
}
.spaces-nav-collab-subtable {
  width: 100%;
  border-collapse: collapse;
  font-size: 7pt;
}
.spaces-nav-collab-subtable th {
  text-align: left;
  font-size: 6.5pt;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  padding: 3px 6px;
  border-bottom: 1px solid rgba(176, 208, 248, 0.15);
}
.spaces-nav-collab-subtable td {
  padding: 4px 6px;
  border-bottom: 1px solid rgba(176, 208, 248, 0.08);
}
.spaces-nav-collab-portal-tag {
  margin-left: 6px;
  font-size: 6pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.1);
  padding: 1px 4px;
  border-radius: 3px;
}
.spaces-nav-section { margin-bottom: 18px; }
.spaces-nav-section-title {
  font-size: 8pt; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; color: #1e3a5f; margin-bottom: 10px;
}
.spaces-nav-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.spaces-nav-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px; border-radius: 8px;
  border: 1px solid rgba(30, 58, 95, 0.14);
  background: #fff; text-decoration: none; color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.spaces-nav-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.12);
}
.spaces-nav-card--group {
  border-left: 3px solid #3b82f6;
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
}
.spaces-nav-card--space {
  border-left: 3px solid #94a3b8;
}
.spaces-nav-card-icon { font-size: 14pt; }
.spaces-nav-card-name { font-weight: 600; font-size: 10pt; color: #0a1628; }
.spaces-nav-card-meta { font-size: 7.5pt; color: #64748b; }
.spaces-nav-empty { font-size: 9pt; color: #64748b; padding: 8px 0; }
.spaces-nav-doc-list { list-style: none; }
.spaces-nav-doc-link {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 6px;
  text-decoration: none; color: #1a2744; font-size: 9pt;
}
.spaces-nav-doc-link:hover { background: rgba(59, 130, 246, 0.08); }

/* Space publish desk — per-doc channel + share */
.spaces-nav-publish-desk {
  border: 1px solid rgba(30, 58, 95, 0.12);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.spaces-nav-publish-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid rgba(30, 58, 95, 0.1);
}
.spaces-nav-publish-label {
  font-size: 7.5pt;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.spaces-nav-publish-select { min-width: 160px; font-size: 8.5pt; }
.spaces-nav-publish-share-all {
  margin-left: auto;
  font-size: 8pt;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
}
.spaces-nav-publish-share-all--ready {
  background: #16a34a;
  border-color: #15803d;
  color: #fff;
  cursor: pointer;
}
.spaces-nav-publish-share-all--ready:disabled { opacity: 0.6; }
.spaces-nav-publish-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8.5pt;
}
.spaces-nav-publish-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 7pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}
.spaces-nav-publish-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.spaces-nav-publish-doc {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.spaces-nav-publish-doc-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  padding: 2px 0;
  color: #1a2744;
}
.spaces-nav-publish-doc-btn:hover .spaces-nav-publish-doc-title {
  color: #2563eb;
}
.spaces-nav-publish-doc-title {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spaces-nav-publish-doc-open {
  flex-shrink: 0;
  font-size: 9pt;
  color: #64748b;
  text-decoration: none;
}
.spaces-nav-publish-doc-open:hover { color: #2563eb; }
.spaces-nav-publish-seq-col { width: 52px; }
.spaces-nav-publish-seq {
  width: 52px;
  vertical-align: middle;
  white-space: nowrap;
}
.spaces-nav-publish-seq-num {
  display: inline-block;
  min-width: 1.2em;
  font-weight: 700;
  color: #64748b;
  font-size: 8pt;
}
.spaces-nav-publish-seq-btns {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  margin-left: 4px;
  vertical-align: middle;
}
.spaces-nav-publish-seq-btn {
  font-size: 7pt;
  line-height: 1;
  padding: 1px 4px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
}
.spaces-nav-publish-seq-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.spaces-nav-publish-seq-btn:hover:not(:disabled) {
  background: #e2e8f0;
  color: #1e40af;
}
.spaces-nav-publish-action { width: 120px; text-align: right; white-space: nowrap; }
.spaces-nav-publish-withdraw {
  margin-left: 6px;
  font-size: 7pt;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #b91c1c;
  cursor: pointer;
}
.spaces-nav-publish-withdraw:hover:not(:disabled) {
  background: #fee2e2;
}
.spaces-nav-publish-withdraw:disabled { opacity: 0.5; cursor: not-allowed; }
.spaces-nav-publish-share {
  font-size: 8pt;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
}
.spaces-nav-publish-share--ready {
  background: #16a34a;
  border-color: #15803d;
  color: #fff;
  cursor: pointer;
}
.spaces-nav-publish-share--ready:disabled { opacity: 0.6; }
.spaces-nav-publish-shared {
  font-size: 7.5pt;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.spaces-nav-publish-status {
  margin: 0;
  padding: 8px 12px;
  font-size: 8pt;
  color: #475569;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
}

/* Group landing template — stats · index · sub-groups · spaces · admin */
.spaces-nav-landing-section {
  margin-bottom: 18px;
}
.spaces-nav-recent-section {
  border-left: 4px solid #f59e0b;
  padding-left: 12px;
}
.spaces-nav-card--recents {
  border-color: rgba(245, 158, 11, 0.35);
}
.spaces-nav-group-admin-toolbar {
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid rgba(30, 58, 95, 0.12);
  border-left: 4px solid #1e3a5f;
  border-radius: 8px;
  scroll-margin-top: 96px;
}
.spaces-nav-space-admin-toolbar {
  scroll-margin-top: 96px;
}
.spaces-nav-admin-panel--flash,
.spaces-nav-group-admin-toolbar.spaces-nav-admin-panel--flash,
.spaces-nav-space-admin-toolbar.spaces-nav-admin-panel--flash {
  animation: spaces-nav-admin-flash 1.2s ease-out;
}
@keyframes spaces-nav-admin-flash {
  0%, 40% { box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.55); }
  100% { box-shadow: none; }
}
.spaces-nav-group-admin-toolbar .spaces-nav-admin-actions {
  margin-bottom: 0;
}
.spaces-nav-space-admin-toolbar {
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid rgba(30, 58, 95, 0.12);
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
}
.spaces-nav-group-rename-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.spaces-nav-group-rename-row .spaces-nav-input {
  flex: 1 1 12rem;
  min-width: 10rem;
}
.spaces-nav-admin-slug-hint {
  font-size: 8pt;
  color: #64748b;
  font-family: ui-monospace, monospace;
}
.spaces-nav-move-row,
.spaces-nav-assign-space-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.spaces-nav-move-row .spaces-nav-label,
.spaces-nav-assign-space-row .spaces-nav-label {
  margin: 0;
  min-width: 5rem;
}
.spaces-nav-browse-head + .spaces-nav-landing-section,
.spaces-nav-group-index.spaces-nav-landing-section {
  margin-top: 4px;
}

/* Group browse — index blurb + subgroup LD inventory */
.spaces-nav-group-index {
  margin-bottom: 18px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border: 1px solid #dbeafe;
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
}
.spaces-nav-index-blurb {
  font-size: 9.5pt;
  line-height: 1.55;
  color: #334155;
  margin: 0 0 10px;
}
.spaces-nav-index-link {
  font-size: 8.5pt;
  font-weight: 600;
  color: #1d4ed8;
  text-decoration: none;
}
.spaces-nav-index-link:hover { text-decoration: underline; }
.spaces-nav-ld-inventory { margin-bottom: 22px; }
.spaces-nav-ld-subgroup {
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}
.spaces-nav-ld-subgroup:last-child { border-bottom: none; margin-bottom: 0; }
.spaces-nav-ld-subgroup-title {
  font-size: 9.5pt;
  font-weight: 700;
  color: #0a1628;
  margin: 0 0 6px;
}
.spaces-nav-ld-subgroup-title a {
  color: #1e3a5f;
  text-decoration: none;
}
.spaces-nav-ld-subgroup-title a:hover { text-decoration: underline; }

/* ── NexCOM unicom wireframe (comms-unification space) ────────────── */
.nexcom-wireframe {
  margin-bottom: 22px;
}
.nexcom-wireframe-head {
  margin-bottom: 14px;
}
.nexcom-kicker {
  display: inline-block;
  font-size: 7pt;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #1e3a5f;
  background: rgba(59, 130, 246, 0.12);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.nexcom-wireframe-hint {
  font-size: 8.5pt;
  color: #64748b;
  margin: 0 0 8px;
  line-height: 1.45;
}
.nexcom-thread-card {
  background: #fff;
  border: 1px solid rgba(30, 58, 95, 0.14);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(10, 22, 40, 0.04);
}
.nexcom-thread-root { margin-bottom: 10px; }
.nexcom-thread-label {
  display: block;
  font-size: 7pt;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 3px;
}
.nexcom-thread-subject {
  font-size: 13pt;
  font-weight: 700;
  color: #0a1628;
  margin: 0;
  line-height: 1.3;
}
.nexcom-participants {
  padding: 8px 10px;
  margin-bottom: 14px;
  background: rgba(59, 130, 246, 0.06);
  border-radius: 6px;
  border-left: 3px solid #3b82f6;
}
.nexcom-participant-line {
  font-size: 9.5pt;
  font-weight: 600;
  color: #1e3a5f;
  letter-spacing: 0.2px;
}
.nexcom-messages {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nexcom-msg {
  padding: 10px 12px;
  margin-bottom: 6px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}
.nexcom-msg:hover { background: rgba(59, 130, 246, 0.04); }
.nexcom-msg--selected {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.25);
}
.nexcom-msg--branch { opacity: 0.92; }
.nexcom-msg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
.nexcom-msg-speaker {
  font-weight: 700;
  font-size: 9pt;
  color: #1e3a5f;
}
.nexcom-msg-time {
  font-size: 7.5pt;
  color: #94a3b8;
  font-family: var(--font-mono);
}
.nexcom-msg-tag {
  font-size: 6.5pt;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}
.nexcom-msg-tag--reply { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.nexcom-msg-tag--reply-all { background: rgba(16, 185, 129, 0.12); color: #059669; }
.nexcom-msg-tag--forward { background: rgba(245, 158, 11, 0.15); color: #d97706; }
.nexcom-msg-snippet {
  font-size: 9pt;
  line-height: 1.5;
  color: #334155;
  margin: 0;
}
.nexcom-forward-branch {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(100, 116, 139, 0.35);
  padding-left: 14px;
  border-left: 2px solid rgba(245, 158, 11, 0.45);
}
.nexcom-forward-label {
  font-size: 8pt;
  font-weight: 700;
  color: #d97706;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nexcom-forward-arrow { font-size: 10pt; }
.nexcom-messages--branch { margin-top: 4px; }
.nexcom-attach-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid rgba(30, 58, 95, 0.1);
  border-radius: 8px;
  margin-bottom: 12px;
}
.nexcom-attach-label {
  font-size: 7pt;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #64748b;
}
.nexcom-attach-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nexcom-attach-chip {
  font-size: 8pt;
  padding: 4px 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(30, 58, 95, 0.14);
  color: #1e3a5f;
}
.nexcom-compose {
  background: #fff;
  border: 1px solid rgba(30, 58, 95, 0.14);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
}
.nexcom-composer {
  width: 100%;
  font-size: 9pt;
  line-height: 1.5;
  padding: 10px 12px;
  border: 1px solid rgba(30, 58, 95, 0.12);
  border-radius: 6px;
  background: #fafbfc;
  color: #334155;
  resize: vertical;
  margin-bottom: 10px;
  font-family: inherit;
}
.nexcom-reply-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.nexcom-reply-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.nexcom-reply-btn {
  font-size: 8pt;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid rgba(30, 58, 95, 0.2);
  background: #fff;
  color: #1e3a5f;
  cursor: not-allowed;
  opacity: 0.65;
}
.nexcom-send-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.nexcom-send-primary {
  font-size: 8.5pt;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 5px;
  border: 1px solid #1e3a5f;
  background: #1e3a5f;
  color: #fff;
  cursor: not-allowed;
  opacity: 0.75;
}
.nexcom-send-menu {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid rgba(30, 58, 95, 0.16);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(10, 22, 40, 0.08);
}
.nexcom-send-option {
  font-size: 8.5pt;
  padding: 7px 12px;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nexcom-send-option--default {
  background: rgba(59, 130, 246, 0.08);
  color: #1e3a5f;
  font-weight: 600;
}
.nexcom-send-check {
  color: #2563eb;
  font-size: 9pt;
  width: 14px;
}
.nexcom-send-badge {
  margin-left: auto;
  font-size: 6.5pt;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #64748b;
  background: rgba(100, 116, 139, 0.12);
  padding: 2px 5px;
  border-radius: 3px;
}
.nexcom-send-notice {
  font-size: 8.5pt;
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
}
.nexcom-send-primary:not(:disabled) {
  cursor: pointer;
  opacity: 1;
}
.nexcom-send-primary:not(:disabled):hover {
  background: #2a4a73;
}
.nexcom-send-option--soon {
  opacity: 0.55;
  font-style: italic;
}

/* ── Spaces Navigator search (NexDEX catalog + scroll) ───────────── */
.spaces-nav-left-stack {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
/* Right-rail NexDEX search — Rosa Chat accent (journal counsel search) */
.spaces-nav-search-rail {
  flex-shrink: 0;
  width: 100%;
  max-width: none;
  min-width: 0;
  border-right: none;
  border-bottom: 1px solid rgba(124, 58, 237, 0.22);
  margin-bottom: 8px;
}
.spaces-nav-search-rail-hdr {
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
  padding: 0.5rem 0.65rem 0.4rem;
}
.spaces-nav-search-rail .spaces-nav-search-bar {
  padding: 0.45rem 0.65rem 0.35rem;
  background: rgba(167, 139, 250, 0.06);
  border-bottom: 1px solid rgba(124, 58, 237, 0.12);
}
.spaces-nav-search-rail .spaces-nav-search-bar-label {
  color: #7c3aed;
  letter-spacing: 0.08em;
}
.spaces-nav-search-rail .spaces-nav-search-bar-input {
  border-color: rgba(124, 58, 237, 0.35);
  background: rgba(255, 255, 255, 0.92);
}
.spaces-nav-search-rail .spaces-nav-search-bar-input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.22);
}
.spaces-nav-search-rail .spaces-nav-search-bar-note {
  color: #7c3aed;
}
.spaces-nav-search-rail .spaces-nav-search-clear {
  border-color: rgba(124, 58, 237, 0.35);
  color: #7c3aed;
}
.spaces-nav-search-rail .spaces-nav-search-sidebar-kicker {
  color: #a78bfa;
}
.spaces-nav-search-rail .spaces-nav-search-sidebar-btn:hover {
  background: rgba(124, 58, 237, 0.1);
}
.spaces-nav-search-rail .spaces-nav-search-sidebar-item--active .spaces-nav-search-sidebar-btn {
  background: rgba(124, 58, 237, 0.16);
  border-left: 2px solid #7c3aed;
}
.spaces-nav-search-rail .spaces-nav-search-preview {
  border-top: 1px solid rgba(124, 58, 237, 0.15);
  padding: 0.5rem 0.65rem;
}
.spaces-nav-rosa-search-dialog {
  padding: 0.5rem 0.65rem 0.45rem;
  border-bottom: 1px solid rgba(124, 58, 237, 0.2);
}
.spaces-nav-rosa-search-bubble {
  margin-top: 0.35rem;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.18);
}
.spaces-nav-rosa-search-line {
  margin: 0 0 0.4rem;
  font-size: 7pt;
  line-height: 1.45;
  color: var(--text, #1a2744);
}
.spaces-nav-rosa-search-line:last-child { margin-bottom: 0; }
.spaces-nav-rosa-search-line--muted {
  color: var(--text-muted);
  font-size: 6.5pt;
}
.spaces-nav-rosa-search-line code {
  font-size: 6.5pt;
  color: #7c3aed;
}
.spaces-nav-restricted-block {
  padding: 0.45rem 0.65rem 0.55rem;
  border-top: 1px solid rgba(245, 158, 11, 0.35);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.06), rgba(124, 58, 237, 0.04));
}
.spaces-nav-restricted-kicker {
  font-size: 7pt;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d97706;
  margin-bottom: 0.35rem;
}
.spaces-nav-restricted-summary {
  font-size: 7pt;
  line-height: 1.4;
  margin: 0 0 0.4rem;
  color: #92400e;
}
.spaces-nav-restricted-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.spaces-nav-restricted-item {
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
}
.spaces-nav-restricted-title {
  display: block;
  font-size: 8pt;
  font-weight: 600;
  color: #0a1628;
}
.spaces-nav-restricted-meta {
  display: block;
  font-size: 6.5pt;
  color: #64748b;
}
.spaces-nav-restricted-lock { margin-right: 0.25rem; }
.spaces-nav-restricted-more {
  font-size: 6.5pt;
  color: #64748b;
  margin: 0.25rem 0 0;
}
.spaces-nav-restricted-pending,
.spaces-nav-restricted-sent,
.spaces-nav-restricted-error {
  margin-top: 0.45rem;
  padding: 0.4rem 0.45rem;
  border-radius: 4px;
  font-size: 7pt;
  line-height: 1.4;
}
.spaces-nav-restricted-pending {
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.25);
  color: #5b21b6;
}
.spaces-nav-restricted-timer {
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-right: 0.35rem;
}
.spaces-nav-restricted-sent {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #166534;
}
.spaces-nav-restricted-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #991b1b;
}
.spaces-nav-search-bar-label {
  display: block;
  font-size: 8pt;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1e3a5f;
  margin-bottom: 8px;
}
.spaces-nav-search-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.spaces-nav-search-bar-icon { font-size: 14pt; opacity: 0.85; }
.spaces-nav-search-bar-input {
  flex: 1;
  font-size: 11.5pt;
  line-height: 1.35;
  padding: 10px 12px;
  border: 1px solid rgba(30, 58, 95, 0.25);
  border-radius: 6px;
  background: #fff;
  color: #0a1628;
}
.spaces-nav-search-bar-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}
.spaces-nav-search-clear {
  font-size: 9pt;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}
.spaces-nav-search-bar-note--hydrate { color: var(--text-muted); font-style: italic; }
.spaces-nav-search-bar-note {
  font-size: 8pt;
  color: #1d4ed8;
  margin: 4px 0 0;
  padding: 0 2px;
}
.spaces-nav-search-sidebar {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 0 8px;
}
.spaces-nav-search-sidebar-kicker {
  font-size: 7.5pt;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  padding: 8px 10px 4px;
}
.spaces-nav-search-sidebar-list { list-style: none; margin: 0; padding: 0; }
.spaces-nav-search-sidebar-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 4px;
}
.spaces-nav-search-sidebar-btn:hover { background: rgba(59, 130, 246, 0.08); }
.spaces-nav-search-sidebar-item--active .spaces-nav-search-sidebar-btn {
  background: rgba(59, 130, 246, 0.14);
}
.spaces-nav-search-sidebar-title {
  display: block;
  font-size: 9.5pt;
  font-weight: 600;
  color: #0a1628;
}
.spaces-nav-search-sidebar-meta {
  display: block;
  font-size: 7.5pt;
  color: #64748b;
  margin-top: 2px;
}
.spaces-nav-search-sidebar-empty {
  padding: 12px 10px;
  font-size: 9pt;
  color: #64748b;
}
.spaces-nav-search-center {
  padding: 16px 24px 32px;
  overflow-y: auto;
  flex: 1;
}
.spaces-nav-search-center-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.spaces-nav-search-center-title { font-size: 14pt; margin: 0; color: #0a1628; }
.spaces-nav-search-center-count { font-size: 9pt; color: #64748b; }
.spaces-nav-search-space-block--here {
    border-left: 3px solid var(--nos-blue-toolbar, #1e6fd9);
    padding-left: 0.65rem;
    background: rgba(30, 111, 217, 0.06);
    border-radius: 4px;
}
.spaces-nav-search-space-here {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--nos-blue-toolbar, #1e6fd9);
    margin-left: 0.35rem;
}
.spaces-nav-search-space-block {
  margin-bottom: 20px;
  border: 1px solid rgba(176, 208, 248, 0.35);
  border-radius: 8px;
  overflow: hidden;
}
.spaces-nav-search-space-head {
  margin: 0;
  padding: 10px 14px;
  background: rgba(59, 130, 246, 0.06);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}
.spaces-nav-search-space-name { font-size: 11pt; font-weight: 700; }
.spaces-nav-search-space-group { font-size: 8.5pt; color: #64748b; }
.spaces-nav-search-doc-list { list-style: none; margin: 0; padding: 6px 8px; }
.spaces-nav-search-doc-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 4px;
  font-size: 10pt;
}
.spaces-nav-search-doc-btn:hover { background: rgba(59, 130, 246, 0.08); }
.spaces-nav-search-doc-item--active .spaces-nav-search-doc-btn {
  background: rgba(59, 130, 246, 0.12);
}
.spaces-nav-search-doc-slug {
  margin-left: auto;
  font-size: 7.5pt;
  color: #94a3b8;
}
.spaces-nav-goto-doc-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px 16px;
  font-size: 10pt;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(29, 78, 216, 0.35);
}
.spaces-nav-goto-doc-btn:hover {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}
.spaces-nav-search-preview-meta {
  font-size: 8pt;
  color: #64748b;
  margin: 0 0 8px;
}

/* ── Spaces Navigator tree (left NAVIGATE rail) ───────────────────── */
.spaces-nav-tree {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 0 12px;
  font-size: 8.5pt;
  line-height: 1.35;
  color: #1a2744;
}
.spaces-tree-filter-empty {
  padding: 8px 10px;
  font-size: 12px;
  color: var(--muted, #8a8f98);
  font-style: italic;
  list-style: none;
}
.spaces-tree-filter-empty--error {
  color: #b45309;
  font-style: normal;
}
.spaces-tree-retry {
  margin-left: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #1e3a5f;
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}
.spaces-tree-space-count {
  flex-shrink: 0;
  font-size: 7.5pt;
  color: #64748b;
  font-weight: 500;
}
.spaces-tree-doc-loading {
  padding: 4px 8px 4px 22px;
  font-size: 7.5pt;
  color: #94a3b8;
  font-style: italic;
  list-style: none;
}
.spaces-tree-section { margin-bottom: 10px; }
.spaces-tree-section-head {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 8px;
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 7.5pt;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  cursor: pointer;
  text-align: left;
}
.spaces-tree-section-head--static { cursor: default; }
.spaces-tree-root,
.spaces-tree-children,
.spaces-tree-doc-list,
.spaces-tree-admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.spaces-tree-children,
.spaces-tree-doc-list {
  padding-left: 14px;
  border-left: 1px solid rgba(100, 116, 139, 0.2);
  margin-left: 14px;
}
.spaces-tree-folder-head,
.spaces-tree-space-head {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px 3px var(--tree-pad, 8px);
  border-radius: 4px;
  min-height: 24px;
}
.spaces-tree-folder-head--active,
.spaces-tree-space-head--active {
  background: rgba(59, 130, 246, 0.12);
}
.spaces-tree-folder-head:hover,
.spaces-tree-space-head:hover {
  background: rgba(59, 130, 246, 0.06);
}
.spaces-tree-chevron {
  flex: 0 0 16px;
  width: 16px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 8pt;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  text-align: center;
}
.spaces-tree-chevron--folder {
  color: #1e3a5f;
  font-size: 10pt;
  font-weight: 700;
  line-height: 16px;
}
.spaces-tree-chevron--folder:hover {
  color: #1d4ed8;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 2px;
}
.spaces-tree-chevron--spacer {
  flex: 0 0 16px;
  width: 16px;
  pointer-events: none;
}
.nos-blue-toolbar-admin-btn {
  margin-right: 8px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #eaf2ff;
  font-size: 8pt;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.nos-blue-toolbar-admin-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}
.spaces-nav-admin-details {
  margin-bottom: 16px;
  border: 1px solid rgba(100, 116, 139, 0.25);
  border-radius: 6px;
  background: rgba(248, 250, 252, 0.6);
}
.spaces-nav-admin-details[open] .spaces-nav-admin-chevron {
  transform: rotate(90deg);
}
.spaces-nav-admin-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}
.spaces-nav-admin-summary::-webkit-details-marker {
  display: none;
}
.spaces-nav-admin-chevron {
  flex: 0 0 14px;
  color: #64748b;
  font-size: 10pt;
  transition: transform 0.12s ease;
}
.spaces-nav-admin-details .spaces-nav-admin-panel {
  padding: 0 12px 12px;
}
.spaces-tree-star {
  flex: 0 0 18px;
  width: 18px;
  border: none;
  background: transparent;
  font-size: 10pt;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  color: #94a3b8;
  opacity: 0.7;
  -webkit-user-drag: none;
  user-select: none;
  touch-action: manipulation;
}
.spaces-tree-star:hover {
  opacity: 1;
  color: #1e3a5f;
  transform: scale(1.08);
}
.spaces-tree-star--active {
  opacity: 1;
  color: #1e3a5f;
}
.spaces-tree-folder-link,
.spaces-tree-space-link,
.spaces-tree-doc-link {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.spaces-tree-folder-label,
.spaces-tree-space-label,
.spaces-tree-doc-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* OS REF journal #162 — document counts on groups / spaces / doc ordinals */
.spaces-tree-count {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 7.5pt;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted, #64748b);
  background: rgba(26, 39, 68, 0.07);
  border-radius: 999px;
  padding: 0 6px;
  min-width: 1.35em;
  text-align: center;
  line-height: 1.5;
}
.spaces-tree-count--doc {
  background: transparent;
  font-weight: 500;
  opacity: 0.75;
  margin-left: 6px;
}
.spaces-tree-folder-link,
.spaces-tree-space-link,
.spaces-tree-doc-link {
  gap: 6px;
}
.spaces-tree-doc-published {
  flex-shrink: 0;
  font-size: 7.5pt;
  color: #1d4ed8;
  opacity: 0.85;
}
.spaces-tree-doc {
  padding: 2px 6px 2px 8px;
  border-radius: 4px;
}
.spaces-tree-doc--active {
  background: rgba(59, 130, 246, 0.12);
}
.spaces-tree-doc-link:hover {
  background: rgba(59, 130, 246, 0.06);
}
.spaces-tree-admin-item {
  padding: 4px 8px 4px 28px;
  color: #64748b;
  font-size: 8pt;
}
.spaces-tree-space--recents .spaces-tree-space-head {
  background: rgba(59, 130, 246, 0.06);
  border-left: 2px solid var(--accent, #3b82f6);
}
.spaces-tree-space--recents .spaces-tree-space-label {
  font-weight: 600;
  letter-spacing: 0.02em;
}
.spaces-tree-doc-date,
.spaces-nav-doc-date {
  margin-left: auto;
  font-size: 0.68rem;
  color: var(--muted, #64748b);
  white-space: nowrap;
  flex-shrink: 0;
}
.spaces-tree-doc-link,
.spaces-nav-doc-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
}
.spaces-nav-doc-title {
  flex: 1;
  min-width: 0;
}
.spaces-tree-doc-head {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
}
.spaces-tree-doc-seq {
  flex: 0 0 16px;
  font-size: 7pt;
  color: #64748b;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.spaces-tree-doc-preview-btn {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
}
.spaces-tree-doc-open {
  flex-shrink: 0;
  font-size: 9pt;
  color: #64748b;
  text-decoration: none;
  padding: 0 2px;
  opacity: 0.7;
}
.spaces-tree-doc-open:hover {
  opacity: 1;
  color: #3b82f6;
}
.spaces-tree-doc-header {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px 4px 8px;
  font-size: 7pt;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  list-style: none;
}
.spaces-tree-doc-header-seq { flex: 0 0 16px; text-align: right; }
.spaces-tree-doc-header-title { flex: 1; min-width: 0; }
/* Embedded Doc link preview (right rail tab — dormant until click) */
a.nos-doclink {
  color: var(--accent, #2563eb);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.92em;
}
a.nos-doclink:hover {
  background: rgba(37, 99, 235, 0.08);
  border-radius: 3px;
}
.spaces-nav-doclink-preview .spaces-nav-doclink-pre {
  margin: 8px 0 0;
  padding: 10px 12px;
  max-height: min(70vh, 640px);
  overflow: auto;
  font-size: 7.5pt;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f8fafc;
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 8px;
  color: var(--text, #1a2744);
}
.spaces-nav-right-rail {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}
.spaces-nav-right-rail-tabs {
  padding: 10px 12px 0;
  margin-bottom: 0;
  flex-shrink: 0;
}
.spaces-nav-rail-tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.spaces-nav-rail-tab {
  font: 700 8px/1 system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.55rem;
  border-radius: 4px;
  border: 1px solid rgba(176, 208, 248, 0.35);
  background: rgba(15, 23, 42, 0.04);
  color: #475569;
  cursor: pointer;
}
.spaces-nav-rail-tab--active {
  background: #1e3a5f;
  color: #e2e8f0;
  border-color: #1e3a5f;
}
.spaces-nav-sot-path {
  display: block;
  font-size: 11px;
  word-break: break-all;
  margin-top: 0.35rem;
  padding: 0.45rem;
  background: rgba(15, 23, 42, 0.06);
  border-radius: 4px;
}
.spaces-nav-doc-qc {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 12px 12px;
}
.spaces-nav-doc-qc-refresh {
  margin-left: auto;
  font: 600 8px/1 system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(176, 208, 248, 0.25);
  background: rgba(15, 23, 42, 0.04);
  color: #1e3a5f;
  border-radius: 4px;
  padding: 0.25rem 0.45rem;
  cursor: pointer;
}
.spaces-nav-doc-qc-refresh:disabled { opacity: 0.5; cursor: default; }
.spaces-nav-doc-qc-verdict {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.5rem 0 0.65rem;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  font: 700 9px/1.2 system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.spaces-nav-doc-qc-verdict--pass { background: #ecfdf5; color: #065f46; }
.spaces-nav-doc-qc-verdict--warn { background: #fffbeb; color: #92400e; }
.spaces-nav-doc-qc-verdict--fail { background: #fef2f2; color: #991b1b; }
.spaces-nav-doc-qc-snap {
  font: 500 8px/1 ui-monospace, monospace;
  opacity: 0.75;
  text-transform: none;
  letter-spacing: 0;
}
.spaces-nav-doc-qc-bullets {
  list-style: disc;
  margin: 0 0 0.75rem 1.1rem;
  padding: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #1e293b;
}
.spaces-nav-doc-qc-bullets li { margin: 0.35rem 0; }
.spaces-nav-doc-qc-learned {
  margin: 0;
  padding: 0.55rem 0.6rem;
  border-left: 3px solid #c9a13f;
  background: rgba(201, 161, 63, 0.08);
  font-size: 11.5px;
  line-height: 1.45;
  color: #334155;
}
.spaces-nav-doc-qc-learned-label {
  display: block;
  font: 700 8px/1 system-ui, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #92400e;
  margin-bottom: 0.25rem;
}
.spaces-nav-doc-qc-rosa-fallback {
  font-size: 10px;
  color: #64748b;
  margin: 0.35rem 0 0;
}
.spaces-nav-golden-compare {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-bottom: none;
}
.spaces-nav-golden-compare .spaces-nav-preview-body {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow: auto;
  font-size: 15px;
  line-height: 1.6;
}
.spaces-nav-golden-compare .ch-doc-body .page-wrap {
  font-size: inherit;
}
.spaces-nav-golden-compare .ch-doc-body .page-wrap .header h1 {
  font-size: 1.75rem;
}
.spaces-nav-golden-compare .ch-doc-body .page-wrap .container {
  padding: 2rem 1.5rem 4rem;
}
.spaces-nav-compare-lane {
  display: inline-flex;
  align-items: center;
  font: 700 9px/1 system-ui, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.28rem 0.55rem;
  border-radius: 4px;
  margin-right: 0.35rem;
}
.spaces-nav-compare-lane--production {
  background: #065f46;
  color: #6ee7b7;
  border: 1px solid #34d399;
}
.spaces-nav-compare-lane--golden {
  background: #92400e;
  color: #fde68a;
  border: 1px solid #fbbf24;
}
.spaces-nav-doc-view--compare .spaces-nav-doc-crumb {
  flex-wrap: wrap;
  gap: 0.35rem;
}
.spaces-nav-preview-panel {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(176, 208, 248, 0.2);
  flex-shrink: 0;
}
.spaces-nav-cite-preview {
  background: linear-gradient(180deg, #f0f7ff 0%, #fafcff 100%);
  max-height: 42vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.spaces-nav-cite-preview .spaces-nav-preview-body {
  flex: 1;
  min-height: 0;
  max-height: 34vh;
}
.spaces-nav-cite-clear {
  background: none;
  border: none;
  color: #64748b;
  font-size: 14pt;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}
.spaces-nav-cite-clear:hover { color: #0f172a; }
.spaces-nav-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.spaces-nav-preview-label {
  font-size: 7pt;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}
.spaces-nav-preview-channel {
  font-size: 7pt;
  font-family: var(--font-mono);
  color: #3b82f6;
}
.spaces-nav-preview-title {
  font-size: 10pt;
  font-weight: 600;
  color: #0a1628;
  margin: 0 0 8px;
  line-height: 1.3;
}
.spaces-nav-preview-loading,
.spaces-nav-preview-empty {
  font-size: 8pt;
  color: #64748b;
  font-style: italic;
}
.spaces-nav-preview-body {
  overflow-y: auto;
  border: 1px solid rgba(176, 208, 248, 0.25);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fafcff;
}
.spaces-nav-preview-body.ch-doc-iframe--compact,
.spaces-nav-preview-body.ch-doc-body--live {
  max-height: 48vh;
}
.spaces-nav-preview-pubs {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(176, 208, 248, 0.15);
}
.spaces-nav-preview-pubs-label {
  font-size: 7pt;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 6px;
}
.spaces-tree-fav-frequent {
  padding: 2px 0 4px;
}
.spaces-tree-fav-frequent-block {
  margin-bottom: 8px;
}
.spaces-tree-fav-frequent-block:last-child {
  margin-bottom: 0;
}
.spaces-tree-fav-frequent-label {
  padding: 2px 8px 4px 22px;
  font-size: 7pt;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #94a3b8;
}
.spaces-tree-fav-frequent-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.spaces-tree-fav-frequent-empty {
  margin: 0;
  padding: 2px 8px 4px 22px;
  font-size: 7.5pt;
  color: #94a3b8;
}
.spaces-tree-recent-scroll {
  max-height: calc(5 * 26px);
  overflow-y: auto;
  overflow-x: hidden;
  margin: 0 4px 0 18px;
  border-radius: 4px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(248, 250, 252, 0.5);
}
.spaces-tree-recent-list,
.spaces-tree-doc-fav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.spaces-tree-recent-doc,
.spaces-tree-doc-fav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 26px;
  padding: 2px 6px;
  border-radius: 3px;
}
.spaces-tree-recent-doc--active,
.spaces-tree-doc-fav--active {
  background: rgba(59, 130, 246, 0.12);
}
.spaces-tree-recent-doc-link,
.spaces-tree-doc-fav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  font-size: 8pt;
}
.spaces-tree-recent-doc-link:hover,
.spaces-tree-doc-fav-link:hover {
  background: rgba(59, 130, 246, 0.06);
  border-radius: 3px;
}
.spaces-tree-recent-doc-icon {
  flex: 0 0 14px;
  font-size: 8pt;
  opacity: 0.75;
}
.spaces-tree-recent-doc-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spaces-tree-doc-head {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.spaces-tree-star--group {
  margin-right: 2px;
}

.spaces-tree-shortcut--group .spaces-tree-space-head {
  padding-left: 22px;
}

.spaces-tree-shortcut--group.spaces-tree-shortcut--active .spaces-tree-space-head {
  background: rgba(59, 130, 246, 0.12);
  border-radius: 4px;
}

.spaces-tree-star--doc {
  flex: 0 0 16px;
  width: 16px;
  font-size: 9pt;
}
.spaces-tree-doc-fav {
  padding-left: 22px;
}
.spaces-tree-shortcut .spaces-tree-space-head {
  padding-left: 22px;
}

/* ── JiveTalk (JT) — global orient hover (nos-jivetalk.js) ───────────── */
.orient {
  border-bottom: 1px dotted var(--accent, #3b82f6);
  cursor: help;
  text-decoration: none;
  color: inherit;
}
.orient:focus {
  outline: 2px solid var(--accent-light, #60a5fa);
  outline-offset: 2px;
}
#orient-pop {
  position: fixed;
  z-index: 10000;
  max-width: 300px;
  padding: 0.75rem 1rem;
  background: var(--navy-mid, #132238);
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 8px;
  font-size: 0.82rem;
  line-height: 1.45;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}
#orient-pop[hidden] {
  display: none !important;
}
#orient-pop .jargon-kicker {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold, #c9a13f);
  margin-bottom: 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid #334155;
}
#orient-pop .jargon-kicker span {
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.08em;
}
#orient-pop .jargon-term {
  display: block;
  color: #60a5fa;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  font-weight: 700;
}
#orient-pop p {
  margin: 0 0 0.5rem;
  color: #cbd5e1;
}
#orient-pop a {
  color: #93c5fd;
  font-size: 0.78rem;
  pointer-events: auto;
  text-decoration: none;
}
#orient-pop a:hover {
  text-decoration: underline;
}

/* unb — consistent ops nav header for tabs (NOS 2 · light theme, from /ops/index) */
.unb { background: rgba(176, 208, 248, 0.06); border-bottom: 1px solid rgba(176, 208, 248, 0.15); padding: 0.5rem 1.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 11px; }
.unb a { color: #1e3a5f; font-size: 10px; padding: 0.25rem 0.65rem; border-radius: 4px; border: 1px solid rgba(176, 208, 248, 0.15); text-decoration: none; }
.unb a:hover { background: rgba(175,120,60,0.08); color: #3b82f6; }
.unb .here { border-color: rgba(59, 130, 246, 0.5); background: rgba(59, 130, 246, 0.15); color: #1a5fcc; font-weight: 700; }
.unb .breadcrumb { color: #4a6080; font-size: 9px; margin-left: auto; letter-spacing: 0.04em; }

/* Nexus session gate — spaces-nav + desktop login
 * Must scroll when card (signup/magic paste) is taller than the viewport.
 * html/body are overflow:hidden; this overlay is the only scroll surface.
 */
.spaces-nav-login-gate {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: max(1.25rem, 3vh) 1rem max(2rem, 5vh);
  box-sizing: border-box;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}
.spaces-nav-login-card {
  width: min(420px, 92vw);
  margin-top: auto;
  margin-bottom: auto;
  flex-shrink: 0;
  padding: 1.5rem 1.75rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid rgba(30, 58, 95, 0.15);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.25);
}
/* Desktop home reuses the gate class — keep scroll + card spacing */
.nos-desktop-login.spaces-nav-login-gate {
  /* same rules; explicit for layer clarity (L0 desktop /) */
  overflow-y: auto;
}
.nos-desktop-login .nos-desktop-login-card {
  max-height: none;
}
.spaces-nav-login-card h2 { margin: 0 0 0.5rem; font-size: 1.25rem; color: #0f172a; }
.spaces-nav-login-lead { margin: 0 0 0.75rem; font-size: 0.9rem; color: #334155; line-height: 1.45; }
.spaces-nav-login-scope { margin: 0 0 1rem; font-size: 0.85rem; color: #475569; }
.spaces-nav-login-form { display: flex; flex-direction: column; gap: 0.5rem; }
.spaces-nav-login-form label { font-size: 0.78rem; font-weight: 600; color: #1e293b; }
.spaces-nav-login-form input {
  padding: 0.55rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 0.95rem;
}
.spaces-nav-login-form button {
  margin-top: 0.35rem;
  padding: 0.55rem 0.85rem;
  border: none;
  border-radius: 6px;
  background: #1e3a5f;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.spaces-nav-login-form button:disabled { opacity: 0.6; cursor: wait; }
.spaces-nav-login-error { color: #b91c1c; font-size: 0.85rem; margin: 0 0 0.5rem; }
.spaces-nav-login-sent { color: #166534; font-size: 0.85rem; margin: 0 0 0.75rem; }
.spaces-nav-login-hint { margin: 1rem 0 0; font-size: 0.8rem; color: #64748b; line-height: 1.4; }
.spaces-nav-login-hint a { color: #1d4ed8; }

/* ── L00 TACKS module — light theme (NCC drawer, NOT retired IRIS dark) ─ */
/* Edge tab (right rail) */
.nos-l00-tacks-rail {
  position: fixed;
  top: 42%;
  right: 0;
  z-index: 10040;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border: 1px solid #c7d2fe;
  border-right: none;
  border-radius: 10px 0 0 10px;
  background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%);
  color: #4c1d95;
  box-shadow: -4px 0 16px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  font: inherit;
}
.nos-l00-tacks-rail:hover,
.nos-l00-tacks-rail.is-open {
  background: linear-gradient(180deg, #ede9fe 0%, #ddd6fe 100%);
  border-color: #a78bfa;
}
.nos-l00-tacks-rail-icon { font-size: 1.1rem; line-height: 1; }
.nos-l00-tacks-rail-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nos-l00-tacks-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10045;
  background: rgba(15, 23, 42, 0.25);
}
.nos-l00-tacks-overlay.is-open { display: block; }
.nos-l00-tacks-drawer {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: min(480px, 100vw);
  height: 100vh;
  z-index: 10050;
  background: #ffffff;
  border-left: 1px solid #c7d2fe;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
  flex-direction: column;
  font-family: inherit;
}
.nos-l00-tacks-drawer.is-open { display: flex; }
.nos-l00-tacks-drawer-chrome {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%);
  border-bottom: 1px solid #ddd6fe;
  flex-shrink: 0;
}
.nos-l00-tacks-drawer-titles { flex: 1; min-width: 0; }
.nos-l00-tacks-drawer-titles h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #4c1d95;
}
.nos-l00-tacks-drawer-titles .sub {
  font-size: 11px;
  color: #6d28d9;
  font-weight: 600;
  line-height: 1.35;
}
.nos-l00-tacks-drawer-titles .sub-scribe {
  font-weight: 500;
  color: #7c3aed;
  margin-top: 2px;
}
.nos-l00-tacks-drawer-close {
  border: 1px solid #c4b5fd;
  background: #fff;
  color: #5b21b6;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 14px;
}
.nos-l00-tacks-drawer-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Panel body (inside drawer) — light surfaces, journal-like */
.nos-l00-tacks {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  font-size: 0.86rem;
  color: var(--text, #1e293b);
  background: #fff;
}
.nos-l00-tacks-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px 4px;
  border-bottom: 1px solid #ede9fe;
}
.nos-l00-tacks-sub { color: #6d28d9; font-weight: 600; font-size: 0.72rem; }
.nos-l00-tacks-banner {
  margin: 0;
  padding: 8px 12px;
  font-size: 0.72rem;
  color: #5b21b6;
  background: #f5f3ff;
  border-bottom: 1px solid #e9e5ff;
}
.nos-l00-tacks-banner code { font-size: 0.7rem; color: #6d28d9; }

/* EFP — Expandable Footnote Particle (personal scribe doctrine) */
.nos-l00-tacks-efp {
  margin: 0;
  border-bottom: 1px solid #e9e5ff;
  background: #fafafa;
}
.nos-l00-tacks-efp-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #4c1d95;
  user-select: none;
}
.nos-l00-tacks-efp-summary::-webkit-details-marker { display: none; }
.nos-l00-tacks-efp .efp-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #7c3aed;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.nos-l00-tacks-efp-body {
  padding: 0 12px 12px 12px;
  font-size: 0.78rem;
  color: #334155;
  line-height: 1.45;
}
.nos-l00-tacks-efp-body p { margin: 0 0 0.5rem; }
.nos-l00-tacks-efp-body ul {
  margin: 0.35rem 0 0.65rem 1.1rem;
  padding: 0;
}
.nos-l00-tacks-efp-body li { margin: 0.25rem 0; }
.nos-l00-tacks-efp-foot {
  margin: 0.5rem 0 0 !important;
  font-size: 0.72rem;
  color: #64748b;
}

/* Mini folder store */
.nos-l00-tacks-folder {
  border: 1px dashed #c4b5fd;
  border-radius: 10px;
  background: #faf5ff;
  padding: 8px 10px;
  min-height: 72px;
}
.nos-l00-tacks-folder-hint {
  margin: 0 0 6px;
  font-size: 0.7rem;
  color: #6d28d9;
  line-height: 1.35;
}
.nos-l00-tacks-file {
  font-size: 0.72rem;
  margin-bottom: 6px;
  max-width: 100%;
}
.nos-l00-tacks-folder-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.nos-l00-tacks-folder-empty {
  font-size: 0.72rem;
  color: #94a3b8;
  padding: 4px 0;
}
.nos-l00-tacks-folder-item {
  position: relative;
  width: 72px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.nos-l00-tacks-folder-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
}
.nos-l00-tacks-folder-fileicon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: #f1f5f9;
  border-radius: 4px;
}
.nos-l00-tacks-folder-name {
  font-size: 0.58rem;
  color: #475569;
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nos-l00-tacks-folder-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
  font-size: 10px;
  cursor: pointer;
  line-height: 1;
}
.nos-l00-tacks-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 0;
}
.nos-l00-tacks-list {
  border-right: 1px solid var(--border, #e2e8f0);
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  background: #f8fafc;
}
.nos-l00-tacks-filter {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #0f172a;
  padding: 6px 8px;
  font-size: 0.8rem;
}
.nos-l00-tacks-item {
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  padding: 8px 10px;
  cursor: pointer;
}
.nos-l00-tacks-item:hover,
.nos-l00-tacks-item.active {
  border-color: #a78bfa;
  background: #f5f3ff;
}
.nos-l00-tacks-item-title { display: block; font-weight: 600; font-size: 0.82rem; }
.nos-l00-tacks-item-meta {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted, #64748b);
  margin-top: 2px;
}
.nos-l00-tacks-empty { color: #64748b; padding: 12px 4px; font-size: 0.8rem; }
.nos-l00-tacks-editor {
  padding: 10px 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff;
}
.nos-l00-tacks-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.nos-l00-tacks-input,
.nos-l00-tacks-textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  padding: 8px 10px;
  font-size: 0.86rem;
  font-family: inherit;
}
.nos-l00-tacks-textarea { resize: vertical; min-height: 120px; line-height: 1.45; }
.nos-l00-tacks-check {
  font-size: 0.8rem;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nos-l00-tacks-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.nos-l00-tacks-btn {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 7px 12px;
  background: #fff;
  color: #1e293b;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.nos-l00-tacks-btn.primary {
  background: #7c3aed;
  border-color: #6d28d9;
  color: #fff;
}
.nos-l00-tacks-btn.primary:hover { background: #6d28d9; }
.nos-l00-tacks-btn.ghost { background: transparent; }
.nos-l00-tacks-status {
  min-height: 1.1em;
  font-size: 0.75rem;
  color: #166534;
  margin: 0;
}
.nos-l00-tacks-hint { font-size: 0.7rem; color: #64748b; margin: 0; }
.nos-doc-strip-thumb--tacks {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  line-height: 1;
}

/* ── L00 TACKS capture (Space+T pin · DOM · note) ───────────────── */
.nos-tacks-cap-armed {
  position: fixed;
  inset: 0;
  z-index: 10050;
  pointer-events: none;
  cursor: crosshair;
}
body:has(.nos-tacks-cap-armed) { cursor: crosshair; }
.nos-tacks-cap-hud {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  background: #4c1d95;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(76, 29, 149, 0.35);
  z-index: 10055;
}
.nos-tacks-cap-pin {
  position: fixed;
  z-index: 10052;
  width: 28px;
  height: 28px;
  margin-left: -14px;
  margin-top: -14px;
  border-radius: 50%;
  border: 3px solid #7c3aed;
  background: rgba(167, 139, 250, 0.25);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.2), 0 0 16px rgba(124, 58, 237, 0.45);
  pointer-events: none;
  animation: nos-tacks-pin-pulse 1.2s ease-out 1;
}
@keyframes nos-tacks-pin-pulse {
  0% { transform: scale(0.4); opacity: 0.2; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.nos-tacks-cap-note {
  position: fixed;
  right: 18px;
  bottom: 72px;
  z-index: 10060;
  width: min(380px, calc(100vw - 32px));
  max-height: min(55vh, 480px);
  overflow: auto;
  background: #f8fafc;
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  padding: 12px 14px 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1e293b;
}
.nos-tacks-cap-note-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}
.nos-tacks-cap-note-head strong { font-size: 0.95rem; color: #4c1d95; }
.nos-tacks-cap-note-sub { font-size: 0.72rem; color: #64748b; }
.nos-tacks-cap-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 6px 0 3px;
}
.nos-tacks-cap-input,
.nos-tacks-cap-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 15px;
  background: #fff;
  color: #1e293b;
}
.nos-tacks-cap-textarea {
  min-height: 72px;
  max-height: 40vh;
  resize: vertical;
  line-height: 1.4;
}
.nos-tacks-cap-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.nos-tacks-cap-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #1e293b;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.nos-tacks-cap-btn.primary {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}
.nos-tacks-cap-btn.ghost { background: transparent; }
.nos-tacks-cap-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.nos-tacks-cap-status {
  font-size: 0.74rem;
  font-weight: 600;
  color: #6d28d9;
  margin: 8px 0 0;
  min-height: 1.1em;
}
.nos-tacks-cap-toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10060;
  background: #1e293b;
  color: #f8fafc;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.25);
  pointer-events: none;
  max-width: 90vw;
}

/* Pin capture affordance (tablet-friendly; Space+T still works with keyboard) */
.nos-l00-tacks-pin-btn {
  position: fixed;
  top: calc(42% - 82px); /* 10px above prior seat */
  right: 0;
  z-index: 10041;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border: 1px solid #c7d2fe;
  border-right: none;
  border-radius: 10px 0 0 10px;
  background: linear-gradient(180deg, #ede9fe 0%, #ddd6fe 100%);
  color: #5b21b6;
  box-shadow: -4px 0 12px rgba(15, 23, 42, 0.1);
  cursor: pointer;
  font: inherit;
  min-width: 2.4rem;
}
.nos-l00-tacks-pin-btn:hover {
  background: linear-gradient(180deg, #ddd6fe 0%, #c4b5fd 100%);
}
.nos-l00-tacks-pin-btn span:first-child { font-size: 1.05rem; line-height: 1; }
.nos-l00-tacks-pin-btn-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Consiglieri bind (IRIS Slim mentor lane) ── */
.iris-agent-chip--consigliere.active {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-color: #d97706;
  color: #92400e;
}
.consigliere-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 6px 12px;
  background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 100%);
  border-bottom: 1px solid #fcd34d;
  font-size: 0.78rem;
}
.consigliere-status-label { font-weight: 700; color: #92400e; }
.consigliere-status-session { font-family: ui-monospace, monospace; color: #78350f; }
.consigliere-status-hint { color: #a16207; }
.consigliere-status-note { color: #78716c; font-style: italic; margin-left: auto; }
.consigliere-copy-btn {
  padding: 2px 8px;
  border: 1px solid #d97706;
  border-radius: 4px;
  background: #fff;
  color: #92400e;
  font-size: 0.72rem;
  cursor: pointer;
}
.consigliere-coach-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #1c1917;
  border-top: 1px solid #44403c;
}
.consigliere-coach-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fcd34d;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.consigliere-coach-input {
  flex: 1;
  min-width: 0;
  font-size: 0.82rem;
  background: #292524;
  border-color: #57534e;
  color: #fafaf9;
}
.consigliere-coach-send {
  font-size: 0.78rem;
  background: #d97706;
  border-color: #b45309;
  color: #fff;
}

/* ── NOS Files / NexVOL (desktop tile surface) ─────────────────────────── */
.nexvol-page {
  min-height: 100vh;
  background: var(--bg, #f4f7fb);
  color: var(--text, #1a2744);
  font-family: var(--font-sans, system-ui, -apple-system, sans-serif);
}
.nexvol-hdr {
  padding: 12px 20px 4px;
}
.nexvol-home-link {
  font-size: 8.5pt;
  color: var(--accent, #2563eb);
  text-decoration: none;
}
.nexvol-home-link:hover { text-decoration: underline; }
.nexvol-title {
  font-size: 16pt;
  font-weight: 700;
  margin: 4px 0 2px;
  color: var(--text, #1a2744);
}
.nexvol-subtitle {
  font-size: 9pt;
  color: var(--text-muted, #5b6b85);
  margin: 0 0 8px;
}
.nexvol-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 20px 10px;
}
.nexvol-filter-btn {
  border: 1px solid var(--border, #c5d0e0);
  background: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 8.5pt;
  cursor: pointer;
  color: var(--text, #1a2744);
}
.nexvol-filter-btn:hover { border-color: var(--accent, #2563eb); color: var(--accent, #2563eb); }
.nexvol-filter-btn--active {
  background: rgba(37, 99, 235, 0.12);
  border-color: var(--accent, #2563eb);
  color: var(--accent, #2563eb);
  font-weight: 600;
}
.nexvol-filter-btn--waste.nexvol-filter-btn--active {
  background: rgba(217, 119, 6, 0.15);
  border-color: #d97706;
  color: #b45309;
}
.nexvol-body {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr minmax(220px, 300px);
  gap: 0;
  min-height: calc(100vh - 160px);
  border-top: 1px solid var(--border-light, #e2e8f0);
}
.nexvol-sidebar {
  border-right: 1px solid var(--border-light, #e2e8f0);
  background: #fff;
  overflow-y: auto;
  padding: 10px 8px 24px;
}
.nexvol-group { margin-bottom: 14px; }
.nexvol-group-label {
  font-size: 7.5pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted, #5b6b85);
  padding: 4px 8px;
}
.nexvol-root {
  display: flex;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  color: inherit;
}
.nexvol-root:hover { background: rgba(37, 99, 235, 0.06); }
.nexvol-root--active {
  background: rgba(37, 99, 235, 0.12);
  box-shadow: inset 3px 0 0 var(--accent, #2563eb);
}
.nexvol-root--waste .nexvol-root-name { color: #b45309; }
.nexvol-root-ico { font-size: 14pt; line-height: 1.2; }
.nexvol-root-meta { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.nexvol-root-name { font-size: 9pt; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nexvol-root-cap { font-size: 7pt; color: var(--text-muted, #5b6b85); }
.nexvol-root-cap--low { color: #b45309; font-weight: 600; }
.nexvol-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg, #f4f7fb);
}
.nexvol-pathbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
  background: #fff;
  flex-wrap: wrap;
}
.nexvol-up {
  border: 1px solid var(--border, #c5d0e0);
  background: #fff;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 8.5pt;
  cursor: pointer;
}
.nexvol-up:disabled { opacity: 0.4; cursor: default; }
.nexvol-path {
  flex: 1;
  min-width: 120px;
  font-size: 8pt;
  word-break: break-all;
  background: #f8fafc;
  padding: 4px 8px;
  border-radius: 4px;
}
.nexvol-search {
  width: 160px;
  border: 1px solid var(--border, #c5d0e0);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 8.5pt;
}
.nexvol-cap-bar {
  position: relative;
  height: 22px;
  margin: 8px 12px 0;
  border-radius: 6px;
  background: #e2e8f0;
  overflow: hidden;
}
.nexvol-cap-bar--waste { background: #fde68a; }
.nexvol-cap-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  opacity: 0.55;
}
.nexvol-cap-bar--waste .nexvol-cap-fill { background: linear-gradient(90deg, #f59e0b, #d97706); }
.nexvol-cap-label {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 10px;
  font-size: 7.5pt;
  font-weight: 600;
  color: var(--text, #1a2744);
}
.nexvol-error {
  margin: 8px 12px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 8.5pt;
}
.nexvol-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 8px 24px;
}
.nexvol-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
  border: 1px solid transparent;
  margin-bottom: 2px;
}
.nexvol-item:hover {
  border-color: rgba(37, 99, 235, 0.25);
  background: rgba(37, 99, 235, 0.04);
}
.nexvol-item--dir .nexvol-item-name { font-weight: 600; }
.nexvol-item-ico { font-size: 12pt; text-align: center; }
.nexvol-item-name { font-size: 9pt; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nexvol-item-meta { font-size: 7.5pt; color: var(--text-muted, #5b6b85); white-space: nowrap; }
.nexvol-loading, .nexvol-empty, .nexvol-preview-empty {
  padding: 24px 16px;
  font-size: 9pt;
  color: var(--text-muted, #5b6b85);
  text-align: center;
}
.nexvol-preview {
  border-left: 1px solid var(--border-light, #e2e8f0);
  background: #fff;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.nexvol-preview-hdr {
  padding: 12px;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
}
.nexvol-preview-title { font-weight: 700; font-size: 10pt; word-break: break-all; }
.nexvol-preview-meta { font-size: 7.5pt; color: var(--text-muted, #5b6b85); margin-top: 2px; }
.nexvol-preview-open {
  display: inline-block;
  margin-top: 8px;
  font-size: 8.5pt;
  color: var(--accent, #2563eb);
}
.nexvol-preview-text {
  margin: 0;
  padding: 12px;
  font-size: 8pt;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  flex: 1;
  overflow: auto;
  background: #f8fafc;
}
.nexvol-preview-img {
  max-width: 100%;
  height: auto;
  padding: 12px;
  object-fit: contain;
}
@media (max-width: 960px) {
  .nexvol-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .nexvol-sidebar, .nexvol-preview {
    border: 0;
    border-bottom: 1px solid var(--border-light, #e2e8f0);
    max-height: 220px;
  }
}
