/* Shared Uzuh product typography. Load last; local presentation files are excluded.
   Explicit text roles override legacy compact rules. Large amounts and headings
   retain their own scale; no universal element/number size override is used. */
:root{--uzuh-text:16px;--uzuh-caption:14px;--uzuh-leading:1.6;--uzuh-muted:#60725d}
body{font-size:var(--uzuh-text);line-height:var(--uzuh-leading)}

/* Paragraphs, descriptions, records and field contents. */
body :is(p,li,.subtitle,.cards-subtitle,.signin-description,.connection-description,
 .hint,.cash-caveat,.cash-first-day,.cash-model-note,.sync-warning,.dialog-intro,
 .review-submit-row,.duplicate-review,.duplicate-check,.line-item,.allocation,
 .audit-row,.rs-notice,.rs-field,.rs-equivalent,.rs-trial-assumption,.rs-trial-tools,
 .rs-trial-result dl div,.rs-retained-list>div,.rs-employment-grid dl,.rs-setup-list span,
 .ykb-reconcile>div:not(.line-item),.statement-title strong,.statement-meta strong,
 .statement-money strong.is-unknown,.statement-selected strong,.statement-document strong,
 .selected-file strong,.upload-item-name,.review-banner strong,.review-row strong,
 .due-row strong,.coverage strong,.bank-days strong,.plan-check strong,
 .match-side h3,.rs-live-people strong,.rs-setup-list strong,.ykb-cost strong,
 .upload-drop>strong,.statement-drop strong,.budget-breakdown-row,.cash-balance-formula p){font-size:var(--uzuh-text)!important;line-height:var(--uzuh-leading)!important}
body :is(input,select,textarea){font-size:var(--uzuh-text)!important;line-height:1.5!important}
body :is(input,textarea)::placeholder{font-size:var(--uzuh-text)!important;color:#74826d}
body :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=file]){min-height:48px;max-width:100%}
body :is(.form-grid,.field,.rs-field) :is(input,select,textarea){min-width:0}

/* Secondary information never drops below 14px, including chart labels and pills. */
body :is(small,.eyebrow,.brand-sub,.nav-caption,.version,.breadcrumb,.top-right,
 .company-icon,.profile>span:first-child,.avatar,.bank-icon,.bank-mark,.guidance-icon,
 .stat-label,.stat-foot,.submoney,.period-label,.legend,.chart-axis,.chart-caption,
 .chart-month label,.badge,.count-pill,.status-badge,.tabs .number,.pagination,
 .source-file,.source-hash,.section-label,.source-note,.fine-print,.form-error,
 .budget-title,.budget-status,.budget-basis,.budget-small-note,.budget-metric-label,
 .budget-person-hint,.budget-year-total,.budget-period>label,.cash-metric-label,
 .cash-summary-note,.cash-card-note,.cash-card-values dt,.cash-list-more>span,
 .cash-metric-link,.cash-balance-strip span,.plan-basis,.plan-basis strong,
 .timeline-date,.timeline-amount,.timeline-balance,.history-callout strong,
 .expense-parts small,.invoice-month-currency span,.bank-bridge span,
 .cash-detail-total>span,.cards-metric-label,.cards-basis,.bank-amounts dt,
 .bank-usage,.bank-days span,.bank-note,.statement-toolbar label,.statement-paid,
 .statement-remaining span,.dialog-note,.cards-progress,.upload-status,
 .upload-card .upload-footnote,.connection-details dt,.coverage-item span,
 .report-toolbar,.feature-labels span,.brand-bottom,.signin-label,.login-status,
 .signin-note p,.login-footer,.cards-footer,.uploads-footer,footer,
 .detail-grid dt,.rs-state,.rs-sticky span,.rs-roster-foot,.rs-live-head span,
 .rs-live-people span,.rs-live-result dt,.rs-live-gap>span,.rs-live-caveat,
 .rs-project-exclusion,.rs-project-summary span,.rs-project-foot,.rs-project-supplier,
 .rs-salary-grid span,.rs-payroll-sources,.rs-month-numbers span,.rs-year-note,
 .rs-person-cost,.rs-scope-note,.rs-trial-eyebrow,.rs-trial-balance span,
 .rs-trial-foot,.rs-trial-notes,.form-grid label>span,.single-label>span){font-size:var(--uzuh-caption)!important;line-height:var(--uzuh-leading)!important}
body :is(.card-head p,.review-row p,.review-banner p,.account p,.due-row p,
 .match-side p,.suggestion-bottom p,.audit-row p,.coverage p,.line-item p,
 .cash-first-day p,.cash-inline-risk p,.cash-opportunity p,.cash-card-summary-heading p,
 .revenue-notes p,.pipeline-note p,.history-callout p,.sales-answer p:last-child,
 .rs-hero p:last-child,.rs-roster-head p,.rs-options p,.rs-project-summary p,
 .rs-contract-summary p,.rs-month-card p,.rs-pair-details p,.rs-trial-result p,
 .rs-employment-grid p,.rs-setup-plan p,.connection-heading p,.connections-notes p,
 .section-heading p,.statement-empty p,.statement-guidance p,.previous-balance-review>p){font-size:var(--uzuh-caption)!important;line-height:var(--uzuh-leading)!important}
body :is(label,.field label,.form-grid label,.single-label,.inline-check,.manual-choice span,
 .plan-check,.previous-balance-review label,.rs-toolbar label){font-size:var(--uzuh-text)!important;line-height:1.5!important}
body :is(.field label,.statement-toolbar label,.budget-period>label,.rs-toolbar label){font-size:var(--uzuh-caption)!important}
body :is(.detail-grid dd,.connection-details dd){font-size:var(--uzuh-text)!important;line-height:1.6!important}

/* Titles remain titles. Small legacy section headings get a readable floor. */
body :is(.account h3,.invoice-month h3,.budget-input-card h3,.connections-notes h2,
 .previous-balance-review h3,.rs-options h3,.rs-salary-comparison h3,
 .rs-employment-grid h3,.rs-setup-plan h3){font-size:18px!important;line-height:1.5!important}
body :is(.cash-columns .card-head h2,.cash-home .cash-upcoming .card-head h2,
 .cash-card-summary-heading h2,.cash-support .card-head h2){font-size:20px!important;line-height:1.5!important}
body :is(.heading h1,.cards-heading h1,.drawer-header h2,.cards-dialog-head h2){overflow-wrap:break-word}
body :is(.heading,.cards-heading,.card-head,.section-heading,.drawer-header,.cards-dialog-head){gap:20px}
body :is(.heading,.cards-heading,.card-head,.section-heading)>div{min-width:0}

/* Controls have space for their label and a 44px minimum target. */
body :is(button,.btn,.chip,.file-button,.calendar-event,summary){min-height:44px}
body :is(button,.btn,.chip,.file-button,.calendar-event){min-width:44px}
body :is(.btn,.text-btn,.chip,.tabs button,.scenario-switch button,.rs-jumps button,
 .rs-project-exclusion button,.rs-project-table button,.rs-month-head button,
 .rs-remove-control,.google-button,.retry-button,.logout-button){font-size:var(--uzuh-text)!important;line-height:1.5!important;white-space:normal;overflow-wrap:break-word}
body :is(.btn,.chip,.file-button){padding:11px 16px;text-align:center;justify-content:center}
body .text-btn{padding:8px 2px}
body :is(.icon-button,.dialog-close,.sidebar-close,.mobile-menu){width:44px;height:44px;min-width:44px;min-height:44px}
body :is(.actions,.form-actions,.bank-actions,.connection-actions,.cards-dialog-foot,
 .review-submit-row,.statement-remaining,.statement-actions,.statement-document){flex-wrap:wrap}
body :is(.heading .actions,.cash-home>.heading>.actions){max-width:none}
body :is(.heading .actions,.toolbar,.statement-toolbar,.plan-controls .actions)>*{min-width:0}
body :is(.bank-actions .btn,.bank-actions .text-btn,.cards-dialog-foot .btn){flex-shrink:0}
body :is(.tabs,.chips,.budget-tabs){flex-wrap:wrap;white-space:normal;gap:10px}
body :is(.tabs button,.budget-tabs a){min-height:44px;display:inline-flex;align-items:center}
body :is(.plan-details summary,.budget-person-options summary,.rs-fold>summary,
 .rs-person-extra>summary,.rs-pair-details>summary,.sales-comparison details summary){font-size:var(--uzuh-text)!important;line-height:1.6!important;white-space:normal}
body :is(input[type=checkbox],input[type=radio]){width:24px;height:24px;min-height:24px;flex-shrink:0}
body label:has(>input[type=checkbox]),body label:has(>input[type=radio]){min-height:44px;cursor:pointer}
body .budget-people-table input[type=checkbox]{width:44px;height:44px;min-height:44px}
body :focus-visible{outline:3px solid #527f48;outline-offset:4px}

/* Table text has its own scale; compact table-specific rules cannot shrink it. */
body table{font-size:var(--uzuh-text)!important;line-height:1.6!important}
body th{font-size:var(--uzuh-caption)!important;line-height:1.5!important;white-space:normal;text-transform:none;letter-spacing:0;padding:14px 18px}
body td{font-size:var(--uzuh-text)!important;line-height:1.6!important;padding:16px 18px}
body :is(.plan-table td strong,.plan-table td .money,.rs-people td strong,
 .rs-fixed td strong,.rs-roster-table td:nth-child(2) strong,
 .rs-roster-table td:nth-child(4)>strong,.rs-trial-table td strong){font-size:var(--uzuh-text)!important;line-height:1.6!important}
body td :is(small,.badge,.status-badge){font-size:var(--uzuh-caption)!important;line-height:1.6!important;white-space:normal}
body :is(.table-wrap,.plan-table-scroll){max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:auto}
body .card:has(>table){overflow-x:auto}
body table:has(th:nth-child(5)){min-width:760px}
body :is(.plan-table,.cash-home .plan-table,.cash-drilldown .plan-table){min-width:600px}
body .plan-table td:first-child{min-width:180px}
body .plan-table td:nth-child(2){min-width:130px;white-space:normal}
body .plan-table td:last-child{min-width:60px}
body .plan-table td:first-child strong{max-width:none}
body :is(.truncate,.source-file){white-space:normal;overflow-wrap:anywhere}
body :is(.table-wrap,.plan-table-scroll) .money{white-space:nowrap}

/* Muted text should remain legible against the light product surfaces. */
body :is(.subtitle,.cards-subtitle,.stat-foot,.card-head p,.fine-print,.source-note,
 .budget-small-note,.budget-basis,.budget-input-card small,.budget-person-hint,
 .cash-summary-note,.cash-card-note,.cash-list-more>span,.cash-first-day p,
 .cards-basis,.bank-usage,.bank-note,.bank-card-head small,.bank-days span,
 .statement-title small,.statement-meta small,.statement-money small,.dialog-note,
 .dialog-intro,.form-grid small,.upload-card .upload-footnote,.connection-heading p,
 .connections-notes p,.connection-description,.signin-description,.login-status,
 .signin-note p,.login-footer,.cards-footer,.uploads-footer){color:var(--uzuh-muted)!important}
body :is(td small,.stat-label,.budget-metric-label,.cash-metric-label,.cards-metric-label,
 .cash-card-values dt,.bank-amounts dt,.connection-details dt){color:#60725d}
body .cash-metric-balance :is(.cash-metric-label,small){color:#c1d2b8!important}
body .budget-metric.balance :is(.budget-metric-label,small){color:#c1d2b8!important}
body .cards-metric.featured :is(.cards-metric-label,small){color:#c1d2b8!important}

/* Navigation and dense supporting views also follow the same reading rules. */
body :is(nav a,.sidebar-shortcuts a,.back-link,.budget-tabs a,.connections-notes a,
 .review-evidence a,.rs-options a){font-size:var(--uzuh-text)!important;line-height:1.5!important;min-height:44px;align-items:center;white-space:normal}
body :is(.company strong,.profile strong,.sidebar-bottom strong){font-size:var(--uzuh-text)!important;line-height:1.5!important}
body :is(.company small,.profile small,.sidebar-bottom small,.brand-sub,.nav-caption,
 nav a .nav-count){font-size:var(--uzuh-caption)!important;line-height:1.5!important}
body .brand-sub{letter-spacing:.6px;margin-top:8px}
body .sidebar-shortcuts{flex-direction:column;gap:6px;margin-bottom:18px}
body .sidebar-shortcuts a{padding:10px 12px;display:flex;justify-content:center}
body .sidebar .brand{padding-bottom:22px}
body :is(.sidebar>.brand,.sidebar>.company,.sidebar-shortcuts,.sidebar>.nav-caption){flex-shrink:0}
body .sidebar-bottom{padding:15px 10px}
body :is(.uploads-top,.cards-top,.budget-top){flex-wrap:wrap;gap:16px}
body :is(.budget-links,.cards-top nav){flex-wrap:wrap;gap:12px 20px}
body :is(.budget-links a,.cards-top nav a){display:inline-flex;padding:8px 0}
body :is(.calendar-day,.weekday,.calendar-more){font-size:var(--uzuh-caption)!important;line-height:1.6!important}
body .calendar-event{font-size:var(--uzuh-caption)!important;line-height:1.5!important;white-space:normal;overflow-wrap:anywhere}
body .calendar-grid{min-width:840px}
body #main:has(>.calendar-grid){overflow-x:auto}
body :is(.rs-live-result dd,.rs-live-result .rs-live-cost dd,.account .money,.due-row .money){font-size:18px!important;line-height:1.5!important}
body :is(.budget-chart-item small,.chart-month label){font-size:var(--uzuh-caption)!important;line-height:1.5!important;bottom:-28px}
body :is(.budget-chart,.chart){padding-bottom:35px}
body :is(.chart-axis,.chart-caption){font-size:var(--uzuh-caption)!important}
body :is(.upload-drop>span,.statement-drop>span:not(.btn):not(.file-symbol)){font-size:var(--uzuh-caption)!important;line-height:1.6!important}
body :is(.upload-error,.login-error,.cards-error,.cards-message,.connection-status,.shell-error,#toast){font-size:var(--uzuh-text)!important;line-height:1.6!important;overflow-wrap:anywhere}
body :is(.loading,.cards-loading,.empty){font-size:var(--uzuh-text)!important;line-height:1.6!important}

@media(min-width:701px){
 body .sidebar{width:280px}
 body .workspace{margin-left:280px}
 body .topbar{min-height:78px;height:auto;padding-top:14px;padding-bottom:14px}
 body .top-right{flex-wrap:wrap;justify-content:flex-end}
}
@media(max-width:1150px){
 body :is(.cash-summary,.budget-summary,.cards-summary){grid-template-columns:1fr}
 body :is(.cash-metric-balance,.budget-metric.balance,.cards-metric.featured){grid-column:auto}
 body :is(.cash-balance-strip,.budget-assumption-grid){grid-template-columns:1fr}
 body .budget-input-card:last-child{grid-column:auto}
 body .cash-balance-formula{grid-column:auto;grid-row:auto;text-align:left;border:0;border-top:1px solid #dde5d3;border-bottom:1px solid #dde5d3;padding:16px 0}
 body .cash-closing{text-align:left}
 body .cash-balance-strip strong{font-size:24px}
 body .cash-home .cash-metric>strong{font-size:36px}
 body .budget-metric strong{font-size:34px}
 body .cards-metric strong:not(.is-unknown){font-size:32px}
 body :is(.cash-columns,.bank-cards,.budget-overview-grid){grid-template-columns:1fr}
 body .statement-row{grid-template-columns:1fr 1fr}
 body .statement-title,body .statement-actions{grid-column:1/-1}
 body .statement-actions{flex-direction:row;justify-content:space-between}
}
@media(max-width:760px){
 body :is(.heading,.cards-heading,.section-heading){align-items:stretch;flex-direction:column}
 body :is(.heading>.actions,.cash-home>.heading>.actions){width:100%;max-width:none;justify-content:flex-start;align-items:stretch;gap:10px}
 body :is(.heading>.actions>.btn,.cards-heading>.btn){max-width:100%;white-space:normal}
 body :is(.budget-top .budget-links,.cards-top nav){order:3;width:100%;border-top:1px solid var(--line);padding-top:10px;justify-content:flex-start}
 body .budget-links a:nth-child(2){display:inline-flex}
 body :is(.uploads-brand,.cards-brand){margin-right:auto}
 body :is(.uploads-main,.cards-main,.budget-main){padding-left:18px;padding-right:18px}
 body :is(.budget-period,.period,.report-toolbar,.statement-toolbar,.plan-controls){align-items:stretch;flex-direction:column}
 body :is(.plan-controls .actions,.cash-home .plan-controls .actions){flex-direction:column;align-items:stretch;width:100%;flex-wrap:wrap}
 body :is(#plan-month,#plan-view-currency,.cash-home #plan-month,.cash-home #plan-view-currency){width:100%;max-width:none;min-width:0;flex:auto;font-size:var(--uzuh-text)!important}
 body .scenario-switch{flex-wrap:wrap;width:100%}
 body .scenario-switch button{flex:1 1 150px;padding:12px}
 body :is(.cards-summary,.budget-summary,.cash-summary,.stats){grid-template-columns:1fr}
 body :is(.cash-metric,.budget-metric,.cards-metric){padding:23px}
 body .cash-home .cash-metric>strong{font-size:34px;white-space:normal;overflow-wrap:anywhere}
 body .budget-metric strong{font-size:34px;white-space:normal;overflow-wrap:anywhere}
 body .cards-metric strong:not(.is-unknown){font-size:32px;white-space:normal;overflow-wrap:anywhere}
 body :is(.cash-card-values,.bank-amounts,.form-grid,.three-col,.budget-person-grid,.review-fields){grid-template-columns:1fr}
 body :is(.cash-card-values>div:last-child,.form-grid .wide,.three-col label:first-child,.three-col label:nth-child(4),.review-wide){grid-column:auto}
 body .cash-card-values dd{font-size:23px}
 body :is(.bank-actions,.review-submit-row){flex-direction:column;align-items:stretch}
 body .bank-actions :is(.btn,.text-btn){justify-content:center;width:100%}
 body :is(.statement-remaining,.statement-guidance,.connection-heading){align-items:flex-start}
 body .statement-remaining{flex-direction:column}
 body .statement-remaining strong{text-align:left}
 body .cards-dialog-foot .btn{flex:1 1 150px}
 body .connection-heading{flex-wrap:wrap}
 body .connection-heading .badge{margin-left:0}
 body .connection-details>div{flex-wrap:wrap}
 body .connection-details dd{text-align:left}
 body :is(.source-coverage,.connections-notes){grid-template-columns:1fr}
 body :is(.cash-support>summary,.cash-card-summary-heading,.card-head){flex-wrap:wrap}
 body .cash-support>summary small{display:block;margin-left:0}
 body .cash-support>summary::after{margin-left:auto}
 body .cash-summary-note{line-height:1.7!important}
 body .budget-chart{overflow-x:auto;min-height:240px;gap:14px}
 body .budget-chart-item{min-width:30px}
 body .budget-year-total{flex-wrap:wrap}
 body :is(.uploads-footer,.cards-footer,.login-footer){flex-wrap:wrap;gap:10px}
 body .signin-panel{padding-bottom:115px}
}
@media(max-width:700px){
 body .sidebar{width:min(330px,90vw)}
 body .workspace{margin-left:0;padding-bottom:calc(100px + env(safe-area-inset-bottom))}
 body .topbar{height:auto;min-height:78px;flex-wrap:wrap;align-items:center;padding-top:12px;padding-bottom:12px}
 body .breadcrumb{font-size:var(--uzuh-caption)!important;min-width:0}
 body .breadcrumb strong{white-space:normal}
 body .top-right{margin-left:56px;flex-basis:100%;justify-content:flex-start}
 body .top-right>span:not(.avatar):not(.snapshot-dot){font-size:var(--uzuh-caption)!important}
 body .top-right>span strong{font-size:var(--uzuh-caption)!important}
 body .mobile-nav{padding-top:8px;padding-bottom:calc(8px + env(safe-area-inset-bottom));gap:4px}
 body .mobile-nav :is(a,button){font-size:var(--uzuh-caption)!important;line-height:1.5!important;white-space:normal;min-height:68px;padding:6px 2px;text-align:center}
 body .mobile-nav svg{flex-shrink:0}
 body .mobile-nav span{font-size:var(--uzuh-caption)!important;line-height:1.5}
 body .sidebar-close{right:12px;top:12px}
 body .sidebar .brand{max-width:calc(100% - 36px)}
 body :is(.drawer-body,.drawer-header){padding:22px 18px}
 body .cash-detail-line{overflow-wrap:break-word}
 body .cash-detail-line strong{white-space:normal}
}

/* Readable contrast for metadata, including high-specificity legacy table rules. */
body :is(small,.cash-balance-strip span,.cash-balance-formula p,.cash-first-day,
 .cash-card-values dt,.budget-year-total,.budget-period>label,.bank-amounts dt,
 .cash-metric-label,.budget-metric-label,.cards-metric-label,.stat-label,
 .period-label,.report-toolbar,.connection-details dt,.source-hash,
 .chart-axis,.chart-caption,.chart-month label,.budget-chart-item small,
 .statement-toolbar label,.field label,.form-grid label>span,.single-label>span,
 .cash-list-more>span,.timeline-date,.timeline-balance,.section-heading p,
 .statement-title small,.statement-meta small,.statement-money small){color:#586b60!important}
body :is(.cash-metric-balance,.budget-metric.balance,.cards-metric.featured) :is(small,.cash-metric-label,.budget-metric-label,.cards-metric-label){color:#c5d7be!important}
body .sidebar :is(small,.brand-sub,.nav-caption){color:#b9cdbf!important}
body .plan-table small.negative-alert{color:#985b3e!important}
body :is(.badge,.status-badge,.count-pill){color:#586b50}
body .badge.amber,body .status-badge:not(.confirmed):not(.planned){color:#80682c}
body .badge.red{color:#914e3e}
body .badge.green,body .status-badge.confirmed{color:#466c39}
body .badge.blue{color:#4f6d7e}
body .sidebar .profile>div{min-width:0}
body .sidebar .profile small{overflow-wrap:break-word}
@media(max-width:700px){
 body .timeline-row{display:grid;grid-template-columns:85px minmax(0,1fr);gap:8px 12px;padding:15px 0}
 body .timeline-date{width:auto;font-size:var(--uzuh-caption)!important}
 body .timeline-amount{width:auto;min-width:0;text-align:right;font-size:var(--uzuh-caption)!important;overflow-wrap:anywhere}
 body .timeline-balance{grid-column:2;width:auto;font-size:var(--uzuh-caption)!important;overflow-wrap:anywhere}
 body .timeline-bars{display:none}
 body .report-toolbar{flex-wrap:wrap}
 body .report-toolbar select{width:100%;min-width:0}
}
body .rs-hero-count span{font-size:var(--uzuh-caption)!important;line-height:1.6!important}
