/* Live-app extensions to the godseye design system — tokens only, no new visual language. */
#ge-command .ge-access-grid { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
#ge-command .ge-task-row { display: flex; gap: 12px; align-items: flex-start; }
#ge-command .ge-task-row > div:first-of-type { min-width: 0; flex: 1; }
#ge-command .ge-task-row p, #ge-command .ge-task-row h3 { overflow-wrap: normal; word-break: normal; }
#ge-command .ge-note-section input.ge-select { font-size: 13px; width: 100% !important; max-width: none !important; box-sizing: border-box; }
#ge-command textarea { width: 100%; background: var(--ge-raised); color: var(--ge-text); border: 1px solid var(--ge-border); border-radius: 8px; padding: 10px 12px; font: inherit; font-size: 13px; line-height: 1.55; }

/* Extra shared tokens (dark defaults) so page styles and inline SVG never hardcode a theme. */
#ge-command {
  --ge-body-text: #d1dce5;
  --ge-row-border: #252e39;
  --ge-ok-bg: #16251f; --ge-ok-border: #2f4e42; --ge-ok-text: #cfeadb;
  --ge-warn-bg: #2b251a; --ge-warn-border: #5a4a30; --ge-warn-text: #e1cba7;
  --ge-graph-ring: #2b433a; --ge-graph-line: #3c554a; --ge-graph-line-active: #82c5a6;
  --ge-oncolor: #09241b; /* text set on top of the teal accent */
}

/* Top-right user menu (initials → tour, admin, profile settings, sign out). */
#ge-command .ge-user-wrap { position: relative; display: inline-flex; margin-left: 4px; }
#ge-command .ge-user-wrap #ge-me-avatar { width: 34px; height: 34px; border-radius: 50%; font-size: 12px; font-weight: 600; padding: 0; cursor: pointer; }
#ge-command .ge-user-menu { position: absolute; right: 0; top: 44px; min-width: 236px; background: var(--ge-panel); border: 1px solid var(--ge-border); border-radius: 10px; padding: 6px; display: none; z-index: 45; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
#ge-command .ge-user-wrap.open .ge-user-menu { display: block; }
#ge-command .ge-user-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--ge-row-border); margin-bottom: 6px; }
#ge-command .ge-user-head strong { display: block; font-size: 12.5px; font-weight: 500; }
#ge-command .ge-user-head small { display: block; color: var(--ge-muted); font-size: 11px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; }
#ge-command .ge-user-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--ge-text); font: inherit; font-size: 12px; text-decoration: none; }
#ge-command .ge-user-item svg { width: 15px; height: 15px; color: var(--ge-muted); }
#ge-command .ge-user-item:hover { background: var(--ge-raised); }
#ge-command .ge-user-item.ge-active { color: var(--ge-teal); background: var(--ge-teal-dim); }
#ge-command .ge-user-item.ge-active svg { color: var(--ge-teal); }
#ge-command .ge-user-item-danger { color: var(--ge-red); }
#ge-command .ge-user-item-danger svg { color: var(--ge-red); }
html[data-theme="light"] #ge-command .ge-user-menu { box-shadow: 0 16px 40px rgba(20, 30, 40, .18); }

/* Notification bell + popover. */
#ge-command .ge-bell-wrap { position: relative; display: inline-flex; }
#ge-command .ge-bell-wrap .ge-nav-count { right: -4px; top: -4px; }
#ge-command .ge-bell-panel { position: absolute; right: 0; top: 44px; width: 360px; max-width: calc(100vw - 32px); max-height: 420px; overflow: auto; background: var(--ge-panel); border: 1px solid var(--ge-border); border-radius: 10px; box-shadow: 0 18px 48px rgba(0, 0, 0, .35); z-index: 40; }
#ge-command .ge-bell-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--ge-border); font-size: 12px; }
#ge-command .ge-bell-item { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--ge-row-border); padding: 10px 14px; font: inherit; color: var(--ge-text); }
#ge-command .ge-bell-item:hover { background: var(--ge-raised); }
#ge-command .ge-bell-item.unread strong::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ge-teal); margin-right: 7px; vertical-align: middle; }
#ge-command .ge-bell-item strong { display: block; font-size: 12px; font-weight: 500; }
#ge-command .ge-bell-item small { display: block; color: var(--ge-muted); font-size: 11px; margin-top: 2px; }
#ge-command .ge-bell-empty { padding: 18px 14px; color: var(--ge-muted); font-size: 12px; }
/* Today view. */
#ge-command .ge-today-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
#ge-command .ge-today-grid .ge-panel { margin: 0; }
#ge-command .ge-today-row { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--ge-row-border); font-size: 12px; }
#ge-command .ge-today-row:last-child { border-bottom: 0; }
#ge-command .ge-today-row > div { min-width: 0; flex: 1; }
#ge-command .ge-today-row strong { font-weight: 500; }
#ge-command .ge-today-row small { display: block; color: var(--ge-muted); font-size: 11px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ge-command .ge-today-actions { display: flex; gap: 6px; flex-shrink: 0; }
#ge-command .ge-today-empty { padding: 14px 16px; color: var(--ge-muted); font-size: 12px; }
html[data-theme="light"] #ge-command .ge-bell-panel { box-shadow: 0 18px 48px rgba(20, 30, 40, .18); }

/* Performance view: token-only bars. */
#ge-command .ge-funnel { padding: 6px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
#ge-command .ge-funnel-row { display: grid; grid-template-columns: 90px 1fr 90px; align-items: center; gap: 10px; font-size: 12px; }
#ge-command .ge-funnel-row small { color: var(--ge-muted); text-align: right; }
#ge-command .ge-bar { height: 18px; background: var(--ge-raised); border: 1px solid var(--ge-border); border-radius: 5px; overflow: hidden; }
#ge-command .ge-bar > span { display: block; height: 100%; background: var(--ge-teal); opacity: .85; }
#ge-command .ge-weeks { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; align-items: end; height: 120px; padding: 10px 16px 4px; }
#ge-command .ge-week { display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; height: 100%; }
#ge-command .ge-week > span { display: block; border-radius: 3px 3px 0 0; min-height: 2px; }
#ge-command .ge-week .w-opened { background: var(--ge-blue); opacity: .8; }
#ge-command .ge-week .w-sent { background: var(--ge-teal); }
#ge-command .ge-week .w-replies { background: var(--ge-amber); }
#ge-command .ge-week-labels { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 0 16px 12px; font-size: 10px; color: var(--ge-muted); text-align: center; }
#ge-command .ge-legend { display: flex; gap: 14px; padding: 0 16px 12px; font-size: 11px; color: var(--ge-muted); }
#ge-command .ge-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
#ge-command .ge-import-box { padding: 0 16px 16px; }

/* Discovery table: actions live under the company name so no column can be clipped. */
#ge-command .ge-table-fixed { table-layout: fixed; width: 100%; }
#ge-command .ge-table-fixed th, #ge-command .ge-table-fixed td { overflow-wrap: anywhere; }
#ge-command .ge-table.ge-table-fixed th:nth-child(n) { width: auto; vertical-align: top; } /* out-specifies godseye's per-column th widths so the <colgroup> owns them: fixed px for the last columns, the rest share what is left */
#ge-command .ge-actions-cell { vertical-align: top; }
#ge-command .ge-row-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
#ge-command .ge-row-actions .ge-primary, #ge-command .ge-row-actions .ge-secondary { justify-content: center; white-space: nowrap; }
#ge-command .ge-row-actions .ge-primary, #ge-command .ge-row-actions .ge-secondary { padding: 6px 9px; font-size: 11px; }
#ge-command .ge-table-wrap td { white-space: normal; vertical-align: top; }
#ge-command .ge-table-wrap small a.ge-link-button svg { width: 12px; height: 12px; }

/* Sortable table headers (ascending / descending). */
/* Column-header sorting: the label is the header text itself, with ▲▼ sitting beside it inside the column. */
#ge-command .ge-th-sorts { display: flex; flex-wrap: wrap; gap: 4px 14px; }
#ge-command .ge-sort { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
#ge-command .ge-sort-btn { background: transparent; border: 0; border-radius: 3px; padding: 2px 3px; margin: -2px 0; font-size: 9px; line-height: 1; letter-spacing: 0; color: var(--ge-muted); opacity: .55; cursor: pointer; }
#ge-command .ge-sort-btn:first-of-type { margin-left: 3px; }
#ge-command .ge-sort-btn:hover { opacity: 1; color: var(--ge-text); }
#ge-command .ge-sort-btn.ge-sort-on { opacity: 1; color: var(--ge-teal); }

/* Rail flyout submenu (Intent → Intent / Discovered / Watchlist). Hover, focus or tap opens it. */
#ge-command .ge-nav-group { position: relative; width: 100%; }
#ge-command .ge-nav-group .ge-nav-caret { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); width: 11px; height: 11px; opacity: .55; }
#ge-command .ge-nav-flyout { position: fixed; min-width: 232px; background: var(--ge-panel); border: 1px solid var(--ge-border); border-radius: 10px; padding: 6px; display: none; z-index: 45; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
/* Flyouts are positioned by rail.js (viewport coordinates), so the scrolling nav cannot clip them. */
/* A rail that fits any viewport: the nav list scrolls (scrollbar hidden), logo and bottom block stay put. */
#ge-command .ge-rail { gap: 22px; padding-top: 16px; }
#ge-command nav#ge-nav { gap: 9px; }
#ge-command .ge-nav-item { padding: 9px 0 7px; }
@media (min-width: 651px) {
  #ge-command .ge-rail { min-height: 0; overflow: hidden; }
  #ge-command nav#ge-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; -ms-overflow-style: none; padding-bottom: 2px; }
  #ge-command nav#ge-nav::-webkit-scrollbar { display: none; }
  #ge-command .ge-rail-bottom { flex-shrink: 0; }
}
#ge-command .ge-nav-group.open .ge-nav-flyout { display: block; }
#ge-command .ge-flyout-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--ge-muted); font: inherit; font-size: 12px; text-decoration: none; position: relative; }
#ge-command .ge-flyout-item svg { width: 15px; height: 15px; flex-shrink: 0; }
#ge-command .ge-flyout-item span { display: flex; flex-direction: column; min-width: 0; }
#ge-command .ge-flyout-item small { font-size: 10.5px; color: var(--ge-muted); opacity: .8; margin-top: 1px; }
#ge-command .ge-flyout-item:hover { background: var(--ge-raised); color: var(--ge-text); }
#ge-command .ge-flyout-item.ge-active { color: var(--ge-teal); background: var(--ge-teal-dim); }
#ge-command .ge-flyout-count { margin-left: auto; min-width: 18px; text-align: center; background: var(--ge-teal-dim); color: var(--ge-teal); border-radius: 8px; padding: 1px 6px; font-size: 10px; font-weight: 600; }
html[data-theme="light"] #ge-command .ge-nav-flyout { box-shadow: 0 16px 40px rgba(20, 30, 40, .18); }

/* Rail items rendered as links (company page) look identical to the buttons. */
#ge-command a.ge-nav-item, #ge-command a.ge-symbol { text-decoration: none; }

/* Theme toggle: one button, two icons; the active theme decides which shows. */
#ge-command #ge-theme .ge-moon { display: none; }
html[data-theme="light"] #ge-command #ge-theme .ge-sun { display: none; }
html[data-theme="light"] #ge-command #ge-theme .ge-moon { display: block; }
/* Preference rows: label on the left, control on the right. */
#ge-command .ge-pref-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--ge-row-border); }
#ge-command .ge-pref-row:last-child { border-bottom: 0; }
#ge-command .ge-pref-row > div:first-child { min-width: 0; }
#ge-command .ge-pref-row strong { display: block; font-size: 12.5px; font-weight: 500; }
#ge-command .ge-pref-row small { display: block; color: var(--ge-muted); font-size: 11px; margin-top: 2px; }
#ge-command .ge-pref-row .ge-segments { flex-shrink: 0; }
#ge-command .ge-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ge-text); cursor: pointer; flex-shrink: 0; }
#ge-command .ge-switch input { width: 16px; height: 16px; accent-color: var(--ge-teal); }

/* Onboarding stage path: Signal → Qualified → Lead → In play. */
#ge-command .ge-path { display: flex; align-items: stretch; margin: 13px 0 0; padding: 0; list-style: none; border: 1px solid var(--ge-border); border-radius: 8px; overflow: hidden; background: var(--ge-raised); }
#ge-command .ge-path li { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 11px; letter-spacing: .5px; color: var(--ge-muted); padding: 9px 6px; border-right: 1px solid var(--ge-border); white-space: nowrap; }
#ge-command .ge-path li:last-child { border-right: 0; }
#ge-command .ge-path li svg { width: 13px; height: 13px; }
#ge-command .ge-path li.ge-path-done { color: var(--ge-teal); background: var(--ge-teal-dim); }
#ge-command .ge-path li.ge-path-current { color: var(--ge-oncolor); background: var(--ge-teal); font-weight: 600; }
#ge-command .ge-path li.ge-path-click:not(.ge-path-done) { color: var(--ge-text); }
#ge-command .ge-path li.ge-path-click:hover, #ge-command .ge-path li.ge-path-click:focus-visible { background: var(--ge-teal-dim); color: var(--ge-teal); box-shadow: inset 0 0 0 1px var(--ge-teal); }
#ge-command .ge-path.ge-path-ended { opacity: .55; }
@media (max-width: 650px) { #ge-command .ge-path li { flex-direction: column; gap: 3px; letter-spacing: .2px; } }

/* ------------------------------------------------------------------ */
/* Light theme — same components, inverted surfaces. Dark stays default. */
/* ------------------------------------------------------------------ */
html[data-theme="light"] body { background: #dde3e9; }
html[data-theme="light"] #ge-command {
  --ge-bg: #eef1f4; --ge-panel: #ffffff; --ge-raised: #f0f3f6; --ge-border: #d5dde4;
  --ge-text: #1b2733; --ge-muted: #5a6b7b;
  --ge-teal: #0e7d5a; --ge-teal-dim: #d9f1e6; --ge-blue: #3a5ec0; --ge-amber: #8a5c14; --ge-red: #b4494d;
  --ge-body-text: #3a4856; --ge-row-border: #e2e8ee;
  --ge-ok-bg: #e5f4ec; --ge-ok-border: #abd8c2; --ge-ok-text: #1d5b43;
  --ge-warn-bg: #f8efdc; --ge-warn-border: #d5b87e; --ge-warn-text: #6e5518;
  --ge-graph-ring: #b7d6c8; --ge-graph-line: #b3c9bf; --ge-graph-line-active: #2f9370;
  --ge-oncolor: #ffffff;
  color-scheme: light;
}
html[data-theme="light"] #ge-command .ge-rail { background: #e8edf1; }
html[data-theme="light"] #ge-command .ge-topbar { background: #eef2f5; }
html[data-theme="light"] #ge-command .ge-symbol { background: #d8f0e3; border-color: #a3d4bc; }
html[data-theme="light"] #ge-command .ge-nav-item.ge-active { background: #d9efe3; border-color: #aedcc5; }
html[data-theme="light"] #ge-command .ge-avatar { background: #dceae4; color: #274b3f; border-color: #b3cbc0; }
html[data-theme="light"] #ge-command .ge-me { background: #dfe4f0; color: #45536e; }
html[data-theme="light"] #ge-command .ge-search { background: #ffffff; }
html[data-theme="light"] #ge-command input::placeholder { color: #8494a3; }
html[data-theme="light"] #ge-command kbd { background: #e2e8ee; color: #5a6b7b; }
html[data-theme="light"] #ge-command .ge-icon-button { background: #f2f5f8; }
html[data-theme="light"] #ge-command .ge-icon-button:hover { background: #e1e8ef; }
html[data-theme="light"] #ge-command .ge-primary { background: #0f8a63; border-color: #0f8a63; color: #fff; }
html[data-theme="light"] #ge-command .ge-primary:hover { background: #0c7554; border-color: #0c7554; }
html[data-theme="light"] #ge-command .ge-secondary { background: #f2f5f8; border-color: #c8d3dd; }
html[data-theme="light"] #ge-command .ge-secondary:hover { background: #e3eaf1; }
html[data-theme="light"] #ge-command .ge-segments { background: #e7ecf0; }
html[data-theme="light"] #ge-command .ge-segments button.ge-selected { background: #ffffff; }
html[data-theme="light"] #ge-command .ge-snapshot span { color: #9aa8b6; }
html[data-theme="light"] #ge-command .ge-stat { background: linear-gradient(180deg, #ffffff, #f6f9fa); }
html[data-theme="light"] #ge-command .ge-stat-top svg { color: #6b7c8e; }
html[data-theme="light"] #ge-command .ge-live-label { background: #ddf1e7; border-color: #b0d9c5; }
html[data-theme="light"] #ge-command .ge-link-button:hover { color: #085c40; }
html[data-theme="light"] #ge-command .ge-nav-count { background: #d3eee2; color: #0d6a4b; }
html[data-theme="light"] #ge-command .ge-graph { background-image: radial-gradient(#64788a2e 1px, transparent 1px); }
html[data-theme="light"] #ge-command .ge-graph:before { background: radial-gradient(ellipse, #7fc4a83d, transparent 68%); }
html[data-theme="light"] #ge-command .ge-node { border-color: #c8d4de; background: #ffffff; box-shadow: 0 4px 16px rgba(20, 32, 42, .10); }
html[data-theme="light"] #ge-command .ge-node:hover, html[data-theme="light"] #ge-command .ge-node.ge-node-selected { background: #e0f2e9; border-color: #57a181; }
html[data-theme="light"] #ge-command .ge-person-node { border-color: #6aab8d; background: #e4f3ec; box-shadow: 0 0 0 7px #2f8a6516, 0 0 0 21px #2f8a6510; }
html[data-theme="light"] #ge-command .ge-person-node small { color: #33604e; }
html[data-theme="light"] #ge-command .ge-evidence-strip { background: #f1f5f8; }
html[data-theme="light"] #ge-command .ge-evidence-strip p { color: #3a4856; }
html[data-theme="light"] #ge-command .ge-profile-header .ge-avatar { background: #d8ebe1; }
html[data-theme="light"] #ge-command .ge-watch.ge-watched { background: #d5ecdf; }
html[data-theme="light"] #ge-command .ge-status { background: #d9f0e4; }
html[data-theme="light"] #ge-command .ge-status.amber { background: #f4e9d4; }
html[data-theme="light"] #ge-command .ge-status.blue { background: #e0e7f8; }
html[data-theme="light"] #ge-command .ge-question { background: #f8efdc; border-color: #cbab72; color: #6e5518; }
html[data-theme="light"] #ge-command .ge-next p { color: #394856; }
html[data-theme="light"] #ge-command .ge-table-head h2 span { background: #e8edf2; color: #5d6d7d; }
html[data-theme="light"] #ge-command .ge-select { background: #ffffff; border-color: #c9d4de; color: #26313c; }
html[data-theme="light"] #ge-command .ge-table th { color: #5f7080; background: #f2f5f8; }
html[data-theme="light"] #ge-command .ge-table td { border-color: #e2e8ee; }
html[data-theme="light"] #ge-command .ge-table tr.ge-current { background: #e4f2ea88; }
html[data-theme="light"] #ge-command .ge-table tr:hover td { background: #00000006; }
html[data-theme="light"] #ge-command .ge-footer { color: #67788a; }
html[data-theme="light"] #ge-command .ge-footer svg { color: #3f7d63; }
html[data-theme="light"] #ge-command .ge-footer span span { color: #8b9aa9; }
html[data-theme="light"] #ge-command .ge-event-icon { border-color: #b9d2c8; background: #e2f0e9; }
html[data-theme="light"] #ge-command .ge-source-logo { border-color: #c6d3de; background: #e9eff5; color: #3d5a86; }
html[data-theme="light"] #ge-command .ge-overlay { background: #93a0abc0; }
html[data-theme="light"] #ge-command .ge-dialog { background: #ffffff; border-color: #c6d1dc; box-shadow: 0 30px 70px rgba(15, 25, 35, .3); }
html[data-theme="light"] #ge-command .ge-dialog p { color: #3a4956; }
html[data-theme="light"] #ge-command .ge-dialog-choices button.ge-chosen { border-color: #58a583; background: #e0f2e9; }
html[data-theme="light"] #ge-command .ge-answer { background: #f7fafb; border-color: #dde5ec; }
html[data-theme="light"] #ge-command .ge-answer ul { color: #3c4b59; }
html[data-theme="light"] #ge-command .ge-permission-control { color: #3c4b59; }
html[data-theme="light"] #ge-command textarea { background: #ffffff; border-color: #c7d2dc; color: #26313c; }
html[data-theme="light"] #ge-command #ge-toast { background: #e6f6ec; color: #175339; border-color: #7fc39e; box-shadow: 0 12px 30px rgba(20, 30, 40, .25); }

/* ---- Top bar: brand on the left, one wide search box in the centre, controls on the right ----
   A three-column grid from 900px up so the search box sits on the bar's true centre line; below
   that the base flex rules take over (and wrap the search onto its own row under 650px). */
#ge-command .ge-topbar-right { display: flex; align-items: center; gap: 20px; margin-left: auto; flex-shrink: 0; }
#ge-command .ge-search-wrap { position: relative; flex: 1 1 auto; min-width: 0; max-width: 640px; margin-left: auto; }
#ge-command .ge-search-wrap .ge-search { max-width: none; width: 100%; margin: 0; box-sizing: border-box; padding: 9px 12px; }
#ge-command .ge-search-wrap .ge-search input { flex: 1; min-width: 0; }
#ge-command .ge-search:focus-within { border-color: var(--ge-teal); }
@media (min-width: 900px) {
  #ge-command .ge-topbar { display: grid; grid-template-columns: minmax(max-content, 1fr) minmax(300px, 2fr) minmax(max-content, 1fr); align-items: center; }
  #ge-command .ge-brand { grid-column: 1; }
  #ge-command .ge-search-wrap { grid-column: 2; justify-self: center; width: 100%; margin: 0; }
  #ge-command .ge-topbar-right { grid-column: 3; justify-self: end; margin-left: 0; }
}
@media (max-width: 650px) {
  #ge-command .ge-search-wrap { order: 4; flex-basis: 100%; max-width: none; margin: 0; }
  #ge-command .ge-topbar-right { gap: 10px; }
}

/* Search results drop down under the box: grouped, keyboard-navigable, matched text lit. */
#ge-command .ge-search-results { position: absolute; left: 0; right: 0; min-width: min(360px, calc(100vw - 120px)); top: calc(100% + 6px); background: var(--ge-panel); border: 1px solid var(--ge-border); border-radius: 10px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); z-index: 46; max-height: min(70vh, 540px); overflow: auto; padding: 6px; }
#ge-command .ge-search-group { font-size: 10px; letter-spacing: 1.6px; color: var(--ge-muted); padding: 8px 10px 4px; }
#ge-command .ge-search-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; color: var(--ge-text); text-decoration: none; font-size: 13px; cursor: pointer; }
#ge-command .ge-search-item.ge-active { background: var(--ge-raised); }
#ge-command .ge-search-ico { width: 28px; height: 28px; border-radius: 7px; background: var(--ge-raised); border: 1px solid var(--ge-border); display: grid; place-items: center; color: var(--ge-muted); flex-shrink: 0; }
#ge-command .ge-search-item.ge-active .ge-search-ico { color: var(--ge-teal); }
#ge-command .ge-search-main { flex: 1; min-width: 0; }
#ge-command .ge-search-main strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ge-command .ge-search-main small { display: block; color: var(--ge-muted); font-size: 11px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ge-command .ge-search-side { color: var(--ge-muted); font-size: 11px; white-space: nowrap; flex-shrink: 0; }
#ge-command .ge-search-item mark { background: transparent; color: var(--ge-teal); font-weight: 600; }
#ge-command .ge-search-empty { padding: 14px 12px; color: var(--ge-muted); font-size: 12px; line-height: 1.5; }
#ge-command .ge-search-foot { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px 4px; margin-top: 4px; border-top: 1px solid var(--ge-row-border); font-size: 10px; letter-spacing: .4px; color: var(--ge-muted); }
html[data-theme="light"] #ge-command .ge-search-results { box-shadow: 0 16px 40px rgba(20, 30, 40, .18); }
@media (max-width: 899px) { #ge-command .ge-search-side { display: none; } } /* narrow box: keep the name legible, drop the right-hand detail */

/* ---- Radar: signals on the map ---- */
#ge-command .ge-radar-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; justify-content: flex-end; }
#ge-command .ge-radar-filter { display: flex; flex-direction: column; gap: 4px; }
#ge-command .ge-radar-filter span { font-size: 10px; letter-spacing: 1.4px; color: var(--ge-muted); }
#ge-command .ge-radar-filter .ge-select { max-width: 280px; min-width: 180px; }
#ge-command .ge-count-pill { display: inline-block; margin-left: 8px; font-weight: 400; font-size: 11px; color: var(--ge-muted); }
#ge-command .ge-radar-map-wrap { position: relative; margin: 4px 16px 10px; }
#ge-command .ge-radar-map { height: clamp(440px, 56vh, 600px); border: 1px solid var(--ge-border); border-radius: 9px; overflow: hidden; background: var(--ge-raised); } /* taller on tall screens: the popup's height limit follows the map's */
#ge-command .ge-radar-note { position: absolute; left: 10px; bottom: 10px; z-index: 1200; /* above Leaflet panes (400) and controls (1000) */ display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 6px; background: var(--ge-warn-bg); border: 1px solid var(--ge-warn-border); color: var(--ge-warn-text); font-size: 11px; pointer-events: none; }
#ge-command .ge-radar-note svg { width: 13px; height: 13px; }
#ge-command .ge-radar-empty { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; color: var(--ge-muted); font-size: 12px; text-shadow: 0 1px 2px var(--ge-bg); z-index: 1100; }
#ge-command .ge-radar-fail { padding: 24px; color: var(--ge-red); font-size: 12px; }
#ge-command .ge-radar-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 0 16px 14px; font-size: 11px; color: var(--ge-muted); }
#ge-command .ge-radar-legend span { display: inline-flex; align-items: center; gap: 6px; }
#ge-command .ge-legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
#ge-command .ge-legend-hollow { background: transparent; border: 2px solid var(--ge-muted); }
#ge-command .ge-event-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; align-items: center; }
#ge-command .ge-event.ge-current { background: var(--ge-teal-dim); margin: 0 -18px; padding-left: 18px; padding-right: 18px; border-radius: 8px; }
#ge-command .ge-event-links .ge-link-button { margin-top: 0; min-height: 0; } /* the Show-on-map button lines up with its sibling links */
@media (max-width: 650px) {
  #ge-command .ge-radar .ge-panel-head { flex-wrap: wrap; }
  #ge-command .ge-radar-filters { width: 100%; justify-content: flex-start; }
  #ge-command .ge-radar-filter { flex: 1 1 140px; min-width: 0; }
  #ge-command .ge-radar-filter .ge-select { min-width: 0; max-width: none; width: 100%; }
}
/* the signal summary card shown inside a map popup (Google InfoWindow or Leaflet popup) */
#ge-command .ge-map-card { color: var(--ge-text); font-size: 12px; line-height: 1.5; max-width: 320px; }
#ge-command .ge-map-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
#ge-command .ge-map-card-head svg { width: 14px; height: 14px; color: var(--ge-teal); }
#ge-command .ge-map-card-head strong { font-size: 13px; }
#ge-command .ge-map-card p { margin: 0 0 6px; }
#ge-command .ge-map-card small { color: var(--ge-muted); font-size: 11px; display: block; }
#ge-command .ge-map-card-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
#ge-command .ge-map-card-actions a { text-decoration: none; }
#ge-command .gm-style .gm-style-iw-c { background: var(--ge-panel); border-radius: 10px; padding: 12px 14px !important; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); border: 1px solid var(--ge-border); }
#ge-command .gm-style .gm-style-iw-d { overflow: auto !important; padding-right: 8px; }
#ge-command .gm-style .gm-style-iw-tc::after { background: var(--ge-panel); }
#ge-command .gm-style .gm-ui-hover-effect > span { background-color: var(--ge-muted); }
#ge-command .leaflet-container { background: var(--ge-raised); font-family: inherit; }
#ge-command .ge-tiles-dark { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9) saturate(.6); }
#ge-command .leaflet-popup-content-wrapper, #ge-command .leaflet-popup-tip { background: var(--ge-panel); color: var(--ge-text); box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
#ge-command .leaflet-popup-content-wrapper { border: 1px solid var(--ge-border); border-radius: 10px; }
#ge-command .leaflet-popup-content { margin: 12px 14px; line-height: 1.5; }
#ge-command .leaflet-container a.leaflet-popup-close-button { color: var(--ge-muted); }
#ge-command .leaflet-control-zoom a { background: var(--ge-panel); color: var(--ge-text); border-color: var(--ge-border); }
#ge-command .leaflet-control-attribution { background: rgba(9, 13, 18, .6); color: var(--ge-muted); font-size: 10px; }
#ge-command .leaflet-control-attribution a { color: var(--ge-teal); }
#ge-command .leaflet-tooltip { background: var(--ge-panel); color: var(--ge-text); border-color: var(--ge-border); }
#ge-command .leaflet-tooltip-top::before { border-top-color: var(--ge-panel); }
#ge-command .leaflet-control-zoom a:hover, #ge-command .leaflet-control-zoom a:focus { background: var(--ge-raised); }
#ge-command .leaflet-control-zoom a.leaflet-disabled { background: var(--ge-raised); color: var(--ge-muted); opacity: .45; }
html[data-theme="light"] #ge-command .leaflet-control-attribution { background: rgba(255, 255, 255, .75); }
html[data-theme="light"] #ge-command .gm-style .gm-style-iw-c, html[data-theme="light"] #ge-command .leaflet-popup-content-wrapper, html[data-theme="light"] #ge-command .leaflet-popup-tip { box-shadow: 0 16px 40px rgba(20, 30, 40, .18); }
/* One pin per company: its card lists every signal placed there. The popup body (Google's or Leaflet's)
   is the scroller, so the company line stays pinned at the top and the actions at the bottom. */
#ge-command .gm-style .gm-style-iw-d, #ge-command .leaflet-popup-scrolled { scrollbar-width: thin; scrollbar-color: var(--ge-border) transparent; }
#ge-command .leaflet-popup-scrolled { border-top: 0; border-bottom: 0; }
#ge-command .ge-map-card-head { position: sticky; top: 0; z-index: 1; background: var(--ge-panel); padding-bottom: 4px; margin-bottom: 0; }
#ge-command .ge-map-card-where { margin-bottom: 6px; }
#ge-command .ge-map-card-list { display: grid; gap: 4px; }
#ge-command .ge-map-sig { padding: 4px 6px 4px 8px; border-left: 2px solid var(--ge-border); border-radius: 0 6px 6px 0; }
#ge-command .ge-map-sig.ge-current { background: var(--ge-teal-dim); border-left-color: var(--ge-teal); }
#ge-command .ge-map-sig-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 2px; }
#ge-command .ge-map-sig-head svg { width: 12px; height: 12px; color: var(--ge-muted); flex: none; }
#ge-command .ge-map-sig-head small { display: inline; margin-left: auto; font-size: 10px; white-space: nowrap; }
#ge-command .ge-map-sig-head small a { color: var(--ge-teal); }
#ge-command .ge-map-sig p { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } /* the full claim sits in the list below the map */
#ge-command .ge-map-card-actions { position: sticky; bottom: 0; z-index: 1; background: var(--ge-panel); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--ge-row-border); }
#ge-command .ge-map-card-actions .ge-secondary { min-height: 0; }
/* Leaflet pins: a coloured disc that carries the signal count when a company has more than one. */
#ge-command .ge-pin-icon { background: none; border: 0; }
#ge-command .ge-pin { display: grid; place-items: center; width: 100%; height: 100%; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--pin); background: var(--pin); color: var(--ge-panel); font-size: 10px; font-weight: 700; line-height: 1; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
#ge-command .ge-pin-hollow { background: transparent; background: color-mix(in srgb, var(--pin) 14%, transparent); color: var(--pin); }
#ge-command .ge-legend-count { width: 14px; height: 14px; display: inline-grid; place-items: center; background: var(--ge-muted); color: var(--ge-panel); font-size: 9px; font-weight: 700; font-style: normal; line-height: 1; }

/* ---- Intent cards + the chips input (terms and country autocomplete) ---- */
#ge-command .ge-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; padding: 0 16px 16px; }
#ge-command .ge-intent-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--ge-border); border-radius: 9px; background: var(--ge-raised); min-width: 0; }
#ge-command .ge-intent-card header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
#ge-command .ge-intent-card header strong { font-size: 13px; }
#ge-command .ge-intent-card p { margin: 0; font-size: 12px; color: var(--ge-body-text); line-height: 1.5; }
#ge-command .ge-intent-card footer { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: auto; padding-top: 4px; }
#ge-command .ge-intent-card-off { opacity: .62; }
#ge-command .ge-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
#ge-command .ge-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 4px; background: var(--ge-teal-dim); color: var(--ge-teal); font-size: 11px; line-height: 1.4; max-width: 100%; }
#ge-command .ge-chip small { color: var(--ge-muted); font-size: 10px; }
#ge-command .ge-chip-term { background: var(--ge-panel); border: 1px solid var(--ge-border); color: var(--ge-text); }
#ge-command .ge-chip-muted { background: transparent; border: 1px dashed var(--ge-border); color: var(--ge-muted); }
#ge-command .ge-chip-x { position: relative; background: none; border: 0; color: inherit; opacity: .7; padding: 0 0 0 2px; font-size: 13px; line-height: 1; cursor: pointer; min-height: 0 !important; }
#ge-command .ge-chip-x::before { content: ""; position: absolute; inset: -9px -6px; } /* invisible ~24px hit area for touch, no layout shift */
#ge-command .ge-chip-x:hover { opacity: 1; }
#ge-command .ge-chips { position: relative; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 8px; min-height: 40px; border: 1px solid var(--ge-border); border-radius: 6px; background: var(--ge-raised); }
#ge-command .ge-chips:focus-within { border-color: var(--ge-teal); }
#ge-command .ge-chips-input { flex: 1 1 140px; min-width: 120px; background: transparent; border: 0; outline: none; color: var(--ge-text); font: inherit; font-size: 12px; padding: 4px 2px; }
#ge-command .ge-chips-menu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 60; background: var(--ge-panel); border: 1px solid var(--ge-border); border-radius: 8px; box-shadow: 0 16px 40px rgba(0, 0, 0, .35); max-height: 220px; overflow: auto; padding: 4px; }
#ge-command .ge-chips-menu button { display: flex; width: 100%; align-items: center; gap: 8px; text-align: left; padding: 7px 10px; border: 0; border-radius: 6px; background: none; color: var(--ge-text); font-size: 12px; cursor: pointer; min-height: 0 !important; }
#ge-command .ge-chips-menu button small { margin-left: auto; color: var(--ge-muted); }
#ge-command .ge-chips-menu button.ge-active, #ge-command .ge-chips-menu button:hover { background: var(--ge-raised); }
#ge-command .ge-danger-link { color: var(--ge-red); }
html[data-theme="light"] #ge-command .ge-chips-menu { box-shadow: 0 16px 40px rgba(20, 30, 40, .18); }

/* Intent tags on signal rows: the cards a signal matches and the relevance gate's verdict. */
#ge-command .ge-intent-tags { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 5px 0 2px; }
#ge-command .ge-intent-tags .ge-chip { min-height: 0; padding: 2px 7px; font-size: 10.5px; letter-spacing: .2px; line-height: 1.4; }
#ge-command .ge-intent-tags button.ge-chip { border: 0; cursor: pointer; }
#ge-command .ge-intent-tags button.ge-chip:hover, #ge-command .ge-intent-tags button.ge-chip:focus-visible { background: var(--ge-teal); color: var(--ge-panel); }
#ge-command .ge-intent-tags .ge-chip svg { width: 11px; height: 11px; }
#ge-command .ge-chip-gated { background: var(--ge-warn-bg); border: 1px solid var(--ge-warn-border); color: var(--ge-warn-text); }
#ge-command .ge-chip-judged { background: var(--ge-panel); border: 1px solid var(--ge-border); color: var(--ge-muted); }

/* The map's own layers (Leaflet panes 400/1000, Google controls far higher) live in their own
   stacking context, so rail flyouts, menus, search results and the dialog always sit above the map. */
#ge-command .ge-radar-map-wrap, #ge-command .ge-radar-map { position: relative; z-index: 0; isolation: isolate; }
/* The sticky rail and top bar are stacking contexts of their own; without a z-index they sit at level 0
   and any positioned block later in the page (the map) paints over their flyouts and dropdowns. Kept
   below the dialog overlay (10). */
#ge-command .ge-rail, #ge-command .ge-topbar { z-index: 5; }

/* ---- Today: one ranked focus list, then context, then the noise the system kept away ---- */
#ge-command .ge-today-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: -6px 0 18px; }
#ge-command .ge-today-bar .ge-segments + .ge-segments { margin-left: 4px; }
#ge-command .ge-today-seg { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#ge-command .ge-focus-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 13px; border-bottom: 1px solid var(--ge-row-border); border-left: 3px solid var(--ge-border); font-size: 12px; }
#ge-command .ge-focus-row:last-child { border-bottom: 0; }
#ge-command .ge-focus-now { border-left-color: var(--ge-teal); }
#ge-command .ge-focus-today { border-left-color: var(--ge-blue); }
#ge-command .ge-focus-soon { border-left-color: var(--ge-amber); }
#ge-command .ge-focus-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: 11px; font-weight: 600; background: var(--ge-raised); border: 1px solid var(--ge-border); color: var(--ge-text); font-variant-numeric: tabular-nums; }
#ge-command .ge-focus-main { flex: 1; min-width: 0; }
#ge-command .ge-focus-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#ge-command .ge-focus-title strong { font-weight: 500; font-size: 12.5px; }
#ge-command .ge-focus-title svg { width: 14px; height: 14px; color: var(--ge-muted); flex-shrink: 0; }
#ge-command .ge-focus-main small { display: block; color: var(--ge-muted); font-size: 11px; margin-top: 3px; line-height: 1.45; }
#ge-command .ge-focus-done { padding: 26px 18px; text-align: center; color: var(--ge-muted); font-size: 12px; line-height: 1.6; }
#ge-command .ge-focus-done strong { display: block; color: var(--ge-text); font-size: 14px; margin-bottom: 4px; }
#ge-command .ge-noise { display: block; }
#ge-command .ge-noise summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ge-text); }
#ge-command .ge-noise summary::-webkit-details-marker { display: none; }
#ge-command .ge-noise summary svg { width: 15px; height: 15px; color: var(--ge-muted); flex-shrink: 0; transition: transform .16s ease; }
#ge-command .ge-noise[open] summary > svg:first-child { transform: rotate(90deg); }
#ge-command .ge-noise summary small { color: var(--ge-muted); font-size: 11px; margin-left: auto; text-align: right; }
#ge-command .ge-noise-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0 16px; border-top: 1px solid var(--ge-row-border); }
#ge-command .ge-noise-col { padding: 10px 16px 14px; min-width: 0; }
#ge-command .ge-noise-col h3 { margin: 0 0 6px; font-size: 11px; letter-spacing: 1.2px; font-weight: 500; color: var(--ge-muted); }
#ge-command .ge-noise-col .ge-today-row { padding: 7px 0; }
#ge-command .ge-today-hidden { padding: 12px 16px 0; color: var(--ge-muted); font-size: 11px; }
/* Status chips never wrap or shrink; in a checklist row the text takes the room and the chip sits at the end. */
#ge-command .ge-status { white-space: nowrap; flex: none; }
#ge-command .ge-source-row > div:nth-child(2) { flex: 1 1 240px; min-width: 0; }

/* Plan & billing: the three plans side by side, built on the stat card. */
#ge-command .ge-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-bottom: 18px; }
#ge-command .ge-plan { display: flex; flex-direction: column; gap: 10px; }
#ge-command .ge-plan.ge-plan-current { border-color: var(--ge-teal); }
#ge-command .ge-plan ul { margin: 0; padding-left: 17px; font-size: 11px; color: var(--ge-muted); display: grid; gap: 5px; }
#ge-command .ge-plan-action { margin-top: auto; min-height: 45px; }
@media (max-width: 900px) { #ge-command .ge-plan-grid { grid-template-columns: 1fr; } }
