/* Route trace (inside "Technical details"): one row per identifier, one
   rounded cell per station. Passed: soft green with ✓. Failed: soft red
   (amber for a caution result) with ✕. Not reached: dashed outline.
   Cells reveal left to right; none of it moves under reduced motion. */

.ledger { display: grid; gap: 14px; container-type: inline-size; }

.ledger-row { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 6px 12px; align-items: center; }
.ledger-row__id { display: grid; min-width: 0; }
.ledger-row__scheme { font-size: 0.8125rem; color: var(--ink-2); }
.ledger-row__value { font-size: 0.875rem; font-weight: 700; overflow-wrap: anywhere; }

.ledger-cells { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }

.cell { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 38px; padding: 6px 10px; border-radius: 12px; font-size: 0.8125rem; font-weight: 600; line-height: 1.25; border: 2px solid transparent; }
.cell__label { min-width: 0; overflow-wrap: anywhere; }
.cell__mark { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.cell--ok { background: var(--clear-bg); color: var(--clear); }
.cell--failed { background: var(--stop-bg); color: var(--stop); font-weight: 800; }
.ledger--caution .cell--failed { background: var(--caution-bg); color: var(--caution); }
.cell--unknown { background: transparent; border: 2px dashed var(--field); color: var(--ink-2); }

.ledger-row__reason, .ledger-row__meta { grid-column: 2; margin: 0; font-size: 0.8125rem; }
.ledger-row__reason { display: flex; align-items: center; gap: 6px; color: var(--stop); font-weight: 700; }
.ledger--caution .ledger-row__reason { color: var(--caution); }
.ledger-row__meta { display: flex; flex-wrap: wrap; gap: 2px 18px; color: var(--ink-2); }
.ledger-row__meta div { display: flex; gap: 6px; }
.ledger-row__meta dd { margin: 0; color: var(--ink); font-weight: 600; }

@container (max-width: 30rem) {
  .ledger-row { grid-template-columns: minmax(0, 1fr); }
  .ledger-cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger-row__reason, .ledger-row__meta { grid-column: 1; }
}

@media (prefers-reduced-motion: no-preference) {
  .cell, .ledger-row__reason { animation: cell-in 180ms cubic-bezier(0.05, 0.7, 0.1, 1) both; }
  .ledger-row + .ledger-row { --row-delay: 400ms; }
  .cell:nth-child(1) { animation-delay: calc(var(--row-delay, 0ms) + 0ms); }
  .cell:nth-child(2) { animation-delay: calc(var(--row-delay, 0ms) + 80ms); }
  .cell:nth-child(3) { animation-delay: calc(var(--row-delay, 0ms) + 160ms); }
  .cell:nth-child(4) { animation-delay: calc(var(--row-delay, 0ms) + 240ms); }
  .ledger-row__reason { animation-delay: calc(var(--row-delay, 0ms) + 320ms); }
}
@keyframes cell-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
