/* NOS Channel UI — Nexus publication slate (SmartDOC standard; retired: light-blue #f4f7fc) */
/* Shared Nexus N2.1 template: ../nos-templates/assets/nexus-n21-browser.css (trunk link in index.html) */
:root {
  --bg:         #ffffff;
  --card:       #ffffff;
  --border:     #e2e8f0;
  --border-lt:  #e2e8f0;
  --text:       #1e293b;
  --text-sec:   #334155;
  --muted:      #64748b;
  --accent:     #3b82f6;
  --danger:     #dc2626;
  --success:    #16a34a;
  --amber:      #f59e0b;
  --dark:       #1a2744;
}

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

/* ── Channel Admin scroll window (/ch/admin) ─────────────────────────── */
.admin-scroll-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.admin-scroll-sessions {
  flex: 1;
  min-height: calc(80vh - 22rem);
  max-height: calc(80vh - 14rem);
}

/* ── L00 shells — /ch/admin + /ch producer console ───────────────────── */
.ch-admin-l00-body,
.ch-producer-l00-body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f4f7fc;
  border-style: solid;
  border-color: rgba(30, 58, 95, 0.1);
}
.ch-admin-frame,
.ch-producer-frame {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  color: #1a2744;
}
.ch-admin-actions,
.ch-producer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
  padding: 8px 1.25rem;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}
.ch-admin-back-link,
.ch-producer-admin-link {
  color: #3b82f6;
  font-size: 8pt;
  text-decoration: none;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.ch-admin-back-link:hover,
.ch-producer-admin-link:hover { text-decoration: underline; }
.ch-admin-tabbar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(30, 58, 95, 0.12);
  background: #fff;
  padding: 0 2rem;
  flex-shrink: 0;
}
.ch-admin-footer-note,
.ch-producer-footer-note {
  text-align: center;
  font-size: 7pt;
  color: #94a3b8;
  padding: 0 0 1.5rem;
  letter-spacing: 0.3px;
}
.ch-producer-footer-note { padding: 2rem 0 0.5rem; }
.ch-producer-main {
  display: flex;
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}
.ch-admin-l00-body .admin-scroll-sessions {
  min-height: 0;
  max-height: none;
}

/* ── Channel catalog (producer + PMC dashboard) ─────────────────────── */
.ch-producer-catalog-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.ch-producer-catalog-title {
  font-size: 8pt;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #4a6080;
  white-space: nowrap;
}
.ch-producer-search-wrap {
  flex: 1;
  max-width: 380px;
  position: relative;
}
.ch-producer-search-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 9pt;
  pointer-events: none;
}
.ch-producer-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 10px 6px 28px;
  background: #fff;
  border: 1px solid rgba(30, 58, 95, 0.15);
  border-radius: 6px;
  font-size: 8pt;
  color: var(--text);
  font-family: inherit;
}
.ch-producer-filter-hint {
  font-size: 7.5pt;
  color: var(--muted);
}
.ch-catalog-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.ch-catalog-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ch-catalog-sort-label {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 8pt;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
}
.ch-catalog-sort-btn {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 7.5pt;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid rgba(30, 58, 95, 0.15);
  border-radius: 5px;
  cursor: pointer;
  background: #fff;
  color: #4a6080;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.ch-catalog-sort-btn:hover {
  background: #f0f4fa;
}
.ch-catalog-sort-btn.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}
.ch-catalog-count {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 7.5pt;
  color: #94a3b8;
  margin-left: auto;
}
.ch-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1rem;
}
.ch-catalog-grid--producer {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.ch-catalog-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ch-catalog-empty {
  padding: 2.5rem;
  text-align: center;
  color: #94a3b8;
  font-size: 9pt;
}
.ch-catalog-fav-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14pt;
  line-height: 1;
  color: #f59e0b;
  padding: 2px 4px;
  flex-shrink: 0;
}
.ch-catalog-fav-btn:hover { opacity: 0.8; }
.ch-catalog-badge {
  display: inline-block;
  background: #1e3a5f;
  color: #fff;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 7.5pt;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 4px;
}
.ch-catalog-badge--row {
  font-size: 8pt;
  padding: 3px 10px;
}
.ch-catalog-tile {
  background: #fff;
  border: 1px solid rgba(30, 58, 95, 0.12);
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 6px rgba(10, 22, 40, 0.04);
}
.ch-catalog-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ch-catalog-tile-name {
  font-size: 11pt;
  font-weight: 800;
  color: #0a1628;
  line-height: 1.3;
}
.ch-catalog-tile-meta {
  font-size: 7pt;
  color: #94a3b8;
  font-family: 'SF Mono', monospace;
  margin-top: 2px;
}
.ch-catalog-tile-stats {
  display: flex;
  gap: 8px;
}
.ch-catalog-stat {
  background: #f4f7fc;
  border-radius: 5px;
  padding: 6px 12px;
  text-align: center;
  flex: 1;
}
.ch-catalog-stat-val {
  font-size: 14pt;
  font-weight: 800;
  color: #1e3a5f;
}
.ch-catalog-stat-lbl {
  font-size: 6.5pt;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #4a6080;
}
.ch-catalog-tile-expiry {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ch-catalog-tile-expiry span {
  background: #f4f7fc;
  border: 1px solid rgba(30, 58, 95, 0.1);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 7pt;
  font-weight: 700;
  color: #4a6080;
  text-transform: uppercase;
}
.ch-catalog-open-btn {
  display: block;
  background: #1e3a5f;
  color: #fff;
  text-align: center;
  padding: 9px 0;
  border-radius: 6px;
  font-size: 8.5pt;
  font-weight: 700;
  text-decoration: none;
  margin-top: auto;
}
.ch-catalog-open-btn--row {
  margin-top: 0;
  padding: 8px 16px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ch-catalog-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid rgba(30, 58, 95, 0.1);
  border-radius: 8px;
}
.ch-catalog-row-main {
  flex: 1;
  min-width: 0;
}
.ch-catalog-row-name {
  font-size: 10pt;
  font-weight: 700;
  color: #1a2744;
}
.ch-catalog-row-meta {
  font-size: 7.5pt;
  color: #94a3b8;
  font-family: 'SF Mono', monospace;
  margin-top: 2px;
}
.ch-catalog-lc-wrap {
  position: relative;
}
.ch-catalog-lc-fav {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}
.ch-catalog-lc-wrap--row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ch-catalog-lc-wrap--row .ch-catalog-lc-row,
.ch-catalog-lc-wrap--row .ch-catalog-lc-tile {
  flex: 1;
}
.ch-catalog-lc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid rgba(30, 58, 95, 0.1);
  border-radius: 8px;
  flex: 1;
}

/* ── Page-level theme overrides ─────────────────────────────────────────
   Set data-theme="<name>" on the page root div to override CSS variables
   for that surface. This is the ONLY correct escape hatch.
   CSS custom properties inherit, so all descendants get the right palette
   without touching global state.
   WHY THIS KEEPS COMING UP: without this block, every new page either
   (a) uses var() and gets NOS blues, or (b) hardcodes palette values and
   accidentally re-uses NOS blues. The fix: declare the theme once here,
   use var() everywhere. ──────────────────────────────────────────────── */

/* ── space: star chart / navigation surfaces (STARMAP, future nav tools) */
[data-theme="space"] {
  --bg:        #000208;
  --text:      #e8f4ff;
  --text-sec:  rgba(232,244,255,0.62);
  --muted:     rgba(232,244,255,0.28);
  --accent:    #38bdf8;
  --border:    rgba(56,189,248,0.20);
  --border-lt: rgba(56,189,248,0.09);
  --dark:      #000000;
  color:      var(--text);
  background: var(--bg);
}
html, body {
  width: 100%; height: 100%;
  margin: 0; padding: 0;
  overflow: hidden;
  font-family: 'Inter', system-ui, sans-serif;
}

/* ── Layout ──────────────────────────────────────────────────────────── */
/* LOCKED TEMPLATE — PMC root. Must fill 100% of viewport, no outer margins. */
.channel-app {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

/* ── NOS 2.1 L00 clearing (investor publication / sovereign.AI/NOS-VIP) ─ */
.nos-canvas-l00 {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  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;
}
.nos-canvas-l00-desktop {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 14px 18px 12px;
}
[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-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(--dark);
  letter-spacing: 0.3px;
}
.nos-canvas-l00-lab-title p {
  margin-top: 4px;
  font-size: 7.5pt;
  color: var(--muted);
}
.nos-canvas-l00-vanity-link {
  margin-left: auto;
  font-size: 7pt;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fafc;
}
.nos-canvas-l00-vanity-link:hover { text-decoration: underline; }
.nos-canvas-l00-layer-badge {
  font-size: 7pt;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--accent);
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.nos-canvas-l00-desktop-body {
  flex: 1;
  position: relative;
  min-height: 0;
  margin-top: 8px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.ch-guide-l00-body .channel-app--l00 {
  width: 100%;
  height: 100%;
  max-height: 100%;
}
.channel-app--l00 .main-layout {
  min-height: 0;
}
.main-layout--l00-pub {
  --nos-l00-sidebar-w: 12vw;
  --nos-l00-preview-w: 42vw;
  --nos-l00-center-max: 30vw;
  position: relative;
  display: flex;
  flex-direction: row;
  flex: 1;
  min-height: 0;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}
.main-layout--l00-pub.l00-pub-resizing {
  user-select: none;
  cursor: col-resize;
}
.main-layout--l00-pub.l00-pub-resizing .sidebar-overlay {
  transition: none;
}
.main-layout--l00-pub.l00-pub-resizing .content-area,
.main-layout--l00-pub.l00-pub-resizing .publication-preview-frame,
.main-layout--l00-pub.l00-pub-resizing .recipient-preview-frame {
  pointer-events: none;
}
.main-layout--l00-pub.l00-pub-resizing .sidebar-overlay,
.main-layout--l00-pub.l00-pub-resizing .publication-doc-index,
.main-layout--l00-pub.l00-pub-resizing .l00-preview-column,
.main-layout--l00-pub.l00-pub-resizing .recipient-preview-rail,
.main-layout--l00-pub.l00-pub-resizing .publication-preview-rail {
  transition: none;
}
/* Guide/catalog — center flexes between left PMC sidebar and right mirror */
.main-layout--l00-pub:not(.main-layout--l00-viewer) .content-area {
  flex: 1 1 auto;
  width: auto;
  max-width: none;
  min-width: 200px;
  overflow: auto;
  padding-right: 6px;
  box-sizing: border-box;
}
.main-layout--l00-pub .sidebar-overlay.open.sidebar-overlay--l00-resize {
  flex: 0 0 var(--nos-l00-sidebar-w, 18vw);
  width: var(--nos-l00-sidebar-w, 18vw);
  min-width: 160px;
  max-width: 45vw;
}
.channel-app--l00 .sidebar-overlay {
  position: relative;
  flex-shrink: 0;
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}
.channel-app--l00 .sidebar-overlay.open {
  min-width: 180px;
}
.channel-app--l00 .sidebar-overlay:not(.open) {
  width: 0 !important;
  min-width: 0 !important;
  opacity: 0;
  pointer-events: none;
}
.channel-app--l00 .sidebar-overlay:not(.open) .sb-resize-handle,
.channel-app--l00 .sb-resize-handle,
.channel-app--l00 .pub-preview-resize-handle {
  display: none !important;
}
/* Overlay gutters — zero flex footprint; sit on column edges */
.channel-app--l00 .sidebar-overlay.open {
  position: relative;
}
.l00-col-gutter {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
  touch-action: none;
  background: transparent;
  z-index: 45;
  user-select: none;
}
.l00-col-gutter:hover,
.l00-col-gutter--active {
  background: rgba(59, 130, 246, 0.35);
}
.l00-col-gutter--sidebar {
  right: -3px;
}
.l00-col-gutter--preview {
  left: 0;
  transform: translateX(-50%);
}
.channel-app--l00 .l00-preview-column,
.channel-app--l00 .publication-preview-rail {
  position: relative;
  isolation: isolate;
}
.main-layout--l00-pub .l00-preview-column,
.main-layout--l00-pub .publication-preview-rail {
  position: relative;
  flex: 0 0 var(--nos-l00-preview-w, 42vw);
  width: var(--nos-l00-preview-w, 42vw);
  min-width: 240px;
  max-width: 55vw;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  background: #f8fafc;
  box-sizing: border-box;
}
.l00-preview-column .recipient-preview-rail.open {
  flex: 1;
  width: 100%;
  min-width: 0;
  border-left: none;
  background: transparent;
}
.l00-col-gutter--preview {
  z-index: 50;
}
.publication-preview-rail {
  position: relative;
  flex-shrink: 0;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--border);
  background: #f8fafc;
}

.publication-preview-hdr {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #1e3a5f 0%, #152a45 100%);
}
.publication-preview-title {
  font-size: 8pt;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f8fafc;
}
.publication-preview-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  overflow: hidden;
}
.publication-preview-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  font-size: 9pt;
}
.publication-preview-label {
  font-size: 7.5pt;
  color: var(--muted);
  font-family: var(--mono, ui-monospace, monospace);
}
.publication-preview-open,
.doc-list-open-tab,
.doc-card-open-tab {
  flex-shrink: 0;
  font-size: 8pt;
  font-weight: 800;
  padding: 5px 12px;
  border: 1px solid #1d4ed8;
  border-radius: 6px;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(29, 78, 216, 0.28);
}
.publication-preview-open:hover,
.doc-list-open-tab:hover,
.doc-card-open-tab:hover {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
}
.publication-preview-frame {
  flex: 1;
  min-height: 200px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.publication-preview-empty {
  font-size: 8pt;
  color: var(--muted);
  line-height: 1.4;
  padding: 16px 12px;
}

/* ── Publication doc index (left rail — recipient + operator) ───── */
.publication-doc-index {
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #f8fafc;
  border-right: 1px solid var(--border);
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}
.publication-doc-index:not(.open) {
  width: 0 !important;
  min-width: 0 !important;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}
.main-layout--l00-pub .publication-doc-index.open.publication-doc-index--l00-resize {
  flex: 0 0 var(--nos-l00-sidebar-w, 12vw);
  width: var(--nos-l00-sidebar-w, 12vw);
  min-width: 160px;
  max-width: 45vw;
}
.pub-index-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #1e3a5f 0%, #152a45 100%);
  flex-shrink: 0;
}
.pub-index-title {
  font-size: 8.5pt;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f8fafc;
}
.pub-index-sub {
  font-size: 7pt;
  color: rgba(248, 250, 252, 0.72);
  margin-top: 2px;
}
.pub-index-collapse,
.recipient-preview-collapse {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 10pt;
  cursor: pointer;
  line-height: 1;
}
.pub-index-collapse:hover,
.recipient-preview-collapse:hover {
  background: rgba(255, 255, 255, 0.22);
}
.pub-index-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}
.pub-index-empty {
  font-size: 8pt;
  color: var(--muted);
  padding: 14px 12px;
}
.pub-index-tile,
.pub-index-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  margin: 0;
  text-decoration: none;
  color: inherit;
  border: none;
  border-left: 3px solid transparent;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.pub-index-tile + .pub-index-tile,
.pub-index-tile + a.pub-index-tile,
a.pub-index-tile + .pub-index-tile,
a.pub-index-tile + a.pub-index-tile {
  border-top: 1px solid rgba(30, 58, 95, 0.08);
}
.pub-index-tile:hover,
.pub-index-item:hover {
  background: rgba(59, 130, 246, 0.06);
}
.pub-index-tile.active,
.pub-index-item.active {
  background: rgba(30, 58, 95, 0.08);
  border-left-color: #1e3a5f;
}
.pub-index-seq {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #1e3a5f;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9pt;
  font-weight: 800;
  box-shadow: 0 1px 4px rgba(30, 58, 95, 0.28);
}
.pub-index-tile.active .pub-index-seq,
.pub-index-item.active .pub-index-seq {
  background: #1d4ed8;
}
.pub-index-tile-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.pub-index-label {
  font-size: 8pt;
  font-weight: 700;
  line-height: 1.35;
}
.pub-index-desc {
  font-size: 7pt;
  color: var(--muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pub-index-float-btn,
.recipient-mirror-float-btn {
  position: absolute;
  top: 14px;
  z-index: 201;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  border: 1px solid #1d4ed8;
  color: #fff;
  border-radius: 6px;
  padding: 5px 11px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.25);
}
.pub-index-float-btn { left: 14px; }
.recipient-mirror-float-btn { right: 14px; }

/* ── Recipient preview rail (inside .l00-preview-column) ─────────── */
.recipient-preview-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  width: 100%;
}
.recipient-preview-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #1e3a5f 0%, #152a45 100%);
  flex-shrink: 0;
}
.recipient-preview-title {
  font-size: 8pt;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f8fafc;
}
.recipient-preview-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.recipient-preview-producer-btn,
.recipient-preview-mirror-btn {
  flex-shrink: 0;
  font-size: 8pt;
  font-weight: 800;
  padding: 5px 12px;
  border: 1px solid #1d4ed8;
  border-radius: 6px;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(29, 78, 216, 0.28);
}
.recipient-preview-producer-btn:hover,
.recipient-preview-mirror-btn:hover {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
}
.recipient-preview-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  overflow: hidden;
}
.recipient-preview-body--mirror-only {
  gap: 0;
  padding: 8px 10px 10px;
}
.recipient-preview-body--mirror-only .recipient-preview-frame {
  min-height: 280px;
}
.recipient-preview-index {
  flex-shrink: 0;
  border: 1px solid rgba(30, 58, 95, 0.12);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}
.recipient-preview-index-label {
  margin: 0;
  padding: 6px 10px;
  font-size: 7pt;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  background: rgba(30, 58, 95, 0.04);
  border-bottom: 1px solid rgba(30, 58, 95, 0.08);
}
.pub-index-scroll--compact {
  max-height: 220px;
  overflow-y: auto;
}
.pub-index-scroll--compact .pub-index-tile {
  padding: 7px 10px;
}
.pub-index-scroll--compact .pub-index-seq {
  width: 26px;
  height: 26px;
  font-size: 8pt;
}
.pub-index-scroll--compact .pub-index-label {
  font-size: 7.5pt;
}
.recipient-preview-empty--inline {
  flex: 1;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
}
.recipient-preview-doc-title,
.recipient-preview-meta {
  font-size: 9pt;
}
.recipient-preview-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.recipient-preview-frame {
  flex: 1;
  min-height: 200px;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.recipient-preview-empty {
  font-size: 8pt;
  color: var(--muted);
  padding: 16px 12px;
  line-height: 1.45;
}
.recipient-preview-producer-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.producer-panel--embedded {
  position: relative !important;
  width: 100% !important;
  flex: 1;
  min-height: 0;
  border-left: none;
}
.producer-panel--embedded.open {
  width: 100% !important;
}
.producer-panel--embedded .rp-body .btn-primary {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  border: 1px solid #1d4ed8;
  color: #fff;
}
.producer-panel--embedded .rp-body .btn-outline {
  background: #fff;
  color: #1e3a5f;
  border: 1px solid #1e3a5f;
}

/* Recipient read chrome — center column grows (no right rail) */
.channel-app--recipient .main-layout--l00-pub .content-area {
  flex: 1 1 auto;
  width: auto;
  max-width: none;
}

/* Doc viewer (nexus-dev / publication channels) — center is LiveDOC body, not catalog list.
   Guide page keeps narrow center + wide preview; viewer inverts: reading column grows. */
.main-layout--l00-pub.main-layout--l00-viewer .content-area {
  flex: 1 1 auto;
  width: auto;
  max-width: none;
  min-width: min(280px, 36vw);
}
.main-layout--l00-pub.main-layout--l00-viewer .l00-preview-column {
  flex: 0 0 var(--nos-l00-preview-w, 32vw);
  width: var(--nos-l00-preview-w, 32vw);
  min-width: 200px;
  max-width: min(var(--nos-l00-preview-w, 32vw), 42vw);
}
.main-layout--l00-pub.main-layout--l00-viewer .publication-doc-index.open.publication-doc-index--l00-resize {
  flex: 0 0 var(--nos-l00-sidebar-w, 12vw);
  width: var(--nos-l00-sidebar-w, 12vw);
}

/* NOS 2.1 channel doc viewer — SPA owns chrome; strip duplicate in-doc shell.
   Render profile: ch-tpl-nexus-n21 (nos-render-template-registry-v1.json).
   Ingest may carry livedoc_shell markup; display-time prepare strips <style> + noise. */
.channel-app--doc-viewer .ch-doc-body.ch-tpl-nexus-n21 .livedoc-nav-tools,
.channel-app--doc-viewer .ch-doc-body.ch-tpl-nexus-n21 #livedoc-nextran-banner,
.channel-app--doc-viewer .ch-doc-body.ch-tpl-nexus-n21 .livedoc-gold-rule {
  display: none !important;
}
.channel-app--doc-viewer .ch-doc-body.ch-tpl-nexus-n21 .header {
  display: none !important;
}
.guide-recipient-read-hint {
  margin: 24px 0;
  padding: 20px 22px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.18);
  font-size: 9pt;
  color: #1e3a5f;
  line-height: 1.5;
}

/* Guide — recipient center reader (#2) */
.guide-pub-reader-channel-hdr {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(30, 58, 95, 0.12);
}
.guide-pub-reader-channel-hdr__kicker {
  font-size: 7pt;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin: 0 0 4px;
}
.guide-pub-reader-channel-hdr__title {
  font-size: 13pt;
  font-weight: 800;
  color: #1e3a5f;
  margin: 0 0 6px;
  line-height: 1.25;
}
.guide-pub-reader-channel-hdr__note {
  font-size: 8.5pt;
  color: #4a6080;
  line-height: 1.5;
  margin: 0;
}
.guide-pub-reader {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.guide-pub-reader__hdr {
  flex-shrink: 0;
}
.guide-pub-reader__title {
  font-size: 10pt;
  font-weight: 800;
  color: #1e3a5f;
  margin: 0;
}
.guide-pub-reader__label {
  font-size: 7.5pt;
  color: var(--muted);
  margin: 4px 0 0;
}
.guide-pub-reader__frame {
  flex: 1;
  min-height: 360px;
  width: 100%;
  border: 1px solid rgba(30, 58, 95, 0.15);
  border-radius: 8px;
  background: #fff;
}
.guide-pub-reader-empty {
  flex: 1;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 24px;
  border: 1px dashed rgba(30, 58, 95, 0.2);
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.8);
}
.guide-pub-reader-empty__title {
  font-size: 11pt;
  font-weight: 800;
  color: #1e3a5f;
  margin: 0 0 8px;
}
.guide-pub-reader-empty__body {
  font-size: 9pt;
  color: #4a6080;
  line-height: 1.5;
  margin: 0;
  max-width: 22rem;
}
.channel-app--recipient .content-inner {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.channel-app--recipient .main-layout--l00-pub .content-area {
  flex: 1 1 auto;
  width: auto;
  max-width: none;
  display: flex;
  flex-direction: column;
}

.doc-list-row-select {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.doc-list-wrap--drag-over .doc-list-row {
  outline: 2px dashed var(--accent);
  outline-offset: 2px;
}
.doc-list-wrap--dragging {
  opacity: 0.55;
}
.doc-list-row--active {
  background: rgba(59, 130, 246, 0.08);
  outline: 1px solid rgba(59, 130, 246, 0.25);
}
.doc-card--select {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
}
.nos-canvas-l00-desktop--pub {
  padding-bottom: 0;
}

/* ── 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;
}
.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-inner {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}

.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;
}
.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;
}
.nos-doc-strip-tool--active {
  background: rgba(59, 130, 246, 0.28);
  border-color: #93c5fd;
  color: #fff;
}
.nos-doc-strip-icon { font-size: 16pt; line-height: 1; }
.nos-doc-strip-label {
  font-size: 6.5pt;
  font-family: 'SF Mono', 'Fira Code', monospace;
  letter-spacing: 0.2px;
  color: rgba(226, 232, 240, 0.92);
}
.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;
}
.nos-doc-strip-thumb-mon {
  font-size: 5.5pt;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent);
}
.nos-doc-strip-thumb-day {
  font-size: 12pt;
  font-weight: 900;
  color: var(--dark);
}
.nos-doc-strip-thumb-time {
  font-size: 8pt;
  font-weight: 800;
  color: var(--dark);
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.nos-doc-strip-thumb-ampm {
  font-size: 5pt;
  font-weight: 700;
  color: var(--muted);
}
.nos-doc-strip-thumb--journal { font-size: 14pt; line-height: 1; }
.nos-doc-strip-tool--osref { border-color: rgba(239, 68, 68, 0.25) !important; }
.nos-doc-strip-tool--osref.recording { animation: nos-osref-pulse 1s ease infinite; }
@keyframes nos-osref-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}
.nos-l00-pub-float-host {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
}
.nos-l00-pub-float-panel {
  pointer-events: auto;
  position: fixed;
  right: 24px;
  bottom: 108px;
  width: 280px;
  max-height: 50vh;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.2);
  padding: 12px;
  z-index: 41;
}
.nos-l00-pub-float-panel--wide { width: min(520px, 92vw); }
.nos-l00-pub-float-close {
  float: right;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12pt;
  padding: 2px 6px;
}

/* ── NexPROTECT Banner — N2 light chrome (retired N1 navy gradient) ─── */
.protect-banner {
  background: linear-gradient(180deg, #1e3a5f 0%, #152a45 100%);
  color: #e2e8f0;
  padding: 8px 16px;
  font-size: 8pt;
  font-family: 'SF Mono', 'Fira Code', monospace;
  letter-spacing: 0.4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(147, 197, 253, 0.28);
  box-shadow: 0 2px 8px rgba(10, 22, 40, 0.18);
}
.protect-banner strong { color: #dbeafe; }
.protect-banner .holder { color: #cbd5e1; }
.protect-banner__tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  width: 100%;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 8.5pt;
  font-family: 'SF Mono', 'Fira Code', monospace;
  letter-spacing: 0.3px;
  min-width: 0;
  flex: 1 1 auto;
}
.breadcrumb__link {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.breadcrumb__link:hover {
  color: #fff;
  text-decoration: underline;
}
.breadcrumb__starmap {
  font-size: 10pt;
  line-height: 1;
}
.breadcrumb__sep {
  color: rgba(255, 255, 255, 0.42);
  font-weight: 400;
  user-select: none;
}
.breadcrumb__parent {
  color: #bfdbfe;
  font-weight: 500;
  white-space: nowrap;
}
.breadcrumb__current {
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}
.breadcrumb__doc {
  max-width: min(320px, 40vw);
  overflow: hidden;
  text-overflow: ellipsis;
}
.protect-banner .admin-panel-btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
  color: #e2e8f0;
}
.protect-banner .admin-panel-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.protect-banner .admin-panel-btn.active {
  background: rgba(59, 130, 246, 0.35);
  color: #fff;
  border-color: rgba(147, 197, 253, 0.45);
}
/* ── Main layout: sidebar + content ───────────────────────────────── */
.main-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* ── Sidebar ─────────────────────────────────────────────────────── */
/* Default: pinned mode — sidebar is a flex child that pushes content.  */
/* On mobile (<768px): reverts to absolute overlay with blur backdrop.   */
.sidebar-overlay {
  width: 0;
  overflow: hidden;
  background: #fff;
  border-right: 2px solid var(--border-lt);
  transition: width 0.25s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.sidebar-overlay.open {
  width: 18vw;
}
/* Floating trigger — always visible at top-left of main-layout */
.sb-float-btn {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 201;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(30,58,95,0.18);
  border-radius: 6px;
  padding: 5px 11px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-sec);
  box-shadow: 0 2px 8px rgba(10,22,40,0.10);
  line-height: 1;
  transition: background 0.15s;
}
.sb-float-btn:hover { background: var(--bg); }
/* Backdrop — desktop: no backdrop needed (pinned). Mobile: blur overlay. */
.sb-backdrop {
  display: none;
}
/* Mobile: sidebar becomes absolute overlay with blur backdrop */
@media (max-width: 768px) {
  .sidebar-overlay {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    z-index: 200;
    box-shadow: 0 0 0 rgba(0,0,0,0);
  }
  .sidebar-overlay.open {
    box-shadow: 4px 0 28px rgba(10,22,40,0.22);
  }
  .sb-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 199;
    background: rgba(10,22,40,0.12);
    backdrop-filter: blur(1px);
  }
}

.sb-header {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border-lt);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-shrink: 0;
}
.sb-brand {
  font-size: 11pt;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
}
.sb-brand .acc { color: var(--amber); }
.sb-subtitle {
  font-size: 6.5pt;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
  font-weight: 600;
}
.sb-toggle {
  background: none;
  border: none;
  color: var(--text-sec);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 6px;
  border-radius: 4px;
}
.sb-toggle:hover { background: var(--border-lt); }

/* Admin toggle button — only visible to owner */
.admin-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-lt);
  width: 100%;
  cursor: pointer;
  font-size: 8pt;
  font-weight: 700;
  color: var(--text-sec);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: background 0.15s;
  flex-shrink: 0;
}
.admin-toggle-btn:hover { background: rgba(59,130,246,0.06); }
.admin-toggle-btn.active { background: rgba(59,130,246,0.1); color: var(--accent); }
.admin-toggle-btn .gear { font-size: 12px; }

/* Hint text below header — tells user how to dismiss */
.sb-hint {
  padding: 4px 14px 8px;
  font-size: 6.5pt;
  color: var(--muted);
  border-bottom: 1px solid var(--border-lt);
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

.sb-docs {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 12px;
}
.sb-docs::-webkit-scrollbar { width: 4px; }
.sb-docs::-webkit-scrollbar-thumb { background: rgba(176,208,248,0.3); border-radius: 2px; }

.sb-doc-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
  margin-bottom: 2px;
  border-left: 2px solid transparent;
}
.sb-doc-item:hover { background: rgba(176,208,248,0.12); }
.sb-doc-item.active { background: rgba(59,130,246,0.1); border-left-color: var(--accent); }
.sb-seq {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(59,130,246,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 7.5pt; font-weight: 800; color: var(--accent);
  flex-shrink: 0; margin-top: 1px;
}
.sb-doc-item.active .sb-seq { background: var(--accent); color: #fff; }
.sb-doc-title { font-size: 8pt; font-weight: 600; line-height: 1.3; }

/* ── Sidebar Glossary ────────────────────────────────────────────── */
/* Flex child: fills remaining space below doc list.                    */
/* min-height: 33vh ensures glossary is always ≥1/3 of sidebar height.  */
/* Grows to fill if doc list is short; shrinks if doc list is long.      */
.sb-glossary {
  display: flex;
  flex-direction: column;
  min-height: 33vh;
  flex: 1 1 auto;
  overflow: hidden;
}
.sb-glossary::before {
  content: '';
  display: block;
  width: 80%;
  height: 1px;
  background: var(--border-lt);
  margin: 0 auto;
}
.sb-glossary-header {
  padding: 8px 14px 4px;
  font-size: 6.5pt;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
}
.sb-glossary-terms {
  flex: 1;
  overflow-y: auto;
  padding: 0 10px 10px;
}
.sb-glossary-terms::-webkit-scrollbar { width: 5px; }
.sb-glossary-terms::-webkit-scrollbar-track { background: rgba(176,208,248,0.08); }
.sb-glossary-terms::-webkit-scrollbar-thumb { background: #1e3a5f; border-radius: 3px; }
.sb-glossary-terms::-webkit-scrollbar-thumb:hover { background: #3b82f6; }
.sb-term {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 4px 6px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 4px;
  text-align: left;
  transition: background 0.12s;
  font-family: inherit;
}
.sb-term:hover { background: rgba(176,208,248,0.12); }
.sb-term.active { background: rgba(59,130,246,0.1); }
.sb-term-abbrev {
  font-family: 'SF Mono', monospace;
  font-size: 7pt;
  font-weight: 800;
  color: var(--accent);
  min-width: 52px;
}
.sb-term-name {
  font-size: 7pt;
  color: var(--text-sec);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sb-term-def {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease, padding 0.2s;
  font-size: 7pt;
  color: var(--muted);
  line-height: 1.5;
  padding: 0 6px 0 58px;
}
.sb-term-def.open {
  max-height: 120px;
  padding: 2px 6px 8px 58px;
}

/* ── Sidebar resize handle ─────────────────────────────────────── */
.sb-resize-handle {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 4px;
  cursor: col-resize;
  background: transparent;
  z-index: 10;
  transition: background 0.15s;
}
.sb-resize-handle:hover,
.sb-resize-handle:active {
  background: var(--accent);
}

/* ── Sidebar auto-resize section layout ─────────────────────────────────
   Sections list scrolls as a whole (overflow-y:auto).
   Open sections take natural height, capped at 35vh with internal scroll.
   Closed sections are compact. */
.sb-sections-scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;           /* whole sections list scrollable */
}

/* ── Accordion section (SidebarSection) ───────────────── */
/* Closed: compact, sinks to bottom of the flex column */
.sb-section {
  border-bottom: 1px solid var(--border-lt);
  order: 2;
  flex-shrink: 0;
}
/* Open: natural height, capped by body max-height */
.sb-section.open {
  order: 1;
  flex-shrink: 0;
}
.sb-section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 7.5pt;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-sec);
  transition: background 0.12s;
  flex-shrink: 0;             /* header never shrinks */
}
.sb-section-header:hover { background: rgba(176,208,248,0.08); }
.sb-section-icon { font-size: 11px; }
.sb-section-title-wrap { flex: 1; text-align: left; display: flex; flex-direction: column; }
.sb-section-title { }
.sb-section-subtitle {
  font-size: 6.5pt;
  font-variant: small-caps;
  letter-spacing: 0.5px;
  color: var(--muted);
  font-weight: 500;
  text-transform: lowercase;
  line-height: 1.2;
}
.sb-section-count {
  font-size: 6.5pt;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.sb-chevron {
  font-size: 11px;
  font-weight: 600;
  transition: transform 0.2s;
  transform: rotate(0deg);
}
.sb-chevron.open {
  transform: rotate(90deg);
}
/* Closed body: hidden, takes no space */
.sb-section-body {
  display: none;
}
/* Open body: auto height up to 35vh, then internal scroll */
.sb-section-body.open {
  display: block;
  max-height: 35vh;
  overflow-y: auto;
}
.sb-section-body.open::-webkit-scrollbar { width: 4px; }
.sb-section-body.open::-webkit-scrollbar-track { background: rgba(176,208,248,0.06); }
.sb-section-body.open::-webkit-scrollbar-thumb { background: #1e3a5f; border-radius: 3px; }

/* ── Shared panel styles ─────────────────────────────────────── */
.sb-panel-loading {
  padding: 10px 12px;
  font-size: 8pt;
  color: var(--muted);
}
.sb-panel-empty {
  padding: 10px 12px;
  font-size: 8pt;
  color: var(--muted);
  font-style: italic;
}
.sb-panel-add-btn {
  display: block;
  width: calc(100% - 16px);
  margin: 6px 8px 8px;
  padding: 5px 10px;
  border: 1px dashed rgba(59,130,246,0.3);
  border-radius: 4px;
  background: none;
  color: var(--accent);
  font-size: 7.5pt;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}
.sb-panel-add-btn:hover { background: rgba(59,130,246,0.06); }

/* ── Revisions panel ─────────────────────────────────────────── */
.sb-revisions-panel { padding: 2px 0 6px; }
.sb-rev-manifest {
  margin: 4px 10px 8px;
  padding: 6px 8px;
  border-radius: 5px;
  background: rgba(245,158,11,0.10);
  border: 1px solid rgba(245,158,11,0.25);
  color: #92400e;
  font-size: 7pt;
  font-family: 'SF Mono', 'Fira Code', monospace;
  line-height: 1.35;
}
.sb-rev-group { border-top: 1px solid rgba(30,58,95,0.12); }
.sb-rev-group-header {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 10px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 8pt;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.sb-rev-group-header:hover { background: rgba(176,208,248,0.06); }
.sb-rev-chevron {
  display: inline-block;
  font-size: 10pt;
  color: var(--muted);
  transition: transform 0.15s;
  transform: rotate(0deg);
}
.sb-rev-chevron.open { transform: rotate(90deg); }
.sb-rev-group-count { margin-left: auto; color: var(--muted); font-size: 7pt; font-weight: 500; }
.sb-rev-group-body { display: none; padding-bottom: 4px; }
.sb-rev-group-body.open { display: block; }
.sb-rev-entry {
  padding: 5px 10px 5px 22px;
  border-left: 2px solid rgba(59,130,246,0.15);
  margin: 0 8px 4px 12px;
}
.sb-rev-entry-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.sb-rev-entry-date {
  font-size: 7pt;
  color: var(--muted);
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.sb-rev-lane {
  font-size: 6pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(30,58,95,0.10);
  color: #4a6080;
}
.sb-rev-lane--livebox-rev { background: rgba(6,182,212,0.12); color: #0e7490; }
.sb-rev-lane--particle-rev { background: rgba(245,158,11,0.12); color: #b45309; }
/* ── Approvals todo queue (sidebar_approvals.rs) ───────────────────── */
.sb-approvals-panel {
  padding: 4px 0 8px;
}
.sb-approvals-lead {
  margin: 0 10px 8px;
  font-size: 7pt;
  color: var(--muted);
  line-height: 1.4;
}
.sb-approval-item {
  margin: 0 8px 8px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.06);
}
.sb-approval-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.sb-approval-lane {
  font-size: 6.5pt;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(245, 158, 11, 0.18);
  color: #b45309;
}
.sb-approval-date {
  font-size: 7pt;
  color: var(--muted);
}
.sb-approval-term {
  font-size: 8.5pt;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.sb-approval-hint {
  font-size: 7.5pt;
  color: #475569;
  line-height: 1.4;
  margin-bottom: 6px;
}
.sb-approval-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 6.5pt;
  color: var(--muted);
  margin-bottom: 8px;
}
.sb-approval-key {
  font-family: "SF Mono", "Fira Code", monospace;
  color: #64748b;
}
.sb-approval-author {
  margin-left: auto;
}
.sb-approval-btn {
  width: 100%;
  padding: 6px 10px;
  border: none;
  border-radius: 5px;
  background: var(--amber, #f59e0b);
  color: #0a1628;
  font-size: 7.5pt;
  font-weight: 700;
  cursor: pointer;
}
.sb-approval-btn:hover {
  filter: brightness(1.05);
}

.sb-rev-entry-summary {
  font-size: 7.5pt;
  color: var(--text);
  line-height: 1.35;
}

/* ── Tacks panel ─────────────────────────────────────────────── */
.sb-tack-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 8pt;
}
.sb-tack-badge {
  font-size: 6.5pt;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.sb-tack-badge.open { background: rgba(59,130,246,0.1); color: var(--accent); }
.sb-tack-badge.progress { background: rgba(245,158,11,0.15); color: #b45309; }
.sb-tack-badge.done { background: rgba(22,163,74,0.1); color: var(--success); }
.sb-tack-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

/* ── Journal panel ───────────────────────────────────────────── */
.sb-journal-entries {
  max-height: 300px;
  overflow-y: auto;
  padding: 4px 0;
}
.sb-journal-entries::-webkit-scrollbar { width: 5px; }
.sb-journal-entries::-webkit-scrollbar-track { background: rgba(176,208,248,0.08); }
.sb-journal-entries::-webkit-scrollbar-thumb { background: #1e3a5f; border-radius: 3px; }
.sb-journal-entries::-webkit-scrollbar-thumb:hover { background: #3b82f6; }
.sb-journal-entry {
  padding: 6px 12px;
  border-bottom: 1px solid var(--border-lt);
}
.sb-journal-entry:last-child { border-bottom: none; }
.sb-journal-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
}
.sb-journal-author {
  font-size: 7pt;
  font-weight: 700;
  color: var(--accent);
}
.sb-journal-time {
  font-size: 6.5pt;
  color: var(--muted);
  font-family: 'SF Mono', monospace;
}
.sb-journal-text {
  font-size: 8pt;
  line-height: 1.45;
  color: var(--text);
}
.sb-journal-compose {
  display: flex;
  gap: 4px;
  padding: 6px 8px 8px;
  border-top: 1px solid var(--border-lt);
}
.sb-journal-input {
  flex: 1;
  border: 1px solid rgba(30,58,95,0.15);
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 8pt;
  font-family: inherit;
  resize: vertical;
  min-height: 32px;
  max-height: 80px;
  color: var(--text);
  background: #f8faff;
}
.sb-journal-input:focus { border-color: var(--accent); background: #fff; outline: none; }
.sb-journal-send {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  align-self: flex-end;
}
.sb-journal-send:disabled { opacity: 0.4; cursor: default; }
.sb-journal-send:hover:not(:disabled) { background: #2563eb; }
.sb-journal-entry--rfn {
  border-left: 3px solid #c9a13f;
  padding-left: 6px;
  margin-left: -6px;
}
.sb-journal-kind {
  font-size: 0.62rem;
  font-weight: 800;
  color: #c9a13f;
  letter-spacing: 0.06em;
}
.sb-journal-anchor {
  font-size: 0.62rem;
  color: #60a5fa;
  font-family: ui-monospace, monospace;
}

/* ── ToDo panel ──────────────────────────────────────────────── */
.sb-todo-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 8pt;
}
.sb-todo-item:hover { background: rgba(176,208,248,0.06); }
.sb-todo-checkbox { accent-color: var(--accent); cursor: pointer; }
.sb-todo-text { color: var(--text); }
.sb-todo-text.done { text-decoration: line-through; color: var(--muted); }
.sb-todo-add {
  padding: 4px 8px 8px;
}
.sb-todo-input {
  width: 100%;
  border: 1px dashed rgba(30,58,95,0.15);
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 8pt;
  font-family: inherit;
  color: var(--text);
  background: transparent;
}
.sb-todo-input:focus { border-style: solid; border-color: var(--accent); background: #f8faff; outline: none; }

/* ── Inventory panel ─────────────────────────────────────── */
.sb-inv-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0.75rem;
  font-size: 8pt;
  border-bottom: 1px solid var(--border-lt);
}
.sb-inv-item:last-child { border-bottom: none; }
.sb-inv-name { color: var(--text); font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-inv-status {
  font-size: 6.5pt; font-weight: 700; padding: 1px 5px;
  border-radius: 3px; text-transform: uppercase; letter-spacing: 0.3px; flex-shrink: 0;
}
.sb-inv-status.pending { background: rgba(59,130,246,0.1); color: var(--accent); }
.sb-inv-status.ordered { background: rgba(245,158,11,0.15); color: #b45309; }
.sb-inv-status.shipped { background: rgba(59,130,246,0.15); color: #2563eb; }
.sb-inv-status.received { background: rgba(22,163,74,0.1); color: var(--success); }
.sb-inv-status.installed { background: rgba(22,163,74,0.2); color: #15803d; }
.sb-inv-add { padding: 0.25rem 0.5rem 0.5rem; }

/* ── Timeline panel ──────────────────────────────────────── */
.sb-timeline-entry {
  display: flex;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  position: relative;
}
.sb-timeline-dot {
  width: 0.5rem; height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 0.25rem;
}
.sb-timeline-content { flex: 1; min-width: 0; }
.sb-timeline-time { font-size: 6.5pt; color: var(--muted); font-family: 'SF Mono', monospace; }
.sb-timeline-actor { font-size: 7pt; font-weight: 700; color: var(--accent); }
.sb-timeline-text { font-size: 7.5pt; color: var(--text-sec); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-timeline-list {
  max-height: 50vh;
  overflow-y: auto;
}
.sb-timeline-list::-webkit-scrollbar { width: 5px; }
.sb-timeline-list::-webkit-scrollbar-track { background: rgba(176,208,248,0.08); }
.sb-timeline-list::-webkit-scrollbar-thumb { background: #1e3a5f; border-radius: 3px; }
.sb-timeline-list::-webkit-scrollbar-thumb:hover { background: #3b82f6; }

/* ── Ledger panel ────────────────────────────────────────── */
.sb-ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0.75rem;
  font-size: 8pt;
  border-bottom: 1px solid var(--border-lt);
}
.sb-ledger-row:last-child { border-bottom: none; }
.sb-ledger-desc { color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-ledger-amount { font-family: 'SF Mono', monospace; font-size: 7.5pt; font-weight: 700; color: var(--text); flex-shrink: 0; margin-left: 0.5rem; }

/* ── Dictionary panel ──────────────────────────────────────── */
.sb-dict-search {
  width: calc(100% - 16px);
  margin: 6px 8px;
  border: 1px solid rgba(30,58,95,0.15);
  border-radius: 4px;
  padding: 5px 8px;
  font-size: 8pt;
  font-family: inherit;
  color: var(--text);
  background: #f8faff;
}
.sb-dict-search:focus { border-color: var(--accent); background: #fff; outline: none; }
.sb-dict-terms {
  max-height: 400px;
  overflow-y: auto;
  padding: 0 4px;
}
.sb-dict-terms::-webkit-scrollbar { width: 5px; }
.sb-dict-terms::-webkit-scrollbar-track { background: rgba(176,208,248,0.08); }
.sb-dict-terms::-webkit-scrollbar-thumb { background: #1e3a5f; border-radius: 3px; }
.sb-dict-terms::-webkit-scrollbar-thumb:hover { background: #3b82f6; }
.sb-dict-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease, padding 0.2s;
  font-size: 7.5pt;
  color: var(--muted);
  line-height: 1.5;
  padding: 0 8px 0 58px;
}
.sb-dict-detail.open {
  max-height: 200px;
  padding: 4px 8px 10px 58px;
}
.sb-dict-summary { color: var(--text-sec); margin-bottom: 4px; }
.sb-dict-full { color: var(--muted); font-size: 7pt; margin-top: 4px; }
.sb-dict-cat {
  display: inline-block;
  font-size: 6.5pt;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(59,130,246,0.08);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-top: 4px;
}

/* ── Producer Panel (right column) ───────────────────────────── */
/* LOCKED TEMPLATE — canonical right panel for PMC 3-column layout.     */
/* Collapsible, resizable (240px–600px), admin-only.                     */
.producer-panel {
  width: 0;
  overflow: hidden;
  background: #fff;
  border-left: 2px solid var(--border-lt);
  transition: width 0.25s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: relative;
}
.producer-panel.open {
  width: 22vw;
}
.rp-float-btn {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 201;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(30,58,95,0.18);
  border-radius: 6px;
  padding: 5px 11px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-sec);
  box-shadow: 0 2px 8px rgba(10,22,40,0.10);
  line-height: 1;
  transition: background 0.15s;
}
.rp-float-btn:hover { background: var(--bg); }
.rp-resize-handle {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
  cursor: col-resize;
  background: transparent;
  z-index: 10;
  transition: background 0.15s;
}
.rp-resize-handle:hover,
.rp-resize-handle:active {
  background: var(--accent);
}
.rp-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-lt);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.rp-header-title {
  font-size: 8.5pt;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-sec);
}
.rp-close {
  background: none;
  border: none;
  color: var(--text-sec);
  cursor: pointer;
  font-size: 14px;
  padding: 4px 6px;
  border-radius: 4px;
}
.rp-close:hover { background: var(--border-lt); }
.rp-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.rp-body::-webkit-scrollbar { width: 5px; }
.rp-body::-webkit-scrollbar-track { background: rgba(176,208,248,0.08); }
.rp-body::-webkit-scrollbar-thumb { background: #1e3a5f; border-radius: 3px; }
.rp-body::-webkit-scrollbar-thumb:hover { background: #3b82f6; }
.rp-section {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-lt);
}
.rp-section:last-child { border-bottom: none; }
.rp-section-label {
  font-size: 7pt;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-sec);
  margin-bottom: 8px;
}
.rp-section-hint {
  font-size: 7pt;
  color: var(--muted);
  margin-top: 6px;
}
.rp-quick-input {
  width: 100%;
  border: 1px solid rgba(30,58,95,0.15);
  border-radius: 5px;
  padding: 8px 10px;
  font-size: 8.5pt;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
  max-height: 200px;
  color: var(--text);
  background: #f8faff;
}
.rp-quick-input:focus { border-color: var(--accent); background: #fff; outline: none; }
.rp-quick-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.rp-dropzone {
  border: 2px dashed rgba(59,130,246,0.25);
  border-radius: 6px;
  padding: 20px 12px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.rp-dropzone:hover { border-color: var(--accent); background: rgba(59,130,246,0.03); }
.rp-dropzone-text { font-size: 8.5pt; color: var(--text-sec); }
.rp-dropzone-link { color: var(--accent); font-weight: 600; cursor: pointer; }
.rp-dropzone-hint { font-size: 7pt; color: var(--muted); margin-top: 4px; }
.rp-info-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-size: 7.5pt;
}
.rp-info-key { color: var(--muted); font-weight: 600; }
.rp-info-val {
  color: var(--text);
  font-family: 'SF Mono', monospace;
  font-size: 7pt;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 768px) {
  .producer-panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    z-index: 200;
    box-shadow: -4px 0 28px rgba(10,22,40,0.22);
  }
  .rp-float-btn { display: none; }
}

/* ── Admin Drawer ─────────────────────────────────────────────── */
.admin-drawer {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 480px;
  background: #fff;
  border-right: 2px solid var(--border);
  box-shadow: 4px 0 24px rgba(10,22,40,0.18);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
}
.admin-drawer.open { transform: translateX(0); }

/* ── Admin top panel (guide page, author management) ────────────────── */
/* Slides DOWN from the top, covers ~40% of viewport height.           */
/* Overrides the left-slide transform from .admin-drawer base rule.    */
.admin-drawer.top {
  top: 0; left: 0; right: 0; bottom: auto;
  width: 100%;
  height: 0;
  transform: none !important;
  transition: height 0.3s cubic-bezier(0.4,0,0.2,1);
  z-index: 150;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(10,22,40,0.18);
}
.admin-drawer.top.open { height: auto; max-height: 85vh; overflow-y: auto; }

/* Standard admin banner label — canonical format for all section/sub-section headers.
   Use class="banner-label" on any div or span that should match the .drawer-section h3 treatment. */
.banner-label {
  font-size: 7.5pt;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text);
  background: #f1f5f9;
  border: 1px solid var(--border-lt);
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  display: block;
}

/* LOCKED TEMPLATE — 3-column admin grid. All Producer Console surfaces
   (guide, viewer, any future admin page) MUST use the top-panel variant
   (admin-drawer.top) which is full-width. The left-slide 480px variant
   collapses this grid to 1 column. Do NOT render AdminDrawer without
   top_panel=true. This is the canonical admin layout.                   */
.admin-grid {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(280px, 2fr) minmax(260px, 1fr);
  gap: 16px 20px;
  align-items: start;
}
.admin-grid > div {
  overflow: auto;
  min-width: 140px;
}
@media (max-width: 1100px) {
  .admin-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .admin-grid { grid-template-columns: 1fr; }
}
/* Compact drawer sections inside the grid */
.admin-grid .drawer-section {
  margin-bottom: 0;
  padding-bottom: 12px;
}
.admin-grid .drawer-section h3 {
  font-size: 7pt;
  margin-bottom: 8px;
  padding: 4px 8px;
}
/* Banner toggle button for the admin top panel */
.admin-panel-btn {
  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.3);
  color: #60a5fa;
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 7.5pt;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  font-family: 'SF Mono','Fira Code',monospace;
  transition: background 0.15s;
}
.admin-panel-btn:hover { background: rgba(59,130,246,0.25); }
.admin-panel-btn.active { background: rgba(59,130,246,0.3); color: #93c5fd; }

.drawer-header {
  background: #ffffff;
  color: var(--text);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-lt);
}
.drawer-title {
  font-size: 9pt;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.drawer-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.drawer-close:hover { background: rgba(255,255,255,0.1); }
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.drawer-body::-webkit-scrollbar { width: 5px; }
.drawer-body::-webkit-scrollbar-thumb { background: rgba(30,58,95,0.15); border-radius: 3px; }

/* ── Content area ─────────────────────────────────────────────────── */
/* LOCKED TEMPLATE — DO NOT CHANGE. Full-width on all screens.          */
/* All document content — CAS blobs, LiveDOC renders, inline HTML —     */
/* must fill the available width. Responsive padding via clamp().        */
/* If you need to constrain width for a specific element, do it on      */
/* that element, not here. This is the canonical layout rule.           */
.content-area {
  flex: 1 1 0;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  background: var(--bg);
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.content-inner {
  width: 100% !important;
  max-width: 100% !important;
  padding: 24px clamp(16px, 3vw, 48px) 48px;
  box-sizing: border-box;
}
/* Override any max-width that LiveDOC compose_html_page or CAS blobs   */
/* might inject via their own <style> blocks. The viewer owns layout.   */
.content-area body,
.content-area iframe,
.content-inner > * {
  max-width: 100% !important;
}

/* ── Landing page ───────────────────────────────────────────────────── */
.landing-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.landing-card {
  background: #fff;
  border: 1px solid var(--border-lt);
  border-radius: 12px;
  padding: 36px 40px;
  max-width: 440px;
  width: 92%;
  box-shadow: 0 4px 20px rgba(10,22,40,0.08);
}
.landing-card h1 { font-size: 16pt; font-weight: 800; color: var(--dark); margin-bottom: 4px; }
.landing-card .subtitle { font-size: 8.5pt; color: var(--muted); margin-bottom: 24px; }

/* ── Sticky document title bar ────────────────────────────────────── */
.doc-title-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  padding: 14px clamp(12px, 2vw, 1.25rem);
  font-size: 11pt;
  font-weight: 800;
  color: var(--text);
  border-bottom: 1px solid var(--border-lt);
  backdrop-filter: blur(8px);
  background: rgba(244,247,252,0.92);
}

/* ── Viewer doc stack (title bar + RFN banner + body) ─────────────── */
.doc-viewer-stack {
  width: 100%;
  box-sizing: border-box;
  padding: 0 0 3rem;
}

/* ── RFN reader-feedback hint banner (collapsible, localStorage) ─── */
.nos-rfn-hintbar {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0 clamp(12px, 2vw, 1.25rem) 10px;
  border-radius: 8px;
  border: 1px solid rgba(201, 161, 63, 0.55);
  background: linear-gradient(135deg, #2a2010 0%, #4a3818 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 10px rgba(10, 22, 40, 0.12);
  color: #f5e6c8;
  font-size: 8.5pt;
  line-height: 1.45;
  overflow: hidden;
}
.nos-rfn-hintbar__body {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
}
.nos-rfn-hintbar__kicker {
  display: inline-block;
  font-size: 7pt;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-variant: small-caps;
  color: #60a5fa;
  background: rgba(10, 22, 40, 0.72);
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 4px;
  padding: 3px 8px;
  flex-shrink: 0;
}
.nos-rfn-hintbar__text {
  margin: 0;
  flex: 1 1 220px;
  min-width: 0;
  color: #f5e6c8;
}
.nos-rfn-hintbar__text strong {
  color: #c9a13f;
  font-weight: 700;
}
.nos-rfn-hintbar__toggle,
.nos-rfn-hintbar__expand {
  flex-shrink: 0;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 7pt;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-variant: small-caps;
  color: #c9a13f;
  background: rgba(10, 22, 40, 0.55);
  border-left: 1px solid rgba(201, 161, 63, 0.35);
  padding: 0 14px;
  min-width: 72px;
}
.nos-rfn-hintbar__toggle:hover,
.nos-rfn-hintbar__expand:hover {
  background: rgba(10, 22, 40, 0.82);
  color: #f5e6c8;
}
.nos-rfn-hintbar__expand {
  display: none;
  align-items: center;
  gap: 8px;
  width: 100%;
  border-left: none;
  justify-content: flex-start;
  padding: 8px 14px;
}
.nos-rfn-hintbar__chev {
  color: #c9a13f;
  font-size: 9pt;
}
.nos-rfn-hintbar--collapsed .nos-rfn-hintbar__body,
.nos-rfn-hintbar--collapsed .nos-rfn-hintbar__toggle {
  display: none;
}
.nos-rfn-hintbar--collapsed {
  display: block;
}
.nos-rfn-hintbar--collapsed .nos-rfn-hintbar__expand {
  display: flex;
}

/* ── Inline doc content ───────────────────────────────────────────── */
/* LOCKED TEMPLATE — full-width, matches .content-inner constraint.     */
.doc-body {
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.65;
  color: var(--text);
  user-select: none;
  -webkit-user-select: none;
  max-width: 100% !important;
  width: 100% !important;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
/* LiveDOC compose_html_page centers .page-wrap at 80% — stretch in channel viewer */
.doc-body:not([class*="ch-tpl-"]) .ld-html-fragment,
.doc-body:not([class*="ch-tpl-"]) .page-wrap,
.ch-doc-body:not([class*="ch-tpl-"]) .ld-html-fragment,
.ch-doc-body:not([class*="ch-tpl-"]) .page-wrap {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.doc-body:not([class*="ch-tpl-"]) .page-wrap > .header,
.doc-body:not([class*="ch-tpl-"]) .page-wrap > .recordbar,
.doc-body:not([class*="ch-tpl-"]) .page-wrap > .container,
.doc-body:not([class*="ch-tpl-"]) .page-wrap > .footer,
.ch-doc-body:not([class*="ch-tpl-"]) .page-wrap > .header,
.ch-doc-body:not([class*="ch-tpl-"]) .page-wrap > .recordbar,
.ch-doc-body:not([class*="ch-tpl-"]) .page-wrap > .container,
.ch-doc-body:not([class*="ch-tpl-"]) .page-wrap > .footer {
  width: 100% !important;
}
.doc-body:not([class*="ch-tpl-"]) .header .subtitle,
.ch-doc-body:not([class*="ch-tpl-"]) .header .subtitle {
  max-width: none !important;
}
/* Force ALL injected content (CAS blobs, LiveDOC) to respect container width */
.doc-body *, .content-area * {
  max-width: 100% !important;
  overflow-wrap: break-word;
  word-break: break-word;
}
/* Producer (admin) is never restricted — they own the content. */
.doc-body.admin-mode {
  user-select: text !important;
  -webkit-user-select: text !important;
}
@media print {
  .doc-body.admin-mode * { visibility: visible !important; }
}
.doc-body .ld-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.35rem;
  margin: 1.8rem 0 0.7rem;
}
.doc-body p, .doc-body .ld-para {
  color: var(--text-sec);
  margin: 0.55rem 0;
  text-align: justify;
  hyphens: auto;
}
/* ── LiveDOC block styles ─────────────────────────────────────────── */
/* LOCKED TEMPLATE — canonical styles for all LiveDOC particle blocks.  */
/* render_body() returns bare block HTML; the SPA owns all styling.     */
/* These match the NOS theme. Do NOT duplicate in compose_html_page().  */
.doc-body .ld-table-wrap {
  overflow-x: auto;
  margin: 1.2rem 0;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.doc-body .ld-table-wrap table {
  width: 100%;
  border-collapse: collapse;
}
.doc-body .ld-table-wrap th,
.doc-body .ld-table-wrap td {
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(176,208,248,0.3);
  font-size: 0.9rem;
}
.doc-body .ld-table-wrap th {
  background: rgba(59,130,246,0.08);
  font-weight: 600;
}
.doc-body .ld-list-wrap {
  margin: 0.8rem 0 0.8rem 1.4rem;
  color: var(--text-sec);
}
.doc-body .ld-list-wrap li { margin: 0.3rem 0; }
.doc-body pre.ld-code {
  background: rgba(0,0,0,0.04);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.85rem;
  margin: 1rem 0;
}

/* ── Watermark overlay ──────────────────────────────────────────────── */
.watermark-layer {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}
.watermark-tile {
  position: absolute;
  color: rgba(0,0,0,0.04);
  font: 11px/1.2 -apple-system, 'Helvetica Neue', Arial, sans-serif;
  transform: rotate(-28deg);
  transform-origin: 0 0;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

/* ── All Documents primitive (View · Tile | List) ───────────────────── */
.all-docs-primitive {
  margin-top: 8px;
}
.all-docs-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.docs-view-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.docs-view-label {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 8pt;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1e3a5f;
}
.docs-view-toggle {
  display: inline-flex;
  gap: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #1d4ed8;
  box-shadow: 0 1px 4px rgba(29, 78, 216, 0.22);
  background: #fff;
}
.docs-view-btn {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 8pt;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid #1d4ed8;
  cursor: pointer;
  background: #fff;
  color: #1d4ed8;
  transition: background 0.12s, color 0.12s;
}
.docs-view-btn + .docs-view-btn {
  border-left: 1px solid rgba(29, 78, 216, 0.25);
}
.docs-view-btn:hover:not(.active) {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}
.docs-view-btn.active {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border-color: #1d4ed8;
}
.all-docs-count {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 7.5pt;
  color: #94a3b8;
  letter-spacing: 0.03em;
}
.all-docs-empty {
  text-align: center;
  padding: 48px 20px;
  color: #94a3b8;
}
.all-docs-ghost-warning {
  background: rgba(220, 38, 38, 0.06);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 8px;
  padding: 12px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.all-docs-ghost-icon { font-size: 14pt; }
.all-docs-ghost-title {
  font-size: 9pt;
  font-weight: 700;
  color: #991b1b;
}
.all-docs-ghost-detail {
  font-size: 8pt;
  color: #7f1d1d;
  margin-top: 2px;
}

/* ── Guide doc cards ────────────────────────────────────────────────── */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
  gap: 16px;
}
.doc-card {
  background: #fff;
  border: 1px solid rgba(30,58,95,0.15);
  border-radius: 8px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
  text-decoration: none;
  color: inherit;
}
.doc-card:hover {
  box-shadow: 0 4px 20px rgba(10,22,40,0.12);
  border-color: rgba(59,130,246,0.3);
}
.doc-card .seq-badge,
.doc-list-seq {
  background: #1e3a5f;
  color: #fff;
}
.doc-card .seq-badge {
  position: absolute;
  top: -8px; left: 14px;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10pt; font-weight: 800;
  box-shadow: 0 2px 8px rgba(30,58,95,0.25);
}
.doc-card h3 { font-size: 11.5pt; font-weight: 700; margin: 8px 0 6px; padding-left: 20px; line-height: 1.3; }
.doc-card .desc { font-size: 9pt; color: var(--muted); flex: 1; margin-bottom: 14px; line-height: 1.5; }
.doc-card .meta { font-size: 7.5pt; color: #94a3b8; margin-bottom: 14px; font-family: 'SF Mono', monospace; }
.doc-card .actions { display: flex; gap: 8px; }

.doc-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.doc-card-wrap.doc-card--shared .doc-card { border-color: #22c55e; }
.doc-card-wrap.doc-card--unshared .doc-card { border-color: rgba(30,58,95,0.15); }
.doc-card-wrap.doc-card--blocked .doc-card { border-color: #ef4444; }

/* ── Guide doc list rows ────────────────────────────────────────────── */
.docs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.doc-list-wrap {
  position: relative;
}
.doc-list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid rgba(30, 58, 95, 0.15);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.doc-list-row:hover {
  box-shadow: 0 2px 12px rgba(10, 22, 40, 0.1);
  border-color: rgba(59, 130, 246, 0.35);
}
.doc-list-seq {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9pt;
  font-weight: 800;
}
.doc-list-body {
  flex: 1;
  min-width: 0;
}
.doc-list-body h3 {
  font-size: 10.5pt;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 2px;
}
.doc-list-desc {
  font-size: 8.5pt;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 2px;
}
.doc-list-meta {
  font-size: 7.5pt;
  color: #94a3b8;
  font-family: 'SF Mono', monospace;
}
.doc-list-arrow {
  flex-shrink: 0;
  font-size: 8.5pt;
  font-weight: 700;
  color: var(--accent);
}
.doc-list-wrap.doc-card--shared .doc-list-row { border-color: #22c55e; }
.doc-list-wrap.doc-card--unshared .doc-list-row { border-color: rgba(30, 58, 95, 0.15); }
.doc-list-wrap.doc-card--blocked .doc-list-row { border-color: #ef4444; }

.share-toggle {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.share-btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 5px 8px;
  font-size: 7pt;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 5px;
  border: 1px solid transparent;
  cursor: pointer;
  background: #f8fafc;
  color: #64748b;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.share-btn--shared.active {
  background: #16a34a;
  border-color: #15803d;
  color: #fff;
}
.share-btn--unshared.active {
  background: #94a3b8;
  border-color: #64748b;
  color: #fff;
}
.share-btn--blocked.active {
  background: #dc2626;
  border-color: #b91c1c;
  color: #fff;
}
.share-btn:not(.active):hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

/* ── Producer list catalog ─────────────────────────────────────────── */
.docs-list-table { width: 100%; }
.docs-list-producer-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.docs-list-producer-bar--l00 {
  align-items: center;
  justify-content: flex-end;
  padding: 0 4px 6px;
  margin-bottom: 4px;
}
.docs-list-l00-hint {
  display: none;
}
.docs-list-confirm-btn,
.docs-list-console-btn {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 8pt;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid rgba(30, 58, 95, 0.2);
  cursor: pointer;
}
.docs-list-confirm-btn {
  background: #16a34a;
  color: #fff;
  border-color: #15803d;
}
.docs-list-console-btn {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border-color: #1d4ed8;
  box-shadow: 0 1px 4px rgba(29, 78, 216, 0.25);
}
.docs-list-console-btn:hover {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
}
.channel-app--l00 .sb-float-btn {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  border-color: #1d4ed8;
  font-weight: 800;
}
.channel-app--l00 .sb-float-btn:hover {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
}
.docs-list-header-row {
  display: grid;
  grid-template-columns: 28px 40px 1fr 1fr 72px 72px 92px 56px;
  gap: 8px;
  align-items: center;
  padding: 6px 12px 8px;
  font-size: 7pt;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #94a3b8;
  font-family: 'SF Mono', monospace;
  border-bottom: 1px solid rgba(30, 58, 95, 0.12);
  margin-bottom: 6px;
}
.docs-list-h-share-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  line-height: 1.2;
}
.docs-list-h-dns { font-size: 6pt; }
.docs-list-h-remove-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  line-height: 1.2;
  font-size: 6pt;
  color: #b91c1c;
}
.docs-list-col-select { cursor: pointer; }
.docs-list-reorder-status {
  margin: 0 0 8px;
  padding: 6px 12px;
  border-radius: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 8pt;
  font-weight: 600;
}
.docs-list-withdraw-error {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: 8pt;
  font-weight: 600;
}
.doc-list-row-producer {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.doc-list-drag {
  flex-shrink: 0;
  width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 14pt;
  cursor: grab;
  user-select: none;
  letter-spacing: -2px;
  touch-action: none;
}
.doc-list-drag:hover {
  color: var(--accent);
}
.doc-list-drag:active {
  cursor: grabbing;
}
.docs-list--reordering {
  cursor: grabbing;
  user-select: none;
}
.doc-list-row-link {
  flex: 1;
  min-width: 0;
}
.doc-list-label {
  flex: 1;
  text-align: center;
  font-size: 9pt;
  font-weight: 600;
  color: #475569;
  padding: 0 12px;
  align-self: center;
}
.docs-list-share-cols {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 72px 72px 92px 56px;
  gap: 8px;
  align-items: center;
  padding: 8px 4px;
}
.docs-list-remove-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fff;
  color: #b91c1c;
  font-size: 11pt;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.docs-list-remove-btn:hover {
  background: #fef2f2;
  border-color: #f87171;
}
.docs-list-share-check {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
}
.docs-list-share-check input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}
.mouse-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(10, 22, 40, 0.25);
}
.mouse-dialog-card {
  position: fixed;
  z-index: 10051;
  width: min(360px, calc(100vw - 16px));
  background: #fff;
  border: 1px solid rgba(30, 58, 95, 0.2);
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 8px 32px rgba(10, 22, 40, 0.2);
}
.mouse-dialog-title {
  margin: 0 0 8px;
  font-size: 10pt;
  font-weight: 800;
  color: #991b1b;
}
.mouse-dialog-msg {
  margin: 0 0 14px;
  font-size: 9pt;
  line-height: 1.5;
  color: #475569;
}
.mouse-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.mouse-dialog-cancel,
.mouse-dialog-confirm {
  font-size: 8.5pt;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
}
.mouse-dialog-cancel {
  background: #f1f5f9;
  color: #64748b;
}
.mouse-dialog-confirm {
  background: #dc2626;
  color: #fff;
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  padding: 8px 18px;
  border: none;
  border-radius: 5px;
  font-size: 9pt;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', system-ui;
  transition: background 0.15s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
.btn-primary { background: var(--border); color: #fff; }
.btn-primary:hover { background: #152c47; }
.btn-outline { background: #fff; color: var(--border); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-amber { background: var(--amber); color: var(--dark); }
.btn-sm { padding: 5px 12px; font-size: 8pt; }
.btn-xs { padding: 3px 8px; font-size: 7.5pt; }
.btn-full { width: 100%; }

/* ── Form elements ──────────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 7.5pt;
  font-weight: 700;
  color: var(--text-sec);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 7px 10px;
  border: 1.5px solid rgba(30,58,95,0.2);
  border-radius: 5px;
  font-size: 9pt;
  font-family: 'Inter', system-ui;
  color: var(--text);
  background: #f8faff;
  outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
  background: #fff;
}
.field textarea { min-height: 80px; resize: vertical; }

/* ── Drawer section headings ─────────────────────────────────────────── */
.drawer-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-lt);
}
.drawer-section:last-child { border-bottom: none; }
.drawer-section h3 {
  font-size: 7.5pt;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text);
  background: #f1f5f9;
  border: 1px solid var(--border-lt);
  padding: 5px 8px;
  border-radius: 4px;
  margin-bottom: 10px;
  display: block;
}

/* ── Security table (drawer) ─────────────────────────────────────────── */
.sec-table { width: 100%; border-collapse: collapse; font-size: 8.5pt; }
.sec-table th {
  text-align: left;
  font-size: 7pt;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 8px 4px 0;
}
.sec-table td { padding: 5px 8px 5px 0; }
.sec-table input[type=radio] { accent-color: var(--danger); cursor: pointer; }
.sec-table .allow-radio { accent-color: var(--success); }

/* ── Flash / notification ───────────────────────────────────────────── */
.flash {
  background: #ecfdf5;
  border: 1px solid #86efac;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 8.5pt;
  color: var(--success);
  font-weight: 600;
  margin-bottom: 12px;
}
.error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 8.5pt;
  color: var(--danger);
  font-weight: 600;
  margin-bottom: 12px;
}

/* ── Authoring page ─────────────────────────────────────────────────── */
.authoring-layout {
  display: grid;
  grid-template-columns: 320px 1fr 300px;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}
.authoring-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--border-lt);
}
.authoring-panel:last-child { border-right: none; }
.panel-header {
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid var(--border-lt);
  flex-shrink: 0;
}
.panel-header h2 {
  font-size: 9pt;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-sec);
}
.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}
.panel-body::-webkit-scrollbar { width: 4px; }
.panel-body::-webkit-scrollbar-thumb { background: rgba(30,58,95,0.15); border-radius: 2px; }

.particle-item {
  background: #fff;
  border: 1px solid var(--border-lt);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.particle-item:hover { border-color: var(--accent); background: #f8faff; }
.particle-item .ptype {
  font-size: 6.5pt;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}
.particle-item .preview { font-size: 8pt; color: var(--text); line-height: 1.4; }

.doc-block {
  background: #fff;
  border: 1px solid var(--border-lt);
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.doc-block .block-preview { flex: 1; font-size: 8pt; color: var(--text); line-height: 1.4; }
.doc-block .block-controls { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.doc-block .block-controls button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 10px;
  padding: 2px 4px;
  border-radius: 3px;
}
.doc-block .block-controls button:hover { background: var(--border-lt); color: var(--text); }

/* ── Status badge ────────────────────────────────────────────────────── */
.badge { font-size: 7pt; font-weight: 700; padding: 2px 6px; border-radius: 3px; }
.badge-live { background: #ecfdf5; color: var(--success); }
.badge-cas { background: #fef9c3; color: #854d0e; }
.badge-active { color: var(--success); font-weight: 700; }
.badge-expired { color: var(--danger); font-weight: 700; }
.badge-pending { color: var(--amber); font-weight: 700; }

/* ── Loading spinner ─────────────────────────────────────────────────── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--muted);
  font-size: 9pt;
}

/* ── Mobile responsive ────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .protect-banner {
    padding: 6px 10px;
    font-size: 7pt;
    flex-wrap: wrap;
    gap: 4px;
  }
  .content-inner { padding: 16px 14px 32px; }
  .docs-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
  }
  .doc-card h3 { font-size: 10.5pt; }
  .doc-card .desc { font-size: 8.5pt; }
  /* Viewer doc body — tighter margins on mobile */
  .doc-viewer-stack { padding: 0 0 2rem; }
  /* Banner admin button smaller on mobile */
  .admin-panel-btn { font-size: 7pt; padding: 2px 7px; }
}
@media (max-width: 480px) {
  .protect-banner { gap: 2px; }
  .docs-grid { grid-template-columns: 1fr; }
  .landing-card { padding: 24px 20px; }
  .doc-body { font-size: 10.5pt; }
}
/* Wide screen — let the tile grid use more columns */
@media (min-width: 1280px) {
  .docs-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}
@media print {
  body:not(.print-allowed) { display: none !important; }
  /* Owner/admin print: hide viewer chrome, let doc content flow across pages */
  body.print-allowed .protect-banner,
  body.print-allowed .sidebar-overlay,
  body.print-allowed .sb-float-btn,
  body.print-allowed .sb-backdrop,
  body.print-allowed .admin-drawer,
  body.print-allowed .doc-title-bar,
  body.print-allowed .watermark-layer,
  body.print-allowed .admin-panel-btn { display: none !important; }
  body.print-allowed .channel-app { height: auto !important; overflow: visible !important; }
  body.print-allowed .main-layout { display: block !important; overflow: visible !important; }
  body.print-allowed .content-area { overflow: visible !important; height: auto !important; }
  body.print-allowed .doc-body {
    user-select: text !important;
    -webkit-user-select: text !important;
  }
  body.print-allowed .doc-body * { visibility: visible !important; }
}

/* ── NOSBOX — Registry-First OS tile dashboard ───────────────────────── */
.nosbox-app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}
.nosbox-header {
  background: #ffffff;
  color: var(--text);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-lt);
}
.nosbox-header-left { display: flex; flex-direction: column; gap: 2px; }
.nosbox-title {
  font-size: 14pt;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.nosbox-subtitle {
  font-size: 7pt;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #8bb4e0;
}
.nosbox-header-stats {
  display: flex;
  gap: 16px;
  align-items: center;
}
.nosbox-stat {
  font-size: 7.5pt;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #8bb4e0;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.nosbox-body {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
}
.nosbox-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: var(--muted);
  font-size: 10pt;
}

/* ── Tile grid ─────────────────────────────────────────────────────── */
.nosbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* ── Individual tile ───────────────────────────────────────────────── */
.nosbox-tile {
  background: #fff;
  border: 1px solid rgba(30,58,95,0.12);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(10,22,40,0.06);
  transition: box-shadow 0.15s, border-color 0.15s;
}
.nosbox-tile:hover {
  box-shadow: 0 4px 16px rgba(10,22,40,0.12);
  border-color: rgba(30,58,95,0.25);
}
.nosbox-tile-header {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}
.nosbox-tile-icon { font-size: 14px; }
.nosbox-tile-name {
  font-size: 8pt;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.nosbox-tile-body {
  padding: 12px;
  min-height: 60px;
}

/* ── Counter widget ────────────────────────────────────────────────── */
.nosbox-counter { text-align: center; padding: 8px 0; }
.nosbox-counter-val {
  font-size: 28pt;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
}
.nosbox-counter-label {
  font-size: 8pt;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 4px;
}
.nosbox-counter-sec {
  margin-top: 6px;
  font-size: 8pt;
  color: var(--text-sec);
}
.nosbox-sec-val { font-weight: 800; font-size: 11pt; }
.nosbox-sec-label { color: var(--muted); }

/* ── KPI chip row ──────────────────────────────────────────────────── */
.nosbox-kpi-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.nosbox-kpi-chip {
  background: rgba(59,130,246,0.08);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 7.5pt;
  color: var(--text-sec);
}
.nosbox-kpi-chip strong {
  font-size: 9pt;
  color: var(--text);
}

/* ── List widget ───────────────────────────────────────────────────── */
.nosbox-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-lt);
  font-size: 8.5pt;
}
.nosbox-list-item:last-child { border-bottom: none; }
.nosbox-item-title {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.nosbox-item-badge {
  font-size: 7pt;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  background: rgba(59,130,246,0.1);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
  margin-left: 8px;
}
.nosbox-list-empty {
  text-align: center;
  padding: 12px;
  color: var(--muted);
  font-size: 8pt;
  font-style: italic;
}

/* ── Settings panel ────────────────────────────────────────────────── */
.nosbox-settings {
  margin-top: 24px;
  border: 1px solid var(--border-lt);
  border-radius: 8px;
  background: #fff;
}
.nosbox-settings-toggle {
  padding: 10px 16px;
  font-size: 8pt;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-sec);
  cursor: pointer;
  list-style: none;
}
.nosbox-settings-toggle::-webkit-details-marker { display: none; }
.nosbox-settings-body {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border-lt);
}
.nosbox-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}
@media (max-width: 768px) {
  .nosbox-grid {
    grid-template-columns: 1fr;
  }
  .nosbox-header {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  .nosbox-settings-grid {
    grid-template-columns: 1fr;
  }
}

/* ── NosNOTE global primitive (NOS-GLOBAL-NOSNOTE) ─────────────────── */
.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.12);
  border: 1px solid rgba(239, 68, 68, 0.32);
  border-radius: 4px;
  color: #fca5a5;
  cursor: pointer;
}
.nos-rec-btn:hover { background: rgba(239, 68, 68, 0.22); }
.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);
}

/* L00 publication — catalog fits center column; keep readable gutters */
.channel-app--l00 .content-inner {
  padding: 12px 10px 32px 14px;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}
.channel-app--l00 .content-area {
  padding-left: 0;
  padding-right: 0;
}
.channel-app--l00 .doc-viewer-stack {
  padding-left: 0;
  padding-right: 0;
}
.channel-app--l00 .all-docs-primitive {
  padding: 0 4px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.docs-list-table--l00 {
  width: 100%;
  max-width: 100%;
  overflow-x: visible;
}
.docs-list--l00-pub .doc-list-row-producer {
  display: flex;
  align-items: center;
  gap: 6px;
}
.docs-list--l00-pub .doc-list-row--l00 {
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px 10px;
  gap: 10px;
}
.docs-list--l00-pub .doc-list-row--l00 .doc-list-body {
  min-width: 0;
  overflow: hidden;
}
.docs-list--l00-pub .doc-list-row--l00 .doc-list-body h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.docs-list--l00-pub .doc-list-drag {
  flex-shrink: 0;
  width: 18px;
  min-height: 32px;
}
.channel-app--l00 .doc-title-bar {
  padding-left: 12px;
  padding-right: 12px;
}

/* ── NosNOTE composer (OS REF / REC → note + dispatch) ───────────────── */
.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-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, monospace); 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;
}
.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, monospace);
  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, monospace);
  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, monospace); }
.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;
}
.nos-attach-strip { margin: 8px 0; }
.nos-attach-preview {
  min-height: 140px;
  max-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}
.nos-attach-preview-img { max-width: 100%; max-height: 200px; object-fit: contain; }
.nos-attach-preview-empty { font-size: 8pt; color: #64748b; padding: 20px; text-align: center; }
.nos-attach-paste {
  margin-top: 6px;
  padding: 10px;
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  font-size: 7.5pt;
  color: #64748b;
  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;
}

/* ── L00 canonical binder (spaces-nav template) ───────────────────────── */
.spmc-drag-layer { position: fixed; inset: 0; z-index: 9999; cursor: grabbing; }
.nos-l00-win-body { padding: 8px 10px; min-height: 0; height: 100%; box-sizing: border-box; }
.nos-window-body:has(.nos-l00-journal) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.nos-l00-win-body:has(.nos-l00-journal) {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
/* L00 float host — fixed full-viewport; matches nos-spmc-ui / spaces-nav binder */
.nos-l00-system-windows {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 35;
}
.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-canvas-l00-overlay .nos-window { pointer-events: auto; }

.nos-window {
  position: absolute;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e2e8f0;
  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 #e2e8f0;
  cursor: move;
  user-select: none;
  flex-shrink: 0;
}
.nos-window-title {
  font-size: 8pt;
  font-weight: 600;
  color: #1a2744;
  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: #64748b;
  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: #1a2744; }
.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 #e2e8f0;
  border-bottom: 2px solid #e2e8f0;
}

/* L0 Journal panel (canonical) */
.nos-l00-journal {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
  min-height: 300px;
  min-width: 0;
}
.nos-l00-tool-stub {
  padding: 12px 14px;
  font-size: 8pt;
  color: #64748b;
  line-height: 1.45;
}
.nos-l00-tile-lead {
  font-weight: 700;
  color: #1a2744;
  margin: 0 0 6px;
}
.nos-l00-tile-copy {
  margin: 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 #e2e8f0;
  background: transparent;
  border-radius: 6px;
  padding: 2px 8px;
  cursor: pointer;
  font-size: 10pt;
}
.nos-l00-journal-hint { font-size: 6.5pt; color: #64748b; 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 #e2e8f0;
  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 #e2e8f0;
  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: #3b82f6; 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: #64748b; font-family: var(--mono, monospace); }
.nos-l00-journal-preview {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
}
.nos-l00-journal-img { max-width: 100%; border-radius: 6px; border: 1px solid #e2e8f0; }
.nos-l00-journal-detail-title { font-size: 8pt; margin: 0 0 4px; }
.nos-l00-journal-detail-meta { font-size: 6.5pt; color: #64748b; margin: 0 0 8px; }
.nos-l00-journal-edit-btn {
  flex-shrink: 0;
  font-size: 7pt;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #3b82f6;
  cursor: pointer;
  font-weight: 600;
}
.nos-l00-journal-edit-input,
.nos-l00-journal-edit-textarea {
  width: 100%;
  box-sizing: border-box;
  font-size: 8pt;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-family: inherit;
}
.nos-l00-journal-edit-textarea { min-height: 100px; resize: vertical; }
.nos-l00-journal-btn {
  font-size: 7.5pt;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
}
.nos-l00-journal-btn--primary {
  border-color: #3b82f6;
  background: #3b82f6;
  color: #fff;
  font-weight: 700;
}
.nos-l00-journal-empty,
.nos-l00-journal-status { font-size: 7pt; color: #64748b; text-align: center; padding: 12px; }
.nos-l00-journal-dom-preview-wrap {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nos-l00-journal-dom-preview-wrap--doc { margin-top: 10px; }
.nos-l00-journal-dom-preview-label {
  font-size: 6.5pt;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.nos-l00-journal-dom-frame {
  width: 100%;
  min-height: 160px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
}
.nos-l00-journal-dom-frame--doc { min-height: 220px; }

/* OS REF strip tile — match spaces-nav */
.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-doc-strip-thumb--journal { font-size: 14pt; line-height: 1; }

.breadcrumb__admin { color: #60a5fa; font-weight: 700; }

/* ── Nexus Development channel guide (`data-theme="nexus-dev"`) ─────────
   Scoped to /ch/nexus-* internal publication — not investor L00 shell.   */
.channel-app[data-theme="nexus-dev"] {
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #1e3a5f;
  --border-lt: rgba(30, 58, 95, 0.12);
  --accent: #2563eb;
  --muted: #64748b;
  --dark: #0f2744;
  --gold: #b45309;
  --gold-bg: rgba(180, 83, 9, 0.08);
}
.channel-app[data-theme="nexus-dev"] .protect-banner {
  background: linear-gradient(90deg, #0f2744 0%, #1e3a5f 100%);
  color: rgba(248, 250, 252, 0.85);
  border-bottom: 1px solid rgba(96, 165, 250, 0.25);
}
.channel-app[data-theme="nexus-dev"] .protect-banner .holder {
  color: rgba(248, 250, 252, 0.55);
}
.channel-app[data-theme="nexus-dev"] .content-area {
  background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 120px, #f8fafc 100%);
}
.channel-app[data-theme="nexus-dev"] .content-inner {
  max-width: 1120px !important;
  margin: 0 auto;
  padding: 28px clamp(20px, 4vw, 56px) 56px;
}
.channel-app[data-theme="nexus-dev"] .sidebar-overlay.open {
  background: #fff;
  border-right: 1px solid var(--border-lt);
  box-shadow: 4px 0 24px rgba(15, 39, 68, 0.06);
}
.channel-app[data-theme="nexus-dev"] .doc-card {
  border-radius: 10px;
  border: 1px solid var(--border-lt);
  box-shadow: 0 1px 3px rgba(15, 39, 68, 0.04);
}
.channel-app[data-theme="nexus-dev"] .doc-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 8px 28px rgba(15, 39, 68, 0.1);
}
.channel-app[data-theme="nexus-dev"] .doc-card .seq-badge {
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
}

/* Guide hero — all channels; nexus-dev gets full treatment */
.guide-hero {
  margin-bottom: 28px;
  padding: 28px 32px 26px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border-lt);
  box-shadow: 0 2px 12px rgba(15, 39, 68, 0.05);
}
.channel-app[data-theme="nexus-dev"] .guide-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 55%, rgba(59, 130, 246, 0.06) 100%);
  border: 1px solid rgba(30, 58, 95, 0.14);
  border-left: 4px solid var(--gold);
}
.guide-hero__kicker {
  font-size: 7.5pt;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}
.channel-app[data-theme="nexus-dev"] .guide-hero__kicker {
  color: var(--gold);
}
.guide-hero__title {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 10px;
}
.guide-hero__subtitle {
  font-size: 10pt;
  color: var(--text-sec);
  line-height: 1.55;
  max-width: 52rem;
  margin-bottom: 18px;
}
.guide-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 20px;
}
.guide-hero__stat {
  font-size: 8.5pt;
  color: var(--muted);
}
.guide-hero__stat strong {
  color: var(--dark);
  font-weight: 800;
}
.guide-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.guide-hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 8.5pt;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.15s, box-shadow 0.15s, border-color 0.15s;
  cursor: pointer;
  font-family: inherit;
}
.guide-hero__btn--primary {
  background: linear-gradient(180deg, #1e3a5f, #0f2744);
  color: #f8fafc;
  border: 1px solid rgba(15, 39, 68, 0.2);
  box-shadow: 0 2px 8px rgba(15, 39, 68, 0.18);
}
.guide-hero__btn--primary:hover {
  box-shadow: 0 4px 16px rgba(15, 39, 68, 0.22);
  color: #fff;
}
.guide-hero__btn--ghost {
  background: #fff;
  color: var(--dark);
  border: 1px solid var(--border-lt);
}
.guide-hero__btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.guide-publisher-note {
  background: #fff;
  border: 1px solid var(--border-lt);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 28px;
}
.guide-publisher-note--welcome {
  background: var(--gold-bg);
  border-color: rgba(180, 83, 9, 0.22);
}
.guide-publisher-note__label {
  font-size: 8pt;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 12px;
}
.guide-publisher-note__body {
  font-size: 9.5pt;
  color: var(--text-sec);
  line-height: 1.65;
}

.guide-channel-footer {
  margin-top: 48px;
  text-align: center;
  font-size: 7.5pt;
  color: var(--muted);
  border-top: 1px solid var(--border-lt);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.guide-channel-footer--internal .guide-channel-footer__protect {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.06em;
}
.guide-channel-footer__legal {
  color: #94a3b8;
}
