/* One screen-only type scale across People, Cash Flow and employee access.
   Important declarations deliberately retire conflicting legacy page font sizes.
   Print/PDF layouts keep their own physical-page type scale. */
@media screen {
    :root { --type-body: 12.5px; --type-label: 12px; --type-meta: 11px; --type-table: 12px; --type-h1: 20px; --type-h2: 14.5px; --type-h3: 13px; --type-value: 17px; --type-input: 12.5px; }
    body { font-size: var(--type-body) !important; line-height: 1.5; }
    body :is(div,section,article,aside,nav,header,footer,form,fieldset,legend) { font-size: inherit; }
    body :is(p,li,dt,dd,label,summary,a,span,strong,b,em) { font-size: var(--type-body) !important; }
    body :is(input,select,textarea,button,.button) { font-size: var(--type-input) !important; line-height: 1.4; }
    body :is(label,th,.eyebrow,.section-kicker,.field-label) { font-size: var(--type-label) !important; }
    body :is(td,td :is(span,strong,b,a),.badge,.status-badge) { font-size: var(--type-table) !important; }
    body :is(small,.note,.field-help,.info-popover,.info-popover p,.info-popover li,.muted,.eyebrow,.report-meta) { font-size: var(--type-meta) !important; }
    body :is(h1,h1 span,h1 strong,h1 a) { font-size: var(--type-h1) !important; line-height: 1.25; font-weight: 650; }
    body :is(h2,h2 span,h2 strong,h2 a) { font-size: var(--type-h2) !important; line-height: 1.35; font-weight: 650; }
    body :is(h3,h3 span,h3 strong,h3 a,h4,h5,h6) { font-size: var(--type-h3) !important; line-height: 1.4; font-weight: 650; }
    body :is(.metric strong,.action-metric strong,.report-summary strong,.maintenance-stat strong,
        .monitor-metric-card strong,.dashboard-ai-metrics strong,.dashboard-ai-status,
        .annual-overview-grid strong,.annual-dialog-metrics strong,.employee-centre-kpis strong,
        .payroll-hero-position strong,.payroll-bulk-status-summary strong,
        .cashflow-kpis strong,.cashflow-period-total-strip strong,.cashflow-partner-kpis strong,
        .cashflow-forecast-strip strong,.cashflow-forecast-periods strong,.company-card-balance strong) {
        font-size: var(--type-value) !important; line-height: 1.3; font-weight: 650;
    }
    body :is(.payroll-line-grid strong,.today-duty-mini strong,.staff-action-card strong,
        .employee-centre-identity strong,.duty-switcher-header strong,.annual-policy-strip strong,
        .hr-finance-hero-status strong,.software-settings-status strong,.dashboard-ai-analysis b) {
        font-size: var(--type-h2) !important; line-height: 1.35;
    }
    body :is(.primary-navigation,.site-nav,.top-nav) :is(a,button,summary) { font-weight: 600; }
    body .info-tip > summary { font-size: 12px !important; }
    body :is(.duty-nav-button,.payroll-month-step) { font-size: 16px !important; }
    body svg text { font-size: 11px; }
    /* Let table wrappers scroll inside grid cells instead of widening the page. */
    .cashflow-daily-layout > *, .cashflow-monthly-grid > *, .cashflow-partner-layout > *,
    .employee-centre-split-tables > *, .two-column-layout > *, .cashflow-field-group { min-width: 0; max-width: 100%; }
}
@media screen and (max-width:1100px), screen and (pointer:coarse) {
    :root { --type-body:13px; --type-table:12px; --type-label:12px; --type-meta:11.5px; --type-input:16px; }
    body :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea) { min-height:44px; }
    body :is(button,.button) { min-height:44px; font-size:13px !important; }
    /* Compact text does not mean smaller tappable controls. */
    body .info-tip > summary { min-width:28px; min-height:28px; }
    .payslip-sheet { width:100%; max-width:100%; padding:16px; }
    .payslip-sheet > *, .payslip-money-grid > * { min-width:0; max-width:100%; }
    .payslip-money-grid { overflow-x:auto; }
    .print-page .print-sheet { width:calc(100% - 24px); max-width:calc(100% - 24px); min-width:0; margin:12px; padding:16px; overflow-x:auto; }
    .print-page .print-table { table-layout:auto; }
    .print-page .print-table :is(th,td) { width:auto !important; min-width:60px; white-space:normal; overflow-wrap:normal; }
}
@media screen and (max-width:600px) {
    .print-page .report-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
