/* RECATOOLS tool pattern: rtp-breakdown — OPT-IN.
   A compact numeric table for showing how a formula's result is built term by term
   (term · count · weight · contribution, with a total row in <tfoot>), or any small
   table of figures. Presentational only: no maths lives here.

   Opt in from a widget:
     @push('head') <link rel="stylesheet" href="{{ asset('assets/css/tool-patterns/breakdown.css') }}"> @endpush

   Markup:
     <div class="rtp-breakdown-wrap">            scrolls sideways on a phone instead of the page
       <table class="rtp-breakdown">
         <thead><tr><th scope="col">Term</th><th scope="col" class="rtp-num">Adds</th></tr></thead>
         <tbody><tr><th scope="row">Home runs</th><td class="rtp-num">+1.30</td></tr></tbody>
         <tfoot><tr><th scope="row">Total</th><td class="rtp-num">3.17</td></tr></tfoot>
       </table>
     </div>

   Colours are the theme tokens (public/assets/css/rt-tokens.css), so [data-theme="dark"]
   follows. Documented in docs/tool-design-patterns.md. First used by /mlb-fip-calculator/. */

.rtp-breakdown-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rt-hairline, #E6E1D4); border-radius: 10px; background: var(--rt-surface, #fff); }
.rtp-breakdown { width: 100%; border-collapse: collapse; font-size: .86rem; color: var(--rt-ink, #0F1E33); }
.rtp-breakdown th,
.rtp-breakdown td { padding: .5rem .75rem; text-align: left; border-bottom: 1px solid var(--rt-hairline, #E6E1D4); }
.rtp-breakdown thead th { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--rt-ink-muted, #5C646F); background: var(--rt-surface-2, #FAFAF7); white-space: nowrap; }
.rtp-breakdown tbody th { font-weight: 600; white-space: nowrap; }
.rtp-breakdown .rtp-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rtp-breakdown tbody tr:last-child th,
.rtp-breakdown tbody tr:last-child td { border-bottom: 2px solid var(--rt-ink-muted, #5C646F); }
.rtp-breakdown tfoot th,
.rtp-breakdown tfoot td { font-weight: 700; border-bottom: none; background: var(--rt-surface-2, #FAFAF7); }
.rtp-breakdown tfoot td:last-child { font-size: 1rem; }
@media (max-width: 480px) { .rtp-breakdown { font-size: .8rem; } .rtp-breakdown th, .rtp-breakdown td { padding: .45rem .5rem; } .rtp-breakdown tbody th { white-space: normal; } }
