/* Xlooop chat-first cockpit · dark, governed, Linear-density */
:root {
  --bg:        oklch(0.155 0.005 240);
  --bg-soft:   oklch(0.185 0.006 240);
  --surface:   oklch(0.205 0.007 240);
  --surface-2: oklch(0.235 0.008 240);
  --surface-3: oklch(0.275 0.010 240);
  --border:    oklch(0.300 0.010 240);
  --border-soft: oklch(0.245 0.010 240);
  --text:      oklch(0.965 0.005 240);
  --text-mid:  oklch(0.780 0.008 240);
  --text-dim:  oklch(0.620 0.010 240);
  --text-faint:oklch(0.480 0.010 240);

  --teal:    oklch(0.78 0.11 195);  /* governed / live / accept */
  --teal-2:  oklch(0.62 0.12 200);
  --amber:   oklch(0.82 0.13 80);   /* needs review */
  --rose:    oklch(0.72 0.16 25);   /* blocked / restricted */
  --green:   oklch(0.78 0.12 150);  /* approved */
  --violet:  oklch(0.78 0.11 295);  /* learning */
  --sky:     oklch(0.80 0.10 230);  /* projection */

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 14px;
  --r-xl: 20px;

  --shadow: 0 1px 0 oklch(1 0 0 / 0.04) inset, 0 4px 18px oklch(0 0 0 / 0.35);

  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --sans: 'Geist', 'Söhne', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  /* ============================================================== */
  /* Round 6 Phase A2 (2026-05-19) · Cockpit redesign · category tokens.
   *
   * Four control categories, each with its own visual language. These
   * tokens are the canonical surface for status/mode/action/nav
   * styling; Phase A3 migrates Pill / Chip / Button primitives to
   * consume them via `category` props, deprecating the inline color-
   * name overrides ('amber'/'rose'/'green'/'plain') scattered today.
   *
   * Source of truth for which controls go where:
   *   src/runtime/labels.js · LABEL_REGISTRY[].kind
   *
   * Lint enforcement:
   *   scripts/verify-labels-registry.mjs (already wired into
   *   verify:current-integrity since Phase A1).
   *
   * Naming: --{category}-{role} where role ∈ {bg, fg, border, border-active}.
   * Specific colour tones (--teal/--amber/--rose/etc.) remain available
   * for opt-in pill variants (Phase A3 will map them onto the status
   * token set explicitly rather than spread across 40 call sites).
   * ============================================================== */

  /* status · informative read-only pill ·            role="status"   */
  --status-bg:           oklch(0.245 0.010 240 / 0.55);
  --status-fg:           var(--text-mid);
  --status-border:       transparent;
  --status-cursor:       default;

  /* mode · toggle chip · changes WHAT you see ·      role="tab|switch" */
  --mode-bg:             transparent;
  --mode-bg-active:      oklch(0.255 0.020 195 / 0.60);
  --mode-fg:             var(--text-mid);
  --mode-fg-active:      var(--text);
  --mode-border:         var(--border-soft);
  --mode-border-active:  var(--teal);
  --mode-cursor:         pointer;

  /* action · button · mutates state OR opens detail · role="button"  */
  --action-bg-primary:   var(--teal);
  --action-bg-ghost:     transparent;
  --action-fg-primary:   oklch(0.130 0.005 240);
  --action-fg-ghost:     var(--text);
  --action-border-ghost: var(--border);
  --action-cursor:       pointer;

  /* nav · link · URL change only · browser-back reversible · role="link" */
  --nav-fg:              var(--text-mid);
  --nav-fg-hover:        var(--text);
  --nav-fg-active:       var(--text);
  --nav-bg-active:       oklch(0.255 0.020 195 / 0.40);
  --nav-cursor:          pointer;
}

/* Category-scoped utility classes. Phase A3 will migrate widget code
 * to apply these via the Pill/Chip/Button category prop; until then,
 * any new component MAY consume them directly with .x-status, .x-mode,
 * .x-action, .x-nav as the canonical entry points. */

.x-status {
  background: var(--status-bg);
  color: var(--status-fg);
  border: 1px solid var(--status-border);
  cursor: var(--status-cursor);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 10.5px;
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Round 10b R10b.3 (2026-05-20) · StatusBadge / ActionButton / ContextChip
   primitive styling. Workspace-agnostic. Used by R10b.7 pilot integration
   in InlineEventsBoard + future surfaces. */

/* StatusBadge tones */
.x-status.x-tone-positive { background: oklch(0.78 0.12 150 / 0.18); color: oklch(0.88 0.12 150); }
.x-status.x-tone-warning  { background: oklch(0.82 0.13 80 / 0.18);  color: oklch(0.90 0.13 80); }
.x-status.x-tone-critical { background: oklch(0.72 0.16 25 / 0.18);  color: oklch(0.86 0.14 25); }
.x-status.x-tone-info     { background: oklch(0.78 0.11 195 / 0.18); color: oklch(0.88 0.10 195); }
.x-status.x-tone-accent   { background: oklch(0.78 0.11 295 / 0.18); color: oklch(0.88 0.11 295); }

.x-status.x-status-badge {
  padding: 1px 7px;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.x-status.x-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  padding: 0;
  background: var(--text-faint);
  border: none;
}
.x-status.x-status-dot.x-tone-positive { background: var(--green); }
.x-status.x-status-dot.x-tone-warning  { background: var(--amber); }
.x-status.x-status-dot.x-tone-critical { background: var(--rose); }
.x-status.x-status-dot.x-tone-info     { background: var(--teal); }
.x-status.x-status-dot.x-tone-accent   { background: var(--violet); }

/* ActionButton variants */
.x-action.x-action-primary {
  background: var(--action-bg-primary);
  color: var(--action-fg-primary);
  border-color: var(--action-bg-primary);
}
.x-action.x-action-secondary {
  background: var(--action-bg-ghost);
  color: var(--action-fg-ghost);
  border-color: var(--action-border-ghost);
}
.x-action.x-action-subtle {
  background: transparent;
  border-color: transparent;
  color: var(--text-mid);
  padding: 2px 6px;
}
.x-action.x-action-destructive {
  background: oklch(0.72 0.16 25 / 0.10);
  color: oklch(0.85 0.10 25);
  border-color: oklch(0.45 0.10 25 / 0.40);
}
.x-action.x-action-destructive:hover {
  background: oklch(0.72 0.16 25 / 0.20);
}
.x-action.x-action-sm {
  padding: 3px 9px;
  font-size: 11.5px;
}
.x-action.x-action-md {
  padding: 5px 12px;
  font-size: 13px;
}
.x-action.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.x-action-icon { display: inline-flex; align-items: center; }
.x-action-icon-right { margin-left: auto; }

/* ContextChip */
.x-context {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  font-size: 10.5px;
  color: var(--text-faint);
  background: transparent;
  border: 1px dashed var(--border-soft);
  border-radius: 4px;
  font-family: var(--mono);
  letter-spacing: 0.02em;
  cursor: default;
}
.x-context-dot {
  width: 5px; height: 5px; border-radius: 50%; background: var(--text-faint);
  display: inline-block;
}
.x-context-dot.x-context-dot-positive { background: var(--green); }
.x-context-dot.x-context-dot-warning  { background: var(--amber); }
.x-context-dot.x-context-dot-critical { background: var(--rose); }
.x-context-dot.x-context-dot-info     { background: var(--teal); }
.x-context-icon { display: inline-flex; align-items: center; }
.x-context-label { line-height: 1.4; }

/* Round 10b R10b.4 · FilterBar layout */
.x-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px 12px;
}
.x-filter-search {
  flex: 1 1 200px;
  min-width: 160px;
  max-width: 260px;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  color: var(--text);
  font-size: 11.5px;
  font-family: var(--sans);
}
.x-filter-search::placeholder { color: var(--text-faint); }
.x-filter-chips {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.x-mode-icon { display: inline-flex; align-items: center; }
.x-mode-label { line-height: 1.4; }
.x-mode-count {
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 999px;
  background: oklch(0.245 0.010 240 / 0.55);
  font-size: 10px;
  font-family: var(--mono);
  color: var(--text-faint);
}

/* Round 10b R10b.5 · ActiveFilterSummary */
.x-active-filter-summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 7px;
  background: oklch(0.255 0.020 195 / 0.16);
  border: 1px solid oklch(0.78 0.11 195 / 0.28);
  border-radius: 6px;
  font-size: 10.5px;
}
.x-active-filter-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  color: var(--text-mid);
}
.x-active-filter-item.x-active-filter-query {
  font-style: italic;
  font-family: var(--mono);
}
.x-active-filter-icon { color: var(--text-faint); }
.x-active-filter-remove {
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 0 2px;
  font-size: 11px;
  line-height: 1;
}
.x-active-filter-remove:hover { color: var(--rose); }
.x-active-filter-clear-all {
  margin-left: 4px;
  background: transparent;
  border: none;
  color: oklch(0.85 0.10 25);
  cursor: pointer;
  padding: 1px 6px;
  font-size: 10.5px;
  border-radius: 4px;
}
.x-active-filter-clear-all:hover { background: oklch(0.72 0.16 25 / 0.18); }

/* Round 10b R10b.5 · MoreFiltersPopover */
.x-more-filters { position: relative; display: inline-flex; }
.x-more-filters > summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-mid);
  font-size: 11px;
  cursor: pointer;
  list-style: none;
}
.x-more-filters > summary::-webkit-details-marker { display: none; }
.x-more-filters > summary:hover { color: var(--text); border-color: var(--teal); }
.x-more-filters[open] > summary { background: oklch(0.255 0.020 195 / 0.32); }
.x-more-filters-active-badge {
  min-width: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--teal);
  color: oklch(0.13 0.005 240);
  font-size: 9.5px;
  font-family: var(--mono);
}
.x-more-filters-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  box-shadow: 0 8px 28px oklch(0 0 0 / 0.32);
  min-width: 260px;
  max-width: 480px;
}

/* Round 10b R10b.6 · RecentSearches */
.x-recent-searches {
  margin-top: 6px;
  padding: 8px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  min-width: 220px;
}
.x-recent-searches-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.x-recent-searches-label {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  font-family: var(--mono);
}
.x-recent-searches-clear {
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 10.5px;
}
.x-recent-searches-clear:hover { color: var(--text); }
.x-recent-searches-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.x-recent-searches-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 4px;
  background: transparent;
  border: none;
  color: var(--text-mid);
  font-size: 11.5px;
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.x-recent-searches-item:hover {
  background: oklch(0.245 0.010 240 / 0.55);
  color: var(--text);
}
.x-mode {
  background: var(--mode-bg);
  color: var(--mode-fg);
  border: 1px solid var(--mode-border);
  cursor: var(--mode-cursor);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 11.5px;
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.x-mode[aria-selected='true'],
.x-mode[aria-pressed='true'],
.x-mode.on {
  background: var(--mode-bg-active);
  color: var(--mode-fg-active);
  border-color: var(--mode-border-active);
}
.x-action {
  background: var(--action-bg-ghost);
  color: var(--action-fg-ghost);
  border: 1px solid var(--action-border-ghost);
  cursor: var(--action-cursor);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.x-action.primary {
  background: var(--action-bg-primary);
  color: var(--action-fg-primary);
  border-color: var(--action-bg-primary);
}
.x-nav {
  color: var(--nav-fg);
  cursor: var(--nav-cursor);
  text-decoration: none;
  border-radius: 6px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.x-nav:hover { color: var(--nav-fg-hover); }
.x-nav.active,
.x-nav[aria-current='page'] {
  color: var(--nav-fg-active);
  background: var(--nav-bg-active);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
}

button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }

/* Stage 92 (2026-05-19) · CR1 fix part 2 · viewport-bind the chrome.
   Without these constraints, html/body/.frame grew to the content size
   (1207px when leftrail content was 1163px), so the entire page became
   scrollable at the browser level — moving all three columns together
   instead of letting each scroll independently. Bounding to 100vh keeps
   the grid cells viewport-sized so the per-cell overflow:auto rules
   (.leftrail above and .main-scroll at line ~327) take effect. The
   #root selector targets the React mount node added by index.html. */
html, body { height: 100%; margin: 0; overflow: hidden; }
#root      { height: 100%; overflow: hidden; }

/* ────────── Frame chrome ────────── */
.frame {
  background: var(--bg);
  color: var(--text);
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 220px 1fr 360px;
  /* Round 12 R12.24 (2026-05-20) · bottombar row removed per operator
     directive "remove the bottom bar - it has no use". The R6 Phase B3
     bottombar (originally for ephemeral status + the mobile drawer
     toggle) collapsed to 0 height on desktop anyway and added no
     unique mobile affordance. Grid is now 2-row: topbar + main. */
  grid-template-rows: 44px 1fr;
  grid-template-areas:
    "topbar topbar topbar"
    "leftrail main rightrail";
  font-family: var(--sans);
}
.frame.no-rail { grid-template-columns: 220px 1fr; grid-template-areas: "topbar topbar" "leftrail main"; }
.frame.solo    { grid-template-columns: 1fr; grid-template-areas: "topbar" "main"; }

/* Round 12 R12.4 (2026-05-20) · sidebar-collapsed frame layout. When the
 * operator hides the left rail, the .frame's left column collapses to 0
 * and the topbar surfaces a SidebarCollapseTopbarIcon as the re-open
 * affordance. Round 12 R12.13 (2026-05-20) extended to symmetric
 * rightrail-collapsed. Four combined cases:
 *   - default (3-col)               : topbar | leftrail | main | rightrail
 *   - leftrail-collapsed (2-col)    : topbar | main | rightrail
 *   - rightrail-collapsed (2-col)   : topbar | leftrail | main
 *   - both collapsed (1-col)        : topbar | main
 * The .solo and .no-rail variants compose with rightrail-collapsed for
 * narrow viewport edge-cases. */
/* Round 12 R12.23 (2026-05-20) · operator: "i cant drag with the mouse
   the side panel / bar.. it seems to be stuck now". Root cause: these
   collapse grid templates hardcoded the visible column widths (220px /
   360px) instead of using var(--left-w) / var(--right-w). When the
   operator dragged the leftrail to a custom width, my React state set
   --left-w on .frame inline style (computed correctly to e.g. 44px) BUT
   .frame.rightrail-collapsed's `grid-template-columns: 220px 1fr` won
   the cascade and pinned the left column at 220px regardless of var.
   Fix: switch the hardcoded widths to var(--left-w) / var(--right-w)
   so operator drag flows through whether or not the opposite rail is
   collapsed. */
.frame.leftrail-collapsed {
  grid-template-columns: 1fr var(--right-w, 360px);
  grid-template-areas:
    "topbar topbar"
    "main rightrail";
}
.frame.leftrail-collapsed.no-rail {
  grid-template-columns: 1fr;
  grid-template-areas:
    "topbar"
    "main";
}
.frame.rightrail-collapsed {
  grid-template-columns: var(--left-w, 220px) 1fr;
  grid-template-areas:
    "topbar topbar"
    "leftrail main";
}
.frame.leftrail-collapsed.rightrail-collapsed {
  grid-template-columns: 1fr;
  grid-template-areas:
    "topbar"
    "main";
}

/* Round 12 R12.19 (2026-05-20) · width-driven slim mode for the leftrail.
   Operator directive: "slim view when you drag the side of the panel with
   the mouse should show only icons - as before". When the operator drags
   the leftrail below ~130px wide, DesignFrame adds .x-rail-slim to the
   .leftrail aside; the rules below mirror the prior .frame.left-collapsed-
   mode .leftrail styling — labels hidden, items centered, workspace mini
   layout reduces to glyph + status. Width itself stays operator-set (NOT
   forced to 44px like the old slim cycle) so drag-resize remains smooth
   across the threshold. */
/* Round 12 R12.20 (2026-05-20) · operator follow-up: "all icons must be
   visible and only icons in the short view. Also they must be stacked
   together - since this is a slim view and aligned with all other icons
   in this column - like arrow, chat, and below". Tightened the slim
   rules: hide ALL secondary chrome (labels, ws-meta, open-chevrons,
   count badges, cross-workspace escalation), keep only the primary
   icon SVG per item. Tighten section + item padding so the icon stack
   is flush below the rail-size-toggle arrow. */
.leftrail.x-rail-slim .rail-label,
.leftrail.x-rail-slim .rail-item span:not(.dot):not(.count),
.leftrail.x-rail-slim .rail-item .ws-mini,
.leftrail.x-rail-slim .rail-item .ws-meta,
.leftrail.x-rail-slim .rail-item .ws-cross-escalation,
.leftrail.x-rail-slim .rail-item .ws-cross-escalation-wrap,
.leftrail.x-rail-slim .rail-item .x-status,
.leftrail.x-rail-slim .rail-item .x-context,
.leftrail.x-rail-slim .rail-foot {
  display: none;
}
/* rail-children has inline style display:flex on the container that
   normal CSS specificity can't beat — !important is the practical fix
   to remove the nested project rows from the slim view (operator's
   directive: "only icons" means top-level workspace + nav icons, NOT
   per-project rows that the operator would have to discriminate
   amongst at icon-only width). */
.leftrail.x-rail-slim .rail-children { display: none !important; }
.leftrail.x-rail-slim .rail-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
  min-height: 30px;
  gap: 0;
}
.leftrail.x-rail-slim .rail-section { gap: 1px; padding: 0; margin: 0 0 4px; }
.leftrail.x-rail-slim .rail-item:hover { background: oklch(0.245 0.010 240 / 0.55); }
/* Center the toggle arrow at the top of the slim rail so it aligns
   vertically with the icon stack below — the rail-size-toggle wraps
   the arrow button in an inline-flex span by default; in slim it
   becomes a centered block. */
.leftrail.x-rail-slim .rail-size-toggle {
  display: flex;
  justify-content: center;
  margin: 4px 0;
}

/* Round 12 R12.17 (2026-05-20) · operator-draggable rail-width handle.
   THE ONE primitive for both rails. Mounted absolutely on the rail's
   inside edge (leftrail right edge, rightrail left edge); 4px wide
   vertical strip; transparent default; subtle teal on hover; bright
   teal while dragging. Body class .x-rail-resize-active applied during
   drag so the col-resize cursor stays even outside the strip bounds
   and text selection is suppressed. */
.x-rail-resizable { position: relative; }
.x-rail-resize-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: transparent;
  cursor: col-resize;
  z-index: 30;
  transition: background-color 120ms ease;
}
.x-rail-resize-handle[data-side="left"] { right: -2px; }
.x-rail-resize-handle[data-side="right"] { left: -2px; }
.x-rail-resize-handle:hover,
.x-rail-resize-handle.is-dragging {
  background: oklch(0.78 0.11 195 / 0.55);
}
body.x-rail-resize-active {
  cursor: col-resize !important;
  user-select: none;
}
body.x-rail-resize-active * { cursor: col-resize !important; }

/* Round 12 R12.15 (2026-05-20) · topbar re-open affordance — icon-only
   compact down-chevron 24×24 with teal tint.
   Round 12 R12.16 (2026-05-20) · operator directive · "the whole icons
   and button must be like this" — referring to the rail-size toggle
   visible in slim mode (small ~30×22 button, surface bg, soft neutral
   border, no teal tint). Visual treatment now mirrors that pattern so
   the topbar re-open icon LOOKS like the rail-size toggle: same surface
   background, same border-soft color, same dimensions, same neutral
   text-faint default → text on hover. Operator's eye reads them as the
   same component family across the chrome. SVG remains a down-chevron
   as established in R12.15. */
.x-sidebar-collapse-topbar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 22px;
  margin-right: 8px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  color: var(--text-faint);
  cursor: pointer;
  flex-shrink: 0;
}
.x-sidebar-collapse-topbar-icon:hover {
  color: var(--text);
  background: var(--surface-3, oklch(0.245 0.010 240 / 0.55));
}
.x-sidebar-collapse-rail-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: calc(100% - 16px);
  margin: 6px 8px;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-mid);
  cursor: pointer;
  font-size: 10.5px;
}
.x-sidebar-collapse-rail-toggle:hover {
  color: var(--text);
  border-color: oklch(0.78 0.11 195 / 0.45);
}
.leftrail-footer {
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid var(--border-soft);
}

/* Round 6 Phase B3 · bottombar zone. Owns ephemeral state only (Feedback
 * mode toggle, future build/connection status). Default invisible when
 * empty; renders as a thin strip with the standard border-top when populated. */
.frame .bottombar {
  grid-area: bottombar;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 14px;
  min-height: 0;
  background: var(--bg-soft);
}
.frame .bottombar:not(:empty) {
  min-height: 28px;
  border-top: 1px solid var(--border-soft);
}

.frame .topbar {
  grid-area: topbar;
  display: grid;
  grid-template-columns: 1fr minmax(220px, 480px) 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-soft);
}
.frame .topbar .topbar-left   { justify-self: start;   display: flex; align-items: center; gap: 10px; min-width: 0; }
.frame .topbar .topbar-center { justify-self: stretch; display: flex; align-items: center; justify-content: center; min-width: 0; }
.frame .topbar .topbar-right  { justify-self: end;     display: flex; align-items: center; gap: 6px; min-width: 0; }

.topbar-center .search {
  width: 100%;
  max-width: 420px;
  height: 28px;
  display: flex; align-items: center; gap: 8px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  color: var(--text-faint);
  font-size: 12px;
  cursor: text;
  transition: border-color 0.15s, background 0.15s;
}
.topbar-center .search:hover { border-color: var(--border); background: var(--surface-2); }
.topbar-center .search span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-center .search kbd {
  font-family: var(--mono); font-size: 10px;
  padding: 1px 5px; border-radius: 3px;
  background: var(--bg-soft); border: 1px solid var(--border-soft);
  color: var(--text-faint); flex-shrink: 0;
}

/* Topbar action icons */
.topbar-action { position: relative; }
.notif-dot {
  position: absolute;
  top: 4px; right: 4px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 1.5px var(--bg-soft);
}

/* Topbar popovers (cmdk + notifications) */
.topbar-popover-anchor { position: relative; display: inline-flex; }

.cmdk-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: 380px;
  background: oklch(0.20 0.008 240 / 0.97);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 40px oklch(0 0 0 / 0.45);
  overflow: hidden;
  animation: fwdopen 200ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.cmdk-input {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-faint);
}
.cmdk-input input {
  flex: 1; background: transparent; border: none; outline: none;
  font: inherit; font-size: 13px; color: var(--text);
}
.cmdk-input kbd {
  font-family: var(--mono); font-size: 10px;
  padding: 1px 5px; border-radius: 3px;
  background: var(--bg-soft); border: 1px solid var(--border-soft);
  color: var(--text-faint);
}
.cmdk-section { padding: 4px; border-bottom: 1px solid var(--border-soft); }
.cmdk-section:last-child { border-bottom: none; }
.cmdk-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-faint); padding: 6px 8px 4px; font-weight: 500;
}
.cmdk-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 7px 9px;
  border-radius: 5px; background: transparent; border: none;
  font-size: 12.5px; color: var(--text-mid);
  cursor: pointer; text-align: left;
}
.cmdk-item:hover { background: var(--surface-2); color: var(--text); }
.cmdk-item .ico { color: var(--text-faint); }
.cmdk-item:hover .ico { color: var(--text); }
.cmdk-item .hint {
  margin-left: auto; font-family: var(--mono); font-size: 10px; color: var(--text-faint);
}

.notif-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: 360px;
  max-height: 480px;
  display: flex; flex-direction: column;
  background: oklch(0.20 0.008 240 / 0.97);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 40px oklch(0 0 0 / 0.45);
  overflow: hidden;
  animation: fwdopen 200ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.notif-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
}
.notif-head b { font-size: 13px; font-weight: 500; }
.notif-tabs {
  display: flex; gap: 2px; padding: 4px 8px;
  border-bottom: 1px solid var(--border-soft);
}
.notif-tab {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 5px;
  background: transparent; border: none; cursor: pointer;
  font-size: 11.5px; color: var(--text-mid);
}
.notif-tab:hover { background: var(--surface-2); color: var(--text); }
.notif-tab.on { background: var(--surface-3); color: var(--teal); }
.notif-tab .count {
  font-family: var(--mono); font-size: 10px;
  background: var(--bg-soft); padding: 0 5px; border-radius: 6px;
}
.notif-list { flex: 1; overflow-y: auto; }
.notif-row {
  display: grid; grid-template-columns: 14px 1fr; gap: 9px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-soft);
  cursor: pointer;
  align-items: start;
}
.notif-row:hover { background: oklch(1 0 0 / 0.02); }
.notif-row.is-unread { background: oklch(0.78 0.11 195 / 0.04); }
.notif-row .status-dot { margin-top: 5px; }
.notif-top {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px;
}
.notif-top b { font-weight: 500; color: var(--text); }
.notif-top time { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--text-faint); }
.notif-text {
  font-size: 11.5px; color: var(--text-dim);
  margin-top: 2px; line-height: 1.45;
}
/* Linear-style combined user pill */
.user-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0 7px 0 4px;
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-mid);
  font: inherit;
  height: 22px;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.user-pill:hover { background: oklch(1 0 0 / 0.025); border-color: var(--border); color: var(--text); }
.user-pill .user-pill-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
}
.user-pill-name {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-faint);
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.user-pill:hover .user-pill-name { color: var(--text-mid); }
.user-pill-chev { color: var(--text-faint); opacity: 0.6; }
.user-pill:hover .user-pill-chev { opacity: 1; }
.brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; letter-spacing: -0.01em;
}
/* Round 12 R12.26 (2026-05-20) · brand wordmark as clickable home button.
   Strips default button chrome (no border / background / padding) so it
   reads as a wordmark. Hover lightens the text to surface clickability;
   focus-visible ring is honored for keyboard nav. */
button.brand-home {
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: 600;
  letter-spacing: -0.01em;
}
button.brand-home:hover { color: var(--text); }
button.brand-home:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}
.brand-glyph {
  width: 20px; height: 20px; border-radius: 5px;
  background:
    radial-gradient(circle at 30% 30%, var(--teal) 0%, transparent 60%),
    linear-gradient(135deg, var(--teal-2), var(--violet));
  position: relative;
}
.brand-glyph::after {
  content: ''; position: absolute; inset: 4px;
  border: 1.5px solid oklch(0 0 0 / 0.45);
  border-radius: 2px;
}
.crumbs { display: flex; align-items: center; gap: 5px; color: var(--text-faint); font-size: 11px; min-width: 0; letter-spacing: 0.01em; }
.crumbs .sep { color: var(--text-faint); opacity: 0.35; }
.crumbs b { color: var(--text-mid); font-weight: 400; }
.crumbs .crumb-segment { color: var(--text-faint); font-weight: 400; opacity: 0.75; }
.crumbs .crumb-segment:last-child { color: var(--text-mid); opacity: 1; font-weight: 500; }
.crumbs .company { color: var(--text-faint); font-weight: 400; opacity: 0.65; }
.crumbs .role-chip {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  background: oklch(0.78 0.11 195 / 0.12);
  color: var(--teal);
  border: 1px solid oklch(0.78 0.11 195 / 0.25);
}

.search {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  width: 320px;
  color: var(--text-mid);
  font-size: 13px;
}
.search kbd {
  font-family: var(--mono); font-size: 11px;
  padding: 1px 5px; border-radius: 3px;
  background: var(--surface-2); border: 1px solid var(--border-soft);
  color: var(--text-dim);
}

.icon-btn {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); color: var(--text-mid);
}
.icon-btn:hover { background: var(--surface); color: var(--text); }

/* Topbar chat-quick-access — small, always-visible, becomes "change view" when on chat screen */
.icon-btn.topbar-chat { color: var(--text-mid); }
.icon-btn.topbar-chat.on {
  background: oklch(0.78 0.11 195 / 0.12);
  color: var(--teal);
}
.icon-btn.topbar-chat:hover { color: var(--teal); }

/* ────────── Ensure all main-scroll areas can actually scroll ────────── */
.frame .main          { overflow: hidden; }
.frame .main-scroll   { overflow-y: auto; height: 100%; }
.frame.solo .main-scroll { height: 100%; }

/* prevent inline events board from squashing — let it grow inside scroll */
.inline-events { flex-shrink: 0; }

/* topbar avatar dropdown menu */
.avatar { position: relative; cursor: pointer; }
.avatar:hover { filter: brightness(1.1); }
.avatar-menu-anchor { position: relative; display: inline-flex; }
.avatar-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  width: 280px;
  background: oklch(0.20 0.008 240 / 0.96);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 30px oklch(0 0 0 / 0.4);
  overflow: hidden;
  animation: fwdopen 200ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.avatar-menu-head {
  padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border-soft);
}
.avatar-menu-head .who { display: flex; flex-direction: column; min-width: 0; }
.avatar-menu-head .who b { font-size: 13px; color: var(--text); font-weight: 500; }
.avatar-menu-head .who span { font-size: 11px; color: var(--text-faint); font-family: var(--mono); }
.avatar-menu-section {
  padding: 6px;
  border-bottom: 1px solid var(--border-soft);
}
.avatar-menu-section:last-child { border-bottom: none; }
.avatar-menu-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-faint); padding: 4px 8px 2px; font-weight: 500;
}
.avatar-menu-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px;
  border-radius: 5px;
  font-size: 12.5px; color: var(--text-mid);
  cursor: pointer;
  background: transparent;
  border: none; width: 100%; text-align: left;
}
.avatar-menu-item:hover { background: var(--surface-2); color: var(--text); }
.avatar-menu-item .ico { color: var(--text-faint); flex-shrink: 0; }
.avatar-menu-item:hover .ico { color: var(--text); }
.avatar-menu-item .meta { margin-left: auto; font-size: 10.5px; color: var(--text-faint); font-family: var(--mono); }

/* feature flag toggle inline */
.ff-row {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 9px;
  font-size: 12px;
  color: var(--text-mid);
}
.ff-row b { font-weight: 500; color: var(--text); }
.ff-row .meta { font-size: 10.5px; color: var(--text-faint); }
.ff-toggle {
  margin-left: auto;
  width: 28px; height: 16px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border-soft);
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}
.ff-toggle::after {
  content: '';
  position: absolute;
  top: 1px; left: 1px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--text-mid);
  transition: transform 0.2s, background 0.2s;
}
.ff-toggle.on { background: oklch(0.78 0.11 195 / 0.4); border-color: var(--teal); }
.ff-toggle.on::after { background: var(--teal); transform: translateX(12px); }

/* Board rows inside the boards panel */
.avatar-menu .board-row {
  padding: 7px 9px;
  cursor: pointer;
  border-radius: 5px;
}
.avatar-menu .board-row:hover { background: var(--surface-2); }
.avatar-menu .board-row .board-icon {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 5px;
  flex-shrink: 0;
}
.avatar-menu .board-row .board-icon.kind-teal   { background: oklch(0.78 0.11 195 / 0.14); color: var(--teal); }
.avatar-menu .board-row .board-icon.kind-amber  { background: oklch(0.82 0.13 80 / 0.14);  color: var(--amber); }
.avatar-menu .board-row .board-icon.kind-green  { background: oklch(0.78 0.12 150 / 0.14); color: var(--green); }
.avatar-menu .board-row .board-icon.kind-violet { background: oklch(0.78 0.11 295 / 0.14); color: var(--violet); }
.avatar-menu .board-row .board-icon.kind-sky    { background: oklch(0.80 0.10 230 / 0.14); color: var(--sky); }
.avatar-menu .board-row .board-icon.kind-rose   { background: oklch(0.72 0.16 25 / 0.14);  color: var(--rose); }

.signed-out-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--text);
  padding: 24px;
}

.signed-out-card {
  width: min(480px, 100%);
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}

.signed-out-eyebrow {
  color: var(--teal);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.signed-out-card h1 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.2;
  font-weight: 600;
}

.signed-out-card p {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.signed-out-meta {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 8px 12px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  margin-bottom: 18px;
  font-size: 12px;
}

.signed-out-meta span {
  color: var(--text-faint);
  font-family: var(--mono);
}

.signed-out-meta b {
  color: var(--text);
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* chat takeover proportions — make it dramatically wider */
.frame.chat-takeover { --right-w: 320px; --left-w: 56px; }
.frame.chat-takeover .leftrail .rail-section + .rail-section,
.frame.chat-takeover .leftrail .rail-section { padding: 0; }
.frame.chat-takeover.rail-dismissed { --right-w: 32px; --left-w: 56px; }

/* the chat surface itself gets more vertical room + a wider composer */
.frame.chat-takeover .user-shell-grid.full-chat .agent-strip {
  min-height: 720px;
}
.frame.chat-takeover .user-shell-grid.full-chat .agent-strip-head {
  background: oklch(0.78 0.11 195 / 0.04);
  border-bottom: 1px solid oklch(0.78 0.11 195 / 0.15);
}
.frame.chat-takeover .user-shell-grid.full-chat .agent-recent {
  max-height: none;
  flex: 1;
  padding: 16px 18px;
}
.frame.chat-takeover .user-shell-grid.full-chat .agent-recent .line {
  padding: 6px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13.5px;
}
.frame.chat-takeover .user-shell-grid.full-chat .agent-composer {
  padding: 16px 20px;
  background: oklch(0.78 0.11 195 / 0.02);
  border-top: 1px solid oklch(0.78 0.11 195 / 0.15);
}
.frame.chat-takeover .user-shell-grid.full-chat .agent-composer textarea {
  min-height: 140px;
  font-size: 14.5px;
}

/* dominant project canvas — full-bleed working surface */
.project-canvas {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  margin: 0;
  overflow: hidden;
  position: relative;
  display: flex; flex-direction: column;
  flex: 1;
  min-height: 620px;
}
.project-canvas.is-fullscreen {
  position: fixed;
  inset: 44px 0 0 0;
  z-index: 80;
  border-radius: 0;
  border-left: none; border-right: none; border-bottom: none;
}
.project-canvas-head { min-height: 40px; }
.project-canvas-head .canvas-tools {
  display: inline-flex; gap: 4px; margin-left: 8px;
}
.canvas-tool {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 5px;
  color: var(--text-faint);
  background: transparent; border: 1px solid transparent;
  cursor: pointer;
}
.canvas-tool:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-soft); }
.canvas-tool.on    { background: var(--surface-3); color: var(--teal); border-color: oklch(0.78 0.11 195 / 0.3); }

/* freehand react-flow style board */
.flow-board {
  flex: 1;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, oklch(0.28 0.01 240 / 0.5) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--bg);
  cursor: grab;
}
.flow-board:active { cursor: grabbing; }
.flow-node {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 180px;
  box-shadow: 0 4px 14px oklch(0 0 0 / 0.3);
  cursor: grab;
  user-select: none;
}
.flow-node.intent   { border-color: oklch(0.82 0.13 80 / 0.35);  background: oklch(0.82 0.13 80 / 0.06); }
.flow-node.evidence { border-color: oklch(0.78 0.12 150 / 0.35); background: oklch(0.78 0.12 150 / 0.06); }
.flow-node.signoff  { border-color: oklch(0.78 0.11 195 / 0.35); background: oklch(0.78 0.11 195 / 0.06); }
.flow-node.decision { border-color: oklch(0.78 0.11 295 / 0.35); background: oklch(0.78 0.11 295 / 0.06); }
.flow-node.blocked  { border-color: oklch(0.72 0.16 25 / 0.4);   background: oklch(0.72 0.16 25 / 0.06); }
.flow-node .nh { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-faint); font-family: var(--mono); margin-bottom: 4px; }
.flow-node .nt { font-size: 12.5px; font-weight: 500; color: var(--text); line-height: 1.3; }
.flow-node .nm { font-size: 11px; color: var(--text-mid); margin-top: 4px; }
.flow-board svg.flow-edges { position: absolute; inset: 0; pointer-events: none; }
.flow-board svg path { stroke: oklch(0.78 0.11 195 / 0.5); stroke-width: 1.5; fill: none; }
.flow-board svg path.dashed { stroke-dasharray: 4 4; opacity: 0.6; }

.flow-mini-toolbar {
  position: absolute; bottom: 12px; left: 12px;
  display: flex; gap: 4px;
  background: oklch(0.20 0.008 240 / 0.92);
  border: 1px solid var(--border-soft);
  border-radius: 8px; padding: 4px;
  backdrop-filter: blur(8px);
  z-index: 5;
}
/* MultiPageBoard true fullscreen + flow view styles */
.mp-board {
  display: flex; flex-direction: column;
  height: 100%; min-height: 0;
  overflow: hidden;
}
.mp-board.mp-fullscreen {
  position: static !important; /* portal renders absolutely-positioned wrapper */
  height: 100% !important; width: 100% !important;
  inset: auto !important;
  border-radius: 0;
  border: none;
}
.mp-fs-portal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1000000;
  background: var(--bg);
  display: flex; flex-direction: column;
}
.mp-fs-portal .mp-board { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.mp-fs-portal .mp-viewport { flex: 1; min-height: 0; }
.mp-board.mp-fullscreen .mp-viewport {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  overflow: auto;
}
.mp-viewport { flex: 1 1 auto; min-height: 0; overflow: auto; position: relative; }
.mp-fs-btn {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 5px;
  color: var(--text-faint);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  margin-left: 4px;
}
.mp-fs-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-soft); }
.mp-view-toggle {
  display: inline-flex; align-items: center;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 1px;
}
.mp-view-toggle button {
  width: 24px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px;
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
}
.mp-view-toggle button.on { background: var(--surface-3); color: var(--teal); }

/* Freehand flow view of pages — CONTAINED inside its parent */
.flow-page-board {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, oklch(0.28 0.01 240 / 0.5) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--bg);
  cursor: grab;
}
.flow-page-board:active { cursor: grabbing; }
.flow-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 4000px; height: 4000px;
  pointer-events: none;
}
.flow-canvas > * { pointer-events: auto; }
.flow-page-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px oklch(0 0 0 / 0.3);
  cursor: grab;
}
.flow-page-card:hover { border-color: var(--border); }
.flow-page-card .mp-page-head {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 11px;
  background: var(--surface-2);
}
.flow-page-card .mp-page-head b { font-weight: 500; font-size: 11px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-page-card .mp-page-head .lbl { font-family: var(--mono); font-size: 9px; color: var(--text-faint); margin-left: auto; }
.flow-page-card .mp-page-body { display: flex; align-items: center; justify-content: center; }
.flow-page-card .flow-page-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 8px;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-soft);
}

/* drag handle dots on flow-page-card header */
.drag-handle {
  display: inline-grid;
  grid-template-columns: 2px 2px;
  gap: 2px;
  cursor: grab;
  margin-right: 4px;
}
.drag-handle span {
  width: 2px; height: 2px;
  border-radius: 50%;
  background: var(--text-faint);
}
.flow-page-card:hover .drag-handle span { background: var(--text-mid); }
.flow-page-card { transition: box-shadow 0.15s, border-color 0.15s; }
.flow-page-card:hover {
  border-color: var(--teal);
  box-shadow: 0 6px 24px oklch(0 0 0 / 0.4), 0 0 0 1px oklch(0.78 0.11 195 / 0.2);
}
.flow-page-card.is-selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px var(--teal), 0 6px 24px oklch(0 0 0 / 0.4);
}
.flow-page-card .mp-page-head {
  cursor: grab;
}
.flow-page-card .mp-page-head:active { cursor: grabbing; }

/* connection ports — only visible on hover */
.flow-page-card .port {
  position: absolute;
  width: 12px; height: 12px;
  background: var(--teal);
  border: 2px solid var(--bg);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  cursor: crosshair;
  z-index: 2;
}
.flow-page-card:hover .port,
.flow-page-card.is-selected .port { opacity: 1; }
.flow-page-card .port:hover { transform: scale(1.4); }
.flow-page-card .port-top    { top: -6px;    left: 50%;  transform: translateX(-50%); }
.flow-page-card .port-bottom { bottom: -6px; left: 50%;  transform: translateX(-50%); }
.flow-page-card .port-left   { left: -6px;   top: 50%;   transform: translateY(-50%); }
.flow-page-card .port-right  { right: -6px;  top: 50%;   transform: translateY(-50%); }
.flow-page-card:hover .port-top, .flow-page-card.is-selected .port-top { transform: translateX(-50%) scale(1); }
.flow-page-card:hover .port-bottom, .flow-page-card.is-selected .port-bottom { transform: translateX(-50%) scale(1); }
.flow-page-card:hover .port-left, .flow-page-card.is-selected .port-left { transform: translateY(-50%) scale(1); }
.flow-page-card:hover .port-right, .flow-page-card.is-selected .port-right { transform: translateY(-50%) scale(1); }

/* background dot grid */
.flow-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, oklch(0.30 0.01 240 / 0.5) 1px, transparent 1px);
  pointer-events: none;
}

/* marquee selection rectangle */
.flow-marquee {
  position: absolute;
  background: oklch(0.78 0.11 195 / 0.1);
  border: 1px dashed var(--teal);
  pointer-events: none;
  z-index: 4;
}

/* mini-map bottom-right */
.flow-minimap {
  position: absolute;
  right: 12px; bottom: 12px;
  background: oklch(0.18 0.008 240 / 0.92);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 4px;
  backdrop-filter: blur(8px);
  z-index: 6;
}

/* keyboard hint strip */
.flow-hint {
  position: absolute;
  top: 12px; left: 12px;
  display: flex; gap: 12px;
  background: oklch(0.18 0.008 240 / 0.85);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 10.5px;
  color: var(--text-faint);
  font-family: var(--mono);
  backdrop-filter: blur(8px);
  z-index: 6;
  max-width: calc(100% - 24px);
  overflow-x: auto;
}
.flow-hint b { color: var(--text-mid); font-weight: 500; }

/* Ensure the design-canvas artboard doesn't clip a fixed-position fullscreen child */
.om-design-canvas .om-dc-artboard { transform: none; }

/* hoist lane bar + project header into topbar tier.
   Round 12 R12.10 (2026-05-20) · operator reported lane chips on row 2
   were being hidden behind the canvas content. Root cause: this rule had
   `height: 36px` (locked to one row) + `overflow-x: auto`, so when the
   JSX inline `flexWrap: 'wrap'` pushed chips to a second row, the second
   row sat below the 36px clip and was scrolled-not-visible. Fix: switch
   to `min-height: 36px` (allows the supernav to grow when chips wrap)
   and drop the overflow-x — wrapping replaces horizontal scroll. The
   sticky + z-index 100 layering shipped in the JSX side of the same wave. */
.project-supernav {
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
  min-height: 36px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border-soft);
}
.project-supernav .proj-title {
  font-size: 13px; font-weight: 500; color: var(--text);
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.project-supernav .proj-title .muted { font-weight: 400; }
.project-supernav .lane-chip { padding: 3px 9px; font-size: 11.5px; }
.project-supernav .sep { width: 1px; height: 18px; background: var(--border-soft); }
.project-canvas-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: oklch(0.78 0.11 195 / 0.04);
  border-bottom: 1px solid var(--border-soft);
}
.project-canvas-head b { font-weight: 500; }
.project-canvas-body {
  flex: 1;
  display: flex;
  min-height: 0;
}
.project-canvas-body.cols-2 { grid-template-columns: 1fr 320px; }
.canvas-main { flex: 1; padding: 18px 22px; overflow-y: auto; }
.canvas-side { width: 320px; border-left: 1px solid var(--border-soft); padding: 14px 16px; background: var(--bg-soft); overflow-y: auto; }
.canvas-placeholder {
  border: 1px dashed var(--border);
  background: repeating-linear-gradient(135deg, transparent 0 8px, oklch(1 0 0 / 0.012) 8px 10px);
  border-radius: 8px;
  padding: 28px;
  font-family: var(--mono); font-size: 12px;
  color: var(--text-faint);
  text-align: center;
  min-height: 200px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.canvas-placeholder.compact {
  min-height: 160px;
  margin: 8px 0 0;
  padding: 18px;
}
.project-overview-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 360px;
  padding: 16px;
}
.project-overview-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface);
}
.project-overview-hero h2 {
  margin: 4px 0 6px;
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
}
.project-overview-hero p {
  margin: 0;
  max-width: 720px;
  color: var(--text-mid);
  line-height: 1.5;
}
.project-overview-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
}
.project-overview-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.project-overview-metric {
  display: flex;
  min-height: 92px;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface);
}
.project-overview-metric span {
  color: var(--text-faint);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.project-overview-metric b {
  color: var(--text);
  font-size: 24px;
  font-weight: 600;
}
.project-overview-metric small {
  color: var(--text-faint);
  line-height: 1.35;
}
.project-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  align-items: start;
  gap: 12px;
}
.project-overview-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface);
}
.project-overview-card .row-list { margin-top: 8px; }
.project-overview-card .row {
  background: transparent;
  border-radius: 8px;
}
.project-overview-card .row:hover { background: var(--surface-2); }
.project-overview-surface-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.project-overview-surface-list button {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.project-overview-surface-list button:hover {
  border-color: var(--teal);
  background: oklch(0.22 0.02 195 / 0.45);
}
.project-overview-surface-list b { display: block; font-weight: 600; }
.project-overview-surface-list small {
  display: block;
  margin-top: 3px;
  color: var(--text-faint);
  line-height: 1.35;
}
@media (max-width: 960px) {
  .project-overview-hero {
    flex-direction: column;
  }
  .project-overview-actions {
    justify-content: flex-start;
  }
  .project-overview-grid {
    grid-template-columns: 1fr;
  }
  .project-overview-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .project-overview-metrics {
    grid-template-columns: 1fr;
  }
}

/* ────────── Project canvas FULLSCREEN takeover ──────────
   When user enables canvas fullscreen, all chrome shrinks to thin reveal
   strips. The canvas itself fills the entire frame. Hover edges to peek.
*/
.frame.canvas-fullscreen {
  grid-template-rows: 0 1fr;
  grid-template-columns: 0 1fr 0;
}
.frame.canvas-fullscreen .topbar,
.frame.canvas-fullscreen .leftrail,
.frame.canvas-fullscreen .rightrail {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
}
.frame.canvas-fullscreen .main {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
}
.frame.canvas-fullscreen .project-header-slim,
.frame.canvas-fullscreen .lane-bar {
  display: none;
}
.frame.canvas-fullscreen .project-canvas {
  margin: 0;
  border-radius: 0;
  border: none;
  height: 100%;
  min-height: 0;
}

/* Reveal strips — hover any edge to bring back the relevant panel */
.fs-reveal {
  position: absolute;
  z-index: 60;
  background: oklch(0.20 0.008 240 / 0.0);
  transition: background 0.18s;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: var(--text-faint);
  pointer-events: auto;
}
.fs-reveal:hover { background: oklch(0.20 0.008 240 / 0.5); color: var(--text); }
.fs-reveal.top    { top: 0; left: 0; right: 0; height: 18px; }
.fs-reveal.left   { left: 0; top: 0; bottom: 0; width: 14px; }
.fs-reveal.right  { right: 0; top: 0; bottom: 0; width: 14px; }
.fs-reveal .ico   { opacity: 0.6; }

/* Quick action bar that floats inside fullscreen */
.fs-actions {
  position: absolute;
  top: 8px; right: 12px;
  z-index: 70;
  display: flex; gap: 6px;
  background: oklch(0.20 0.008 240 / 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  padding: 3px;
}
.fs-actions button {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px;
  color: var(--text-mid);
  background: transparent;
  border: none;
  cursor: pointer;
}
.fs-actions button:hover { background: var(--surface-2); color: var(--text); }
.fs-actions button.exit  { color: var(--teal); }

/* Fullscreen toggle on canvas head */
.canvas-fs-toggle {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 5px;
  color: var(--text-faint);
  background: transparent;
  border: none;
  cursor: pointer;
}
.canvas-fs-toggle:hover { background: var(--surface-2); color: var(--text); }

/* ────────── Multi-page board · scalable thumbnails → focus mode ────────── */
.mp-board {
  position: relative;
  background: oklch(0.13 0.006 240);
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  overflow: hidden;
  min-height: 460px;
  display: flex; flex-direction: column;
}
.mp-toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-soft);
  background: oklch(0.18 0.006 240 / 0.6);
}
.mp-toolbar .mp-zoom {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: 11px;
  color: var(--text-faint);
}
.mp-toolbar .mp-zoom input {
  width: 80px;
  accent-color: var(--teal);
}
.mp-toolbar .mp-pages {
  font-family: var(--mono); font-size: 11px; color: var(--text-faint);
}
.mp-toolbar .mp-back {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; color: var(--text-mid);
  background: transparent; border: 1px solid var(--border-soft);
  border-radius: 5px; padding: 3px 8px; cursor: pointer;
}
.mp-toolbar .mp-back:hover { color: var(--text); background: var(--surface-2); }

.mp-viewport {
  flex: 1;
  position: relative;
  overflow: auto;
  background: radial-gradient(circle at 50% 50%, oklch(0.18 0.005 240) 0%, oklch(0.10 0.005 240) 100%);
  background-image:
    linear-gradient(oklch(1 0 0 / 0.02) 1px, transparent 1px),
    linear-gradient(90deg, oklch(1 0 0 / 0.02) 1px, transparent 1px);
  background-size: 24px 24px;
}
.mp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  padding: 22px;
  transition: opacity 0.2s, transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mp-page {
  background: oklch(0.18 0.006 240);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
  min-height: 220px;
}
.mp-page:hover {
  transform: translateY(-2px);
  border-color: oklch(0.78 0.11 195 / 0.4);
  box-shadow: 0 12px 28px oklch(0 0 0 / 0.4);
}
.mp-page .mp-page-head {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 9px;
  background: oklch(0.20 0.007 240 / 0.7);
  border-bottom: 1px solid var(--border-soft);
  font-size: 11.5px;
}
.mp-page .mp-page-head b { font-weight: 500; color: var(--text); }
.mp-page .mp-page-head .lbl { color: var(--text-faint); font-family: var(--mono); font-size: 10px; margin-left: auto; }
.mp-page .mp-page-body {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  padding: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 10px; color: var(--text-faint);
}

/* Focus mode — one page enlarged */
.mp-focus {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column;
  background: oklch(0.13 0.006 240);
  animation: focusin 0.32s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes focusin {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
.mp-focus .mp-focus-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: oklch(0.20 0.007 240 / 0.9);
  border-bottom: 1px solid var(--border-soft);
}
.mp-focus .mp-focus-body {
  flex: 1; min-height: 0; overflow: auto;
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
  background: var(--bg);
}
.mp-focus .mp-focus-stage {
  background: oklch(0.22 0.005 240);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  width: min(900px, 100%);
  min-height: 480px;
  padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  position: relative;
}

/* Drawing-style page thumbnail */
.draw-thumb {
  width: 100%; height: 100%;
  position: relative;
  background: oklch(0.97 0.01 80);
  border-radius: 4px;
  overflow: hidden;
  color: oklch(0.3 0.01 80);
}
.draw-thumb svg { width: 100%; height: 100%; display: block; }
.draw-thumb .pin {
  position: absolute;
  width: 8px; height: 8px; border-radius: 50%;
  box-shadow: 0 0 0 2px oklch(1 0 0 / 0.6);
}

/* Edit affordance · in focus mode */
.edit-bar {
  display: flex; align-items: center; gap: 4px;
  padding: 4px;
  background: oklch(0.18 0.006 240 / 0.6);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
}
.edit-bar button {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 4px;
  color: var(--text-mid);
  background: transparent; border: none; cursor: pointer;
}
.edit-bar button:hover { background: var(--surface-2); color: var(--text); }
.edit-bar button.on { background: var(--surface-3); color: var(--teal); }
.avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--violet));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: oklch(0.15 0 0);
}
.avatar.sm { width: 20px; height: 20px; font-size: 9px; }
.avatar.xs { width: 16px; height: 16px; font-size: 8px; }

/* ────────── Left rail ────────── */
.leftrail {
  grid-area: leftrail;
  border-right: 1px solid var(--border-soft);
  background: var(--bg-soft);
  padding: 12px 8px;
  display: flex; flex-direction: column; gap: 14px;
  /* Stage 92 (2026-05-19) · CR1 fix · was overflow:hidden which clipped
     rail content below the fold on viewports <1200px tall (typical
     laptop ~900px). The rail has 28+ items on default route at scrollH
     1163px; at 1440x600 viewport 563px was invisible with no scrollbar.
     overflow-y:auto lets the rail scroll vertically when content
     exceeds cell height; overflow-x:hidden preserves the original
     horizontal-overflow clip (rail icons may animate with translateX
     during collapse modes). */
  overflow-y: auto;
  overflow-x: hidden;
}
.rail-section { display: flex; flex-direction: column; gap: 1px; }
.rail-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-faint); padding: 4px 10px; font-weight: 500;
}
.rail-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 10px; border-radius: var(--r-sm);
  color: var(--text-mid); font-size: 13px;
  cursor: pointer; user-select: none;
}
.rail-item:hover { background: var(--surface); color: var(--text); }
.rail-item.active { background: var(--surface-2); color: var(--text); }
.rail-item .count {
  margin-left: auto; font-size: 11px; color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.rail-item .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--teal);
}
.rail-foot { margin-top: auto; padding: 8px 10px; border-top: 1px solid var(--border-soft); display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); }

/* ────────── Right rail (OperationsLiveStream) ────────── */
.rightrail {
  grid-area: rightrail;
  border-left: 1px solid var(--border-soft);
  background: var(--bg-soft);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.rail-head {
  padding: 10px 14px 8px;
  min-height: 38px;
  display: flex; align-items: center;
  border-bottom: 1px solid var(--border-soft);
}
.rail-head h3 {
  margin: 0; font-size: 12.5px; font-weight: 500;
  display: flex; align-items: center; gap: 8px;
  color: var(--text-mid);
}

/* ────────── Hierarchy matrix · primary vs secondary ──────────
   PRIMARY    → operator cockpit events, business items, decisions
                · full-weight colour, full size, no opacity reduction
                · always visible
                · examples: event rows, sign-off card, intent packet, evidence row
   SECONDARY  → filters, scope toggles, view switches, tabs
                · linear-style chips: tiny, low-contrast, no fill until hover
                · operator learns them, doesn't need to read every time
                · examples: preset chips, lane chips, rail tabs, scope toggle
   ──────────────────────────────────────────────────────────── */

/* SECONDARY · linear-style filter chips */
.live-rail .filters {
  padding: 6px 10px 8px;
  display: flex; flex-wrap: wrap; gap: 2px;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid var(--border-soft);
}
.live-rail .filters .chip {
  height: 20px;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 400;
  border-radius: 4px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-faint);
  letter-spacing: 0.01em;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
}
.live-rail .filters .chip:hover {
  color: var(--text-mid);
  background: oklch(1 0 0 / 0.025);
}
.live-rail .filters .chip.on {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border-soft);
}

/* SECONDARY · rail tabs */
.rail-tabs {
  display: flex; align-items: center; gap: 1px;
  padding: 4px 8px 6px;
  border-bottom: 1px solid var(--border-soft);
  background: transparent;
}
.rail-tab {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 7px; border-radius: 4px;
  font-size: 10.5px; color: var(--text-faint);
  background: transparent; border: none; cursor: pointer;
  letter-spacing: 0.02em;
  font-weight: 400;
  transition: color 0.12s, background 0.12s;
}
.rail-tab:hover { color: var(--text-mid); background: oklch(1 0 0 / 0.025); }
.rail-tab.on { background: transparent; color: var(--text); border-bottom: none; box-shadow: inset 0 -1.5px 0 var(--teal); border-radius: 4px 4px 0 0; }
.rail-tab svg { opacity: 0.7; }

.rail-scope-toggle {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 6px;
  font-size: 10px; font-family: var(--mono);
  background: transparent;
  color: var(--text-faint);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  cursor: pointer;
  max-width: 110px;
  letter-spacing: 0.01em;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
}
.rail-scope-toggle:hover {
  color: var(--text-mid);
  background: oklch(1 0 0 / 0.025);
  border-color: var(--border);
}
.rail-scope-toggle.on {
  color: var(--teal);
  border-color: oklch(0.78 0.11 195 / 0.3);
}

/* SECONDARY · main-area preset chips (events board) */
.preset-chip {
  height: 22px;
  padding: 0 8px;
  font-size: 11.5px;
  font-weight: 400;
  border-radius: 4px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-faint);
  letter-spacing: 0.01em;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
}
.preset-chip:hover {
  color: var(--text-mid);
  background: oklch(1 0 0 / 0.025);
}
.preset-chip.on {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border-soft);
}
.preset-chip .count {
  background: transparent;
  color: var(--text-faint);
  font-size: 10px;
  padding: 0;
  border-radius: 0;
  margin-left: 4px;
}
.preset-chip.on .count { color: var(--text-mid); background: transparent; }

/* SECONDARY · lane chips inside project supernav */
.lane-chip {
  height: 22px;
  padding: 0 8px;
  font-size: 11.5px;
  font-weight: 400;
  border-radius: 4px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-faint);
  transition: color 0.12s, background 0.12s, border-color 0.12s;
}
.lane-chip:hover { color: var(--text-mid); background: oklch(1 0 0 / 0.025); }
.lane-chip.on {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border-soft);
}
.lane-chip .count { color: var(--text-faint); background: transparent; padding: 0; margin-left: 4px; }
.lane-chip.on .count { color: var(--text-mid); background: transparent; }

/* SECONDARY · density-compact override (don't make secondary chips chunkier when density compact is off) */
body.density-compact .preset-chip,
body.density-compact .lane-chip,
body.density-compact .rail-tab,
body.density-compact .live-rail .filters .chip { height: 20px; font-size: 11px; }
.rail-head h3 {
  margin: 0; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--teal);
  box-shadow: 0 0 0 3px oklch(0.78 0.11 195 / 0.18);
  animation: livepulse 2.4s ease-in-out infinite;
}
@keyframes livepulse {
  0%, 100% { box-shadow: 0 0 0 3px oklch(0.78 0.11 195 / 0.18); }
  50%      { box-shadow: 0 0 0 6px oklch(0.78 0.11 195 / 0.05); }
}
.rail-head small {
  font-size: 11px; color: var(--text-faint);
  font-family: var(--mono);
}
.rail-filters { display: flex; gap: 4px; padding: 8px 10px; flex-wrap: wrap; }

.stream { flex: 1; overflow-y: auto; padding: 0 4px 4px; }
.stream-row {
  padding: 10px 12px; border-bottom: 1px solid var(--border-soft);
  display: grid; grid-template-columns: 12px 1fr; gap: 8px;
  cursor: pointer;
}
.stream-row:hover { background: var(--surface); }
.stream-row .lane {
  width: 2px; height: 100%; border-radius: 1px; background: var(--text-faint);
}
.stream-row .lane.queued   { background: var(--text-dim); }
.stream-row .lane.running  { background: var(--teal); }
.stream-row .lane.blocked  { background: var(--rose); }
.stream-row .lane.needsrev { background: var(--amber); }
.stream-row .lane.approved { background: var(--green); }
.stream-row .lane.learning { background: var(--violet); }
.stream-row .head {
  display: flex; align-items: center; gap: 6px; font-size: 12.5px;
}
.stream-row .head b { font-weight: 500; color: var(--text); }
.stream-row .head time {
  margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--text-faint);
}
.stream-row .body {
  font-size: 12px; color: var(--text-dim); margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.stream-row .meta {
  display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap;
}

/* ────────── Pills, chips, badges ────────── */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 7px; border-radius: 999px;
  font-size: 10.5px; font-weight: 500; line-height: 1.6;
  font-family: var(--mono); letter-spacing: 0.01em;
  border: 1px solid var(--border-soft);
  color: var(--text-mid); background: var(--surface);
  white-space: nowrap;
}
.pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.pill.plain::before { display: none; }
.pill.teal   { color: var(--teal);   border-color: oklch(0.78 0.11 195 / 0.3); background: oklch(0.78 0.11 195 / 0.08); }
.pill.amber  { color: var(--amber);  border-color: oklch(0.82 0.13 80 / 0.3);  background: oklch(0.82 0.13 80 / 0.08); }
.pill.rose   { color: var(--rose);   border-color: oklch(0.72 0.16 25 / 0.3);  background: oklch(0.72 0.16 25 / 0.08); }
.pill.green  { color: var(--green);  border-color: oklch(0.78 0.12 150 / 0.3); background: oklch(0.78 0.12 150 / 0.08); }
.pill.violet { color: var(--violet); border-color: oklch(0.78 0.11 295 / 0.3); background: oklch(0.78 0.11 295 / 0.08); }
.pill.sky    { color: var(--sky);    border-color: oklch(0.80 0.10 230 / 0.3); background: oklch(0.80 0.10 230 / 0.08); }
.pill.muted  { color: var(--text-dim); }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: var(--r-sm);
  font-size: 12px; color: var(--text-mid);
  border: 1px solid var(--border-soft); background: var(--surface);
  cursor: default;
}
button.chip,
.chip[role="button"],
.live-rail .filters .chip,
.intent-suggestions .chip { cursor: pointer; }
button.chip:hover,
.chip[role="button"]:hover,
.live-rail .filters .chip:hover,
.intent-suggestions .chip:hover { background: var(--surface-2); color: var(--text); }
.chip.on { background: var(--surface-3); color: var(--text); border-color: var(--border); }

/* ────────── Buttons ────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 500;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border-soft);
  cursor: pointer;
}
.btn:hover { background: var(--surface-3); }
.btn.primary {
  background: var(--teal); color: oklch(0.18 0.02 200);
  border-color: oklch(0.78 0.11 195 / 0.4);
}
.btn.primary:hover { background: oklch(0.82 0.11 195); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-mid); }
.btn.ghost:hover { background: var(--surface); color: var(--text); }
.btn.sm { padding: 3px 8px; font-size: 12px; }

/* ────────── Main area ────────── */
.main {
  grid-area: main;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.main-scroll { flex: 1; overflow-y: auto; }

.section-pad { padding: 24px 32px; max-width: 1000px; margin: 0 auto; }

.h-eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-faint); font-weight: 500;
}

/* ────────── Composer (chat-first) ────────── */
.composer-hero {
  padding: 64px 32px 24px;
  max-width: 760px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 20px;
}
.composer-greeting {
  display: flex; flex-direction: column; gap: 6px;
}
.composer-greeting h1 {
  font-size: 28px; font-weight: 500; margin: 0;
  letter-spacing: -0.02em;
}
.composer-greeting h1 .accent { color: var(--teal); }
.composer-greeting p { color: var(--text-dim); margin: 0; font-size: 14px; }

.composer {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s;
}
.composer:focus-within { border-color: oklch(0.78 0.11 195 / 0.5); }
.composer textarea {
  width: 100%; min-height: 56px;
  background: transparent; border: none; resize: none;
  font-size: 15px; line-height: 1.5; color: var(--text);
  outline: none; font-family: inherit;
}
.composer textarea::placeholder { color: var(--text-faint); }
.composer-meta {
  display: flex; align-items: center; gap: 8px;
  border-top: 1px solid var(--border-soft);
  padding-top: 10px;
}
.composer-scope {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-dim);
}
.composer-meta .grow { flex: 1; }

.intent-suggestions {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.intent-suggestions .chip {
  font-size: 12px; padding: 4px 10px;
  color: var(--text-mid);
}

/* ────────── Quick rows ────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}
.q-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 4px;
  cursor: default;
}
button.q-card,
.q-card[role="button"],
.q-card[data-clickability-id] { cursor: pointer; }
button.q-card:hover,
.q-card[role="button"]:hover,
.q-card[data-clickability-id]:hover { background: var(--surface-2); }
.q-card .lbl { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; }
.q-card .val { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.q-card .sub { font-size: 12px; color: var(--text-dim); }

/* ────────── Row list ────────── */
.row-list { display: flex; flex-direction: column; }
.row {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-soft);
  cursor: default;
}
button.row,
.row[role="button"],
.row[data-clickability-id] { cursor: pointer; }
button.row:hover,
.row[role="button"]:hover,
.row[data-clickability-id]:hover { background: var(--surface); }
.row .left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row .mid  { min-width: 0; }
.row .mid .ttl { font-size: 13.5px; color: var(--text); }
.row .mid .sub { font-size: 12px; color: var(--text-dim); margin-top: 1px; }
.row .right { display: flex; align-items: center; gap: 6px; color: var(--text-faint); font-size: 12px; }
.row time { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }

.status-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--text-faint);
}
.status-dot.running { background: var(--teal); box-shadow: 0 0 0 3px oklch(0.78 0.11 195 / 0.15); }
.status-dot.blocked { background: var(--rose); }
.status-dot.needsrev{ background: var(--amber); }
.status-dot.approved{ background: var(--green); }
.status-dot.learning{ background: var(--violet); }
.status-dot.queued  { background: var(--text-dim); }

/* ────────── Section header ────────── */
.section-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0 8px;
}
.section-h h2 {
  font-size: 13px; font-weight: 500; margin: 0;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim);
}
.section-h .actions { display: flex; gap: 6px; }

/* ────────── Workspace cards ────────── */
.ws-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.ws-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  cursor: pointer;
}
.ws-card:hover { border-color: var(--border); background: var(--surface-2); }
.ws-card .hdr { display: flex; align-items: center; gap: 10px; }
.ws-glyph {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px; color: oklch(0.15 0 0);
}
.ws-glyph.mbp    { background: linear-gradient(135deg, var(--teal), var(--teal-2)); }
.ws-glyph.xcp    { background: linear-gradient(135deg, var(--violet), var(--sky)); }
.ws-glyph.xlooop { background: linear-gradient(135deg, var(--amber), var(--rose)); }
.ws-glyph.fin    { background: linear-gradient(135deg, var(--green), var(--teal)); }
.ws-glyph.con    { background: linear-gradient(135deg, var(--amber), var(--sky)); }
.ws-card .name { font-size: 14px; font-weight: 500; }
.ws-card .kind { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.ws-card .desc { font-size: 12.5px; color: var(--text-dim); line-height: 1.45; }
.ws-card .stats { display: flex; gap: 14px; font-size: 12px; color: var(--text-mid); }
.ws-card .stats b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ────────── Mode tabs (project shell) ────────── */
.mode-tabs {
  display: flex; align-items: center; gap: 2px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg);
}
.mode-tab {
  padding: 11px 14px;
  font-size: 13px; color: var(--text-dim);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  margin-bottom: -1px;
}
.mode-tab:hover { color: var(--text); }
.mode-tab.active { color: var(--text); border-bottom-color: var(--teal); }
.mode-tab .count {
  font-size: 11px; font-family: var(--mono);
  background: var(--surface-2);
  padding: 1px 5px; border-radius: 8px;
  color: var(--text-mid);
}

/* ────────── Generic table ────────── */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td {
  text-align: left; padding: 8px 12px;
  border-bottom: 1px solid var(--border-soft);
}
.tbl th { color: var(--text-faint); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.tbl td { color: var(--text); }
.tbl td.dim { color: var(--text-dim); }
.tbl tr:hover td { background: var(--surface); }
.tbl .mono { font-family: var(--mono); font-size: 11.5px; }

/* ────────── Intent packet detail ────────── */
.packet-grid {
  display: grid; grid-template-columns: 1fr 320px; gap: 20px;
  padding: 24px 32px;
}
.packet-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.packet-title { font-size: 18px; font-weight: 500; letter-spacing: -0.01em; margin: 0; }
.packet-body { font-size: 13.5px; color: var(--text-mid); line-height: 1.55; }
.packet-section {
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.packet-section h4 {
  margin: 0; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-faint); font-weight: 500;
}
.keyvals { display: grid; grid-template-columns: 110px 1fr; gap: 6px 14px; font-size: 13px; }
.keyvals dt { color: var(--text-faint); }
.keyvals dd { margin: 0; color: var(--text); }
.keyvals dd code { font-family: var(--mono); font-size: 12px; color: var(--text-mid); }

.context-panel {
  display: flex; flex-direction: column; gap: 10px;
}
.context-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.context-card h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-faint); margin: 0; font-weight: 500;
}
.context-card .row-mini {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-mid);
}
.context-card .row-mini b { color: var(--text); font-weight: 500; }

/* ────────── Lineage event rows ────────── */
.lineage {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--border-soft);
}
.lin-row {
  display: grid; grid-template-columns: 24px 130px 1fr 200px;
  gap: 14px; padding: 11px 16px;
  border-bottom: 1px solid var(--border-soft);
  align-items: center; cursor: pointer;
  font-size: 13px;
}
.lin-row:hover { background: var(--surface); }
.lin-row.expanded { background: var(--surface); }
.lin-row .when { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }
.lin-row .what b { font-weight: 500; }
.lin-row .what em { color: var(--text-dim); font-style: normal; }
.lin-row .who { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); justify-content: flex-end; }
.lin-detail {
  padding: 0 16px 12px 54px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 20px;
  font-size: 12px; color: var(--text-mid);
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
}
.lin-detail h5 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin: 8px 0 4px; font-weight: 500; }
.lin-detail code { font-family: var(--mono); font-size: 11px; color: var(--text); }

/* ────────── Critique artboard ────────── */
.critique {
  background: var(--bg);
  padding: 36px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 32px;
  font-family: var(--sans);
}
.critique h1 {
  font-size: 22px; font-weight: 500; margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.critique h2 {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--teal); font-weight: 500; margin: 0 0 10px;
}
.critique p { font-size: 13.5px; color: var(--text-mid); line-height: 1.55; margin: 0 0 10px; }
.critique ul { margin: 0; padding: 0 0 0 18px; color: var(--text-mid); font-size: 13.5px; line-height: 1.55; }
.critique ul li { margin: 4px 0; }
.critique .full { grid-column: 1 / -1; }
.critique .verdict {
  border: 1px solid oklch(0.78 0.11 195 / 0.3);
  background: oklch(0.78 0.11 195 / 0.06);
  border-radius: var(--r);
  padding: 18px 20px;
}
.critique .verdict h1 { color: var(--teal); }
.critique table.compare { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 6px; }
.critique table.compare th, .critique table.compare td {
  text-align: left; padding: 7px 10px;
  border-bottom: 1px solid var(--border-soft);
}
.critique table.compare th { color: var(--text-faint); font-weight: 500; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.critique table.compare td.bad { color: var(--rose); }
.critique table.compare td.good { color: var(--teal); }

.callout {
  border: 1px solid var(--border-soft);
  background: var(--surface);
  border-radius: var(--r);
  padding: 14px 16px;
  display: flex; gap: 12px;
}
.callout .lbl {
  font-family: var(--mono); font-size: 10px;
  color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.1em;
  padding-top: 2px;
}
.callout p { margin: 0; }

/* ────────── Contract anatomy ────────── */
.contract-pane {
  display: grid; grid-template-columns: 360px 1fr; gap: 0;
  background: var(--bg); height: 100%;
}
.contract-side {
  padding: 28px 28px;
  border-right: 1px solid var(--border-soft);
  background: var(--bg-soft);
  display: flex; flex-direction: column; gap: 14px;
}
.contract-side h1 { font-size: 22px; font-weight: 500; margin: 0; letter-spacing: -0.01em; }
.contract-side p { font-size: 13.5px; color: var(--text-mid); line-height: 1.55; margin: 0; }
.contract-side ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-mid); }
.contract-main {
  padding: 28px 28px;
  font-family: var(--mono); font-size: 12.5px;
  color: var(--text);
  overflow: auto;
}
.contract-main .json-key { color: var(--teal); }
.contract-main .json-str { color: var(--amber); }
.contract-main .json-num { color: var(--violet); }
.contract-main .json-com { color: var(--text-faint); }
.contract-main pre { margin: 0; line-height: 1.55; white-space: pre; }

/* ────────── Sign-off ────────── */
.signoff-grid {
  display: grid; grid-template-columns: 1fr 320px; gap: 20px;
  padding: 24px 32px;
}
.signoff-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.signoff-card h2 { margin: 0; font-size: 16px; font-weight: 500; }
.evidence-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.evidence-tile {
  border: 1px solid var(--border-soft);
  background: var(--bg-soft);
  border-radius: var(--r-sm);
  padding: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.evidence-tile .e-h { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.evidence-tile .e-h b { font-weight: 500; }
.evidence-tile .e-sub { font-size: 11.5px; color: var(--text-dim); font-family: var(--mono); }
.evidence-tile .e-tag { font-size: 10.5px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; }

.signoff-actions {
  display: flex; gap: 8px; padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}
.btn.approve {
  background: var(--green); color: oklch(0.15 0.04 150);
  border-color: oklch(0.78 0.12 150 / 0.4);
}
.btn.reject {
  background: transparent; color: var(--rose);
  border-color: oklch(0.72 0.16 25 / 0.4);
}

/* ────────── Workbench (domain-flex) ────────── */
.wb-tabs {
  display: flex; align-items: center; gap: 4px;
  padding: 16px 24px 0;
}
.wb-tab {
  padding: 8px 14px;
  font-size: 12.5px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  background: var(--surface); color: var(--text-mid);
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
}
.wb-tab.on { background: var(--surface-3); color: var(--text); border-color: var(--border); }
.wb-pane {
  margin: 14px 24px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  min-height: 240px;
  padding: 18px;
  display: flex; flex-direction: column; gap: 12px;
}
.wb-pane h3 { margin: 0; font-size: 14px; font-weight: 500; }
.wb-pane .placeholder {
  border: 1px dashed var(--border);
  border-radius: var(--r-sm);
  padding: 18px;
  font-family: var(--mono); font-size: 11px;
  color: var(--text-faint);
  background: repeating-linear-gradient(135deg, transparent 0 6px, oklch(1 0 0 / 0.012) 6px 8px);
}

/* ────────── Notes / annotations on hero artboard ────────── */
.note {
  position: absolute;
  background: oklch(0.82 0.13 80 / 0.95);
  color: oklch(0.2 0.02 80);
  font-size: 11px; font-weight: 500;
  padding: 4px 9px;
  border-radius: 4px;
  font-family: var(--sans);
  box-shadow: 0 4px 16px oklch(0 0 0 / 0.3);
  pointer-events: none;
}
.note::before {
  content: ''; position: absolute;
  width: 24px; height: 1px; background: oklch(0.82 0.13 80);
}
.note.left::before  { right: 100%; top: 50%; }
.note.right::before { left: 100%; top: 50%; }
.note.below::before { top: 100%; left: 20px; width: 1px; height: 18px; }

/* ────────── Learning ────────── */
.learn-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 8px;
}
.learn-card .l-h { display: flex; align-items: center; gap: 8px; }
.learn-card .l-h b { font-weight: 500; }
.learn-card .body { color: var(--text-mid); font-size: 13px; line-height: 1.5; }
.learn-card .footer { display: flex; gap: 6px; font-size: 11px; color: var(--text-faint); }

/* utility */
.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.mono  { font-family: var(--mono); }
.right { margin-left: auto; }
.divider { height: 1px; background: var(--border-soft); margin: 8px 0; }

/* scrollbar */
.stream::-webkit-scrollbar, .main-scroll::-webkit-scrollbar, .contract-main::-webkit-scrollbar { width: 8px; }
.stream::-webkit-scrollbar-thumb, .main-scroll::-webkit-scrollbar-thumb, .contract-main::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
