    html.has-session #login-screen { display: none !important; }
    html.has-session #app-shell { display: flex !important; }
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --bg:            #000000;
      --bg-surface:    #0a0a0a;
      --bg-card:       #111111;
      --bg-card-hover: #181818;
      --border:        #1e1e1e;
      --border-bright: #2e2e2e;
      --green:         #00e87a;
      --green-dim:     #00b85f;
      --red:           #AA0303;
      --red-dim:       #880202;
      --red-glow:      rgba(170,3,3,0.15);
      --amber:         #f97316;
      --yellow:        #eab308;
      --blue:          #3b82f6;
      --purple:        #8b5cf6;
      --text:          #e8e8e8;
      --text-dim:      #484848;
      --text-mid:      #888888;
      --noise-opacity: 0.3;
      --font-mono:     'JetBrains Mono', monospace;
      --font-sans:     'Inter', -apple-system, sans-serif;
      --radius:        8px;
      --radius-lg:     12px;
      --sidebar-w:     260px;
    }
    /* Light theme — applied by toggling `theme-light` on <body>. */
    body.theme-light {
      --bg:            #f5f5f5;
      --bg-surface:    #ffffff;
      --bg-card:       #ffffff;
      --bg-card-hover: #f0f0f0;
      --border:        #e2e2e2;
      --border-bright: #cccccc;
      --text:          #1a1a1a;
      --text-dim:      #8a8a8a;
      --text-mid:      #555555;
      --red-glow:      rgba(170,3,3,0.08);
      --noise-opacity: 0;
    }

    html, body {
      height: 100%;
      background: var(--bg);
      color: var(--text);
      font-family: var(--font-sans);
      font-size: 15px;
      line-height: 1.65;
      -webkit-font-smoothing: antialiased;
      overflow: hidden;
    }

    /* ── Noise overlay ─────────────────────────────────────── */
    body::before {
      content: '';
      position: fixed;
      inset: 0;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
      pointer-events: none;
      z-index: 0;
      opacity: var(--noise-opacity);
    }

    .hidden { display: none !important; }

    /* ══════════════════════════════════════════════════════════
       LOGIN SCREEN
    ═══════════════════════════════════════════════════════════ */
    #login-screen,
    #reset-password-screen {
      position: fixed;
      inset: 0;
      z-index: 100;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--bg);
    }

    .login-card {
      width: 100%;
      max-width: 400px;
      padding: 40px;
      position: relative;
      z-index: 1;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    }

    .login-logo {
      text-align: center;
      margin-bottom: 32px;
    }
    .login-logo img { height: 108px; }

    .login-title {
      text-align: center;
      font-size: 20px;
      font-weight: 700;
      margin-bottom: 4px;
    }
    .login-subtitle {
      text-align: center;
      font-size: 13px;
      color: var(--text-dim);
      margin-bottom: 32px;
    }

    .form-group {
      margin-bottom: 16px;
    }
    .form-label {
      display: block;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.8px;
      text-transform: uppercase;
      color: var(--text-dim);
      margin-bottom: 6px;
    }
    .form-input {
      width: 100%;
      padding: 12px 14px;
      background: var(--bg-card);
      border: 1px solid var(--border-bright);
      border-radius: var(--radius);
      color: var(--text);
      font-family: var(--font-mono);
      font-size: 13px;
      outline: none;
      transition: border-color 0.2s;
    }
    .form-input:focus {
      border-color: var(--red);
    }
    .form-input::placeholder { color: var(--text-dim); }

    .login-btn {
      width: 100%;
      padding: 12px;
      background: var(--red);
      color: #fff;
      font-weight: 700;
      font-size: 13px;
      border: none;
      border-radius: var(--radius);
      cursor: pointer;
      transition: background 0.2s;
      margin-top: 8px;
    }
    .login-btn:hover { background: var(--red-dim); }

    .login-error {
      color: var(--red);
      font-size: 12px;
      text-align: center;
      margin-top: 12px;
      min-height: 18px;
    }



    /* ══════════════════════════════════════════════════════════
       APP SHELL — sidebar + main
    ═══════════════════════════════════════════════════════════ */
    #app-shell {
      display: flex;
      height: 100vh;
      position: relative;
      z-index: 1;
    }

    /* ── Sidebar ───────────────────────────────────────────── */
    .sidebar {
      width: var(--sidebar-w);
      min-width: var(--sidebar-w);
      background: var(--bg-surface);
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      overflow-y: auto;
    }

    .sidebar-logo {
      padding: 20px 20px 16px;
      border-bottom: 1px solid var(--border);
      text-align: center;
    }
    .sidebar-logo img { height: 80px; }
    .logo-light { display: none; }
    body.theme-light .logo-dark { display: none; }
    body.theme-light .logo-light { display: inline-block; }

    .sidebar-section-label {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 1.5px;
      text-transform: uppercase;
      color: var(--text-dim);
      padding: 20px 20px 8px;
    }

    .sidebar-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 20px;
      font-size: 14px;
      color: var(--text-mid);
      cursor: pointer;
      transition: background 0.15s, color 0.15s, border-left-color 0.15s;
      border-left: 2px solid transparent;
    }
    .sidebar-item:hover {
      background: var(--bg-card);
      color: var(--text);
    }
    .sidebar-item.active {
      background: var(--bg-card);
      color: var(--text);
      border-left: 2px solid var(--red);
    }
    .sidebar-item.locked {
      opacity: 0.35;
      cursor: default;
    }
    .sidebar-item.locked:hover {
      background: transparent;
      color: var(--text-mid);
    }
    .sidebar-item:focus {
      outline: 2px solid var(--red);
      outline-offset: -2px;
    }
    .sidebar-icon {
      width: 18px;
      text-align: center;
      font-size: 14px;
      flex-shrink: 0;
    }
    .sidebar-item-label { flex: 1; }
    .sidebar-badge {
      font-size: 10px;
      font-weight: 700;
      padding: 2px 6px;
      border-radius: 10px;
      line-height: 1;
    }

    .badge-complete {
      background: rgba(0,232,122,0.15);
      color: var(--green);
    }
    .badge-active {
      background: rgba(249,115,22,0.15);
      color: var(--amber);
    }
    .badge-planned {
      background: rgba(255,255,255,0.05);
      color: var(--text-dim);
    }

    .sidebar-footer {
      margin-top: auto;
      padding: 16px 20px;
      border-top: 1px solid var(--border);
    }
    .sidebar-user {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 12px;
      color: var(--text-mid);
    }
    .sidebar-avatar {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: var(--bg-card);
      border: 1px solid var(--border-bright);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 700;
      color: var(--text-dim);
    }
    .sidebar-logout {
      font-size: 11px;
      color: var(--text-dim);
      cursor: pointer;
      margin-top: 8px;
      transition: color 0.2s;
    }
    .sidebar-logout:hover { color: var(--red); }
    .sidebar-action {
      font-size: 11px;
      color: var(--text-dim);
      cursor: pointer;
      margin-top: 8px;
      transition: color 0.2s;
    }
    .sidebar-action:hover { color: var(--red); }

    .sidebar-hint {
      margin-top: 12px;
      padding-top: 8px;
      border-top: 1px solid var(--border);
      font-size: 10px;
      color: var(--text-dim);
      line-height: 1.4;
    }
    .sidebar-hint code {
      background: rgba(255,255,255,0.05);
      padding: 1px 3px;
      border-radius: 2px;
      font-family: var(--font-mono);
      font-size: 9px;
    }

    /* ── Global search ─────────────────────────────────────── */
    .search-container {
      position: relative;
      margin-bottom: 24px;
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .search-input {
      flex: 1;
      max-width: 480px;
      padding: 12px 16px 12px 44px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      color: var(--text);
      font-family: var(--font-sans);
      font-size: 14px;
      outline: none;
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    .search-input:focus {
      border-color: var(--red);
      box-shadow: 0 0 0 3px rgba(170,3,3,0.1);
    }
    .search-input::placeholder { color: var(--text-dim); }
    .theme-toggle {
      flex-shrink: 0;
      height: 36px;
      padding: 0 14px;
      border-radius: 18px;
      border: 1px solid var(--border-bright);
      background: var(--bg-card);
      color: var(--text);
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-family: var(--font-sans);
      font-size: 12px;
      font-weight: 600;
      letter-spacing: 0.3px;
      transition: all 0.2s ease;
    }
    .theme-toggle-icon { font-size: 14px; line-height: 1; }
    .theme-toggle-label { white-space: nowrap; }
    .theme-toggle:hover {
      border-color: var(--red);
      color: var(--text);
      background: var(--bg-card-hover);
    }
    .theme-toggle:focus { outline: 2px solid var(--red); outline-offset: 2px; }
    .search-icon {
      position: absolute;
      left: 16px; top: 50%;
      transform: translateY(-50%);
      color: var(--text-dim);
      font-size: 16px;
    }
    .search-results {
      position: absolute;
      top: 100%; left: 0;
      width: 100%;
      max-width: 480px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: 0 8px 32px rgba(0,0,0,0.15);
      max-height: 400px;
      overflow-y: auto;
      z-index: 100;
      display: none;
    }
    .search-result {
      padding: 12px 16px;
      border-bottom: 1px solid var(--border);
      cursor: pointer;
      transition: background-color 0.15s;
    }
    .search-result:hover { background: var(--bg-surface); }
    .search-result:last-child { border-bottom: none; }
    .search-result-static {
      cursor: default;
      background: var(--bg-surface);
    }
    .search-result-static:hover { background: var(--bg-surface); }
    .search-result-static .search-result-context {
      white-space: normal;
      line-height: 1.5;
      margin-top: 4px;
    }
    .search-result-title {
      font-weight: 600;
      color: var(--text);
      margin-bottom: 2px;
    }
    .search-result-context {
      font-size: 12px;
      color: var(--text-mid);
    }
    .search-result-badge {
      display: inline-block;
      font-size: 10px;
      padding: 1px 6px;
      border-radius: 8px;
      background: rgba(255,255,255,0.1);
      color: var(--text-dim);
      margin-left: 8px;
    }

    /* ── Main content ──────────────────────────────────────── */
    .main {
      flex: 1;
      overflow-y: auto;
      padding: 32px 40px;
    }

    .main::-webkit-scrollbar { width: 5px; }
    .main::-webkit-scrollbar-track { background: transparent; }
    .main::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }

    .view { display: none; }
    .view.active { display: block; }

    /* ── Page header ───────────────────────────────────────── */
    .page-header {
      margin-bottom: 28px;
    }
    .page-header h1 {
      font-size: 24px;
      font-weight: 800;
      letter-spacing: -0.5px;
      line-height: 1.2;
    }
    .page-header p {
      font-size: 14px;
      color: var(--text-mid);
      margin-top: 6px;
    }

    /* ── Engagement banner ─────────────────────────────────── */
    .engagement-banner {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 24px 28px;
      margin-bottom: 32px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 16px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
    .eng-info h2 {
      font-size: 18px;
      font-weight: 700;
      margin-bottom: 4px;
    }
    .eng-meta {
      display: flex;
      gap: 20px;
      flex-wrap: wrap;
    }
    .eng-meta-item {
      font-size: 12px;
      color: var(--text-dim);
      font-family: var(--font-mono);
    }
    .eng-meta-item span {
      color: var(--text-mid);
    }
    .eng-status {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 16px;
      border-radius: var(--radius);
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.5px;
      text-transform: uppercase;
    }
    .status-active {
      background: rgba(249,115,22,0.1);
      border: 1px solid rgba(249,115,22,0.3);
      color: var(--amber);
    }
    .status-complete {
      background: rgba(34,197,94,0.1);
      border: 1px solid rgba(34,197,94,0.3);
      color: var(--green);
    }
    .status-complete .status-dot {
      animation: none;
    }
    .status-not-started {
      background: rgba(255,255,255,0.04);
      border: 1px solid var(--border);
      color: var(--text-dim);
    }
    .status-not-started .status-dot {
      animation: none;
    }
    .status-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: currentColor;
      animation: pulse 1.5s ease-in-out infinite;
    }

    .status-indicator {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      font-weight: 600;
    }
    .status-indicator > .status-dot {
      margin-top: 7px;
    }

    .eng-status .eng-progress {
      margin-top: 8px;
      margin-left: 28px;
      width: calc(100% - 28px);
    }

    /* ── Analytics Charts ──────────────────────────────────── */
    .charts-row {
      display: grid;
      grid-template-columns: minmax(260px, 0.8fr) 1fr;
      gap: 16px;
      margin-bottom: 32px;
    }
    @media (max-width: 900px) {
      .charts-row { grid-template-columns: 1fr; }
    }
    .chart-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 20px 22px;
    }
    .chart-card h3 {
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      color: var(--text-dim);
      margin-bottom: 16px;
    }
    .chart-donut-wrap {
      position: relative;
      width: 160px;
      height: 160px;
      margin: 0 auto;
    }
    .chart-donut { width: 100%; height: 100%; transform: rotate(-90deg); }
    .chart-donut circle { transition: stroke-width 0.15s ease, stroke-dasharray 0.4s ease; }
    .chart-donut circle[data-sev] { cursor: pointer; }
    .chart-donut circle[data-sev]:hover { stroke-width: 26; }
    .chart-donut-center {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      pointer-events: none;
    }
    .chart-donut-total {
      font-size: 28px;
      font-weight: 700;
      color: var(--text);
      line-height: 1;
    }
    .chart-donut-sub {
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 1px;
      text-transform: uppercase;
      color: var(--text-dim);
      margin-top: 4px;
    }
    .chart-legend {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 10px 16px;
      margin-top: 16px;
    }
    .chart-legend-item {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 11px;
      color: var(--text-mid);
      cursor: pointer;
      padding: 2px 6px;
      border-radius: 4px;
      transition: background-color 0.15s ease;
    }
    .chart-legend-item:hover { background: var(--bg-card-hover); color: var(--text); }
    .chart-legend-dot {
      width: 10px;
      height: 10px;
      border-radius: 2px;
      flex-shrink: 0;
    }
    .chart-legend-count { color: var(--text); font-weight: 700; }
    .chart-bars {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    .chart-bar-row {
      display: grid;
      grid-template-columns: 120px 1fr 28px;
      align-items: center;
      gap: 10px;
      font-size: 11px;
      padding: 4px 6px;
      margin: 0 -6px;
      border-radius: 4px;
      cursor: pointer;
      transition: background-color 0.15s ease;
    }
    .chart-bar-row:hover { background: var(--bg-card-hover); }
    .chart-bar-row:hover .chart-bar-label { color: var(--text); }
    .chart-bar-label {
      color: var(--text-mid);
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .chart-bar-track {
      height: 12px;
      background: var(--bg-surface);
      border: 1px solid var(--border);
      border-radius: 6px;
      overflow: hidden;
    }
    .chart-bar-fill {
      height: 100%;
      background: linear-gradient(90deg, var(--red-dim), var(--red));
      border-radius: 5px;
      transition: width 0.4s ease;
    }
    .chart-bar-count {
      color: var(--text);
      font-weight: 700;
      text-align: right;
      font-family: var(--font-mono);
    }
    @media (max-width: 520px) {
      .chart-bar-row { grid-template-columns: 90px 1fr 28px; }
    }

    /* ── Metrics row ───────────────────────────────────────── */
    .metrics-row {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 12px;
      margin-bottom: 32px;
    }
    .metric-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 18px 20px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.03);
      transition: transform 0.15s ease, box-shadow 0.15s ease;
    }
    .metric-card:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }
    .metric-label {
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 1px;
      text-transform: uppercase;
      color: var(--text-dim);
      margin-bottom: 6px;
    }
    .metric-value {
      font-family: var(--font-mono);
      font-size: 22px;
      font-weight: 800;
    }
    .metric-sub {
      font-size: 11px;
      color: var(--text-dim);
      margin-top: 2px;
    }
    .mv-red    { color: var(--red); }
    .mv-amber  { color: var(--amber); }
    .mv-yellow { color: var(--yellow); }
    .mv-green  { color: var(--green); }
    .mv-blue   { color: var(--blue); }

    /* ── Phase timeline ────────────────────────────────────── */
    .phase-timeline {
      display: grid;
      grid-template-columns: repeat(6, 1fr);
      gap: 8px;
      margin-bottom: 32px;
    }
    .phase-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 16px 14px;
      text-align: center;
      cursor: pointer;
      transition: border-color 0.2s, background 0.2s, transform 0.1s, box-shadow 0.15s ease;
      position: relative;
      box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    }
    .phase-card:hover:not(.phase-locked) {
      border-color: var(--border-bright);
      background: var(--bg-card-hover);
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(0,0,0,0.10);
    }
    .phase-card:focus {
      outline: 2px solid var(--red);
      outline-offset: 2px;
    }
    .phase-card.phase-complete {
      border-color: rgba(0,232,122,0.25);
    }
    .phase-card.phase-active {
      border-color: rgba(249,115,22,0.35);
    }
    .phase-card.phase-locked {
      opacity: 0.4;
      cursor: default;
    }
    .phase-number {
      font-family: var(--font-mono);
      font-size: 9px;
      color: var(--text-dim);
      letter-spacing: 1px;
      margin-bottom: 6px;
    }
    .phase-icon {
      font-size: 22px;
      margin-bottom: 8px;
    }
    .phase-name {
      font-size: 12px;
      font-weight: 700;
      margin-bottom: 4px;
    }
    .phase-status-tag {
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      padding: 2px 8px;
      border-radius: 10px;
      display: inline-block;
    }
    .pst-complete {
      background: rgba(0,232,122,0.12);
      color: var(--green);
    }
    .pst-active {
      background: rgba(249,115,22,0.12);
      color: var(--amber);
    }
    .pst-planned {
      background: rgba(255,255,255,0.04);
      color: var(--text-dim);
    }

    /* ── Activity feed ─────────────────────────────────────── */
    .feed-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 24px;
      margin-bottom: 32px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
    .feed-card h3 {
      font-size: 14px;
      font-weight: 700;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      color: var(--text-dim);
      margin-bottom: 16px;
    }
    .feed-item {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      padding: 10px 0;
      border-bottom: 1px solid var(--border);
      font-size: 14px;
    }
    .feed-item:last-child { border-bottom: none; }
    .feed-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      margin-top: 6px;
      flex-shrink: 0;
    }
    .fd-red    { background: var(--red); }
    .fd-amber  { background: var(--amber); }
    .fd-green  { background: var(--green); }
    .fd-blue   { background: var(--blue); }
    .feed-time {
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--text-dim);
      min-width: 120px;
      flex-shrink: 0;
    }
    .feed-text {
      color: var(--text-mid);
    }
    .feed-text strong { color: var(--text); }

    /* ── Findings table ────────────────────────────────────── */
    .findings-section {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 24px;
      margin-bottom: 32px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
    .findings-section h3 {
      font-size: 14px;
      font-weight: 700;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      color: var(--text-dim);
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .findings-count {
      font-size: 11px;
      padding: 2px 8px;
      border-radius: 10px;
      background: rgba(170,3,3,0.12);
      color: var(--red);
    }

    .finding-row {
      display: grid;
      grid-template-columns: 60px 1fr auto;
      gap: 14px;
      align-items: start;
      padding: 14px 0;
      border-bottom: 1px solid var(--border);
    }
    .finding-row:last-child { border-bottom: none; }

    .finding-sev {
      text-align: center;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      padding: 3px 0;
      border-radius: 4px;
      margin-top: 2px;
    }
    .sev-critical { background: rgba(255,59,59,0.15); color: var(--red); border: 1px solid rgba(255,59,59,0.25); }
    .sev-high     { background: rgba(249,115,22,0.15); color: var(--amber); border: 1px solid rgba(249,115,22,0.25); }
    .sev-medium   { background: rgba(234,179,8,0.15); color: var(--yellow); border: 1px solid rgba(234,179,8,0.25); }
    .sev-low      { background: rgba(59,130,246,0.15); color: var(--blue); border: 1px solid rgba(59,130,246,0.25); }
    .sev-info     { background: rgba(255,255,255,0.05); color: var(--text-dim); border: 1px solid var(--border); }

    .finding-cvss {
      margin-top: 6px;
      text-align: center;
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 600;
      color: var(--text-mid);
    }
    .finding-cvss-label {
      display: block;
      font-size: 8px;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      color: var(--text-dim);
      font-weight: 500;
    }

    /* ── Evidence attachments (read-only) ── */
    .finding-evi {
      margin-top: 10px;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .finding-evi-label {
      font-size: 9px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--text-dim);
      font-weight: 600;
    }
    .finding-evi-list {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .finding-evi-item {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 3px 8px;
      background: rgba(255,255,255,0.04);
      border: 1px solid var(--border);
      border-radius: 3px;
      font-size: 10px;
      color: var(--text-mid);
      cursor: pointer;
      font-family: var(--font-mono);
    }
    .finding-evi-item:hover {
      border-color: var(--blue);
      color: var(--text);
    }

    /* ── Interactive Findings Overview (Dashboard) ─────── */
    .findings-overview { margin-top: 32px; }

    .fo-filters {
      display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px;
    }
    .fo-filter-btn {
      display: flex; align-items: center; gap: 6px;
      padding: 6px 14px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      color: var(--text-mid);
      font-family: var(--font-sans);
      font-size: 12px; font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .fo-filter-btn:hover { border-color: var(--border-bright); background: var(--bg-card-hover); }
    .fo-filter-btn:focus { outline: 2px solid var(--red); outline-offset: 2px; }
    .fo-filter-btn.active { color: var(--text); }
    .fo-filter-btn.active[data-sev="all"]      { border-color: var(--green); background: rgba(0,232,122,0.08); }
    .fo-filter-btn.active[data-sev="critical"]  { border-color: var(--red); background: rgba(170,3,3,0.12); color: #ff5c5c; }
    .fo-filter-btn.active[data-sev="high"]      { border-color: var(--amber); background: rgba(249,115,22,0.12); color: var(--amber); }
    .fo-filter-btn.active[data-sev="medium"]    { border-color: var(--yellow); background: rgba(234,179,8,0.10); color: var(--yellow); }
    .fo-filter-btn.active[data-sev="low"]       { border-color: var(--blue); background: rgba(59,130,246,0.10); color: var(--blue); }

    .fo-badge {
      font-size: 11px; font-weight: 700;
      padding: 1px 7px; border-radius: 10px;
      background: rgba(255,255,255,0.06);
    }
    .fo-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 12px;
    }
    .fo-header h3 { margin: 0; }
    .fo-export-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 6px 12px;
      border: 1px solid var(--border-bright);
      background: var(--bg-card);
      border-radius: 6px;
      color: var(--text-mid);
      font-family: var(--font-sans);
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.3px;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .fo-export-btn:hover {
      border-color: var(--red);
      color: var(--text);
      background: var(--bg-card-hover);
    }
    .fo-export-btn:focus { outline: 2px solid var(--red); outline-offset: 2px; }
    .fo-export-icon { font-size: 13px; }
    .fo-empty {
      padding: 24px 16px;
      text-align: center;
      color: var(--text-dim);
      font-size: 13px;
      font-style: italic;
      border: 1px dashed var(--border);
      border-radius: 8px;
      text-transform: capitalize;
    }

    .fo-list { display: flex; flex-direction: column; gap: 4px; }

    .fo-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
      transition: border-color 0.2s ease;
    }
    .fo-card:hover { border-color: var(--border-bright); }

    .fo-card-header {
      display: flex; align-items: center; gap: 10px;
      padding: 10px 14px;
      cursor: pointer;
      user-select: none;
    }
    .fo-card-header:hover { background: var(--bg-card-hover); }

    .fo-chevron {
      font-size: 11px; color: var(--text-dim);
      transition: transform 0.2s ease;
      flex-shrink: 0; width: 16px; text-align: center;
    }
    .fo-card.open .fo-chevron { transform: rotate(90deg); }

    .fo-sev-pill {
      font-size: 10px; font-weight: 700;
      letter-spacing: 0.5px; text-transform: uppercase;
      padding: 3px 10px; border-radius: 4px;
      flex-shrink: 0;
    }

    .fo-card-title {
      flex: 1; font-size: 13px; font-weight: 600; color: var(--text);
    }

    .fo-phase-tag {
      font-size: 10px; font-weight: 600;
      letter-spacing: 0.5px; text-transform: uppercase;
      color: var(--text-dim);
      padding: 2px 8px;
      background: rgba(255,255,255,0.04);
      border-radius: 4px;
      flex-shrink: 0;
    }

    .fo-card-body {
      display: none;
      padding: 0 14px 12px 50px;
    }
    .fo-card.open .fo-card-body { display: block; }

    .fo-what, .fo-why, .fo-fix {
      margin-bottom: 8px;
    }
    .fo-what:last-child, .fo-why:last-child, .fo-fix:last-child { margin-bottom: 0; }
    .fo-what h4, .fo-why h4, .fo-fix h4 {
      font-size: 10px; font-weight: 700;
      letter-spacing: 0.5px; text-transform: uppercase;
      color: var(--text-dim); margin-bottom: 2px;
    }
    .fo-what p, .fo-why p, .fo-fix p {
      font-size: 12px; line-height: 1.55; color: var(--text-mid);
    }

    .fo-tag-row {
      display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px;
    }
    .fo-itag {
      font-size: 10px; font-weight: 600;
      padding: 2px 8px; border-radius: 4px;
      background: rgba(255,255,255,0.04);
      color: var(--text-dim);
      border: 1px solid var(--border);
    }

    .finding-body strong {
      display: block;
      font-size: 14px;
      margin-bottom: 4px;
    }
    .finding-body p {
      font-size: 13px;
      color: var(--text-mid);
      line-height: 1.6;
    }
    .finding-body.clamped p {
      display: -webkit-box;
      -webkit-line-clamp: 4;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .finding-body .clamp-toggle {
      background: none;
      border: none;
      color: var(--amber);
      cursor: pointer;
      font-size: 11px;
      padding: 4px 0 0;
      font-family: var(--font-sans);
    }
    .finding-body .clamp-toggle:hover { text-decoration: underline; }
    .finding-evidence {
      margin-top: 8px;
      position: relative;
    }
    .evidence-block {
      padding: 10px 12px;
      background: var(--bg-surface);
      border: 1px solid var(--border);
      border-radius: 6px;
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--text-mid);
      line-height: 1.6;
    }
    .evidence-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 6px;
      font-size: 11px;
      font-weight: 600;
      color: var(--text-dim);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    .evidence-toggle {
      background: none;
      border: none;
      color: var(--text-dim);
      cursor: pointer;
      padding: 2px 6px;
      border-radius: 3px;
      font-family: var(--font-mono);
      font-size: 10px;
      transition: background-color 0.15s;
    }
    .evidence-toggle:hover {
      background: rgba(255,255,255,0.1);
    }
    .evidence-content {
      white-space: pre-wrap;
      word-break: break-all;
      max-height: 120px;
      overflow: hidden;
      position: relative;
      transition: max-height 0.3s ease;
    }
    .evidence-content.expanded {
      max-height: none;
    }
    .evidence-fade {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      height: 40px;
      background: linear-gradient(transparent, var(--bg-surface));
      pointer-events: none;
    }
    .evidence-content.expanded + .evidence-fade {
      display: none;
    }

    /* ── Contextual Tooltips ──────────────────────────────── */
    .tooltip {
      position: relative;
      display: inline;
      cursor: help;
      border-bottom: 1px dotted var(--text-dim);
    }
    .tooltip-content {
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      margin-bottom: 8px;
      padding: 8px 12px;
      background: var(--bg-surface);
      border: 1px solid var(--border-bright);
      border-radius: var(--radius);
      box-shadow: 0 8px 24px rgba(0,0,0,0.2);
      font-size: 12px;
      line-height: 1.5;
      color: var(--text);
      white-space: nowrap;
      max-width: 300px;
      white-space: normal;
      z-index: 1000;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.15s ease;
    }
    .tooltip:hover .tooltip-content {
      opacity: 1;
      pointer-events: auto;
    }
    .tooltip-content::after {
      content: '';
      position: absolute;
      top: 100%;
      left: 50%;
      transform: translateX(-50%);
      border: 5px solid transparent;
      border-top-color: var(--border-bright);
    }

    /* ── Attack Timeline ──────────────────────────────────── */
    .attack-timeline {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 24px;
      margin-bottom: 32px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
    .timeline-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 20px;
    }
    .timeline-header h3 {
      font-size: 14px;
      font-weight: 700;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      color: var(--text-dim);
    }
    .timeline-legend {
      display: flex;
      gap: 16px;
      font-size: 11px;
      color: var(--text-dim);
    }
    .legend-item {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .legend-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
    }
    .timeline-container {
      position: relative;
      overflow-x: auto;
      padding: 20px 0;
    }
    .timeline-track {
      position: relative;
      height: 80px;
      min-width: 800px;
      background: linear-gradient(to right,
        rgba(0,232,122,0.1) 0%,
        rgba(249,115,22,0.1) 50%,
        rgba(170,3,3,0.1) 100%);
      border-radius: 6px;
      border: 1px solid var(--border);
    }
    .timeline-line {
      position: absolute;
      top: 50%;
      left: 0;
      right: 0;
      height: 2px;
      background: linear-gradient(to right, var(--green), var(--amber), var(--red));
      transform: translateY(-1px);
    }
    .timeline-event {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .timeline-event:hover {
      transform: translateY(-50%) scale(1.1);
      z-index: 10;
    }
    .timeline-dot {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      border: 2px solid var(--bg);
      position: relative;
      box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
    .timeline-label {
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      margin-bottom: 8px;
      font-size: 10px;
      font-weight: 600;
      color: var(--text-mid, #b0b0b0);
      white-space: nowrap;
      opacity: 0;
      transition: opacity 0.2s ease;
    }
    .timeline-event:hover .timeline-label {
      opacity: 1;
    }
    .timeline-date {
      position: absolute;
      top: 100%;
      left: 50%;
      transform: translateX(-50%);
      margin-top: 6px;
      font-size: 10px;
      font-family: var(--font-mono);
      color: var(--text-mid, #b0b0b0);
      white-space: nowrap;
      text-align: center;
      line-height: 1.4;
    }
    .timeline-event.replay-active { z-index: 20; }
    .timeline-event.replay-active .timeline-dot {
      transform: scale(1.6);
      box-shadow: 0 0 0 4px rgba(170,3,3,0.25), 0 0 16px 4px rgba(170,3,3,0.5);
    }
    .timeline-event.replay-active .timeline-label { opacity: 1; color: var(--text); }

    /* ── Attack Replay Controls ───────────────────────────── */
    .replay-controls {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 16px;
      padding: 10px 14px;
      background: var(--bg-surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
    }
    .replay-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 32px;
      height: 28px;
      padding: 0 10px;
      border: 1px solid var(--border-bright);
      border-radius: 4px;
      background: var(--bg-card);
      color: var(--text-mid);
      font-family: var(--font-sans);
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s ease;
    }
    .replay-btn:hover:not(:disabled) {
      border-color: var(--red);
      color: var(--text);
      background: var(--bg-card-hover);
    }
    .replay-btn:focus { outline: 2px solid var(--red); outline-offset: 2px; }
    .replay-btn:disabled { opacity: 0.4; cursor: not-allowed; }
    .replay-btn.replay-play { min-width: 72px; }
    .replay-btn.replay-play.is-playing { border-color: var(--red); color: var(--text); }
    .replay-counter {
      margin-left: auto;
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--text-dim);
    }
    .replay-detail {
      margin-top: 32px;
      padding: 14px 16px;
      background: var(--bg-surface);
      border: 1px solid var(--border);
      border-left: 3px solid var(--red);
      border-radius: var(--radius);
    }
    .replay-detail-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 6px;
      font-size: 10px;
      font-family: var(--font-mono);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--text-dim);
    }
    .replay-detail-phase { color: var(--red); font-weight: 700; }
    .replay-detail-title {
      font-size: 14px;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 4px;
    }
    .replay-detail-desc {
      font-size: 12px;
      color: var(--text-mid);
      line-height: 1.5;
    }

    /* ── Network Diagram ──────────────────────────────────── */
    .network-container {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 24px;
      margin-bottom: 32px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
      position: relative;
      overflow: hidden;
    }
    .network-canvas {
      width: 100%;
      height: 500px;
      background: var(--bg-surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      position: relative;
      overflow: hidden;
    }
    .network-node {
      position: absolute;
      width: 90px;
      height: 72px;
      border-radius: 8px;
      border: 2px solid;
      background: var(--bg-card);
      display: flex;
      flex-direction: column;
      align-items: center;
      padding-top: 10px;
      cursor: pointer;
      transition: all 0.2s ease;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      overflow: hidden;
    }
    .network-node:hover {
      transform: scale(1.05);
      box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    }
    .network-node.compromised {
      border-color: var(--red);
      background: rgba(170,3,3,0.1);
    }
    .network-node.c2-active {
      border-color: var(--amber);
      background: rgba(249,115,22,0.1);
      animation: pulse 2s ease-in-out infinite;
    }
    .network-node.clean {
      border-color: var(--border-bright);
    }
    .network-node.pruned {
      border-color: var(--text-dim, #666);
      background: rgba(120,120,120,0.08);
      opacity: 0.6;
    }
    .node-icon {
      font-size: 24px;
      line-height: 28px;
      height: 28px;
      flex-shrink: 0;
    }
    .node-name {
      font-size: 9px;
      font-weight: 600;
      text-align: center;
      color: var(--text);
      margin-top: 4px;
      line-height: 1.2;
      max-width: 84px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .network-svg {
      position: absolute;
      top: 0; left: 0;
      width: 100%; height: 100%;
      pointer-events: none;
      z-index: 1;
    }
    .network-svg line {
      stroke-width: 2;
      stroke-linecap: round;
    }
    .network-svg line.c2 {
      stroke: var(--amber);
      stroke-width: 2.5;
      filter: drop-shadow(0 0 3px rgba(249,115,22,0.4));
    }
    .network-svg line.c2-dead {
      stroke: var(--text-dim, #666);
      stroke-width: 1.5;
      stroke-dasharray: 6 4;
      opacity: 0.5;
    }
    .network-svg line.lateral {
      stroke: var(--red);
      stroke-width: 2;
    }
    .network-svg line.persist {
      stroke: var(--amber);
      stroke-width: 1.5;
      stroke-dasharray: 4 3;
    }
    .network-legend {
      position: absolute;
      top: 16px;
      right: 16px;
      background: var(--bg-surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 12px;
      font-size: 11px;
    }
    .legend-row {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 6px;
    }
    .legend-row:last-child {
      margin-bottom: 0;
    }

    /* ── Node Details Panel ──────────────────────────────── */
    .node-details-empty {
      color: var(--text-dim);
      font-size: 13px;
      font-style: italic;
      padding: 12px 0;
    }
    .node-details-grid {
      display: grid;
      grid-template-columns: 140px 1fr;
      gap: 10px 16px;
      font-size: 13px;
      margin-bottom: 16px;
    }
    .node-details-grid .nd-label {
      color: var(--text-dim);
      font-family: var(--font-mono);
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      padding-top: 2px;
    }
    .node-details-grid .nd-value {
      color: var(--text-bright);
      word-break: break-word;
    }
    .node-details-grid .nd-value.status-critical {
      color: var(--red);
      font-weight: 600;
    }
    .node-details-grid .nd-value.status-clean {
      color: var(--text-mid);
    }
    .node-details-section {
      border-top: 1px solid var(--border);
      padding-top: 14px;
      margin-top: 14px;
    }
    .node-details-section-title {
      font-family: var(--font-mono);
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--text-dim);
      margin-bottom: 8px;
    }
    .node-details-section p {
      font-size: 13px;
      color: var(--text-bright);
      line-height: 1.6;
      margin: 0;
    }
    .node-details-artifacts {
      list-style: none;
      padding: 0;
      margin: 0;
    }
    .node-details-artifacts li {
      font-size: 13px;
      color: var(--text-bright);
      padding: 6px 0;
      padding-left: 16px;
      position: relative;
    }
    .node-details-artifacts li::before {
      content: '▸';
      position: absolute;
      left: 0;
      color: var(--amber);
    }

    /* ── Guided Tour ──────────────────────────────────────── */
    .tour-overlay {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: transparent;
      z-index: 10000;
      display: none;
    }
    .tour-spotlight {
      position: absolute;
      border-radius: var(--radius);
      box-shadow:
        0 0 0 9999px rgba(0,0,0,0.75),
        0 0 0 3px rgba(170,3,3,0.9),
        0 0 25px 3px rgba(170,3,3,0.7);
      z-index: 10001;
      transition:
        left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        top 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        height 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      animation: tourPulse 2s infinite;
      background: rgba(255,255,255,0);
      border: 0px solid transparent;
    }
    @keyframes tourPulse {
      0%, 100% {
        box-shadow:
          0 0 0 9999px rgba(0,0,0,0.75),
          0 0 0 3px rgba(170,3,3,0.9),
          0 0 25px 3px rgba(170,3,3,0.7);
      }
      50% {
        box-shadow:
          0 0 0 9999px rgba(0,0,0,0.75),
          0 0 0 5px rgba(170,3,3,1.0),
          0 0 35px 5px rgba(170,3,3,0.9);
      }
    }
    .tour-tooltip {
      position: absolute;
      background: var(--bg-card);
      border: 2px solid var(--red);
      border-radius: var(--radius-lg);
      padding: 24px;
      max-width: 380px;
      min-width: 280px;
      box-shadow:
        0 12px 48px rgba(0,0,0,0.5),
        0 0 0 1px rgba(170,3,3,0.2);
      z-index: 10002;
      backdrop-filter: blur(8px);
      transition:
        left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        top 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    .tour-tooltip h4 {
      font-size: 18px;
      font-weight: 700;
      margin-bottom: 10px;
      color: var(--text);
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .tour-tooltip h4::before {
      content: "💡";
      font-size: 16px;
    }
    .tour-tooltip p {
      font-size: 15px;
      line-height: 1.6;
      color: var(--text-mid);
      margin-bottom: 20px;
    }
    .tour-controls {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 8px;
      padding-top: 16px;
      border-top: 1px solid var(--border);
    }
    .tour-progress {
      font-size: 12px;
      font-weight: 600;
      color: var(--red);
      padding: 4px 8px;
      background: rgba(170,3,3,0.1);
      border-radius: var(--radius);
    }
    .tour-buttons {
      display: flex;
      gap: 10px;
    }
    .tour-btn {
      padding: 8px 16px;
      border-radius: var(--radius);
      border: 1px solid var(--border);
      background: var(--bg-surface);
      color: var(--text);
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    .tour-btn:hover {
      background: var(--bg-card-hover);
      border-color: var(--border-bright);
      transform: translateY(-1px);
    }
    .tour-btn.primary {
      background: var(--red);
      border-color: var(--red);
      color: white;
      box-shadow: 0 2px 8px rgba(170,3,3,0.2);
    }
    .tour-btn.primary:hover {
      background: var(--red-dim);
      box-shadow: 0 4px 12px rgba(170,3,3,0.3);
      transform: translateY(-2px);
    }
    .finding-tag {
      font-size: 11px;
      font-family: var(--font-mono);
      color: var(--text-dim);
      white-space: nowrap;
    }

    /* ── Data grid ─────────────────────────────────────────── */
    .data-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
      gap: 10px;
      margin-bottom: 16px;
    }
    .data-cell {
      padding: 12px 16px;
      background: var(--bg-surface);
      border: 1px solid var(--border);
      border-radius: 6px;
      box-shadow: 0 1px 3px rgba(0,0,0,0.03);
      transition: transform 0.15s ease, box-shadow 0.15s ease;
    }
    .data-cell:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 8px rgba(0,0,0,0.06);
    }
    .data-cell-label {
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.8px;
      text-transform: uppercase;
      color: var(--text-dim);
      margin-bottom: 4px;
    }
    .data-cell-value {
      font-family: var(--font-mono);
      font-size: 14px;
      word-break: break-all;
    }
    .dcv-red   { color: var(--red); }
    .dcv-green { color: var(--green); }
    .dcv-amber { color: var(--amber); }

    /* ── Tag list ──────────────────────────────────────────── */
    .tag-list {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .tag-item {
      font-family: var(--font-mono);
      font-size: 12px;
      padding: 4px 10px;
      background: var(--bg-surface);
      border: 1px solid var(--border-bright);
      border-radius: 4px;
      color: var(--text-mid);
    }
    .tag-item.tech {
      background: rgba(59,130,246,0.08);
      border-color: rgba(59,130,246,0.2);
      color: var(--blue);
    }

    /* ── Phishing email artifact ────────────────────────────── */
    .email-artifact {
      background: var(--bg-surface);
      border: 1px solid var(--border-bright);
      border-radius: var(--radius);
      overflow: hidden;
      margin-bottom: 16px;
    }
    .email-artifact-bar {
      background: var(--bg-card);
      border-bottom: 1px solid var(--border);
      padding: 10px 16px;
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 12px;
      color: var(--text-dim);
      font-family: var(--font-mono);
    }
    .email-artifact-body {
      padding: 20px 24px;
    }
    .email-header-grid {
      display: grid;
      grid-template-columns: 60px 1fr;
      gap: 4px 12px;
      font-size: 12px;
      margin-bottom: 16px;
      padding-bottom: 14px;
      border-bottom: 1px solid var(--border);
    }
    .email-h-label { color: var(--text-dim); font-weight: 600; }
    .email-h-value { color: var(--text); word-break: break-all; }
    .email-content {
      font-size: 13px;
      line-height: 1.8;
      color: var(--text);
    }
    .email-content p { margin-bottom: 10px; }
    .email-phish-btn {
      display: inline-block;
      padding: 10px 24px;
      background: var(--blue);
      color: #fff;
      font-weight: 600;
      font-size: 13px;
      border-radius: 4px;
      margin: 6px 0 12px;
    }
    .spoofed-badge {
      display: inline-block;
      background: rgba(170,3,3,0.1);
      border: 1px solid rgba(170,3,3,0.3);
      color: var(--red);
      font-size: 9px;
      font-weight: 700;
      letter-spacing: 0.8px;
      text-transform: uppercase;
      padding: 1px 6px;
      border-radius: 3px;
      margin-left: 6px;
    }

    /* ── Campaign stats ────────────────────────────────────── */
    .campaign-stats {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
      gap: 10px;
      margin-bottom: 20px;
    }
    .camp-stat {
      background: var(--bg-surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 16px;
      text-align: center;
      box-shadow: 0 1px 3px rgba(0,0,0,0.03);
      transition: transform 0.15s ease, box-shadow 0.15s ease;
    }
    .camp-stat:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 8px rgba(0,0,0,0.06);
    }
    .camp-stat-val {
      font-family: var(--font-mono);
      font-size: 28px;
      font-weight: 800;
    }
    .camp-stat-label {
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.8px;
      text-transform: uppercase;
      color: var(--text-dim);
      margin-top: 4px;
    }

    /* ── Timeline ──────────────────────────────────────────── */
    .timeline {
      position: relative;
      padding-left: 24px;
      margin-bottom: 20px;
    }
    .timeline::before {
      content: '';
      position: absolute;
      left: 7px;
      top: 4px;
      bottom: 4px;
      width: 2px;
      background: var(--border);
    }
    .tl-event {
      position: relative;
      padding: 8px 0 16px 16px;
    }
    .tl-event::before {
      content: '';
      position: absolute;
      left: -20px;
      top: 12px;
      width: 10px;
      height: 10px;
      border-radius: 50%;
      border: 2px solid var(--border-bright);
      background: var(--bg);
    }
    .tl-event.tl-critical::before { border-color: var(--red); background: var(--red); }
    .tl-event.tl-success::before  { border-color: var(--green); background: var(--green); }
    .tl-event.tl-warn::before     { border-color: var(--amber); background: var(--amber); }
    .tl-event.tl-info::before     { border-color: var(--blue); background: var(--blue); }
    .tl-time {
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--text-dim);
      margin-bottom: 2px;
    }
    .tl-title {
      font-size: 14px;
      font-weight: 600;
    }
    .tl-desc {
      font-size: 13px;
      color: var(--text-mid);
      margin-top: 2px;
      line-height: 1.55;
    }

    /* ── C2 Session cards ───────────────────────────────────── */
    .c2-card {
      background: var(--bg-surface);
      border: 1px solid rgba(170,3,3,0.25);
      border-radius: var(--radius);
      padding: 18px 20px;
      margin-bottom: 12px;
    }
    .c2-card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
    }
    .c2-session-id {
      font-family: var(--font-mono);
      font-size: 14px;
      font-weight: 700;
      color: var(--red);
    }
    .c2-status {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.8px;
      text-transform: uppercase;
      padding: 3px 10px;
      border-radius: 10px;
      background: rgba(0,232,122,0.1);
      color: var(--green);
      border: 1px solid rgba(0,232,122,0.25);
    }
    .c2-status::before {
      content: '';
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: currentColor;
      animation: pulse 1.5s ease-in-out infinite;
    }
    .c2-status.idle {
      background: rgba(249,115,22,0.1);
      color: var(--amber);
      border-color: rgba(249,115,22,0.25);
    }
    .c2-status.idle::before { animation: pulse 3s ease-in-out infinite; }
    .c2-status.dead {
      background: rgba(120,120,120,0.1);
      color: var(--text-dim, #888);
      border-color: rgba(120,120,120,0.25);
    }
    .c2-status.dead::before { animation: none; }
    .c2-status.pruned {
      background: rgba(120,120,120,0.1);
      color: var(--text-dim, #888);
      border-color: rgba(120,120,120,0.25);
    }
    .c2-status.pruned::before { animation: none; }
    .c2-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 8px;
    }
    .c2-field {
      font-size: 12px;
    }
    .c2-field-label {
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      color: var(--text-dim);
      margin-bottom: 2px;
    }
    .c2-field-value {
      font-family: var(--font-mono);
      font-size: 13px;
      color: var(--text-mid);
      word-break: break-all;
    }

    /* ── Compact C2 table (dashboard) ─────────────────────── */
    .c2-table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      font-size: 12px;
    }
    .c2-table th {
      font-size: 10px;
      font-weight: 600;
      letter-spacing: 0.8px;
      text-transform: uppercase;
      color: var(--text-dim);
      text-align: left;
      padding: 6px 10px;
      border-bottom: 1px solid var(--border-bright);
    }
    .c2-table td {
      padding: 8px 10px;
      border-bottom: 1px solid var(--border);
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--text-mid);
      vertical-align: top;
      transition: background-color 0.15s ease;
    }
    .c2-table tr:hover td {
      background: rgba(255,255,255,0.02);
    }
    .c2-table tr:last-child td { border-bottom: none; }
    .c2-t-host { color: var(--text); font-weight: 700; }
    .c2-t-ip { color: var(--text-dim); font-size: 11px; }
    .c2-t-status {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 10px;
      font-weight: 700;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      color: var(--green);
    }
    .c2-t-status::before {
      content: '';
      width: 5px;
      height: 5px;
      border-radius: 50%;
      background: var(--green);
      animation: pulse 1.5s ease-in-out infinite;
    }
    .c2-t-exited { color: var(--text-dim); }
    .c2-t-exited::before { background: var(--text-dim); animation: none; }

    /* ── Lateral movement table ───────────────────────────── */
    .lat-table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
    }
    .lat-table th {
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.8px;
      text-transform: uppercase;
      color: var(--text-dim);
      text-align: left;
      padding: 8px 12px;
      border-bottom: 1px solid var(--border-bright);
    }
    .lat-table td {
      padding: 12px 12px;
      border-bottom: 1px solid var(--border);
      font-size: 13px;
      vertical-align: top;
      transition: background-color 0.15s ease;
    }
    .lat-table tr:hover td {
      background: rgba(255,255,255,0.02);
    }
    .lat-table tr:last-child td { border-bottom: none; }
    .lat-host {
      font-family: var(--font-mono);
      font-weight: 700;
      color: var(--text);
      font-size: 13px;
    }
    .lat-ip {
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--text-dim);
    }
    .lat-method {
      color: var(--text-mid);
      font-size: 13px;
    }
    .lat-proto {
      display: inline-block;
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 700;
      color: var(--amber);
      background: rgba(249,115,22,0.1);
      border: 1px solid rgba(249,115,22,0.2);
      padding: 2px 8px;
      border-radius: 10px;
      letter-spacing: 0.5px;
    }

    /* ── Executive Summary ──────────────────────────────────── */
    .exec-section {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 24px 28px;
      margin-bottom: 20px;
    }
    .exec-section h3 {
      font-size: 14px;
      font-weight: 700;
      letter-spacing: 0.3px;
      color: var(--text);
      margin-bottom: 14px;
      padding-bottom: 10px;
      border-bottom: 1px solid var(--border);
    }
    .exec-narrative {
      font-size: 14px;
      color: var(--text-mid);
      line-height: 1.8;
    }
    .exec-narrative p {
      margin-bottom: 12px;
    }
    .exec-narrative strong { color: var(--text); }
    .exec-narrative em { color: var(--red); font-style: normal; font-weight: 600; }

    .exec-rec-list {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .exec-rec {
      display: flex;
      gap: 14px;
      align-items: flex-start;
    }
    .exec-rec-num {
      flex-shrink: 0;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: rgba(170,3,3,0.12);
      border: 1px solid rgba(170,3,3,0.25);
      color: var(--red);
      font-family: var(--font-mono);
      font-size: 12px;
      font-weight: 700;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .exec-rec-body strong {
      display: block;
      font-size: 14px;
      margin-bottom: 2px;
    }
    .exec-rec-body p {
      font-size: 13px;
      color: var(--text-mid);
      line-height: 1.55;
    }

    .exec-scope-grid {
      display: grid;
      grid-template-columns: 120px 1fr;
      gap: 6px 16px;
      font-size: 13px;
    }
    .exec-scope-label {
      color: var(--text-dim);
      font-weight: 600;
      text-transform: uppercase;
      font-size: 11px;
      letter-spacing: 0.5px;
      padding-top: 2px;
    }
    .exec-scope-value {
      color: var(--text-mid);
    }

    .exec-killchain {
      display: flex;
      gap: 4px;
      margin-bottom: 32px;
      overflow-x: auto;
    }
    .exec-kc-step {
      flex: 1;
      min-width: 90px;
      text-align: center;
      padding: 12px 6px;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--bg-card);
      position: relative;
    }
    .exec-kc-step.kc-done {
      border-color: rgba(0,232,122,0.3);
      background: rgba(0,232,122,0.05);
    }
    .exec-kc-step.kc-active {
      border-color: rgba(249,115,22,0.4);
      background: rgba(249,115,22,0.06);
    }
    .exec-kc-step.kc-pending {
      opacity: 0.35;
      border-style: dashed;
    }
    .exec-kc-num {
      font-family: var(--font-mono);
      font-size: 9px;
      color: var(--text-dim);
      letter-spacing: 1px;
    }
    .exec-kc-name {
      font-size: 11px;
      font-weight: 600;
      margin-top: 4px;
    }
    .exec-kc-done .exec-kc-name { color: var(--green); }
    .exec-kc-active .exec-kc-name { color: var(--amber); }
    .exec-kc-tag {
      font-size: 8px;
      font-weight: 700;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      margin-top: 4px;
      padding: 1px 6px;
      border-radius: 8px;
      display: inline-block;
    }
    .kc-done .exec-kc-tag { background: rgba(0,232,122,0.12); color: var(--green); }
    .kc-active .exec-kc-tag { background: rgba(249,115,22,0.12); color: var(--amber); }
    .kc-pending .exec-kc-tag { background: rgba(255,255,255,0.04); color: var(--text-dim); }

    .exec-top-findings {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 24px;
      margin-bottom: 24px;
    }
    .exec-top-findings h3 {
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.5px;
      text-transform: uppercase;
      color: var(--text-dim);
      margin-bottom: 16px;
    }

    /* ── MITRE ATT&CK Matrix ──────────────────────────────── */
    .mitre-matrix {
      display: grid;
      gap: 8px;
      overflow-x: auto;
      padding-bottom: 12px;
      margin-bottom: 24px;
    }
    .mitre-col {
      min-width: 0;
      display: flex;
      flex-direction: column;
    }
    .mitre-tactic-header {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 6px 6px 0 0;
      padding: 8px 10px;
      text-align: center;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .mitre-tactic-id { display: none; } /* removed — was redundant with name */
    .mitre-tactic-name {
      font-size: 12px;
      font-weight: 700;
      color: var(--text);
      line-height: 1.2;
      text-align: left;
      flex: 1;
      min-width: 0;
    }
    .mitre-count-pill {
      flex-shrink: 0;
      min-width: 22px;
      padding: 1px 7px;
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 700;
      color: var(--text-dim);
      background: rgba(255,255,255,0.04);
      border: 1px solid var(--border);
      border-radius: 999px;
      line-height: 1.5;
      text-align: center;
    }
    .mitre-tactic-header.has-techniques .mitre-count-pill {
      color: var(--red);
      background: rgba(170,3,3,0.12);
      border-color: rgba(170,3,3,0.35);
    }
    .mitre-tactic-header:not(.has-techniques) {
      opacity: 0.55;
    }
    .mitre-tech-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
      padding-top: 6px;
    }
    .mitre-tech-card {
      background: var(--bg-card);
      border: 1px solid rgba(170,3,3,0.2);
      border-radius: 6px;
      padding: 12px 14px;
      cursor: default;
      transition: border-color 0.2s, background 0.2s;
    }
    .mitre-tech-card:hover {
      border-color: rgba(170,3,3,0.4);
      background: var(--bg-card-hover);
    }
    .mitre-tech-card-id {
      font-family: var(--font-mono);
      font-size: 12px;
      color: var(--amber);
      font-weight: 700;
    }
    .mitre-tech-card-name {
      font-size: 13px;
      color: var(--text);
      line-height: 1.4;
      margin-top: 4px;
    }
    .mitre-tech-card-phase {
      font-size: 11px;
      color: var(--text-dim);
      font-family: var(--font-mono);
      margin-top: 6px;
    }
    .mitre-empty {
      text-align: center;
      padding: 16px 8px;
      font-size: 12px;
      color: var(--text-dim);
      font-style: italic;
    }
    .mitre-tech-card {
      cursor: pointer;
    }
    .mitre-tech-card.selected {
      border-color: var(--red);
      background: rgba(170,3,3,0.1);
    }
    .mitre-detail-panel {
      background: var(--bg-surface);
      border: 1px solid var(--border-bright);
      border-radius: var(--radius);
      padding: 20px 24px;
      margin-top: 16px;
    }
    .mitre-detail-panel.hidden { display: none; }
    .mitre-detail-id {
      font-family: var(--font-mono);
      font-size: 13px;
      font-weight: 700;
      color: var(--amber);
      margin-bottom: 4px;
    }
    .mitre-detail-name {
      font-size: 16px;
      font-weight: 700;
      margin-bottom: 8px;
    }
    .mitre-detail-phase {
      font-family: var(--font-mono);
      font-size: 11px;
      color: var(--text-dim);
      margin-bottom: 12px;
    }
    .mitre-detail-desc {
      font-size: 14px;
      color: var(--text-mid);
      line-height: 1.7;
      margin-bottom: 12px;
    }

    /* ── Technique card (no severity badge) ───────────────── */
    .technique-row {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 14px;
      align-items: start;
      padding: 14px 0;
      border-bottom: 1px solid var(--border);
    }
    .technique-row:last-child { border-bottom: none; }
    .technique-id {
      font-family: var(--font-mono);
      font-size: 12px;
      font-weight: 700;
      color: var(--amber);
      margin-bottom: 2px;
    }

    /* ── Evidence blocks ────────────────────────────────────── */

    /* ── Engagement progress bar ───────────────────────────── */
    .eng-progress {
      width: 100%;
      margin-top: 12px;
    }
    .eng-progress-bar {
      width: 100%;
      height: 4px;
      background: var(--border);
      border-radius: 2px;
      overflow: hidden;
    }
    .eng-progress-fill {
      height: 100%;
      border-radius: 2px;
      background: linear-gradient(90deg, var(--green), var(--amber));
      transition: width 1s ease-out;
    }
    .eng-progress-label {
      display: flex;
      justify-content: space-between;
      font-size: 10px;
      font-family: var(--font-mono);
      color: var(--text-dim);
      margin-top: 4px;
    }

    /* ── Mobile sidebar toggle ─────────────────────────────── */
    .mobile-toggle {
      display: none;
      position: fixed;
      top: 12px;
      left: 12px;
      z-index: 200;
      width: 40px;
      height: 40px;
      border-radius: var(--radius);
      background: var(--bg-card);
      border: 1px solid var(--border-bright);
      color: var(--text);
      font-size: 20px;
      cursor: pointer;
      align-items: center;
      justify-content: center;
    }
    .sidebar-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.6);
      z-index: 149;
    }

    /* ── Animations ────────────────────────────────────────── */
    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50%       { opacity: 0.4; }
    }
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(8px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    .fade-in { animation: fadeIn 0.3s ease forwards; }

    /* ── Scrollbar ─────────────────────────────────────────── */
    ::-webkit-scrollbar { width: 5px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--border-bright); border-radius: 3px; }

    /* ── Responsive ────────────────────────────────────────── */
    @media (max-width: 900px) {
      .mobile-toggle { display: flex; }
      .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 150;
        transition: left 0.25s ease;
      }
      .sidebar.open { left: 0; }
      .sidebar-overlay.open { display: block; }
      .main { padding: 20px; padding-top: 60px; }
      .phase-timeline { grid-template-columns: repeat(3, 1fr); }
      .engagement-banner { flex-direction: column; align-items: flex-start; }
    }
    @media (max-width: 600px) {
      .phase-timeline { grid-template-columns: repeat(2, 1fr); }
      .finding-row { grid-template-columns: 50px 1fr; }
      .finding-tag { display: none; }
      .metrics-row { grid-template-columns: repeat(2, 1fr); }
      .fo-filters { gap: 4px; }
      .fo-filter-btn { padding: 4px 10px; font-size: 11px; }
      .engagement-banner { padding: 16px 20px; }
      .main { padding: 16px; padding-top: 60px; }
      .fo-card-body { padding: 0 10px 10px 40px; }
      .c2-table { font-size: 11px; }
      .c2-table th, .c2-table td { padding: 6px 8px; }
    }

/* ── Password Change Modal ────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.modal-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px; width: 400px; max-width: 90vw;
}
.modal-card h2 { margin: 0 0 4px; font-size: 20px; color: var(--text); }
.modal-subtitle { color: var(--text-dim); font-size: 13px; margin: 0 0 20px; }
