/* Shared type roles for the dashboard, its reports, and drill-down dialogs. */
:root{
 --type-title:18px;
 --type-subtitle:16px;
 --type-body:14px;
 --type-caption:12px;
 --type-number:30px;
 --type-number-secondary:20px;
 --type-number-detail:18px;
 --type-line:1.5;
}
html.dashboard-type body{font-size:var(--type-body);line-height:var(--type-line)}
html.dashboard-type :is(button,input,select,textarea){font-family:inherit;font-size:var(--type-body);line-height:var(--type-line)}

/* Titles describe a module or a dialog; smaller headings describe its sections. */
html.dashboard-type :is(.card-title,.collection-overview .card-title,.finance-card .card-title,.ops-head h3,.collection-metrics-toolbar h2,.modal-card h3,.ops-dialog-head h3){font-size:var(--type-title);font-weight:650;line-height:var(--type-line)}
html.dashboard-type :is(.finance-panel-title h3,.finance-category-title>strong,.project-preview-group-head h3,.ops-head h4,.ops-dialog h4){font-size:var(--type-subtitle);font-weight:600;line-height:var(--type-line)}

/* Controls, labels, and table content use the same readable body size. */
html.dashboard-type :is(.btn,.apply,.ops-btn,.modal-close,.filter-toggle,.filter-actions button,.collection-metric-preview,.mini-tabs button,.workspace-tabs button,.ops-tabs button,.finance-tabs button,.budget-view-tabs button,.budget-metric-tabs button,.report-actions .btn,.finance-table .finance-detail-link,.export-card-btn,.rank-all-btn,.select,.picker-control input,.picker-option,.ops-input,.ops-select,.finance-controls input,.finance-controls select,.budget-window,.ops-rules input,.ops-rules select,.ops-link,.fee-chip){font-size:var(--type-body);line-height:var(--type-line)}
html.dashboard-type :is(.btn,.apply,.ops-btn,.modal-close,.filter-toggle,.collection-metric-preview,.mini-tabs button,.workspace-tabs button,.ops-tabs button,.finance-tabs button,.budget-view-tabs button,.budget-metric-tabs button){font-weight:500}
html.dashboard-type :is(.workspace-tabs button[aria-selected=true],.ops-tabs button.active,.finance-tabs button[aria-pressed=true],.budget-view-tabs button.active,.budget-metric-tabs button.active){font-weight:600}
html.dashboard-type :is(.field label,.finance-controls label,.ops-rules label,.collection-metric-group h3,.finance-metric>span,.budget-kpis>div>span,.ops-summary>div>span,.ops-detail-kpis>div,.ops-roles>div,.collection-metric-part dt,.collection-trend-stats>div>span,.project-preview-overview>div>span){font-size:var(--type-body);line-height:var(--type-line)}
html.dashboard-type :is(.field label,.collection-metric-group h3){font-weight:500}
html.dashboard-type :is(.data-table,.finance-table,.budget-table,.ops-table,.modal-card table,.data-table th,.data-table td,.finance-table th,.finance-table td,.budget-table th,.budget-table td,.ops-table th,.ops-table td,.modal-card th,.modal-card td,.table-project,.project-preview-info>strong,.project-preview-totals b,.finance-category>span,.finance-category-title,.ops-warning,.ops-warning strong,.ops-warning-types b,.ops-warning-detail,.ops-reasons,.ops-form-error,.empty-state,.finance-empty,.ops-empty,.detail-trend-note,.hover-tip,.toast){font-size:var(--type-body);line-height:var(--type-line)}

/* Explanations, statuses, chart annotations, and units always remain secondary. */
html.dashboard-type :is(.card-sub,.collection-overview .card-sub,.finance-card .card-sub,.filters .query-summary,.ops-note,.ops-head p,.ops-dialog-desc,.modal-card p,.ops-dialog-actions,.finance-period-label,.finance-footnote,.finance-chart-note,.finance-panel-title small,.finance-chart-legend,.finance-chart .column-state,.finance-chart .column-label,.finance-category small,.finance-metric small,.table-company,.ops-table td small,.project-preview-info>small,.project-preview-order,.project-preview-total-head,.project-preview-toolbar>span,.project-preview-group-head>small,.project-preview-group-head h3 span,.project-preview-totals,.collection-trend-insight,.collection-footnote,#collectionTrendHint,.chart-scroll-note,.legend,.workspace-caption,.collection-metrics-toolbar p,.collection-metric-part dt small,.collection-metric-debt-note,.footer,.budget-meta,.budget-hint,.budget-status,.finance-status,.pill,.ops-tag,.ops-warning-status,.ops-warning>span:not(.ops-warning-top),.ops-warning small,.filter-fields .picker-count){font-size:var(--type-caption);line-height:var(--type-line)}
html.dashboard-type :is(.collection-axis-label,.collection-value,.collection-target-label,.tick,.ops-trend-svg text){font-size:var(--type-caption)}
html.dashboard-type :is([data-amount-unit-label],.collection-metric-rate small,.collection-metric-part dd>span,.collection-metric-amount>span,.collection-trend-stats strong small,.project-preview-overview strong small,.project-preview-value>strong>small,.ops-summary small,.ops-detail-kpis small,.budget-kpis .amount-unit){font-size:var(--type-caption);font-weight:400;line-height:var(--type-line);letter-spacing:0}

/* Figures have their own hierarchy; table numbers retain the body size. */
html.dashboard-type :is(.collection-trend-stats strong,.project-preview-overview strong,.project-preview-value>strong,.ops-roles b){font-size:var(--type-number-secondary);font-weight:700;line-height:1.2;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
html.dashboard-type :is(.collection-metric-rate,.collection-trend-stats>div:first-child strong,.project-preview-overview>div:first-child strong,.finance-metric strong,.budget-kpis b,.ops-summary b,.collection-metric-amount b){font-size:var(--type-number);font-weight:700;line-height:1.2;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
html.dashboard-type :is(.collection-metric-part dd b,.ops-detail-kpis b){font-size:var(--type-number-detail);font-weight:650;line-height:1.3;font-variant-numeric:tabular-nums}
html.dashboard-type .finance-metric strong{white-space:nowrap}
html.dashboard-type .ops-summary b{overflow-wrap:normal;word-break:normal}
html.dashboard-type .budget-kpis b{white-space:normal}
html.dashboard-type .budget-kpis .amount-number{display:inline;color:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;white-space:nowrap;overflow:visible;text-overflow:clip}
html.dashboard-type .budget-kpis .amount-unit{white-space:nowrap}
@media(max-width:760px){:root{--type-number:24px}}

/* Keep the same number size on narrow phones; give complete amounts a full row. */
@media(max-width:380px){html.dashboard-type :is(.finance-metrics,.budget-kpis){grid-template-columns:minmax(0,1fr)}html.dashboard-type :is(.finance-metric,.budget-kpis>div){border-right:0;padding:0 12px}}
