    @font-face { font-family: 'Changa One'; font-style: normal; font-weight: 400; font-display: swap; src: url('/static/vendor/changaone.ttf') format('truetype'); }
    @font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: local('Inter'), local('Inter-Regular'); }
    @font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: local('Inter Medium'), local('Inter-Medium'); }
    @font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: local('Inter SemiBold'), local('Inter-SemiBold'); }
    @font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: local('Inter Bold'), local('Inter-Bold'); }
    :root {
      --bg: #0f1117;
      --surface: #1a1d27;
      --border: #2a2d3a;
      --text: #e4e4e7;
      --muted: #9ca3af;
      --accent: #6366f1;
      --accent-light: #818cf8;
      --red: #ef4444;
      --orange: #f59e0b;
      --green: #22c55e;
      --blue: #3b82f6;
      --cyan: #06b6d4;
    }
    /* ── Light theme ──────────────────────────────────────────── */
    [data-theme="light"] {
      --bg: #f5f5f7;
      --surface: #ffffff;
      --border: #e2e2e5;
      --text: #1a1a2e;
      --muted: #6b7280;
      --accent: #6366f1;
      --accent-light: #4f46e5;
      --red: #dc2626;
      --orange: #d97706;
      --green: #16a34a;
      --blue: #2563eb;
      --cyan: #0891b2;
    }
    [data-theme="light"] .card,
    [data-theme="light"] .kpi-card { box-shadow: 0 1px 3px rgba(0,0,0,.06); }
    [data-theme="light"] .wizard-overlay { background: rgba(245,245,247,.97); }
    [data-theme="light"] header { box-shadow: 0 1px 3px rgba(0,0,0,.04); }
    [data-theme="light"] .sidebar { box-shadow: 1px 0 3px rgba(0,0,0,.04); }
    [data-theme="light"] .nav-item.active { background: rgba(99,102,241,.08); }
    [data-theme="light"] .control-bar { background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.03); }
    [data-theme="light"] .agility-dimension .ad-fill { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
    [data-theme="light"] .csf-bar .csf-fill { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.3); }
    [data-theme="light"] .grade-badge { box-shadow: 0 2px 8px rgba(0,0,0,.1); }
    [data-theme="light"] .source-btn { border-color: var(--border); }
    [data-theme="light"] .source-btn.active { background: var(--accent); color: #fff; }
    [data-theme="light"] .finding-row:hover { background: rgba(99,102,241,.04); }
    [data-theme="light"] .ctrl-select { background: var(--surface); border-color: var(--border); color: var(--text); }
    [data-theme="light"] .export-btn { background: var(--surface); border-color: var(--border); color: var(--text); }
    [data-theme="light"] .export-btn:hover { background: var(--accent); color: #fff; }
    [data-theme="light"] .scan-field input { background: var(--surface); }
    [data-theme="light"] input[type="text"] { background: var(--surface); border-color: var(--border); color: var(--text); }
    [data-theme="light"] .action-cluster,
    [data-theme="light"] .ledger-hero-panel,
    [data-theme="light"] .model-selector-row,
    [data-theme="light"] .readiness-metrics,
    [data-theme="light"] .chart-container { box-shadow: 0 1px 3px rgba(0,0,0,.05); }
    [data-theme="light"] .merkle-root-badge { box-shadow: 0 2px 6px rgba(99,102,241,.15); }
    @keyframes fadeInUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
    @keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
    .skeleton { background: linear-gradient(90deg, var(--border) 25%, var(--surface) 50%, var(--border) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 6px; }
    * { margin: 0; padding: 0; box-sizing: border-box; }
    body {
      font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
      background: var(--bg);
      color: var(--text);
      line-height: 1.6;
      display: flex; min-height: 100vh;
      overflow-x: hidden;
    }
    /* ── Sidebar Navigation (Vanta/Drata style) ──────────────── */
    .sidebar {
      width: 240px; background: var(--surface); border-right: 1px solid var(--border);
      display: flex; flex-direction: column; flex-shrink: 0; position: fixed;
      top: 0; left: 0; bottom: 0; z-index: 100; overflow-y: auto;
      transition: width .2s;
    }
    .sidebar-brand {
      padding: 20px 20px 16px; border-bottom: 1px solid var(--border);
      display: flex; align-items: center; gap: 10px;
    }
    .sidebar-brand h1 {
      font-family: 'Changa One', cursive; font-size: 18px; font-weight: 700;
    }
    .sidebar-nav { flex: 1; padding: 12px 8px; overflow-y: auto; }
    .sidebar-section { margin-bottom: 8px; }
    .sidebar-section-label {
      font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase;
      letter-spacing: .8px; padding: 8px 12px 4px; user-select: none;
    }
    .nav-item {
      display: flex; align-items: center; gap: 10px; padding: 9px 12px;
      border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--muted);
      transition: all .15s; border: 1px solid transparent; margin-bottom: 1px;
    }
    .nav-item:hover { background: rgba(99,102,241,.06); color: var(--text); }
    .nav-item.active {
      background: rgba(99,102,241,.1); color: var(--accent-light);
      border-color: rgba(99,102,241,.2); font-weight: 600;
    }
    .nav-item .nav-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
    .nav-item .nav-badge {
      margin-left: auto; font-size: 10px; font-weight: 700; padding: 1px 6px;
      border-radius: 10px; background: rgba(239,68,68,.15); color: var(--red);
    }
    .sidebar-footer {
      padding: 12px 16px; border-top: 1px solid var(--border); font-size: 11px;
    }
    .sidebar-user {
      display: flex; align-items: center; gap: 10px; padding: 8px 0;
    }
    .sidebar-avatar {
      width: 32px; height: 32px; border-radius: 8px; background: var(--accent);
      display: flex; align-items: center; justify-content: center;
      font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0;
    }
    .sidebar-user-info { flex: 1; min-width: 0; }
    .sidebar-user-name { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .sidebar-user-role { font-size: 10px; color: var(--muted); text-transform: uppercase; }
    /* ── Main Content Area ──────────────────────────────── */
    .main-wrapper { flex: 1; margin-left: 240px; display: flex; flex-direction: column; min-height: 100vh; }
    header {
      background: var(--surface); border-bottom: 1px solid var(--border);
      padding: 12px 28px; display: flex; align-items: center; justify-content: space-between;
      position: sticky; top: 0; z-index: 50;
    }
    .header-left { display: flex; align-items: center; gap: 16px; }
    .header-left h2 { font-size: 16px; font-weight: 700; }
    .header-left .header-breadcrumb { font-size: 12px; color: var(--muted); }
    .controls { display: flex; gap: 10px; align-items: center; }
    .controls input, .controls button, .controls select {
      background: var(--bg); border: 1px solid var(--border);
      color: var(--text); padding: 7px 12px; border-radius: 8px; font-size: 12px;
    }
    .controls button {
      background: var(--accent); border-color: var(--accent);
      cursor: pointer; font-weight: 600; color: #fff;
    }
    .controls button:hover { background: var(--accent-light); }
    .controls button:disabled { opacity: .5; cursor: not-allowed; }
    .status-bar {
      background: var(--surface); border-bottom: 1px solid var(--border);
      padding: 6px 28px; font-size: 11px; color: var(--muted);
      display: flex; justify-content: space-between; align-items: center;
    }
    .app-header { gap: 16px; flex-wrap: wrap; }
    .app-header .header-left { flex-wrap: wrap; }
    .app-toolbar {
      gap: 14px; flex-wrap: wrap; align-items: flex-start;
      padding-top: 10px; padding-bottom: 10px;
    }
    .status-cluster {
      display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
      min-width: 320px; flex: 1;
    }
    .status-pill {
      display: inline-flex; align-items: center; min-height: 32px;
      padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border);
      background: var(--bg); color: var(--muted); font-size: 11px; line-height: 1.4;
    }
    .status-primary {
      color: var(--text); border-color: rgba(99,102,241,.25);
      background: linear-gradient(180deg, rgba(99,102,241,.08), rgba(99,102,241,.03));
    }
    .status-chain:empty { display: none; }
    .status-chain { font-family: 'Courier New', monospace; white-space: nowrap; }
    .header-actions {
      margin-left: auto; display: flex; gap: 10px; align-items: stretch; justify-content: flex-end; flex-wrap: wrap;
    }
    .action-cluster {
      display: flex; flex-direction: column; gap: 8px; min-width: 250px;
      padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px;
      background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
    }
    .utility-rail { gap: 12px; }
    .utility-cluster { padding: 14px 16px; }
    .utility-cluster-primary { min-width: 520px; }
    .action-cluster-secondary { min-width: 220px; }
    .action-cluster-label {
      font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .7px; font-weight: 800;
    }
    .action-cluster-copy {
      font-size: 11px; color: var(--muted); line-height: 1.5; max-width: 620px;
    }
    .utility-grid { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 10px; width: 100%; }
    .utility-grid-compact { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
    .utility-item {
      display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px;
      background: rgba(255,255,255,.02); border: 1px solid rgba(255,255,255,.04);
    }
    .utility-item-cta {
      background: linear-gradient(180deg, rgba(99,102,241,.12), rgba(99,102,241,.04));
      border-color: rgba(99,102,241,.18);
    }
    .utility-item-label {
      font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .55px; font-weight: 700;
    }
    .chain-ok { color: var(--green); font-weight: 600; }
    @media (max-width: 900px) {
      .sidebar { width: 56px; }
      .sidebar .nav-item span:not(.nav-icon), .sidebar-section-label,
      .sidebar-brand h1, .sidebar-user-info, .sidebar-footer span { display: none; }
      .sidebar-brand { justify-content: center; padding: 16px 8px; }
      .main-wrapper { margin-left: 56px; }
    }
    .chain-bad { color: var(--red); font-weight: 600; }
    main { max-width: 100%; margin: 0; padding: 20px 28px; }
    .kpi-row {
      /* 7 KPI cards (incl. Chain Integrity) need a smaller minimum to
         stay on one row at common laptop widths (>= ~1200px). At
         narrower widths they wrap as before. */
      display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 14px; margin-bottom: 24px;
    }
    .kpi-card {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 10px; padding: 18px 16px; transition: border-color .2s, box-shadow .2s;
    }
    .kpi-card:hover { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(99,102,241,.15); }
    .kpi-card .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
    .kpi-card .value { font-size: 26px; font-weight: 700; margin-top: 6px; line-height: 1.1; }
    .kpi-card .sub { font-size: 11px; color: var(--muted); margin-top: 4px; }
    /* ── Action Needed Widget ────────────────────────────────── */
    .action-needed {
      background: linear-gradient(135deg, rgba(239,68,68,.06), rgba(245,158,11,.04));
      border: 1px solid rgba(239,68,68,.18); border-radius: 12px;
      padding: 16px 20px; margin-bottom: 20px; display: none;
    }
    .action-needed.visible { display: block; animation: fadeInUp .3s ease-out; }
    .action-needed-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
    .action-needed-header h3 { font-size: 14px; font-weight: 700; color: var(--red); margin: 0; text-transform: none; letter-spacing: 0; }
    .action-needed-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
    .action-needed-item {
      background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
      padding: 12px 14px; cursor: pointer; transition: all .15s;
      display: flex; align-items: center; gap: 10px;
    }
    .action-needed-item:hover { border-color: var(--accent); transform: translateY(-1px); }
    .action-needed-item .ani-count { font-size: 22px; font-weight: 700; min-width: 40px; text-align: center; }
    .action-needed-item .ani-label { font-size: 12px; color: var(--muted); line-height: 1.4; }
    .ani-critical .ani-count { color: var(--red); }
    .ani-warn .ani-count { color: var(--orange); }
    .ani-ok .ani-count { color: var(--green); }
    .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
    .grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 24px; }
    .grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 16px; margin-bottom: 24px; }
    .card {
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 10px; padding: 20px; transition: border-color .2s;
    }
    .card:hover { border-color: rgba(99,102,241,.25); }
    .card h3 {
      font-size: 13px; font-weight: 600; margin-bottom: 16px;
      color: var(--muted); text-transform: uppercase; letter-spacing: .6px;
    }
    .chart-container {
      position: relative; height: 280px; padding: 12px; border-radius: 12px;
      background: linear-gradient(180deg, rgba(15,17,23,.48), rgba(15,17,23,.16));
      border: 1px solid rgba(255,255,255,.04);
    }
    .chart-container canvas { width: 100% !important; height: 100% !important; }
    .edit-user-modal {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,.5);
      z-index: 9999;
      align-items: center;
      justify-content: center;
    }
    .edit-user-modal-panel {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      width: 500px;
      max-height: 80vh;
      overflow-y: auto;
      padding: 0;
    }
    .edit-user-modal-header {
      padding: 16px 20px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }
    .edit-user-modal-title {
      font-weight: 600;
      font-size: 15px;
    }
    .edit-user-code {
      font-size: 12px;
      background: var(--bg);
      padding: 2px 6px;
      border-radius: 4px;
    }
    .edit-user-modal-close {
      cursor: pointer;
      font-size: 18px;
      color: var(--muted);
      line-height: 1;
    }
    .edit-user-modal-body { padding: 20px; }
    .edit-user-select,
    .edit-user-textarea {
      width: 100%;
      padding: 8px;
      background: var(--bg);
      border: 1px solid var(--border);
      color: var(--text);
      border-radius: 6px;
    }
    .edit-user-select[multiple] { min-height: 80px; }
    .edit-user-textarea {
      min-height: 60px;
      font-family: monospace;
      font-size: 12px;
      resize: vertical;
    }
    .edit-user-help {
      font-size: 10px;
      color: var(--muted);
      margin-top: 4px;
    }
    .edit-user-result {
      margin: 12px 0;
      font-size: 12px;
      padding: 8px;
      border-radius: 6px;
      display: none;
    }
    .edit-user-actions {
      display: flex;
      gap: 8px;
      margin-top: 16px;
    }
    .edit-user-action {
      flex: 1;
      font-size: 12px;
      padding: 10px;
    }
    .edit-user-action-save { background: var(--green); }
    .edit-user-action-cancel {
      background: var(--bg);
      border: 1px solid var(--border);
      color: var(--text);
    }
    table { width: 100%; border-collapse: collapse; font-size: 13px; }
    th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
    th { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
    tr:hover td { background: rgba(99,102,241,.05); }
    .badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
    .badge-critical { background: rgba(239,68,68,.15); color: var(--red); }
    .badge-high { background: rgba(245,158,11,.15); color: var(--orange); }
    .badge-medium { background: rgba(59,130,246,.15); color: var(--blue); }
    .badge-low { background: rgba(34,197,94,.15); color: var(--green); }
    .badge-safe { background: rgba(34,197,94,.15); color: var(--green); }
    .badge-vulnerable { background: rgba(239,68,68,.15); color: var(--red); }
    .badge-unknown { background: rgba(156,163,175,.15); color: var(--muted); }
    .badge-approved { background: rgba(34,197,94,.15); color: var(--green); }
    .badge-pending, .badge-proposed { background: rgba(245,158,11,.15); color: var(--orange); }
    .badge-exception { background: rgba(156,163,175,.15); color: var(--muted); }
    .badge-S { background: rgba(34,197,94,.15); color: var(--green); }
    .badge-M { background: rgba(245,158,11,.15); color: var(--orange); }
    .badge-L { background: rgba(239,68,68,.15); color: var(--red); }
    .badge-code { background: rgba(99,102,241,.15); color: var(--accent-light); }
    .badge-cloud { background: rgba(6,182,212,.15); color: var(--cyan); }
    .badge-tls { background: rgba(245,158,11,.15); color: var(--orange); }
    /* Governance workflow status badges */
    .badge-draft { background: rgba(156,163,175,.15); color: var(--muted); }
    .badge-under_review { background: rgba(6,182,212,.15); color: var(--cyan); }
    .badge-rejected { background: rgba(239,68,68,.15); color: var(--red); }
    .badge-deferred { background: rgba(245,158,11,.15); color: var(--orange); }
    .badge-sla-breached { background: rgba(239,68,68,.2); color: var(--red); font-weight: 700; }
    .badge-sla-ok { background: rgba(34,197,94,.1); color: var(--green); }
    /* Governance filter bar */
    .gov-filter-bar { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
    .gov-filter-btn {
      background: var(--bg); border: 1px solid var(--border); color: var(--muted);
      padding: 5px 14px; border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 600;
      transition: all .15s;
    }
    .gov-filter-btn:hover { border-color: var(--accent); color: var(--accent-light); }
    .gov-filter-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
    /* Governance action buttons */
    .gov-action-btn {
      padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 600;
      cursor: pointer; border: 1px solid transparent; transition: all .15s;
      display: inline-block; margin: 1px 2px;
    }
    .gov-action-btn:disabled { opacity: .4; cursor: not-allowed; }
    .gov-btn-assign { background: rgba(99,102,241,.15); color: var(--accent); border-color: var(--accent); }
    .gov-btn-assign:hover:not(:disabled) { background: rgba(99,102,241,.3); }
    .gov-btn-approve { background: rgba(34,197,94,.15); color: var(--green); border-color: var(--green); }
    .gov-btn-approve:hover:not(:disabled) { background: rgba(34,197,94,.3); }
    .gov-btn-reject { background: rgba(239,68,68,.15); color: var(--red); border-color: var(--red); }
    .gov-btn-reject:hover:not(:disabled) { background: rgba(239,68,68,.3); }
    .gov-btn-defer { background: rgba(245,158,11,.15); color: var(--orange); border-color: var(--orange); }
    .gov-btn-defer:hover:not(:disabled) { background: rgba(245,158,11,.3); }
    .gov-btn-reopen { background: rgba(6,182,212,.15); color: var(--cyan); border-color: var(--cyan); }
    .gov-btn-reopen:hover:not(:disabled) { background: rgba(6,182,212,.3); }
    .gov-btn-detail { background: rgba(156,163,175,.1); color: var(--muted); border-color: var(--border); }
    .gov-btn-detail:hover:not(:disabled) { background: rgba(156,163,175,.25); color: var(--text); }
    /* Governance detail panel */
    .gov-detail-panel {
      position: fixed; top: 0; right: -520px; width: 500px; height: 100vh;
      background: var(--surface); border-left: 1px solid var(--border);
      box-shadow: -4px 0 24px rgba(0,0,0,.15); z-index: 1000;
      transition: right .3s ease; overflow-y: auto; padding: 24px;
    }
    .gov-detail-panel.open { right: 0; }
    .gov-detail-panel .detail-header {
      display: flex; justify-content: space-between; align-items: center;
      margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
    }
    .gov-detail-panel .detail-close {
      background: none; border: 1px solid var(--border); color: var(--muted);
      width: 32px; height: 32px; border-radius: 6px; cursor: pointer;
      font-size: 16px; display: flex; align-items: center; justify-content: center;
    }
    .gov-detail-panel .detail-close:hover { background: var(--bg); color: var(--text); }
    .gov-detail-section {
      margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
    }
    .gov-detail-section h4 {
      font-size: 11px; color: var(--muted); text-transform: uppercase;
      letter-spacing: .5px; font-weight: 600; margin-bottom: 10px;
    }
    .gov-detail-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; }
    .gov-detail-row .label { color: var(--muted); }
    .gov-detail-row .val { font-weight: 600; }
    /* Governance timeline */
    .gov-timeline { position: relative; padding-left: 20px; }
    .gov-timeline::before {
      content: ''; position: absolute; left: 6px; top: 4px; bottom: 4px;
      width: 2px; background: var(--border);
    }
    .gov-timeline-item { position: relative; margin-bottom: 16px; padding-left: 12px; }
    .gov-timeline-item::before {
      content: ''; position: absolute; left: -16px; top: 6px;
      width: 10px; height: 10px; border-radius: 50%;
      background: var(--accent); border: 2px solid var(--surface);
    }
    .gov-timeline-item .tl-action { font-weight: 600; font-size: 13px; }
    .gov-timeline-item .tl-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
    .gov-timeline-item .tl-detail { font-size: 12px; color: var(--text); margin-top: 4px; }
    /* Anchor badge for approved decisions */
    .anchor-badge {
      display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px;
      background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.3);
      border-radius: 4px; font-size: 10px; font-family: 'Courier New', monospace;
      color: var(--green);
    }
    .anchor-badge .checkmark { font-size: 12px; }
    /* Governance enrichment output */
    .gov-enrich-output {
      background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
      padding: 12px; font-size: 12px; line-height: 1.6; white-space: pre-wrap;
      max-height: 300px; overflow-y: auto; margin-top: 8px;
    }
    .gov-detail-overlay {
      position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
      background: rgba(0,0,0,.3); z-index: 999; display: none;
    }
    .gov-detail-overlay.open { display: block; }
    .gov-clickable-row { cursor: pointer; }
    .gov-clickable-row:hover td { background: rgba(99,102,241,.08) !important; }
    .tabs { display: none; /* Hidden — replaced by sidebar nav */ }
    .tab { display: none; }
    .tab-panel { display: none; }
    .tab-panel.active { display: block; animation: fadeInUp .25s ease-out; }
    .scroll-table { max-height: 420px; overflow-y: auto; }
    /* ── Table Controller ──────────────────────────────────────── */
    .table-controls {
      display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap;
    }
    .table-search {
      background: var(--bg); border: 1px solid var(--border); color: var(--text);
      padding: 7px 12px; border-radius: 8px; font-size: 12px; width: 240px;
    }
    .table-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(99,102,241,.15); }
    .table-page-controls { display: flex; align-items: center; gap: 6px; margin-left: auto; }
    .table-page-btn {
      background: var(--bg); border: 1px solid var(--border); color: var(--muted);
      padding: 5px 10px; border-radius: 6px; cursor: pointer; font-size: 11px; font-weight: 600;
    }
    .table-page-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent-light); }
    .table-page-btn:disabled { opacity: .4; cursor: not-allowed; }
    .table-page-info { font-size: 11px; color: var(--muted); min-width: 80px; text-align: center; }
    .table-page-size {
      background: var(--bg); border: 1px solid var(--border); color: var(--text);
      padding: 5px 8px; border-radius: 6px; font-size: 11px;
    }
    .source-filter { display: flex; gap: 8px; margin-bottom: 12px; }
    .source-btn {
      background: var(--bg); border: 1px solid var(--border); color: var(--muted);
      padding: 4px 12px; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: 600;
    }
    .source-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
    .source-btn:hover { border-color: var(--accent); }
    /* Action buttons */
    .action-btn {
      padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 600;
      cursor: pointer; border: 1px solid transparent; transition: all .15s;
    }
    .action-btn:disabled { opacity: .4; cursor: not-allowed; }
    .btn-approve { background: rgba(34,197,94,.15); color: var(--green); border-color: var(--green); }
    .btn-approve:hover:not(:disabled) { background: rgba(34,197,94,.3); }
    .btn-exception { background: rgba(156,163,175,.15); color: var(--muted); border-color: var(--muted); }
    .btn-exception:hover:not(:disabled) { background: rgba(156,163,175,.3); }
    .btn-reject { background: rgba(239,68,68,.15); color: var(--red); border-color: var(--red); }
    .btn-reject:hover:not(:disabled) { background: rgba(239,68,68,.3); }
    /* Trace ID links */
    .trace-id {
      font-family: 'Courier New', monospace; font-size: 11px; color: var(--accent-light);
      cursor: pointer; text-decoration: underline; text-decoration-style: dotted;
    }
    .trace-id:hover { color: var(--text); }
    tr.trace-highlight td { background: rgba(99,102,241,.15) !important; box-shadow: inset 3px 0 0 var(--accent); }
    /* Trace banner */
    .trace-banner {
      display: none; background: var(--accent); color: #fff; padding: 8px 16px;
      border-radius: 6px; margin-bottom: 12px; font-size: 12px;
      align-items: center; justify-content: space-between;
    }
    .trace-banner.active { display: flex; }
    .trace-banner button {
      background: rgba(255,255,255,.2); border: none; color: #fff; padding: 4px 12px;
      border-radius: 4px; cursor: pointer; font-size: 11px; font-weight: 600;
    }
    .trace-banner button:hover { background: rgba(255,255,255,.35); }
    .source-summary {
      display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px;
    }
    .source-card {
      background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
      padding: 14px; text-align: center;
    }
    .source-card .icon { font-size: 24px; margin-bottom: 6px; }
    .source-card .sname { font-size: 13px; font-weight: 600; text-transform: uppercase; }
    .source-card .scount { font-size: 24px; font-weight: 700; margin: 4px 0; }
    .source-card .svuln { font-size: 12px; color: var(--red); }
    .source-card .ssafe { font-size: 12px; color: var(--green); }
    .mandate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .mandate-card {
      background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 14px;
    }
    .mandate-card .name { font-size: 13px; font-weight: 600; }
    .mandate-card .desc { font-size: 12px; color: var(--muted); margin-top: 4px; }
    .mandate-card .count { font-size: 20px; font-weight: 700; color: var(--accent-light); margin-top: 8px; }
    @media (max-width: 1000px) {
      .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
      .source-summary { grid-template-columns: 1fr; }
    }
    /* Merkle tree D3 visualization */
    #merkle-tree-svg { width: 100%; overflow-x: auto; }
    #merkle-tree-svg .node circle { fill: var(--accent); stroke: var(--accent-light); stroke-width: 2; }
    #merkle-tree-svg .node--leaf circle { fill: var(--green); stroke: #16a34a; }
    #merkle-tree-svg .node text { font-size: 10px; fill: var(--muted); }
    #merkle-tree-svg .link { fill: none; stroke: var(--border); stroke-width: 1.5; }
    .merkle-info { color: var(--muted); font-size: 12px; margin-bottom: 12px; }
    .merkle-root-badge { background: var(--accent); color: #fff; padding: 4px 12px; border-radius: 6px; font-family: monospace; font-size: 12px; }
    /* AI Reasoning */
    .reasoning-status { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 12px; }
    .reasoning-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
    .reasoning-dot.online { background: var(--green); }
    .reasoning-dot.offline { background: var(--red); }
    .reasoning-actions { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
    .reasoning-btn {
      background: var(--accent); border: none; color: #fff; padding: 8px 16px;
      border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 600;
    }
    .reasoning-btn:hover { background: var(--accent-light); }
    .reasoning-btn:disabled { opacity: .5; cursor: not-allowed; }
    .reasoning-output {
      background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
      padding: 16px; margin-bottom: 16px; min-height: 80px; max-height: 500px;
      overflow-y: auto; font-size: 13px; line-height: 1.7; white-space: pre-wrap;
    }
    .chat-input-row { display: flex; gap: 8px; }
    .chat-input {
      flex: 1; background: var(--bg); border: 1px solid var(--border); color: var(--text);
      padding: 10px 14px; border-radius: 6px; font-size: 13px;
    }
    .chat-input:focus { outline: none; border-color: var(--accent); }
    .chat-history { max-height: 400px; overflow-y: auto; margin-bottom: 12px; }
    .chat-msg { padding: 8px 12px; border-radius: 8px; margin-bottom: 8px; font-size: 13px; line-height: 1.6; }
    .chat-msg.user { background: rgba(99,102,241,.15); margin-left: 40px; }
    .chat-msg.assistant { background: var(--bg); border: 1px solid var(--border); margin-right: 40px; }
    .chat-msg .role { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; margin-bottom: 4px; }
    /* Scanner Analysis */
    .scanner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
    .scanner-stat-card { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 16px; }
    .scanner-stat-card h4 { font-size: 13px; font-weight: 600; color: var(--accent-light); text-transform: uppercase; margin-bottom: 8px; }
    .scanner-stat { display: flex; justify-content: space-between; padding: 3px 0; font-size: 12px; border-bottom: 1px solid rgba(42,45,58,.5); }
    .scanner-stat:last-child { border-bottom: none; }
    .scanner-stat .label { color: var(--muted); }
    /* What-If Simulator */
    .whatif-panel { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-top: 16px; }
    .whatif-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
    .whatif-select {
      background: var(--surface); border: 1px solid var(--border); color: var(--text);
      padding: 6px 12px; border-radius: 4px; font-size: 12px; min-width: 140px;
    }
    .whatif-arrow { color: var(--accent-light); font-weight: 700; font-size: 14px; padding: 0 4px; }
    .whatif-remove { background: rgba(239,68,68,.15); color: var(--red); border: 1px solid var(--red); padding: 4px 8px; border-radius: 4px; cursor: pointer; font-size: 11px; }
    .whatif-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 16px; }
    .whatif-metric { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 14px; text-align: center; }
    .whatif-metric .value { font-size: 28px; font-weight: 700; }
    .whatif-metric .label { font-size: 11px; color: var(--muted); text-transform: uppercase; }
    .compliance-impact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; margin-top: 12px; }
    .fw-impact-card { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 10px; text-align: center; font-size: 11px; }
    .fw-impact-card .fw-name { font-weight: 600; margin-bottom: 4px; }
    /* Export toolbar */
    .export-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
    .export-btn {
      background: var(--surface); border: 1px solid var(--border); color: var(--text);
      padding: 8px 14px; border-radius: 10px; cursor: pointer; font-size: 12px; font-weight: 700;
      min-height: 38px; box-shadow: 0 1px 0 rgba(255,255,255,.03) inset;
    }
    .export-btn:hover { border-color: var(--accent); color: var(--accent-light); }
    .export-btn:disabled { opacity: .5; cursor: not-allowed; }
    .export-btn-primary {
      background: linear-gradient(135deg, var(--accent), var(--accent-light)); border-color: transparent; color: #fff;
      box-shadow: 0 10px 22px rgba(99,102,241,.24);
    }
    .export-btn-primary:hover { color: #fff; border-color: transparent; filter: brightness(1.05); }
    .export-dropdown-menu.show { display: block !important; }
    .export-dd-item {
      display: block; width: 100%; text-align: left; padding: 8px 14px; border: none;
      background: none; color: var(--text); font-size: 12px; cursor: pointer; font-weight: 500;
    }
    .export-dd-item:hover { background: var(--accent); color: #fff; }
    .scan-launcher {
      background: linear-gradient(135deg, rgba(99,102,241,.16), rgba(6,182,212,.08));
      border: 1px solid rgba(99,102,241,.35); border-radius: 16px; padding: 22px 24px;
      margin-bottom: 22px; display: flex; align-items: flex-end; justify-content: space-between;
      gap: 20px; flex-wrap: wrap; box-shadow: 0 12px 32px rgba(0,0,0,.14);
    }
    .scan-launcher-copy { flex: 1; min-width: 280px; }
    .scan-launcher-title { font-size: 19px; font-weight: 800; margin-bottom: 6px; letter-spacing: -.02em; }
    .scan-launcher-actions {
      display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; justify-content: flex-end;
    }
    .scan-launcher-fields { display: flex; gap: 10px; flex-wrap: wrap; }
    .scan-field { display: flex; flex-direction: column; gap: 6px; min-width: 260px; }
    .scan-field-compact { min-width: 170px; }
    .scan-field label {
      font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px;
    }
    .scan-field input {
      background: rgba(15,17,23,.86); border: 1px solid var(--border); color: var(--text);
      padding: 10px 12px; border-radius: 10px; font-size: 12px; min-height: 40px;
    }
    .scan-field input:focus {
      outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(99,102,241,.18);
    }
    .scan-launcher-btn {
      background: var(--accent); color: #fff; border: none; padding: 12px 28px;
      border-radius: 10px; font-size: 14px; font-weight: 800; cursor: pointer; white-space: nowrap;
      min-height: 42px; box-shadow: 0 10px 24px rgba(99,102,241,.28);
      transition: transform .15s, box-shadow .15s, background .15s;
    }
    .scan-launcher-btn:hover {
      background: var(--accent-light); transform: translateY(-1px); box-shadow: 0 14px 28px rgba(99,102,241,.34);
    }
    .scan-launcher-status { width: 100%; font-size: 12px; color: var(--muted); padding-top: 2px; }
    .ledger-hero-panel {
      background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
      border: 1px solid var(--border); border-radius: 14px; padding: 18px; margin-bottom: 16px;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
    }
    .ledger-action-rail {
      display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--border);
    }
    /* Toast */
    .toast {
      position: fixed; bottom: 24px; right: 24px; background: var(--accent); color: #fff;
      padding: 12px 24px; border-radius: 10px; font-size: 13px; font-weight: 600;
      z-index: 9999; opacity: 0; transition: all .3s; pointer-events: none;
      box-shadow: 0 8px 32px rgba(99,102,241,.3); transform: translateY(8px);
    }
    .toast.show { opacity: 1; transform: translateY(0); }
    @media (max-width: 1000px) { .scanner-grid { grid-template-columns: 1fr; } }
    /* Chart detail tooltip overlay */
    .chart-detail-overlay {
      position: absolute; top: 0; right: 0; width: 260px; max-height: 280px;
      overflow-y: auto; background: var(--surface); border: 1px solid var(--accent);
      border-radius: 8px; padding: 12px; z-index: 10; font-size: 11px;
      box-shadow: 0 4px 16px rgba(0,0,0,.4); display: none;
    }
    .chart-detail-overlay.visible { display: block; }
    .chart-detail-overlay h4 { font-size: 12px; color: var(--accent-light); margin-bottom: 8px; font-weight: 600; }
    .chart-detail-overlay .detail-item {
      padding: 4px 0; border-bottom: 1px solid var(--border); color: var(--text);
      display: flex; justify-content: space-between; gap: 8px;
    }
    .chart-detail-overlay .detail-item:last-child { border-bottom: none; }
    .chart-detail-overlay .detail-algo { font-weight: 600; }
    .chart-detail-overlay .detail-loc { color: var(--muted); font-size: 10px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .chart-detail-overlay .close-btn {
      position: absolute; top: 4px; right: 8px; background: none; border: none;
      color: var(--muted); cursor: pointer; font-size: 14px;
    }
    /* HNDL & Agility tab styles */
    .risk-gauge { display: flex; align-items: center; gap: 24px; margin-bottom: 20px; }
    .gauge-circle {
      width: 120px; height: 120px; border-radius: 50%; position: relative;
      display: flex; align-items: center; justify-content: center; flex-direction: column;
    }
    .gauge-circle .gauge-value { font-size: 28px; font-weight: 700; }
    .gauge-circle .gauge-label { font-size: 11px; color: var(--muted); }
    .risk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
    .risk-stat-card { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 14px; }
    .risk-stat-card .rs-label { font-size: 11px; color: var(--muted); text-transform: uppercase; }
    .risk-stat-card .rs-value { font-size: 22px; font-weight: 700; margin-top: 4px; }
    .risk-stat-card .rs-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
    .feature-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; }
    .feature-bar .fb-name { width: 160px; color: var(--muted); font-size: 11px; }
    .feature-bar .fb-bar { flex: 1; height: 16px; background: var(--bg); border-radius: 999px; overflow: hidden; position: relative; border: 1px solid rgba(255,255,255,.04); }
    .feature-bar .fb-fill { height: 100%; border-radius: 999px; transition: width .5s; min-width: 8px; box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
    .feature-bar .fb-value { width: 50px; text-align: right; font-weight: 600; font-size: 11px; }
    /* Category-grouped feature importance */
    .feat-category { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
    .feat-cat-header { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; user-select: none; transition: background .15s; }
    .feat-cat-header:hover { background: rgba(99,102,241,.06); }
    .feat-cat-header .fc-toggle { font-size: 10px; color: var(--muted); transition: transform .2s; width: 14px; text-align: center; }
    .feat-cat-header.expanded .fc-toggle { transform: rotate(90deg); }
    .feat-cat-header .fc-name { flex: none; width: 180px; font-size: 13px; font-weight: 600; color: var(--text); }
    .feat-cat-header .fc-bar { flex: 1; height: 20px; background: var(--surface); border-radius: 999px; overflow: hidden; border: 1px solid rgba(255,255,255,.04); }
    .feat-cat-header .fc-fill { height: 100%; border-radius: 999px; transition: width .5s; display: flex; align-items: center; padding-left: 8px; font-size: 10px; font-weight: 600; color: #fff; min-width: 10px; }
    .feat-cat-header .fc-score { width: 60px; text-align: right; font-weight: 700; font-size: 13px; }
    .feat-cat-header .fc-count { font-size: 10px; color: var(--muted); width: 60px; text-align: right; }
    .feat-cat-body { padding: 0 14px 12px 28px; display: none; border-top: 1px solid var(--border); }
    .feat-cat-body.open { display: block; }
    .feat-cat-body .feature-bar { margin-top: 8px; }
    .feat-cat-body .feature-bar .fb-name { width: 200px; font-size: 11px; color: var(--text); }
    .feat-cat-body .feature-bar .fb-bar { height: 12px; }
    .feat-cat-body .fb-desc { font-size: 10px; color: var(--muted); margin-top: 1px; margin-left: 200px; }
    .ensemble-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
    .ensemble-card { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 14px; text-align: center; }
    .ensemble-card .ec-name { font-size: 11px; color: var(--muted); text-transform: uppercase; font-weight: 600; }
    .ensemble-card .ec-score { font-size: 24px; font-weight: 700; margin: 4px 0; }
    .ensemble-card .ec-weight { font-size: 10px; color: var(--muted); }
    .readiness-metrics {
      display: flex; gap: 24px; align-items: flex-start; margin-bottom: 20px;
      padding: 18px; border: 1px solid var(--border); border-radius: 14px;
      background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
    }
    .roadmap-item { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-bottom: 8px; }
    .roadmap-item .ri-priority { font-size: 10px; font-weight: 700; text-transform: uppercase; margin-bottom: 4px; }
    .roadmap-item .ri-action { font-size: 13px; font-weight: 600; }
    .roadmap-item .ri-meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
    .agility-dimension { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
    .agility-dimension .ad-name { width: 180px; font-size: 12px; color: var(--text); }
    .agility-dimension .ad-bar { flex: 1; height: 20px; background: var(--bg); border-radius: 4px; overflow: hidden; }
    .agility-dimension .ad-fill { height: 100%; border-radius: 4px; transition: width .5s; display: flex; align-items: center; padding-left: 8px; font-size: 10px; font-weight: 600; color: #fff; }
    .agility-dimension .ad-score { width: 50px; text-align: right; font-weight: 700; font-size: 13px; }
    .grade-badge { font-size: 48px; font-weight: 700; width: 100px; height: 100px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }

    /* ── Onboarding Wizard ──────────────────────────────────────── */
    .wizard-overlay {
      position: fixed; inset: 0; z-index: 10000;
      background: var(--bg); display: flex; align-items: center; justify-content: center;
      transition: opacity .4s, visibility .4s;
      overflow-y: auto; padding: 20px;
    }
    .wizard-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
    .wizard-container {
      width: 100%; max-width: 900px; display: flex;
      background: var(--surface); border: 1px solid var(--border);
      border-radius: 16px; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,.6);
      min-height: 520px; max-height: 90vh;
    }
    .wizard-sidebar {
      width: 260px; background: linear-gradient(160deg, #4f46e5 0%, #6366f1 40%, #818cf8 100%);
      padding: 40px 28px; display: flex; flex-direction: column; justify-content: space-between; flex-shrink: 0;
    }
    .wizard-sidebar .ws-brand { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 8px; }
    .wizard-sidebar .ws-tagline { font-size: 12px; color: rgba(255,255,255,.75); line-height: 1.5; margin-bottom: 32px; }
    .wizard-steps { list-style: none; }
    .wizard-steps li {
      display: flex; align-items: center; gap: 12px; padding: 10px 0;
      font-size: 13px; color: rgba(255,255,255,.5); transition: color .2s;
    }
    .wizard-steps li.active { color: #fff; font-weight: 600; }
    .wizard-steps li.done { color: rgba(255,255,255,.7); }
    .wizard-steps li .step-num {
      width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3);
      display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0;
    }
    .wizard-steps li.active .step-num { background: #fff; color: #4f46e5; border-color: #fff; }
    .wizard-steps li.done .step-num { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.5); }
    .wizard-main { flex: 1; padding: 40px; display: flex; flex-direction: column; overflow-y: auto; }
    .wizard-main h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
    .wizard-main .wm-sub { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
    .wizard-main .wm-body { flex: 1; }
    .wizard-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
    .wizard-nav button {
      padding: 10px 24px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: all .15s;
    }
    .wizard-nav .wn-back { background: transparent; color: var(--muted); border: 1px solid var(--border); }
    .wizard-nav .wn-back:hover { color: var(--text); border-color: var(--text); }
    .wizard-nav .wn-next { background: var(--accent); color: #fff; }
    .wizard-nav .wn-next:hover { background: var(--accent-light); }
    .wizard-nav .wn-next:disabled { opacity: .4; cursor: not-allowed; }
    .wiz-field { margin-bottom: 16px; }
    .wiz-field label { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; font-weight: 600; }
    .wiz-field input, .wiz-field select {
      width: 100%; background: var(--bg); border: 1px solid var(--border); color: var(--text);
      padding: 10px 14px; border-radius: 8px; font-size: 13px;
    }
    .wiz-field input:focus, .wiz-field select:focus { outline: none; border-color: var(--accent); }
    .wiz-check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .wiz-check-card {
      background: var(--bg); border: 2px solid var(--border); border-radius: 10px;
      padding: 14px; cursor: pointer; transition: all .15s; text-align: center;
    }
    .wiz-check-card:hover { border-color: var(--accent); }
    .wiz-check-card.selected { border-color: var(--accent); background: rgba(99,102,241,.1); }
    .wiz-check-card .wcc-icon { font-size: 24px; margin-bottom: 6px; }
    .wiz-check-card .wcc-name { font-size: 13px; font-weight: 600; }
    .wiz-check-card .wcc-desc { font-size: 11px; color: var(--muted); margin-top: 4px; }
    .wiz-progress { text-align: center; padding: 40px 0; }
    .wiz-progress .wp-spinner { width: 56px; height: 56px; border: 4px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 16px; }
    @keyframes spin { to { transform: rotate(360deg); } }
    .wiz-progress .wp-status { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
    .wiz-progress .wp-detail { font-size: 12px; color: var(--muted); }
    .wiz-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
    .wiz-result-card { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 16px; text-align: center; }
    .wiz-result-card .wr-value { font-size: 28px; font-weight: 700; }
    .wiz-result-card .wr-label { font-size: 11px; color: var(--muted); text-transform: uppercase; margin-top: 4px; }
    @media (max-width: 800px) {
      .wizard-container { flex-direction: column; }
      .wizard-sidebar { width: 100%; padding: 24px; min-height: auto; }
      .wizard-steps { display: flex; gap: 12px; }
      .wiz-results { grid-template-columns: 1fr; }
    }

    /* ── Control Bar (dropdowns) ────────────────────────────────── */
    .control-bar {
      background: var(--surface); border-bottom: 1px solid var(--border);
      padding: 8px 32px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    }
    .tab-hero {
      display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
      margin-bottom: 16px; padding: 18px 20px; border: 1px solid var(--border);
      border-radius: 14px; background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
    }
    .tab-hero-title { font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
    .tab-hero-sub {
      max-width: 820px; font-size: 12px; color: var(--muted); line-height: 1.7;
    }
    .filter-toolbar {
      display: flex; gap: 12px; margin-bottom: 16px; align-items: center; flex-wrap: wrap;
      padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    }
    .filter-toolbar label {
      font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 700;
    }
    .ctrl-group { display: flex; align-items: center; gap: 6px; }
    .ctrl-group label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 600; white-space: nowrap; }
    .ctrl-select {
      background: var(--bg); border: 1px solid var(--border); color: var(--text);
      padding: 5px 10px; border-radius: 6px; font-size: 12px; cursor: pointer;
    }
    .ctrl-select:focus { outline: none; border-color: var(--accent); }
    .ctrl-separator { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }

    /* ── Compact Source Summary ─────────────────────────────────── */
    .source-strip { display: flex; gap: 12px; flex-wrap: wrap; }
    .source-pill {
      display: flex; align-items: center; gap: 10px;
      background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
      padding: 12px 18px; min-width: 200px; flex: 1; max-width: 320px;
    }
    .source-pill .sp-icon { font-size: 20px; }
    .source-pill .sp-info { flex: 1; }
    .source-pill .sp-name { font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--text); }
    .source-pill .sp-count { font-size: 20px; font-weight: 700; line-height: 1.2; }
    .source-pill .sp-meta { font-size: 11px; color: var(--muted); }
    .source-pill .sp-vuln { color: var(--red); font-weight: 600; font-size: 11px; }

    /* ── Top row layout (sources + charts) ─────────────────────── */
    .top-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; align-items: start; }
    .top-row .sources-col { display: flex; flex-direction: column; gap: 12px; }
    @media (max-width: 1000px) { .top-row { grid-template-columns: 1fr; } }

    /* ── Model selector row ────────────────────────────────────── */
    .model-selector-row {
      display: flex; gap: 12px; align-items: center; margin-bottom: 16px; padding: 10px 14px;
      background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0)); border: 1px solid var(--border); border-radius: 14px; flex-wrap: wrap;
    }
    .model-selector-row label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 600; white-space: nowrap; }
    .model-selector-row select {
      background: var(--surface); border: 1px solid var(--border); color: var(--text);
      padding: 6px 12px; border-radius: 6px; font-size: 12px; cursor: pointer;
    }
    .model-selector-row select:focus { outline: none; border-color: var(--accent); }

    /* ── Pulse animation for live indicators ───────────────────── */
    @keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
    .pulse { animation: pulse 2s infinite; }

    /* ── Platform Security Tab ───────────────────────────────────── */
    .posture-hero {
      display: flex; align-items: center; gap: 28px; margin-bottom: 24px;
      padding: 24px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px;
    }
    .posture-ring {
      width: 130px; height: 130px; border-radius: 50%; position: relative;
      display: flex; align-items: center; justify-content: center; flex-direction: column; flex-shrink: 0;
    }
    .posture-ring .pr-score { font-size: 32px; font-weight: 700; }
    .posture-ring .pr-grade { font-size: 14px; font-weight: 700; margin-top: 2px; }
    .posture-ring .pr-label { font-size: 10px; color: var(--muted); margin-top: 2px; }
    .posture-meta { flex: 1; }
    .posture-meta h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--text); text-transform: none; }
    .posture-meta .pm-row { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 8px; }
    .posture-meta .pm-stat { text-align: center; }
    .posture-meta .pm-val { font-size: 22px; font-weight: 700; }
    .posture-meta .pm-lbl { font-size: 10px; color: var(--muted); text-transform: uppercase; }
    .zt-pillars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 20px; }
    .zt-pillar {
      background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
      padding: 16px; text-align: center;
    }
    .zt-pillar .zp-icon { font-size: 22px; margin-bottom: 6px; }
    .zt-pillar .zp-name { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
    .zt-pillar .zp-maturity { font-size: 18px; font-weight: 700; margin: 6px 0 2px; }
    .zt-pillar .zp-checks { font-size: 10px; color: var(--muted); }
    .zt-pillar .zp-desc { font-size: 10px; color: var(--muted); margin-top: 6px; line-height: 1.4; }
    .check-table { width: 100%; border-collapse: collapse; font-size: 12px; }
    .check-table th { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 600; padding: 8px 10px; }
    .check-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
    .check-table tr:hover td { background: rgba(99,102,241,.04); }
    .check-status { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
    .check-pass { background: rgba(34,197,94,.12); color: var(--green); }
    .check-fail { background: rgba(239,68,68,.12); color: var(--red); }
    .check-warn { background: rgba(245,158,11,.12); color: var(--orange); }
    .check-info { background: rgba(99,102,241,.12); color: var(--accent-light); }
    .nist-tag { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 9px; font-weight: 600; margin: 1px 2px; background: rgba(99,102,241,.1); color: var(--accent-light); }
    .alert-row-critical td { border-left: 3px solid var(--red); }
    .alert-row-high td { border-left: 3px solid var(--orange); }
    .alert-row-medium td { border-left: 3px solid var(--blue); }
    .alert-row-low td { border-left: 3px solid var(--green); }
    .csf-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
    .csf-bar .csf-name { width: 90px; font-size: 11px; color: var(--muted); font-weight: 600; }
    .csf-bar .csf-track { flex: 1; height: 18px; background: var(--bg); border-radius: 4px; overflow: hidden; }
    .csf-bar .csf-fill { height: 100%; border-radius: 4px; display: flex; align-items: center; padding-left: 8px; font-size: 9px; font-weight: 700; color: #fff; }
    .csf-bar .csf-pct { width: 40px; text-align: right; font-size: 12px; font-weight: 700; }
    .compliance-map-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
    .compliance-map-item {
      display: flex; align-items: center; gap: 10px; padding: 10px 14px;
      background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
    }
    .compliance-map-item .cmi-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
    .compliance-map-item .cmi-ctrl { font-size: 12px; font-weight: 600; flex: 1; }
    .compliance-map-item .cmi-status { font-size: 10px; font-weight: 700; text-transform: uppercase; }
    @media (max-width: 1000px) {
      .zt-pillars { grid-template-columns: repeat(2, 1fr); }
      .posture-hero { flex-direction: column; text-align: center; }
      .header-actions { margin-left: 0; justify-content: flex-start; }
      .action-cluster { min-width: 100%; }
      .utility-grid, .utility-grid-compact { grid-template-columns: 1fr; }
      .scan-launcher { padding: 18px; }
      .scan-launcher-actions { justify-content: flex-start; }
      .scan-field, .scan-field-compact { min-width: 100%; }
      .tab-hero { padding: 16px; }
      .readiness-metrics { flex-direction: column; gap: 16px; }
      .countdown-bar { flex-wrap: wrap; }
      .countdown-bar .cb-algo, .countdown-bar .cb-days, .countdown-bar .cb-tier { width: auto; }
    }
    /* ── Modals ─────────────────────────────────────────────────── */
    .modal-overlay {
      position: fixed; inset: 0; z-index: 9998;
      background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center;
    }
    .modal-content {
      background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
      width: 90%; max-width: 700px; max-height: 80vh; overflow-y: auto;
      box-shadow: 0 16px 48px rgba(0,0,0,.5);
    }
    .modal-header {
      display: flex; justify-content: space-between; align-items: center;
      padding: 16px 20px; border-bottom: 1px solid var(--border);
    }
    /* ── Form Modal ──────────────────────────────────────────────── */
    .form-modal-content { max-width: 480px; }
    .form-modal-body { padding: 16px 20px; }
    .form-modal-field { margin-bottom: 14px; }
    .form-modal-field label {
      display: block; font-size: 11px; font-weight: 600; color: var(--muted);
      text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px;
    }
    .form-modal-field input,
    .form-modal-field select,
    .form-modal-field textarea {
      width: 100%; background: var(--bg); border: 1px solid var(--border);
      color: var(--text); padding: 9px 12px; border-radius: 8px; font-size: 13px;
      font-family: inherit;
    }
    .form-modal-field input:focus,
    .form-modal-field select:focus,
    .form-modal-field textarea:focus {
      outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(99,102,241,.2);
    }
    .form-modal-field .field-hint { font-size: 11px; color: var(--muted); margin-top: 4px; }
    .form-modal-field .field-error { font-size: 11px; color: var(--red); margin-top: 4px; display: none; }
    .form-modal-footer {
      display: flex; justify-content: flex-end; gap: 8px;
      padding: 12px 20px; border-top: 1px solid var(--border);
    }
    .form-modal-footer button {
      padding: 8px 20px; border-radius: 8px; font-size: 13px; font-weight: 600;
      cursor: pointer; border: 1px solid transparent; transition: all .15s;
    }
    .form-modal-cancel { background: var(--bg); border-color: var(--border); color: var(--muted); }
    .form-modal-cancel:hover { color: var(--text); border-color: var(--text); }
    .form-modal-submit { background: var(--accent); border-color: var(--accent); color: #fff; }
    .form-modal-submit:hover { background: var(--accent-light); }
    .proof-hash { font-family: monospace; font-size: 11px; word-break: break-all; color: var(--accent-light); }
    .proof-step { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; margin-bottom: 6px; font-size: 11px; }
    /* ── Intelligence Hub ─────────────────────────────────── */
    .countdown-bar { display:flex; align-items:center; gap:10px; margin-bottom:10px; padding:10px 12px; background:var(--bg); border:1px solid var(--border); border-radius:12px; }
    .countdown-bar .cb-algo { width:140px; font-size:12px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    .countdown-bar .cb-track { flex:1; height:22px; background:rgba(255,255,255,.03); border-radius:999px; overflow:hidden; border:1px solid rgba(255,255,255,.05); }
    .countdown-bar .cb-fill { height:100%; border-radius:999px; display:flex; align-items:center; padding-left:8px; font-size:10px; font-weight:600; color:#fff; min-width:30px; transition:width .5s; box-shadow: inset 0 1px 0 rgba(255,255,255,.16); }
    .countdown-bar .cb-days { width:80px; text-align:right; font-size:12px; font-weight:700; }
    .countdown-bar .cb-tier { width:86px; text-align:center; border-radius:999px; padding:4px 8px; font-size:10px; font-weight:700; }
    .maturity-gauge { display:flex; align-items:center; gap:20px; margin-bottom:16px; }
    .maturity-level-badge { font-size:11px; font-weight:700; padding:4px 12px; border-radius:20px; text-transform:uppercase; }
    /* ── Trust & Signing ──────────────────────────────────── */
    .signing-hero { display:flex; gap:20px; align-items:center; padding:20px; background:var(--bg); border:1px solid var(--border); border-radius:12px; margin-bottom:16px; flex-wrap:wrap; }
    .signing-hero .sh-algo { font-size:22px; font-weight:700; }
    .signing-hero .sh-meta { font-size:12px; color:var(--muted); }
    .compliance-badges { display:flex; gap:6px; flex-wrap:wrap; margin-top:6px; }
    .compliance-badge { padding:3px 8px; border-radius:4px; font-size:10px; font-weight:700; background:rgba(34,197,94,.12); color:var(--green); }
    .compliance-badge.inactive { background:rgba(156,163,175,.12); color:var(--muted); }
    /* ── Market Analytics ─────────────────────────────────── */
    .benchmark-card { background:var(--bg); border:1px solid var(--border); border-radius:10px; padding:18px; text-align:center; }
    .benchmark-card .bm-value { font-size:26px; font-weight:700; }
    .benchmark-card .bm-label { font-size:11px; color:var(--muted); text-transform:uppercase; margin-top:4px; }
    .benchmark-card .bm-position { margin-top:6px; font-size:11px; font-weight:700; padding:3px 10px; border-radius:10px; display:inline-block; }
    .diff-viewer { background:var(--bg); border:1px solid var(--border); border-radius:8px; padding:16px; font-family:'Courier New',monospace; font-size:12px; white-space:pre-wrap; max-height:400px; overflow-y:auto; line-height:1.6; }
    .diff-add { color:var(--green); } .diff-del { color:var(--red); }
    .velocity-bar { height:24px; background:var(--bg); border-radius:6px; overflow:hidden; margin:8px 0; }
    .velocity-fill { height:100%; border-radius:6px; background:linear-gradient(90deg,var(--accent),var(--green)); display:flex; align-items:center; padding-left:10px; font-size:11px; font-weight:700; color:#fff; transition:width .5s; }
    /* ── Banking Compliance ────────────────────────────────── */
    .framework-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:12px; }
    .framework-card { background:var(--bg); border:1px solid var(--border); border-radius:10px; padding:16px; }
    .framework-card .fc-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
    .framework-card .fc-name { font-size:14px; font-weight:700; }
    .framework-card .fc-ratio { font-size:12px; color:var(--muted); }
    .control-row { font-size:12px; padding:8px 0; border-bottom:1px solid var(--border); cursor:pointer; }
    .control-row:last-child { border-bottom:none; }
    .control-row:hover { color:var(--accent-light); }
    .control-row .cr-expand { display:none; margin-top:6px; font-size:11px; color:var(--muted); line-height:1.7; padding:8px; background:var(--surface); border-radius:6px; }
    .control-row.open .cr-expand { display:block; }
    /* ── Advanced Scans ───────────────────────────────────── */
    .scan-input-card { background:var(--bg); border:1px solid var(--border); border-radius:10px; padding:16px; }
    .scan-input-card h4 { font-size:13px; font-weight:700; color:var(--accent-light); margin-bottom:10px; text-transform:uppercase; }
    .scan-input-row { display:flex; gap:8px; align-items:center; }
    .scan-input-row input { flex:1; background:var(--surface); border:1px solid var(--border); color:var(--text); padding:8px 12px; border-radius:6px; font-size:12px; }
    .scan-input-row input:focus { outline:none; border-color:var(--accent); }
    .scan-result-card { background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:14px; margin-top:10px; }
    /* ── Scanner Capabilities ─────────────────────────────── */
    .cap-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:10px; }
    .cap-card { background:var(--bg); border:1px solid var(--border); border-radius:8px; padding:12px; transition:border-color .15s; }
    .cap-card:hover { border-color:var(--accent); }
    .cap-card.cap-ok { border-left:3px solid var(--green); }
    .cap-card.cap-miss { border-left:3px solid var(--red); opacity:.75; }
    .cap-card .cc-name { font-size:13px; font-weight:600; margin-bottom:4px; }
    .cap-card .cc-module { font-size:10px; color:var(--muted); font-family:monospace; }
    .cap-card .cc-missing { font-size:10px; color:var(--red); margin-top:4px; }
    .cap-card .cc-crit { display:inline-block; font-size:9px; font-weight:700; padding:1px 6px; border-radius:3px; background:rgba(239,68,68,.15); color:var(--red); margin-left:4px; }
    /* ── Tenant Admin ─────────────────────────────────────── */
    .admin-form { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:12px; }
    .admin-form .wiz-field { margin-bottom:0; }
    .recovery-codes { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; margin-top:8px; }
    .recovery-codes code { background:var(--bg); border:1px solid var(--border); padding:6px; text-align:center; font-size:12px; border-radius:4px; font-weight:600; }
  
    /* KPI cards for intelligence/banking/capabilities tabs */
    .kpi { display:flex; flex-direction:column; background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:16px; min-width:120px; }
    .kpi-value { font-size:28px; font-weight:700; color:var(--accent); line-height:1.2; }
    .kpi-label { font-size:11px; color:var(--muted); margin-top:4px; text-transform:uppercase; letter-spacing:0.5px; }

    /* Classification Banner (CNSSI 1253 / ICD 503) */
    .classification-banner { display:none; width:100%; text-align:center; font-weight:700; font-size:12px; letter-spacing:1.2px; text-transform:uppercase; padding:4px 0; z-index:10000; position:fixed; left:0; color:#fff; }
    .classification-banner.top { top:0; }
    .classification-banner.bottom { bottom:0; }
    .classification-banner.visible { display:block; }
    body.has-classification-banner { padding-top:28px; padding-bottom:28px; }
    body.has-classification-banner .sidebar { top:28px; bottom:28px; }

    /* ── Integrations Center ── */
    .int-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:12px; }
    .int-card { background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:14px; transition:border-color .2s; position:relative; }
    .int-card:hover { border-color:var(--accent); }
    .int-card-hdr { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
    .int-card-icon { width:36px; height:36px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:18px; flex-shrink:0; }
    .int-card-name { font-size:13px; font-weight:600; }
    .int-card-type { font-size:11px; color:var(--muted); }
    .int-card-badges { display:flex; gap:4px; flex-wrap:wrap; margin-bottom:8px; }
    .int-card-actions { display:flex; gap:6px; margin-top:10px; }
    .int-card-actions button { font-size:11px; padding:4px 10px; border-radius:5px; border:1px solid var(--border); background:var(--bg); color:var(--fg); cursor:pointer; }
    .int-card-actions button:hover { border-color:var(--accent); }
    .int-status { display:inline-flex; align-items:center; gap:4px; font-size:11px; }
    .int-status-dot { width:7px; height:7px; border-radius:50%; display:inline-block; }
    .il-badge { font-size:9px; font-weight:700; padding:1px 5px; border-radius:3px; letter-spacing:.3px; }
    .il-badge-2 { background:#dcfce7; color:#166534; }
    .il-badge-4 { background:#dbeafe; color:#1e40af; }
    .il-badge-5 { background:#fef3c7; color:#92400e; }
    .il-badge-6 { background:#fee2e2; color:#991b1b; }
    .scannable-badge { display:inline-block; font-size:9px; font-weight:600; padding:1px 6px; border-radius:3px; background:#ecfdf5; color:#059669; }
    .service-badge { display:inline-block; font-size:9px; font-weight:600; padding:1px 6px; border-radius:3px; background:#ede9fe; color:#7c3aed; }
    .int-filter-pill { font-size:11px; padding:4px 12px; border-radius:16px; border:1px solid var(--border); background:var(--bg); color:var(--fg); cursor:pointer; transition:all .15s; }
    .int-filter-pill:hover, .int-filter-pill.active { background:var(--accent); color:#fff; border-color:var(--accent); }
    .coming-soon { opacity:.65; pointer-events:none; position:relative; }
    .coming-soon::after { content:"Coming Soon"; position:absolute; top:8px; right:8px; font-size:9px; padding:1px 6px; background:var(--border); color:var(--muted); border-radius:3px; }

    /* ── Wizard connector accordion ── */
    .wiz-cat-hdr { display:flex; align-items:center; justify-content:space-between; padding:10px 12px; background:var(--surface); border:1px solid var(--border); border-radius:8px; cursor:pointer; margin-bottom:4px; user-select:none; transition:border-color .15s; }
    .wiz-cat-hdr:hover { border-color:var(--accent); }
    .wiz-cat-hdr .wch-left { display:flex; align-items:center; gap:8px; }
    .wiz-cat-hdr .wch-icon { font-size:16px; }
    .wiz-cat-hdr .wch-name { font-size:13px; font-weight:600; }
    .wiz-cat-hdr .wch-count { font-size:11px; color:var(--muted); }
    .wiz-cat-hdr .wch-right { display:flex; align-items:center; gap:6px; }
    .wiz-cat-hdr .wch-arrow { font-size:12px; transition:transform .2s; color:var(--muted); }
    .wiz-cat-hdr.expanded .wch-arrow { transform:rotate(90deg); }
    .wiz-cat-body { display:none; padding:8px 4px 12px; }
    .wiz-cat-body.visible { display:block; }
    .wiz-cat-body .wiz-check-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:8px; }
    .wiz-type-card { background:var(--bg); border:1px solid var(--border); border-radius:8px; padding:10px; cursor:pointer; transition:all .15s; text-align:center; }
    .wiz-type-card:hover { border-color:var(--accent); }
    .wiz-type-card.selected { border-color:var(--accent); background:color-mix(in srgb, var(--accent) 8%, var(--bg)); }
    .wiz-type-card .wtc-name { font-size:12px; font-weight:600; margin-top:4px; }
    .wiz-type-card .wtc-desc { font-size:10px; color:var(--muted); margin-top:2px; line-height:1.3; }
    .wiz-type-card .wtc-icon { font-size:20px; }
    .wiz-type-config { display:none; background:var(--surface); border:1px solid var(--border); border-radius:8px; padding:12px; margin-top:8px; }
    .wiz-type-config.visible { display:block; }

/* ────────────────────────────────────────────────────────────────────
   UI Polish — appended in 2026-04-19 pass.
   Tightens header vertical space and gives buttons stronger contrast
   so primary actions, dropdown toggles, and menu items read clearly
   in both light and dark modes. Everything below is a specificity
   override on existing rules; no earlier declarations are removed.
   ──────────────────────────────────────────────────────────────────── */

/* Header: collapse vertical padding, pin total height to ~40px. */
header {
  padding: 8px 24px !important;
}
.status-bar {
  padding: 4px 24px !important;
  font-size: 10.5px;
}
.app-toolbar {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  gap: 10px !important;
}
.status-cluster { min-width: 260px; }
.status-pill {
  min-height: 26px !important;
  padding: 4px 10px !important;
  font-size: 10.5px;
}

/* Default export buttons: darker surface + stronger border + accent on hover. */
.export-btn {
  background: var(--bg) !important;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)) !important;
  color: var(--text) !important;
  transition: background .15s, border-color .15s, transform .1s;
}
.export-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 14%, var(--bg)) !important;
  border-color: var(--accent) !important;
  color: var(--accent-light) !important;
  transform: translateY(-1px);
}
.export-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Primary CTA: keep the gradient but make the drop-shadow + type
   heavier so it clearly reads as the main action. */
.export-btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-light)) !important;
  border: 1px solid color-mix(in srgb, var(--accent) 60%, #fff 10%) !important;
  color: #fff !important;
  font-weight: 800 !important;
  box-shadow: 0 6px 18px rgba(99,102,241,.35), inset 0 1px 0 rgba(255,255,255,.15) !important;
}
.export-btn-primary:hover:not(:disabled) {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

/* Dropdown menu container: sit above the card, not inside it. */
.export-dropdown-menu {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(0,0,0,.35);
  padding: 4px;
  min-width: 200px;
}
.export-dd-item {
  border-radius: 6px;
  padding: 8px 12px !important;
}
.export-dd-item:hover,
.export-dd-item:focus-visible {
  background: color-mix(in srgb, var(--accent) 22%, transparent) !important;
  color: var(--text) !important;
  outline: none;
}

/* Progress bars: ensure the filled portion is always visible even
   when width is set inline (dashboard stores width as style="width:NN%").
   A minimum paint width keeps "0%" readable while the real value
   renders. */
.progress-bar, .bar, .readiness-bar, .risk-bar, .ml-bar {
  background: var(--bg);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.progress-bar > *, .bar > *, .readiness-bar > *,
.risk-bar > *, .ml-bar > * {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  min-width: 2px;
  border-radius: inherit;
  transition: width .3s ease;
}

/* Tab / pill buttons throughout the dashboard that currently inherit
   the bare-button look. Adds a visible hover state. */
button:not([class]),
.tab-btn,
.pill-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  transition: background .15s, border-color .15s;
}
button:not([class]):hover,
.tab-btn:hover,
.pill-btn:hover {
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
  border-color: var(--accent);
  color: var(--accent-light);
}

/* Section headers inside the Board Package / verification panels —
   cut the whitespace between subtitle and the action row. */
.panel h2, .panel h3, .section-title { margin-bottom: 8px; }
.panel > p + .export-toolbar,
.panel > .section-title + .export-toolbar { margin-top: 6px; }

/* Ledger chain status line: make the BROKEN state more prominent
   and the repair button a clear call-to-action, not a footnote. */
.chain-status.broken,
.chain-state-broken {
  background: color-mix(in srgb, var(--red) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--red) 45%, var(--border));
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.chain-status.broken button,
.chain-state-broken button {
  background: var(--red);
  border: 1px solid var(--red);
  color: #fff;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

/* ════════════════════════════════════════════════════════════════════
   Phase 10/post-launch: governance pop-out tabs + sticky header
   ──────────────────────────────────────────────────────────────────── */
.gov-pop-header {
  position: sticky; top: 0; z-index: 5;
  background: var(--surface);
  margin: -24px -24px 12px -24px;
  padding: 16px 24px 12px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px;
}
.gov-pop-header .gov-pop-title-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.gov-pop-header .gov-pop-title {
  font-size: 13px; font-weight: 700; margin: 0;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.gov-pop-header .gov-pop-title code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px; color: var(--muted);
}
.gov-pop-header .gov-pop-meta {
  display: flex; gap: 6px; flex-wrap: wrap; font-size: 11px; color: var(--muted);
}
.gov-pop-tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--border);
  margin: 0 -24px 16px -24px; padding: 0 24px;
}
.gov-pop-tab {
  background: transparent; border: none; padding: 10px 14px;
  color: var(--muted); cursor: pointer; font-size: 12px; font-weight: 600;
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.gov-pop-tab:hover { color: var(--text); }
.gov-pop-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.gov-pop-tab .tab-count {
  display: inline-block; min-width: 16px; padding: 0 5px; margin-left: 4px;
  font-size: 10px; line-height: 16px; text-align: center;
  background: rgba(99,102,241,.18); color: var(--accent); border-radius: 8px;
}
.gov-pop-panel { display: none; animation: fadeInUp .15s ease-out; }
.gov-pop-panel.active { display: block; }

/* ════════════════════════════════════════════════════════════════════
   Hero's-journey stepper (top of Overview tab)
   ──────────────────────────────────────────────────────────────────── */
.heros-journey {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 18px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px;
}
.hj-step {
  display: flex; flex-direction: column; align-items: stretch;
  padding: 10px 10px; border-radius: 8px;
  background: rgba(255,255,255,.02); border: 1px solid var(--border);
  text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
  position: relative;
}
.hj-step:hover { border-color: var(--accent-light); background: rgba(99,102,241,.05); }
.hj-step.active { border-color: var(--accent); background: rgba(99,102,241,.12); }
.hj-step .hj-num {
  font-size: 10px; color: var(--muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
}
.hj-step .hj-name {
  font-size: 13px; font-weight: 700; margin-top: 4px; color: var(--text);
}
.hj-step .hj-count {
  font-size: 18px; font-weight: 700; margin-top: 6px;
  color: var(--accent);
}
.hj-step.empty .hj-count { color: var(--muted); }
.hj-step.alert .hj-count { color: var(--red); }
.hj-step .hj-sub {
  font-size: 10px; color: var(--muted); margin-top: 2px;
}

/* "What's next?" hero call-to-action card */
.whats-next-card {
  background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(16,185,129,.04));
  border: 1px solid rgba(99,102,241,.25);
  border-radius: 10px; padding: 14px 18px; margin-bottom: 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.whats-next-card .wn-text { display: flex; align-items: center; gap: 12px; }
.whats-next-card .wn-icon {
  font-size: 22px; line-height: 1;
}
.whats-next-card .wn-msg { font-size: 13px; color: var(--text); }
.whats-next-card .wn-msg strong { color: var(--accent); }
.whats-next-card .wn-action {
  background: var(--accent); color: #fff; border: none;
  padding: 7px 16px; border-radius: 6px; cursor: pointer;
  font-size: 12px; font-weight: 600;
}
.whats-next-card .wn-action:hover { background: var(--accent-light); }
.whats-next-card.dismissed { display: none; }
.whats-next-card.empty .wn-action { display: none; }

/* Responsive: stepper collapses to 3 cols on narrow screens */
@media (max-width: 960px) {
  .heros-journey { grid-template-columns: repeat(3, 1fr); }
}

/* ════════════════════════════════════════════════════════════════════
   ExecutionContext registry section (Connectors tab)
   ──────────────────────────────────────────────────────────────────── */
.exec-ctx-section {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px; margin: 16px 0;
}
.exec-ctx-section .ecs-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.exec-ctx-section .ecs-header h3 {
  margin: 0; font-size: 14px; font-weight: 700;
}
.exec-ctx-section .ecs-list {
  display: flex; flex-direction: column; gap: 8px;
}
.exec-ctx-section .ecs-row {
  display: grid;
  grid-template-columns: 100px 200px 1fr 100px;
  gap: 10px; align-items: center;
  padding: 8px 10px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 6px; font-size: 12px;
}
.exec-ctx-section .ecs-row .ecs-provider { font-weight: 700; color: var(--accent); }
.exec-ctx-section .ecs-row .ecs-status-active { color: var(--green); font-weight: 600; }
.exec-ctx-section .ecs-row .ecs-status-revoked { color: var(--muted); }
.exec-ctx-section .ecs-row .ecs-status-validation_failed { color: var(--red); }
