/* Leavory — product views and charts (scripts/charts.mjs). Builds on
   css/styles.css. Colour by role, in the brand's four colours only:
   red marks what is critical (failed, exploited); every other series is a
   step of white, told apart by lightness, a dash or a hatch, and always by
   a label. Text never takes a series colour. */

:root {
  --d-critical: var(--red);
  --d-high: rgb(var(--white-rgb) / 0.85);
  --d-medium: rgb(var(--white-rgb) / 0.55);
  --d-low: rgb(var(--white-rgb) / 0.3);
  /* Pipeline runs: the same trio as the lines (validated, see the DS). */
  --d-ok: rgb(var(--white-rgb) / 0.85);
  --d-other: rgb(var(--white-rgb) / 0.55);
  --d-track: rgb(var(--white-rgb) / 0.08);
  --d-hatch: repeating-linear-gradient(
    135deg,
    rgb(var(--white-rgb) / 0.45) 0 2px,
    transparent 2px 5px
  );
}

/* ---------- The product window ---------- */
.pw {
  overflow: hidden;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(
      rgb(var(--white-rgb) / 0.045),
      rgb(var(--white-rgb) / 0.015)
    ),
    var(--ink);
  box-shadow:
    inset 0 1px 0 rgb(var(--white-rgb) / 0.08),
    0 40px 100px -40px rgb(var(--red-rgb) / 0.22);
  font-size: 13.5px;
  line-height: 1.45;
}
.pw__top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
}
.pw__mark {
  flex: none;
  width: auto;
  height: 17px;
  aspect-ratio: 18 / 21.5;
  color: var(--red);
}
.pw__title {
  font-size: 13px;
  color: var(--text-2);
}
.pw__title strong {
  color: var(--text);
  font-weight: 600;
}
.pw__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 12px;
  color: var(--text-3);
  text-align: right;
}
.pw__status::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgb(var(--white-rgb) / 0.7);
}
.pw__status.is-hot::before {
  background-color: var(--red);
}
/* Icons inside a line of text stay on the line. */
.pw svg:not(.chart, .pw__mark) {
  display: inline-block;
  vertical-align: -0.2em;
}
.pw__body {
  display: grid;
  gap: 14px;
  padding: 20px;
}
.pw__intro {
  font-size: 13.5px;
  color: var(--text-2);
}
.pw__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}
.pw__cols {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  gap: 14px;
}
.pw__cols--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.pw__cols--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.pw__cols--side {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
}
.pw__foot {
  font-size: 12px;
  color: var(--text-3);
}
/* Wide content scrolls sideways on small screens instead of squeezing. */
.pw__scroll {
  position: relative; /* keeps screen-reader-only labels inside */
  overflow-x: auto;
}
.pw__scroll > * {
  min-width: 640px;
}

/* A panel inside the window. */
.pp {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: rgb(var(--white-rgb) / 0.015);
}
.pp--flush {
  padding: 0;
  overflow: hidden;
}
.pp__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 14px;
}
.pp--flush .pp__head {
  margin: 0;
  padding: 14px 16px 10px;
}
.pp__head h4 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
}
.pp__head span {
  font-size: 12px;
  color: var(--text-3);
}

/* Buttons and tabs as they look inside the product. */
.pbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
}
.ptabs {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-3);
}
.ptabs span {
  padding-bottom: 9px;
}
.ptabs .is-on {
  box-shadow: inset 0 -2px 0 var(--red);
  color: var(--text);
  font-weight: 500;
}

/* ---------- Small parts ---------- */
/* Legend key: a mark beside a label, never a coloured label. */
.key {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  vertical-align: 0;
}
.key--critical,
.key--failed {
  background: var(--d-critical);
}
.key--high {
  background: var(--d-high);
}
.key--medium {
  background: var(--d-medium);
}
.key--ok {
  background: var(--d-ok);
}
.key--low {
  background: var(--d-low);
}
.key--secrets {
  background: var(--d-hatch), var(--d-track);
}
.key--other {
  background: var(--d-other);
}
.key--clean {
  background: var(--d-track);
}
.key--image {
  border-radius: 2px;
  background: var(--d-critical);
}
.key--clear {
  background: none;
  box-shadow: inset 0 0 0 1px rgb(var(--white-rgb) / 0.35);
}

.chlegend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12px;
  color: var(--text-3);
}
.chlegend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Discovery chips: when each part was last mapped. */
.dchips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dchip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 7px;
  background-color: rgb(var(--white-rgb) / 0.06);
  font-size: 12px;
  color: var(--text-2);
}
.dchip svg {
  color: var(--text-3);
}

/* Language chips. */
.lchips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}
.lchips span {
  padding: 2px 6px;
  border-radius: 4px;
  background-color: rgb(var(--white-rgb) / 0.08);
  font: 500 10.5px/1.4 var(--mono);
  color: var(--text-2);
}

/* Severity tiles. */
.stiles {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.stile {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stile__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
}
.stile__head b {
  margin-left: auto;
  font-size: 17px;
}
.stile__delta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-3);
}
.stile__delta b {
  color: var(--text-2);
}

/* Number tiles. */
.ntiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.ntile {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.ntile p {
  font-size: 12px;
  color: var(--text-3);
}
.ntile__value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  margin-top: 6px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.ntile__icon {
  color: var(--text-3);
}
.ntile small {
  display: block;
  font-size: 11.5px;
  color: var(--text-3);
}
.ntile .chm,
.ntile .ring {
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0;
}

/* Critical / High / Medium with their icons. */
.chm {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  font-size: 12.5px;
  color: var(--text-2);
}
.chm--stack {
  display: grid;
}
.chm span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.chm b {
  color: var(--text);
  font-weight: 600;
}
.chm svg {
  color: var(--text-3);
}
.chm .chm__c svg {
  color: var(--red);
}

/* ---------- Charts (SVG) ---------- */
.chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
/* Lines are strokes only: no default fill. */
.chart line {
  fill: none;
}
/* Below about 560px a chart scrolls sideways rather than shrink its type. */
.chart-wrap {
  position: relative;
  overflow-x: auto;
}
.chart-wrap > .chart {
  min-width: 520px;
}
.ch-grid {
  stroke: rgb(var(--white-rgb) / 0.08);
  stroke-width: 1;
}
.ch-axis {
  fill: var(--text-3);
  font: 400 10.5px var(--sans);
}
.ch-line {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.ch-line--critical {
  stroke: var(--d-critical);
}
.ch-line--high {
  stroke: var(--d-high);
}
.ch-line--medium {
  stroke: var(--d-medium);
  stroke-dasharray: 5 4;
}
.ch-dot {
  stroke: var(--ink);
  stroke-width: 2;
}
.ch-dot--critical {
  fill: var(--d-critical);
}
.ch-dot--high {
  fill: var(--d-high);
}
.ch-dot--medium {
  fill: var(--d-medium);
}
.ch-end {
  fill: var(--text-3);
  font: 400 11px var(--sans);
}
.ch-end__v {
  fill: var(--text);
  font-weight: 600;
}
.ch-bar--ok {
  fill: var(--d-ok);
}
.ch-bar--failed {
  fill: var(--d-critical);
}
.ch-bar--other {
  fill: var(--d-other);
}

/* Distribution: one bar split by share. */
.dist__total {
  font-size: 12.5px;
  color: var(--text-3);
}
.dist__total b {
  margin-right: 6px;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
  vertical-align: -2px;
}
.dist__bar {
  display: flex;
  gap: 2px;
  height: 10px;
  margin-top: 10px;
}
.dist__bar i {
  min-width: 4px;
  border-radius: 3px;
}
.dist__bar .key--critical {
  background: var(--d-critical);
}
.dist__bar .key--high {
  background: var(--d-high);
}
.dist__bar .key--medium {
  background: var(--d-medium);
}
.dist__bar .key--low {
  background: var(--d-low);
}
.dist__bar .key--secrets {
  background: var(--d-hatch), var(--d-track);
}
.dist__table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 12.5px;
}
.dist__table th {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-weight: 400;
  text-align: left;
  color: var(--text-2);
}
.dist__table td {
  padding: 5px 0 5px 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.dist__table td:nth-child(2) {
  color: var(--text);
  font-weight: 600;
}
.dist__table td:last-child {
  color: var(--text-3);
}

/* Horizontal bars, one series. */
.hbars {
  display: grid;
  gap: 7px;
}
.hbars li {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 32px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-2);
}
.hbars__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hbars__label b {
  color: var(--text);
  font-weight: 600;
}
.hbars__track i {
  display: block;
  height: 8px;
  border-radius: 0 4px 4px 0;
  background-color: var(--d-high);
}
.hbars__v {
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Share of a total, in a table row. */
.share {
  display: block;
  height: 5px;
  border-radius: 3px;
  background-color: var(--d-track);
}
.share i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background-color: var(--d-high);
}
.count {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  box-shadow: inset 0 0 0 1px rgb(var(--red-rgb) / 0.8);
  font-size: 12px;
  font-weight: 600;
}

/* Health ring: the score, its band, and the band's name. */
.ring {
  display: inline-grid;
  justify-items: center;
  gap: 2px;
}
.ring svg {
  grid-area: 1 / 1;
  width: var(--s);
  height: var(--s);
}
.ring > b {
  grid-area: 1 / 1;
  align-self: center;
  font-size: calc(var(--s) * 0.32);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.ring small {
  font-size: 11px;
  color: var(--text-3);
}
.ring__track {
  fill: none;
  stroke: var(--d-track);
  stroke-width: 4;
}
.ring__arc {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
}
.ring--critical .ring__arc {
  stroke: var(--d-critical);
}
.ring--fair .ring__arc {
  stroke: var(--d-medium);
}
.ring--good .ring__arc {
  stroke: var(--white);
}
.ring--critical small {
  color: var(--text);
}

/* Heatmap: one row per image, two scans a day. */
.heat {
  display: grid;
}
.heat__row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) repeat(7, 46px);
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.heat__row.is-worse {
  background-color: rgb(var(--red-rgb) / 0.1);
}
.heat__head {
  padding-block: 8px;
  font-size: 11.5px;
  color: var(--text-3);
}
.heat__head span:not(:first-child) {
  text-align: center;
}
.heat__name b {
  display: block;
  font: 500 13px/1.4 var(--mono);
}
.heat__name small {
  font-size: 11.5px;
  color: var(--text-3);
}
.heat__day {
  display: flex;
  justify-content: center;
  gap: 3px;
}
.cell {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}
.cell--clean {
  background-color: var(--d-track);
}
.cell--medium {
  background-color: rgb(var(--white-rgb) / 0.35);
}
.cell--high {
  background-color: rgb(var(--red-rgb) / 0.45);
}
.cell--critical {
  background-color: var(--d-critical);
}
.heat__foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 12px 16px;
  font-size: 12px;
  color: var(--text-3);
}
.heat__foot .chlegend .key {
  border-radius: 3px;
}
.chlegend .key--medium.is-cell {
  background-color: rgb(var(--white-rgb) / 0.35);
}
.chlegend .key--high.is-cell {
  background-color: rgb(var(--red-rgb) / 0.45);
}

/* EPSS: a probability as a short bar. */
.epss {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.epss__track {
  width: 56px;
  height: 5px;
  border-radius: 3px;
  background-color: var(--d-track);
}
.epss__track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background-color: var(--d-medium);
}
.epss.is-hot .epss__track i {
  background-color: var(--d-critical);
}
.epss b {
  font-weight: 600;
}

/* Funnel: from every advisory to the one that matters. */
.funnel {
  display: grid;
  gap: 4px;
}
.funnel__step {
  display: grid;
  grid-template-columns: 32px auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.funnel__step svg {
  padding: 7px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background-color: rgb(var(--white-rgb) / 0.06);
  color: var(--text-2);
}
.funnel__step b {
  font-size: 22px;
  font-weight: 600;
}
.funnel__step span {
  font-size: 12.5px;
  color: var(--text-2);
}
.funnel__step.is-hot {
  border-color: rgb(var(--red-rgb) / 0.7);
  background-color: rgb(var(--red-rgb) / 0.12);
}
.funnel__step.is-hot svg {
  background-color: rgb(var(--red-rgb) / 0.3);
  color: var(--white);
}
.funnel__arrow {
  display: flex;
  justify-content: center;
  color: var(--text-3);
}

/* Status pills. */
.spill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  box-shadow: inset 0 0 0 1px rgb(var(--white-rgb) / 0.3);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.spill--failed {
  background-color: rgb(var(--red-rgb) / 0.2);
  box-shadow: inset 0 0 0 1px rgb(var(--red-rgb) / 0.9);
}
.spill--running {
  box-shadow: none;
  outline: 1px dashed rgb(var(--white-rgb) / 0.45);
  outline-offset: -1px;
}
.spill--skipped {
  box-shadow: none;
  color: var(--text-3);
  text-decoration: line-through;
}
.spill--clean {
  box-shadow: none;
  font-weight: 400;
  color: var(--text-3);
}
.sev--low {
  border-color: rgb(var(--white-rgb) / 0.18);
  color: var(--text-2);
}

/* Pipeline run counts: passed, warned, failed. */
.runs3 {
  display: inline-flex;
  gap: 8px;
  font-size: 12px;
}
.runs3 span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Product tables. */
.ptable {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.ptable th {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-2);
  font-size: 11.5px;
  font-weight: 500;
  text-align: left;
  color: var(--text-3);
  white-space: nowrap;
}
.ptable td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.ptable tr:last-child td {
  border-bottom: 0;
}
.ptable tr.is-hot {
  background-color: rgb(var(--red-rgb) / 0.08);
}
.ptable .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ptable strong {
  font-weight: 600;
}
.ptable .mono {
  display: block;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}
.mcode,
.ptable code {
  font: 500 12.5px/1.4 var(--mono);
}
.ptable .muted {
  color: var(--text-3);
}
.tag-s {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background-color: rgb(var(--white-rgb) / 0.08);
  font-size: 11px;
  color: var(--text-2);
}
.avatar-s {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  margin-right: 6px;
  border-radius: 50%;
  background-color: rgb(var(--white-rgb) / 0.16);
  font-size: 9.5px;
  font-weight: 700;
  vertical-align: -3px;
}
.icon-box {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background-color: rgb(var(--white-rgb) / 0.06);
  color: var(--text-2);
}
.never {
  color: var(--text);
  font-weight: 600;
}
.never::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background-color: var(--red);
  vertical-align: 1px;
}

/* A warning band at the foot of a view. */
.pwarn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background-color: rgb(var(--red-rgb) / 0.12);
  box-shadow: inset 0 0 0 1px rgb(var(--red-rgb) / 0.6);
  font-size: 13px;
}
.pwarn svg {
  flex: none;
  color: var(--red);
}

/* Quick summary list. */
.qsum {
  display: grid;
  gap: 8px;
}
.qsum li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.qsum span {
  font-size: 12px;
  color: var(--text-3);
}
.qsum b {
  display: block;
  font-size: 17px;
  font-weight: 600;
}
.qsum > li > svg:last-child {
  color: var(--text-3);
}

/* Source cards. */
.srcs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.src {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.src b {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
}
.src span {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-3);
}
.src small {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--text-2);
}

/* Alert cards: the same alert by email, Slack and Microsoft Teams. */
.alerts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.alerts__title {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.alert-c {
  padding: 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background-color: var(--ink);
  font-size: 12.5px;
}
.alert-c__top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-c__top b {
  font-size: 13.5px;
}
.alert-c__top time {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-3);
}
.alert-c__sub {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--text-3);
}
.alert-c__title {
  margin-top: 12px;
  font-size: 13.5px;
  font-weight: 600;
}
.alert-c p {
  color: var(--text-2);
}
.alert-c__box {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background-color: rgb(var(--red-rgb) / 0.12);
  box-shadow: inset 0 0 0 1px rgb(var(--red-rgb) / 0.55);
}
.alert-c__quote {
  margin-top: 8px;
  padding-left: 10px;
  border-left: 2px solid var(--red);
}
.alert-c__card {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.alert-c code {
  font: 500 12px/1.4 var(--mono);
  color: var(--text);
}
.alert-c__grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 16px;
  margin-top: 6px;
}
.alert-c__grid dt {
  color: var(--text-2);
}
.alert-c__grid dd {
  margin: 0;
  color: var(--text);
}
.bot {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background-color: var(--red);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
}
.app-tag {
  padding: 1px 5px;
  border-radius: 4px;
  background-color: rgb(var(--white-rgb) / 0.1);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-2);
}

/* Pill naming a CVE. */
.cvepill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 13px;
  background-color: rgb(var(--red-rgb) / 0.16);
  box-shadow: inset 0 0 0 1px rgb(var(--red-rgb) / 0.8);
  font: 500 12px/1 var(--mono);
}

/* Impact graph. */
.ig-edge {
  stroke: rgb(var(--white-rgb) / 0.25);
  stroke-width: 1.2;
}
.ig-edge--hit {
  stroke: rgb(var(--red-rgb) / 0.75);
  stroke-dasharray: 5 5;
}
.ig-edge--clear {
  stroke: rgb(var(--white-rgb) / 0.25);
  stroke-dasharray: 2 4;
}
.ig-project rect {
  fill: rgb(var(--red-rgb) / 0.22);
  stroke: var(--red);
  stroke-width: 1.5;
}
.ig-project text {
  fill: var(--text);
  font: 600 13.5px var(--sans);
}
.ig-project.is-clear rect {
  fill: var(--ink);
  stroke: rgb(var(--white-rgb) / 0.35);
  stroke-dasharray: 4 3;
}
.ig-project.is-clear text {
  fill: var(--text-2);
}
.ig-leaf {
  fill: var(--red);
}
.ig-name {
  fill: var(--text);
  font: 500 12.5px var(--mono);
}
.ig-ver {
  fill: var(--text-3);
  font: 400 11px var(--mono);
}
.ig-cve circle {
  fill: rgb(var(--red-rgb) / 0.3);
  stroke: var(--red);
  stroke-width: 3;
}
.ig-cve text {
  fill: var(--text);
  font: 700 13px var(--sans);
}
.ig-cve .ig-cve__sev {
  font: 500 10px var(--mono);
  fill: var(--text-2);
}

/* AI notes. */
.ai-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 10px;
  background-color: rgb(var(--white-rgb) / 0.08);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
}
.ai-tag svg {
  color: var(--red);
}
.pbullets {
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
}
.pbullets li {
  position: relative;
  padding-left: 14px;
}
.pbullets li::before {
  content: "";
  position: absolute;
  top: 0.6em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: rgb(var(--white-rgb) / 0.5);
}

/* ---------- Breakpoints ---------- */
@media (max-width: 1100px) {
  .stiles,
  .srcs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .pw__cols,
  .pw__cols--3,
  .pw__cols--side,
  .alerts {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .pw__cols--2 {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 560px) {
  .stiles,
  .srcs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pw__body {
    padding: 14px;
  }
}
