/* Coordinated vulnerability disclosure pages: the shared header (lifecycle
   rail + section tabs), the overview, the discussion thread and the admin
   queue. Built on the theme tokens, so light and dark modes follow. */

.vl-cvd-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  color: var(--bs-secondary-color);
  text-decoration: none;
}
.vl-cvd-back:hover { color: var(--vl-azure); }

.vl-cvd-id,
.vl-cvd-table .vl-cvd-id {
  font-family: var(--vl-font-mono);
  font-size: 0.8rem;
  text-decoration: none;
}
.vl-disclosure-state { font-weight: 600; }

/* --- Lifecycle rail -------------------------------------------------------
   One segmented track: completed steps are filled with the brand gradient,
   the current step is ringed, future steps stay hollow. */
.vl-cvd-rail { margin-bottom: 1.25rem; }
.vl-cvd-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.vl-cvd-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--bs-secondary-color);
}
/* The track segment leading to the next step. */
.vl-cvd-step::after {
  content: "";
  position: absolute;
  top: calc(0.15rem + 0.4rem - 1.5px);
  left: 0.95rem;
  right: 0.15rem;
  height: 3px;
  border-radius: 3px;
  background: var(--bs-border-color);
}
.vl-cvd-step:last-child::after { content: none; }
.vl-cvd-step.is-done::after {
  background: linear-gradient(90deg, var(--vl-slate), var(--vl-azure));
}
.vl-cvd-dot {
  position: relative;
  z-index: 1;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  border: 2px solid var(--bs-border-color);
  background: var(--bs-body-bg);
}
.vl-cvd-step.is-done .vl-cvd-dot {
  border-color: var(--vl-slate);
  background: var(--vl-slate);
}
.vl-cvd-step.is-current { color: var(--bs-emphasis-color); font-weight: 600; }
.vl-cvd-step.is-current .vl-cvd-dot {
  border-color: var(--vl-azure);
  background: var(--vl-azure);
  box-shadow: 0 0 0 4px rgba(var(--vl-azure-rgb), 0.18);
}
.vl-cvd-rail.is-ended .vl-cvd-step { opacity: 0.55; }
.vl-cvd-note {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.6rem 0 0;
  font-size: 0.85rem;
}
@media (max-width: 575.98px) {
  /* Labels would collide: keep the track, name only the current step. */
  .vl-cvd-step .vl-cvd-label { display: none; }
  .vl-cvd-step.is-current .vl-cvd-label { display: inline; white-space: nowrap; }
}

.vl-cvd-tabs {
  border-bottom: 1px solid var(--bs-border-color);
}
.vl-cvd-tabs .nav-underline {
  --bs-nav-underline-gap: 1.25rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.vl-cvd-tabs .nav-link { white-space: nowrap; }
@media (max-width: 575.98px) {
  .vl-cvd-tabs .nav-underline { --bs-nav-underline-gap: 0.75rem; }
}
.vl-cvd-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--bs-secondary-color);
  margin-bottom: -1px;
}
.vl-cvd-tabs .nav-link:hover { color: var(--bs-emphasis-color); }
.vl-cvd-tabs .nav-link.active {
  color: var(--vl-azure);
  border-bottom-color: var(--vl-azure);
}

/* --- Overview ------------------------------------------------------------ */
.vl-cvd-facts { margin: 0; }
.vl-cvd-facts dt {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
  margin-bottom: 0.15rem;
}
.vl-cvd-facts dd { margin-bottom: 0.9rem; overflow-wrap: anywhere; }
.vl-cvd-facts dd:last-child { margin-bottom: 0; }
.vl-cvd-confidential {
  border-color: var(--bs-danger-border-subtle);
}
.vl-cvd-confidential > .card-header {
  background: var(--bs-danger-bg-subtle);
  color: var(--bs-danger-text-emphasis);
}

/* --- Discussion thread ---------------------------------------------------
   Chronological, like a mail thread. Messages from the reporter and from the
   coordinators sit on opposite edges, so who said what reads at a glance. */
.vl-cvd-thread {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}
.vl-cvd-msg {
  max-width: min(46rem, 88%);
  align-self: flex-start;
}
.vl-cvd-msg.is-team { align-self: flex-end; }
.vl-cvd-msg-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.6rem;
  margin-bottom: 0.3rem;
  font-size: 0.82rem;
  color: var(--bs-secondary-color);
}
.vl-cvd-msg.is-team .vl-cvd-msg-meta { justify-content: flex-end; }
.vl-cvd-msg-meta a { font-weight: 600; text-decoration: none; }
.vl-cvd-msg-body {
  padding: 0.75rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  border-top-left-radius: 0.25rem;
  background: var(--vl-card-bg);
  box-shadow: var(--vl-shadow-sm);
  /* Comments are plain text: keep the author's line breaks. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.55;
}
.vl-cvd-msg.is-team .vl-cvd-msg-body {
  border-color: rgba(var(--vl-azure-rgb), 0.30);
  border-radius: var(--bs-border-radius-lg);
  border-top-right-radius: 0.25rem;
  background: rgba(var(--vl-azure-rgb), 0.07);
}
.vl-cvd-msg.is-you .vl-cvd-msg-meta .vl-cvd-you { color: var(--vl-azure); }
.vl-cvd-composer textarea { min-height: 8rem; resize: vertical; }

/* --- Admin queue ---------------------------------------------------------- */
.vl-cvd-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.vl-cvd-filters .vl-chip {
  text-decoration: none;
  color: var(--bs-body-color);
}
.vl-cvd-filters .vl-chip.is-active {
  border-color: var(--vl-azure);
  background: rgba(var(--vl-azure-rgb), 0.12);
  color: var(--vl-azure);
  font-weight: 600;
}
.vl-cvd-table td { vertical-align: middle; }
.vl-cvd-table .vl-cvd-title {
  font-weight: 600;
  color: var(--bs-emphasis-color);
  text-decoration: none;
}
.vl-cvd-table .vl-cvd-title:hover { color: var(--vl-azure); text-decoration: underline; }
.vl-cvd-table .vl-cvd-sub { font-size: 0.8rem; color: var(--bs-secondary-color); }
.vl-cvd-deadline.is-soon { color: var(--bs-warning-text-emphasis); font-weight: 600; }
.vl-cvd-deadline.is-past { color: var(--bs-danger-text-emphasis); font-weight: 600; }

/* An entry the review form recorded (state or date change): a quiet line in
   the middle of the thread, not a message from anyone. */
.vl-cvd-event {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.1rem 1rem;
  font-size: 0.85rem;
  color: var(--bs-secondary-color);
  text-align: center;
}
.vl-cvd-event strong { color: var(--bs-body-color); font-weight: 600; }
.vl-cvd-event a { text-decoration: none; margin-left: 0.25rem; }
.vl-cvd-event-icon { color: var(--vl-azure); }

/* --- Admin insights ------------------------------------------------------- */
.vl-cvd-insights {
  --vl-cvd-open: var(--vl-azure);
  --vl-cvd-disclosed: var(--bs-success);
  --vl-cvd-rejected: var(--bs-danger);
  --vl-cvd-closed: var(--bs-secondary);
}
.vl-cvd-figure {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0.15rem 0;
  color: var(--bs-emphasis-color);
}
.vl-cvd-timings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.vl-cvd-timing { padding: 1rem 1.25rem; }
.vl-cvd-timing + .vl-cvd-timing { border-left: 1px solid var(--bs-border-color); }
@media (max-width: 767.98px) {
  .vl-cvd-timings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vl-cvd-timing:nth-child(odd) { border-left: 0; }
  .vl-cvd-timing:nth-child(n + 3) { border-top: 1px solid var(--bs-border-color); }
}
.vl-cvd-outcome-bar {
  display: flex;
  gap: 2px;
  height: 0.9rem;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bs-tertiary-bg);
}
.vl-cvd-outcome-bar > span,
.vl-cvd-swatch { background: var(--vl-cvd-closed); }
.vl-cvd-outcome-bar > .is-disclosed,
.vl-cvd-swatch.is-disclosed { background: var(--vl-cvd-disclosed); }
.vl-cvd-outcome-bar > .is-rejected,
.vl-cvd-swatch.is-rejected { background: var(--vl-cvd-rejected); }
.vl-cvd-outcome-legend li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0;
}
.vl-cvd-outcome-legend li + li { border-top: 1px solid var(--bs-border-color-translucent); }
.vl-cvd-swatch {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
  flex: none;
}
.vl-cvd-count { min-width: 2.5rem; text-align: right; }
.vl-cvd-chart { position: relative; height: 18rem; }
.vl-cvd-chart.is-short { height: 14rem; }
/* Two-part splits (products / online services, ...): brand blue and slate. */
.vl-cvd-outcome-bar.is-split > .is-part-0,
.vl-cvd-swatch.is-part-0 { background: var(--vl-azure); }
.vl-cvd-outcome-bar.is-split > .is-part-1,
.vl-cvd-swatch.is-part-1 { background: rgba(var(--vl-slate-rgb), 0.55); }
.vl-cvd-outcome-bar.is-split { height: 0.6rem; }
.vl-cvd-ranking { display: flex; flex-direction: column; gap: 0.7rem; }
.vl-cvd-ranking a { text-decoration: none; }
.vl-cvd-meter {
  height: 4px;
  margin-top: 0.3rem;
  border-radius: 4px;
  background: var(--bs-tertiary-bg);
  overflow: hidden;
}
.vl-cvd-meter > span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--vl-slate), var(--vl-azure));
}

/* --- Private notes ---------------------------------------------------------
   A memo, not a conversation: one column, newest first, on a warm tint that
   sets it apart from the discussion. */
.vl-cvd-private {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--bs-secondary-color);
}
.vl-cvd-notes {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.vl-cvd-note-item .vl-cvd-msg-meta { align-items: center; }
.vl-cvd-note-body {
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--bs-warning-border-subtle);
  border-left-width: 3px;
  border-radius: var(--bs-border-radius);
  background: var(--bs-warning-bg-subtle);
  color: var(--bs-body-color);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
}

/* The case's reference in another tool (RTIR, Flowintel, ...). */
.vl-cvd-extref {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  font-family: var(--vl-font-mono);
  font-size: 0.8rem;
  text-decoration: none;
  overflow-wrap: anywhere;
}
