/* ═══════════════════════════════════════════════════════
   ITGC1 — Design Tokens
   ═══════════════════════════════════════════════════════ */
:root {
  --bg: #0a0e14; --bg2: #111822; --bg3: #182030;
  --border: #1e2a3a; --border2: rgba(255,255,255,.12);
  --text: #e0e6ed; --muted: #7a8899; --accent: #3b82f6; --accent-dim: #1e3a5f;
  --ok: #10b981; --ok-bg: rgba(16,185,129,.08);
  --warn: #f59e0b; --warn-bg: rgba(245,158,11,.08);
  --danger: #ef4444; --danger-bg: rgba(239,68,68,.08);
  --teal: #14b8a6; --purple: #a855f7;
  --font: 'Segoe UI', system-ui, sans-serif;
  --mono: 'Cascadia Code', 'Consolas', monospace;
  --mx-frozen-w: 470px;
}

/* ═══════════════════════════════════════════════════════
   Reset & Base
   ═══════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; width: 100%; overflow: hidden; background: var(--bg); color: var(--text); font: 12px/1.5 var(--font); }
a { color: var(--accent); text-decoration: none; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.15); }

/* ═══════════════════════════════════════════════════════
   Gate
   ═══════════════════════════════════════════════════════ */
#gate { display: flex; align-items: center; justify-content: center; height: 100vh; background: var(--bg); position: relative; overflow: hidden; }
#gate::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 50%, rgba(59,130,246,.06) 0%, transparent 60%), radial-gradient(ellipse at 70% 60%, rgba(20,184,166,.04) 0%, transparent 50%); animation: gate-ambient 12s ease-in-out infinite alternate; pointer-events: none; }
@keyframes gate-ambient { 0% { opacity: .6; } 100% { opacity: 1; } }
#gate.hidden { display: none; }
.gate-card { background: rgba(17,24,34,.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(59,130,246,.15); border-radius: 16px; padding: 36px 32px; width: 360px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.03); animation: gate-card-in .5s cubic-bezier(.16,1,.3,1) both; }
@keyframes gate-card-in { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.gate-card h1 { font-size: 22px; margin-bottom: 4px; font-weight: 800; background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.gate-card p { font-size: 12px; color: var(--muted); margin-bottom: 20px; }
.gate-input { width: 100%; padding: 12px 16px; background: rgba(10,14,20,.8); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-size: 18px; text-align: center; letter-spacing: 5px; outline: none; margin-bottom: 14px; transition: border-color .2s, box-shadow .2s; }
.gate-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,.12); }
.gate-btn { width: 100%; padding: 12px; background: linear-gradient(135deg, var(--accent) 0%, #2563eb 100%); border: none; border-radius: 10px; color: #fff; font-weight: 700; cursor: pointer; font-size: 14px; transition: filter .15s, transform .1s; }
.gate-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.gate-btn:active { transform: translateY(0); }
.gate-err { color: var(--danger); font-size: 11px; min-height: 18px; margin-top: 8px; }
.gate-hint { font-size: 10px; color: var(--muted); margin-top: 8px; opacity: .7; }

/* ═══════════════════════════════════════════════════════
   Shell Layout
   ═══════════════════════════════════════════════════════ */
#app { display: none; flex-direction: column; height: 100vh; width: 100%; max-width: 100vw; overflow: hidden;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cpath d='M0 60L30 0h60l30 60-30 60H30z' fill='none' stroke='%23ffffff' stroke-width='.3' opacity='.06'/%3E%3Cpath d='M60 0l30 60-30 60' fill='none' stroke='%23ffffff' stroke-width='.2' opacity='.04'/%3E%3Cpath d='M0 60l60-30 60 30' fill='none' stroke='%23ffffff' stroke-width='.2' opacity='.04'/%3E%3Ccircle cx='30' cy='0' r='1.2' fill='%233b82f6' opacity='.07'/%3E%3Ccircle cx='90' cy='0' r='1.2' fill='%233b82f6' opacity='.07'/%3E%3Ccircle cx='0' cy='60' r='1.2' fill='%233b82f6' opacity='.07'/%3E%3Ccircle cx='60' cy='60' r='1' fill='%233b82f6' opacity='.1'/%3E%3Ccircle cx='120' cy='60' r='1.2' fill='%233b82f6' opacity='.07'/%3E%3Ccircle cx='30' cy='120' r='1.2' fill='%233b82f6' opacity='.07'/%3E%3Ccircle cx='90' cy='120' r='1.2' fill='%233b82f6' opacity='.07'/%3E%3C/svg%3E");
  background-size: 120px 120px;
}
#app.active { display: flex; }
/* Dock layout — fills below command bar */
#dockLayout { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; background: var(--bg, #0a0e14); }
/* dock-zone rules moved to core/ui/dice-panel.css */
#workspace { display: flex; flex: 1; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; background: transparent; transition: opacity .3s ease; }

/* ═══════════════════════════════════════════════════════
   Triforce Layout — Three Projections
   ═══════════════════════════════════════════════════════ */
/* ── View theme tints ── */
#app.view-matrix { --view-accent: var(--view-matrix, #3b82f6); --view-bg-tint: color-mix(in srgb, var(--view-matrix, #3b82f6) 2%, transparent); }
#app.view-sphere { --view-accent: var(--view-sphere, #14b8a6); --view-bg-tint: color-mix(in srgb, var(--view-sphere, #14b8a6) 3%, transparent); }
#app.view-tree { --view-accent: var(--view-tree, #f59e0b); --view-bg-tint: color-mix(in srgb, var(--view-tree, #f59e0b) 3%, transparent); }
#workspace { background: var(--view-bg-tint, transparent); }
.cmd-bar { border-bottom-color: color-mix(in srgb, var(--view-accent, #3b82f6) 15%, var(--border)); }

/* ── Standard/Company toggle ── */
.scope-toggle { display: flex; align-items: center; gap: 4px; font-size: 9px; color: var(--muted); flex-shrink: 0; }
.scope-toggle-label { font-weight: 600; text-transform: uppercase; letter-spacing: .3px; cursor: default; }
.scope-toggle-label.active { color: var(--view-accent, var(--accent)); }
.scope-slider { width: 28px; height: 14px; border-radius: 7px; background: var(--bg3); border: 1px solid var(--border); cursor: pointer; position: relative; transition: background .2s; }
.scope-slider::after { content: ''; position: absolute; top: 2px; left: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); transition: left .2s; }
.scope-slider.company::after { left: 16px; background: var(--ok); }
.scope-slider.company { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.3); }

/* Legacy IDs kept for backward compat — now dice-panel windows render these */
.triforce-view { display: none; flex: 1; flex-direction: column; min-height: 0; overflow: hidden; opacity: 1; transition: opacity .3s ease; }
.triforce-view.active { display: flex; animation: view-fade-in .3s ease both; }
.triforce-view.fade-out { opacity: 0; }
@keyframes view-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ── Sidebar personnel (tree mode) ── */
.sr-personnel { max-height: 140px; overflow-y: auto; border-bottom: 1px solid var(--border); scrollbar-width: thin; }
.sr-personnel::-webkit-scrollbar { width: 3px; }
.sr-personnel::-webkit-scrollbar-thumb { background: rgba(245,158,11,.2); border-radius: 2px; }
.sr-personnel-title { font-size: 8px; font-weight: 700; color: rgba(245,158,11,.7); text-transform: uppercase; letter-spacing: .5px; padding: 4px 6px 2px; border-bottom: 1px solid rgba(245,158,11,.15); }
.sr-person { display: flex; align-items: center; gap: 4px; padding: 2px 6px; cursor: pointer; transition: background .1s; }
.sr-person:hover { background: rgba(245,158,11,.08); }
.sr-person-avatar { flex-shrink: 0; width: 16px; height: 16px; border-radius: 50%; background: rgba(245,158,11,.18); color: #f59e0b; font-size: 7px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.sr-person-name { font-size: 8px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.sr-person-count { font-size: 7px; color: var(--muted); font-family: var(--mono); }

/* ── Sidebar drill breadcrumb (sphere mode) ── */
.sr-breadcrumb { padding: 6px 8px; border-bottom: 1px solid var(--border); font-size: 9px; color: var(--muted); display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.sr-bc-seg { cursor: pointer; color: var(--view-accent, var(--accent)); font-weight: 600; }
.sr-bc-seg:hover { text-decoration: underline; }
.sr-bc-sep { color: var(--border2); padding: 0 2px; }

/* ── Sidebar thread list (tree mode) ── */
.sr-threads { border-top: 1px solid var(--border); overflow-y: auto; max-height: 120px; scrollbar-width: thin; }
.sr-threads-title { font-size: 8px; font-weight: 700; color: rgba(129,140,248,.7); text-transform: uppercase; letter-spacing: .5px; padding: 4px 6px 2px; }
.sr-thread { padding: 2px 6px; font-size: 8px; color: var(--text); cursor: pointer; display: flex; align-items: center; gap: 4px; }
.sr-thread:hover { background: rgba(129,140,248,.06); }
.sr-thread-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.sr-thread-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#viewSphere { position: relative; }
#viewSphere canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#viewTree { position: relative; }
#viewTree canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ═══════════════════════════════════════════════════════
   Zone 1: Title Bar (slim command bar)
   ═══════════════════════════════════════════════════════ */
.cmd-bar { display: flex; align-items: center; gap: 6px; padding: 0 10px; height: 38px; background: var(--bg2); border-bottom: 1px solid var(--border); font-size: 11px; flex-shrink: 0; flex-wrap: nowrap; overflow: hidden; position: relative; z-index: 6500; }
.cmd-sphere-link { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(34,211,238,.08); border: 1px solid rgba(34,211,238,.2); color: #22d3ee; text-decoration: none; font-size: 12px; transition: all .2s; flex-shrink: 0; }
.cmd-sphere-link:hover { background: rgba(34,211,238,.2); border-color: rgba(34,211,238,.5); }
.cmd-title { font-weight: 700; font-size: 13px; color: var(--text); white-space: nowrap; }
.cmd-bc { display: flex; align-items: center; gap: 2px; color: var(--muted); font-size: 10px; overflow: hidden; }
.bc-seg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.bc-sep { color: var(--border2); padding: 0 2px; }
.cmd-div { width: 1px; height: 18px; background: var(--border); flex-shrink: 0; }
.cmd-spacer { flex: 1 1 0; min-width: 0; }
.cmd-import-btn { padding: 3px 10px; border-radius: 4px; border: 1px solid var(--border); background: transparent; color: var(--text); font-size: 10px; cursor: pointer; flex-shrink: 0; }
.cmd-import-btn:hover { border-color: var(--accent); color: var(--accent); }
.cmd-panel-btn { padding: 3px 10px; border-radius: 4px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; transition: all .15s; flex-shrink: 0; white-space: nowrap; }
.cmd-panel-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(59,130,246,.06); }
.cmd-export { position: relative; flex-shrink: 0; }
.cmd-export-btn { padding: 3px 10px; border-radius: 4px; cursor: pointer; font-size: 10px; color: var(--text); border: 1px solid var(--border); }
.cmd-export-btn:hover { border-color: var(--accent); color: var(--accent); }
.cmd-export-menu { display: none; position: fixed; min-width: 180px; background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; z-index: 9000; overflow: hidden; box-shadow: 0 6px 20px rgba(0,0,0,.5); }
.cmd-export-menu.open { display: block; }
.cmd-export-menu button { display: block; width: 100%; padding: 8px 14px; background: none; border: none; color: var(--text); text-align: left; font-size: 11px; cursor: pointer; }
.cmd-export-menu button:hover { background: rgba(59,130,246,.06); }

/* ═══════════════════════════════════════════════════════
   Accordion Band (replaces context-zone + filter-bar)
   ═══════════════════════════════════════════════════════ */
/* accordion-band now rendered inside a dice-panel window */
.accordion-band { display: flex; flex: 1; position: relative; overflow: hidden; background: rgba(0,0,0,.18); }
.ab-strip { flex: 1; position: relative; min-width: 0; overflow: hidden; cursor: pointer; }
.ab-canvas { width: 100%; height: 100%; display: block; }
.ab-strip::after { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; transform: translateX(-50%); background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,.06) 40%, rgba(255,255,255,.06) 60%, transparent 100%); pointer-events: none; z-index: 2; }
.ab-slider { position: absolute; bottom: 0; left: 0; right: 0; height: 4px; cursor: ns-resize; background: transparent; z-index: 10; }
.ab-slider:hover { background: rgba(59,130,246,.2); }
.ab-slider:active { background: rgba(59,130,246,.4); }

/* Knowledge Map (inside ab-voronoi) */
.km-canvas { width: 100%; height: 100%; display: block; }
.km-tooltip { display: none; position: absolute; pointer-events: none; z-index: 900; background: rgba(17,24,34,.95); backdrop-filter: blur(8px); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; box-shadow: 0 6px 16px rgba(0,0,0,.5); max-width: 220px; font-size: 10px; color: var(--text); line-height: 1.5; }

/* Timeline (inside ab-timeline) */
.tl-canvas { width: 100%; height: 100%; display: block; }
.tl-tooltip { display: none; position: absolute; pointer-events: none; z-index: 900; background: rgba(17,24,34,.95); backdrop-filter: blur(8px); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; box-shadow: 0 6px 16px rgba(0,0,0,.6); max-width: 240px; font-size: 10px; color: var(--text); line-height: 1.5; }

/* Stats pills in title bar */
.cmd-stats { display: flex; align-items: center; gap: 4px; margin-left: 8px; flex-shrink: 1; min-width: 0; overflow: hidden; }
.cs-pill { font-size: 9px; font-family: var(--mono); color: var(--muted); padding: 2px 8px; border-radius: 8px; background: rgba(255,255,255,.04); border: 1px solid var(--border); }
.cs-pill b { color: var(--text); font-weight: 700; }
.cs-ok { color: #10b981; border-color: rgba(16,185,129,.2); }
.cs-warn { color: #f59e0b; border-color: rgba(245,158,11,.2); }
.cs-bad { color: #ef4444; border-color: rgba(239,68,68,.2); }
.cs-na { color: #64748b; border-color: rgba(100,116,139,.2); font-style: italic; }

/* ═══════════════════════════════════════════════════════
   Inline Filters (inside cmd-bar)
   ═══════════════════════════════════════════════════════ */
.cmd-filters-inline { display: flex; align-items: center; gap: 3px; flex-shrink: 1; min-width: 0; overflow: hidden; }
.filter-wrap { position: relative; }
.filter-dd { padding: 2px 6px; border-radius: 3px; cursor: pointer; color: var(--muted); font-size: 9px; white-space: nowrap; border: 1px solid transparent; transition: all .15s; }
.filter-dd:hover, .filter-dd.active { color: var(--accent); border-color: var(--accent-dim); background: rgba(59,130,246,.08); }
.filter-panel { display: none; position: fixed; min-width: 180px; max-height: 260px; overflow-y: auto; background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; z-index: 9000; padding: 4px 0; box-shadow: 0 6px 20px rgba(0,0,0,.5); }
.filter-panel.open { display: block; }
.filter-panel-actions { display: flex; justify-content: space-between; padding: 4px 10px; font-size: 9px; color: var(--accent); cursor: pointer; border-bottom: 1px solid var(--border); }
.filter-item { display: flex; align-items: center; gap: 6px; padding: 3px 10px; font-size: 10px; cursor: pointer; }
.filter-item:hover { background: rgba(59,130,246,.04); }
.fi-count { margin-left: auto; font-size: 9px; color: var(--muted); font-family: var(--mono); }
.cmd-search { background: var(--bg); border: 1px solid var(--border); border-radius: 3px; padding: 2px 6px; color: var(--text); font-size: 9px; width: 100px; min-width: 50px; flex-shrink: 1; outline: none; }
.cmd-search:focus { border-color: var(--accent); }
.grp-btns { display: flex; gap: 2px; align-items: center; flex-shrink: 1; min-width: 0; overflow: hidden; }
.grp-btn { padding: 1px 6px; font-size: 8px; border-radius: 3px; border: 1px solid var(--border); background: rgba(255,255,255,.02); color: var(--muted); cursor: pointer; white-space: nowrap; transition: all .15s; opacity: .45; }
.grp-btn:hover { opacity: .7; border-color: var(--accent-dim); }
.grp-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(59,130,246,.1); opacity: 1; font-weight: 600; box-shadow: 0 0 4px rgba(59,130,246,.15); }

/* ═══════════════════════════════════════════════════════
   Sidebar
   ═══════════════════════════════════════════════════════ */
.domain-nav { width: 200px; min-width: 200px; background: var(--bg2); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; }
.domain-nav::-webkit-scrollbar { width: 4px; }

/* Sidebar scope widget */
.dn-scope { padding: 10px; border-bottom: 1px solid var(--border); }
.dn-scope-row { display: flex; align-items: center; gap: 8px; }
.dn-scope-donut { flex-shrink: 0; }
.dn-scope-stats { flex: 1; min-width: 0; }
.dn-scope-title { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.dn-scope-big { font-size: 22px; font-weight: 800; font-family: var(--mono); color: var(--text); line-height: 1.1; }
.dn-scope-big .pct { font-size: 12px; font-weight: 400; color: var(--muted); }
.dn-scope-sub { font-size: 9px; color: var(--muted); }
.dn-scope-bar { display: flex; height: 3px; border-radius: 2px; overflow: hidden; margin-top: 8px; background: var(--bg3); }

/* Section switcher */
.dn-sections { padding: 6px 8px; border-bottom: 1px solid var(--border); display: flex; gap: 4px; }
.dn-sec { padding: 4px 8px; font-size: 10px; border-radius: 4px; cursor: pointer; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.dn-sec:hover { color: var(--text); }
.dn-sec.active { background: rgba(59,130,246,.08); color: var(--accent); font-weight: 600; }
.dn-sec-icon { font-size: 12px; }

/* Domain items */
.dn-header { padding: 8px 10px 4px; font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.dn-item { display: grid; grid-template-columns: 8px 1fr auto; grid-template-rows: auto auto; gap: 0 6px; padding: 5px 10px; cursor: pointer; border-left: 2px solid transparent; }
.dn-item:hover { background: rgba(59,130,246,.03); }
.dn-item.active { background: rgba(59,130,246,.06); border-left-color: var(--accent); }
.dn-dot { width: 8px; height: 8px; border-radius: 50%; grid-row: 1; align-self: center; }
.dn-label { font-size: 10px; grid-row: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dn-count { font-size: 9px; font-family: var(--mono); color: var(--muted); grid-row: 1; }
.dn-bar { grid-column: 2 / -1; height: 2px; background: var(--bg3); border-radius: 1px; overflow: hidden; }
.dn-bar > div { height: 100%; border-radius: 1px; }
.dn-footer { padding: 8px 10px; font-size: 9px; color: var(--muted); border-top: 1px solid var(--border); margin-top: auto; }

/* ═══════════════════════════════════════════════════════
   Matrix
   ═══════════════════════════════════════════════════════ */
.matrix-column { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.section-panel { display: none; flex: 1; flex-direction: column; overflow: hidden; }
.section-panel.active { display: flex; }
.matrix-outer { display: flex; flex-direction: column; flex: 1; min-height: 0; min-width: 0; overflow: hidden; position: relative; background: transparent; }
.matrix-inner { display: flex; flex: 1; min-height: 0; min-width: 0; position: relative; overflow: hidden; }

.matrix-scroll-top { overflow-x: auto; overflow-y: hidden; flex-shrink: 0; height: 10px; background: var(--bg2); border-bottom: 1px solid var(--border); scrollbar-width: thin; scrollbar-color: rgba(59,130,246,.35) var(--bg2); }
.matrix-scroll-top-inner { height: 1px; }
.matrix-scroll-top::-webkit-scrollbar { height: 8px; }
.matrix-scroll-top::-webkit-scrollbar-track { background: var(--bg2); }
.matrix-scroll-top::-webkit-scrollbar-thumb { background: rgba(59,130,246,.35); border-radius: 4px; border: 2px solid var(--bg2); }
.matrix-scroll-top::-webkit-scrollbar-thumb:hover { background: rgba(59,130,246,.45); }

.matrix-wrap { flex: 1; overflow: auto; position: relative; min-height: 0; scrollbar-width: thin; scrollbar-color: rgba(59,130,246,.25) var(--bg2); }
.matrix-wrap::-webkit-scrollbar { width: 6px; height: 0; }
.matrix-wrap::-webkit-scrollbar-track { background: var(--bg2); }
.matrix-wrap::-webkit-scrollbar-thumb { background: rgba(59,130,246,.25); border-radius: 3px; }
.matrix-wrap::-webkit-scrollbar-thumb:hover { background: rgba(59,130,246,.45); }

/* Table */
.mx { width: 100%; border-collapse: collapse; table-layout: fixed; }
.mx-fill-col { width: auto; min-width: 0; max-width: none; border: none !important; background: transparent !important; padding: 0 !important; }
th.mx-fill-col { border-bottom: 2px solid var(--border) !important; background: var(--bg2) !important; }
.mx th { position: sticky; top: 0; z-index: 10; background: var(--bg2); font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .2px; padding: 6px 10px; text-align: left; white-space: nowrap; border-bottom: 2px solid var(--border); cursor: pointer; user-select: none; overflow: visible; }
.mx th.mx-sticky { position: sticky; z-index: 20; background: #0f0f14; }
.mx td.mx-sticky { position: sticky; z-index: 3; background: #0a0a0e; }
.mx tbody tr:hover > td.mx-sticky { background: #0e0e13; }
.mx tbody tr.mx-row-hover > td.mx-sticky { background: #0e0e13; }
.mx-frozen-edge { position: relative; }
.mx th:hover { color: var(--text); }
.mx th.mx-th-sorted-asc::after { content: ' ▲'; color: var(--accent); font-size: 8px; }
.mx th.mx-th-sorted-desc::after { content: ' ▼'; color: var(--accent); font-size: 8px; }
.mx th.mx-th-filtered { border-bottom-color: var(--accent); }
.mx th.mx-th-collapsed { max-width: 8px; min-width: 8px; padding: 6px 0; text-align: center; font-size: 8px; color: var(--border2); }
.mx-th-text { pointer-events: none; }
.mx-freeze {
  display: inline-block; font-size: 8px; cursor: pointer; opacity: 0;
  margin-right: 3px; color: var(--muted); vertical-align: middle;
  transition: opacity .15s, color .15s;
}
.mx th:hover .mx-freeze { opacity: .5; }
.mx-freeze:hover { opacity: 1 !important; color: var(--accent); }
.mx-freeze.mx-freeze-on { opacity: .7; color: #38bdf8; }
.mx th:hover .mx-freeze.mx-freeze-on { opacity: 1; }
.mx-resize {
  position: absolute; right: -2px; top: 0; bottom: 0; width: 7px;
  cursor: col-resize; z-index: 21;
  border-right: 1px solid rgba(255,255,255,.06);
}
.mx-resize::after {
  content: ''; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  width: 2px; height: 12px; border-left: 1px dotted rgba(255,255,255,.15);
  border-right: 1px dotted rgba(255,255,255,.15); pointer-events: none;
}
.mx-resize:hover, .mx-resizing .mx-resize { background: rgba(59,130,246,.35); border-right-color: var(--accent); }
.mx-resize:hover::after, .mx-resizing .mx-resize::after { border-color: var(--accent); }
.mx-resizing { background: rgba(59,130,246,.08) !important; }

.mx td { padding: 6px 12px; font-size: 11px; font-weight: 450; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid rgba(255,255,255,.04); min-height: 30px; vertical-align: top; }
.mx td.mx-wrap { white-space: normal; word-break: break-word; line-height: 1.45; text-overflow: clip; }
.mx td.mx-wrap .mx-cell-inner { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.mx td.mx-wrap .mx-cell-text { display: block; }
.mx tbody tr:nth-child(even) > td { background: rgba(255,255,255,.02); }
.mx tbody tr:nth-child(even) > td.mx-sticky { background: #0e0e12; }
.mx tbody tr:nth-child(even) > td.mx-domain-cell { background: #0d0d11 !important; }
.mx tbody tr:nth-child(even) > td.mx-sticky.mx-zone-personnel { background: #0e0e12; }
.mx-cell-inner { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.mx-cell-inner::-webkit-scrollbar { display: none; }
.mx-cell-text { display: inline; }
.mx-rownum { font-family: var(--mono); font-size: 9px; color: var(--muted); }

/* Domain headers */
/* Domain column — all backgrounds OPAQUE to prevent scroll bleed-through */
.mx-domain-cell { background: #0a0a0e !important; border-bottom-color: transparent !important; vertical-align: top; padding-top: 4px !important; white-space: normal !important; word-break: break-word; overflow: hidden; }
.mx-domain-cell.mx-domain-label { background: #0c0c10 !important; border-top: none !important; border-left: 2px solid rgba(59,130,246,.3) !important; padding-top: 6px !important; }
.mx-domain-name { font-size: 9px; font-weight: 700; color: var(--text); line-height: 1.2; }
.domain-chev { display: inline-block; font-size: 7px; width: 12px; color: var(--muted); cursor: pointer; vertical-align: middle; }
.domain-chev:hover { color: var(--accent); }
.dh-count { display: block; font-size: 8px; color: var(--muted); font-family: var(--mono); margin-top: 1px; }
.mx-domain-boundary > td { border-top: 3px solid rgba(59,130,246,.18) !important; }
.mx-domain-boundary > td.mx-domain-cell { background: #0c0c10 !important; }
.mx-domain-collapsed-row { cursor: pointer; }
.mx-domain-collapsed-row td { background: #0b111b !important; cursor: pointer; }
.mx-domain-collapsed-row:hover td { background: #0d1624 !important; }
.mx-collapsed-hint { font-size: 9px; color: var(--muted); font-style: italic; }
.mx tbody tr:hover > td.mx-domain-cell { background: #0e0e13 !important; }
.mx tbody tr.mx-row-hover > td.mx-domain-cell { background: #0e0e13 !important; }

/* Row states */
.mx tbody tr.mx-row-hover > td { background: rgba(59,130,246,.05) !important; }
.mx tbody td.mx-col-hover { background: rgba(59,130,246,.04); }
.mx thead th.mx-col-hover { border-bottom: 2px solid var(--accent); }
.mx tbody tr.mx-expanded-row > td:first-child { border-left: 3px solid var(--accent); }
.mx tbody tr[data-id] { cursor: pointer; }
.mx tbody tr[data-id]:hover > td { background: rgba(255,255,255,.02); }
.col-hidden { display: none; }
.spacer-row td { padding: 0 !important; border: none !important; }

/* ═══════════════════════════════════════════════════════
   RTS Warfare UI
   ═══════════════════════════════════════════════════════ */

/* Alert flash on status change */
@keyframes rowFlash {
  0%   { background: rgba(245,158,11,.18); box-shadow: inset 0 0 12px rgba(245,158,11,.1); }
  100% { background: transparent; box-shadow: none; }
}
.mx tbody tr.mx-row-flash > td { animation: rowFlash 1.5s ease-out; }

/* Bandbox drag-select */
.mx tbody tr.mx-row-selected > td {
  background: rgba(59,130,246,.06) !important;
  box-shadow: inset 0 0 0 1px rgba(59,130,246,.15);
}
.rts-bandbox {
  position: absolute;
  border: 1px solid rgba(59,130,246,.5);
  background: rgba(59,130,246,.06);
  pointer-events: none;
  z-index: 900;
  border-radius: 2px;
}

/* Finding dice threat pulse */
@keyframes diceThreat {
  0%,100% { box-shadow: 0 0 6px 1px rgba(239,68,68,.5); }
  50%     { box-shadow: 0 0 14px 3px rgba(239,68,68,.2); }
}
.dice-cube.dice-threat { animation: diceThreat 2s ease-in-out infinite; }

/* ── Armory panel ── */
.armory-row {
  display: flex; align-items: center; gap: 4px;
  padding: 2px 4px; cursor: pointer;
  border-radius: 3px; transition: background .15s ease;
}
.armory-row:hover { background: rgba(255,255,255,.04); }
.armory-summary-bar {
  display: flex; gap: 1px; height: 8px;
  border-radius: 2px; overflow: hidden; margin-bottom: 6px;
}
.armory-header {
  display: flex; justify-content: space-between;
  margin-bottom: 4px; font-size: 9px; font-weight: 600;
  color: rgba(200,215,230,.7);
}

/* ── Command queue ── */
.cq-pipeline {
  display: flex; gap: 1px; height: 16px;
  border-radius: 4px; overflow: hidden;
}
.cq-pipeline > div {
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; font-weight: 700; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
  transition: flex .4s ease;
}
.cq-threats {
  display: flex; gap: 1px; height: 10px;
  border-radius: 3px; overflow: hidden; margin-top: 2px;
}
.cq-threats > div {
  display: flex; align-items: center; justify-content: center;
  font-size: 7px; font-weight: 700; color: #fff;
  transition: flex .4s ease;
}
.cq-stats {
  display: flex; justify-content: space-between;
  font-size: 8px; color: rgba(200,215,230,.4); margin-top: 1px;
}
.cq-resources {
  display: flex; gap: 4px; align-items: center; margin-top: 3px;
}
.cq-resources-label {
  font-size: 7px; color: rgba(200,215,230,.35); min-width: 44px;
}
.cq-resources-bar {
  flex: 1; display: flex; gap: 1px; height: 6px;
  border-radius: 2px; overflow: hidden;
}
.cq-resources-bar > div { min-width: 2px; transition: flex .4s ease; }
.cq-replay {
  display: flex; gap: 4px; align-items: center; margin-top: 3px;
}
.cq-play {
  background: none; border: 1px solid rgba(200,215,230,.15);
  color: rgba(200,215,230,.7); padding: 1px 6px;
  border-radius: 3px; font-size: 9px; cursor: pointer;
  transition: all .15s;
}
.cq-play:hover { background: rgba(255,255,255,.06); border-color: rgba(200,215,230,.3); color: #e0e6ed; }
.cq-speed {
  background: none; border: 1px solid rgba(200,215,230,.1);
  padding: 0 4px; border-radius: 2px;
  font-size: 7px; cursor: pointer; transition: all .15s;
  color: rgba(200,215,230,.35);
}
.cq-speed:hover { background: rgba(255,255,255,.04); color: rgba(200,215,230,.6); }
.cq-speed.active { color: #14b8a6; border-color: rgba(20,184,166,.4); }
input.cq-scrub {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 4px;
  background: rgba(255,255,255,.06); border-radius: 2px;
  cursor: pointer; outline: none;
}
input.cq-scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 8px; height: 8px; border-radius: 50%;
  background: #14b8a6; cursor: pointer;
  box-shadow: 0 0 4px rgba(20,184,166,.4);
}
input.cq-scrub::-moz-range-thumb {
  width: 8px; height: 8px; border-radius: 50%;
  background: #14b8a6; border: none; cursor: pointer;
}

/* ── Threat label ── */
.cq-threat-label {
  font-size: 7px; color: rgba(239,68,68,.6);
  margin-top: 1px; letter-spacing: .3px;
}

/* Column filter panel */
.mx-col-filter { display: none; position: absolute; top: 100%; left: 0; min-width: 180px; max-height: 240px; overflow-y: auto; background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; z-index: 820; padding: 4px 0; box-shadow: 0 6px 20px rgba(0,0,0,.5); }
.mx-col-filter.open { display: block; }

/* ═══════════════════════════════════════════════════════
   Minimap
   ═══════════════════════════════════════════════════════ */
#mxMinimap { flex: 0 0 56px; width: 56px; position: relative; cursor: pointer; background: var(--bg2); border-left: 1px solid var(--border); overflow: hidden; user-select: none; }
#mxMinimap:hover { background: var(--bg3); }
#mxMinimap.mm-dragging { cursor: grabbing; }
#mxMinimap canvas { width: 100%; height: 100%; display: block; }
.mm-viewport { position: absolute; border: 1.5px solid rgba(59,130,246,.7); background: rgba(59,130,246,.12); border-radius: 2px; pointer-events: none; box-shadow: 0 0 6px rgba(59,130,246,.2); }
#mxMinimap:hover .mm-viewport, #mxMinimap.mm-dragging .mm-viewport { background: rgba(59,130,246,.22); border-color: rgba(59,130,246,.9); box-shadow: 0 0 10px rgba(59,130,246,.3); }
.mm-seg-label { position: absolute; left: 1px; right: 1px; display: flex; align-items: flex-start; justify-content: center; font-size: 7px; font-weight: 700; color: rgba(59,130,246,.45); letter-spacing: .5px; overflow: hidden; pointer-events: none; padding-top: 1px; text-transform: uppercase; border-top: 1px solid rgba(59,130,246,.15); }
#mxMinimap:hover .mm-seg-label { color: rgba(59,130,246,.7); }

.mm-glow { position: absolute; width: 12px; height: 12px; border-radius: 50%; pointer-events: none; transform: translate(-50%,-50%); opacity: 0; transition: opacity .2s ease, background .3s ease; z-index: 5; }
.mm-glow-hover { opacity: 1; background: radial-gradient(circle, var(--mm-glow-color, rgba(59,130,246,.18)) 0%, transparent 65%); }
.mm-glow-active { opacity: 1; width: 16px; height: 16px; background: radial-gradient(circle, var(--mm-glow-color, rgba(59,130,246,.4)) 0%, transparent 65%); box-shadow: 0 0 6px var(--mm-glow-color, rgba(59,130,246,.25)); }
.mm-glow-pulse { animation: mmPulse .35s ease-out; }
@keyframes mmPulse { 0% { transform: translate(-50%,-50%) scale(1); } 50% { transform: translate(-50%,-50%) scale(1.3); opacity: .5; } 100% { transform: translate(-50%,-50%) scale(1); } }

/* ═══════════════════════════════════════════════════════
   Custom Cursors — Zone-Specific
   ═══════════════════════════════════════════════════════ */

/* Shared cursor element (used across matrix + sidebar + accordion) */
.relay-cursor { position: fixed; pointer-events: none; z-index: 9999; transform: translate(-50%,-50%); transition: opacity .12s ease; }

/* ── Matrix: dot + ring ── */
.matrix-wrap, .matrix-wrap * { cursor: none !important; }
.matrix-wrap .mx-pin-popup, .matrix-wrap .mx-pin-popup * { cursor: auto !important; }
.matrix-wrap .mx-pin-dot { cursor: pointer !important; }
.matrix-wrap input, .matrix-wrap textarea, .matrix-wrap select { cursor: text !important; }
.matrix-wrap .mx-pin-save, .matrix-wrap .mx-pin-popup-close { cursor: pointer !important; }

.relay-cursor.mode-matrix { width: 20px; height: 20px; }
.relay-cursor.mode-matrix .rc-dot { position: absolute; top: 50%; left: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--cursor-color, #3b82f6); transform: translate(-50%,-50%); transition: background .25s ease, transform .15s ease, box-shadow .25s ease; box-shadow: 0 0 4px var(--cursor-color, rgba(59,130,246,.5)); }
.relay-cursor.mode-matrix .rc-ring { position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--cursor-color, rgba(59,130,246,.45)); transform: translate(-50%,-50%); transition: border-color .25s ease, width .2s ease, height .2s ease, opacity .2s ease; opacity: .7; }
.relay-cursor.mode-matrix .rc-line { display: none; }
.relay-cursor.mode-matrix.hovering .rc-dot { transform: translate(-50%,-50%) scale(1.5); box-shadow: 0 0 8px var(--cursor-color, rgba(59,130,246,.6)); }
.relay-cursor.mode-matrix.hovering .rc-ring { width: 24px; height: 24px; opacity: .5; }
.relay-cursor.mode-matrix.clicking .rc-dot { transform: translate(-50%,-50%) scale(0.6); }
.relay-cursor.mode-matrix.clicking .rc-ring { width: 14px; height: 14px; opacity: 1; border-width: 2.5px; }

/* ── Sidebar: small dot only (no ring) ── */
.domain-ruler, .domain-ruler * { cursor: none !important; }
.relay-cursor.mode-sidebar { width: 10px; height: 10px; }
.relay-cursor.mode-sidebar .rc-dot { position: absolute; top: 50%; left: 50%; width: 3px; height: 3px; border-radius: 50%; background: var(--cursor-color, #a855f7); transform: translate(-50%,-50%); transition: background .2s ease, transform .12s ease, box-shadow .2s ease; box-shadow: 0 0 3px var(--cursor-color, rgba(168,85,247,.4)); }
.relay-cursor.mode-sidebar .rc-ring { display: none; }
.relay-cursor.mode-sidebar .rc-line { display: none; }
.relay-cursor.mode-sidebar.hovering .rc-dot { transform: translate(-50%,-50%) scale(2); box-shadow: 0 0 6px var(--cursor-color, rgba(168,85,247,.5)); }

/* ── Accordion band: vertical playhead line ── */
.accordion-band, .accordion-band * { cursor: none !important; }
.relay-cursor.mode-accordion { width: 1px; height: 100vh; }
.relay-cursor.mode-accordion .rc-dot { display: none; }
.relay-cursor.mode-accordion .rc-ring { display: none; }
.relay-cursor.mode-accordion .rc-line { position: absolute; top: 0; left: 50%; width: 1px; height: var(--ab-height, 120px); transform: translateX(-50%); background: linear-gradient(180deg, transparent 0%, var(--cursor-color, rgba(20,184,166,.5)) 15%, var(--cursor-color, rgba(20,184,166,.5)) 85%, transparent 100%); transition: background .25s ease; box-shadow: 0 0 4px var(--cursor-color, rgba(20,184,166,.2)); }
.relay-cursor.mode-accordion .rc-line::after { content: ''; position: absolute; top: 50%; left: 50%; width: 5px; height: 5px; border-radius: 50%; background: var(--cursor-color, rgba(20,184,166,.8)); transform: translate(-50%,-50%); box-shadow: 0 0 6px var(--cursor-color, rgba(20,184,166,.4)); }

/* ── Hidden when outside active zones ── */
.relay-cursor.mode-none { opacity: 0; }

/* ═══════════════════════════════════════════════════════
   Mouse Spotlight (soft radial glow on matrix)
   ═══════════════════════════════════════════════════════ */
.mx-spotlight { position: absolute; pointer-events: none; z-index: 1; width: 280px; height: 280px; border-radius: 50%; transform: translate(-50%,-50%); background: radial-gradient(circle, var(--spotlight-color, rgba(59,130,246,.045)) 0%, transparent 70%); transition: background .3s ease; opacity: 0; }
.mx-spotlight.visible { opacity: 1; }

/* ═══════════════════════════════════════════════════════
   Cursor Trail Canvas
   ═══════════════════════════════════════════════════════ */
.mx-trail-canvas { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 2; }

/* ═══════════════════════════════════════════════════════
   Crosshair & Coord Badge
   ═══════════════════════════════════════════════════════ */
.mx-crosshair-h { position: absolute; left: 0; right: 0; height: 1px; pointer-events: none; z-index: 50; display: none; background: var(--ch-h-color, rgba(245,158,11,.3)); box-shadow: 0 0 3px var(--ch-h-color, rgba(245,158,11,.1)); transition: background .25s ease, box-shadow .25s ease; }
.mx-crosshair-v { position: absolute; top: 0; bottom: 0; width: 1px; pointer-events: none; z-index: 50; display: none; background: var(--ch-v-color, rgba(6,182,212,.3)); box-shadow: 0 0 3px var(--ch-v-color, rgba(6,182,212,.1)); transition: background .25s ease, box-shadow .25s ease; }
.mx-crosshair-h.visible, .mx-crosshair-v.visible { display: block; }

.mx-coord-badge { position: absolute; z-index: 60; pointer-events: none; background: rgba(10,14,20,.92); backdrop-filter: blur(6px); border: 1px solid var(--cursor-color, rgba(100,116,139,.3)); border-radius: 6px; padding: 3px 8px; font-size: 10px; font-family: var(--mono); white-space: nowrap; display: none; gap: 5px; transition: border-color .25s ease; }
.mx-coord-badge.visible { display: flex; align-items: center; }
.mx-coord-badge .cb-row { color: var(--ch-h-color, #f59e0b); transition: color .25s ease; }
.mx-coord-badge .cb-col { color: var(--ch-v-color, #06b6d4); transition: color .25s ease; }
.mx-coord-badge .cb-sep { color: rgba(100,116,139,.5); margin: 0 2px; }

/* Pin comments */
.mx-pin-dot { position: absolute; top: 2px; right: 2px; min-width: 14px; height: 14px; border-radius: 7px; background: rgba(245,158,11,.85); color: #000; font-size: 8px; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 4; line-height: 1; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.mx-pin-dot:hover { background: #f59e0b; transform: scale(1.15); }
td { position: relative; }

.mx-pin-popup { display: none; position: absolute; z-index: 200; width: 260px; background: #0d1219; border: 1px solid var(--accent-dim); border-radius: 8px; box-shadow: 0 8px 28px rgba(0,0,0,.6); overflow: hidden; }
.mx-pin-popup.open { display: block; }
.mx-pin-popup-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; background: rgba(59,130,246,.06); border-bottom: 1px solid rgba(255,255,255,.04); }
.mx-pin-popup-title { font-size: 10px; font-weight: 700; color: var(--text); }
.mx-pin-popup-close { font-size: 12px; cursor: pointer; color: var(--muted); padding: 2px 4px; }
.mx-pin-popup-close:hover { color: var(--text); }
.mx-pin-popup-target { font-size: 9px; color: var(--accent); font-family: var(--mono); padding: 4px 10px; background: rgba(59,130,246,.04); }
.mx-pin-input { display: block; width: 100%; box-sizing: border-box; border: none; background: transparent; color: var(--text); font-size: 10px; font-family: inherit; padding: 8px 10px; resize: none; outline: none; }
.mx-pin-input::placeholder { color: var(--muted); }
.mx-pin-popup-foot { padding: 6px 10px; display: flex; justify-content: flex-end; border-top: 1px solid rgba(255,255,255,.04); }
.mx-pin-save { font-size: 9px; padding: 3px 10px; border-radius: 4px; border: 1px solid rgba(59,130,246,.3); background: rgba(59,130,246,.1); color: var(--accent); cursor: pointer; font-weight: 600; }
.mx-pin-save:hover { background: rgba(59,130,246,.2); }

.mx-pin-list { position: absolute; z-index: 200; width: 240px; max-height: 200px; overflow-y: auto; background: #0d1219; border: 1px solid var(--accent-dim); border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.5); padding: 4px 0; }
.mx-pin-item { padding: 6px 10px; border-bottom: 1px solid rgba(255,255,255,.03); }
.mx-pin-item:last-child { border-bottom: none; }
.mx-pin-item-text { font-size: 10px; color: var(--text); line-height: 1.4; margin-bottom: 3px; }
.mx-pin-item-meta { font-size: 8px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.mx-pin-resolve { cursor: pointer; color: rgba(16,185,129,.7); font-size: 10px; }
.mx-pin-resolve:hover { color: #10b981; }
.mx-pin-delete { cursor: pointer; color: rgba(239,68,68,.5); font-size: 10px; }
.mx-pin-delete:hover { color: #ef4444; }

.mx-pin-toggle { position: fixed; bottom: 48px; right: 72px; width: 32px; height: 32px; border-radius: 50%; background: #0d1219; border: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; z-index: 100; opacity: .6; transition: opacity .15s, background .15s, border-color .15s; }
.mx-pin-toggle:hover { opacity: 1; border-color: rgba(245,158,11,.4); }
.mx-pin-toggle.active { opacity: 1; background: rgba(245,158,11,.15); border-color: rgba(245,158,11,.6); box-shadow: 0 0 8px rgba(245,158,11,.2); }
.mx-pin-mode { cursor: crosshair !important; }
.mx-pin-mode td { cursor: crosshair !important; }

/* ═══════════════════════════════════════════════════════
   Detail Card
   ═══════════════════════════════════════════════════════ */
/* Legacy .detail-overlay removed — panels use .relay-panel via panel-engine.js */
.dc-id { font-family: var(--mono); font-weight: 700; font-size: 12px; color: var(--accent); }
.dc-name { font-size: 11px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-present-btn { font-size: 10px; color: var(--accent); cursor: pointer; padding: 2px 8px; border-radius: 4px; border: 1px solid var(--accent-dim); white-space: nowrap; }
.dc-present-btn:hover { background: rgba(59,130,246,.08); }
.dc-close { font-size: 14px; cursor: pointer; color: var(--muted); padding: 2px 6px; }
.dc-close:hover { color: var(--text); }

.dc-main { display: flex; min-height: 200px; max-height: 360px; }
.dc-sidebar { flex: 0 0 92px; display: flex; flex-direction: column; gap: 1px; padding: 6px 0; background: var(--bg3); border-right: 1px solid var(--border); }
.dc-tab { display: flex; align-items: center; gap: 5px; padding: 7px 10px; font-size: 10px; cursor: pointer; color: var(--muted); border-left: 2px solid transparent; white-space: nowrap; position: relative; }
.dc-tab:hover { color: var(--text); background: rgba(255,255,255,.02); }
.dc-tab.active { color: var(--tab-color, var(--accent)); border-left-color: var(--tab-color, var(--accent)); background: rgba(255,255,255,.04); font-weight: 600; }
.dc-tab-icon { font-size: 13px; flex-shrink: 0; }
.dc-tab-lbl { overflow: hidden; text-overflow: ellipsis; }
.dc-tab-dot { width: 5px; height: 5px; border-radius: 50%; margin-left: auto; flex-shrink: 0; }
.dc-tab-dot.ok { background: var(--ok); }
.dc-tab-dot.accent { background: var(--accent); }

.dc-body { flex: 1; padding: 12px; overflow-y: auto; transition: opacity .15s ease; min-width: 0; }
.dc-body::-webkit-scrollbar { width: 4px; }

/* Detail sections */
.ds-section { margin-bottom: 12px; }
.ds-section-title { font-size: 11px; font-weight: 700; color: var(--text); margin-bottom: 6px; display: flex; align-items: center; gap: 4px; cursor: pointer; user-select: none; }
.ds-section-title::before { content: '\25BE'; font-size: 9px; color: var(--muted); display: inline-block; transition: transform .15s; width: 10px; text-align: center; flex-shrink: 0; }
.ds-tint.ds-collapsed .ds-section-title::before { transform: rotate(-90deg); }
.ds-tint.ds-collapsed > *:not(.ds-section-title) { display: none; }
.ds-tint.ds-collapsed { padding-bottom: 4px; }
.ds-tint.ds-collapsed .ds-section-title { margin-bottom: 0; }
.ds-sub-title { font-size: 10px; font-weight: 600; color: var(--muted); margin: 8px 0 4px; }
.ds-row { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; font-size: 10px; border-bottom: 1px solid rgba(255,255,255,.03); }
.ds-row.full { flex-direction: column; gap: 2px; }
.ds-label { color: var(--muted); min-width: 100px; flex-shrink: 0; }
.dc-domain-pill { font-size: 9px; padding: 1px 7px; border-radius: 8px; background: rgba(59,130,246,.12); color: var(--accent); font-weight: 600; white-space: nowrap; }
.ds-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin-bottom: 8px; }
.ds-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px 16px; margin-bottom: 8px; }
.ds-cell { display: flex; flex-direction: column; gap: 2px; font-size: 10px; }
.ds-cell .ds-label { min-width: unset; font-size: 9px; }
.ds-cell .ds-val { color: var(--text); line-height: 1.4; }
.ds-block { margin-bottom: 8px; font-size: 10px; }
.ds-block .ds-label { display: block; font-size: 9px; margin-bottom: 2px; }
.ds-block .ds-val { color: var(--text); line-height: 1.5; }
.ds-inline { display: flex; align-items: center; gap: 8px; font-size: 10px; flex-wrap: wrap; }
.ds-inline .ds-label { min-width: unset; font-size: 9px; }
.ds-divider { height: 1px; background: rgba(255,255,255,.06); margin: 8px 0; }
.ds-tint { border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; border-left: 3px solid transparent; }
.ds-tint-blue { background: rgba(59,130,246,.05); border-left-color: rgba(59,130,246,.4); }
.ds-tint-amber { background: rgba(245,158,11,.05); border-left-color: rgba(245,158,11,.4); }
.ds-tint-green { background: rgba(16,185,129,.05); border-left-color: rgba(16,185,129,.4); }
.ds-tint-purple { background: rgba(139,92,246,.05); border-left-color: rgba(139,92,246,.4); }
.ds-tint-neutral { background: rgba(255,255,255,.02); border-left-color: rgba(255,255,255,.12); }
.ds-tint .ds-section-title { margin-top: 0; margin-bottom: 6px; }
.ds-tint .ds-grid-2, .ds-tint .ds-grid-3 { margin-bottom: 0; }
.ds-tint .ds-block { margin-bottom: 4px; }
.ds-tint .ds-block:last-child { margin-bottom: 0; }
.ds-tint .ds-divider { display: none; }
.ds-val { color: var(--text); word-break: break-word; }
.ds-mono { font-family: var(--mono); }
.ds-icon { font-size: 14px; }

/* Empty states */
.ds-empty-state { padding: 20px 16px; border: 2px dashed rgba(59,130,246,.15); border-radius: 10px; text-align: center; background: rgba(59,130,246,.02); }
.ds-empty-msg { font-size: 11px; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.ds-empty-row { display: flex; align-items: center; gap: 8px; padding: 4px 8px; }
.ds-empty-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); animation: shimmer 1.5s ease-in-out infinite alternate; }
.ds-empty-line { height: 8px; background: var(--border); border-radius: 4px; animation: shimmer 1.5s ease-in-out infinite alternate; }
.ds-empty-line.short { width: 30%; }
@keyframes shimmer { from { opacity: .3; } to { opacity: .6; } }
.ds-placeholder-card { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 14px; text-align: center; }
.ds-ph-val { font-size: 18px; font-weight: 800; }
.ds-ph-label { font-size: 10px; color: var(--muted); }

/* Rationale & Protection Narrative */
.ds-rationale { font-size: 11px; }
.ds-rationale-label { font-size: 9px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 2px; }
.ds-rationale-text { margin: 0; color: var(--text); line-height: 1.55; }
.ds-rationale-meta { margin-top: 6px; font-size: 9px; color: var(--muted); display: flex; gap: 6px; }

/* Mitigating Controls Grid */
.mc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 6px; }
.mc-card { background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.06); border-radius: 5px; padding: 6px 8px; }
.mc-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.mc-id { font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--accent); }
.mc-status { font-size: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.mc-name { font-size: 10px; color: var(--text); line-height: 1.3; margin-bottom: 2px; }
.mc-tier { margin-bottom: 2px; }
.mc-goto { background: none; border: 1px solid rgba(59,130,246,.2); border-radius: 3px; color: var(--accent); font-size: 9px; padding: 1px 6px; cursor: pointer; transition: all .15s; }
.mc-goto:hover { background: rgba(59,130,246,.1); }
.mc-warning { font-size: 9px; color: #ef4444; padding: 4px 0; }
.mc-ok { font-size: 9px; color: #10b981; padding: 4px 0; }

/* Test procedures */
.ds-test-proc { display: flex; gap: 6px; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.03); font-size: 10px; }
.ds-test-num { flex: 0 0 24px; font-weight: 700; color: var(--accent); font-family: var(--mono); }
.ds-test-body { flex: 1; }
.ds-test-evidence { font-size: 9px; color: var(--muted); margin-top: 2px; }
.ds-test-method { font-size: 8px; padding: 1px 5px; border-radius: 8px; background: rgba(59,130,246,.08); color: var(--accent); font-weight: 600; }

/* Evidence lifecycle stream */
.ev-status-bar .ds-grid-2 { margin-bottom: 0; }
.ev-filters { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.ev-filter-btn { font-size: 9px; padding: 2px 8px; border-radius: 10px; border: 1px solid rgba(255,255,255,.08); background: transparent; color: var(--muted); cursor: pointer; font-weight: 600; }
.ev-filter-btn:hover { border-color: var(--accent-dim); color: var(--text); }
.ev-filter-btn.active { background: rgba(59,130,246,.12); border-color: rgba(59,130,246,.3); color: var(--accent); }
.ev-upload-btn { font-size: 9px; padding: 2px 8px; border-radius: 10px; border: 1px dashed rgba(16,185,129,.3); color: rgba(16,185,129,.8); cursor: pointer; font-weight: 600; margin-left: auto; }
.ev-upload-btn:hover { background: rgba(16,185,129,.08); border-style: solid; }

.ev-period-label { font-size: 9px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; padding: 4px 0 2px; margin-top: 4px; border-bottom: 1px solid rgba(255,255,255,.04); }

.ev-card { padding: 6px 10px !important; margin-bottom: 4px !important; }
.ev-card-head { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.ev-card-icon { font-size: 13px; flex-shrink: 0; }
.ev-card-title { font-size: 10px; font-weight: 600; color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ev-meta-item { font-size: 9px; color: var(--muted); }
.ev-meta-source { padding: 1px 5px; border-radius: 6px; background: rgba(255,255,255,.04); font-weight: 600; }
.ev-card-desc { font-size: 9px; color: var(--muted); line-height: 1.5; margin-top: 3px; padding-top: 3px; border-top: 1px solid rgba(255,255,255,.03); }

.ev-card-actions { display: flex; gap: 4px; margin-top: 4px; }
.ev-action-btn { font-size: 8px; padding: 2px 7px; border-radius: 6px; border: 1px solid rgba(59,130,246,.2); color: var(--accent); cursor: pointer; font-weight: 600; }
.ev-action-btn:hover { background: rgba(59,130,246,.08); }
.ev-action-remove { border-color: rgba(239,68,68,.2); color: rgba(239,68,68,.7); }
.ev-action-remove:hover { background: rgba(239,68,68,.08); }

.ev-status-pill { font-size: 8px; padding: 1px 6px; border-radius: 8px; font-weight: 700; }
.ev-reviewed { background: rgba(16,185,129,.12); color: #10b981; }
.ev-collected { background: rgba(59,130,246,.12); color: var(--accent); }
.ev-pending { background: rgba(245,158,11,.12); color: #f59e0b; }

.ev-empty { text-align: center; padding: 24px 12px; background: rgba(59,130,246,.02); border-radius: 8px; border: 1px dashed rgba(59,130,246,.12); }
.ev-empty-icon { font-size: 32px; opacity: .35; margin-bottom: 8px; }

/* Timeline bar — dual-chamber: scope strip + force-laid-out detail */
.ev-tbar-dual { margin-bottom: 8px; border-radius: 6px; border: 1px solid rgba(255,255,255,.04); background: rgba(255,255,255,.015); overflow: visible; }

.ev-tbar-scope { position: relative; height: 16px; border-bottom: 1px solid rgba(255,255,255,.06); overflow: visible; }
.ev-tbar-scope-axis { position: absolute; left: 16px; right: 16px; top: 50%; height: 1px; background: rgba(255,255,255,.08); }
.ev-tbar-scope-dot { position: absolute; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; opacity: .7; }
.ev-tbar-scope-vp { position: absolute; top: 0; bottom: 0; background: rgba(59,130,246,.08); border-left: 1px solid rgba(59,130,246,.3); border-right: 1px solid rgba(59,130,246,.3); pointer-events: none; border-radius: 2px; }
.ev-tbar-scope-yr { position: absolute; bottom: 1px; transform: translateX(-50%); font-size: 7px; color: rgba(255,255,255,.25); font-family: var(--mono); font-weight: 600; pointer-events: none; }

.ev-tbar-detail { position: relative; height: 32px; overflow: visible; }
.ev-tbar-axis { position: absolute; left: 16px; right: 16px; bottom: 10px; height: 1px; background: rgba(255,255,255,.12); }
.ev-tbar-tick { position: absolute; bottom: 6px; width: 1px; height: 9px; background: rgba(255,255,255,.08); }
.ev-tbar-label { position: absolute; bottom: 0; transform: translateX(-50%); font-size: 8px; color: var(--muted); font-family: var(--mono); font-weight: 600; pointer-events: none; }
.ev-tbar-node { position: absolute; transform: translateX(-50%); cursor: pointer; z-index: 2; }
.ev-tbar-dot { border-radius: 50%; opacity: .85; transition: opacity .15s, transform .15s; box-shadow: 0 0 4px rgba(0,0,0,.4); }
.ev-tbar-node:hover .ev-tbar-dot { opacity: 1; transform: scale(1.4); }
.ev-tbar-tip { display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); min-width: 140px; max-width: 260px; background: #0a0e14f0; border: 1px solid var(--accent-dim); border-radius: 6px; padding: 5px 8px; font-size: 9px; color: var(--text); line-height: 1.4; pointer-events: none; white-space: normal; box-shadow: 0 4px 16px rgba(0,0,0,.5); z-index: 20; }
.ev-tbar-node:hover .ev-tbar-tip { display: block; }

/* Legacy evidence docs (kept for presenter) */
.ev-doc-list { display: flex; flex-direction: column; gap: 2px; }
.ev-doc-item { font-size: 10px; padding: 3px 6px; border-radius: 3px; display: flex; align-items: center; gap: 4px; }
.ev-doc-item:hover { background: rgba(255,255,255,.02); }
.ev-doc-icon { font-size: 12px; }

/* Timeline mini */
.tl-mini { display: flex; flex-direction: column; gap: 4px; }
.tl-mini-row { display: flex; gap: 8px; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.03); font-size: 10px; }
.tl-mini-date { flex: 0 0 70px; color: var(--muted); font-family: var(--mono); font-size: 9px; }
.tl-mini-icon { flex: 0 0 20px; text-align: center; }
.tl-mini-body { flex: 1; min-width: 0; }
.tl-mini-title { font-weight: 600; }
.tl-mini-from { font-size: 9px; color: var(--muted); }
.tl-mini-desc { font-size: 9px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ═══════════════════════════════════════════════════════
   Badges (shared)
   ═══════════════════════════════════════════════════════ */
.badge { display: inline-block; font-size: 9px; font-weight: 700; padding: 2px 8px; border-radius: 10px; white-space: nowrap; letter-spacing: .2px; }
.b-ok { background: rgba(16,185,129,.08); color: var(--ok); border: 1px solid rgba(16,185,129,.10); }
.b-warn { background: rgba(245,158,11,.08); color: var(--warn); border: 1px solid rgba(245,158,11,.10); }
.b-danger { background: rgba(239,68,68,.08); color: var(--danger); border: 1px solid rgba(239,68,68,.10); }
.b-accent { background: rgba(59,130,246,.06); color: var(--accent); border: 1px solid rgba(59,130,246,.10); }
.b-muted { background: rgba(255,255,255,.03); color: var(--muted); border: 1px solid rgba(255,255,255,.04); }
.mx-ev-count { display: inline-block; font-size: 8px; font-weight: 700; color: var(--accent); background: rgba(59,130,246,.15); padding: 1px 5px; border-radius: 8px; margin-left: 4px; vertical-align: middle; }

/* ═══════════════════════════════════════════════════════
   Tooltip
   ═══════════════════════════════════════════════════════ */
#mxTooltip { position: fixed; z-index: 900; pointer-events: none; max-width: 380px; min-width: 160px; background: rgba(8,14,28,.96); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid color-mix(in srgb, var(--view-accent, var(--accent)) 40%, rgba(255,255,255,.1)); border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.04), inset 0 1px 0 rgba(255,255,255,.06); padding: 0; display: none; }
#mxTooltip.show { display: block; animation: tt-fade-in .12s ease both; }
@keyframes tt-fade-in { from { opacity: 0; transform: translateY(4px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.tt-header { padding: 6px 10px; background: rgba(59,130,246,.08); border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 8px; border-radius: 7px 7px 0 0; }
.tt-id { font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--accent); }
.tt-col { font-size: 9px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.tt-body { padding: 8px 10px; font-size: 11px; line-height: 1.6; color: var(--text); max-height: 200px; overflow-y: auto; white-space: pre-wrap; word-break: break-word; }
.tt-meta { padding: 4px 10px 6px; border-top: 1px solid var(--border); display: flex; gap: 8px; flex-wrap: wrap; }
.tt-tag { font-size: 8px; padding: 1px 5px; border-radius: 4px; font-weight: 600; }

/* ═══════════════════════════════════════════════════════
   Scope Panel
   ═══════════════════════════════════════════════════════ */
.section-scope { overflow-y: auto; padding: 12px; }
.sc-kpis { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.sc-kpi { background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; padding: 8px 14px; text-align: center; min-width: 80px; }
.sc-kpi-val { display: block; font-size: 18px; font-weight: 800; font-family: var(--mono); color: var(--text); line-height: 1.2; }
.sc-kpi-val.ok { color: var(--ok); } .sc-kpi-val.danger { color: var(--danger); } .sc-kpi-val.accent { color: var(--accent); }
.sc-kpi-label { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }

.sc-block { margin-bottom: 8px; background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.sc-block-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; cursor: pointer; }
.sc-block-head:hover { background: rgba(59,130,246,.02); }
.sc-block-title { font-size: 11px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.sc-block-badge { font-size: 9px; padding: 2px 8px; border-radius: 10px; font-weight: 600; background: rgba(59,130,246,.1); color: var(--accent); }
.sc-chev { display: inline-block; font-size: 8px; transition: transform .2s; }
.sc-chev.open { transform: rotate(90deg); }
.sc-block-body { display: none; padding: 0 12px 12px; }
.sc-block-body.open { display: block; }

.sc-cov-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.sc-cov-table th { text-align: left; padding: 4px 6px; color: var(--muted); border-bottom: 1px solid var(--border); font-weight: 600; font-size: 9px; text-transform: uppercase; }
.sc-cov-table td { padding: 4px 6px; border-bottom: 1px solid rgba(255,255,255,.03); }
.sc-cov-table tr.excluded td { opacity: .4; }
.sc-num { font-family: var(--mono); text-align: center; }
.sc-pct { font-size: 10px; font-family: var(--mono); color: var(--text); }
.sc-cov-bar { flex: 1; height: 4px; background: var(--bg); border-radius: 2px; overflow: hidden; }
.sc-cov-fill { height: 100%; border-radius: 2px; }

.sc-trail { display: flex; flex-direction: column; gap: 3px; }
.sc-trail-item { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 4px; font-size: 10px; }
.sc-trail-item.l1 { border-left: 3px solid var(--accent); background: rgba(59,130,246,.03); }
.sc-trail-item.l2 { border-left: 3px solid var(--warn); background: rgba(245,158,11,.03); }
.sc-trail-item.l3 { border-left: 3px solid var(--teal); background: rgba(20,184,166,.03); }
.sc-trail-item.l4 { border-left: 3px solid var(--danger); background: rgba(239,68,68,.03); }
.sc-trail-layer { font-weight: 700; min-width: 60px; }
.sc-trail-reason { flex: 1; color: var(--text); }
.sc-trail-prov { font-size: 8px; padding: 1px 5px; border-radius: 8px; font-weight: 600; }
.sc-trail-prov.deterministic { background: rgba(59,130,246,.08); color: var(--accent); }
.sc-trail-prov.voted { background: rgba(34,197,94,.08); color: var(--ok); }

.sc-excl-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.sc-excl-table th { text-align: left; padding: 4px 6px; color: var(--muted); border-bottom: 1px solid var(--border); font-weight: 600; font-size: 9px; text-transform: uppercase; }
.sc-excl-table td { padding: 4px 6px; border-bottom: 1px solid rgba(255,255,255,.03); }
.sc-excl-id { font-family: var(--mono); font-weight: 600; color: var(--accent); }
.sc-fw-pills { display: flex; gap: 3px; flex-wrap: wrap; }
.sc-fw-pill { font-size: 8px; padding: 1px 5px; border-radius: 8px; background: rgba(255,255,255,.04); color: var(--muted); font-weight: 600; }
.sc-fw-pill.active { background: rgba(59,130,246,.08); color: var(--accent); }
.sc-rvp { display: flex; flex-direction: column; gap: 3px; }
.sc-rvp-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.03); }
.sc-rvp-label { font-weight: 700; min-width: 80px; font-size: 10px; }
.sc-rvp-cat { font-size: 8px; padding: 2px 6px; border-radius: 4px; font-weight: 600; cursor: pointer; }
.sc-rvp-cat.in-scope { background: var(--ok-bg); color: var(--ok); }
.sc-rvp-cat.excluded { background: var(--danger-bg); color: var(--danger); }
.sc-rvp-cat.deferred { background: var(--warn-bg); color: var(--warn); }

.sc-loading { padding: 40px; text-align: center; color: var(--muted); }

/* RVP Grid (mapping tab) */
.rvp-grid { display: grid; grid-template-columns: 180px 1fr 80px; gap: 0; font-size: 10px; }
.rvp-header { display: contents; }
.rvp-header > div { padding: 4px 8px; font-weight: 700; color: var(--muted); font-size: 9px; text-transform: uppercase; border-bottom: 1px solid var(--border); }
.rvp-header-label { grid-column: 1; }
.rvp-header-cell { text-align: center; }
.rvp-row-label { padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,.03); display: flex; align-items: center; gap: 4px; font-weight: 600; }
.rvp-cell { padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,.03); display: flex; flex-direction: column; gap: 2px; }
.rvp-cell-ref { font-family: var(--mono); font-size: 9px; color: var(--accent); }
.rvp-cell-lbl { font-size: 9px; color: var(--muted); }
.rvp-cell-meta { font-size: 8px; color: var(--muted); }
.rvp-vote-btn { font-size: 8px; padding: 2px 6px; border-radius: 3px; cursor: pointer; background: rgba(59,130,246,.06); color: var(--accent); text-align: center; font-weight: 600; }
.rvp-vote-btn:hover { background: rgba(59,130,246,.12); }
.rvp-vote-btn.voted { background: rgba(34,197,94,.08); color: var(--ok); }
.rvp-promote { font-size: 10px; cursor: pointer; color: var(--muted); margin-left: 4px; }
.rvp-promote:hover { color: var(--accent); }
.rvp-promote.promoted { color: var(--ok); }
.rvp-prov { font-size: 8px; padding: 1px 5px; border-radius: 8px; font-weight: 600; }
.rvp-prov.det { background: rgba(59,130,246,.08); color: var(--accent); }
.rvp-prov.active { background: rgba(34,197,94,.08); color: var(--ok); }
.rvp-prov.promoted { background: rgba(245,158,11,.1); color: #f59e0b; }

/* ═══════════════════════════════════════════════════════
   Triforce — Intent / Projection / Reality
   ═══════════════════════════════════════════════════════ */
.dc-tab[data-tab="intent"].active { border-left-color: var(--accent); color: var(--accent); background: rgba(59,130,246,.06); }
.dc-tab[data-tab="projection"].active { border-left-color: #f59e0b; color: #f59e0b; background: rgba(245,158,11,.06); }
.dc-tab[data-tab="reality"].active { border-left-color: #10b981; color: #10b981; background: rgba(16,185,129,.06); }

.tf-fw-grid { font-size: 10px; }
.tf-fw-row { display: grid; grid-template-columns: 140px 1fr 72px auto; gap: 4px 8px; align-items: center; padding: 5px 4px; border-bottom: 1px solid rgba(255,255,255,.03); }
.tf-fw-row:hover { background: rgba(255,255,255,.02); }
.tf-fw-name { font-weight: 600; display: flex; align-items: center; gap: 4px; }
.tf-fw-ref { font-family: var(--mono); font-size: 9px; color: var(--accent); }
.tf-fw-status { text-align: center; }
.tf-fw-actions { display: flex; gap: 3px; }

.tf-vote-btn { width: 22px; height: 20px; border: 1px solid var(--border); border-radius: 3px; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; display: flex; align-items: center; justify-content: center; }
.tf-vote-btn:hover { background: rgba(59,130,246,.08); color: var(--text); }
.tf-vote-btn.voted-confirm { background: rgba(34,197,94,.12); color: var(--ok); border-color: var(--ok); }
.tf-vote-btn.voted-reject { background: rgba(239,68,68,.12); color: var(--danger); border-color: var(--danger); }
.tf-vote-down { font-size: 8px; }

.tf-promote-btn { width: 22px; height: 20px; border: 1px solid var(--border); border-radius: 3px; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.tf-promote-btn:hover { background: rgba(245,158,11,.08); color: #f59e0b; }
.tf-promote-btn.promoted { background: rgba(245,158,11,.12); color: #f59e0b; border-color: #f59e0b; }

.tf-fw-pills { display: flex; flex-wrap: wrap; gap: 3px; margin: 4px 0; }

.tf-scope-actions { display: flex; gap: 6px; margin-top: 6px; }
.tf-scope-btn { font-size: 9px; padding: 3px 10px; border-radius: 4px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; font-weight: 600; }
.tf-scope-btn:hover { background: rgba(34,197,94,.06); color: var(--ok); }
.tf-scope-btn.voted-include { background: rgba(34,197,94,.12); color: var(--ok); border-color: var(--ok); }
.tf-scope-btn.tf-scope-exclude:hover { background: rgba(239,68,68,.06); color: var(--danger); }
.tf-scope-btn.voted-exclude { background: rgba(239,68,68,.1); color: var(--danger); border-color: var(--danger); }

.tf-candidates { }

/* ═══════ Canonical RVP Grid ═══════ */
.rvp-grid-legend { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 8px; }
.rvp-legend-item { font-size: 8px; color: var(--muted); opacity: .7; }

.rvp-grid { display: flex; flex-direction: column; gap: 2px; }

.rvp-row {
  display: flex; align-items: stretch; gap: 0;
  border: 1px solid var(--border); border-radius: 6px;
  background: rgba(255,255,255,.015); overflow: hidden;
  transition: border-color .15s;
}
.rvp-row:hover { border-color: rgba(59,130,246,.25); }
.rvp-row-top { border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.04); }

.rvp-row-gutter {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; padding: 4px 3px; min-width: 26px;
  background: rgba(255,255,255,.025); border-right: 1px solid var(--border);
}
.rvp-rank { font-size: 9px; font-weight: 700; color: var(--muted); line-height: 1; }
.rvp-arrow {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 8px; padding: 1px 2px; border-radius: 3px; line-height: 1;
}
.rvp-arrow:hover { background: rgba(59,130,246,.12); color: var(--accent); }
.rvp-arrow.rvp-voted { color: var(--ok); }
.rvp-arrow-dn.rvp-voted { color: var(--danger); }

.rvp-row-meta {
  display: flex; flex-direction: column; justify-content: center;
  padding: 4px 6px; min-width: 110px; max-width: 130px;
  border-right: 1px solid var(--border);
}
.rvp-ctrl-id { font-size: 8px; font-weight: 700; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rvp-ctrl-id .badge-tier { font-size: 7px; margin-left: 3px; }
.rvp-ctrl-name { font-size: 8px; color: var(--text); line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rvp-ctrl-stats { font-size: 7px; color: var(--muted); margin-top: 1px; }

.rvp-fw-track {
  display: flex; align-items: stretch; gap: 2px; flex: 1;
  padding: 3px; overflow-x: auto; overflow-y: hidden;
}
.rvp-fw-track::-webkit-scrollbar { height: 3px; }
.rvp-fw-track::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 2px; }

.rvp-fw-box {
  flex: 0 0 auto; min-width: 90px; max-width: 140px;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 3px 5px; border: 1px solid var(--border); border-radius: 4px;
  background: rgba(255,255,255,.02); transition: border-color .15s, background .15s;
}
.rvp-fw-box:hover { border-color: rgba(59,130,246,.2); background: rgba(59,130,246,.04); }
.rvp-fw-primary { border-color: rgba(34,197,94,.3); background: rgba(34,197,94,.05); }

.rvp-fw-label { font-size: 8px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rvp-fw-ref { font-size: 7px; color: var(--muted); line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 1px 0; }
.rvp-fw-votes { display: flex; gap: 2px; justify-content: center; }
.rvp-fw-arrow {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 7px; padding: 1px 3px; border-radius: 3px; line-height: 1;
}
.rvp-fw-arrow:hover { background: rgba(59,130,246,.12); color: var(--accent); }
.rvp-fw-arrow.rvp-voted { color: var(--ok); }

.rvp-no-fw { font-size: 8px; color: var(--muted); font-style: italic; padding: 4px 8px; }
.tf-cand-header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.tf-cand-id { font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--accent); }
.tf-cand-coverage { font-size: 9px; color: var(--ok); margin-left: auto; font-weight: 600; }
.tf-cand-name { font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.tf-cand-desc { font-size: 10px; color: var(--muted); line-height: 1.4; margin-bottom: 6px; }
.tf-cand-fws { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 6px; }
.tf-cand-fw-pill { font-size: 8px; padding: 1px 5px; border-radius: 8px; background: rgba(139,92,246,.06); color: #8b5cf6; }
.tf-cand-actions { display: flex; gap: 4px; }

/* old carousel nav removed — replaced by RVP grid */

.tf-expect-list { display: flex; flex-direction: column; gap: 4px; }
.tf-expect-item { display: flex; align-items: flex-start; gap: 6px; font-size: 10px; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.03); }
.tf-expect-num { flex-shrink: 0; width: 16px; height: 16px; border-radius: 50%; background: rgba(139,92,246,.12); color: #8b5cf6; font-size: 8px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tf-expect-text { color: var(--text); line-height: 1.4; }
.tf-methods { display: flex; gap: 4px; margin-top: 6px; }
.tf-method-pill { font-size: 9px; padding: 2px 8px; border-radius: 8px; background: rgba(100,116,139,.08); color: var(--muted); text-transform: capitalize; }

.mx-has-votes td:first-child { box-shadow: inset 2px 0 0 0 var(--accent); }
.mx-has-replacement td:first-child { box-shadow: inset 2px 0 0 0 #f59e0b; }

/* ═══════════════════════════════════════════════════════
   Presenter Panel (near-fullscreen)
   ═══════════════════════════════════════════════════════ */
.presenter-panel { max-height: 93vh !important; }
.presenter-panel .rp-header { background: rgba(59,130,246,.06); }
.presenter-panel .rp-body { display: flex; flex-direction: column; padding: 0 !important; overflow: hidden; }

/* ── Presenter layout: sidebar nav + content ── */
.prs-layout { display: flex; flex: 1; min-height: 0; overflow: hidden; }
.prs-nav { flex: 0 0 56px; display: flex; flex-direction: column; gap: 2px; padding: 8px 4px; background: rgba(0,0,0,.15); border-right: 1px solid rgba(255,255,255,.04); overflow-y: auto; }
.prs-nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 6px; cursor: pointer; transition: background .1s; border-left: 2px solid transparent; }
.prs-nav-item:hover { background: rgba(255,255,255,.04); }
.prs-nav-item.active { background: rgba(255,255,255,.06); border-left-color: var(--nav-color, var(--accent)); }
.prs-nav-item.active .prs-nav-label { color: var(--nav-color, var(--accent)); }
.prs-nav-icon { font-size: 16px; }
.prs-nav-label { font-size: 7px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.prs-content { flex: 1; min-width: 0; position: relative; overflow: hidden; }
.prs-section { position: absolute; inset: 0; display: none; overflow-y: auto; padding: 16px 22px; }
.prs-section.active { display: block; }
.prs-section-header { font-size: 15px; font-weight: 700; margin-bottom: 12px; color: var(--text); border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.prs-section-subhead { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin: 12px 0 6px; }
.prs-section-body { }

/* ── Overview hero ── */
.prs-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.prs-hero-left { flex: 1; min-width: 0; }
.prs-ctrl-id { font-family: var(--mono); font-size: 20px; font-weight: 800; color: var(--accent); line-height: 1.1; }
.prs-ctrl-name { font-size: 14px; font-weight: 600; color: var(--text); margin: 4px 0 8px; }
.prs-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.prs-risk-badge { width: 72px; height: 72px; border-radius: 12px; border: 2px solid; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0,0,0,.25); flex-shrink: 0; }
.prs-risk-score { font-size: 24px; font-weight: 800; font-family: var(--mono); line-height: 1; }
.prs-risk-label { font-size: 7px; font-weight: 700; letter-spacing: .5px; line-height: 1.4; }
.prs-risk-pm { font-size: 8px; color: var(--muted); font-family: var(--mono); }

.prs-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 12px; margin-bottom: 14px; }
.prs-fact { display: flex; flex-direction: column; }
.prs-fact-label { font-size: 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.prs-fact-val { font-size: 11px; color: var(--text); font-weight: 500; }

.prs-block { margin-bottom: 10px; }
.prs-block label { font-size: 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; display: block; margin-bottom: 2px; }
.prs-block p { font-size: 11px; color: var(--text); line-height: 1.6; }

/* Overview findings mini */
.prs-overview-findings { margin-top: 12px; }
.prs-finding-mini { display: flex; align-items: center; gap: 8px; padding: 5px 8px; background: rgba(255,255,255,.02); border-radius: 4px; margin-bottom: 3px; border-left: 2px solid rgba(245,158,11,.3); }
.prs-finding-mini-who { font-size: 8px; font-weight: 700; color: var(--muted); text-transform: uppercase; min-width: 44px; flex-shrink: 0; }
.prs-finding-mini-text { font-size: 10px; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prs-finding-mini-sev { font-size: 9px; font-weight: 700; flex-shrink: 0; }

/* Overview timeline */
.prs-overview-timeline { margin-top: 10px; }
.prs-event { display: flex; align-items: flex-start; gap: 8px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.03); }
.prs-ev-icon { font-size: 13px; flex-shrink: 0; width: 18px; text-align: center; }
.prs-ev-date { flex: 0 0 68px; font-family: var(--mono); font-size: 9px; color: var(--muted); padding-top: 2px; }
.prs-ev-body { flex: 1; min-width: 0; }
.prs-ev-title { font-size: 10px; font-weight: 600; }

/* Systems pills */
.prs-overview-systems { margin-top: 10px; }
.prs-sys-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.prs-sys-pill { font-size: 9px; padding: 2px 8px; border-radius: 8px; background: rgba(59,130,246,.08); color: var(--accent); font-weight: 600; }

.prs-empty { padding: 24px; text-align: center; color: var(--muted); font-size: 11px; }

.sphere-slot { border: 1px dashed var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 11px; }

/* ═══════════════════════════════════════════════════════
   Dual-Panel Presenter (Framework | Audit Report)
   ═══════════════════════════════════════════════════════ */
.presenter-dual .rp-body { padding: 0 !important; display: flex; flex-direction: column; }

/* Hero banner across full width */
.prs-hero-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; background: linear-gradient(135deg, rgba(59,130,246,.06) 0%, rgba(34,211,238,.04) 100%); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.prs-hero-banner .prs-ctrl-id { font-family: var(--mono); font-size: 22px; font-weight: 800; color: var(--accent); }
.prs-hero-banner .prs-ctrl-name { font-size: 13px; font-weight: 600; color: var(--text); margin-left: 12px; }
.prs-hero-banner .prs-badges { display: inline-flex; gap: 6px; margin-left: 10px; }
.prs-hero-banner .prs-risk-badge { width: 56px; height: 56px; border-radius: 10px; border: 2px solid; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0,0,0,.25); flex-shrink: 0; }
.prs-hero-banner .prs-risk-score { font-size: 18px; font-weight: 800; font-family: var(--mono); line-height: 1; }
.prs-hero-banner .prs-risk-label { font-size: 7px; font-weight: 700; letter-spacing: .4px; }

/* Navigation arrows in title */
.prs-nav-arrows { display: inline-flex; align-items: center; cursor: pointer; padding: 0 4px; font-size: 13px; color: var(--muted); }
.prs-nav-arrows:hover { color: var(--accent); }
.prs-nav-pos { font-size: 9px; color: var(--muted); font-family: var(--mono); margin-left: 8px; }

/* Dual column split */
.prs-dual { display: flex; flex: 1; min-height: 0; overflow: hidden; }
.prs-col { flex: 1; min-width: 0; overflow-y: auto; padding: 16px 20px; }
.prs-col::-webkit-scrollbar { width: 4px; }
.prs-col::-webkit-scrollbar-thumb { background: rgba(59,130,246,.2); border-radius: 2px; }
.prs-col-framework { border-right: 1px solid var(--border); background: rgba(59,130,246,.015); }
.prs-col-audit { background: rgba(245,158,11,.015); }
.prs-col-header { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-bottom: 14px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.prs-col-framework .prs-col-header { color: var(--accent); border-bottom-color: rgba(59,130,246,.2); }
.prs-col-audit .prs-col-header { color: var(--warn); border-bottom-color: rgba(245,158,11,.2); }

/* Framework pills */
.prs-fw-list { display: flex; flex-direction: column; gap: 4px; }
.prs-fw-pill { display: flex; align-items: center; gap: 8px; padding: 4px 8px; background: rgba(59,130,246,.05); border-radius: 4px; border-left: 2px solid rgba(59,130,246,.3); }
.prs-fw-name { font-size: 8px; font-weight: 700; color: var(--accent); min-width: 60px; text-transform: uppercase; }
.prs-fw-ref { font-size: 10px; color: var(--text); }
.prs-fw-link { text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.prs-fw-link:hover { background: rgba(59,130,246,.12); border-left-color: var(--accent); }
.prs-fw-link::after { content: '↗'; font-size: 8px; color: var(--muted); margin-left: 4px; opacity: 0; transition: opacity .15s; }
.prs-fw-link:hover::after { opacity: 1; }

/* SAP pills */
.prs-sap-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.prs-sap-pill { font-size: 9px; padding: 2px 8px; border-radius: 8px; background: rgba(245,158,11,.08); color: var(--warn); font-weight: 600; font-family: var(--mono); text-decoration: none; display: inline-block; }
.prs-sap-link { cursor: pointer; transition: background .15s; }
.prs-sap-link:hover { background: rgba(245,158,11,.18); }

/* Grid */
.prs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 12px; margin-bottom: 10px; }

/* Test expectations */
.prs-test-expects { list-style: none; padding: 0; margin: 0; }
.prs-test-expects li { font-size: 10px; color: var(--text); padding: 3px 0 3px 16px; position: relative; line-height: 1.5; }
.prs-test-expects li::before { content: '✓'; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

/* Audit status */
.prs-audit-status { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.prs-audit-status-text { font-size: 12px; font-weight: 600; color: var(--text); }
.prs-final-note { font-size: 10px; color: var(--ok); padding: 6px 10px; background: rgba(16,185,129,.06); border-radius: 4px; border-left: 2px solid rgba(16,185,129,.3); margin-top: 6px; width: 100%; }

/* Email list */
.prs-email-list { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; }
.prs-email { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 3px; font-size: 10px; }
.prs-email:hover { background: rgba(255,255,255,.03); }
.prs-email-date { flex: 0 0 70px; font-family: var(--mono); font-size: 9px; color: var(--muted); }
.prs-email-sender { flex: 0 0 100px; font-weight: 600; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prs-email-subj { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.prs-email-attach { flex-shrink: 0; font-size: 9px; color: var(--warn); }
.prs-email-more { font-size: 9px; color: var(--muted); padding: 4px 6px; }

/* Evidence docs */
.prs-ev-year { font-size: 9px; font-weight: 700; color: var(--accent); margin: 6px 0 2px; text-transform: uppercase; }
.prs-ev-docs { list-style: none; padding: 0; margin: 0; }
.prs-ev-docs li { font-size: 10px; color: var(--text); padding: 2px 0; line-height: 1.5; }
.prs-ev-prior { opacity: .6; }
.prs-ev-missing { font-size: 11px; color: var(--danger); padding: 8px; background: rgba(239,68,68,.05); border-radius: 4px; border-left: 2px solid rgba(239,68,68,.3); }

/* Findings dual */
.prs-findings-dual { display: flex; gap: 12px; }
.prs-finding-col { flex: 1; min-width: 0; }
.prs-finding-who { font-size: 9px; font-weight: 700; color: var(--muted); text-transform: uppercase; margin-bottom: 6px; padding-bottom: 3px; border-bottom: 1px solid rgba(255,255,255,.06); }
.prs-finding-entry { margin-bottom: 8px; padding: 6px 8px; background: rgba(255,255,255,.02); border-radius: 4px; border-left: 2px solid rgba(245,158,11,.3); }
.prs-finding-ref { font-family: var(--mono); font-size: 9px; font-weight: 700; color: var(--warn); margin-bottom: 2px; }
.prs-finding-sev { font-size: 8px; font-weight: 700; padding: 1px 6px; border-radius: 3px; display: inline-block; margin-bottom: 3px; }
.prs-sev-def { background: rgba(245,158,11,.15); color: #f59e0b; }
.prs-sev-sd { background: rgba(239,68,68,.15); color: #ef4444; }
.prs-sev-nf, .prs-sev-ok { background: rgba(16,185,129,.15); color: #10b981; }
.prs-finding-desc { font-size: 10px; color: var(--text); line-height: 1.5; margin-bottom: 3px; }
.prs-finding-rec { font-size: 9px; color: var(--accent); line-height: 1.4; }
.prs-finding-comp { font-size: 9px; color: var(--warn); line-height: 1.4; margin-top: 2px; }

/* Gaps */
.prs-gap-list { list-style: none; padding: 0; margin: 0; }
.prs-gap-list li { font-size: 10px; color: var(--text); padding: 3px 0; line-height: 1.5; }

/* Requests */
.prs-request { font-size: 10px; color: var(--text); padding: 4px 0; }

/* Remediation */
.prs-rem-action { font-size: 10px; color: var(--text); margin-top: 6px; line-height: 1.5; }

/* Audit workflow steps */
.prs-audit-workflow { display: flex; gap: 2px; margin-bottom: 14px; }
.prs-wf-step { font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 4px 10px; border-radius: 3px; background: rgba(255,255,255,.03); color: var(--muted); border: 1px solid rgba(255,255,255,.06); flex: 1; text-align: center; }
.prs-wf-step.active { background: rgba(59,130,246,.15); color: var(--accent); border-color: rgba(59,130,246,.3); }
.prs-wf-step.done { background: rgba(16,185,129,.1); color: var(--ok); border-color: rgba(16,185,129,.2); }

/* Test description blocks */
.prs-test-block { padding: 8px 10px; background: rgba(59,130,246,.03); border-radius: 6px; border-left: 3px solid rgba(59,130,246,.2); margin-bottom: 10px; }
.prs-test-block label { color: var(--accent) !important; font-size: 9px !important; }
.prs-test-text { font-size: 11px; color: var(--text); line-height: 1.6; white-space: pre-wrap; }
.prs-test-empty { font-size: 10px; color: var(--muted); font-style: italic; }

/* External reference header */
.prs-ext-ref-header { font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 10px 0 6px; margin-top: 10px; border-top: 1px solid rgba(255,255,255,.06); }

/* ═══════════════════════════════════════════════════════
   Narration Presenter — 6-section story per control
   ═══════════════════════════════════════════════════════ */
.presenter-narration .rp-body { padding: 0 !important; display: flex; flex-direction: column; }

/* Tab bar */
.nar-tabs { display: flex; gap: 1px; padding: 0 8px; background: rgba(0,0,0,.2); border-bottom: 1px solid var(--border); flex-shrink: 0; overflow-x: auto; }
.nar-tab { display: flex; align-items: center; gap: 4px; padding: 8px 12px; font-size: 9px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; position: relative; }
.nar-tab:hover { color: var(--text); background: rgba(255,255,255,.02); }
.nar-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.nar-tab.filled .nar-tab-icon { opacity: 1; }
.nar-tab:not(.filled) .nar-tab-icon { opacity: .5; }
.nar-tab-icon { font-size: 12px; }
.nar-tab-label { text-transform: uppercase; letter-spacing: .3px; }
.nar-tab-check { font-size: 8px; color: var(--ok); margin-left: 2px; }

/* Content area */
.nar-content { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 24px; }
.nar-content::-webkit-scrollbar { width: 4px; }
.nar-content::-webkit-scrollbar-thumb { background: rgba(59,130,246,.2); border-radius: 2px; }
.nar-section { display: none; }
.nar-section.active { display: block; }
.nar-section-head { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }

/* Blocks */
.nar-block { margin-bottom: 14px; }
.nar-block label { font-size: 9px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; display: block; margin-bottom: 4px; }
.nar-block p { font-size: 11px; color: var(--text); line-height: 1.7; margin: 0; }
.nar-narrative { font-size: 11px; color: var(--text); line-height: 1.7; margin-bottom: 14px; }
.nar-narrative p { margin: 0 0 8px; }
.nar-narrative li { margin: 0 0 4px; padding-left: 4px; }

/* Meta grid */
.nar-meta-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.nar-meta { display: flex; flex-direction: column; gap: 2px; }
.nar-meta label { font-size: 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.nar-meta span { font-size: 11px; color: var(--text); font-weight: 500; }
.nar-meta-inline { font-size: 10px; color: var(--text); margin-bottom: 3px; }
.nar-status-row { display: flex; gap: 24px; margin: 16px 0; padding: 10px; background: rgba(255,255,255,.02); border-radius: 6px; }

/* Framework pills — clickable links */
.nar-fw-list { display: flex; flex-direction: column; gap: 4px; }
.nar-fw-pill { display: flex; align-items: center; gap: 8px; padding: 5px 10px; background: rgba(59,130,246,.05); border-radius: 4px; border-left: 2px solid rgba(59,130,246,.3); text-decoration: none; cursor: pointer; transition: background .15s; }
a.nar-fw-pill:hover { background: rgba(59,130,246,.1); }
.nar-fw-name { font-size: 8px; font-weight: 700; color: var(--accent); min-width: 65px; text-transform: uppercase; }
.nar-fw-ref { font-size: 10px; color: var(--text); }

/* SAP + system pills */
.nar-pill-row { display: flex; gap: 4px; flex-wrap: wrap; }
.nar-sap-pill { font-size: 9px; padding: 2px 8px; border-radius: 8px; background: rgba(245,158,11,.08); color: var(--warn); font-weight: 600; font-family: var(--mono); }
.nar-sys-pill { font-size: 9px; padding: 2px 8px; border-radius: 8px; background: rgba(59,130,246,.08); color: var(--accent); font-weight: 600; }
.nar-related-pill { font-size: 9px; padding: 3px 10px; border-radius: 6px; background: rgba(139,92,246,.06); color: #a78bfa; cursor: pointer; border: 1px solid rgba(139,92,246,.15); transition: background .15s; }
.nar-related-pill:hover { background: rgba(139,92,246,.12); }

/* 4-layer best practice model */
.nar-layers { margin-bottom: 14px; border: 1px solid rgba(255,255,255,.06); border-radius: 6px; overflow: hidden; }
.nar-layers-title { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 6px 10px; background: rgba(255,255,255,.02); border-bottom: 1px solid rgba(255,255,255,.04); }
.nar-layer { padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,.03); }
.nar-layer:last-child { border-bottom: none; }
.nar-layer p { font-size: 10px; color: var(--text); line-height: 1.6; margin: 2px 0 0; white-space: pre-wrap; }
.nar-layer-tag { font-size: 7px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 2px; }
.nar-layer-1 { background: rgba(99,102,241,.04); }
.nar-layer-1 .nar-layer-tag { color: #818cf8; }
.nar-layer-2 { background: rgba(59,130,246,.04); }
.nar-layer-2 .nar-layer-tag { color: #3b82f6; }
.nar-layer-3 { background: rgba(245,158,11,.04); }
.nar-layer-3 .nar-layer-tag { color: #f59e0b; }
.nar-layer-4 { background: rgba(16,185,129,.04); }
.nar-layer-4 .nar-layer-tag { color: #10b981; }

/* Test procedures */
.nar-proc { padding: 6px 10px; background: rgba(59,130,246,.03); border-radius: 4px; border-left: 2px solid rgba(59,130,246,.2); margin-bottom: 6px; font-size: 10px; color: var(--text); line-height: 1.5; }
.nar-proc-id { font-family: var(--mono); font-size: 8px; font-weight: 700; color: var(--accent); margin-right: 4px; }
.nar-proc-ev { font-size: 9px; color: var(--muted); margin-top: 3px; font-style: italic; }

/* Email list */
.nar-email-list { display: flex; flex-direction: column; gap: 2px; }
.nar-email { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 3px; font-size: 10px; }
.nar-email:hover { background: rgba(255,255,255,.03); }
.nar-email-date { flex: 0 0 72px; font-family: var(--mono); font-size: 9px; color: var(--muted); }
.nar-email-sender { flex: 0 0 110px; font-weight: 600; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nar-email-subj { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.nar-email-attach { flex-shrink: 0; font-size: 9px; color: var(--warn); }
.nar-email-more { font-size: 9px; color: var(--muted); padding: 4px 6px; }

/* Document list */
.nar-doc-list { list-style: none; padding: 0; margin: 0; }
.nar-doc-list li { font-size: 10px; color: var(--text); padding: 3px 0; line-height: 1.5; }
.nar-prior { opacity: .6; }

/* Findings */
.nar-ref-note { font-size: 9px; color: var(--muted); font-style: italic; padding: 6px 10px; background: rgba(245,158,11,.03); border-radius: 4px; border-left: 2px solid rgba(245,158,11,.15); margin-bottom: 12px; }
.nar-findings-grid { display: flex; gap: 16px; }
.nar-finding-block { flex: 1; min-width: 0; }
.nar-finding-who { font-size: 9px; font-weight: 700; color: var(--muted); text-transform: uppercase; margin-bottom: 6px; padding-bottom: 3px; border-bottom: 1px solid rgba(255,255,255,.06); }
.nar-finding { margin-bottom: 10px; padding: 8px 10px; background: rgba(255,255,255,.02); border-radius: 4px; border-left: 2px solid rgba(245,158,11,.3); }
.nar-finding-ref { font-family: var(--mono); font-size: 9px; font-weight: 700; color: var(--warn); margin-bottom: 3px; }
.nar-finding-sev { font-size: 8px; font-weight: 700; padding: 1px 6px; border-radius: 3px; display: inline-block; margin-bottom: 4px; }
.nar-sev-def { background: rgba(245,158,11,.15); color: #f59e0b; }
.nar-sev-sd { background: rgba(239,68,68,.15); color: #ef4444; }
.nar-sev-nf, .nar-sev-ok { background: rgba(16,185,129,.15); color: #10b981; }
.nar-finding p { font-size: 10px; color: var(--text); line-height: 1.6; margin: 0 0 4px; }
.nar-finding-rec { font-size: 9px; color: var(--accent); line-height: 1.4; }
.nar-finding-comp { font-size: 9px; color: var(--warn); line-height: 1.4; margin-top: 3px; }

/* Workflow */
.nar-workflow { display: flex; gap: 2px; margin-bottom: 16px; }
.nar-wf-step { font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 5px 12px; border-radius: 3px; background: rgba(255,255,255,.03); color: var(--muted); border: 1px solid rgba(255,255,255,.06); flex: 1; text-align: center; }
.nar-wf-step.active { background: rgba(59,130,246,.15); color: var(--accent); border-color: rgba(59,130,246,.3); }
.nar-wf-step.done { background: rgba(16,185,129,.1); color: var(--ok); border-color: rgba(16,185,129,.2); }

/* System context in narration */
.nar-sys-context { margin-bottom: 8px; border: 1px solid rgba(255,255,255,.06); border-radius: 6px; overflow: hidden; }
.nar-sys-header { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: rgba(255,255,255,.03); cursor: pointer; font-size: 11px; font-weight: 600; color: var(--text); }
.nar-sys-header:hover { background: rgba(255,255,255,.05); }
.nar-sys-icon { font-size: 14px; }
.nar-sys-detail-btn { margin-left: auto; color: var(--accent); font-size: 12px; }
.nar-sys-item { display: flex; gap: 8px; padding: 3px 10px; font-size: 9px; border-top: 1px solid rgba(255,255,255,.03); }
.nar-sys-item:hover { background: rgba(255,255,255,.02); }
.nar-sys-item-key { flex: 0 0 110px; font-family: var(--mono); font-weight: 700; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nar-sys-item-val { flex: 1; min-width: 0; color: var(--text); line-height: 1.5; }
.nar-sys-item-val em { color: var(--muted); font-style: normal; }
.nar-sys-more { font-size: 8px; color: var(--muted); padding: 3px 10px; border-top: 1px solid rgba(255,255,255,.03); }

/* System presentation panel */
.sys-panel .rp-body { padding: 12px 16px !important; }
.sys-pres-overview { font-size: 11px; color: var(--text); line-height: 1.6; margin-bottom: 12px; padding: 10px; background: rgba(59,130,246,.03); border-radius: 6px; border-left: 3px solid rgba(59,130,246,.2); }
.sys-pres-meta { display: flex; gap: 16px; font-size: 9px; color: var(--muted); margin-bottom: 14px; }
.sys-section { margin-bottom: 14px; }
.sys-section-head { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--accent); padding-bottom: 4px; border-bottom: 1px solid rgba(59,130,246,.15); margin-bottom: 6px; }
.sys-table { width: 100%; border-collapse: collapse; font-size: 9px; }
.sys-table td { padding: 3px 6px; border-bottom: 1px solid rgba(255,255,255,.03); vertical-align: top; color: var(--text); }
.sys-td-key { font-family: var(--mono); font-weight: 700; color: var(--accent); white-space: nowrap; width: 120px; }
.sys-td-meta { color: var(--muted); font-family: var(--mono); font-size: 8px; white-space: nowrap; width: 80px; }
.sys-td-risk { font-weight: 700; font-size: 8px; text-transform: uppercase; width: 60px; text-align: center; }
.sys-risk-critical { color: #ef4444; }
.sys-risk-high { color: #f59e0b; }
.sys-risk-medium { color: #3b82f6; }
.sys-risk-low, .sys-risk-info { color: var(--muted); }
.sys-risk-SD, .sys-risk-sd { color: #ef4444; }
.sys-risk-DEF, .sys-risk-def { color: #f59e0b; }
.sys-risk-warning { color: #f59e0b; }

/* Empty state */
.nar-empty { font-size: 11px; color: var(--muted); font-style: italic; padding: 12px; background: rgba(255,255,255,.015); border-radius: 6px; border: 1px dashed rgba(255,255,255,.06); }
.nar-empty-inline { font-size: 10px; color: var(--muted); font-style: italic; }

/* ═══════════════════════════════════════════════════════
   Intake Panel
   ═══════════════════════════════════════════════════════ */
#intakeBackdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1500; display: none; }
#intakeBackdrop.open { display: block; }
#intakePanel { position: fixed; top: 0; right: -420px; width: 400px; height: 100vh; background: var(--bg2); border-left: 1px solid var(--border); z-index: 1600; display: flex; flex-direction: column; transition: right .25s ease; }
#intakePanel.open { right: 0; }
.intake-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.intake-header h2 { font-size: 14px; }
.intake-close { background: none; border: none; font-size: 20px; color: var(--muted); cursor: pointer; }
.intake-body { flex: 1; overflow-y: auto; padding: 16px; }
.intake-section { margin-bottom: 20px; }
.intake-section h3 { font-size: 12px; margin-bottom: 4px; }
.intake-hint { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.intake-textarea { width: 100%; min-height: 120px; padding: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; color: var(--text); font-family: var(--mono); font-size: 10px; resize: vertical; }
.intake-btn { padding: 6px 14px; border: none; border-radius: 4px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; cursor: pointer; }
.intake-btn:hover { filter: brightness(1.1); }
.intake-btn.secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }
.intake-btn.danger { background: var(--danger); }
.intake-btn-primary { font-size: 13px; padding: 10px 24px; background: linear-gradient(135deg, #3b82f6, #22d3ee); width: 100%; }
.intake-primary { background: rgba(34,211,238,.04); border: 1px solid rgba(34,211,238,.15); border-radius: 8px; padding: 16px; }
.intake-divider { text-align: center; padding: 8px 0; font-size: 10px; color: var(--muted); position: relative; }
.intake-divider span { background: var(--bg2); padding: 0 12px; position: relative; z-index: 1; }
.intake-divider::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--border); }
.intake-progress { margin-top: 10px; }
.intake-progress-bar { height: 4px; background: rgba(255,255,255,.06); border-radius: 2px; overflow: hidden; }
.intake-progress-fill { height: 100%; background: linear-gradient(90deg, #3b82f6, #22d3ee); border-radius: 2px; transition: width .3s; }
.intake-progress-text { font-size: 9px; color: var(--muted); margin-top: 4px; }
.intake-status { font-size: 10px; margin-top: 6px; min-height: 16px; }

/* ═══════════════════════════════════════════════════════
   Panel Engine — shared fixed-position panels
   ═══════════════════════════════════════════════════════ */
.relay-panel { position: fixed; z-index: 5000; background: rgba(17,24,34,.97); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid color-mix(in srgb, var(--view-accent, var(--accent)) 30%, rgba(255,255,255,.08)); border-radius: 14px; box-shadow: 0 16px 48px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.03), inset 0 1px 0 rgba(255,255,255,.05); overflow: hidden; display: flex; flex-direction: column; min-width: 280px; animation: rp-slide-in .25s cubic-bezier(.16,1,.3,1) both; }
/* @keyframes rp-slide-in — now in core/ui/dice-panel.css */
.relay-panel .rp-header { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: linear-gradient(135deg, rgba(59,130,246,.06) 0%, rgba(59,130,246,.02) 100%); border-bottom: 1px solid var(--border); cursor: grab; user-select: none; flex-shrink: 0; }
.relay-panel .rp-header:active { cursor: grabbing; }
.relay-panel .rp-title { flex: 1; font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relay-panel .rp-close { font-size: 14px; cursor: pointer; color: var(--muted); padding: 2px 6px; line-height: 1; }
.relay-panel .rp-close:hover { color: var(--text); }
.relay-panel .rp-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 10px 12px; min-height: 0; }
.relay-panel .rp-body::-webkit-scrollbar { width: 4px; }
.relay-panel .rp-body::-webkit-scrollbar-thumb { background: rgba(59,130,246,.2); border-radius: 2px; }
.relay-panel .rp-resize { position: absolute; z-index: 5; }
.relay-panel .rp-resize-se { bottom: 0; right: 0; width: 14px; height: 14px; cursor: se-resize; }
.relay-panel .rp-resize-se::after { content: ''; position: absolute; bottom: 3px; right: 3px; width: 8px; height: 8px; border-right: 2px solid rgba(255,255,255,.15); border-bottom: 2px solid rgba(255,255,255,.15); }
.relay-panel:hover .rp-resize-se::after { border-color: rgba(59,130,246,.4); }
.relay-panel .rp-resize-e { top: 30px; right: 0; bottom: 14px; width: 5px; cursor: e-resize; }
.relay-panel .rp-resize-s { bottom: 0; left: 14px; right: 14px; height: 5px; cursor: s-resize; }
.relay-panel.rp-dragging { opacity: .88; transition: none; }
.relay-panel.rp-snap-left { box-shadow: inset 4px 0 0 0 var(--accent), 0 8px 28px rgba(0,0,0,.5); }
.relay-panel.rp-snap-right { box-shadow: inset -4px 0 0 0 var(--accent), 0 8px 28px rgba(0,0,0,.5); }

.detail-panel .dc-meta { display: flex; align-items: center; gap: 8px; padding: 4px 0 6px; flex-wrap: wrap; }
.detail-panel .dc-main { display: flex; min-height: 200px; max-height: 340px; }
.detail-panel .dc-sidebar { flex: 0 0 92px; display: flex; flex-direction: column; gap: 1px; padding: 6px 0; background: var(--bg3); border-right: 1px solid var(--border); }
.detail-panel .dc-body { flex: 1; overflow-y: auto; padding: 10px 12px; min-width: 0; transition: opacity .15s ease; }
.detail-panel .dc-body::-webkit-scrollbar { width: 4px; }

.ev-node-panel .rp-body { padding: 8px 10px; }
.ev-node-panel { max-width: 400px; }

/* ═══════════════════════════════════════════════════════
   Domain Ruler — RTS Minimap Heatmap
   ═══════════════════════════════════════════════════════ */
.domain-ruler { flex: 1 1 auto; width: 100%; background: var(--bg2); border-right: none; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; }
.domain-ruler::-webkit-scrollbar { width: 4px; }
.domain-ruler::-webkit-scrollbar-thumb { background: rgba(59,130,246,.2); border-radius: 2px; }

.dr-header { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.dr-title { font-size: 10px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: .5px; }
.dr-legend { display: flex; align-items: center; gap: 3px; font-size: 7px; color: var(--muted); }
.dr-leg-dot { width: 6px; height: 6px; border-radius: 2px; }

.dr-domain { border-bottom: 1px solid rgba(255,255,255,.04); margin: 0 4px 4px; border-radius: 6px; background: rgba(255,255,255,.015); overflow: hidden; }
.dr-domain-head { padding: 6px 8px; cursor: pointer; display: flex; align-items: center; gap: 4px; border-left: 3px solid transparent; transition: background .15s, border-color .15s; }
.dr-domain-head:hover { background: rgba(59,130,246,.06); }
.dr-domain-name { font-size: 10px; font-weight: 700; color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-domain-count { font-size: 9px; color: var(--muted); font-family: var(--mono); }

.dr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(32px, 1fr)); gap: 3px; padding: 4px 6px 8px; }

.dr-cell { position: relative; aspect-ratio: 1; border-radius: 5px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: transform .1s, box-shadow .15s, opacity .2s; border: 1px solid rgba(255,255,255,.04); min-height: 28px; box-shadow: none; }
.dr-cell:hover { transform: scale(1.12); z-index: 2; box-shadow: 0 2px 6px rgba(0,0,0,.4); opacity: 1 !important; }
.dr-cell.dr-selected { outline: 2px solid var(--accent); outline-offset: 1px; transform: scale(1.1); }
.dr-cell.dr-flagged { outline: 2px solid var(--danger); outline-offset: -1px; }
.dr-cell.dr-reviewed { opacity: .65; }

.dr-cell-id { font-size: 7px; font-weight: 700; color: rgba(0,0,0,.7); text-shadow: 0 0 2px rgba(255,255,255,.5); line-height: 1; overflow: hidden; text-overflow: ellipsis; max-width: 100%; text-align: center; }

.dr-badges { position: absolute; top: -3px; right: -3px; display: flex; gap: 1px; pointer-events: none; }
.dr-badge { font-size: 6px; min-width: 10px; height: 10px; border-radius: 5px; display: flex; align-items: center; justify-content: center; line-height: 1; }
.dr-badge-comment { background: rgba(59,130,246,.5); color: #fff; }
.dr-badge-evidence { background: rgba(20,184,166,.5); color: #fff; }
.dr-badge-flag { background: rgba(239,68,68,.5); color: #fff; }
.dr-badge-reviewed { background: rgba(16,185,129,.5); color: #fff; }
.dr-badge-assigned { background: rgba(168,85,247,.5); color: #fff; }
.dr-badge-unread { background: rgba(239,68,68,.7); color: #fff; font-weight: 700; min-width: 12px; height: 12px; border-radius: 6px; font-size: 7px; }

.dr-pulse { animation: drPulse .6s ease-out; }
@keyframes drPulse {
  0% { box-shadow: 0 0 0 0 rgba(59,130,246,.7); }
  50% { box-shadow: 0 0 0 6px rgba(59,130,246,.3); }
  100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); }
}

/* Context menu */
.dr-ctx-menu { position: fixed; z-index: 9000; min-width: 160px; background: var(--bg2); border: 1px solid var(--accent-dim); border-radius: 6px; box-shadow: 0 6px 24px rgba(0,0,0,.6); padding: 4px 0; display: none; }
.dr-ctx-menu.open { display: block; }
.dr-ctx-item { padding: 6px 12px; font-size: 10px; cursor: pointer; color: var(--text); display: flex; align-items: center; gap: 6px; }
.dr-ctx-item:hover { background: rgba(59,130,246,.08); }
.dr-ctx-sep { height: 1px; background: var(--border); margin: 2px 0; }

/* ═══════════════════════════════════════════════════════
   Risk Assessment UI
   ═══════════════════════════════════════════════════════ */
.tf-risk-summary { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.tf-risk-box { width: 52px; height: 52px; border-radius: 8px; border: 2px solid; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0,0,0,.2); flex-shrink: 0; }
.tf-risk-score { font-size: 20px; font-weight: 800; font-family: var(--mono); line-height: 1; }
.tf-risk-label { font-size: 8px; color: var(--muted); }

.tf-risk-bars { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.tf-risk-bar-row { display: flex; align-items: center; gap: 4px; }
.tf-risk-dim { font-size: 9px; color: var(--muted); min-width: 68px; }
.tf-risk-pip { width: 22px; height: 18px; border-radius: 3px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); color: var(--muted); font-size: 8px; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .1s, transform .1s; }
.tf-risk-pip:hover { transform: scale(1.15); border-color: rgba(255,255,255,.3); }
.tf-risk-pip.active { color: #000; font-weight: 800; border-color: transparent; }

.tf-risk-fw-scores { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tf-risk-fw-chip { font-size: 8px; padding: 2px 6px; border-radius: 8px; border: 1px solid; background: rgba(0,0,0,.15); color: var(--text); font-weight: 600; }

/* ═══════════════════════════════════════════════════════
   Panel Engine — Minimize / Cascade / Highlight
   ═══════════════════════════════════════════════════════ */
.relay-panel .rp-minimize { font-size: 14px; cursor: pointer; color: var(--muted); padding: 2px 6px; line-height: 1; }
.relay-panel .rp-minimize:hover { color: var(--text); }
.relay-panel.rp-minimized .rp-body { display: none; }
.relay-panel.rp-minimized { max-height: none; min-width: 200px; }
.relay-panel.rp-minimized .rp-header { border-bottom: none; }

/* Cross-highlight: matrix row glow when hovering its panel */
.mx tbody tr.mx-panel-highlight > td { background: rgba(59,130,246,.08) !important; }
.mx tbody tr.mx-panel-highlight > td.mx-sticky { background: #0f0f15 !important; }
.mx tbody tr.mx-panel-highlight > td.mx-domain-cell { background: #0f0f15 !important; }

/* ═══════════════════════════════════════════════════════
   Condensed Column Badge — count of off-screen columns
   ═══════════════════════════════════════════════════════ */
.mx-condensed-strip {
  display: none; position: absolute; top: 0; z-index: 30;
  height: 100%; overflow: hidden; pointer-events: none;
}
.mx-cond-right { left: auto; right: 57px; }
.mx-cond-badge {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  font-size: 9px; font-weight: 700; font-family: var(--mono);
  color: rgba(180,185,210,.5); background: rgba(13,13,18,.85);
  pointer-events: auto; cursor: pointer;
  border: 1px solid rgba(255,255,255,.06);
  transition: background .15s, color .15s;
  letter-spacing: .3px;
}
.mx-cond-badge:hover { background: rgba(30,30,50,.95); color: rgba(220,220,240,.8); }
.mx-cond-left .mx-cond-badge { border-radius: 0 3px 3px 0; border-left: none; }
.mx-cond-right .mx-cond-badge { border-radius: 3px 0 0 3px; border-right: none; }

/* ═══════════════════════════════════════════════════════
   Frozen Column — Hard vertical boundary
   ═══════════════════════════════════════════════════════ */
.mx-frozen-edge { box-shadow: none; }
.mx-frozen-edge::after {
  content: ''; position: absolute; top: 0; bottom: 0; right: -1px; width: 2px;
  background: rgba(245, 158, 11, .45);
  pointer-events: none;
}
th.mx-frozen-edge::after { z-index: 21; }
td.mx-frozen-edge::after { z-index: 4; }

/* ═══════════════════════════════════════════════════════
   Zone Color Theming — columns ↔ accordion panels
     Personnel (frozen)  = amber    #f59e0b
     Knowledge (info)    = teal     #14b8a6
     Timeline  (events)  = indigo   #818cf8
   ═══════════════════════════════════════════════════════ */

/* --- Header (th) tints — barely visible zone hint --- */
.mx th.mx-zone-personnel { background: rgba(245, 158, 11, .03); border-bottom-color: rgba(245, 158, 11, .10); }
.mx th.mx-zone-knowledge { background: rgba(20, 184, 166, .02); border-bottom-color: rgba(20, 184, 166, .08); }
.mx th.mx-zone-timeline  { background: rgba(129, 140, 248, .02); border-bottom-color: rgba(129, 140, 248, .08); }

/* Sticky overrides — same neutral as base sticky */
.mx th.mx-sticky.mx-zone-personnel { background: #0f0f14; }
.mx td.mx-sticky.mx-zone-personnel { background: #0a0a0e; }

/* --- Cell (td) tints — neutralized (transparent) --- */
.mx td.mx-zone-personnel { background: transparent; }
.mx td.mx-zone-knowledge { background: transparent; }
.mx td.mx-zone-timeline  { background: transparent; }

/* Row hover — single neutral highlight, no zone colors */
.mx tbody tr:hover > td.mx-zone-personnel { background: rgba(255,255,255,.02); }
.mx tbody tr:hover > td.mx-zone-knowledge { background: rgba(255,255,255,.02); }
.mx tbody tr:hover > td.mx-zone-timeline  { background: rgba(255,255,255,.02); }
.mx tbody tr:hover > td.mx-sticky.mx-zone-personnel { background: #0e0e13; }

/* Zone transitions — removed colored borders */
.mx th.mx-zone-first-knowledge { border-left: 1px solid rgba(255,255,255,.04); }
.mx td.mx-zone-first-knowledge { border-left: 1px solid rgba(255,255,255,.03); }
.mx th.mx-zone-first-timeline  { border-left: 1px solid rgba(255,255,255,.04); }
.mx td.mx-zone-first-timeline  { border-left: 1px solid rgba(255,255,255,.03); }

/* Domain cells — neutral sticky background */
.mx-domain-cell.mx-zone-personnel { background: #0a0a0e !important; }
.mx-domain-cell.mx-domain-label.mx-zone-personnel { background: #0b0b0f !important; }

/* ═══════════════════════════════════════════════════════
   Domain Ruler — Scroll sync highlight
   ═══════════════════════════════════════════════════════ */
.dr-domain.dr-in-view { }
.dr-domain-head.dr-active-scroll { background: rgba(59,130,246,.08); border-left-color: var(--accent); box-shadow: inset 0 0 8px rgba(59,130,246,.06); }

/* Domain Ruler — Tooltip */
.dr-tooltip { position: fixed; z-index: 9500; max-width: 240px; background: rgba(10,14,20,.95); backdrop-filter: blur(8px); border: 1px solid var(--accent-dim); border-radius: 8px; padding: 8px 12px; font-size: 10px; color: var(--text); pointer-events: none; box-shadow: 0 6px 20px rgba(0,0,0,.6); display: none; line-height: 1.5; }
.dr-tooltip.open { display: block; }
.dr-tooltip-id { font-family: var(--mono); font-weight: 700; color: var(--accent); margin-bottom: 3px; font-size: 11px; }
.dr-tooltip-name { font-weight: 600; margin-bottom: 4px; }
.dr-tooltip-risk { display: flex; gap: 8px; margin-bottom: 2px; }
.dr-tooltip-risk span { font-family: var(--mono); }
.dr-tooltip-status { font-size: 8px; color: var(--muted); }

/* Domain Ruler — Multi-select */
.dr-cell.dr-multiselected { outline: 2px solid var(--purple); outline-offset: 1px; }
.dr-batch-bar { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: var(--bg2); border: 1px solid var(--accent-dim); border-radius: 8px; padding: 6px 12px; display: flex; align-items: center; gap: 8px; z-index: 9200; box-shadow: 0 6px 20px rgba(0,0,0,.6); font-size: 10px; }
.dr-batch-bar.hidden { display: none; }
.dr-batch-count { font-weight: 700; color: var(--accent); font-family: var(--mono); }
.dr-batch-btn { padding: 3px 8px; border-radius: 4px; border: 1px solid var(--border); background: transparent; color: var(--text); font-size: 9px; cursor: pointer; }
.dr-batch-btn:hover { background: rgba(59,130,246,.08); border-color: var(--accent-dim); }

/* Domain Ruler — Collapse toggle */
.dr-collapse-chev { display: inline-block; font-size: 7px; transition: transform .2s; margin-right: 3px; color: var(--muted); }
.dr-collapse-chev.open { transform: rotate(90deg); }
.dr-grid.dr-collapsed { display: none; }
.dr-domain-agg { font-size: 7px; color: var(--muted); font-family: var(--mono); margin-left: 4px; }

/* Domain Ruler — Sort controls */
.dr-sort-btn { font-size: 7px; cursor: pointer; color: var(--muted); margin-left: auto; padding: 0 4px; opacity: 0; transition: opacity .15s; }
.dr-domain-head:hover .dr-sort-btn { opacity: 1; }
.dr-sort-btn:hover { color: var(--accent); }

/* ═══════════════════════════════════════════════════════
   Tab Glow Indicators
   ═══════════════════════════════════════════════════════ */
.dc-tab.dc-tab-has-content::after { content: ''; position: absolute; left: 0; top: 20%; bottom: 20%; width: 2px; border-radius: 1px; background: var(--tab-color, var(--accent)); opacity: .4; }
.dc-tab.active.dc-tab-has-content::after { opacity: 0; }

/* ═══════════════════════════════════════════════════════
   Sticky Control Meta in Panel Scroll
   ═══════════════════════════════════════════════════════ */
.dc-meta-sticky { position: sticky; top: 0; z-index: 5; background: var(--bg2); padding: 4px 0 6px; border-bottom: 1px solid rgba(255,255,255,.06); margin: -10px -12px 8px; padding: 6px 12px; }

/* ═══════════════════════════════════════════════════════
   Evidence Drag-and-Drop Zone
   ═══════════════════════════════════════════════════════ */
.ev-dropzone { border: 2px dashed rgba(16,185,129,.25); border-radius: 8px; padding: 12px; text-align: center; font-size: 10px; color: var(--muted); margin-bottom: 8px; transition: border-color .15s, background .15s; }
.ev-dropzone.ev-drag-over { border-color: var(--ok); background: rgba(16,185,129,.06); color: var(--text); }
.ev-dropzone-icon { font-size: 18px; display: block; margin-bottom: 4px; }
.ev-dropzone-compact { padding: 8px 6px; margin-top: 6px; }
.ev-dropzone-compact .ev-dropzone-icon { font-size: 14px; margin-bottom: 2px; }

/* ── Evidence Section Headers ── */
.ev-section-header { font-size: 9px; font-weight: 700; color: var(--text); padding: 6px 8px 4px; border-bottom: 1px solid rgba(255,255,255,.06); text-transform: uppercase; letter-spacing: .4px; display: flex; align-items: center; gap: 6px; }
.ev-section-header.ev-section-comms { margin-top: 8px; border-top: 1px solid rgba(255,255,255,.04); color: var(--accent); }
.ev-section-count { font-size: 8px; font-weight: 600; background: rgba(255,255,255,.06); color: var(--muted); border-radius: 8px; padding: 1px 5px; }

/* ── Thread styling ── */
.ev-thread { padding: 4px 8px; border-bottom: 1px solid rgba(255,255,255,.02); cursor: pointer; transition: background .1s; }
.ev-thread:hover { background: rgba(59,130,246,.04); }
.ev-thread-head { display: flex; align-items: center; gap: 6px; }
.ev-thread-badge { font-size: 8px; font-weight: 700; color: var(--accent); background: rgba(59,130,246,.08); border-radius: 8px; padding: 1px 5px; flex-shrink: 0; }
.ev-thread-expand { padding: 2px 0 2px 26px; border-top: 1px solid rgba(255,255,255,.02); }
.ev-thread-msg { font-size: 8px; color: var(--muted); padding: 2px 0; border-bottom: 1px dotted rgba(255,255,255,.02); }
.ev-thread-desc { display: block; font-size: 8px; color: rgba(255,255,255,.3); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-show-more { font-size: 9px; color: var(--accent); padding: 6px 8px; cursor: pointer; font-weight: 600; }
.ev-show-more:hover { text-decoration: underline; }

/* ── Evidence Split Pane ── */
.ev-split { display: flex; gap: 0; flex: 1; min-height: 200px; max-height: 400px; border: 1px solid rgba(255,255,255,.04); border-radius: 6px; overflow: hidden; }
.ev-split-list { flex: 0 0 48%; max-width: 48%; overflow-y: auto; border-right: 1px solid rgba(255,255,255,.06); padding: 4px 0; background: rgba(0,0,0,.12); }
.ev-split-preview { flex: 1; min-width: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0,0,0,.06); padding: 10px; }
.ev-preview-empty { text-align: center; color: var(--muted); opacity: .5; }
.ev-preview-empty .ev-preview-icon { font-size: 36px; margin-bottom: 6px; }
.ev-preview-empty p { font-size: 10px; }

.ev-preview-content { width: 100%; height: 100%; display: flex; flex-direction: column; }
.ev-preview-header { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,.06); flex-shrink: 0; }
.ev-preview-header-icon { font-size: 16px; }
.ev-preview-header-title { font-size: 11px; font-weight: 600; color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-preview-header-date { font-size: 9px; color: var(--muted); font-family: var(--mono); }
.ev-preview-body { flex: 1; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 10px; min-height: 0; }
.ev-preview-body img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 2px 12px rgba(0,0,0,.3); }
.ev-preview-body iframe { width: 100%; height: 100%; border: none; border-radius: 4px; }
.ev-preview-body .ev-preview-text { font-size: 10px; color: var(--muted); text-align: center; line-height: 1.6; }
.ev-preview-body .ev-preview-text .ev-preview-big-icon { font-size: 48px; display: block; margin-bottom: 8px; opacity: .3; }
.ev-preview-meta { padding: 6px 8px; border-top: 1px solid rgba(255,255,255,.04); font-size: 9px; color: var(--muted); display: flex; gap: 12px; flex-shrink: 0; }

/* ── Evidence Vault Viewer ── */
.ev-viewer { width: 100%; height: 100%; display: flex; flex-direction: column; background: rgba(5,10,20,.6); border-radius: 4px; overflow: hidden; }
.ev-viewer-header { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: rgba(10,14,24,.95); border-bottom: 1px solid rgba(255,255,255,.06); flex-shrink: 0; }
.ev-viewer-icon { font-size: 16px; flex-shrink: 0; }
.ev-viewer-title { flex: 1; font-size: 11px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-viewer-actions { display: flex; gap: 3px; flex-shrink: 0; }
.ev-viewer-btn { font-size: 11px; color: rgba(200,215,230,.35); cursor: pointer; padding: 2px 6px; border: 1px solid rgba(255,255,255,.08); border-radius: 3px; transition: all .15s; line-height: 1; }
.ev-viewer-btn:hover { color: #fff; border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.05); }
.ev-viewer-media { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; background: rgba(0,0,0,.4); min-height: 120px; position: relative; }
.ev-viewer-media video, .ev-viewer-media audio { width: 100%; height: 100%; outline: none; object-fit: contain; }
.ev-viewer-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 2px; }
.ev-viewer-pdf { width: 100%; height: 100%; border: none; }
.ev-viewer-text { width: 100%; height: 100%; overflow: auto; padding: 10px; background: rgba(10,16,28,.95); font-family: 'Courier New', monospace; font-size: 10px; color: rgba(200,215,230,.65); white-space: pre-wrap; word-break: break-word; margin: 0; }
.ev-viewer-video { width: 100%; height: 100%; object-fit: contain; }
.ev-viewer-audio { width: 90%; max-width: 100%; }
.ev-viewer-loading { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ev-viewer-spinner { width: 24px; height: 24px; border: 2px solid rgba(68,170,255,.15); border-top-color: rgba(68,170,255,.6); border-radius: 50%; animation: ev-spin .8s linear infinite; }
@keyframes ev-spin { to { transform: rotate(360deg); } }
.ev-viewer-loading-label { font-size: 9px; color: rgba(200,215,230,.25); letter-spacing: 1px; }
.ev-viewer-msg { color: rgba(200,215,230,.25); font-size: 10px; letter-spacing: .5px; text-align: center; padding: 16px; }
.ev-viewer-meta { flex-shrink: 0; padding: 6px 10px; border-top: 1px solid rgba(255,255,255,.06); background: rgba(10,14,24,.95); overflow-y: auto; max-height: 120px; }
.ev-vm-row { display: flex; justify-content: space-between; padding: 2px 0; font-size: 9px; }
.ev-vm-label { color: rgba(200,215,230,.3); letter-spacing: .5px; text-transform: uppercase; font-size: 8px; }
.ev-vm-value { color: rgba(200,215,230,.6); text-align: right; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-viewer-empty { text-align: center; color: var(--muted); padding: 20px 16px; }
.ev-viewer-empty-icon { font-size: 40px; display: block; margin-bottom: 8px; opacity: .25; }
.ev-viewer-empty-type { font-size: 10px; color: var(--muted); margin: 2px 0; }
.ev-viewer-empty-desc { max-width: 240px; margin: 6px auto; font-size: 9px; color: var(--muted); word-break: break-all; opacity: .6; }
.ev-viewer-empty-hint { font-size: 10px; color: var(--muted); margin-top: 8px; opacity: .5; }
.ev-xlsx-tabs { display: flex; gap: 2px; padding: 4px 6px; background: rgba(10,14,24,.95); border-bottom: 1px solid rgba(255,255,255,.06); overflow-x: auto; flex-shrink: 0; }
.ev-xlsx-tab { padding: 2px 8px; font-size: 8px; color: rgba(200,215,230,.35); cursor: pointer; border-radius: 3px; border: 1px solid transparent; transition: all .15s; white-space: nowrap; }
.ev-xlsx-tab:hover { color: rgba(200,215,230,.6); }
.ev-xlsx-tab.active { background: rgba(68,170,255,.1); border-color: rgba(68,170,255,.2); color: rgba(68,170,255,.8); }

/* ── Evidence List Items ── */
.ev-list-item { display: flex; align-items: center; gap: 6px; padding: 5px 8px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,.02); transition: background .1s; }
.ev-list-item:hover { background: rgba(59,130,246,.06); }
.ev-list-item.ev-list-active { background: rgba(59,130,246,.1); border-left: 2px solid var(--accent); }
.ev-list-icon { font-size: 14px; flex-shrink: 0; width: 20px; text-align: center; }
.ev-list-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ev-list-title { font-size: 10px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-list-meta { font-size: 8px; color: var(--muted); }
.ev-list-item.ev-previewable { border-left: 2px solid rgba(16,185,129,.3); }
.ev-vault-badge { font-size: 10px; flex-shrink: 0; margin-right: 2px; }
.ev-vault-cloud { color: #22d3ee; }
.ev-vault-local { color: #10b981; }
.ev-vault-ref { color: var(--muted); opacity: .6; }
.ev-ftype { font-size: 8px; color: var(--accent); font-weight: 600; }
.ev-list-actions { display: flex; gap: 2px; flex-shrink: 0; }
.ev-action-sm { font-size: 10px !important; padding: 2px 4px !important; min-width: 0 !important; }

/* ═══════════════════════════════════════════════════════
   Column Group Headers
   ═══════════════════════════════════════════════════════ */
/* Group header row removed — group toggles are in cmd-bar now */

/* ═══════════════════════════════════════════════════════
   Conditional Cell Formatting (intensified for visibility)
   ═══════════════════════════════════════════════════════ */
.mx-cell-ok { background: rgba(16,185,129,.04) !important; border-left: 1px solid rgba(16,185,129,.15); }
.mx-cell-warn { background: rgba(245,158,11,.04) !important; border-left: 1px solid rgba(245,158,11,.15); }
.mx-cell-danger { background: rgba(239,68,68,.04) !important; border-left: 1px solid rgba(239,68,68,.15); }
.mx-cell-accent { background: rgba(59,130,246,.03) !important; border-left: 1px solid rgba(59,130,246,.12); }

/* ═══════════════════════════════════════════════════════
   Focus Highlighting (cross-view)
   ═══════════════════════════════════════════════════════ */
.mx tbody tr.mx-focused > td { background: rgba(59,130,246,.1) !important; box-shadow: inset 0 0 0 1px rgba(59,130,246,.2); }
.mx tbody tr.mx-focused > td.mx-sticky { background: #0f0f15 !important; }
.mx tbody tr.mx-focused > td.mx-domain-cell { background: #0f0f15 !important; }
.dr-cell.dr-focused { outline: 2px solid var(--view-accent, var(--accent)); outline-offset: 1px; transform: scale(1.08); z-index: 2; }

/* ═══════════════════════════════════════════════════════
   Minimap — Pin Comment Amber Dots
   ═══════════════════════════════════════════════════════ */
/* Rendered on canvas — no CSS needed */

/* ═══════════════════════════════════════════════════════
   Keyboard Navigation Focus Ring
   ═══════════════════════════════════════════════════════ */
.mx tbody tr.mx-kb-focus > td { outline: 1px solid var(--accent); outline-offset: -1px; }
.mx tbody tr.mx-kb-focus > td:first-child { box-shadow: inset 2px 0 0 var(--accent); }

/* ═══════════════════════════════════════════════════════
   Activity Toast Notifications
   ═══════════════════════════════════════════════════════ */
.itgc-toast-container { position: fixed; bottom: 16px; left: 16px; z-index: 9800; display: flex; flex-direction: column-reverse; gap: 6px; pointer-events: none; max-width: 300px; }
.itgc-toast { background: var(--bg2); border: 1px solid var(--accent-dim); border-radius: 6px; padding: 8px 12px; font-size: 10px; color: var(--text); box-shadow: 0 4px 16px rgba(0,0,0,.5); pointer-events: auto; display: flex; align-items: center; gap: 8px; animation: toastIn .25s ease; }
.itgc-toast.toast-out { animation: toastOut .3s ease forwards; }
.itgc-toast-icon { font-size: 14px; flex-shrink: 0; }
.itgc-toast-text { flex: 1; line-height: 1.4; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(8px); } }

/* ═══════════════════════════════════════════════════════
   Risk Matrix Export (print-friendly, inline styles used)
   ═══════════════════════════════════════════════════════ */
/* Handled as standalone HTML window — no CSS here */

/* ═══════════════════════════════════════════════════════
   Quick-Compare Panel Mode
   ═══════════════════════════════════════════════════════ */
.rp-compare-indicator { position: absolute; top: 4px; left: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--purple); display: none; }
.relay-panel.rp-compare .rp-compare-indicator { display: block; }

/* ═══════════════════════════════════════════════════════
   Timeline Tree Panel
   ═══════════════════════════════════════════════════════ */
.timeline-tree-panel .rp-body { overflow-y: auto; max-height: calc(100vh - 120px); }
.tt-summary { display: flex; gap: 12px; padding: 8px 0 10px; border-bottom: 1px solid rgba(255,255,255,.06); margin-bottom: 8px; }
.tt-stat { font-size: 11px; color: var(--accent); font-weight: 600; }
.tt-search { margin-bottom: 8px; }
.tt-search-input { width: 100%; background: var(--bg3); border: 1px solid rgba(255,255,255,.08); border-radius: 4px; padding: 5px 8px; font-size: 11px; color: var(--text); outline: none; }
.tt-search-input:focus { border-color: var(--accent-dim); }
.tt-tree { font-size: 11px; }
.tt-arrow { display: inline-block; width: 12px; font-size: 8px; color: var(--muted); cursor: pointer; transition: transform .15s; user-select: none; }
.tt-icon { margin-right: 4px; }
.tt-count { background: rgba(255,255,255,.06); border-radius: 8px; padding: 1px 6px; font-size: 9px; color: var(--muted); margin-left: auto; }

.tt-phase { margin-bottom: 2px; }
.tt-phase-header { display: flex; align-items: center; gap: 4px; padding: 6px 8px; cursor: pointer; border-radius: 4px; transition: background .1s; }
.tt-phase-header:hover { background: rgba(255,255,255,.03); }
.tt-phase-label { font-weight: 700; font-size: 12px; }
.tt-phase-body { padding-left: 12px; }

.tt-domain { margin-bottom: 1px; }
.tt-domain-header { display: flex; align-items: center; gap: 4px; padding: 4px 8px; cursor: pointer; border-radius: 3px; transition: background .1s; }
.tt-domain-header:hover { background: rgba(255,255,255,.02); }
.tt-domain-label { font-weight: 600; font-size: 11px; color: #f59e0b; }
.tt-domain-body { padding-left: 14px; }

.tt-control { margin-bottom: 1px; }
.tt-control-header { display: flex; align-items: center; gap: 4px; padding: 3px 6px; cursor: pointer; border-radius: 3px; transition: background .1s; }
.tt-control-header:hover { background: rgba(255,255,255,.02); }
.tt-ctrl-id { font-family: var(--mono); font-size: 10px; color: var(--accent); font-weight: 600; }
.tt-ctrl-name { font-size: 10px; color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tt-goto { background: none; border: 1px solid rgba(255,255,255,.1); border-radius: 3px; color: var(--accent); font-size: 10px; padding: 1px 5px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.tt-control-header:hover .tt-goto { opacity: 1; }
.tt-goto:hover { background: rgba(59,130,246,.1); }

.tt-control-body { padding-left: 16px; }
.tt-collapsed { display: none; }

.tt-event { display: flex; align-items: flex-start; gap: 6px; padding: 3px 6px; border-left: 2px solid rgba(255,255,255,.06); margin-left: 4px; font-size: 10px; }
.tt-event-evidence { border-left-color: rgba(59,130,246,.3); }
.tt-event-finding { border-left-color: rgba(239,68,68,.3); }
.tt-event-remediation { border-left-color: rgba(139,92,246,.3); }
.tt-event-conclusion { border-left-color: rgba(16,185,129,.3); }
.tt-event-icon { flex-shrink: 0; font-size: 11px; }
.tt-event-type { font-weight: 600; color: var(--muted); text-transform: uppercase; font-size: 8px; letter-spacing: .3px; min-width: 50px; }
.tt-event-ref { font-family: var(--mono); font-size: 9px; color: var(--accent); background: rgba(59,130,246,.08); padding: 0 4px; border-radius: 2px; }
.tt-event-period { font-size: 9px; color: var(--muted); background: rgba(255,255,255,.04); padding: 0 4px; border-radius: 2px; }
.tt-event-desc { flex: 1; color: var(--text); line-height: 1.4; }
.tt-event-ranking { font-size: 8px; font-weight: 700; padding: 1px 5px; border-radius: 3px; text-transform: uppercase; }
.tt-event-ranking.tt-ranking-ok, .tt-event-ranking.tt-ranking-nf { color: #10b981; background: rgba(16,185,129,.1); }
.tt-event-ranking.tt-ranking-def, .tt-event-ranking.tt-ranking-sd { color: #ef4444; background: rgba(239,68,68,.1); }
.tt-event-status { font-size: 9px; color: var(--muted); font-style: italic; }

/* ═══════════════════════════════════════════════════════
   Layer 2 Material Control Dashboard
   ═══════════════════════════════════════════════════════ */
.layer2-dashboard-panel .rp-body { overflow-y: auto; max-height: calc(100vh - 120px); }
.l2d-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.l2d-card { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); border-radius: 6px; padding: 10px 12px; text-align: center; }
.l2d-card-primary { border-color: rgba(59,130,246,.2); background: rgba(59,130,246,.04); }
.l2d-card-value { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1.1; }
.l2d-card-primary .l2d-card-value { color: var(--accent); }
.l2d-card-label { font-size: 10px; font-weight: 600; color: var(--text); margin-top: 2px; }
.l2d-card-sub { font-size: 8px; color: var(--muted); margin-top: 1px; }

.l2d-section { margin-bottom: 12px; }
.l2d-section-title { font-size: 11px; font-weight: 700; color: var(--text); margin: 0 0 6px; padding-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,.06); }

.l2d-bar-container { display: flex; height: 22px; border-radius: 4px; overflow: hidden; }
.l2d-bar-segment { display: flex; align-items: center; justify-content: center; transition: width .3s ease; }
.l2d-bar-label { font-size: 8px; font-weight: 600; color: #fff; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,.5); }

.l2d-legend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.l2d-legend-item { display: flex; align-items: center; gap: 3px; font-size: 9px; color: var(--muted); }
.l2d-legend-dot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }

.l2d-tier-row { display: flex; gap: 8px; }
.l2d-tier { flex: 1; text-align: center; padding: 8px; border-radius: 6px; }
.l2d-tier-key { background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.2); }
.l2d-tier-important { background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.2); }
.l2d-tier-secondary { background: rgba(100,116,139,.08); border: 1px solid rgba(100,116,139,.2); }
.l2d-tier-count { font-size: 20px; font-weight: 800; display: block; }
.l2d-tier-key .l2d-tier-count { color: #ef4444; }
.l2d-tier-important .l2d-tier-count { color: #f59e0b; }
.l2d-tier-secondary .l2d-tier-count { color: #64748b; }
.l2d-tier-label { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }

.l2d-domain-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.l2d-domain-table th { text-align: left; padding: 4px 6px; color: var(--muted); font-weight: 600; font-size: 9px; text-transform: uppercase; letter-spacing: .3px; border-bottom: 1px solid rgba(255,255,255,.08); }
.l2d-domain-table td { padding: 3px 6px; border-bottom: 1px solid rgba(255,255,255,.03); }
.l2d-dom-name { font-weight: 600; color: var(--accent); cursor: pointer; }
.l2d-dom-name:hover { text-decoration: underline; }
.l2d-ok { color: #10b981; }
.l2d-def { color: #ef4444; font-weight: 600; }
.l2d-nt { color: #64748b; }
.l2d-row-warn { background: rgba(239,68,68,.03); }
.l2d-row-dim { opacity: .5; }

.l2d-mitigating { display: flex; gap: 12px; }
.l2d-mit-stat { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; }
.l2d-mit-ok { background: rgba(16,185,129,.06); border: 1px solid rgba(16,185,129,.15); }
.l2d-mit-warn { background: rgba(239,68,68,.06); border: 1px solid rgba(239,68,68,.15); }
.l2d-mit-count { font-size: 18px; font-weight: 800; }
.l2d-mit-ok .l2d-mit-count { color: #10b981; }
.l2d-mit-warn .l2d-mit-count { color: #ef4444; }
.l2d-mit-label { font-size: 9px; color: var(--muted); line-height: 1.3; }

.l2d-score { display: flex; align-items: center; gap: 16px; padding: 8px; }
.l2d-score-ring { width: 80px; height: 80px; flex-shrink: 0; }
.l2d-score-ring svg { width: 100%; height: 100%; }
.l2d-score-detail { font-size: 12px; color: var(--text); font-weight: 600; }
.l2d-score-sub { font-size: 10px; color: var(--muted); font-weight: 400; margin-top: 2px; }

/* ═══════════════════════════════════════════════════════
   Wizard Bridge Panel
   ═══════════════════════════════════════════════════════ */
.wizard-bridge-panel .rp-body { overflow-y: auto; max-height: calc(100vh - 120px); }
.wiz-bridge-container { padding: 4px 0; }
.wiz-bridge-info { font-size: 10px; color: var(--muted); line-height: 1.5; margin-bottom: 10px; padding: 6px 10px; background: rgba(59,130,246,.04); border-left: 3px solid var(--accent-dim); border-radius: 4px; }
.wiz-cur-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 10px; padding: 8px; background: rgba(255,255,255,.02); border-radius: 6px; }
.wiz-cur-item { font-size: 10px; }
.wiz-cur-label { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .3px; display: block; }
.wiz-cur-val { color: var(--text); font-weight: 600; }

/* ═══════════════════════════════════════════════════════
   Evidence Manager Panel
   ═══════════════════════════════════════════════════════ */
.evidence-manager-panel .rp-body { overflow-y: auto; max-height: calc(100vh - 100px); }
.cmd-vault-btn { color: #22d3ee !important; }
.evm-stats { display: flex; gap: 8px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.evm-stat { flex: 1; text-align: center; }
.evm-stat-val { display: block; font-size: 16px; font-weight: 700; color: var(--text); }
.evm-stat-lbl { font-size: 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.evm-vault { color: #22d3ee; }
.evm-local { color: #10b981; }
.evm-ref { color: var(--muted); }
.evm-vault-status { font-size: 9px; padding: 6px 0; text-align: center; }
.evm-online { color: #10b981; }
.evm-offline { color: var(--muted); }
.evm-bulk-zone { border: 2px dashed rgba(34,211,238,.2); border-radius: 8px; padding: 16px; text-align: center; margin: 8px 0; transition: all .2s; cursor: pointer; }
.evm-bulk-zone.evm-drag-active { border-color: #22d3ee; background: rgba(34,211,238,.06); }
.evm-bulk-inner { pointer-events: none; }
.evm-bulk-icon { font-size: 24px; display: block; margin-bottom: 4px; }
.evm-bulk-zone p { font-size: 10px; color: var(--muted); margin: 2px 0; }
.evm-bulk-hint { font-size: 9px !important; color: var(--muted); opacity: .7; }
.evm-grid { margin-top: 8px; }
.evm-grid-header { display: flex; gap: 4px; padding: 4px 6px; border-bottom: 1px solid rgba(255,255,255,.08); }
.evm-gh { font-size: 8px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.evm-row { display: flex; gap: 4px; padding: 3px 6px; align-items: center; border-bottom: 1px solid rgba(255,255,255,.02); cursor: pointer; transition: background .1s; }
.evm-row:hover { background: rgba(59,130,246,.06); }
.evm-cell { font-size: 9px; color: var(--muted); }
.evm-count { text-align: center; font-family: var(--mono); }
.evm-code { font-size: 8px; font-weight: 700; padding: 1px 5px; border-radius: 3px; }
.evm-bar { width: 100%; height: 6px; background: rgba(255,255,255,.04); border-radius: 3px; overflow: hidden; }
.evm-bar-fill { height: 100%; border-radius: 3px; transition: width .3s; }
.evm-bar-ok .evm-bar-fill { background: #10b981; }
.evm-bar-warn .evm-bar-fill { background: #f59e0b; }
.evm-bar-danger .evm-bar-fill { background: #ef4444; }
.evm-bar-empty .evm-bar-fill { background: rgba(255,255,255,.08); }
.evm-source-path { font-size: 9px; padding: 6px 0; display: flex; gap: 6px; align-items: center; border-bottom: 1px solid rgba(255,255,255,.04); }
.evm-path-label { color: var(--muted); text-transform: uppercase; letter-spacing: .3px; font-weight: 700; }
.evm-path-val { color: var(--accent); font-family: var(--mono); word-break: break-all; }
.evm-dir-tree { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.04); }
.evm-dir-header { font-size: 10px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.evm-dir-meta { font-size: 8px; color: var(--muted); margin-bottom: 4px; }
.evm-dir-item { display: flex; align-items: center; gap: 6px; padding: 2px 4px; cursor: pointer; border-radius: 3px; transition: background .1s; }
.evm-dir-item:hover { background: rgba(59,130,246,.06); }
.evm-dir-icon { font-size: 12px; width: 18px; text-align: center; flex-shrink: 0; }
.evm-dir-name { font-size: 9px; color: var(--text); flex: 1; }
.evm-dir-count { font-size: 9px; color: var(--accent); font-weight: 700; font-family: var(--mono); }
.evm-dir-matched { font-size: 8px; color: var(--ok); font-weight: 600; margin-left: 4px; }
.evm-empty-hint { text-align: center; padding: 16px; color: var(--muted); font-size: 11px; line-height: 1.6; background: rgba(59,130,246,.04); border-radius: 8px; margin: 8px 0; }
.evm-empty-hint p { margin: 4px 0; }

/* ── Excel Preview Table ── */
.ev-xlsx-preview { overflow: auto; max-height: 300px; font-size: 9px; }
.ev-xlsx-preview table { border-collapse: collapse; width: 100%; background: var(--bg1); }
.ev-xlsx-preview th, .ev-xlsx-preview td { border: 1px solid rgba(255,255,255,.06); padding: 2px 6px; text-align: left; font-size: 9px; color: var(--text); white-space: nowrap; }
.ev-xlsx-preview th { background: rgba(59,130,246,.08); font-weight: 700; color: var(--accent); font-size: 8px; text-transform: uppercase; position: sticky; top: 0; }
.ev-xlsx-preview tr:nth-child(even) td { background: rgba(255,255,255,.02); }

/* ═══════════════════════════════════════════════════════
   Cross-View Focus Highlight System
   ═══════════════════════════════════════════════════════ */

/* Matrix focus states — staged narrative reveal */
tr[data-id] { transition: opacity 0.5s ease, box-shadow 0.5s ease, background 0.5s ease; }
tr[data-id] td { transition: opacity 0.5s ease, box-shadow 0.4s ease, background 0.4s ease; }

/* Stage 0: Evidence whisper — evidence cells on hovered row glow */
.mx-stage-ev-row { box-shadow: inset 3px 0 0 rgba(16,185,129,0.4); }
td.mx-stage-ev { background: rgba(16,185,129,0.12) !important; box-shadow: inset 0 0 12px rgba(16,185,129,0.15); }

/* Stage 1: Thread glow — SAP/system cells on related rows */
td.mx-stage-thread { background: rgba(59,130,246,0.10) !important; box-shadow: inset 0 0 10px rgba(59,130,246,0.12); }

/* Stage 3+: Full focus classes */
.mx-focus-dim td { opacity: 0.15 !important; }
.mx-focus-related td { opacity: 0.7; }
.mx-focus-related { box-shadow: inset 3px 0 0 rgba(59,130,246,0.35); }
.mx-focus-primary { box-shadow: inset 3px 0 0 var(--accent); background: rgba(59,130,246,0.08) !important; }
.mx-focus-primary td { opacity: 1 !important; }

/* Domain ruler focus states */
.dr-focus-dim { opacity: 0.15 !important; transition: opacity 0.4s ease; }
.dr-focus-glow { box-shadow: 0 0 6px rgba(59,130,246,0.4); z-index: 1; transition: box-shadow 0.4s ease, opacity 0.4s ease; }
.dr-focus-primary { animation: dr-focus-pulse 0.7s ease-in-out 2; box-shadow: 0 0 8px rgba(59,130,246,0.6); z-index: 2; }
.dr-domain-focus .dr-domain-name { text-shadow: 0 0 6px rgba(59,130,246,0.35); transition: text-shadow 0.4s ease; }
.dr-domain-focus .dr-domain-head { background: rgba(59,130,246,0.04); }

/* Sidebar focus states */
.sr-focus-glow { background: rgba(59,130,246,0.08) !important; box-shadow: inset 2px 0 0 var(--accent); transition: background 0.4s ease, box-shadow 0.4s ease; }

@keyframes dr-focus-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 6px rgba(59,130,246,0.4); }
  50% { transform: scale(1.12); box-shadow: 0 0 12px rgba(59,130,246,0.7); }
}

/* ═══════════════════════════════════════════════════════
   Theme Panel
   ═══════════════════════════════════════════════════════ */
.theme-panel .rp-body { padding: 8px 12px; overflow-y: auto; max-height: 70vh; }
.tp-section { margin-bottom: 10px; }
.tp-section-title { font-size: 9px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; padding-bottom: 2px; border-bottom: 1px solid var(--border); }
.tp-presets { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tp-preset { padding: 3px 10px; border-radius: 4px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; transition: all .15s; position: relative; }
.tp-preset:hover { border-color: var(--accent); color: var(--accent); }
.tp-preset-active { border-color: var(--accent); color: var(--accent); background: rgba(59,130,246,.08); font-weight: 600; }
.tp-preset-del { margin-left: 4px; font-size: 12px; color: var(--danger); cursor: pointer; opacity: .6; }
.tp-preset-del:hover { opacity: 1; }
.tp-color-rows { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.tp-color-row { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.tp-color-label { font-size: 10px; color: var(--text); width: 80px; flex-shrink: 0; }
.tp-color-row input[type="color"] { width: 24px; height: 18px; border: 1px solid var(--border); border-radius: 3px; padding: 0; cursor: pointer; background: transparent; }
.tp-color-row input[type="color"]::-webkit-color-swatch-wrapper { padding: 1px; }
.tp-color-row input[type="color"]::-webkit-color-swatch { border: none; border-radius: 2px; }
.tp-color-hex { font-size: 9px; font-family: var(--mono); color: var(--muted); }
.tp-domain-grid, .tp-status-grid { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.tp-swatch-mini { display: flex; align-items: center; gap: 3px; cursor: pointer; padding: 2px 4px; border-radius: 3px; transition: background .1s; }
.tp-swatch-mini:hover { background: rgba(255,255,255,.04); }
.tp-swatch-mini input[type="color"] { width: 0; height: 0; padding: 0; border: 0; position: absolute; opacity: 0; pointer-events: none; }
.tp-swatch-dot { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(255,255,255,.1); cursor: pointer; flex-shrink: 0; }
.tp-swatch-mini:hover .tp-swatch-dot { border-color: rgba(255,255,255,.3); }
.tp-swatch-id { font-size: 8px; font-family: var(--mono); color: var(--muted); }
.tp-actions { display: flex; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.tp-action-btn { flex: 1; padding: 5px 8px; border-radius: 4px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; transition: all .15s; }
.tp-action-btn:hover { border-color: var(--accent); color: var(--accent); }
.tp-action-save { border-color: var(--ok); color: var(--ok); }
.tp-action-save:hover { background: rgba(16,185,129,.08); }

/* ═══════════════════════════════════════════════════════
   Responsive — narrow viewport (DevTools open, small window)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .cmd-bar { gap: 4px; padding: 0 8px; }
  .cmd-stats { display: none; }
  .grp-btns { display: none; }
  .cmd-search { width: 60px !important; }
  .cmd-title { max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 780px) {
  .cmd-filters-inline { display: none; }
  .cmd-bc { display: none; }
  .cmd-div { display: none; }
  .cmd-title { max-width: 60px; }
}

/* ═══════════════════════════════════════════════════════
   RTL Layout (Hebrew / Arabic)
   ═══════════════════════════════════════════════════════ */

/* -- Shell layout -- */
html[dir="rtl"], html[dir="rtl"] body { direction: rtl; }
html[dir="rtl"] #app { direction: rtl; }
html[dir="rtl"] #dockLayout { direction: rtl; }

/* -- Command bar -- */
html[dir="rtl"] .cmd-bar { direction: rtl; }
html[dir="rtl"] .cmd-search { text-align: right; direction: rtl; }
html[dir="rtl"] .cmd-export-menu { left: 0; right: auto !important; }

/* -- Matrix table -- */
html[dir="rtl"] .matrix-wrap { direction: rtl; }
html[dir="rtl"] .mx { direction: rtl; }
html[dir="rtl"] .mx th, html[dir="rtl"] .mx td { text-align: right; }
html[dir="rtl"] .mx-sticky { left: auto !important; }
html[dir="rtl"] .mx-frozen-edge::after { right: auto; left: -1px; }
html[dir="rtl"] th.mx-frozen-edge::after { right: auto; left: -1px; }
html[dir="rtl"] td.mx-frozen-edge::after { right: auto; left: -1px; }

/* -- Matrix zones -- */
html[dir="rtl"] .mx-zone-first-knowledge { border-right: none; }
html[dir="rtl"] .mx-zone-first-timeline { border-right: none; }

/* -- Scroll areas + minimap -- */
html[dir="rtl"] .matrix-inner { direction: rtl; }
html[dir="rtl"] #mxMinimap { left: 0; right: auto; }

/* -- Condensed strips -- */
html[dir="rtl"] .mx-cond-left { left: auto; right: 0; }
html[dir="rtl"] .mx-cond-right { right: auto; left: 0; }

/* -- Filters -- */
html[dir="rtl"] .cmd-filters-inline { direction: rtl; }
html[dir="rtl"] .filter-panel { left: auto !important; }

/* -- Detail card (Triforce) -- */
html[dir="rtl"] .dc-main { direction: rtl; }
html[dir="rtl"] .dc-sidebar { border-right: none; border-left: 1px solid var(--border); }
html[dir="rtl"] .dc-body { direction: rtl; }
html[dir="rtl"] .dc-meta { direction: rtl; }

/* -- Presenter -- */
html[dir="rtl"] .rp-body { direction: rtl; }
html[dir="rtl"] .prs-nav { direction: rtl; }

/* -- Accordion band -- */
html[dir="rtl"] .ab-strip { direction: rtl; }
html[dir="rtl"] .ab-timeline { border-left: none; border-right: 2px solid rgba(129, 140, 248, .30); }

/* -- Sidebar ruler -- */
html[dir="rtl"] .sr-bc-sep { transform: scaleX(-1); }
html[dir="rtl"] .sr-breadcrumb { direction: rtl; }
html[dir="rtl"] .sr-personnel { direction: rtl; }
html[dir="rtl"] .sr-threads { direction: rtl; }

/* -- Panels -- */
html[dir="rtl"] .rp-header { direction: rtl; }
html[dir="rtl"] .rp-close { left: 8px; right: auto; }

/* -- Scope panel -- */
html[dir="rtl"] .section-scope { direction: rtl; }

/* -- Domain ruler sidebar -- */
html[dir="rtl"] .domain-ruler { direction: rtl; }

/* -- Intake panel -- */
html[dir="rtl"] #intakePanel { right: auto; left: -420px; border-left: none; border-right: 1px solid var(--border); transition: left .25s ease; }
html[dir="rtl"] #intakePanel.open { left: 0; right: auto; }
html[dir="rtl"] .intake-header { direction: rtl; }
html[dir="rtl"] .intake-body { direction: rtl; }

/* ═══════════════════════════════════════════════════════
   Language selector + User badge
   ═══════════════════════════════════════════════════════ */
.cmd-lang-select { background: var(--bg2); color: var(--muted); border: 1px solid var(--border); border-radius: 4px; font-size: 10px; padding: 2px 4px; cursor: pointer; font-family: var(--font); outline: none; flex-shrink: 0; }
.cmd-lang-select:hover { border-color: var(--accent); color: var(--text); }
.cmd-dir-btn { background: var(--bg2); color: var(--muted); border: 1px solid var(--border); border-radius: 4px; font-size: 9px; padding: 2px 6px; cursor: pointer; font-family: var(--mono); font-weight: 700; letter-spacing: .5px; flex-shrink: 0; }
.cmd-dir-btn:hover { border-color: var(--accent); color: var(--text); }
.cmd-user { font-size: 10px; color: rgba(200,215,230,.7); white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis; }

/* ═══════════════════════════════════════════════════════
   Inline Cell Editing
   ═══════════════════════════════════════════════════════ */
td.mx-editing { padding: 0 !important; overflow: visible !important; }
.mx-edit-input, .mx-edit-textarea, .mx-edit-select {
  background: rgba(10,16,28,.95); color: var(--text); border: 1px solid var(--accent);
  font-family: var(--font); font-size: 10px; padding: 3px 5px; outline: none;
  border-radius: 2px; box-shadow: 0 0 8px rgba(59,130,246,.2);
}
.mx-edit-textarea { resize: vertical; min-height: 50px; }
.mx-edit-select { cursor: pointer; }
.mx-edit-dot {
  position: absolute; top: 1px; right: 1px; width: 5px; height: 5px;
  background: #f59e0b; border-radius: 50%; pointer-events: none; opacity: .7;
}
.mx-editable { cursor: text; }
.mx-dd-chev { font-size: 7px; color: var(--muted); margin-left: 2px; opacity: .5; }
td { position: relative; }

/* ═══════════════════════════════════════════════════════
   Cell Color Picker
   ═══════════════════════════════════════════════════════ */
.mx-color-picker {
  position: fixed; z-index: 10000; background: var(--bg2); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.mx-cp-row { display: flex; gap: 4px; align-items: center; }
.mx-cp-swatch {
  width: 20px; height: 20px; border-radius: 4px; cursor: pointer;
  border: 2px solid transparent; transition: border-color .15s, transform .1s;
}
.mx-cp-swatch:hover { transform: scale(1.15); border-color: rgba(255,255,255,.3); }
.mx-cp-swatch.active { border-color: #fff; box-shadow: 0 0 6px rgba(255,255,255,.3); }
.mx-cp-clear {
  background: var(--bg3) !important; color: var(--muted); font-size: 10px;
  display: flex; align-items: center; justify-content: center;
}

/* ═══════════════════════════════════════════════════════
   Focus Narrator — Flying Callout + Annotation Badges
   ═══════════════════════════════════════════════════════ */
/* Badge layer — fixed overlay for narrator annotations */
.fn-badge-layer { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9998; overflow: visible; }

.fn-badge {
  position: absolute; transform: translateY(-100%);
  background: rgba(10,14,20,.85);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 3px; padding: 1px 6px;
  white-space: nowrap; pointer-events: none;
  font-size: 8px; font-family: system-ui, sans-serif;
  display: flex; align-items: center; gap: 3px;
  backdrop-filter: blur(4px);
}
.fn-badge-icon { font-size: 9px; opacity: .8; }
.fn-badge-label { font-weight: 500; letter-spacing: 0.2px; opacity: .85; }

@keyframes fn-badge-fade {
  0% { transform: translateY(-100%) translateY(4px); opacity: 0; }
  100% { transform: translateY(-100%); opacity: 1; }
}
.fn-badge-appear { animation: fn-badge-fade 0.5s ease forwards; }

/* ═══════════════════════════════════════════════════════
   Cross-Panel Focus Highlights
   ═══════════════════════════════════════════════════════ */
.dc-focus-glow, .prs-focus-glow { box-shadow: 0 0 12px rgba(59,130,246,.3), inset 0 0 0 1px rgba(59,130,246,.15); transition: box-shadow .4s ease; }
.dc-focus-primary, .prs-focus-primary { box-shadow: 0 0 20px rgba(59,130,246,.5), inset 0 0 0 2px rgba(59,130,246,.25); }
.ev-focus-glow { background: rgba(16,185,129,.06) !important; border-left: 2px solid rgba(16,185,129,.4); transition: background .3s, border .3s; }
.ev-focus-dim { opacity: .35; transition: opacity .3s; }

/* ═══════════════════════════════════════════════════════
   Wall Controller — Retractable Panel Walls
   ═══════════════════════════════════════════════════════ */

/* Chevron toggle buttons — fixed position, above all content */
.wall-chev {
  position: fixed; z-index: 9000; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20,26,36,.95); border: 1px solid rgba(255,255,255,.10);
  color: rgba(200,215,230,.4); font-size: 13px; line-height: 1;
  transition: color .2s, background .2s, left .3s ease, top .3s ease;
  user-select: none;
}
.wall-chev:hover { color: rgba(200,215,230,.9); background: rgba(40,50,65,.95); border-color: rgba(255,255,255,.2); }
.wall-chev-left {
  width: 14px; height: 36px; border-radius: 0 5px 5px 0;
  transform: translateY(-50%);
}
.wall-chev-top {
  width: 36px; height: 14px; border-radius: 0 0 5px 5px;
  font-size: 10px; transform: translateX(-50%);
}

/* Retracted strips */
.wall-strip {
  flex-shrink: 0; cursor: pointer;
  background: rgba(10,14,20,.95); border: 1px solid rgba(255,255,255,.04);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.wall-strip:hover { background: rgba(20,26,36,.95); }
.wall-strip-left {
  width: 6px; min-width: 6px;
  border-right: 1px solid rgba(255,255,255,.06);
  writing-mode: vertical-rl; text-orientation: mixed;
}
.wall-strip-top {
  height: 6px; min-height: 6px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.wall-strip-label {
  font-size: 7px; letter-spacing: 1px; text-transform: uppercase;
  color: rgba(200,215,230,.2); font-weight: 600;
  white-space: nowrap; overflow: hidden;
}
.wall-strip:hover .wall-strip-label { color: rgba(200,215,230,.5); }

/* Dice Panel Engine — moved to core/ui/dice-panel.css (shared).
   ITGC-specific overrides only below.
   See: core/ui/dice-panel.css for all dp-*/dice-* rules. */

/* ITGC dice threat animation (product-specific) */



/* ── Layout button in command bar ── */
.cmd-layout-wrap { position: relative; }
.cmd-layout-menu {
  display: none; position: absolute; top: 100%; right: 0; z-index: 9500;
  background: var(--bg2, #111822); border: 1px solid var(--border, #1e2a3a);
  border-radius: 6px; padding: 4px 0; min-width: 180px;
  box-shadow: 0 6px 20px rgba(0,0,0,.6);
}
.cmd-layout-menu.open { display: block; }
.cmd-layout-menu button {
  display: block; width: 100%; text-align: left; background: none; border: none;
  color: var(--text, #e0e6ed); padding: 5px 12px; font-size: 10px; cursor: pointer;
  font-family: inherit;
}
.cmd-layout-menu button:hover { background: rgba(255,255,255,.04); }
.cmd-layout-menu .cmd-layout-sep { height: 1px; background: var(--border, #1e2a3a); margin: 3px 0; }
.cmd-layout-menu .cmd-layout-preset { font-weight: 600; }
.cmd-layout-menu .cmd-layout-active { color: var(--accent, #3b82f6); }

/* ── View tabs in command bar ── */
.cmd-view-tabs { display: flex; gap: 1px; margin: 0 4px; }
.cmd-view-tab {
  padding: 2px 8px; font-size: 9px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase;
  color: rgba(200,215,230,.3); cursor: pointer; border-radius: 3px;
  border: 1px solid transparent; transition: all .15s;
}
.cmd-view-tab:hover { color: rgba(200,215,230,.6); }
.cmd-view-tab.active { background: rgba(59,130,246,.08); border-color: rgba(59,130,246,.2); color: rgba(59,130,246,.8); }

/* ═══════════════════════════════════════════════════════
   Column Picker Panel
   ═══════════════════════════════════════════════════════ */
.cp-stats { font-size: 10px; color: var(--muted); margin-bottom: 8px; }
.cp-actions { display: flex; gap: 6px; margin-bottom: 12px; }
.cp-btn {
  font-size: 10px; padding: 4px 10px; border-radius: 4px;
  border: 1px solid var(--border); background: transparent;
  color: var(--muted); cursor: pointer; transition: all .15s;
}
.cp-btn:hover { border-color: var(--accent); color: var(--accent); }
.cp-group { margin-bottom: 10px; }
.cp-group-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.06);
  margin-bottom: 4px;
}
.cp-group-name { font-size: 10px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .5px; }
.cp-group-count { font-size: 9px; color: var(--muted); }
.cp-group-items { display: flex; flex-direction: column; gap: 1px; }
.cp-item {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 6px; border-radius: 3px; cursor: pointer;
  font-size: 11px; transition: background .1s;
}
.cp-item:hover { background: rgba(255,255,255,.04); }
.cp-item-hidden { opacity: .5; }
.cp-item input[type="checkbox"] { accent-color: var(--accent); width: 13px; height: 13px; }
.cp-col-label { flex: 1; }
.cp-custom-badge, .cp-frozen-badge {
  font-size: 8px; padding: 1px 4px; border-radius: 2px;
  text-transform: uppercase; font-weight: 600;
}
.cp-custom-badge { background: rgba(245,158,11,.15); color: #fbbf24; }
.cp-frozen-badge { background: rgba(59,130,246,.15); color: #60a5fa; }
.cp-remove {
  background: none; border: none; color: var(--muted); font-size: 13px;
  cursor: pointer; padding: 0 2px; line-height: 1;
}
.cp-remove:hover { color: #f87171; }
.cp-add-section { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.06); }
.cp-add-header { font-size: 10px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.cp-add-input {
  width: 100%; padding: 5px 8px; font-size: 11px;
  background: rgba(255,255,255,.04); border: 1px solid var(--border);
  border-radius: 4px; color: var(--text); outline: none; margin-bottom: 6px;
}
.cp-add-input:focus { border-color: var(--accent); }

/* ── Deep Evidence Previews ── */
.ev-viewer-deep { padding: 8px; overflow-y: auto; max-height: 100%; font-size: 11px; }
.deep-email { display: flex; flex-direction: column; gap: 6px; }
.deep-email-header { display: flex; justify-content: space-between; align-items: center; }
.deep-email-header strong { color: var(--accent, #6366f1); font-size: 12px; }
.deep-email-date { font-size: 10px; color: var(--muted); }
.deep-email-subject { font-weight: 600; font-size: 12px; }
.deep-email-to { font-size: 10px; color: var(--muted); }
.deep-email-attach { font-size: 10px; color: var(--warn, #f59e0b); }
.deep-email-body { font-size: 11px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; max-height: 300px; overflow-y: auto; padding: 8px; background: rgba(255,255,255,.02); border-radius: 4px; border: 1px solid rgba(255,255,255,.06); }
.deep-email-more { font-size: 10px; color: var(--muted); font-style: italic; }
.deep-excel { display: flex; flex-direction: column; gap: 8px; }
.deep-excel-header { display: flex; justify-content: space-between; align-items: center; }
.deep-excel-header strong { font-size: 12px; }
.deep-excel-meta { font-size: 10px; color: var(--muted); }
.deep-sheet { background: rgba(255,255,255,.02); border-radius: 4px; padding: 6px 8px; border: 1px solid rgba(255,255,255,.06); }
.deep-sheet-name { font-weight: 600; font-size: 11px; margin-bottom: 4px; }
.deep-sheet-size { font-weight: 400; font-size: 10px; color: var(--muted); }
.deep-sheet-headers { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 4px; }
.deep-col-tag { font-size: 9px; padding: 1px 5px; border-radius: 3px; background: rgba(99,102,241,.1); color: var(--accent, #6366f1); }
.deep-sheet-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.deep-sheet-table td { padding: 2px 4px; border-bottom: 1px solid rgba(255,255,255,.04); max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deep-sheet-table tr:hover td { background: rgba(255,255,255,.03); }
.deep-more-sheets { font-size: 10px; color: var(--muted); font-style: italic; text-align: center; padding: 4px; }
.deep-pdf { display: flex; flex-direction: column; gap: 6px; }
.deep-pdf-header { display: flex; justify-content: space-between; }
.deep-pdf-text { font-size: 11px; line-height: 1.5; white-space: pre-wrap; max-height: 300px; overflow-y: auto; padding: 8px; background: rgba(255,255,255,.02); border-radius: 4px; }
.deep-image strong { font-size: 12px; }
.deep-image-size { font-size: 10px; color: var(--muted); }
.deep-doc strong { font-size: 12px; }
.deep-doc-type { font-size: 10px; color: var(--muted); }

/* ── Evidence Viewer (full document rendering) ── */
.ev-vw-loading { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 20px; color: var(--muted); font-size: 12px; }
.ev-vw-spinner { width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ev-vw-unsupported { text-align: center; padding: 30px 10px; color: var(--muted); }
.ev-vw-icon { font-size: 36px; display: block; margin-bottom: 8px; }
.ev-vw-hint { font-size: 10px; margin-top: 4px; }
.ev-vw-deep { padding: 8px; overflow-y: auto; max-height: 100%; }

/* Excel viewer */
.ev-vw-excel { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.ev-vw-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); flex-shrink: 0; overflow-x: auto; }
.ev-vw-tab { padding: 5px 10px; font-size: 10px; background: none; border: none; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.ev-vw-tab:hover { color: var(--text); background: rgba(255,255,255,.03); }
.ev-vw-tab-active { color: var(--accent); border-bottom-color: var(--accent); }
.ev-vw-sheet { overflow: auto; flex: 1; }
.ev-vw-sheet-hidden { display: none; }
.ev-vw-sheet table { border-collapse: collapse; font-size: 10px; width: max-content; }
.ev-vw-sheet th, .ev-vw-sheet td { border: 1px solid rgba(255,255,255,.08); padding: 3px 6px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-vw-sheet th { background: rgba(99,102,241,.08); color: var(--accent); font-weight: 600; position: sticky; top: 0; z-index: 1; }
.ev-vw-sheet tr:hover td { background: rgba(255,255,255,.03); }

/* PDF viewer */
.ev-vw-pdf { overflow-y: auto; height: 100%; }
.ev-vw-pdf-header { padding: 6px 10px; font-size: 11px; font-weight: 600; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg); z-index: 1; }
.ev-vw-pdf-pages { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px; }
.ev-vw-pdf-page { max-width: 100%; border: 1px solid var(--border); border-radius: 2px; }
.ev-vw-pdf-more { font-size: 10px; color: var(--muted); padding: 8px; }

/* Word/DOCX viewer */
.ev-vw-docx { overflow-y: auto; height: 100%; }
.ev-vw-docx-header { padding: 6px 10px; font-size: 11px; font-weight: 600; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg); }
.ev-vw-docx-body { padding: 12px; font-size: 12px; line-height: 1.6; color: var(--text); }
.ev-vw-docx-body p { margin: 0 0 8px; }
.ev-vw-docx-body table { border-collapse: collapse; width: 100%; margin: 8px 0; }
.ev-vw-docx-body td, .ev-vw-docx-body th { border: 1px solid var(--border); padding: 4px 8px; font-size: 11px; }
.ev-vw-docx-body h1, .ev-vw-docx-body h2, .ev-vw-docx-body h3 { color: var(--accent); margin: 12px 0 6px; }
.ev-vw-docx-body img { max-width: 100%; }

/* Image viewer */
.ev-vw-image { overflow: auto; height: 100%; display: flex; flex-direction: column; }
.ev-vw-image-header { padding: 6px 10px; font-size: 11px; font-weight: 600; border-bottom: 1px solid var(--border); }
.ev-vw-img { max-width: 100%; object-fit: contain; margin: 8px auto; }

/* Email viewer */
.ev-vw-email { padding: 10px; overflow-y: auto; height: 100%; }
.ev-vw-email-header { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 12px; }
.ev-vw-email-date { font-size: 10px; color: var(--muted); }
.ev-vw-email-subject { font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.ev-vw-email-cc { font-size: 10px; color: var(--muted); margin-bottom: 4px; }
.ev-vw-email-attach { font-size: 10px; color: var(--warn); margin-bottom: 8px; }
.ev-vw-email-body { font-size: 11px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; padding: 10px; background: rgba(255,255,255,.02); border-radius: 4px; border: 1px solid rgba(255,255,255,.06); }

/* PPTX viewer */
.ev-vw-pptx { overflow-y: auto; height: 100%; }
.ev-vw-pptx-header { padding: 6px 10px; font-size: 11px; font-weight: 600; border-bottom: 1px solid var(--border); }
.ev-vw-slide { margin: 8px; padding: 12px; background: rgba(255,255,255,.02); border: 1px solid var(--border); border-radius: 4px; }
.ev-vw-slide-num { font-size: 10px; font-weight: 600; color: var(--accent); margin-bottom: 6px; }
.ev-vw-slide-text { font-size: 12px; line-height: 1.5; }

/* Text viewer */
.ev-vw-text { overflow: auto; height: 100%; }
.ev-vw-text-header { padding: 6px 10px; font-size: 11px; font-weight: 600; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg); }
.ev-vw-text-body { padding: 10px; font-size: 11px; line-height: 1.5; font-family: 'Cascadia Code', 'Consolas', monospace; white-space: pre-wrap; }

/* ── Export Checkbox Panel ── */
.exp-title { font-size: 11px; font-weight: 700; color: var(--accent, #6366f1); padding: 8px 12px 4px; letter-spacing: 0.5px; }
.exp-check {
  display: flex; align-items: flex-start; gap: 8px; padding: 6px 12px; cursor: pointer;
  border-radius: 4px; transition: background 0.1s;
}
.exp-check:hover { background: rgba(255,255,255,.04); }
.exp-check input[type="checkbox"] {
  margin-top: 2px; accent-color: var(--accent, #6366f1); width: 14px; height: 14px; flex-shrink: 0;
}
.exp-icon { font-size: 14px; flex-shrink: 0; }
.exp-check span:not(.exp-icon):not(.exp-desc) { font-size: 12px; font-weight: 600; color: var(--text, #e0e6ed); }
.exp-desc { display: block; font-size: 10px; color: var(--muted, #7a8899); font-weight: 400; margin-top: 1px; }
.exp-divider { height: 1px; background: rgba(255,255,255,.06); margin: 6px 0; }
.exp-audience { display: flex; align-items: center; gap: 8px; padding: 6px 12px; }
.exp-audience-label { font-size: 10px; font-weight: 600; color: var(--muted, #7a8899); text-transform: uppercase; letter-spacing: 0.5px; }
.exp-audience-sel {
  flex: 1; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.1); border-radius: 4px;
  color: var(--text, #e0e6ed); font-size: 11px; padding: 4px 8px; outline: none; cursor: pointer;
}
.exp-audience-sel:focus { border-color: var(--accent, #6366f1); }
.exp-download-btn {
  display: block; width: calc(100% - 24px); margin: 6px 12px 10px; padding: 8px 0;
  background: var(--accent, #6366f1); color: white; border: none; border-radius: 6px;
  font-size: 12px; font-weight: 700; cursor: pointer; text-align: center; letter-spacing: 0.3px;
  transition: all 0.15s;
}
.exp-download-btn:hover { background: #818cf8; transform: translateY(-1px); }
.exp-download-btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
