/* Instant calculators: typed number box, chart and year-by-year table (static/js/calc_ui.js). */
.calc-instant button[type="submit"] { display: none; }
.form-box .calc-num { max-width: 11rem; margin: .25rem 0 .5rem; }
.form-box .calc-num.is-invalid { border-color: #a8322a; }
.calc-extras { margin-top: 1.5rem; }
.calc-hint { color: #a8322a; font-weight: 600; margin: 0 0 .75rem; }
.calc-chart { position: relative; }
.calc-chart-title { font-weight: 600; margin: 0 0 .25rem; }
.calc-chart svg { display: block; max-width: 100%; height: auto; }
.calc-grid { stroke: #dcdcdc; stroke-width: 1; }
.calc-axis { fill: #5d6672; font-size: 11px; }
.calc-bar.s0, .calc-legend .s0::before { fill: #2f3640; background: #2f3640; }
.calc-bar.s1, .calc-legend .s1::before { fill: #2d7a4f; background: #2d7a4f; }
.calc-legend { display: flex; gap: 1rem; font-size: .85rem; margin-top: .25rem; }
.calc-legend span::before { content: ""; display: inline-block; width: .7rem; height: .7rem; margin-right: .35rem; border-radius: 2px; }
.calc-tip { position: absolute; top: 1.6rem; background: #fff; border: 1px solid #ccc; box-shadow: 0 2px 6px rgba(0,0,0,.15); padding: .35rem .6rem; font-size: .8rem; border-radius: 4px; pointer-events: none; max-width: 90%; }
.calc-table-scroll { overflow-x: auto; margin-top: 1rem; }
.calc-table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.calc-table caption { text-align: left; font-weight: 600; padding-bottom: .35rem; caption-side: top; }
.calc-table th, .calc-table td { padding: .4rem .6rem; border-bottom: 1px solid #e5e5e5; text-align: right; }
.calc-table th:first-child, .calc-table td:first-child { text-align: left; }
.calc-toggle { margin-top: .5rem; }
@media (prefers-color-scheme: dark) {
  .calc-grid { stroke: #3a3f46; } .calc-axis { fill: #a0a8b2; }
  .calc-bar.s0, .calc-legend .s0::before { fill: #9aa4b2; background: #9aa4b2; }
  .calc-tip { background: #1e2227; border-color: #3a3f46; color: #e7e9ec; }
  .calc-table th, .calc-table td { border-color: #3a3f46; }
}
