/* Roomier dashboard on big screens (founder 2026-11-28, after a side-by-side with Billroo: "the numbers and charts look
   bigger on Billroo and take up more of the screen").
   1. Wide screens use more of the width, and everything (text, numbers, charts) scales up a step with it.
   2. Overview: bigger figures on the Money in / Spent / Invested / Kept cards, a bigger donut, roomier table rows.
   3. "Heading vs forecast" cells are tinted: soft red when worse than forecast, soft green when better.
   Both themes. Phone sizes untouched (the phone app is already full-width with big numbers). */

/* 1. Width and scale: the page cap grows from 1,360px on wide screens, and rem-based sizes grow with the root font
      (the dashboard's base is 17.6px, style.css; these steps only ever go up from it). Stepped down one notch on
      2026-11-29 (founder: "a little bit too big on the big screen"): the base until 2,000px, then 18.5 / 19.5px. */
@media (min-width: 1600px) {
  html:has(main.dashboard-shell) { --pf-page-max: 1520px; font-size: 17.6px; }
}
@media (min-width: 2000px) {
  html:has(main.dashboard-shell) { --pf-page-max: 1760px; font-size: 18.5px; }
}
@media (min-width: 2400px) {
  html:has(main.dashboard-shell) { --pf-page-max: 1960px; font-size: 19.5px; }
}
/* the public pages (home, About, Privacy, sign-in ...) the same (founder 2026-11-29: "home page size and font size is
   completely off vs when you log in - needs to be consistent"): the same page width, and text up by the same share
   from their own 16px base (the dashboard's 17.6px base makes up for its dense 0.85rem panels, style.css) */
@media (min-width: 1600px) {
  html:not(:has(main.dashboard-shell)) { --pf-page-max: 1520px; }
}
@media (min-width: 2000px) {
  html:not(:has(main.dashboard-shell)) { --pf-page-max: 1760px; font-size: 16.8px; }
}
@media (min-width: 2400px) {
  html:not(:has(main.dashboard-shell)) { --pf-page-max: 1960px; font-size: 17.7px; }
}
@media (min-width: 1600px) {
  html .pf-home .ph-in { max-width: var(--pf-page-max); }
  html .pf-doc { max-width: 62rem; }
}

/* 1b. Nav bar grows with the page (founder 2026-11-28: "the nav bar ... now looks too small with everything else
       increasing in size"). style.css holds it at 16px with a 40px logo on dashboard pages. On every page since
       2026-11-29, so it's the same signed in or not. */
@media (min-width: 1200px) {
  html:has(main.dashboard-shell) .site-navbar .nav-link,
  html:has(main.dashboard-shell) .site-navbar .dropdown-item,
  html body .site-navbar .nav-link, html body .site-navbar .dropdown-item { font-size: 17px; }
  html:has(main.dashboard-shell) .navbar.site-navbar .navbar-brand img,
  html body .navbar.site-navbar .navbar-brand img { height: 44px; }
}
@media (min-width: 1600px) {
  html:has(main.dashboard-shell) .site-navbar .nav-link,
  html:has(main.dashboard-shell) .site-navbar .dropdown-item,
  html body .site-navbar .nav-link, html body .site-navbar .dropdown-item { font-size: 18px; }
  html:has(main.dashboard-shell) .navbar.site-navbar .navbar-brand img,
  html body .navbar.site-navbar .navbar-brand img { height: 48px; }
}
@media (min-width: 2000px) {
  html:has(main.dashboard-shell) .site-navbar .nav-link,
  html:has(main.dashboard-shell) .site-navbar .dropdown-item,
  html body .site-navbar .nav-link, html body .site-navbar .dropdown-item { font-size: 19px; }
  html:has(main.dashboard-shell) .navbar.site-navbar .navbar-brand img,
  html body .navbar.site-navbar .navbar-brand img { height: 52px; }
}

/* 2. Overview cards, donut, table and top movers */
@media (min-width: 992px) {
  html main.dashboard-shell .ov4-tile { padding: 1.15rem 1.3rem 1.25rem; gap: .4rem; }
  html main.dashboard-shell .ov4-tile__top { font-size: .95rem; }
  html main.dashboard-shell .ov4-tile__value { font-size: 2.15rem; line-height: 1.15; }
  html main.dashboard-shell .ov4-tile__note { font-size: .9rem; }

  html main.dashboard-shell .ov4-donut { flex-basis: 19rem; }
  html main.dashboard-shell .ov4-donut svg { width: 19rem; height: 19rem; }
  html main.dashboard-shell .ov4-donut__title { font-size: 1.15rem; }

  html main.dashboard-shell .ov4-table { font-size: 1rem; }
  html main.dashboard-shell .ov4-table thead th { font-size: .92rem; padding: .85rem .9rem; }
  html main.dashboard-shell .ov4-table td,
  html main.dashboard-shell .ov4-table tbody th,
  html main.dashboard-shell .ov4-table tfoot th { padding: .95rem .9rem; }
  html main.dashboard-shell .ov4-table tbody th,
  html main.dashboard-shell .ov4-table tfoot th { padding-left: 1.1rem; }

  html main.dashboard-shell .ov4-movers__title { font-size: 1.2rem; }
  html main.dashboard-shell .top-mover-item .fw-semibold { font-size: 1.02rem; }
  html main.dashboard-shell .top-mover-item .small,
  html main.dashboard-shell .top-mover-total.small { font-size: .92rem; }
}

/* 3. Tinted "Heading vs forecast" cells (all sizes) */
html main.dashboard-shell .ov4-table tbody td.is-bad { background: rgba(240, 68, 56, .09); }
html main.dashboard-shell .ov4-table tbody td.is-good { background: rgba(18, 183, 106, .10); }
html main.dashboard-shell .ov4-table tbody tr:hover td.is-bad { background: rgba(240, 68, 56, .14); }
html main.dashboard-shell .ov4-table tbody tr:hover td.is-good { background: rgba(18, 183, 106, .15); }
html[data-theme="dark"] main.dashboard-shell .ov4-table tbody td.is-bad { background: rgba(240, 68, 56, .18); }
html[data-theme="dark"] main.dashboard-shell .ov4-table tbody td.is-good { background: rgba(18, 183, 106, .18); }

/* 4. Font review (founder 2026-11-28: "Some fonts are still disproportionately small in full screen such as forecast
      numbers in cash forecast"). Measured on every dashboard page at 1,920 and 2,560px.
   4a. The 12-month cash statement was pinned at 13.6px numbers / 12.5px headers / 11.5px Actual-Forecast labels
       (style.css, 2026-10-05) so all 12 months fit a 1,920px screen on the old 1,360px page. On wider pages it grows,
       stepped with the page width. (It already scrolls sideways at every width today: the months ahead sit past the
       right edge; the first column stays put.) */
@media (min-width: 1600px) {
  html:has(main.dashboard-shell) .pf-fc #tbl-cashflow-statement td,
  html:has(main.dashboard-shell) .pf-fc #tbl-cashflow-statement tbody th { font-size: 15px; padding-left: 5.5px; padding-right: 5.5px; }
  html:has(main.dashboard-shell) .pf-fc #tbl-cashflow-statement thead th { font-size: 14px !important; padding-left: 5.5px; padding-right: 5.5px; }
  html:has(main.dashboard-shell) .pf-fc #tbl-cashflow-statement thead th.month-status-cell { font-size: 12.5px !important; }
}
@media (min-width: 2000px) {
  /* the forecast page (already wider than the rest, style.css: 1,840px) uses the whole screen less its margins */
  html:has(main.dashboard-shell) { --pf-page-max-forecast: calc(100vw - 96px); }
  html:has(main.dashboard-shell) .pf-fc #tbl-cashflow-statement td,
  html:has(main.dashboard-shell) .pf-fc #tbl-cashflow-statement tbody th { font-size: 17px; padding-left: 6.5px; padding-right: 6.5px; }
  html:has(main.dashboard-shell) .pf-fc #tbl-cashflow-statement thead th { font-size: 15.5px !important; padding-left: 6.5px; padding-right: 6.5px; }
  html:has(main.dashboard-shell) .pf-fc #tbl-cashflow-statement thead th.month-status-cell { font-size: 13.5px !important; }
}
@media (min-width: 2400px) {
  html:has(main.dashboard-shell) .pf-fc #tbl-cashflow-statement td,
  html:has(main.dashboard-shell) .pf-fc #tbl-cashflow-statement tbody th { font-size: 18.5px; }
  html:has(main.dashboard-shell) .pf-fc #tbl-cashflow-statement thead th { font-size: 17px !important; }
  html:has(main.dashboard-shell) .pf-fc #tbl-cashflow-statement thead th.month-status-cell { font-size: 14.5px !important; }
}
/* 4b. Fixed or under-80% labels that read as fine print next to bigger text: the overview nudge (14px), the forecast
       figures' labels, the goals bar legend, badges and the "$179 more" differences on How you compare. */
@media (min-width: 992px) {
  html main.dashboard-shell .ov4-nudge { font-size: .88rem; }
  html main.dashboard-shell .pf-figure dt { font-size: .88rem; }
  html main.dashboard-shell .ov4-gbar__legend,
  html main.dashboard-shell .ov4-gbar__gap em { font-size: .86rem; }
  html main.dashboard-shell .pf-cmt__status,
  html main.dashboard-shell .pf-chip,
  html main.dashboard-shell .pfw-w__new { font-size: .8rem; }
  html main.dashboard-shell .pf-diff__pos em,
  html main.dashboard-shell .pf-diff__neg em { font-size: .86rem; }
  html main.dashboard-shell .pfw-w__past-h { font-size: .86rem; }
  html main.dashboard-shell .ov-toggle button { font-size: .86rem; }
}
