/* =========================================================================
   Vulnerability-Lookup — "Analyst console" theme
   -------------------------------------------------------------------------
   A token-driven layer on top of Bootstrap 5.3. Wherever possible we steer
   Bootstrap through its own --bs-* custom properties (scoped per
   data-bs-theme) so components stay consistent instead of being overridden
   one selector at a time. Brand colours are preserved:
       slate  #446d80  → chrome, primary actions
       azure  #006FBA  → links, accents, focus
   The signature element is the "signal line": a thin slate→azure seam pinned
   to the top of the page and echoed on nav hover and key card accents.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Design tokens
   ------------------------------------------------------------------------- */
:root {
  /* Brand */
  --vl-slate:        #446d80;
  --vl-slate-600:    #3b5f70;
  --vl-slate-700:    #2f4d5b;
  --vl-azure:        #006FBA;
  --vl-azure-600:    #0a5e9c;
  --vl-azure-700:    #0b4f81;

  /* RGB helpers for translucent fills */
  --vl-slate-rgb:    68, 109, 128;
  --vl-azure-rgb:    0, 111, 186;

  /* Elevation — soft, layered, never heavy */
  --vl-shadow-sm: 0 1px 2px rgba(20, 34, 43, 0.06), 0 1px 3px rgba(20, 34, 43, 0.05);
  --vl-shadow:    0 2px 6px rgba(20, 34, 43, 0.07), 0 6px 18px rgba(20, 34, 43, 0.07);
  --vl-shadow-lg: 0 8px 24px rgba(20, 34, 43, 0.12), 0 2px 8px rgba(20, 34, 43, 0.08);

  /* Type */
  --vl-font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --vl-font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;

  /* Frosted topbar fill (light) */
  --vl-topbar-bg: rgba(255, 255, 255, 0.82);
}

/* Light theme — also the document default */
:root,
[data-bs-theme="light"] {
  color-scheme: light;

  --bs-primary:            #446d80;
  --bs-primary-rgb:        68, 109, 128;
  --bs-link-color:         #006FBA;
  --bs-link-color-rgb:     0, 111, 186;
  --bs-link-hover-color:   #0a5e9c;
  --bs-link-hover-color-rgb: 10, 94, 156;

  --bs-body-bg:            #f5f7f9;
  --bs-body-color:         #1d2b33;
  --bs-secondary-color:    rgba(29, 43, 51, 0.62);
  --bs-emphasis-color:     #14222b;

  --bs-secondary-bg:       #eef1f4;
  --bs-tertiary-bg:        #f0f3f5;
  --bs-secondary-bg-rgb:   238, 241, 244;
  --bs-tertiary-bg-rgb:    240, 243, 245;

  --bs-border-color:             #e0e6ea;
  --bs-border-color-translucent: rgba(20, 34, 43, 0.10);

  --vl-card-bg:            #ffffff;
  --bs-card-bg:            var(--vl-card-bg);
  --bs-card-cap-bg:        transparent;

  /* Radii — slightly softer than Bootstrap defaults */
  --bs-border-radius:    0.6rem;
  --bs-border-radius-sm: 0.4rem;
  --bs-border-radius-lg: 0.85rem;
  --bs-border-radius-xl: 1.1rem;

  --vl-topbar-bg:  rgba(248, 250, 251, 0.85);
  --vl-surface-2:  #ffffff;
}

/* Dark theme — deep slate-ink tinted toward the brand */
[data-bs-theme="dark"] {
  color-scheme: dark;

  --bs-primary:            #6f9bb0;
  --bs-primary-rgb:        111, 155, 176;
  --bs-link-color:         #6fb6ec;
  --bs-link-color-rgb:     111, 182, 236;
  --bs-link-hover-color:   #99ccf3;
  --bs-link-hover-color-rgb: 153, 204, 243;

  --bs-body-bg:            #0e1519;
  --bs-body-color:         #d7e0e6;
  --bs-secondary-color:    rgba(215, 224, 230, 0.62);
  --bs-emphasis-color:     #f3f7f9;

  --bs-secondary-bg:       #16212a;
  --bs-tertiary-bg:        #1a2730;
  --bs-secondary-bg-rgb:   22, 33, 42;
  --bs-tertiary-bg-rgb:    26, 39, 48;

  --bs-border-color:             #273844;
  --bs-border-color-translucent: rgba(255, 255, 255, 0.10);

  --vl-card-bg:            #16212a;
  --bs-card-bg:            var(--vl-card-bg);
  --bs-card-cap-bg:        transparent;

  --vl-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --vl-shadow:    0 2px 8px rgba(0, 0, 0, 0.45);
  --vl-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.55);

  --vl-topbar-bg:  rgba(15, 23, 29, 0.78);
  --vl-surface-2:  #1c2a34;
}

/* -------------------------------------------------------------------------
   2. Base / layout
   ------------------------------------------------------------------------- */
html {
  min-height: 100%;
}

body {
  font-family: var(--vl-font-sans);
  /* Flexbox sticky footer: header / main(grow) / footer stack the page. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1 0 auto;
  padding-block: 0.5rem 2.5rem;
}

/* Wider-than-default content container for the main area. Navbar and footer
   span full width; content stays bounded for readability. */
.container-wide {
  width: 100%;
  max-width: 1600px;
  margin-inline: auto;
  padding-inline: var(--bs-gutter-x, 1.5rem);
}
@media (max-width: 1199.98px) {
  .container-wide { max-width: 100%; }
}

/* Legacy spacer kept for any page still referencing it. */
.content-wrapper { margin-top: 70px; }

::selection {
  background: rgba(var(--vl-azure-rgb), 0.22);
}

/* Slim, themed scrollbars (progressive enhancement). */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--bs-border-color) transparent;
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: var(--bs-border-color);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(var(--vl-slate-rgb), 0.55); }

/* Keep user-inserted markdown images within their container. */
.markdown-description img { max-width: 100%; height: auto; }

/* -------------------------------------------------------------------------
   3. Typography
   ------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-weight: 650;
  letter-spacing: -0.012em;
  color: var(--bs-emphasis-color);
}
h1, .h1 { letter-spacing: -0.02em; }

/* Eyebrow: a small, lettered label used to head sections or group menus.
   Structural — it names a region, it doesn't decorate one. */
.vl-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

/* Monospace identity for code-like data. The vulnerability detail page
   applies the same treatment to its identifiers via a page-local rule. */
code, kbd, samp, pre {
  font-family: var(--vl-font-mono);
}

/* Tabular figures for counters and stats so columns of numbers align. */
.vl-tnum,
.stat-value { font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------------------
   4. Signature: the signal line + sticky frosted topbar
   ------------------------------------------------------------------------- */
.vl-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--vl-topbar-bg);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--bs-border-color-translucent);
  transition: box-shadow 0.2s ease;
}
.vl-topbar.is-scrolled { box-shadow: var(--vl-shadow); }

/* The seam: a living slate→azure gradient pinned to the very top edge. */
.vl-topbar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg,
    var(--vl-slate) 0%, var(--vl-azure) 35%, var(--vl-slate) 70%, var(--vl-azure) 100%);
  background-size: 220% 100%;
  animation: vl-signal-shift 9s linear infinite;
}
@keyframes vl-signal-shift {
  to { background-position: 220% 0; }
}

/* The same seam, used as a left accent on emphasised cards. The detail page's
   primary record card opts in via the .vl-primary-view wrapper, so the accent
   marks the focal card without repeating on every related/list card. */
.vl-card-accent,
.vl-primary-view > .card { position: relative; }
.vl-card-accent::before,
.vl-primary-view > .card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  border-radius: var(--bs-border-radius-lg) 0 0 var(--bs-border-radius-lg);
  background: linear-gradient(180deg, var(--vl-azure), var(--vl-slate));
}

/* -------------------------------------------------------------------------
   5. Navbar
   ------------------------------------------------------------------------- */
.navbar { padding-block: 0.5rem; }

.navbar-brand img#vulnerability-lookup-logo {
  padding: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.navbar-brand:hover img#vulnerability-lookup-logo { transform: translateY(-1px); }

.navbar-nav .nav-link {
  position: relative;
  font-weight: 500;
  color: var(--bs-body-color);
  padding-inline: 0.85rem;
  transition: color 0.15s ease;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus-visible,
.navbar-nav .nav-link.active,
.navbar-nav .show > .nav-link {
  color: var(--vl-azure);
}
[data-bs-theme="dark"] .navbar-nav .nav-link:hover,
[data-bs-theme="dark"] .navbar-nav .nav-link:focus-visible,
[data-bs-theme="dark"] .navbar-nav .nav-link.active,
[data-bs-theme="dark"] .navbar-nav .show > .nav-link {
  color: var(--bs-link-color);
}

/* Hover indicator — a short echo of the signal line under the active item. */
.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.15rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--vl-slate), var(--vl-azure));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s ease;
}
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after,
.navbar-nav .show > .nav-link::after { transform: scaleX(1); }
/* Don't underline the icon-only search / theme toggles. */
.navbar-nav .nav-link.vl-icon-link::after { content: none; }

/* -------------------------------------------------------------------------
   6. Dropdowns
   ------------------------------------------------------------------------- */
.dropdown-menu {
  --bs-dropdown-border-color: var(--bs-border-color-translucent);
  --bs-dropdown-border-radius: var(--bs-border-radius-lg);
  --bs-dropdown-link-hover-bg: rgba(var(--vl-azure-rgb), 0.10);
  --bs-dropdown-link-active-bg: var(--vl-slate);
  padding: 0.4rem;
  box-shadow: var(--vl-shadow-lg);
}
.dropdown-item {
  border-radius: var(--bs-border-radius-sm);
  padding-block: 0.4rem;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.dropdown-item:hover { color: var(--vl-azure); }
[data-bs-theme="dark"] .dropdown-item:hover { color: var(--bs-link-color); }

/* Menu section labels (rendered as .dropdown-item.text-muted) read as eyebrows. */
.dropdown-menu .dropdown-item.text-muted {
  pointer-events: none;
  padding-top: 0.55rem;
}
.dropdown-menu .dropdown-item.text-muted p {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* -------------------------------------------------------------------------
   7. Buttons — brand variants with explicit interaction states
   ------------------------------------------------------------------------- */
.btn {
  --bs-btn-font-weight: 550;
  --bs-btn-border-radius: var(--bs-border-radius);
  transition: background-color 0.15s ease, border-color 0.15s ease,
              color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  --bs-btn-bg: var(--vl-slate);
  --bs-btn-border-color: var(--vl-slate);
  --bs-btn-hover-bg: var(--vl-slate-600);
  --bs-btn-hover-border-color: var(--vl-slate-600);
  --bs-btn-active-bg: var(--vl-slate-700);
  --bs-btn-active-border-color: var(--vl-slate-700);
  --bs-btn-disabled-bg: var(--vl-slate);
  --bs-btn-disabled-border-color: var(--vl-slate);
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-color: #fff;
}
.btn-secondary {
  --bs-btn-bg: var(--vl-azure);
  --bs-btn-border-color: var(--vl-azure);
  --bs-btn-hover-bg: var(--vl-azure-600);
  --bs-btn-hover-border-color: var(--vl-azure-600);
  --bs-btn-active-bg: var(--vl-azure-700);
  --bs-btn-active-border-color: var(--vl-azure-700);
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-color: #fff;
}
.btn-default {
  --bs-btn-bg: var(--vl-azure);
  --bs-btn-border-color: var(--vl-azure);
  --bs-btn-color: #fff;
}
.btn-outline-primary {
  --bs-btn-color: var(--vl-azure);
  --bs-btn-border-color: var(--vl-azure);
  --bs-btn-hover-bg: var(--vl-azure);
  --bs-btn-hover-border-color: var(--vl-azure);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--vl-azure-600);
  --bs-btn-active-border-color: var(--vl-azure-600);
}

/* -------------------------------------------------------------------------
   8. Focus — a single, visible, on-brand focus ring everywhere
   ------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--vl-azure);
  outline-offset: 2px;
}
.btn:focus-visible,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(var(--vl-azure-rgb), 0.30);
  border-color: var(--vl-azure);
}
.form-check-input:checked {
  background-color: var(--vl-azure);
  border-color: var(--vl-azure);
}

/* -------------------------------------------------------------------------
   9. Cards
   ------------------------------------------------------------------------- */
.card {
  /* Bootstrap's own .card rule declares --bs-card-bg: var(--bs-body-bg) on
     the element, which beats the :root token above (a directly-declared
     custom property always wins over an inherited one); without this
     every card would render the page's body background. */
  --bs-card-bg: var(--vl-card-bg);
  --bs-card-border-color: var(--bs-border-color-translucent);
  --bs-card-border-radius: var(--bs-border-radius-lg);
  --bs-card-inner-border-radius: calc(var(--bs-border-radius-lg) - 1px);
  box-shadow: var(--vl-shadow-sm);
}

/* Rounded card with a soft lift on hover. */
.vl-card {
  --bs-card-border-radius: 0.85rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.vl-card:hover { box-shadow: var(--vl-shadow-lg) !important; }

/* Standalone feature tile: visible border and a stronger lift. */
.vl-card-feature {
  height: 100%;
  border: 1px solid var(--bs-border-color);
}
.vl-card-feature:hover { transform: translateY(-4px); }

/* Header that drops the default fill so the icon badge leads. */
.vl-card-header {
  background: transparent;
  border-bottom: 1px solid var(--bs-border-color-translucent);
}

/* Brand-tinted, rounded icon badge used to lead card headers. */
.vl-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(var(--vl-azure-rgb), 0.12);
  color: var(--vl-azure);
  font-size: 1.2rem;
  flex-shrink: 0;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
a.vl-icon-badge:hover {
  background: rgba(var(--vl-azure-rgb), 0.2);
  color: var(--vl-azure);
  transform: translateY(-1px);
}
[data-bs-theme="dark"] .vl-icon-badge { color: var(--bs-link-color); }
.vl-icon-badge-sm {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 1rem;
}

/* Organization list rows — the logo slot, the summary line, and the pills
   listing the organization's products. An organization registered only to
   hold a GNA identifier has no products, so the pill row is simply absent
   and the card ends after its header. */
.vl-org-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  background: var(--bs-body-bg);
}
.vl-org-logo-lg {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: var(--bs-body-bg);
}
/* Prose on the organization page: a comfortable measure rather than the full
   width of the card. */
.vl-org-description { max-width: 80ch; }
/* Facts read as a label/value pair, so the label stays quieter than the value
   it introduces. */
.vl-org-facts dt {
  font-weight: 600;
  color: var(--bs-secondary-color);
}
/* The name is the row's link; the underline only appears on hover so a long
   list of organizations stays quiet. */
.vl-title-link a { text-decoration: none; }
.vl-title-link a:hover,
.vl-title-link a:focus-visible { text-decoration: underline; }
.vl-summary {
  font-size: 0.9rem;
  color: var(--bs-secondary-color);
  max-width: 80ch;
}
/* The name column takes the free space, and carries a basis wide enough that
   a narrow screen wraps the badge and the export action onto their own line
   instead of squeezing the name into one word per line. */
.vl-org-head-main {
  flex: 1 1 16rem;
  min-width: 0;
}
/* Below that basis there is no room for both: the badge and the export action
   take a line of their own rather than crushing the name. */
@media (max-width: 575.98px) {
  .vl-org-head-actions {
    flex: 1 0 100%;
    justify-content: flex-end;
  }
}

.vl-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  background: var(--bs-tertiary-bg);
  font-size: 0.9rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.vl-chip:hover {
  border-color: rgba(var(--vl-azure-rgb), 0.45);
  background: rgba(var(--vl-azure-rgb), 0.08);
}
.vl-chip > a { text-decoration: none; }
.vl-chip > a:hover { text-decoration: underline; }
/* A chip that only names something (a CPE vendor) rather than linking. */
.vl-chip-static:hover {
  border-color: var(--bs-border-color);
  background: var(--bs-tertiary-bg);
}
.vl-chip-action {
  display: inline-flex;
  color: var(--bs-secondary-color);
  border-left: 1px solid var(--bs-border-color);
  padding-left: 0.45rem;
}
.vl-chip-action:hover { color: var(--vl-azure); }

/* Reserved GNA identifier, tinted with the brand slate in both themes. */
.vl-badge-gna {
  background: rgba(var(--vl-slate-rgb), 0.12);
  color: var(--vl-slate-700);
  border: 1px solid rgba(var(--vl-slate-rgb), 0.25);
}
[data-bs-theme="dark"] .vl-badge-gna {
  background: rgba(var(--vl-slate-rgb), 0.3);
  color: #cfe0e8;
  border-color: rgba(var(--vl-slate-rgb), 0.55);
}

/* -------------------------------------------------------------------------
   10. Forms, tables, badges, misc components
   ------------------------------------------------------------------------- */
.form-control,
.form-select {
  border-color: var(--bs-border-color);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.logo { max-width: 300px; }

.choices__list,
.choices__input { color: var(--bs-body-color); }

.input-inline {
  min-width: 0;
  width: 200px;
  display: block;
}

.table {
  --bs-table-border-color: var(--bs-border-color-translucent);
}
.table > thead th {
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.badge { font-weight: 600; letter-spacing: 0.01em; }

/* The "publisher retracted this advisory" pill. Bootstrap sizes .badge in `em`,
   so the same markup renders ~15px inside an h5 card title and ~12px inside an h6
   subtitle or a button group -- and the related-advisories tab puts both kinds of
   card in one list, where the two sizes are visible side by side. Pinned in `rem`
   so the marker is one size wherever the record is drawn. */
.vl-withdrawn-badge { font-size: 0.75rem; }

/* Clickable badge linking to a KEV catalog entry: lift slightly and brighten
   on hover so the pill reads as interactive. */
a.vl-kev-badge-link {
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
a.vl-kev-badge-link:hover,
a.vl-kev-badge-link:focus-visible {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.truncate-cell {
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.truncate-cell-sighting-table {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Soft divider — kept for pages that use it inline. */
.fading-line {
  display: block;
  border: none;
  height: 1px;
  padding: 0;
  background-image: linear-gradient(to right,
    rgba(var(--vl-slate-rgb), 0), rgba(var(--vl-slate-rgb), 0.55), rgba(var(--vl-slate-rgb), 0));
  background-repeat: no-repeat;
  background-size: 100% 1px;
  margin: 0 0 1rem 0;
}

/* Brand-tinted utilities (kept for existing markup). */
.alert-primary {
  --bs-alert-bg: rgba(var(--vl-slate-rgb), 0.10);
  --bs-alert-border-color: rgba(var(--vl-slate-rgb), 0.25);
  --bs-alert-color: var(--vl-slate-700);
}
[data-bs-theme="dark"] .alert-primary { --bs-alert-color: #cfe0e8; }
.bg-primary { background-color: var(--vl-slate) !important; color: #fff; }

/* -------------------------------------------------------------------------
   11. Scroll-to-top button
   ------------------------------------------------------------------------- */
#scrollToTopBtn {
  width: 52px;
  height: 52px;
  bottom: 30px;
  right: 30px;
  z-index: 1030;
  background-color: var(--vl-surface-2);
  color: var(--vl-slate);
  border: 1px solid var(--bs-border-color);
  box-shadow: var(--vl-shadow);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.15s ease;
}
[data-bs-theme="dark"] #scrollToTopBtn { color: var(--bs-link-color); }
#scrollToTopBtn.show { opacity: 1; transform: translateY(0); }
#scrollToTopBtn:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow: var(--vl-shadow-lg);
}

/* -------------------------------------------------------------------------
   12. Footer — anchored brand base in both themes
   ------------------------------------------------------------------------- */
.footer {
  flex-shrink: 0;
  position: relative;
  background: linear-gradient(180deg, var(--vl-slate) 0%, var(--vl-slate-700) 100%) !important;
  color: rgba(255, 255, 255, 0.85);
  padding-block: 2rem;
  margin-top: 2rem;
}
/* The signal line, mirrored along the footer's top edge. */
.footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--vl-azure), var(--vl-slate), var(--vl-azure));
  background-size: 220% 100%;
  animation: vl-signal-shift 9s linear infinite;
}
.footer a {
  color: #fff;
  text-decoration: none;
  transition: opacity 0.15s ease;
}
.footer a:hover { opacity: 0.75; text-decoration: underline; }
.footer .vl-footer-brand { max-height: 40px; }
.footer .vl-footer-tagline {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  max-width: 42ch;
}
.footer .vl-footer-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.6rem;
}
.footer .vl-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* -------------------------------------------------------------------------
   13. Home hero — landing identity + primary search
   ------------------------------------------------------------------------- */
.vl-hero {
  position: relative;
  margin: 0.5rem 0 1.5rem;
  padding: clamp(1.75rem, 4vw, 3rem) 1.5rem;
  overflow: hidden;
  border-radius: var(--bs-border-radius-xl);
  border: 1px solid var(--bs-border-color-translucent);
  background:
    radial-gradient(ellipse at 50% -25%, rgba(var(--vl-azure-rgb), 0.20), transparent 62%),
    linear-gradient(180deg, var(--vl-surface-2), var(--bs-body-bg));
}
/* The signal line, echoed along the hero's top edge — given a soft azure
   underglow here so it reads clearly over the pale hero surface. */
.vl-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg,
    var(--vl-slate) 0%, var(--vl-azure) 35%, var(--vl-slate) 70%, var(--vl-azure) 100%);
  background-size: 220% 100%;
  box-shadow: 0 1px 12px rgba(var(--vl-azure-rgb), 0.45);
  animation: vl-signal-shift 9s linear infinite;
}
.vl-hero-dismiss {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  line-height: 1;
  color: var(--bs-secondary-color);
  background: transparent;
  border: 0;
  border-radius: 50%;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.vl-hero-dismiss:hover,
.vl-hero-dismiss:focus-visible {
  color: var(--vl-azure);
  background: var(--vl-surface-2);
}
.vl-hero-inner {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
}
.vl-hero-title {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  margin: 0 0 0.6rem;
}
.vl-hero-lead {
  color: var(--bs-secondary-color);
  font-size: 1.05rem;
  max-width: 62ch;
  margin-inline: auto;
}
.vl-hero-search {
  max-width: 640px;
  margin: 1.25rem auto 0;
}
.vl-hero-search .input-group-text {
  background: var(--vl-surface-2);
  border-color: var(--bs-border-color);
  color: var(--bs-secondary-color);
}

/* Themed autocomplete dropdown (vendor suggestions under the hero search).
   Fixed positioning + JS anchoring lets it escape the hero's overflow:hidden. */
.vl-autocomplete {
  position: fixed;
  z-index: 1050;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  text-align: left;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.18);
  max-height: 22rem;
  overflow-y: auto;
}
.vl-autocomplete-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--bs-border-radius);
  cursor: pointer;
  color: var(--bs-body-color);
}
.vl-autocomplete-item:hover,
.vl-autocomplete-item.active {
  background: var(--vl-surface-2);
  color: var(--vl-azure);
}
.vl-autocomplete-item .vl-ac-icon {
  display: inline-flex;
  color: var(--bs-secondary-color);
}
.vl-autocomplete-item.active .vl-ac-icon,
.vl-autocomplete-item:hover .vl-ac-icon { color: var(--vl-azure); }
.vl-autocomplete-item mark {
  padding: 0;
  background: transparent;
  color: inherit;
  font-weight: 650;
}
.vl-hero-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin-top: 1.1rem;
}
.vl-hero-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 550;
  text-decoration: none;
  color: var(--bs-body-color);
  transition: color 0.15s ease;
}
.vl-hero-links a:hover,
.vl-hero-links a:focus-visible { color: var(--vl-azure); }
[data-bs-theme="dark"] .vl-hero-links a:hover,
[data-bs-theme="dark"] .vl-hero-links a:focus-visible { color: var(--bs-link-color); }

/* -------------------------------------------------------------------------
   14. KEV catalog overlap heatmap
   ------------------------------------------------------------------------- */
.vl-heatmap-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.5rem;
}
.vl-heatmap {
  --vl-heatmap-cell: 4.5rem;
  overflow-x: auto;
}
.vl-heatmap table {
  border-collapse: separate;
  border-spacing: 3px;
}
.vl-heatmap th {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
  padding: 0.25rem 0.4rem;
  white-space: nowrap;
}
.vl-heatmap thead th { text-align: center; vertical-align: bottom; }
.vl-heatmap tbody th { text-align: right; }
.vl-heatmap td {
  width: var(--vl-heatmap-cell);
  height: var(--vl-heatmap-cell);
  min-width: var(--vl-heatmap-cell);
  text-align: center;
  vertical-align: middle;
  border-radius: var(--bs-border-radius, 0.375rem);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--bs-body-color);
  cursor: default;
  transition: outline-color 0.12s ease, transform 0.12s ease;
  outline: 2px solid transparent;
  outline-offset: -2px;
}
.vl-heatmap td.vl-heatmap-diag {
  background: rgba(var(--vl-slate-rgb), 0.12);
  color: var(--bs-secondary-color);
}
.vl-heatmap td.vl-heatmap-strong { color: #fff; }
.vl-heatmap td.vl-heatmap-active {
  outline-color: var(--vl-azure);
  transform: scale(1.04);
}
.vl-heatmap th.vl-heatmap-active { color: var(--vl-azure); }
[data-bs-theme="dark"] .vl-heatmap th.vl-heatmap-active { color: var(--bs-link-color); }
.vl-heatmap-side { flex: 1 1 14rem; min-width: 12rem; }
.vl-heatmap-readout { font-size: 0.95rem; line-height: 1.5; }
.vl-heatmap-readout strong { color: var(--bs-emphasis-color); }
.vl-heatmap-legend { display: flex; align-items: center; }
.vl-heatmap-legend-bar {
  display: inline-block;
  width: 8rem;
  height: 0.6rem;
  border-radius: 0.3rem;
  background: linear-gradient(
    to right,
    rgba(var(--vl-azure-rgb), 0.10),
    rgba(var(--vl-azure-rgb), 0.95)
  );
}

/* -------------------------------------------------------------------------
   15. KEV catalog UpSet plot
   ------------------------------------------------------------------------- */
.vl-upset { overflow-x: auto; }
.vl-upset-svg { max-width: 100%; height: auto; }
.vl-upset-readout { font-size: 0.95rem; line-height: 1.5; min-height: 1.5em; }
.vl-upset-readout strong { color: var(--bs-emphasis-color); }

.vl-upset-stripe { fill: rgba(var(--vl-slate-rgb), 0.06); }
.vl-upset-bar { fill: var(--vl-azure); }
.vl-upset-setbar { fill: rgba(var(--vl-slate-rgb), 0.5); }
.vl-upset-connector { stroke: var(--vl-azure); stroke-width: 2.5; }
.vl-upset-dot { fill: var(--bs-border-color); }
.vl-upset-dot.on { fill: var(--vl-azure); }

.vl-upset-value,
.vl-upset-settotal {
  fill: var(--bs-secondary-color);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}
.vl-upset-setlabel {
  fill: var(--bs-body-color);
  font-size: 0.8rem;
  font-weight: 600;
}
.vl-upset-axislabel {
  fill: var(--bs-secondary-color);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.vl-upset-setlabel.active { fill: var(--vl-azure); }
[data-bs-theme="dark"] .vl-upset-setlabel.active { fill: var(--bs-link-color); }
[data-bs-theme="dark"] .vl-upset-bar,
[data-bs-theme="dark"] .vl-upset-dot.on,
[data-bs-theme="dark"] .vl-upset-connector { fill: var(--bs-link-color); }
[data-bs-theme="dark"] .vl-upset-connector { stroke: var(--bs-link-color); }

.vl-upset-hit { fill: transparent; cursor: pointer; }
.vl-upset-hit:focus-visible { outline: 2px solid var(--vl-azure); outline-offset: -2px; }
.vl-upset-col { transition: opacity 0.12s ease; }
.vl-upset-dimmed .vl-upset-col:not(.active) { opacity: 0.3; }

/* Column matching the active coverage-table filter. */
.vl-upset-col.selected .vl-upset-bar { fill: var(--vl-azure); }
.vl-upset-col.selected .vl-upset-hit { fill: rgba(var(--vl-azure-rgb), 0.1); }
.vl-upset-col.selected .vl-upset-value { fill: var(--vl-azure); font-weight: 700; }

/* Filter chip in the Catalog coverage card header. */
.vl-combo-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--vl-azure);
  background: rgba(var(--vl-azure-rgb), 0.1);
  border: 1px solid rgba(var(--vl-azure-rgb), 0.25);
  transition: background-color 0.12s ease;
}
.vl-combo-chip:hover { background: rgba(var(--vl-azure-rgb), 0.18); color: var(--vl-azure); }
[data-bs-theme="dark"] .vl-combo-chip { color: var(--bs-link-color); }

/* -------------------------------------------------------------------------
   16. KEV catalog lead-time leaderboard
   ------------------------------------------------------------------------- */
.vl-lead { display: flex; flex-direction: column; gap: 0.5rem; }
.vl-lead-readout { font-size: 0.95rem; line-height: 1.5; min-height: 1.5em; }
.vl-lead-readout strong { color: var(--bs-emphasis-color); }
.vl-lead-head {
  display: grid;
  grid-template-columns: 9rem 1fr 7rem;
  gap: 0.75rem;
  padding: 0 0.5rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bs-secondary-color);
}
.vl-lead-head-bar,
.vl-lead-head-stat { white-space: nowrap; }
.vl-lead-row {
  display: grid;
  grid-template-columns: 9rem 1fr 7rem;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--bs-border-radius, 0.375rem);
  cursor: default;
  transition: background-color 0.12s ease;
}
.vl-lead-row.active { background: rgba(var(--vl-azure-rgb), 0.08); }
.vl-lead-row:focus-visible {
  outline: 2px solid var(--vl-azure);
  outline-offset: -2px;
}
.vl-lead-label {
  font-weight: 600;
  font-size: 0.9rem;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vl-lead-track {
  position: relative;
  height: 1.5rem;
  background: rgba(var(--vl-slate-rgb), 0.1);
  border-radius: 0.4rem;
  overflow: hidden;
}
.vl-lead-fill {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 2.2rem;
  padding-inline: 0.5rem;
  background: var(--vl-azure);
  border-radius: 0.4rem;
  transition: filter 0.12s ease;
}
[data-bs-theme="dark"] .vl-lead-fill { background: var(--bs-link-color); }
.vl-lead-row.active .vl-lead-fill { filter: brightness(1.08); }
.vl-lead-fill-value {
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
[data-bs-theme="dark"] .vl-lead-fill-value { color: var(--bs-body-bg); }
.vl-lead-stat {
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: var(--bs-secondary-color);
  white-space: nowrap;
}

/* KEV evidence mix (per-catalog evidence types, signal ladder, corroboration) */
.vl-ev { display: flex; flex-direction: column; gap: 0.5rem; }
.vl-ev-readout { font-size: 0.95rem; line-height: 1.5; min-height: 1.5em; }
.vl-ev-readout strong { color: var(--bs-emphasis-color); }
.vl-ev-head {
  display: grid;
  grid-template-columns: 9rem 1fr 7rem;
  gap: 0.75rem;
  padding: 0 0.5rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bs-secondary-color);
}
.vl-ev-head-bar,
.vl-ev-head-stat { white-space: nowrap; }
.vl-ev-head-stat { text-align: right; }
.vl-ev-row {
  display: grid;
  grid-template-columns: 9rem 1fr 7rem;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--bs-border-radius, 0.375rem);
  cursor: default;
  transition: background-color 0.12s ease;
}
.vl-ev-row.active { background: rgba(var(--vl-azure-rgb), 0.08); }
.vl-ev-row:focus-visible {
  outline: 2px solid var(--vl-azure);
  outline-offset: -2px;
}
.vl-ev-label {
  font-weight: 600;
  font-size: 0.9rem;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vl-ev-track {
  display: flex;
  height: 1.5rem;
  background: rgba(var(--vl-slate-rgb), 0.1);
  border-radius: 0.4rem;
  overflow: hidden;
}
.vl-ev-seg {
  display: block;
  height: 100%;
  box-sizing: border-box;
  border-right: 2px solid var(--bs-card-bg, var(--bs-body-bg));
  transition: filter 0.12s ease;
}
.vl-ev-seg:last-child { border-right: 0; }
.vl-ev-row.active .vl-ev-seg { filter: brightness(1.08); }
.vl-ev-stat {
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--bs-secondary-color);
  white-space: nowrap;
}
.vl-ev-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--bs-secondary-color);
}
.vl-ev-legend-group { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.75rem; }
.vl-ev-legend-title { font-weight: 600; color: var(--bs-body-color); }
.vl-ev-key { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.vl-ev-swatch {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 0.2rem;
  flex: none;
}
/* Evidence type colours: a validated categorical order, fixed per type.
   Variables, so the same colour paints a div background and an SVG fill. */
:root {
  --vl-ev-honeypot: #2a78d6;
  --vl-ev-sinkhole: #eb6834;
  --vl-ev-telemetry: #1baf7a;
  --vl-ev-incident_response: #eda100;
  --vl-ev-vendor_report: #e87ba4;
  --vl-ev-csirt_report: #008300;
  --vl-ev-public_report: #4a3aa7;
  --vl-ev-research_report: #e34948;
}
[data-bs-theme="dark"] {
  --vl-ev-honeypot: #3987e5;
  --vl-ev-sinkhole: #d95926;
  --vl-ev-telemetry: #199e70;
  --vl-ev-incident_response: #c98500;
  --vl-ev-vendor_report: #d55181;
  --vl-ev-public_report: #9085e9;
  --vl-ev-research_report: #e66767;
}
.vl-ev-honeypot { background: var(--vl-ev-honeypot); fill: var(--vl-ev-honeypot); }
.vl-ev-sinkhole { background: var(--vl-ev-sinkhole); fill: var(--vl-ev-sinkhole); }
.vl-ev-telemetry { background: var(--vl-ev-telemetry); fill: var(--vl-ev-telemetry); }
.vl-ev-incident_response { background: var(--vl-ev-incident_response); fill: var(--vl-ev-incident_response); }
.vl-ev-vendor_report { background: var(--vl-ev-vendor_report); fill: var(--vl-ev-vendor_report); }
.vl-ev-csirt_report { background: var(--vl-ev-csirt_report); fill: var(--vl-ev-csirt_report); }
.vl-ev-public_report { background: var(--vl-ev-public_report); fill: var(--vl-ev-public_report); }
.vl-ev-research_report { background: var(--vl-ev-research_report); fill: var(--vl-ev-research_report); }
.vl-ev-unknown { background: rgba(var(--vl-slate-rgb), 0.55); fill: rgba(var(--vl-slate-rgb), 0.55); }
.vl-ev-none {
  background: repeating-linear-gradient(
    135deg,
    rgba(var(--vl-slate-rgb), 0.28) 0 3px,
    transparent 3px 7px
  );
}

.vl-ev-ladder { display: flex; flex-direction: column; gap: 0.4rem; }
.vl-ev-ladder-row {
  display: grid;
  grid-template-columns: 11rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}
.vl-ev-ladder-label { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vl-ev-ladder-track {
  height: 0.6rem;
  border-radius: 0.3rem;
  background: rgba(var(--vl-slate-rgb), 0.12);
  overflow: hidden;
}
.vl-ev-ladder-fill {
  display: block;
  height: 100%;
  border-radius: 0.3rem;
  background: linear-gradient(90deg, var(--vl-slate), var(--vl-azure));
}
[data-bs-theme="dark"] .vl-ev-ladder-fill { background: var(--bs-link-color); }
.vl-ev-ladder-stat { font-variant-numeric: tabular-nums; white-space: nowrap; }

.vl-ev-buckets {
  display: flex;
  height: 1.1rem;
  border-radius: 0.4rem;
  background: rgba(var(--vl-slate-rgb), 0.1);
  overflow: hidden;
  margin-bottom: 0.6rem;
}
.vl-ev-bucket-seg {
  display: block;
  height: 100%;
  box-sizing: border-box;
  border-right: 2px solid var(--bs-card-bg, var(--bs-body-bg));
}
.vl-ev-bucket-seg:last-child { border-right: 0; }
/* One blue ramp, strongest corroboration darkest; "none" is neutral. */
.vl-ev-bucket-both { background: #1c5cab; }
.vl-ev-bucket-observed { background: #3987e5; }
.vl-ev-bucket-reported { background: #86b6ef; }
.vl-ev-bucket-none { background: rgba(var(--vl-slate-rgb), 0.35); }
[data-bs-theme="dark"] .vl-ev-bucket-both { background: #6da7ec; }
[data-bs-theme="dark"] .vl-ev-bucket-observed { background: #3987e5; }
[data-bs-theme="dark"] .vl-ev-bucket-reported { background: #256abf; }
.vl-ev-bucket-list { display: flex; flex-direction: column; gap: 0.25rem; }
.vl-ev-bucket-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--bs-body-color);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.vl-ev-bucket-row:hover,
.vl-ev-bucket-row:focus-visible {
  background: rgba(var(--vl-azure-rgb), 0.08);
  border-color: rgba(var(--vl-azure-rgb), 0.35);
}
.vl-ev-bucket-row.selected {
  background: rgba(var(--vl-azure-rgb), 0.12);
  border-color: var(--vl-azure);
}
.vl-ev-bucket-label { font-weight: 600; }
.vl-ev-bucket-stat { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 575.98px) {
  .vl-ev-head, .vl-ev-row { grid-template-columns: 6rem 1fr 5rem; }
  .vl-ev-ladder-row { grid-template-columns: 8rem 1fr auto; }
}

/* KEV vulnerability profile (age at listing, time to first listing, EPSS bands) */
.vl-pf { display: flex; flex-direction: column; gap: 0.5rem; }
.vl-pf-readout { font-size: 0.95rem; line-height: 1.5; min-height: 1.5em; }
.vl-pf-readout strong { color: var(--bs-emphasis-color); }
.vl-pf-head,
.vl-pf-row {
  display: grid;
  grid-template-columns: 9rem 1fr 5rem 7rem;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0.5rem;
}
.vl-pf-head-years, .vl-pf-row-years,
.vl-pf-head-epss, .vl-pf-row-epss { grid-template-columns: 5rem 1fr 5rem; }
.vl-pf-head-epss, .vl-pf-row-epss { grid-template-columns: 7rem 1fr 4.5rem; }
.vl-pf-head {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bs-secondary-color);
  padding-top: 0;
  padding-bottom: 0;
}
.vl-pf-head-bar,
.vl-pf-head-stat { white-space: nowrap; }
.vl-pf-head-stat { text-align: right; }
.vl-pf-row {
  border-radius: var(--bs-border-radius, 0.375rem);
  cursor: default;
  transition: background-color 0.12s ease;
}
.vl-pf-row.active { background: rgba(var(--vl-azure-rgb), 0.08); }
.vl-pf-row:focus-visible {
  outline: 2px solid var(--vl-azure);
  outline-offset: -2px;
}
.vl-pf-label {
  font-weight: 600;
  font-size: 0.9rem;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vl-pf-track {
  position: relative;
  height: 1.5rem;
  background: rgba(var(--vl-slate-rgb), 0.1);
  border-radius: 0.4rem;
  overflow: hidden;
}
.vl-pf-box {
  position: absolute;
  top: 0.3rem;
  bottom: 0.3rem;
  background: rgba(var(--vl-azure-rgb), 0.35);
  border-radius: 0.25rem;
}
.vl-pf-median {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3px;
  margin-left: -1.5px;
  background: var(--vl-azure);
  border-radius: 2px;
}
[data-bs-theme="dark"] .vl-pf-median { background: var(--bs-link-color); }
.vl-pf-axis {
  position: relative;
  height: 1.1rem;
  margin-left: calc(9rem + 0.75rem + 0.5rem);
  margin-right: calc(5rem + 7rem + 1.5rem + 0.5rem);
  font-size: 0.72rem;
  color: var(--bs-secondary-color);
  font-variant-numeric: tabular-nums;
}
.vl-pf-axis-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  white-space: nowrap;
}
.vl-pf-axis-tick:first-child { transform: none; }
.vl-pf-axis-tick:last-child { transform: translateX(-100%); }
.vl-pf-track-years { display: block; }
.vl-pf-fill {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 3rem;
  padding-inline: 0.5rem;
  background: var(--vl-azure);
  border-radius: 0.4rem;
}
[data-bs-theme="dark"] .vl-pf-fill { background: var(--bs-link-color); }
.vl-pf-fill-value {
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #fff;
  white-space: nowrap;
}
[data-bs-theme="dark"] .vl-pf-fill-value { color: var(--bs-body-bg); }
.vl-pf-stat {
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--bs-secondary-color);
  white-space: nowrap;
}
.vl-pf-track-epss { display: flex; }
.vl-pf-seg {
  display: block;
  height: 100%;
  box-sizing: border-box;
  border-right: 2px solid var(--bs-card-bg, var(--bs-body-bg));
}
.vl-pf-seg:last-child { border-right: 0; }
.vl-pf-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--bs-secondary-color);
}
.vl-pf-key { display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap; }
.vl-pf-swatch {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 0.2rem;
  flex: none;
}
/* One blue ramp for the EPSS bands, the highest band darkest. */
.vl-pf-epss-quiet { background: #86b6ef; }
.vl-pf-epss-low { background: #3987e5; }
.vl-pf-epss-mid { background: #1c5cab; }
.vl-pf-epss-high { background: #0d366b; }
[data-bs-theme="dark"] .vl-pf-epss-quiet { background: #184f95; }
[data-bs-theme="dark"] .vl-pf-epss-low { background: #256abf; }
[data-bs-theme="dark"] .vl-pf-epss-mid { background: #3987e5; }
[data-bs-theme="dark"] .vl-pf-epss-high { background: #6da7ec; }
.vl-pf-epss-missing {
  background: repeating-linear-gradient(
    135deg,
    rgba(var(--vl-slate-rgb), 0.28) 0 3px,
    transparent 3px 7px
  );
}
.vl-focus-link {
  color: var(--vl-azure);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}
.vl-focus-link:hover, .vl-focus-link:focus-visible { border-bottom-style: solid; }
.vl-focus-link.selected {
  background: rgba(var(--vl-azure-rgb), 0.12);
  border-radius: 0.25rem;
  padding-inline: 0.2rem;
}
@media (max-width: 575.98px) {
  .vl-pf-head, .vl-pf-row { grid-template-columns: 5.5rem 1fr 3.5rem 3.5rem; }
  .vl-pf-head-years, .vl-pf-row-years { grid-template-columns: 3.5rem 1fr 3.5rem; }
  .vl-pf-head-epss, .vl-pf-row-epss { grid-template-columns: 5.5rem 1fr 3.5rem; }
  .vl-pf-axis {
    margin-left: calc(5.5rem + 0.75rem + 0.5rem);
    margin-right: calc(3.5rem + 3.5rem + 1.5rem + 0.5rem);
  }
  /* Only the ends of the axis fit; the ticks between would overlap. */
  .vl-pf-axis-tick:not(:first-child):not(:last-child) { display: none; }
  .vl-pf-head-stat { overflow: hidden; text-overflow: ellipsis; }
}

/* KEV catalog page: headline figures under the title */
.vl-kev-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
}
.vl-kev-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg, 0.5rem);
  background: var(--bs-card-bg, var(--bs-body-bg));
  min-width: 0;
}
.vl-kev-stat-value {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--bs-emphasis-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vl-kev-stat small { line-height: 1.3; }

/* KEV weekly trends (small multiples) */
.vl-tr-readout { font-size: 0.95rem; line-height: 1.5; min-height: 1.5em; }
.vl-tr-readout strong { color: var(--bs-emphasis-color); }
.vl-tr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(28rem, 1fr));
  gap: 1rem 1.5rem;
}
.vl-tr-panel { min-width: 0; }
.vl-tr-svg { display: block; width: 100%; height: auto; overflow: visible; }
.vl-tr-axis { stroke: var(--bs-border-color); stroke-width: 1; }
.vl-tr-grid { stroke: var(--bs-border-color); stroke-width: 1; stroke-dasharray: 2 3; }
.vl-tr-tick { font-size: 10px; fill: var(--bs-secondary-color); font-variant-numeric: tabular-nums; }
.vl-tr-seg { shape-rendering: crispEdges; }
.vl-tr-partial { opacity: 0.55; }
.vl-tr-clip { font-size: 9px; fill: var(--bs-secondary-color); }
.vl-tr-marker { stroke: var(--bs-danger); stroke-width: 1.5; stroke-dasharray: 4 3; }
.vl-tr-marker-label { font-size: 10px; fill: var(--bs-danger); font-weight: 600; }
.vl-tr-highlight { fill: rgba(var(--vl-azure-rgb), 0.12); }
.vl-tr-hit { fill: transparent; cursor: default; }
.vl-tr-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.9rem;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: var(--bs-secondary-color);
}
.vl-tr-key { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
.vl-tr-swatch { display: inline-block; width: 0.65rem; height: 0.65rem; border-radius: 0.15rem; flex: none; }

/* KEV blind spots (per-catalog coverage gaps) */
.vl-gap-list { display: flex; flex-direction: column; gap: 0.5rem; }
.vl-gap-row {
  display: grid;
  grid-template-columns: 10rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--bs-body-color);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.vl-gap-row:hover,
.vl-gap-row:focus-visible {
  background: rgba(var(--vl-azure-rgb), 0.08);
  border-color: rgba(var(--vl-azure-rgb), 0.35);
}
.vl-gap-row.selected {
  background: rgba(var(--vl-azure-rgb), 0.12);
  border-color: var(--vl-azure);
}
.vl-gap-label {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vl-gap-track {
  height: 0.6rem;
  border-radius: 0.3rem;
  background: rgba(var(--vl-slate-rgb), 0.12);
  overflow: hidden;
}
.vl-gap-fill {
  display: block;
  height: 100%;
  border-radius: 0.3rem;
  background: linear-gradient(90deg, var(--vl-slate), var(--vl-azure));
}
[data-bs-theme="dark"] .vl-gap-fill { background: var(--bs-link-color); }
.vl-gap-stat {
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--bs-secondary-color);
}
.vl-gap-stat strong { color: var(--bs-emphasis-color); }

/* KEV coverage timeline (multi-line chart) */
.vl-timeline { overflow-x: auto; }
.vl-timeline-svg { max-width: 100%; height: auto; }
.vl-timeline-readout { font-size: 0.95rem; line-height: 1.5; min-height: 1.5em; }
.vl-timeline-readout strong { color: var(--bs-emphasis-color); }
.vl-tl-grid { stroke: var(--bs-border-color); stroke-width: 1; opacity: 0.5; }
.vl-tl-axis {
  fill: var(--bs-secondary-color);
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
}
.vl-tl-line {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  transition: opacity 0.12s ease, stroke-width 0.12s ease;
}
.vl-tl-dimmed .vl-tl-line:not(.active) { opacity: 0.25; }
.vl-tl-line.active { stroke-width: 3; }
.vl-tl-rule { stroke: var(--bs-secondary-color); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0.7; }
.vl-tl-overlay { fill: transparent; cursor: crosshair; }
.vl-timeline-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: 0.75rem;
}
.vl-tl-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  cursor: default;
  border-radius: 0.4rem;
  padding: 0.1rem 0.35rem;
  transition: background-color 0.12s ease;
}
.vl-tl-legend-item:hover,
.vl-tl-legend-item.active { background: rgba(var(--vl-slate-rgb), 0.12); }
.vl-tl-legend-swatch {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 0.2rem;
  flex: 0 0 auto;
}

/* KEV publication activity grid (GitHub-style contribution calendar).
   The ink ramp is declared as tokens so the light/dark toggle repaints the
   cells without the script having to re-render them. */
.vl-activity,
.vl-act-legend {
  --vl-act-0: rgba(var(--vl-slate-rgb), 0.12);
  --vl-act-1: rgba(var(--vl-azure-rgb), 0.30);
  --vl-act-2: rgba(var(--vl-azure-rgb), 0.52);
  --vl-act-3: rgba(var(--vl-azure-rgb), 0.76);
  --vl-act-4: rgb(var(--vl-azure-rgb));
}
[data-bs-theme="dark"] .vl-activity,
[data-bs-theme="dark"] .vl-act-legend {
  --vl-act-0: rgba(255, 255, 255, 0.07);
  --vl-act-1: rgba(var(--bs-link-color-rgb), 0.26);
  --vl-act-2: rgba(var(--bs-link-color-rgb), 0.48);
  --vl-act-3: rgba(var(--bs-link-color-rgb), 0.72);
  --vl-act-4: rgb(var(--bs-link-color-rgb));
}
.vl-activity {
  overflow-x: auto;
  padding-bottom: 0.25rem;
}
.vl-activity-svg { display: block; }
.vl-act-axis {
  fill: var(--bs-secondary-color);
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
}
.vl-act-cell {
  stroke: rgba(var(--vl-slate-rgb), 0.16);
  stroke-width: 1;
  transition: stroke 0.12s ease;
}
[data-bs-theme="dark"] .vl-act-cell { stroke: rgba(255, 255, 255, 0.08); }
.vl-act-cell:hover { stroke: var(--bs-emphasis-color); }
.vl-act-clickable { cursor: pointer; }
.vl-act-l0 { fill: var(--vl-act-0); }
.vl-act-l1 { fill: var(--vl-act-1); }
.vl-act-l2 { fill: var(--vl-act-2); }
.vl-act-l3 { fill: var(--vl-act-3); }
.vl-act-l4 { fill: var(--vl-act-4); }
.vl-act-periods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.9rem;
}
.vl-act-periods:empty { display: none; }
.vl-act-readout { font-size: 0.95rem; line-height: 1.5; min-height: 1.5em; }
.vl-act-readout strong { color: var(--bs-emphasis-color); }
.vl-act-legend { display: flex; align-items: center; gap: 0.25rem; }
.vl-act-legend .vl-act-swatch {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 0.15rem;
  border: 1px solid rgba(var(--vl-slate-rgb), 0.16);
}
[data-bs-theme="dark"] .vl-act-legend .vl-act-swatch {
  border-color: rgba(255, 255, 255, 0.08);
}
.vl-act-legend .vl-act-l0 { background: var(--vl-act-0); }
.vl-act-legend .vl-act-l1 { background: var(--vl-act-1); }
.vl-act-legend .vl-act-l2 { background: var(--vl-act-2); }
.vl-act-legend .vl-act-l3 { background: var(--vl-act-3); }
.vl-act-legend .vl-act-l4 { background: var(--vl-act-4); }

/* -------------------------------------------------------------------------
   17. KEV catalogs jump-to sub-nav
   ------------------------------------------------------------------------- */
.vl-jumpnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.vl-jumpnav-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  color: var(--bs-secondary-color);
}
.vl-jumpnav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 550;
  border-radius: 2rem;
  border: 1px solid var(--bs-border-color);
  color: var(--bs-body-color);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.vl-jumpnav a:hover,
.vl-jumpnav a:focus-visible {
  color: var(--vl-azure);
  border-color: var(--vl-azure);
  background: rgba(var(--vl-azure-rgb), 0.06);
}
[data-bs-theme="dark"] .vl-jumpnav a:hover,
[data-bs-theme="dark"] .vl-jumpnav a:focus-visible {
  color: var(--bs-link-color);
  border-color: var(--bs-link-color);
}

/* Offset anchored sections so they clear the sticky topbar on jump. */
#catalog-overlap,
#catalog-timeline,
#catalog-upset,
#catalog-leadtime,
#catalog-blindspots,
#catalog-coverage,
[id^="stats-"] {
  scroll-margin-top: 5rem;
}

/* -------------------------------------------------------------------------
   18. Motion floor
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Admin area: full-height left sidebar (admin/base.html)
   ============================================================ */

/* The admin layout bypasses .container-wide and manages its own
   padding, so the sidebar reaches the left edge of the screen and
   stretches from the top bar down to the footer. */
main.vl-admin-main {
  padding-block: 0;
  display: flex;
  flex-direction: column;
}
main.vl-admin-main ~ .footer {
  margin-top: 0;
}

.vl-admin-layout {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.vl-admin-sidebar {
  background-color: var(--bs-tertiary-bg);
  border-bottom: 1px solid var(--bs-border-color);
}

.vl-admin-sidebar-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1rem 0.75rem;
}

.vl-admin-content {
  flex: 1 1 auto;
  min-width: 0; /* let wide tables scroll instead of blowing out the layout */
  padding: 1.25rem clamp(1rem, 2vw, 2rem) 2.5rem;
}

@media (min-width: 768px) {
  .vl-admin-layout {
    flex-direction: row;
    /* Always leave room for a comfortable sidebar, even on short pages. */
    min-height: 100vh;
  }

  .vl-admin-sidebar {
    flex: 0 0 260px;
    width: 260px;
    border-bottom: 0;
    border-right: 1px solid var(--bs-border-color);
  }

  /* The navigation follows the scroll from the top; the user menu is
     pinned to the bottom of the viewport (and settles above the footer
     at the end of the page). */
  .vl-admin-sidebar-nav {
    position: sticky;
    top: 0.5rem;
  }

  .vl-admin-sidebar-user {
    position: sticky;
    bottom: 0.75rem;
    background-color: var(--bs-tertiary-bg);
  }
}

/* ##### Site notice ##### */

/* The operator-set notice, on every page and on the administration page that
   edits it. The message is written in a textarea and rendered as a small
   Markdown subset, so the line breaks its author typed survive as `<br>` and
   `<p>` rather than as preserved whitespace -- `white-space: pre-line` was what
   kept them before, and cannot come back: it would also render the newlines
   between generated `<li>` elements as blank lines.

   The margin resets are what let a multi-paragraph notice sit inside the alert
   bar without pushing it open; a one-line notice has no wrapper at all. Links
   take the alert's own colour, since the notice is coloured by the bar it is in
   and a default link blue on a warning ground reads as a mistake -- the
   underline is what marks them, so it is not optional. */
.vl-site-notice > :first-child {
  margin-top: 0;
}

.vl-site-notice > :last-child {
  margin-bottom: 0;
}

.vl-site-notice a {
  color: inherit;
  text-decoration: underline;
}

/* ##### Vulnerability description ##### */

/* Descriptions are plain text, but roughly one CVE in five wraps its own lines,
   and the sources built from mailing-list archives carry entire advisories --
   headings, bullet lists, numbered reproduction steps. `pre-wrap` is what keeps
   that structure readable instead of collapsing it into one run of prose; the
   `render_summary` filter is what makes it safe to do, since it escapes the
   whole description and emits nothing but anchors around bare http(s) URLs.

   `break-word` is for those posts' long unbroken URLs, which would otherwise
   push the card wider than the page. */
.vl-description {
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

/* ##### CVSS vectors ##### */

/* A vector string is one long token with no spaces in it, and the severity
   cards that carry it are flex items, whose automatic minimum size is the
   min-content width of their contents -- so on a narrow screen the card
   refuses to shrink and the vector runs out of the page. Firefox happens to
   offer a break after each slash of its own accord, Chrome does not, which is
   why the overflow only showed up there.

   The metric-aligned breaks come from the `<wbr>` the `cvss_vector_breaks`
   filter puts after every slash; this rule is the fallback under them, for a
   segment too long to fit on a line of its own. `anywhere` rather than
   `break-word` because only the former is counted when min-content is
   computed: with `break-word` the card would still refuse to narrow, and the
   vector would still hang out of it. */
.vl-cvss-vector {
  overflow-wrap: anywhere;
}
