/* One type scale for the signed-in app (founder 2026-12-05: "the font sizing is all over the place").
   Before this, a page used up to 29 different text sizes (7.5px to 27px), because each component had
   picked its own (.8rem, .82rem, .85rem, .86rem, .88rem, .9rem ...). Now there are six, and everything
   else takes its size from what it sits in:

     small    .875rem  labels, captions, dates, chips, column headings, notes
     body     1rem     everything else: paragraphs, table cells, buttons, links, inputs
     title    1.15rem  card and section titles (h3-h6, *__title)
     heading  1.45rem  page headings (h1, h2)
     figure   1.5rem   the big numbers on tiles and cards
     hero     2rem     the one headline number on a page

   1rem follows the window (pf-roomy.css): 14px on a laptop, up to 16px on a big screen.
   Loaded after pf-calm.css. Charts (svg), icons, avatars and the cash forecast table keep their own sizes. */

/* ---- everything inherits ---- */
main.dashboard-shell { font-size: 1rem; }
/* :where() keeps this rule weak, so every size rule below beats it */
main.dashboard-shell :where(*:not(svg, svg *, .sr-only, [class*="icon"], [class*="avatar"], [class*="emoji"], [class*="initial"], [aria-hidden="true"], #tbl-cashflow-statement *)) {
  font-size: inherit !important;
}
/* inputs don't inherit by default */
main.dashboard-shell :is(input, select, textarea, button, .form-control, .form-select) { font-size: 1rem !important; }

/* ---- small ---- */
main.dashboard-shell :is(small, .small, .badge, .form-text, dt, thead th, figcaption, legend.small,
  [class*="__label"], [class*="-label"], [class*="__note"], [class*="__sub"], [class*="__meta"], [class*="__when"],
  [class*="__cat"], [class*="chip"], [class*="__tag"], .ov-tag, [class*="__hint"], [class*="__why"], [class*="__caption"],
  .btn-sm, .form-select-sm, .form-control-sm, .text-muted.small):not(#tbl-cashflow-statement *):not(svg *) {
  font-size: .875rem !important;
}

/* ---- titles ---- */
main.dashboard-shell :is(h3, h4, h5, h6, [class*="__title"], .section-heading, .pf-nwf-h, .pf-h):not(.sr-only):not(svg *) {
  font-size: 1.15rem !important; line-height: 1.3;
}
main.dashboard-shell :is(h1, h2):not(.sr-only):not([class*="__title"]) { font-size: 1.45rem !important; line-height: 1.25; }

/* ---- figures ---- */
main.dashboard-shell :is(dd, [class*="__value"], [class*="__amt"], [class*="__big"], [class*="__figure"], .pf-cmp__tile-you):not(td):not(th):not(.small):not(svg *) {
  font-size: 1.5rem !important; line-height: 1.15;
}
main.dashboard-shell :is(.ov4-cash__figure, .pfw-w__m) { font-size: 2rem !important; line-height: 1.1; }
/* a figure's own small print stays small */
main.dashboard-shell :is(dd, [class*="__value"], [class*="__figure"]) :is(small, .small, [class*="__note"], [class*="__sub"]):not(svg *) { font-size: .875rem !important; }

/* phones: the figures come down a step so four fit */
@media (max-width: 575px) {
  main.dashboard-shell :is(dd, [class*="__value"], [class*="__amt"], [class*="__big"], [class*="__figure"], .pf-cmp__tile-you):not(td):not(th):not(.small):not(svg *) { font-size: 1.3rem !important; }
  main.dashboard-shell :is(.ov4-cash__figure, .pfw-w__m) { font-size: 1.7rem !important; }
  main.dashboard-shell :is(h1, h2):not(.sr-only):not([class*="__title"]) { font-size: 1.3rem !important; }
}
