/* Article 05 only. Tokens come from vi.css. */
.tool .fs { border: 0; margin: 0; padding: 0; display: grid; gap: 14px; min-width: 0; }
.tool .fs legend { padding: 0; margin: 0 0 4px; font-family: var(--f-display); font-size: 1.05rem; font-weight: 600; color: var(--ink-navy); }
.tool .fs + .fs { border-top: 1px solid var(--rule-cool); padding-top: 16px; }
.tool-table { padding: 8px clamp(16px, 3vw, 28px) 22px; background: var(--mist); }
.tool-table[hidden], .results [hidden] { display: none !important; }
.tool-sub { font-family: var(--f-display); font-size: 1.05rem; margin: 10px 0 8px; color: var(--ink-navy); }
.tool-table .help { margin-top: 8px; }
.tool .data-table { font-size: var(--t-xs); }
.tool .data-table th, .tool .data-table td { padding: 8px 8px; white-space: nowrap; }
.noscript-note { margin: 10px 28px; font-size: var(--t-sm); color: var(--brick); }
.sens td.neg, .sens td.pos { font-variant-numeric: tabular-nums; }
.sens tr.hl td, .sens tr.hl th { background: #FBF5E8; }


/* Revision: calculator fits narrow phones; result table readable on the navy panel. */
.tool-grid > * { min-width: 0; }
.results { min-width: 0; overflow-wrap: anywhere; }
.results .kpis { grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr)); }
.results .kpi dt { overflow-wrap: anywhere; }
.results .table-wrap { background: none; max-width: 100%; }
.results .data-table { font-size: var(--t-xs); width: 100%; color: var(--on-dark); }
.results .data-table th, .results .data-table td { white-space: normal; color: var(--on-dark); padding: 8px 6px; border-color: rgba(255,255,255,.22); background: none; }
.results .data-table thead th { color: var(--on-dark-soft, #D6E0E8); font-weight: 600; }
.results .data-table thead th { color: #D9E3EA; }
@media (max-width: 420px) { .results .kpis { grid-template-columns: minmax(0, 1fr); } }
.results .data-table th, .results .data-table td { overflow-wrap: normal; word-break: normal; hyphens: none; }
.results .data-table thead th { letter-spacing: 0.04em; font-size: 0.72rem; }
.results .data-table tbody th { white-space: nowrap; }
.results .data-table td { white-space: nowrap; }
@media (max-width: 420px) { .results .data-table th, .results .data-table td { padding: 8px 4px; } .results .data-table thead th:first-child { width: 42%; } }
@media print {
  .results .data-table, .results .data-table th, .results .data-table td, .results .data-table thead th { color: #000 !important; border-color: #999 !important; }
  .results .table-wrap { overflow: visible; }
  .tool { break-before: page; break-inside: auto; }
  .tool-grid { grid-template-columns: minmax(0, 1fr); }
  .results { break-inside: avoid; }
}
@media print { .tool .controls { break-inside: auto; display: block; } .tool .fs { break-inside: avoid; margin-bottom: 10px; } .tool-head { break-after: avoid; } }
