/* Ledger charts own only their figure. Exact values and drill-down actions
   remain in the existing native table; the plot adds no scripts or motion. */
.ledger-chart {
 --chart-ink:#403a2d;--chart-rule:#cebea0;--chart-paper:#f8eed8;
 margin:1.5rem 0 2rem;padding:1.15rem 1.2rem 1rem;min-width:0;
 color:var(--chart-ink);border:1px solid #c5af84;border-top:3px double #af9060;border-radius:3px;
 background:linear-gradient(#fbf2e5c9,#f3e7ce9e);box-shadow:inset 0 1px #fff9e8;
}
.ledger-chart-caption { display:flex;align-items:baseline;justify-content:space-between;gap:1rem;line-height:1.45;margin-bottom:1rem; }
.ledger-chart-caption strong { min-width:0;overflow-wrap:anywhere;font-family:Georgia,serif;font-size:1.1rem;font-weight:400;color:#624a2c; }
.ledger-chart-unit { flex:none;font-size:max(14px, .7rem);font-weight:750;letter-spacing:.1em; }
.ledger-chart .ledger-chart-legend { display:flex;flex-wrap:wrap;gap:.6rem 1.25rem;padding:0;margin:0 0 1.6rem;list-style:none; }
.ledger-chart .ledger-chart-legend li { display:flex;align-items:center;gap:.45rem;font-size:max(14px, .8rem);line-height:1.4;color:var(--chart-ink); }
.ledger-chart-legend small { color:#75664e;font:inherit;font-size:max(14px, .75rem); }
.ledger-chart [data-series=revenue] { --series:#296354;--series-dash:none; }
.ledger-chart [data-series=cogs] { --series:#956222;--series-dash:7 4; }
.ledger-chart [data-series=labor] { --series:#755080;--series-dash:2 4; }
.ledger-chart [data-series=contribution] { --series:#27698a;--series-dash:10 3 2 3; }
.ledger-chart-symbol { display:block;width:14px;height:14px;flex:0 0 14px;fill:var(--series);stroke:var(--series);stroke-width:1; }
.ledger-chart [data-missing=true] .ledger-chart-symbol { fill:none;stroke-dasharray:2 1; }
.ledger-chart-body { container:ledger-axis / inline-size;display:grid;grid-template-columns:4.5rem minmax(0,1fr);grid-template-rows:240px auto;gap:0 .75rem;padding-top:.25rem; }
.ledger-chart-y-axis,.ledger-chart-plot { position:relative;min-width:0; }
.ledger-chart-y-label { position:absolute;right:0;max-width:100%;transform:translateY(-50%);font-size:max(14px, .75rem);line-height:1.2;font-variant-numeric:tabular-nums;color:#72644c;white-space:nowrap; }
.ledger-chart-y-label.is-zero { color:#403a2d;font-weight:750; }
.ledger-chart-geometry { display:block;width:100%;height:100%;overflow:visible; }
.ledger-chart-gridline { stroke:var(--chart-rule);stroke-width:1;stroke-dasharray:2 4; }
.ledger-chart-gridline.is-zero { stroke:#7b6a50;stroke-width:1.5;stroke-dasharray:none; }
.ledger-chart-segment { fill:none;stroke:var(--series);stroke-width:2;stroke-linecap:round;stroke-dasharray:var(--series-dash); }
.ledger-chart-point { fill:var(--series);stroke:var(--series);stroke-width:1.5; }
.ledger-chart-point.is-incomplete { fill:var(--chart-paper);stroke-width:2; }
.ledger-chart-x-axis { position:relative;grid-column:2;min-height:2.5rem;margin-top:.85rem; }
.ledger-chart-x-label { position:absolute;top:0;width:max-content;max-width:min(7rem,45%);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transform:translateX(-50%);font-size:max(14px, .75rem);line-height:1.35;text-align:center;font-variant-numeric:tabular-nums;color:#675b45; }
.ledger-chart-x-label[data-rank=inner] { display:none; }
.ledger-chart-x-label[data-edge=first] { transform:none;text-align:start; }
.ledger-chart-x-label[data-edge=last] { transform:translateX(-100%);text-align:end; }
/* Three anchors use at most 20% of the plot each. Even the nearest middle
   anchor (one third) cannot collide with an endpoint. Narrow plots use two. */
@container ledger-axis (width >= 560px) {
 .ledger-chart-x-label { max-width:min(7rem,20%); }
 .ledger-chart-x-label[data-rank=inner] { display:block; }
}
.ledger-chart .ledger-chart-note { margin:.7rem 0 0;font-size:max(14px, .8rem);line-height:1.6;color:#70614a; }
.ledger-chart[data-chart-empty=true] { border-style:dashed;box-shadow:none; }
@media(max-width:680px) {
 .ledger-chart { padding:1rem .65rem .6rem;margin-top:1.1rem; }
 .ledger-chart-caption { gap:.6rem; }
 .ledger-chart-caption strong { font-size:1rem; }
 .ledger-chart .ledger-chart-legend { gap:.65rem;display:grid;grid-template-columns:repeat(2,minmax(0,1fr)); }
 .ledger-chart .ledger-chart-legend li { align-items:start;font-size:max(14px, .75rem); }
 .ledger-chart-symbol { margin-top:2px; }
 .ledger-chart-body { grid-template-columns:3.8rem minmax(0,1fr);grid-template-rows:205px auto;column-gap:.55rem; }
 .ledger-chart-x-label[data-rank=inner] { display:none; }
 .ledger-chart-x-label { max-width:min(7rem,45%); }
}
@media(forced-colors:active) {
 .ledger-chart { border-color:CanvasText;background:Canvas;color:CanvasText;box-shadow:none; }
 .ledger-chart [data-series] { --series:CanvasText; }
 .ledger-chart-point.is-incomplete { fill:Canvas; }
 .ledger-chart-gridline { stroke:GrayText; }
 .ledger-chart-gridline.is-zero { stroke:CanvasText; }
 .ledger-chart :is(.ledger-chart-caption strong,.ledger-chart-legend li,.ledger-chart-unit,.ledger-chart-x-label,.ledger-chart-y-label,.ledger-chart-note,.ledger-chart-note a) { color:CanvasText; }
}
