/* ==========================================================================
   radicalidpipeline — brand + pipeline layer

   Loads AFTER styles.css, tokens.css and polish.css, which are the
   LearningByDesign design system ported verbatim. Nothing in those three
   files is edited; everything radical-specific lives here so a future
   refresh from LearningByDesign can overwrite them safely.
   ========================================================================== */

/* ── Inherited contrast defect ─────────────────────────────────────────────
   tokens.css sets --text-on-brand: #042F2A, a dark teal left over from an
   earlier palette. Measured against the current brand red (#FF2A40) that is
   3.01:1, below the WCAG AA minimum of 4.5:1 for normal text. White on the
   same red measures 4.83:1. Every .btn-primary label is affected, so this is
   overridden for all four theme selectors rather than patched per component. */
:root,
body.theme-light, [data-theme="light"],
body.theme-dark,  [data-theme="dark"] {
  --text-on-brand: #FFFFFF;
}

/* ── Pipeline board ───────────────────────────────────────────────────── */
.pipeline-rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.pipeline-stage {
  position: relative;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 14px;
  background: var(--surface-1, var(--bg-elevated, transparent));
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 132px;
}

.pipeline-stage .stage-step {
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .55;
}

.pipeline-stage .stage-name { font-weight: 600; font-size: 14px; }
.pipeline-stage .stage-metric { font-size: 12px; opacity: .7; margin-top: auto; }

.pipeline-stage .stage-dot {
  position: absolute; top: 14px; right: 14px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border-default);
}

.pipeline-stage[data-state="done"]     { border-color: rgba(16,185,129,.45); }
.pipeline-stage[data-state="done"]    .stage-dot { background: #10B981; }
.pipeline-stage[data-state="warn"]     { border-color: rgba(245,158,11,.55); }
.pipeline-stage[data-state="warn"]    .stage-dot { background: #F59E0B; }
.pipeline-stage[data-state="todo"]    .stage-dot { background: var(--border-default); }
.pipeline-stage[data-state="blocked"]  { opacity: .55; }
.pipeline-stage[data-state="blocked"] .stage-dot { background: transparent; border: 1px solid var(--border-default); }

/* ── Objective coverage table ─────────────────────────────────────────── */
.coverage-flag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.coverage-flag.ok        { border-color: rgba(16,185,129,.5);  color: #10B981; }
.coverage-flag.untaught  { border-color: rgba(239,68,68,.55);  color: #EF4444; }
.coverage-flag.unmeasured{ border-color: rgba(245,158,11,.6);  color: #F59E0B; }

/* ── Fidelity manifest ────────────────────────────────────────────────── */
.fidelity-list { list-style: none; padding: 0; margin: 8px 0 0; }
.fidelity-list li {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 5px 0; font-size: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.fidelity-list li:last-child { border-bottom: 0; }
.fidelity-list .f-mark { flex: 0 0 16px; font-weight: 700; }
.fidelity-list li[data-carry="full"]    .f-mark { color: #10B981; }
.fidelity-list li[data-carry="partial"] .f-mark { color: #F59E0B; }
.fidelity-list li[data-carry="none"]    .f-mark { color: #EF4444; }
