/* Public CVE hall of fame — page-specific styles on top of app.css.
   Everything colours through the app.css :root variables (cream/sage/charcoal,
   light + dark), so the wall stays on-brand and calm: generous whitespace,
   severity always worded beside its colour, no loud accents.
   Chart discipline: thin single-hue bars with a 4px rounded data end and a
   square baseline, hairline solid axis lines, counts/labels in text tokens
   (never the mark colour). */

/* ── Hero ───────────────────────────────────────────────────────────── */
.wall-hero { text-align: center; padding: 2.6rem 0 1.1rem; }
.wall-eyebrow {
  font-size: 0.76rem; font-weight: 640; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--sage-strong); margin: 0 0 0.6rem;
}
.wall-title { font-size: 2.1rem; letter-spacing: -0.02em; margin: 0 0 0.55rem; }
.wall-sub { color: var(--muted); max-width: 36rem; margin: 0 auto 1.05rem; }
.wall-count {
  display: inline-block; font-size: 0.78rem; font-weight: 640;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 0.22rem 0.75rem; margin: 0;
}

/* Severity accent variable — one class family for every component that
   carries a per-group severity edge. */
.wall-c-critical { --wall-c: var(--sev-critical); }
.wall-c-high { --wall-c: var(--sev-high); }
.wall-c-medium { --wall-c: var(--sev-medium); }
.wall-c-low { --wall-c: var(--sev-low); }
.wall-c-info { --wall-c: var(--sev-info); }
.wall-c-unknown { --wall-c: var(--sev-unknown); }

/* ── Months column chart ────────────────────────────────────────────── */
/* Wide enough for a long month range; more scrolls inside the card instead
   of squeezing the columns illegible. */
.wall-months-card { max-width: 56rem; margin: 1.4rem auto; overflow-x: auto; }
.wall-cols {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 0.55rem; padding: 0.3rem 0.2rem 0;
}
.wall-col { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; flex: 0 1 3rem; min-width: 2rem; }
.wall-col-count {
  font-size: 0.72rem; font-weight: 600; color: var(--ink-2);
  font-variant-numeric: tabular-nums; min-height: 1.05em; line-height: 1.05;
}
/* The track is the column's air; the mark itself stays thin (max 22px). */
.wall-col-track {
  display: flex; align-items: flex-end; justify-content: center;
  width: 100%; height: 72px;
  border-bottom: 1px solid var(--border); /* hairline solid baseline */
}
.wall-col-fill {
  display: block; width: 100%; max-width: 22px; min-height: 3px;
  background: var(--sage); border-radius: 4px 4px 0 0; /* rounded data end, square baseline */
}
.wall-col-label { font-size: 0.7rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── Month rail ─────────────────────────────────────────────────────── */
.wall-month { position: relative; padding-left: 1.5rem; border-left: 2px solid var(--border); padding-bottom: 1.4rem; }
.wall-month:last-child { padding-bottom: 0.2rem; }
/* Month marker dot riding the rule. */
.wall-month-label { position: relative; margin: 0 0 0.6rem; font-size: 0.95rem; }
.wall-month-label::before {
  content: ""; position: absolute; left: calc(-1.5rem - 6px); top: 0.28em;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--sage); border: 2px solid var(--surface);
}

/* ── Product groups (one card per product touched that month) ───────── */
.wall-groups {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 0.6rem;
  grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
}
.wall-group { border-top: 3px solid var(--wall-c, var(--border)); padding: 0.7rem 0.9rem 0.55rem; }
.wall-group-head { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; }
.wall-group-name { margin: 0; font-size: 0.98rem; overflow-wrap: anywhere; }
.wall-group-score { font-size: 1.15rem; font-weight: 680; letter-spacing: -0.01em; color: var(--ink); }
.wall-group-cves { list-style: none; margin: 0.45rem 0 0; padding: 0; }
.wall-group-cves > li {
  display: flex; align-items: baseline; gap: 0.5rem; min-width: 0;
  padding: 0.28rem 0; border-top: 1px solid var(--border);
}
/* Every severity chip — the compact .sev-sm variant included — keeps the
   full chip's uniform width (sized to "critical", em-based so it tracks the
   small font) so chips align into a clean column and the text centers.
   app.css's free-width .sev-sm stays as-is for its report-builder inline use. */
.wall-group-cves .chip.sev.sev-sm { min-width: 5.6em; }
/* Fixed columns down the card: the mono id gets a constant slot (14ch = a
   5-digit CVE number exactly; min-width never clips a longer id — that row
   alone would shift), and the score right-aligns in a 4ch slot ("10.0") so
   the decimal points line up whatever the id's digit count. */
.wall-group-cves .id-link { min-width: 14ch; }
.wall-cve-score { flex: none; min-width: 4ch; text-align: right; }
.wall-cve-title {
  flex: 1; min-width: 0; font-size: 0.84rem; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Shown only to the row's owner/admin (see cve_wall's can_manage) — a quiet
   text link, not a loud CTA: this is a maintenance shortcut, not the row's
   point for the ~everyone-else who sees it. */
.cve-manage { color: var(--sage-strong); white-space: nowrap; font-weight: 640; }
.cve-manage:hover { text-decoration: underline; }

/* ── Editor's live-preview card (cve/_wall_preview.html) ────────────── */
.cve-card {
  min-width: 0; display: flex; flex-direction: column; gap: 0.45rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1rem 1.1rem 0.8rem;
}
.cve-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; }
.cve-head-main { min-width: 0; }  /* left: CVE id with the product directly beneath it */
/* Right column: the severity badge with the CWE centered directly beneath it. */
.cve-head-side { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; flex: none; }
.cve-cwe {
  font-family: var(--mono); font-size: 0.72rem; color: var(--muted);
  white-space: nowrap;
}

/* The CVE id is the hero: bold monospace, quiet by default, sage on hover.
   It is the card's only link (out to the official record on cve.org). */
.cve-id {
  font-family: var(--mono); font-weight: 640; font-size: 1rem;
  letter-spacing: -0.01em; color: var(--ink); white-space: nowrap;
}
.cve-id:hover { color: var(--sage-strong); }

.cve-product {
  font-size: 0.8rem; font-weight: 600; color: var(--sage-strong);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-top: 0.15rem;
}
.cve-title {
  margin: 0; flex: 1; font-size: 0.88rem; line-height: 1.45; color: var(--ink-2);
  overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.cve-foot {
  margin-top: 0.15rem; padding-top: 0.5rem; border-top: 1px solid var(--border);
  font-size: 0.76rem; color: var(--muted); font-variant-numeric: tabular-nums;
}

@media (max-width: 560px) {
  .wall-hero { padding-top: 1.8rem; }
  .wall-title { font-size: 1.7rem; }
  .wall-month { padding-left: 1.1rem; }
  .wall-month-label::before { left: calc(-1.1rem - 6px); }
}

.term {
  max-width: 74rem; margin: 0 auto;
  background: #1a1b17; border: 1px solid #34362e; border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.term-bar {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.55rem 0.9rem; background: #222420; border-bottom: 1px solid #34362e;
}
.term-dot { width: 11px; height: 11px; border-radius: 50%; }
.term-dot-r { background: #d95c5c; }
.term-dot-y { background: #e0a558; }
.term-dot-g { background: #7fb389; }
.term-name { margin-left: 0.5rem; font-family: var(--mono); font-size: 0.76rem; color: #928e82; }
.term-body {
  padding: 0.9rem 1rem 1rem; overflow-x: auto;
  font-family: var(--mono); font-size: 0.8rem; line-height: 1.55;
}
.term-cmd { margin: 0; color: #928e82; white-space: nowrap; }
.term-prompt { color: #9db295; font-weight: 640; }
.term-lines { list-style: none; margin: 0.55rem 0 0.7rem; padding: 0; min-width: 62rem; }
.term-line {
  display: grid; grid-template-columns: 15ch 5ch 9ch 13ch 9ch minmax(0, 1fr);
  gap: 0 1.2ch; padding: 0.06rem 0.4rem; border-radius: 4px;
  color: #c7c3b6; white-space: nowrap;
}
.term-line:hover { background: rgba(157, 178, 149, 0.12); text-decoration: none; }
.term-id { color: #ece8dd; font-weight: 640; }
.term-score { text-align: right; color: #ece8dd; font-variant-numeric: tabular-nums; }
.term-sev { font-weight: 640; }
.term-prod { color: #9db295; overflow: hidden; text-overflow: ellipsis; }
.term-cwe { color: #928e82; }
.term-title { overflow: hidden; text-overflow: ellipsis; }
.term-critical .term-sev { color: #ff6b8a; }
.term-high .term-sev { color: #ff8a4d; }
.term-medium .term-sev { color: #ffc43d; }
.term-low .term-sev { color: #9db295; }
.term-info .term-sev { color: #9a978c; }
.term-unknown .term-sev { color: #928e82; }
.term-cursor {
  display: inline-block; width: 0.55em; height: 1.05em; margin-left: 0.35ch;
  background: #9db295; vertical-align: text-bottom;
  animation: term-blink 1.1s steps(1) infinite;
}
@keyframes term-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .term-cursor { animation: none; } }
