/* Running Total Calculator: options beside the starting balance, a line chart of the running total,
   and a scrollable table with a sticky header. */
/* Grid items default to min-width: auto, so a wide table would stretch the page; keep the column shrinkable. */
.t-running { grid-template-columns: minmax(0, 1fr); }
.t-running .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 800px) { .t-running .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.t-running .stat-value { font-size: 22px; }
.t-running .stat-note { margin-top: 4px; }

.t-running-options { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 16px 24px; align-items: start; }
.t-running-checks { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; padding-top: 4px; }
.calc .calc-option { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; cursor: pointer; }
.calc .calc-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.t-running .actions { flex-wrap: wrap; }
@media (max-width: 640px) {
  .t-running-options { grid-template-columns: minmax(0, 1fr); }
  .t-running .actions .btn { flex: 1 1 auto; }
  .t-running .result-actions { flex-wrap: wrap; }
}

.t-running-chart { position: relative; margin-top: 12px; }
.t-running-chart svg { display: block; width: 100%; height: 180px; }
.t-running-chart .area { fill: var(--tint-blue); }
.t-running-chart .line { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linejoin: round; }
.t-running-chart .zero { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.t-running-chart .grid { stroke: var(--line); stroke-width: 1; }
.t-running-axis { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.t-running-axis strong { color: var(--text); font-weight: 600; }

.t-running-table { max-height: 480px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.t-running-table:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.t-running-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.t-running-table th, .t-running-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.t-running-table th { position: sticky; top: 0; z-index: 1; background: var(--soft); font-weight: 600; }
.t-running-table .is-label { text-align: left; white-space: normal; min-width: 120px; overflow-wrap: anywhere; }
.t-running-table .is-num { color: var(--muted); width: 1%; }
.t-running-table .is-total { font-weight: 600; color: var(--text); }
.t-running-table .is-neg { color: var(--danger); }
.t-running-table tr.is-start td { background: var(--soft); color: var(--muted); }
.t-running-table tbody tr:last-child td { border-bottom: 0; }
.t-running .help[data-out="table-note"], .t-running .help[data-out="pct-note"] { margin: 8px 0; }

/* Page sections (content.mid_html) */
.t-running-page .t-running-formula { margin: 16px 0; padding: 12px 16px; border-radius: var(--radius); background: var(--soft); font-size: 16px; line-height: 1.6; overflow-x: auto; }
.t-running-page td, .t-running-page th { font-variant-numeric: tabular-nums; }
