/* One readable type scale, shared by all financial modules. */
body { font-size: var(--font-body); line-height: 1.65; }
.brand small, .preview-banner { font-size: var(--font-small); }
.brand small { letter-spacing: 0; }
.sidebar-caption, .sidebar-company-heading > a { font-size: var(--font-small); color: var(--ui-muted); }
.nav-link, .sidebar .nav-link, .company-tree summary, .company-tree-children a { font-size: var(--font-body); }
.company-tree summary { min-height: 46px; }
.company-tree-children a { color: var(--ui-text); line-height: 1.5; }
.sidebar .text-button, .signed-in, .sidebar-empty { font-size: var(--font-small); }
.breadcrumbs, .topbar-date { font-size: var(--font-label); color: var(--ui-text); }
.breadcrumbs a { color: var(--ui-muted); }
.topbar { min-height: 68px; }
.eyebrow, .workspace-kicker, .visual-kicker, .company-hero-kicker,
.company-workspace-head > div > span, .payment-section-title > div > span { font-size: var(--font-small); letter-spacing: .04em; color: var(--ui-muted); }
.page-heading h1, .workspace-heading h1, .visual-hero h1, .company-hero h1,
.settings-hero h1, .login-card h2 { font-size: var(--font-heading); line-height: 1.35; font-weight: 700; }
.page-heading p, .workspace-heading p, .visual-hero p, .company-hero p,
.settings-hero p, .settings-guidance-copy p, .role-grid p,
.operations-intro p, .visual-section-title p, .company-workspace-head p { font-size: var(--font-body); line-height: 1.75; color: var(--ui-text); }
.section-head h2, .panel h2, .company-workspace-head h2, .company-section-heading h2,
.settings-section-head h2, .settings-guidance h2, .visual-section-title h2,
.visual-panel-head h2 { font-size: var(--font-section); line-height: 1.45; }
.company-group-heading h3, .company-panel-heading h3, .operation-card h3,
.settings-card h3, .role-grid h2, .panel h3, .company-card-title h3,
.profitability-card h3 { font-size: var(--font-card); line-height: 1.5; }
.button, .button.small, .workspace-create, .operation-links a,
.company-card-actions a, .company-bottom-actions a, .settings-card-actions a,
.settings-manage, .settings-list-card b, .text-button, .subnav a,
.company-module-tabs a, .chip { font-size: var(--font-label); }
.button, .button.small, .workspace-create { min-height: 44px; }
.input, .input.short, .workspace-period input, .visual-period-form input,
.company-month-form input { font-size: var(--font-body); min-height: 44px; }
.workspace-period button, .visual-period-form button, .company-month-form button {
  font-size: var(--font-label); height: 44px; line-height: 1.4;
}
.workspace-period label, .visual-period-form label, .company-month-form label,
label, .form-field label { font-size: var(--font-label); }
.workspace-period { padding: 10px; }
.workspace-period input { height: 44px; width: 180px; }
.workspace-summary-card > span, .metric-label, .visual-metric > span,
.company-kpis article > span, .visual-hero-total > span, .company-card-metrics span,
.profitability-main > span, .visual-health-grid span { font-size: var(--font-label); font-weight: 500; }
.workspace-summary-card > span { gap: 9px; }
.workspace-summary-card .ui-icon { width: 22px; height: 22px; }
.workspace-summary-card strong, .metric-value, .metric-value.small, .visual-metric strong,
.company-kpis article strong, .visual-health-grid strong { font-size: var(--font-amount); line-height: 1.3; }
.workspace-summary-card strong { letter-spacing: -.035em; margin: 18px 0 12px; }
.company-kpis article strong { margin: 16px 0 10px; }
.company-overview .company-kpis article strong { max-width: 100%; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.workspace-summary-card small, .metric-note, .visual-metric p,
.visual-hero-total small, .visual-hero-total em, .visual-metric strong small,
.company-kpis article small, .company-section-heading small,
.company-hero-tags span, .company-data-note, .company-chart-empty,
.company-table-note, .company-panel-heading p, .company-donut span,
.company-legend > div, .company-legend strong, .company-ratios span,
.company-month-item small, .company-month-item span, .visual-panel-head p,
.visual-panel-note, .visual-trend-label, .visual-trend-amount,
.visual-rank-label, .visual-rank-value, .visual-composition-row,
.visual-composition-row strong, .visual-composition-row small,
.visual-insights p, .visual-health-grid small, .company-group-heading > span,
.company-card-title p, .company-card-metrics small, .company-data-status,
.company-data-status.ready, .company-cashflow small, .company-create-card > small,
.form-field small, .field-error, .form-field .field-error, .hint, .flash,
.exception-box, .exception-box small, .table-sub, .empty, .section-head p,
.status, .status.large, .settings-summary small, .settings-card p,
.settings-list-card small, .settings-list-card em, .settings-count,
.settings-section-head p, .settings-guidance-grid p, .settings-guidance-grid em,
.settings-company-grid small, .settings-company-grid nav a, .advanced-maintenance p,
.operation-card p, .operation-card-count, .profitability-card dt,
.profitability-card dd, .profitability-card-foot, .profitability-card-foot a,
.profitability-status, .profitability-legend, .profitability-main small,
.profitability-missing p, .profit-table-status, .timeline small,
.attention small, .simple-list small, .account-card p, .account-card small,
.account-top, .report-meta, .login-card .login-help {
  font-size: var(--font-small); line-height: 1.65;
}
.company-card-title p, .company-card-metrics span, .company-cashflow small,
.operation-card p, .settings-card p, .visual-panel-head p,
.company-panel-heading p, .table-sub, .form-field small { color: var(--ui-text); }
.company-card-metrics strong { font-size: var(--font-body); line-height: 1.45; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
.company-card-metrics { grid-template-columns: 1fr; }
.company-card-metrics a { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; border-right: 0; border-bottom: 1px solid var(--ui-line); padding: 12px; }
.company-card-metrics a:last-child { border-bottom: 0; }
.company-card-metrics strong { margin: 0; }
.company-cashflow b, .company-cashflow > strong, .settings-company-grid strong,
.settings-list-card strong, .simple-list > a, .attention strong { font-size: var(--font-label); }
.company-card-metrics span { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.company-cashflow { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
.company-cashflow > strong { white-space: normal; overflow-wrap: anywhere; }
.company-card-actions { gap: 12px; flex-wrap: wrap; }
.company-create-card > strong { font-size: var(--font-card); }
.company-donut strong { font-size: 22px; }
.company-ratios strong, .company-donut + strong { font-size: 26px; }
.company-bar-row > span, .company-bar-row strong, .company-segments,
.details dt, .details dd, .report-lines dt, .report-lines dd { font-size: var(--font-label); }
.report-lines dt, .report-lines dd { min-width: 0; overflow-wrap: anywhere; white-space: normal; }
.report-meta { flex-wrap: wrap; }
.report-meta .status { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.company-overview .company-donut strong { max-width: 100%; white-space: normal; overflow-wrap: anywhere; text-align: center; line-height: 1.3; }
.company-overview .company-donut > div > span { margin-top: 0; font-size: var(--font-label); color: var(--ui-text); }
.company-overview .company-donut-total { min-width: 0; max-width: 100%; margin-top: 14px; display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 6px; }
.company-overview .company-donut-total strong { min-width: 0; max-width: 100%; font-size: 22px; line-height: 1.3; overflow-wrap: anywhere; text-align: center; font-variant-numeric: tabular-nums; }
.company-overview .company-donut-total span { font-size: var(--font-label); color: var(--ui-text); }
.company-overview .company-legend { grid-template-columns: 1fr; }
.company-overview .company-legend span { min-width: 0; white-space: normal; overflow: visible; overflow-wrap: anywhere; }
.company-overview .company-bar-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
.company-overview .company-bar-row > span { min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.company-bar-row strong, .company-segments strong { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.company-segments > div { flex-wrap: wrap; }
.company-overview .company-month-bars { min-width: 0; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; grid-template-columns: repeat(4, minmax(120px, 1fr)); height: 235px; padding-top: 60px; }
.company-overview .company-month-item span { width: 110px; max-width: 110px; white-space: normal; overflow-wrap: anywhere; }
.profitability-main strong { font-size: 30px; line-height: 1.3; }
.profitability-missing strong { font-size: var(--font-body); }
.profitability-card dl { grid-template-columns: 1fr; }
.profitability-card dl > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; }
.profitability-card dd { margin: 0; }
.profitability-card-foot, .profitability-card-head, .profitability-legend { flex-wrap: wrap; }
.profitability-card { min-width: 0; }
.profitability-card-foot { row-gap: 8px; }
.profitability-card h3 { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
.visual-health-grid strong { font-size: 26px; }
.visual-insights h2 { font-size: var(--font-card); }
th, td, .visual-matrix th, .visual-matrix td, .visual-company-table th,
.visual-company-table td, .company-account-table th, .company-account-table td,
.company-statement th, .company-statement td { font-size: var(--font-label); letter-spacing: 0; padding-top: 15px; padding-bottom: 15px; }
.company-overview .company-statement table { table-layout: fixed; }
.company-overview .company-statement th, .company-overview .company-statement td { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
th, .company-account-table th { color: var(--ui-text); }
.table-sub { margin-top: 6px; }
.company-workspace-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.company-card-head { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 5px 14px; align-items: start; }
.company-card-icon { grid-row: 1 / 3; width: 50px; height: 50px; font-size: 22px; }
.company-data-status { grid-column: 2; justify-self: start; }
.company-card-title h3 { white-space: normal; }
.company-card-metrics { margin-top: 20px; }
.company-card-metrics a { min-width: 0; }
.company-kpis article, .workspace-summary-card { padding: 24px; }
.company-workspace-head, .page-heading { row-gap: 20px; }
.settings-company-grid nav { flex-wrap: wrap; }
.settings-company-grid article { min-width: 0; }
.company-legend { grid-template-columns: 1fr; }
.company-legend > div { flex-wrap: wrap; }
.company-bar-row { grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.company-bar-track { grid-column: 1 / -1; grid-row: 2; }
.visual-composition-row { grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.visual-composition-track { grid-column: 1 / -1; grid-row: 2; }
.visual-rank-row { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 7px; }
.visual-rank-value { grid-column: 1 / -1; text-align: right; }
.visual-rank-label { white-space: normal; overflow: visible; }
.visual-rank-value span { display: inline; }
.visual-hero-total > span, .visual-hero-total small { white-space: normal; }
.visual-hero-total { min-width: 0; }
.visual-period-form, .company-hero-tags { flex-wrap: wrap; }
.visual-hero-copy { min-width: 0; }
.visual-hero p { max-width: 100%; }
.settings-guidance-copy, .settings-guidance-grid { min-width: 0; }
.settings-guidance-grid strong, .advanced-maintenance strong { font-size: var(--font-label); }
.form-actions { flex-wrap: wrap; }

@media (max-width: 1500px) {
  .workspace-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1150px) {
  :root { --font-amount: 30px; }
  .workspace-period { width: min(100%, 480px); }
  .company-workspace-head { align-items: flex-start; flex-wrap: wrap; }
  .visual-hero { flex-direction: column; align-items: stretch; }
  .visual-hero-copy { flex: auto; }
  .visual-hero-copy, .visual-hero-total { width: 100%; }
  .settings-guidance { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  :root { --font-heading: 28px; --font-amount: 28px; }
  .sidebar .brand { font-size: 18px; }
  .sidebar .brand small { font-size: 12px; }
  .company-workspace-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .workspace-summary { grid-template-columns: 1fr; }
  .workspace-summary-card strong { font-size: 30px; }
  .workspace-period, .company-month-form { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; }
  .workspace-period label, .company-month-form label { grid-column: 1; }
  .workspace-period input, .workspace-period button, .company-month-form input,
  .company-month-form button { width: 100%; min-width: 0; }
  .company-module-tabs { display: flex; flex-wrap: wrap; }
  .company-module-tabs a { flex: 1; white-space: nowrap; padding: 10px; }
  .company-section-heading h2 { font-size: 20px; }
}
@media (max-width: 640px) {
  :root { --font-heading: 26px; --font-amount: 26px; }
  .sidebar .nav-link, .company-tree summary, .company-tree-children a { font-size: 14px; }
  .sidebar .sidebar-caption, .sidebar-company-heading > a, .sidebar .text-button,
  .sidebar-bottom .signed-in, .sidebar-empty { font-size: 13px; }
  .sidebar .nav-link { flex-wrap: wrap; gap: 5px; }
  .sidebar .brand { font-size: 16px; }
  .breadcrumbs { flex-wrap: wrap; gap: 6px; font-size: 14px; }
  .breadcrumbs > span { white-space: normal; }
  .preview-banner { font-size: 13px; }
  .workspace-summary-card strong { font-size: 24px; }
  .workspace-summary-card, .company-kpis article { padding: 18px 14px; }
  .workspace-summary-card > span { flex-wrap: wrap; }
  .workspace-summary-card .ui-icon { width: 20px; height: 20px; }
  .company-workspace-card, .company-panel { padding: 18px 14px; }
  .company-card-head { grid-template-columns: 38px minmax(0, 1fr); gap: 7px 9px; }
  .company-card-icon { width: 38px; height: 40px; font-size: 20px; }
  .company-card-title h3 { font-size: 17px; }
  .company-data-status { max-width: 100%; white-space: normal; }
  .company-module-tabs a { flex-basis: 100%; }
  .company-heading-month { font-size: 16px; }
  .visual-period-form { align-items: stretch; flex-direction: column; }
  .visual-period-form input, .visual-period-form button { width: 100%; }
  .profitability-main strong { font-size: 26px; }
  .company-ratios { grid-template-columns: 1fr; }
  .company-legend { grid-template-columns: 1fr; }
  .company-statement tr { display: flex; flex-direction: column; }
  .company-statement th, .company-statement td { display: block; }
  .company-statement td { padding-top: 0; white-space: normal; overflow-wrap: anywhere; }
  .visual-trend-amount { font-size: 12px; }
  .settings-guidance { padding: 18px 14px; }
  .settings-guidance-grid article { grid-template-columns: 27px minmax(0, 1fr); }
  .settings-card { padding: 20px 14px; }
  .settings-section-head p { padding-left: 0; }
  .settings-company-grid article { padding: 14px; }
  .settings-company-grid article > div { flex-wrap: wrap; }
  .company-card-actions { flex-direction: column; align-items: stretch; }
  .company-card-actions a { padding: 8px 0; }
  .company-card-actions a:last-child { justify-content: space-between; }
  .form-actions { flex-direction: column; align-items: stretch; }
}
@media (max-width: 360px) {
  :root { --font-heading: 24px; --font-section: 20px; --font-amount: 22px; }
  .workspace-summary-card strong { font-size: 18px; }
  .company-kpis article strong { font-size: 22px; }
  .topbar { padding-left: 10px; padding-right: 10px; gap: 8px; }
  .topbar-right { gap: 0; }
  .company-donut strong { font-size: 18px; }
}

/* The maintenance screens follow the same reading sizes. */
#user-tools, .gf-back, div.breadcrumbs, .addlink, .changelink, .viewlink,
.help, .help-tooltip, .paginator, .datetime, .gf-admin-guide span,
.gf-admin-guide b, .gf-admin-intro > a { font-size: var(--font-small); }
#content h1, .gf-admin-intro h1 { font-size: var(--font-heading) !important; }
.gf-admin-intro p { font-size: var(--font-body); }
.module h2, .module caption, .inline-group h2, .aligned label { font-size: var(--font-label); }
#content input, #content select, #content textarea, #content .button { font-size: var(--font-label); }
