:root {
  /* Light theme (default) */
  --bg: #f6f8fb;
  --card: #ffffff;
  --muted: #5b6780;
  --text: #0e1320;
  --accent: #4169e1;
  --border: #e6eaf2;
  --tooltip-bg: #ffffff;
}

[data-theme="dark"] {
  --bg: #0b0e13;
  --card: #131821;
  --muted: #a8b3c5;
  --text: #e7edf6;
  --accent: #7aa2ff;
  --border: #1f2633;
  --tooltip-bg: #11161f;
}



[data-theme="dark"] {
  /* remap for dark mode */
  --bs-body-color: var(--text);
}
/* ensure common surfaces inherit the body color */
.list-group-item {
  background-color: var(--card) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}


/* subtitle/muted lines */
.card-subtitle,
.text-muted,
.form-text {
  color: var(--bs-secondary-color) ;
}



    html, body { height: 100%; }
    body {
      background: var(--bg);
      color: var(--text);
      font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    }

    /* Navbar */
    .navbar {
      background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)) , var(--bg);
      border-bottom: 1px solid var(--border);
    }
    .navbar-brand { font-weight: 600; letter-spacing: .2px; }

    /* Cards */
    .card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 16px;
      box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    }
    .card-title { margin-bottom: .75rem; font-weight: 600; }
    .card-subtitle { color: var(--muted); }

    /* Controls */
    .filter-label { font-weight: 600; margin-bottom: .25rem; }
    .slim-select { min-width: 260px; }

    /* Sections */
    .viz-container {
      min-height: 360px;
      border: 1px dashed var(--border);
      border-radius: 12px;
      display: flex; align-items: center; justify-content: center;
      color: var(--muted);
      background: transparent;
    }
    .viz-container svg { width: 100%; height: 100%; }

    /* Tooltips */
    #icicle-tooltip{
      position: absolute;
      z-index: 1050;
      display: none;
      max-width: 320px;
      background: var(--tooltip-bg);
      color: var(--text);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 10px 12px;
      box-shadow: 0 8px 24px rgba(0,0,0,0.3);
      font-size: 13px;
      pointer-events: none;
      word-wrap: break-word;
      overflow-wrap: anywhere;
      white-space: normal;
    }

#vuln-tooltip{
  position: fixed;
  z-index: 9999;
  display: none;
  max-width: 320px;
  background: var(--tooltip-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  font-size: 13px;
  pointer-events: none;
}

    /* Toggle */
    .form-switch .form-check-input {
      width: 3em; height: 1.5em; cursor: pointer;
    }
    .muted {
      color: var(--muted);
    }

    a, .link { color: var(--accent); text-decoration: none; }
    a:hover, .link:hover { text-decoration: underline; }

  html { scroll-behavior: smooth; }
  .nav-link.active { color: var(--accent) !important; }