/* styles/detail.css — vulnerability detail, due date, comments, evidence. Order in VulnerabilityCore.html is the cascade order. */

/* ============================================================ detail */
.detail {
  gap: 18px;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--text-dim);
  font: 600 13px/1 var(--font);
  cursor: pointer;
  padding: 4px 0;
}
.back:hover {
  color: var(--accent);
}
.detail-head-main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 80ch;
}
.detail-id-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.detail-src {
  font: 11.5px/1 var(--font-mono);
  color: var(--text-faint);
  white-space: nowrap;
}
.detail-id {
  font: 700 30px/1 var(--font-display);
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}
.detail-desc {
  font: 16px/1.55 var(--font);
  color: var(--text-dim);
  margin: 0;
  text-wrap: pretty;
}
.detail-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dtag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 12px/1 var(--font);
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 7px;
  white-space: nowrap;
}
.dtag .ic {
  color: var(--text-faint);
}

.wf-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 16px 20px;
}
.wf-card-l {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.wf-card-lab {
  font: 600 11px/1 var(--font);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}
.wf-card-r {
  display: flex;
  gap: 8px;
}
.wf {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.wf-track {
  display: flex;
  align-items: center;
}
.wf-node {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 4px;
}
.wf-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid var(--line-2);
  background: var(--surface);
  color: var(--accent-ink);
  transition: 0.15s;
}
.wf-dot-i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.wf-node.is-done .wf-dot {
  background: var(--ok);
  border-color: var(--ok);
  color: #04221f;
}
.wf-node.is-cur .wf-dot {
  border-color: var(--st-prog);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--st-prog) 22%, transparent);
}
.wf-lab {
  font: 600 12.5px/1 var(--font);
  color: var(--text-dim);
  white-space: nowrap;
}
.wf-node.is-done .wf-lab,
.wf-node.is-cur .wf-lab {
  color: var(--text);
}
.wf-line {
  width: 34px;
  height: 2px;
  background: var(--line-2);
  margin: 0 2px;
}
.wf-line.is-done {
  background: var(--ok);
}
.wf-accept {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 12px/1 var(--font);
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px dashed var(--line-2);
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
}
.wf-accept:hover {
  border-color: var(--st-acc);
  color: var(--text);
}
.wf-accept.is-on {
  border-style: solid;
  border-color: var(--st-acc);
  color: var(--text);
  background: color-mix(in oklab, var(--st-acc) 14%, transparent);
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 332px;
  gap: 18px;
  align-items: start;
}
.detail-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.dsec {
  background: var(--surface);
  border: none;
  border-radius: var(--radius);
  padding: 20px;
}
.dsec-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
}
.dsec-ic {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}
.dsec-ic-danger {
  background: color-mix(in oklab, var(--sev-critical) 16%, transparent);
  color: var(--sev-critical);
}
.dsec-head h3 {
  font: 600 15px/1 var(--font);
  color: var(--text);
  margin: 0;
}
.dsec-kick {
  margin-left: auto;
  font: 600 10px/1 var(--font);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  background: var(--surface-2);
  padding: 5px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.dsec-lead {
  font: 15px/1.6 var(--font);
  color: var(--text);
  margin: 0 0 4px;
  text-wrap: pretty;
}
.dsec-danger {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: color-mix(in oklab, var(--sev-critical) 9%, transparent);
  border: 1px solid color-mix(in oklab, var(--sev-critical) 24%, transparent);
  border-left: 3px solid var(--sev-critical);
  color: var(--text);
}
.fldgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 14px;
}
.fld {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 14px;
  background: var(--surface);
}
.fld-wide {
  grid-column: span 2;
}
.fld-lab {
  font: 600 10.5px/1 var(--font);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}
.fld-val {
  font: 13.5px/1.45 var(--font);
  color: var(--text);
}
.cmlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.cmlist li {
  display: flex;
  gap: 11px;
  font: 14px/1.5 var(--font);
  color: var(--text);
}
.cmlist-ic {
  flex: none;
  margin-top: 2px;
  color: var(--ok);
  background: color-mix(in oklab, var(--ok) 16%, transparent);
  border-radius: 50%;
  padding: 3px;
  width: 21px;
  height: 21px;
}

.detail-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 74px;
}
.side-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gauge {
  position: relative;
  /* The CVSS gauge wants standard pure red (#FF0000) for Critical (the thick arc
     makes the dark donut-red read as crimson). Scoped override only affects this gauge. */
  --sev-critical: #cc003b;
}
.gauge-center {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.gauge-num {
  font: 700 30px/1 var(--font-display);
}
.gauge-lab {
  font: 10.5px/1 var(--font-mono);
  color: var(--text-faint);
}
.side-title {
  font: 600 11px/1 var(--font);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}
.side-title em {
  color: var(--text-dim);
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
}
.metaline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font: 13px/1.2 var(--font);
  color: var(--text-dim);
  padding: 3px 0;
}
.metaline b {
  color: var(--text);
  font-weight: 600;
}
.conf {
  display: flex;
  align-items: center;
  gap: 8px;
}
.conf-bar {
  width: 54px;
  height: 5px;
  border-radius: 3px;
  background: var(--surface-3);
  overflow: hidden;
}
.conf-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
}
.side-note {
  font: 12.5px/1.4 var(--font);
  color: var(--text-dim);
  margin: 0;
}
/* EPSS bar, in the risk strip (screens/detail.jsx VulnRiskStrip). */
.epss-bar {
  height: 5px;
  border-radius: 3px;
  background: var(--surface-3);
  overflow: hidden;
}
.epss-bar span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.7s ease;
}
.reglist {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.reg {
  font: 600 11px/1 var(--font-mono);
  color: var(--text-dim);
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 5px 8px;
  border-radius: 6px;
}
.relrow {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  background: none;
  border: none;
  border-top: 1px solid var(--line);
  padding: 9px 0;
  cursor: pointer;
  text-align: left;
}
.relrow:hover .relrow-id {
  color: var(--accent);
}
.relrow-id {
  flex: 1;
  font: 12px/1 var(--font-mono);
  color: var(--text-dim);
}
.relrow .ic {
  color: var(--text-faint);
}

/* ========================================= vulnerability detail page (scoped)
   Everything below is scoped to .vuln-detail, the root of screens/detail.jsx, or to
   classes only that page renders (.vd-*). The base rules above are shared with the
   component detail page, which has its own scoped block (.comp-detail, wizard.css)
   and must not move. The header reuses that page's .comp-head rules as they stand. */

/* A bare 1fr is minmax(auto,1fr): its floor is the widest unbreakable child, which
   pushed this page 79px sideways on a phone. (0,2,0) beats responsive.css's 1180px
   single-column rule, hence the matching query here. */
.vuln-detail .detail-grid { grid-template-columns: minmax(0, 1fr) 332px; }
.vuln-detail .detail-main,
.vuln-detail .detail-side { min-width: 0; }
@media (max-width: 1180px) {
  .vuln-detail .detail-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Interaction cues on --focus, never raw --accent (about 1.9:1 on the dark canvas). */
.vuln-detail .back:hover,
.vuln-detail .back:focus-visible { color: var(--focus); }
.vuln-detail .back:focus-visible,
.vuln-detail .btn:focus-visible,
.vuln-detail .wf-accept:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.vuln-detail .wf-node:focus-visible,
.vuln-detail .relrow:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 14px; }

/* A field the feed left blank reads "Not specified", quieter than a real value. */
.vuln-detail .fld.is-empty .fld-val { color: var(--text-faint); }

/* ---- Risk strip: CVSS gauge, EPSS, CIA, overall impact ------------------- */
.vd-strip {
  container: vdstrip / inline-size;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-top: -4px;
}
.vd-strip-in {
  display: grid;
  grid-template-columns: auto minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 0.75fr);
  align-items: center;
}
.vd-cell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 2px 22px;
  border-left: 1px solid var(--line);
}
.vd-cell:first-child { padding-left: 0; border-left: none; }
.vd-cell-top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 9px; }
.vd-cell-top b,
.vd-cell-impact b {
  font: 700 22px/1 var(--font-display);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.vd-cell-impact b { font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; }
.vd-cell-top span { font: 12.5px/1.25 var(--font); color: var(--text-dim); }
.vd-cell b.is-none { font: 600 15px/1.2 var(--font); color: var(--text-faint); }
.vd-cell-lab {
  font: 600 10.5px/1 var(--font);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}
/* The gauge at strip size: the same arc and colours as the old side-rail gauge,
   about a third of its height. */
.vd-strip .gauge-sm { width: 118px; }
.vd-strip .gauge-sm .gauge-center { bottom: 0; gap: 2px; }
.vd-strip .gauge-sm .gauge-num { font-size: 22px; }
.vd-strip .gauge-sm .gauge-lab { font-size: 9.5px; }
.vd-strip .cia-cell { padding: 6px 4px; min-width: 0; }
/* The level word was the severity colour itself (Medium and High measured under 3:1
   on their own tint in dark). The tint and border keep the hue; the words are --text. */
.vd-strip .cia-hi,
.vd-strip .cia-md { color: var(--text); }
/* Narrower than a desktop main column: gauge and EPSS share row 1, CIA takes row 2,
   and the impact becomes one label/value line. */
@container vdstrip (max-width: 760px) {
  .vd-strip-in { grid-template-columns: auto minmax(0, 1fr); row-gap: 14px; }
  .vd-cell-cia,
  .vd-cell-impact { grid-column: 1 / -1; padding: 14px 0 0; border-left: none; border-top: 1px solid var(--line); }
  .vd-cell-impact { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 12px; }
  .vd-cell-impact b { text-align: right; }
}
@container vdstrip (max-width: 360px) {
  .vd-strip .gauge-sm { width: 96px; }
  .vd-cell-epss { padding-left: 14px; }
}
@media (max-width: 560px) {
  .vd-strip { padding: 14px 16px; }
}

/* ---- Workflow bar: status row, then the tracking row ---------------------- */
.vuln-detail .vd-wf {
  container: vdwf / inline-size;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
}
.vuln-detail .vd-wf .wf-card-l { padding: 16px 20px; gap: 12px 20px; }
.vuln-detail .vd-wf .wf-card-r {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
}
/* Both row labels take the same width, so the track and the tracking chips start
   at the same x. */
.vuln-detail .vd-wf .wf-card-lab { flex: none; min-width: 132px; }
/* Row 1 spaces its label by the row's 20px column gap, row 2 by its 8px chip gap. */
.vuln-detail .vd-wf .wf-card-r > .wf-card-lab { margin-right: 12px; }
.vd-wf-sp { flex: 1 1 auto; }
/* Phone-width card: the four-step track (about 460px of dots, labels and lines) no
   longer fits a line, so the steps become a 2x2 grid of pills, Accept risk takes a
   full row, and each label sits on its own line above its row. */
@container vdwf (max-width: 560px) {
  .vuln-detail .vd-wf .wf-card-l,
  .vuln-detail .vd-wf .wf-card-r { padding-left: 16px; padding-right: 16px; }
  .vuln-detail .vd-wf .wf-card-lab { flex-basis: 100%; min-width: 0; }
  .vuln-detail .vd-wf .wf { width: 100%; }
  .vuln-detail .vd-wf .wf-track { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
  .vuln-detail .vd-wf .wf-line { display: none; }
  .vuln-detail .vd-wf .wf-node {
    min-height: 36px;
    padding: 5px 12px 5px 5px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface-2);
  }
  .vuln-detail .vd-wf .wf-node.is-cur { border-color: color-mix(in oklab, var(--st-prog) 55%, var(--line)); }
  .vuln-detail .vd-wf .wf-accept { width: 100%; justify-content: center; min-height: 36px; }
  .vuln-detail .vd-wf-sp { display: none; }
}

/* ============================================== remediation due date
   The chip that shows a vulnerability's deadline, in the ledger's Due column and
   on the detail page's workflow bar. Colour is driven by the DERIVED state from
   dueMeta() — nothing about "overdue" is stored, so these classes are the single
   place the urgency ramp is expressed. */
.duepill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-faint);
  font: 500 11.5px/1 var(--font);
  white-space: nowrap;
}
.duepill .ic {
  flex: none;
}
.duepill-lab {
  overflow: hidden;
  text-overflow: ellipsis;
}
.duepill-int {
  cursor: pointer;
}
.duepill-int:hover {
  border-color: var(--line-2);
  color: var(--text);
}
/* Scheduled and comfortably ahead — deliberately quiet, so the urgent states
   below are the only ones that draw the eye in a long list. */
.duepill-ok {
  color: var(--text-dim);
}
.duepill-soon {
  color: var(--sev-high);
  border-color: color-mix(in oklab, var(--sev-high) 40%, transparent);
  background: color-mix(in oklab, var(--sev-high) 12%, transparent);
}
.duepill-today {
  color: var(--sev-high);
  border-color: color-mix(in oklab, var(--sev-high) 60%, transparent);
  background: color-mix(in oklab, var(--sev-high) 18%, transparent);
  font-weight: 600;
}
.duepill-overdue {
  color: var(--sev-critical);
  border-color: color-mix(in oklab, var(--sev-critical) 55%, transparent);
  background: color-mix(in oklab, var(--sev-critical) 14%, transparent);
  font-weight: 600;
}
/* Remediated or risk-accepted: the date is history, not a deadline. Struck
   through rather than hidden, so the record still shows what was committed to. */
.duepill-done {
  color: var(--text-faint);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

/* Due-date block inside the assign dialog. */
.asm-due {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.asm-due-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.asm-due-lab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 11px/1 var(--font);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}
.asm-due-row {
  display: flex;
  gap: 8px;
}
.asm-due-input,
.asm-due-reason {
  font: 12.5px/1.3 var(--font);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 9px;
}
.asm-due-input {
  flex: none;
  width: 148px;
}
.asm-due-reason {
  flex: 1;
  min-width: 0;
}
.asm-due-input:focus,
.asm-due-reason:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
/* The native date picker's indicator is near-invisible on the dark surface. */
.app[data-theme="dark"] .asm-due-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.65;
  cursor: pointer;
}
.asm-due-foot {
  display: flex;
  align-items: center;
  gap: 8px;
}
.asm-due-note {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 11px/1.35 var(--font);
  color: var(--text-faint);
}
/* The note doubles as the save's status line: a past date or a refused write reads
   in the severity colour, a completed save in the done colour. */
.asm-due-note.is-err { color: var(--sev-critical); }
.asm-due-note.is-ok { color: var(--st-done); }

/* ================================================ comments (detail page)
   The shared team thread that sits after Recommended countermeasures. It lives
   inside a .dsec Section, so it inherits that card's surface and only styles the
   thread itself: a list of avatar + body rows, then a compose box pinned to the
   bottom and separated by a rule so "read" and "write" read as two zones. */
.cmt-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cmt-list:empty {
  display: none;
}
.cmt {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}
.cmt-avatar {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 600 11px/1 var(--font);
  color: var(--accent-ink, #fff);
  background: var(--accent);
  /* Two initials on a 30px circle is tight; letter-spacing 0 keeps them centred. */
  letter-spacing: 0;
  user-select: none;
}
.cmt-avatar-me {
  background: var(--surface-3);
  color: var(--text-dim);
}
.cmt-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cmt-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
}
.cmt-author {
  font: 600 13px/1 var(--font);
  color: var(--text);
}
.cmt-time {
  font: 11.5px/1 var(--font);
  color: var(--text-faint);
}
.cmt-edited {
  font: italic 11px/1 var(--font);
  color: var(--text-faint);
}
/* Row actions stay invisible until the row is hovered/focused, so a long thread
   is not a wall of icons — but they must appear on keyboard focus too, or they
   would be unreachable without a mouse. */
.cmt-acts {
  margin-left: auto;
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.cmt:hover .cmt-acts,
.cmt:focus-within .cmt-acts {
  opacity: 1;
}
.cmt-act {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
}
.cmt-act:hover {
  background: var(--surface-2);
  color: var(--text);
}
.cmt-body {
  margin: 0;
  font: 13.5px/1.55 var(--font);
  color: var(--text-dim);
  /* Preserve the author's own line breaks, and break long unbroken strings (a
     pasted URL or stack frame) instead of forcing the card to scroll sideways. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.cmt-empty {
  font: 13px/1.5 var(--font);
  color: var(--text-faint);
}
.cmt-error {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 12.5px/1.4 var(--font);
  color: var(--sev-critical);
  background: color-mix(in oklab, var(--sev-critical) 10%, transparent);
  border: 1px solid color-mix(in oklab, var(--sev-critical) 30%, transparent);
  border-radius: 8px;
  padding: 8px 10px;
}
.cmt-error .ic {
  flex: none;
}
/* This comment reached the linked Jira issue. A quiet monospace key, not a button:
   the issue is already one click away from the record's own Jira chip, and a second
   link on every comment would out-shout the discussion itself. */
.cmt-jira {
  font: 10.5px/1 var(--font-mono, var(--font));
  letter-spacing: 0.02em;
  color: var(--text-faint);
  /* --line, not --border: --border is declared nowhere in this stylesheet, which
     made the whole shorthand invalid at computed-value time — so this chip has been
     rendering with no border at all rather than the quiet one it asks for. */
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 5px;
}
/* The other direction: a comment written in Jira and copied here. Same quiet chip,
   accent-tinted so a skim of the thread finds the lines that came from outside; the
   avatar goes hollow for the same reason — this person has no account here. */
.cmt-jira-in {
  color: var(--accent);
  border-color: var(--accent-line);
  font-family: var(--font);
  font-weight: 600;
}
.cmt-from-jira .cmt-avatar {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 0 0 1.5px var(--accent-line);
}
/* The base --accent (#49299a) is ~1.5:1 on the dark card; the lighter on-brand
   variant is what every other accent-coloured TEXT uses in dark (see .logo-word-2). */
.app[data-theme="dark"] .cmt-jira-in,
.app[data-theme="dark"] .cmt-from-jira .cmt-avatar {
  color: var(--accent-3);
}
/* The comment saved; only the copy to Jira failed. Warning weight, never the
   critical red of .cmt-error — nothing the user did was lost. */
.cmt-jira-warn {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 12.5px/1.4 var(--font);
  color: var(--sev-medium);
  background: color-mix(in oklab, var(--sev-medium) 10%, transparent);
  border: 1px solid color-mix(in oklab, var(--sev-medium) 30%, transparent);
  border-radius: 8px;
  padding: 8px 10px;
}
.cmt-jira-warn .ic {
  flex: none;
}
/* Dark --sev-medium is ~2.6:1 on the card, and this line is all that explains a thread
   turned off under an open tab. The text takes the lighter accent the Jira chip above
   uses in dark (~5.2:1); the tint and border keep their colour. The dark critical red
   is ~2.6:1 too, so a refusal takes a lighter red there (~6.1:1). Light is unchanged. */
.app[data-theme="dark"] .cmt-jira-warn {
  color: var(--accent-3);
}
.app[data-theme="dark"] .cmt-error {
  color: #f87171;
}
.cmt-jira-warn button {
  margin-left: auto;
  font-size: 15px;
  line-height: 1;
}
/* "Connect your Atlassian account" above the compose box (0027). An invitation, not
   a warning, so it takes the accent tint rather than the amber of .cmt-jira-warn; the
   text stays --text-dim, which holds on the tint in both themes. */
.cmt-atl {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 8px 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--accent-line);
  background: color-mix(in oklab, var(--accent) 7%, transparent);
  font: 12.5px/1.4 var(--font);
  color: var(--text-dim);
}
.cmt-atl .ic {
  flex: none;
  color: var(--focus);
}
.cmt-atl .btn {
  flex: none;
  margin-left: auto;
}
.cmt-compose {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
/* The compose box collapses to nothing without min-width:0 — flex children
   default to min-content width, and a textarea's is wider than the column. */
.cmt-composebox,
.cmt-editbox {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cmt-input {
  width: 100%;
  resize: vertical;
  min-height: 68px;
  font: 13.5px/1.5 var(--font);
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
.cmt-input:focus {
  outline: none;
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.cmt-input::placeholder {
  color: var(--text-faint);
}
.cmt-composefoot,
.cmt-editacts {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cmt-editacts {
  justify-content: flex-end;
}
.cmt-hint {
  flex: 1;
  min-width: 0;
  font: 11.5px/1.4 var(--font);
  color: var(--text-faint);
}

/* ============================================ evidence upload (detail side)
   Sits between Classification and Compliance evidence in the sidebar. A click-or-
   drop target above, the filed documents below. */
.evi-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  padding: 16px 12px;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--text-faint);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}
.evi-drop:hover,
.evi-drop:focus-visible {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  outline: none;
}
.evi-drop.is-drag {
  border-color: var(--accent);
  border-style: solid;
  background: var(--accent-soft);
  color: var(--text);
}
.evi-drop.is-busy {
  cursor: progress;
}
.evi-drop-lab {
  font: 12.5px/1.3 var(--font);
  color: var(--text-dim);
}
.evi-drop-lab b {
  color: var(--accent);
  font-weight: 600;
}
.evi-drop-sub {
  font: 11px/1.3 var(--font);
  color: var(--text-faint);
}
.evi-progress {
  width: 100%;
  height: 4px;
  margin-top: 4px;
  border-radius: 3px;
  background: var(--surface-3);
  overflow: hidden;
}
.evi-progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.2s ease;
}
.evi-list {
  display: flex;
  flex-direction: column;
}
.evi-list:empty {
  display: none;
}
.evi-empty {
  font: 12.5px/1.4 var(--font);
  color: var(--text-faint);
}
.evi-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.evi-row:first-child {
  border-top: none;
  padding-top: 0;
}
.evi-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--accent);
}
/* The whole name+meta block is the open affordance, so the hit target is the row
   rather than a small link. */
.evi-open {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
}
.evi-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font: 12.5px/1.3 var(--font);
  color: var(--text-dim);
}
/* File names are long and the sidebar is narrow: one line, ellipsised — the NAME,
   never the chip beside it. The title attribute on the button carries the full name. */
.evi-name-txt {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.evi-open:hover .evi-name {
  color: var(--accent);
}
/* The same chips the thread uses, sat after the file name: the issue this file was
   attached to, or "via Jira" for one that arrived from it. The icon tile goes hollow
   for a file with no uploader here, as the avatar does for a comment. */
.evi-jira {
  flex: none;
}
.evi-from-jira .evi-ic {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--accent-line);
}
.app[data-theme="dark"] .evi-from-jira .evi-ic {
  color: var(--accent-3);
}
.evi-meta {
  font: 10.5px/1.3 var(--font);
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.evi-acts {
  flex: none;
  display: flex;
  align-items: center;
  gap: 2px;
}
.evi-act {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
}
.evi-act:hover {
  background: var(--surface-2);
  color: var(--text);
}
/* The download button's slot while its bytes are being fetched — sized to match
   so the row does not jump. */
.evi-spin {
  width: 14px;
  height: 14px;
  margin: 0 6px;
  border-width: 2px;
  border-color: color-mix(in oklab, var(--accent) 30%, transparent);
  border-top-color: var(--accent);
}
