/* The New Type A · outputs · audit trail page. Uses the tokens in styles.css. */

.back {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.back::before { content: '←'; margin-right: 6px; color: var(--accent-text); }

.audit-head { padding: 4px 4px 0; margin-bottom: 18px; }
.audit-head .title { font-size: 26px; text-wrap: balance; }
.audit-head .lede { color: var(--muted); font-size: 15px; margin-top: 8px; }

.outcome {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 700;
}

.outcome-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.outcome.quiet .outcome-dot { background: transparent; border: 2px solid var(--muted); }
.outcome.hold .outcome-dot { background: transparent; border: 2px dashed var(--accent); }

/* ---- timeline ----------------------------------------------------------- */

.timeline-card { padding: 22px 18px 8px; }

.step {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  column-gap: 14px;
  padding-bottom: 20px;
}

/* the line that joins one numbered step to the next */
.step::after {
  content: '';
  position: absolute;
  left: 15px;
  top: 36px;
  bottom: 4px;
  width: 2px;
  border-radius: 1px;
  background: var(--line);
}

.step:last-child::after { display: none; }

.num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--surface);
  border: 2px solid var(--line);
  color: var(--muted);
}

.step-body { min-width: 0; padding-top: 4px; }
.step-text { font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }

.step-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 3px;
  color: var(--muted);
}

/* went ahead: solid accent */
.step.go .num { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.step.go .step-tag { color: var(--accent-text); }
.step.go .step-text { font-weight: 600; }

/* set aside: dashed and quiet */
.step.drop .num { border-style: dashed; border-color: var(--muted); }
.step.drop .step-text { color: var(--muted); }

/* refused or stopped: solid ink, with a filled tag */
.step.refusal .num, .step.stop .num { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.step.refusal .step-tag, .step.stop .step-tag {
  background: var(--ink);
  color: var(--surface);
  border-radius: 6px;
  padding: 2px 7px;
  margin-bottom: 6px;
}
.step.refusal .step-text { font-weight: 600; }

/* held as a draft: dashed accent, like the draft card on the plan screen */
.step.hold .num { border: 2px dashed var(--accent); color: var(--accent-text); }
.step.hold .step-tag { color: var(--accent-text); }

/* preview: the same dashed label as the plan screen */
.step.preview .num { border: 2px dashed var(--muted); }
.step.preview .step-text {
  display: inline-block;
  font-weight: 700;
  font-size: 15px;
  border: 2px dashed var(--muted);
  border-radius: 12px;
  padding: 6px 12px;
}

/* ---- the titles behind a grouped step ----------------------------------- */

.more { margin-top: 6px; }

.more summary {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 2px 4px 2px 0;
  cursor: pointer;
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 600;
  list-style: none;
}

.more summary::-webkit-details-marker { display: none; }
.more summary::after { content: '▾'; margin-left: 6px; font-size: 12px; }
.more[open] summary::after { content: '▴'; }

.more-list {
  margin-top: 4px;
  padding: 2px 0 2px 12px;
  border-left: 2px solid var(--line);
  color: var(--ink);
  font-size: 14px;
}

.more-list li { padding: 3px 0; overflow-wrap: anywhere; }
ol.more-list { counter-reset: rank; }
ol.more-list li { counter-increment: rank; }
ol.more-list li::before { content: counter(rank) '. '; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---- what is left out ---------------------------------------------------- */

.card.left-out { background: transparent; border-style: dashed; }
.left-out p { color: var(--muted); font-size: 14px; }

@media (max-width: 359px) {
  .timeline-card { padding: 18px 14px 4px; }
  .step { column-gap: 10px; }
}
