.ledger-plot {min-width:0;color:var(--ink,#183325)}
.ledger-plot .lc-top,.ledger-plot .lc-footer,.ledger-plot .lc-controls{display:flex;align-items:center;justify-content:space-between}
.ledger-plot .lc-top{gap:1rem}
.ledger-plot h3{margin:0;font:550 .97rem/1.25 var(--sans,system-ui)}
.ledger-plot .lc-current{font:550 .84rem/1.4 var(--sans,system-ui);font-variant-numeric:tabular-nums;white-space:nowrap}
.ledger-plot .lc-svg{display:block;overflow:visible;margin:11px 0 0;width:100%;height:130px}
.lc-grid{stroke:var(--line,#d4ddcf);stroke-width:1}
.lc-axis{fill:var(--muted,#59695b);font:12px var(--sans,system-ui);font-variant-numeric:tabular-nums}
.lc-steps{fill:none;stroke:var(--green,#366c4b);stroke-width:2;stroke-linejoin:round}
.lc-area{fill:#82ad791b}.lc-dot{fill:var(--green,#366c4b);stroke:var(--paper,#faf9f5);stroke-width:1.2}
.lc-halo{fill:#759b6560}.lc-guide{stroke:#7e9d77;stroke-dasharray:3 4}
.lc-svg [data-point-index]{cursor:pointer}
.ledger-plot .lc-footer{gap:9px;min-height:34px}
.ledger-plot .lc-selection{font-size:.79rem;line-height:1.4;color:var(--muted,#59695b)}
.ledger-plot .lc-controls{flex:none;gap:4px}
.lc-controls button{display:grid;place-items:center;min-width:32px;min-height:32px;padding:0;border:1px solid var(--line,#d4ddcf);border-radius:4px;background:transparent;color:var(--ink,#183325)}
.lc-controls svg{fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.lc-controls button:hover:enabled{background:#dae6d655}
.lc-controls button:disabled{opacity:.38;cursor:default}
@media(max-width:550px){.lc-controls button{min-width:36px;min-height:36px}}

/* Only the changed figures and the new segment receive emphasis; the old
   record remains readable while the new event settles into the ledger. */
@media (prefers-reduced-motion: no-preference) {
  [data-ledger-enter="figure"] {
    display: inline-block;
    animation: lc-figure-in 380ms cubic-bezier(.21,.72,.28,1) both;
  }
  [data-ledger-enter="row"] {
    animation: lc-row-ink 720ms ease-out both;
    --lc-row-ink: rgb(73 123 80 / 18%);
  }
  [data-event="borrowed"][data-ledger-enter="row"] { --lc-row-ink: rgb(166 120 58 / 17%); }
  .lc-steps[data-ledger-enter="line"] {
    stroke-dasharray: var(--lc-line-length) var(--lc-line-length);
    animation: lc-write-balance 480ms cubic-bezier(.35,.05,.28,1) both;
  }
  .lc-halo[data-ledger-enter] {
    transform-box: fill-box;
    transform-origin: center;
    animation: lc-settle-point 330ms ease-out both;
  }
  .lc-halo[data-ledger-enter="event"] { animation-delay: 360ms; }
  [data-ledger-visibility="outside"] [data-ledger-enter] { animation-play-state: paused; }

  @keyframes lc-write-balance {
    from { stroke-dashoffset: var(--lc-tail-length); }
    to { stroke-dashoffset: 0; }
  }
  @keyframes lc-settle-point {
    from { transform: scale(.72); opacity: .55; }
    55% { transform: scale(1.22); opacity: .95; }
    to { transform: scale(1); opacity: 1; }
  }
  @keyframes lc-figure-in {
    from { opacity: .82; transform: translateY(2px); color: #48684a; }
    to { opacity: 1; transform: translateY(0); color: inherit; }
  }
  @keyframes lc-row-ink {
    from { background-color: var(--lc-row-ink); }
    to { background-color: transparent; }
  }
}
