/* ========================================================
   HOW IT WORKS · 3 steps
   Thin adapter layer on top of terminal-modules.css.
   Handles the section rhythm, copy column, per-step layouts,
   and a handful of step-specific affordances that don't
   belong in the shared design system.
   ======================================================== */

.steps-wrap { display: flex; flex-direction: column; gap: 120px; margin-top: 64px; }

/* ---------- Row grid ---------- */
.step-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}

/* Reversed row: cluster on the left, copy on the right (breaks the rhythm) */
.step-row-reverse > .step-copy    { grid-column: 2; justify-self: start; }
.step-row-reverse > .frag-cluster { grid-column: 1; grid-row: 1; }

/* ---------- Copy column ---------- */
.step-copy { max-width: 460px; }
.step-copy .eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px;
  color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 20px;
}
.step-copy .eyebrow::before {
  content: ''; width: 18px; height: 1px; background: var(--ink-4);
}
.step-copy h3 {
  font-family: var(--serif);
  font-size: 44px; line-height: 1.05;
  font-weight: 400; letter-spacing: -0.02em;
  color: var(--ink); margin: 0 0 16px;
  text-wrap: pretty;
}
.step-copy .sub {
  font-size: 18px; line-height: 1.55; color: var(--ink-2);
  font-weight: 400; margin: 0 0 28px; max-width: 40ch;
}
.step-copy ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; }
.step-copy li {
  position: relative; padding-left: 22px;
  font-size: 15px; line-height: 1.5; color: var(--ink-2);
  font-weight: 400;
}
.step-copy li::before {
  content: ''; position: absolute; left: 4px; top: 8px;
  width: 5px; height: 5px; border-radius: 999px; background: var(--magenta);
}

/* ---------- Cluster ---------- */
.frag-cluster {
  position: relative;
  display: flex; flex-direction: column; gap: 9px;
  width: 100%;
  min-width: 0;
}

/* ---------- STEP 02 split: extract (left) + thinking (right) ---------- */
.tm-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}
.tm-split > .tm-card { margin-top: 0; padding: 9px 12px; }

/* ========================================================
   STEP 01 · Template tiles (now 2 options, not 3)
   ======================================================== */
.fc-tpl-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.fc-tpl {
  position: relative;
  border-radius: 10px;
  padding: 10px 12px 12px;
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--line);
  transition: border-color 240ms ease, box-shadow 240ms ease, background 240ms ease;
  min-width: 0;
}
.fc-tpl .tm-dot {
  position: absolute; top: 10px; right: 10px;
  width: 8px; height: 8px;
}
.fc-tpl .ttl {
  font-size: 13.5px; font-weight: 600;
  color: var(--ink); letter-spacing: -0.005em;
  padding-right: 20px;
}
.fc-tpl .def {
  font-size: 10.5px; color: var(--ink-3);
  margin-top: 2px;
  font-family: var(--mono);
  letter-spacing: 0.01em;
}
.fc-tpl.is-active {
  border-color: var(--magenta);
  background: rgba(255,255,255,0.9);
  box-shadow:
    0 0 0 2px rgba(90, 58, 74, 0.10),
    0 2px 8px rgba(21, 19, 31, 0.06);
}

/* Module toggle rows */
.fc-mods { display: flex; flex-direction: column; }
.fc-mods .row {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}
.fc-mods .row:last-child { border-bottom: 0; }
.fc-mods .row .mt {
  font-size: 12.5px; font-weight: 500;
  color: var(--ink); letter-spacing: -0.005em;
}
.fc-mods .sw {
  appearance: none; -webkit-appearance: none;
  position: relative;
  width: 30px; height: 17px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  cursor: default;
  transition: background 260ms ease, border-color 260ms ease;
  padding: 0; margin: 0;
  flex-shrink: 0;
}
.fc-mods .sw .kn {
  position: absolute;
  top: 1px; left: 1px;
  width: 13px; height: 13px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(21,19,31,0.18);
  transition: transform 280ms cubic-bezier(.4,.2,.2,1);
}
.fc-mods .sw.on {
  background: var(--magenta);
  border-color: var(--magenta);
}
.fc-mods .sw.on .kn { transform: translateX(13px); }
.fc-mods .row:has(.sw:not(.on)) .mt { color: var(--ink-3); }

/* ========================================================
   STEP 02 · Paste card scroller
   ======================================================== */
.fc-paste {
  font-family: var(--mono); font-size: 10.5px; line-height: 1.55;
  color: var(--ink-3);
  min-height: 90px;
  position: relative;
  background: rgba(255,255,255,0.55);
  border: 1px dashed var(--line-2);
  border-radius: 8px;
  padding: 12px 14px;
  transition: border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
}
.fc-paste-empty {
  display: flex; align-items: center; gap: 2px;
  color: var(--ink-4);
  font-style: italic;
}
.fc-paste-empty .ph { font-style: italic; }
.fc-paste-body {
  display: none;
  opacity: 0;
  position: relative;
}
.fc-paste-body p {
  margin: 0 0 2px;
  color: var(--ink-2);
}
.fc-paste-body p.dim { color: var(--ink-4); }
.fc-paste-body b { color: var(--ink); font-weight: 600; }

/* Scrollable area with masked fade */
.fc-paste-scroll {
  max-height: 90px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
  mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 24px), transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 calc(100% - 24px), transparent 100%);
}
.fc-paste-scroll::-webkit-scrollbar { width: 4px; }
.fc-paste-scroll::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 4px; }

/* Scroll hint at the bottom of the card */
.fc-paste-more {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.fc-att {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: 9.5px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  opacity: 0.78;
}
.fc-att svg { color: var(--ink-4); }
.fc-paste-fade { display: none; }

/* Paste state: blend into the parent card — no inner chrome,
   just a brief highlight pulse via the pasteFlash animation. */
.fc-paste.pasted {
  border: 0;
  background: transparent;
  border-radius: 14px;
  padding: 10px 2px 0;
  min-height: 0;
  box-shadow: none;
  animation: pasteFlash 620ms ease-out;
}
.fc-paste.pasted .fc-paste-empty { display: none; }
.fc-paste.pasted .fc-paste-body {
  display: block;
  animation: pasteBodyIn 280ms ease-out forwards;
}
@keyframes pasteFlash {
  0%   { box-shadow: 0 0 0 0 rgba(90, 58, 74, 0.00); }
  30%  { box-shadow: 0 0 0 6px rgba(90, 58, 74, 0.16); }
  100% { box-shadow: 0 0 0 3px rgba(90, 58, 74, 0.08); }
}
@keyframes pasteBodyIn {
  from { opacity: 0; transform: translateY(2px); }
  to   { opacity: 1; transform: none; }
}

/* ========================================================
   STEP 02 · Extract list (renamed to .tm-row in markup)
   Some residual tweaks on the wrapper:
   ======================================================== */
.fc-extract {
  display: flex; flex-direction: column; gap: 0;
}

/* ========================================================
   STEP 02 · Live screening feed (right card)
   Compact live log — Tarth at work, three lines visible,
   auto-scrolls through the full module list.
   ======================================================== */
.fc-plan {
  padding: 10px 10px 10px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* --- Header: subject + running count --- */
.fc-plan-head {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.fc-plan-root-dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--magenta);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--magenta) 16%, transparent);
  position: relative;
  flex: 0 0 auto;
}
.fc-plan-root-dot::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  border: 1.2px solid var(--magenta);
  opacity: 0;
  animation: fcPlanPulse 1.8s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes fcPlanPulse {
  0%   { transform: scale(.8); opacity: .55; }
  70%  { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}
.fc-plan-root-label {
  color: var(--ink);
  font-weight: 400;
  letter-spacing: 0.04em;
  font-size: 10px;
  text-transform: none;
}
.fc-plan-spacer { flex: 1; }
.fc-plan-count {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.fc-plan-count #fcPlanDone { color: inherit; font-weight: inherit; }

/* --- Feed: clipped viewport, 3 rows visible, evenly spaced --- */
.fc-plan-feed {
  position: relative;
  height: 66px;   /* 3 rows × 22px — exact equidistance */
  overflow: hidden;
}
.fc-plan-log {
  list-style: none;
  margin: 0; padding: 0;
  position: relative;
  will-change: transform;
  transition: transform 520ms cubic-bezier(.25, .75, .35, 1);
}
.fc-log-line {
  display: flex; align-items: center; gap: 10px;
  height: 22px;
  padding: 0;              /* left-aligned bullets — no indent */
  font-family: var(--sans);
  font-size: 11.5px;
  line-height: 1;
  font-weight: 400;
  color: var(--ink-3);
  opacity: 0;
  transition: opacity 240ms ease, color 240ms ease;
}
.fc-log-line.on { opacity: 1; }
.fc-log-line.current { color: var(--magenta-ink); }
.fc-log-line.settled { color: var(--ink-3); }

.fc-log-dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--ink-4);
  flex: 0 0 auto;
  position: relative;
  margin-left: 2px;      /* align dots flush-left inside the card */
  transition: background 220ms ease;
}
.fc-log-line.current .fc-log-dot {
  background: var(--magenta);
}
.fc-log-line.current .fc-log-dot::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 999px;
  border: 1.2px solid var(--magenta);
  animation: fcPlanPulse 1.2s cubic-bezier(.4,0,.2,1) infinite;
}
.fc-log-line.settled .fc-log-dot {
  background: var(--magenta-ink);
}
.fc-log-text {
  letter-spacing: -0.003em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

/* Soft fades at top/bottom of the viewport */
.fc-plan-fade {
  position: absolute; left: 0; right: 0;
  height: 14px;
  pointer-events: none;
  z-index: 2;
}
.fc-plan-fade-top {
  top: 0;
  background: linear-gradient(to bottom, var(--paper), transparent);
}
.fc-plan-fade-bot {
  bottom: 0;
  background: linear-gradient(to top, var(--paper), transparent);
}

/* --- Progress dots row: 8 mini pips showing overall sweep --- */
.fc-plan-dots {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 0 2px;
}
.fc-plan-dot {
  flex: 1;
  height: 8px;
  border-radius: 2px;
  background: color-mix(in oklab, var(--magenta) 18%, transparent);
  transform-origin: top center;
  transition: background 260ms ease, transform 260ms ease;
}
.fc-plan-dot.active {
  background: var(--magenta);
  transform: scaleY(1.08);
}
.fc-plan-dot.done {
  background: color-mix(in oklab, var(--magenta) 70%, transparent);
  transform: scaleY(1);
}


/* ========================================================
   STEP 03 · Full-width layout
   Single column: wide copy block + stats, then full-width report.
   ======================================================== */
.step-row.full-width {
  grid-template-columns: 1fr;
  gap: 40px;
}
.step-copy-wide {
  max-width: none;
  text-align: center;
  margin: 0 auto;
}
.step-copy-wide .eyebrow { justify-content: center; }
.step-copy-wide h3 {
  font-size: 52px;
  line-height: 1.05;
  max-width: 22ch;
  margin-left: auto; margin-right: auto;
}
.step-copy-wide .sub {
  max-width: 60ch;
  margin: 0 auto 32px;
  font-size: 19px;
}

/* Stats strip */
.step-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: 820px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.step-stat {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 4px 12px;
  border-right: 1px dashed var(--line);
}
.step-stat:last-child { border-right: 0; }
.step-stat-n {
  font-family: var(--serif);
  font-size: 42px; line-height: 1;
  font-weight: 400; color: var(--ink);
  letter-spacing: -0.02em;
}
.step-stat-n .u {
  font-size: 24px;
  color: var(--ink-3);
  margin-left: 1px;
}
.step-stat-l {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Cluster-03 wrapper */
.cluster-03 {
  max-width: 1020px;
  margin: 0 auto;
  width: 100%;
}

/* Report card */
.tm-report {
  padding: 18px 22px 22px;
}

/* Verdict meta bar */
.fr-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 4px 0 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.fr-verdict {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 20px; font-weight: 500;
  color: var(--ink); letter-spacing: -0.01em;
}
.fr-verdict-dot {
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--plumink);
  box-shadow: 0 0 0 3px rgba(85, 69, 102, 0.14);
}
.fr-meta-kv {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; color: var(--ink-3);
  letter-spacing: 0.02em;
}
.fr-meta-kv .sep { color: var(--ink-4); }

/* Module rows */
.fr-mod {
  display: grid;
  grid-template-columns: minmax(160px, 0.4fr) 1fr;
  gap: 16px 24px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
}
.fr-mod:last-of-type { border-bottom: 0; }
.fr-mod-head {
  display: flex; align-items: center; gap: 10px;
  align-self: start;
}
.fr-mod-title {
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  letter-spacing: -0.005em;
  flex: 1;
}
.fr-mod-body {
  margin: 0;
  font-size: 12.5px; line-height: 1.55;
  color: var(--ink-2);
}
.fr-mod-body b { color: var(--ink); font-weight: 600; }
.fr-mod-muted {
  margin: 5px 0 0;
  font-size: 11.5px; color: var(--ink-3); line-height: 1.5;
}
.fr-mod.highlight {
  background: linear-gradient(90deg, rgba(90, 58, 74, 0.06), transparent 70%);
  border-radius: 8px;
  padding-left: 12px;
  padding-right: 12px;
  margin-left: -12px;
  margin-right: -12px;
}

/* Sources footer */
.fr-foot {
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.fr-sources {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.fr-foot-lbl {
  font-family: var(--mono);
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--ink-4); font-size: 9px;
  margin-right: 6px;
}

/* ========================================================
   STEP 03 · Report card (.tarth-report-card)
   Compact, in-platform compliance report. NOT a PDF — this
   is what the customer sees rendered inside the Tarth product.
   Cascade-reveals on scroll: each .reveal-step fades up in order.
   ======================================================== */

.tarth-report-card {
  padding: 0;
  overflow: hidden;
  position: relative;
}

/* ----- Top rail: Tarth mark + rendering note + Export PDF action ----- */
.trp-rail {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, rgba(246,243,242,0.55), rgba(255,255,255,0));
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.trp-rail-logo {
  display: inline-flex; align-items: center;
  color: var(--ink);
  line-height: 0;
}
.trp-rail-logo-img {
  display: block;
  height: 22px;
  width: auto;
}
.trp-rail-spacer { flex: 1; }
.trp-rail-meta {
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0.01em;
  color: var(--ink-4);
}
.trp-export {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px 5px 9px;
  background: var(--ink);
  color: #F8F4EF;
  border: 0;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}
.trp-export:hover { background: var(--magenta-ink); transform: translateY(-0.5px); }
.trp-export svg { opacity: 0.85; }

/* ----- Report body container ----- */
.tarth-report-card > .trp-head,
.tarth-report-card > .trp-body,
.tarth-report-card > .trp-sources {
  padding-left: 28px;
  padding-right: 28px;
}

/* ----- Body split: summary+modules left, stacked scorecard right ----- */
.trp-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 32px;
  padding-top: 20px;
  padding-bottom: 22px;
  align-items: start;
}
.trp-body-l { min-width: 0; }

/* Right rail · stacked risk scorecard */
.trp-scorecard {
  border-left: 1px solid var(--line);
  padding-left: 20px;
  padding-top: 2px;
}
.trp-scorecard-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
  font-weight: 600;
}
.trp-scorelist {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
}
.trp-scorelist li {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px dashed var(--line);
  font-family: var(--sans);
}
.trp-scorelist li:last-child { border-bottom: 0; }
.trp-scorelist .k {
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: -0.003em;
}
.trp-scorelist .v {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 2px 7px;
  border-radius: 3px;
  line-height: 1.3;
  white-space: nowrap;
}
.trp-scorelist .v.low   { color: var(--green); background: #F1F4EB; }
.trp-scorelist .v.med   { color: var(--amber-warm); background: #FAF4E8; }
.trp-scorelist .v.high  { color: var(--rust); background: #F7E8DF; }
.trp-scorelist .v.clear { color: var(--plumink); background: var(--plumink-soft); }

/* Module detail · subtle, no card background */
.trp-modules {
  margin-top: 14px;
  padding-top: 4px;
  border-top: 1px dashed var(--line);
}
.trp-mod {
  padding: 12px 0 12px 14px;
  border-bottom: 1px dashed var(--line);
  position: relative;
}
.trp-mod:last-child { border-bottom: 0; }
.trp-mod::before {
  content: '';
  position: absolute;
  left: 0; top: 16px; bottom: 16px;
  width: 2px;
  background: var(--magenta);
  opacity: 0.5;
  border-radius: 0 2px 2px 0;
}
.trp-mod-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 4px;
}
.trp-mod-title {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.003em;
}
.trp-mod-tag {
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 1.5px 6px;
  border-radius: 3px;
  line-height: 1.3;
}
.trp-mod-tag.low   { color: var(--green); background: #F1F4EB; }
.trp-mod-tag.med   { color: var(--amber-warm); background: #FAF4E8; }
.trp-mod-tag.high  { color: var(--rust); background: #F7E8DF; }
.trp-mod-tag.clear { color: var(--plumink); background: var(--plumink-soft); }
.trp-mod-body {
  margin: 0;
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}
.trp-mod-body b { color: var(--ink); font-weight: 600; }

/* More-modules indicator below the three detail blocks */
.trp-mod-more {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0 4px 14px;
  opacity: 0.8;
}
.trp-mod-more-ell {
  font-size: 16px;
  letter-spacing: 0.2em;
  color: var(--ink-4);
  line-height: 1;
  font-family: var(--sans);
  padding: 0 4px;
}
.trp-mod-more-label {
  font-family: var(--sans);
  font-size: 11.5px;
  font-style: italic;
  color: var(--ink-3);
  font-weight: 450;
}
.trp-mod-more-meta {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-4);
  letter-spacing: 0.02em;
  margin-left: auto;
}

/* Single column below ~820px */
@media (max-width: 820px) {
  .trp-body { grid-template-columns: 1fr; gap: 20px; }
  .trp-scorecard {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 14px;
  }
}

/* ----- Header: subject identity + verdict badge ----- */
.trp-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
  padding-top: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.trp-head-l { min-width: 0; flex: 1; }
.trp-head-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.trp-mono {
  color: var(--ink-2);
  letter-spacing: 0.02em;
}
.trp-head-name {
  font-family: var(--sans);
  font-size: 26px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 6px;
}
.trp-head-meta {
  font-size: 12.5px;
  color: var(--ink-2);
  display: flex; flex-wrap: wrap; gap: 0 6px;
}
.trp-head-meta .trp-sep { color: var(--ink-4); }

/* Verdict badge cluster (right side of header) */
.trp-head-r {
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  flex: 0 0 auto;
}
.trp-badge {
  display: inline-flex; align-items: baseline; gap: 10px;
  padding: 8px 14px;
  background: #F1F4EB;
  border: 1px solid color-mix(in oklab, var(--green) 26%, var(--line));
  border-radius: 10px;
  position: relative;
}
.trp-badge::before {
  content: '';
  position: absolute;
  left: 10px; top: 10px; bottom: 10px;
  width: 2px;
  background: var(--green);
  opacity: 0.75;
}
.trp-badge.low  { background: #F1F4EB; border-color: color-mix(in oklab, var(--green) 26%, var(--line)); }
.trp-badge.low::before { background: var(--green); }
.trp-badge-label {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-left: 10px;
}
.trp-badge-value {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
  letter-spacing: -0.003em;
  text-transform: uppercase;
}
.trp-badge.low .trp-badge-value { color: var(--green); }
.trp-badge-score {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0;
}
.trp-badge-scale {
  color: var(--ink-4);
  font-weight: 400;
  font-size: 11px;
  margin-left: 1px;
}
.trp-rec {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans);
  font-size: 11.5px;
  color: var(--ink-2);
}
.trp-rec-dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: var(--plumink);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--plumink) 18%, transparent);
  position: relative;
  flex: 0 0 auto;
  align-self: flex-start;
  margin-top: 4px;
}
.trp-rec-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 999px;
  border: 1.5px solid var(--plumink);
  opacity: 0;
  animation: trpRecPulse 2.2s cubic-bezier(.4, 0, .2, 1) infinite;
}
@keyframes trpRecPulse {
  0%   { transform: scale(0.8); opacity: 0.55; }
  70%  { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}
.trp-rec-label {
  display: inline-flex; flex-direction: column; align-items: flex-end;
  line-height: 1.25;
  text-align: right;
}
.trp-rec-l1 { font-weight: 600; color: var(--ink); font-size: 12px; }
.trp-rec-l2 { font-size: 10.5px; color: var(--ink-3); font-weight: 400; letter-spacing: 0.002em; }

/* ----- Narrative summary ----- */
.trp-summary {
  padding-top: 0;
  padding-bottom: 4px;
}
.trp-summary p {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
  letter-spacing: -0.003em;
  text-wrap: pretty;
}
.trp-summary p b {
  font-weight: 600;
  color: var(--ink);
  background: linear-gradient(to top, color-mix(in oklab, var(--magenta) 14%, transparent) 0 34%, transparent 34% 100%);
  padding: 0 1px;
}
.trp-summary-muted {
  font-family: var(--sans) !important;
  font-size: 12.5px !important;
  color: var(--ink-3) !important;
  margin-top: 4px !important;
  line-height: 1.5 !important;
}

/* Inline citation refs — same face as body, semibold, no fill */
.trp-ref {
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  color: var(--ink);
  background: transparent;
  border-radius: 0;
  padding: 0;
  margin-left: 2px;
  vertical-align: baseline;
  letter-spacing: 0;
  line-height: inherit;
  cursor: help;
  transition: color 140ms ease;
}
.trp-ref:hover { color: var(--magenta); }

/* ----- Inline risk chips ----- */
.trp-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding-top: 6px;
  padding-bottom: 18px;
}
.trp-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 11.5px;
  color: var(--ink-2);
  line-height: 1;
  position: relative;
}
.trp-chip::before {
  content: '';
  width: 4px; height: 4px; border-radius: 999px;
  background: var(--ink-4);
  flex: 0 0 auto;
}
.trp-chip-k { color: var(--ink-3); font-size: 11px; }
.trp-chip-v {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-left: 2px;
  padding-left: 6px;
  border-left: 1px solid var(--line);
}
.trp-chip.low    { background: #F1F4EB; border-color: #DCE2CC; }
.trp-chip.low::before    { background: var(--green); }
.trp-chip.low    .trp-chip-v { color: var(--green); }

.trp-chip.med    { background: #FAF4E8; border-color: #ECDFBE; }
.trp-chip.med::before    { background: var(--amber-warm); }
.trp-chip.med    .trp-chip-v { color: var(--amber-warm); }

.trp-chip.high   { background: #F7E8DF; border-color: #E8C9B4; }
.trp-chip.high::before   { background: var(--rust); }
.trp-chip.high   .trp-chip-v { color: var(--rust); }

.trp-chip.clear  { background: var(--plumink-soft); border-color: color-mix(in oklab, var(--plumink) 22%, var(--line)); }
.trp-chip.clear::before  { background: var(--plumink); }
.trp-chip.clear  .trp-chip-v { color: var(--plumink); }

/* ----- Evidence row · two side-by-side cards ----- */
.trp-evidence {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding-top: 2px;
  padding-bottom: 16px;
}
.trp-ev {
  padding: 14px 16px;
  background: #FBF8F6;
  border: 1px solid var(--line);
  border-radius: 10px;
  position: relative;
}
.trp-ev::before {
  content: '';
  position: absolute;
  left: 0; top: 16px; bottom: 16px;
  width: 2px;
  background: var(--magenta);
  opacity: 0.55;
  border-radius: 0 2px 2px 0;
}
.trp-ev-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 6px;
}
.trp-ev-icon {
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--magenta);
  background: var(--magenta-soft);
  border-radius: 4px;
}
.trp-ev-title {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0;
}
.trp-ev-conf {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--plumink);
  background: var(--plumink-soft);
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.02em;
  line-height: 1;
}
.trp-ev-body {
  font-size: 12.5px;
  line-height: 1.52;
  color: var(--ink-2);
  text-wrap: pretty;
}
.trp-ev-body b {
  color: var(--ink);
  font-weight: 600;
}

/* ----- Outstanding callout ----- */
.trp-outstanding {
  display: flex; align-items: center; gap: 10px;
  padding-top: 4px;
  padding-bottom: 16px;
}
.trp-outstanding {
  /* A horizontal strip, not a box */
}
.trp-out-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--amber-warm);
  flex: 0 0 auto;
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--amber-warm) 18%, transparent);
}
.trp-out-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-warm);
  font-weight: 600;
}
.trp-out-body {
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.5;
}

/* ----- Sources list (now inside right rail) ----- */
.trp-scorecard-label-2 {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.trp-sources-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
}
.trp-sources-list li {
  display: flex; align-items: center; gap: 7px;
  font-size: 11px;
  color: var(--ink-3);
  padding: 3px 0;
  border-bottom: 1px dashed var(--line);
}
.trp-sources-list li:last-child { border-bottom: 0; }
.trp-sources-list li.more { opacity: 0.7; }
.trp-sources-list li.more .n {
  color: var(--ink-4);
  background: transparent;
  font-size: 12px;
  letter-spacing: 0.2em;
  padding: 0 4px;
}
.trp-sources-list li.more .s { color: var(--ink-3); font-style: italic; font-family: var(--sans); font-size: 10.5px; }
.trp-sources-list li.more .t { color: var(--ink-4); }
.trp-sources-list li .n {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--magenta);
  background: var(--magenta-soft);
  padding: 2px 4px;
  border-radius: 3px;
  min-width: 14px;
  text-align: center;
  letter-spacing: 0.02em;
  line-height: 1;
  font-weight: 600;
  flex: 0 0 auto;
}
.trp-sources-list li .s {
  font-family: var(--mono);
  color: var(--ink-2);
  font-size: 10px;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.trp-sources-list li .t {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex: 0 0 auto;
}

/* ----- Cascade reveal · each .reveal-step fades up in sequence ----- */
.reveal-step {
  opacity: 0;
  transform: translateY(10px);
  filter: blur(2px);
}
.tarth-report-card[data-phase="revealing"] .reveal-step,
.tarth-report-card[data-phase="done"]      .reveal-step {
  animation: trpReveal 720ms cubic-bezier(.2,.8,.2,1) both;
}
@keyframes trpReveal {
  from { opacity: 0; transform: translateY(12px); filter: blur(2px); }
  to   { opacity: 1; transform: none; filter: none; }
}
/* Stagger · 2 blocks: head, body */
.tarth-report-card[data-phase="revealing"] .reveal-step:nth-of-type(1),
.tarth-report-card[data-phase="done"]      .reveal-step:nth-of-type(1) { animation-delay: 60ms; }
.tarth-report-card[data-phase="revealing"] .reveal-step:nth-of-type(2),
.tarth-report-card[data-phase="done"]      .reveal-step:nth-of-type(2) { animation-delay: 240ms; }

/* ----- Responsive ----- */
@media (max-width: 820px) {
  .trp-head { flex-direction: column; gap: 12px; }
  .trp-head-r { align-items: flex-start; }
  .trp-sources-list { grid-template-columns: repeat(2, 1fr); }
  .tarth-report-card > .trp-head,
  .tarth-report-card > .trp-body,
  .tarth-report-card > .trp-sources { padding-left: 18px; padding-right: 18px; }
}
@media (max-width: 560px) {
  .trp-sources-list { grid-template-columns: 1fr; }
  .trp-head-name { font-size: 24px; }
}

/* ========================================================
   Motion — subtle reveal only
   Uses keyframe animations (not transitions) so reveals work
   reliably even when the preview iframe's transition clock
   is throttled or paused.
   ======================================================== */
.step-row { opacity: 0; transform: translateY(14px); }
.step-row.in { animation: stepRowReveal 700ms ease both; }
@keyframes stepRowReveal {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.tm-card { opacity: 0; transform: translateY(12px); }
.step-row.in .tm-card,
.step-row.in .tm-split > .tm-card { animation: tmCardReveal 600ms ease both; }
@keyframes tmCardReveal {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.step-row.in .frag-cluster > .tm-card:nth-child(1) { animation-delay: 80ms; }
.step-row.in .frag-cluster > .tm-card:nth-child(2) { animation-delay: 200ms; }
.step-row.in .tm-split > .tm-card:nth-child(1) { animation-delay: 200ms; }
.step-row.in .tm-split > .tm-card:nth-child(2) { animation-delay: 320ms; }

/* Hover still uses a transition for responsiveness */
.tm-card { transition: box-shadow 220ms ease; }
.step-row.in .tm-split > .tm-card:nth-child(1) { transition-delay: 200ms; }
.step-row.in .tm-split > .tm-card:nth-child(2) { transition-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
  .step-row, .tm-card { transition-duration: 200ms; }
  .tm-card { transform: none !important; }
}

/* ========================================================
   Responsive
   ======================================================== */
@media (max-width: 900px) {
  .step-row { grid-template-columns: 1fr; gap: 40px; }
  .step-row-reverse > .step-copy    { grid-column: 1; grid-row: 1; }
  .step-row-reverse > .frag-cluster { grid-column: 1; grid-row: 2; }
  .tm-split { grid-template-columns: 1fr; }
  .step-copy h3 { font-size: 34px; }
  .step-copy-wide h3 { font-size: 36px; }
  .step-stats { grid-template-columns: repeat(2, 1fr); gap: 16px 0; }
  .step-stat { border-right: 0; }
  .step-stat:nth-child(odd) { border-right: 1px dashed var(--line); }
  .fr-mod { grid-template-columns: 1fr; gap: 6px; }
  .fr-meta { flex-direction: column; align-items: flex-start; gap: 8px; }
}
