/* Calm design (founder 2026-12-04, after a walk-through of MyWOS: "simple, elegant ... very very high quality. doesn't
   feel like it is 'AI slop'. Can we replicate this simplicity whilst maintaining our features"). Loaded last of the
   light-theme layers (after pf-roomy.css), signed-in pages only, light theme only.

   The look, in a few rules:
   1. A warm off-white page; white cards with one thin warm border and a 16px corner; no shadows, no gradients.
   2. Near-black text, one muted grey, one accent (a deep sage green) used sparingly: buttons, the current tab, charts.
   3. Figures in black. Negatives stay red (founder: "I still want negatives in red").
   4. Small grey uppercase labels above figures.
   5. One dark green card per page at most, for the headline answer (founder 2026-12-04: "I preferred the green").
   Top nav stays (founder: "I've never been one for the nav bar on the side"). */

html:not([data-theme="dark"]):has(main.dashboard-shell),
html:not([data-theme="dark"]):has(.pf-profile) {
  --calm-page: #F3F1EC;   /* 2026-12-05 (founder: white cards on a near-white page "defeats the purpose"): a clearer warm grey */
  --calm-nest: #F8F7F3;   /* a card inside a card */
  --calm-card: #FFFFFF;
  --calm-line: #E2DED6;
  --calm-line-2: #F1EFEA;
  --calm-ink: #1B1D1B;
  --calm-text: #3C3F3C;
  --calm-muted: #6E716D;
  --calm-sage: #3E5A4B;
  --calm-sage-dark: #2F4639;
  --calm-sage-soft: #EEF2EF;
  --calm-dark: #1E201E;
  --calm-red: #B42318;
}

/* the shared variables the older layers paint with */
html:not([data-theme="dark"]):has(main.dashboard-shell) .pf-ui,
html:not([data-theme="dark"]):has(main.dashboard-shell) .pf-ui * {
  --pf-ink: var(--calm-ink); --pf-text: var(--calm-text); --pf-muted: var(--calm-muted);
  --pf-line: var(--calm-line); --pf-line-strong: #DAD6CF; --pf-line-green: var(--calm-line);
  --pf-wash: var(--calm-sage-soft); --pf-canvas: var(--calm-page); --pf-section: var(--calm-card);
  --pf-brand: var(--calm-sage); --pf-brand-dark: var(--calm-sage-dark); --pf-pos: var(--calm-sage);
  --pf-head: var(--calm-sage-dark); --pf-head-text: #fff;

}

/* ---- 1. page and cards ---- */
html:not([data-theme="dark"]):has(main.dashboard-shell) body { background: var(--calm-page) !important; color: var(--calm-text); }
html:not([data-theme="dark"]) main.dashboard-shell #dashboardTabsContent { background: transparent !important; border: 0 !important; }
html:not([data-theme="dark"]) main.dashboard-shell .card,
html:not([data-theme="dark"]) main.dashboard-shell .pf-card,
html:not([data-theme="dark"]) main.dashboard-shell .pf-nwf-card,
html:not([data-theme="dark"]) main.dashboard-shell .pf-nw-tile,
html:not([data-theme="dark"]) main.dashboard-shell .pf-nw-card2,
html:not([data-theme="dark"]) main.dashboard-shell .pf-calc,
html:not([data-theme="dark"]) main.dashboard-shell .ov4-card,
html:not([data-theme="dark"]) main.dashboard-shell .ov4-tile,
html:not([data-theme="dark"]) main.dashboard-shell .pf-tile {
  background: var(--calm-card) !important; border: 1px solid var(--calm-line) !important; border-radius: 16px !important; box-shadow: none !important;
}
/* a card inside a card (tiles in "This month so far", net worth cards in a panel): a soft fill, not more white */
html:not([data-theme="dark"]) main.dashboard-shell :is(.card, .pf-card, .ov4-card, .pf-nwf-card, .pf-calc) :is(.card, .pf-card, .ov4-card, .ov4-tile, .pf-tile, .pf-nw-tile, .pf-nw-card2) {
  background: var(--calm-nest) !important; border-color: #ECE9E2 !important;
}
/* Net worth and Calculators: the cards sit straight on the page, not on another white panel (founder 2026-12-05:
   "there has to be a colour contrast between the white behind the white boxes", e.g. You own / Investments) */
html:not([data-theme="dark"]) main.dashboard-shell #forecastTabsContent:has(> .tab-pane.active:is(#forecast-long-range, #forecast-calculators)) {
  background: transparent !important; border: 0 !important; box-shadow: none !important; padding-left: 0 !important; padding-right: 0 !important;
}
html:not([data-theme="dark"]) main.dashboard-shell .shadow,
html:not([data-theme="dark"]) main.dashboard-shell .shadow-sm { box-shadow: none !important; }

/* ---- 2. text ---- */
html:not([data-theme="dark"]) main.dashboard-shell h1, html:not([data-theme="dark"]) main.dashboard-shell h2,
html:not([data-theme="dark"]) main.dashboard-shell h3, html:not([data-theme="dark"]) main.dashboard-shell h4,
html:not([data-theme="dark"]) main.dashboard-shell h5, html:not([data-theme="dark"]) main.dashboard-shell h6 { color: var(--calm-ink); letter-spacing: -.01em; }
html:not([data-theme="dark"]) main.dashboard-shell .pf-top h4 { color: var(--calm-ink) !important; font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; }
html:not([data-theme="dark"]) main.dashboard-shell .text-muted,
html:not([data-theme="dark"]) main.dashboard-shell .pf-nwf-muted { color: var(--calm-muted) !important; }

/* headings on the green bands stay white */
html:not([data-theme="dark"]) main.dashboard-shell .pf-nwf-hero__title,
html:not([data-theme="dark"]) main.dashboard-shell .pf-answer h1, html:not([data-theme="dark"]) main.dashboard-shell .pf-answer h2,
html:not([data-theme="dark"]) main.dashboard-shell .pf-answer h3, html:not([data-theme="dark"]) main.dashboard-shell .pf-answer h4,
html:not([data-theme="dark"]) main.dashboard-shell .pf-answer h5, html:not([data-theme="dark"]) main.dashboard-shell .pf-answer h6 { color: #fff !important; }

/* ---- 3. the dark bands stay green (founder 2026-12-04: "I preferred the green"); only softer: no glow under them ---- */
html:not([data-theme="dark"]) main.dashboard-shell .pf-answer,
html:not([data-theme="dark"]) main.dashboard-shell .pf-figures,
html:not([data-theme="dark"]) main.dashboard-shell .pf-gband,
html:not([data-theme="dark"]) main.dashboard-shell .pf-nwf-hero { box-shadow: none !important; }
html:not([data-theme="dark"]) main.dashboard-shell .pf-figure { border-right-color: rgba(255, 255, 255, .1) !important; }
html:not([data-theme="dark"]) main.dashboard-shell .pf-figure dt { text-transform: uppercase; letter-spacing: .06em; font-size: .8rem !important; color: #A9ADA8 !important; }
html:not([data-theme="dark"]) main.dashboard-shell .pf-figure dd { color: #fff; text-shadow: none; }
html:not([data-theme="dark"]) main.dashboard-shell .pf-figure dd.is-neg { color: #F3A6A0; }
html:not([data-theme="dark"]) main.dashboard-shell .pf-figure dd.is-pos { color: #B9D3C4; }

/* ---- 4. table headers: one solid deep sage, no fade (the green headers stay: founder 2026-11-25) ---- */
html:not([data-theme="dark"]) main.dashboard-shell .pf-ui,
html:not([data-theme="dark"]) main.dashboard-shell .pf-ui * { --pf-head: var(--calm-sage-dark); }
html:not([data-theme="dark"]) main.dashboard-shell .pf-fc #tbl-cashflow-statement thead th,
html:not([data-theme="dark"]) main.dashboard-shell .pf-ui .pf-acc__t thead th:not(.is-sel):not(.is-total),
html:not([data-theme="dark"]) main.dashboard-shell .pf-ui .pf-hist__table th,
html:not([data-theme="dark"]) main.dashboard-shell .pf-ui .budget-analysis__table thead th,
html:not([data-theme="dark"]) main.dashboard-shell .pf-ui .ov4-table thead th,
html:not([data-theme="dark"]) main.dashboard-shell .pf-tx .table:not(.pf-tidy__kwtable) thead th {
  background: var(--calm-sage-dark) !important; background-image: none !important;
}

/* ---- 5. buttons, tabs and links: the one accent ---- */
html:not([data-theme="dark"]) main.dashboard-shell .btn-success {
  background: var(--calm-sage) !important; border-color: var(--calm-sage) !important; color: #fff !important; border-radius: 10px; box-shadow: none !important;
}
html:not([data-theme="dark"]) main.dashboard-shell .btn-success:hover { background: var(--calm-sage-dark) !important; border-color: var(--calm-sage-dark) !important; }
html:not([data-theme="dark"]) main.dashboard-shell .btn-outline-success,
html:not([data-theme="dark"]) main.dashboard-shell .btn-outline-secondary {
  background: var(--calm-card) !important; border: 1px solid var(--calm-line) !important; color: var(--calm-ink) !important; border-radius: 10px; box-shadow: none !important;
}
html:not([data-theme="dark"]) main.dashboard-shell .btn-outline-success:hover,
html:not([data-theme="dark"]) main.dashboard-shell .btn-outline-secondary:hover { background: var(--calm-sage-soft) !important; }
html:not([data-theme="dark"]) main.dashboard-shell .pf-tabs .nav-link { color: var(--calm-muted) !important; }
html:not([data-theme="dark"]) main.dashboard-shell .pf-tabs .nav-link.active { color: var(--calm-ink) !important; border-bottom-color: var(--calm-ink) !important; }
html:not([data-theme="dark"]) main.dashboard-shell .pf-nw-subtabs { background: var(--calm-card); border: 1px solid var(--calm-line); }
html:not([data-theme="dark"]) main.dashboard-shell .pf-nw-subtabs button.is-on { background: var(--calm-sage); }

/* ---- 6. tiles: small grey uppercase label, black figure ---- */
html:not([data-theme="dark"]) main.dashboard-shell .pf-nw-tile dt,
html:not([data-theme="dark"]) main.dashboard-shell .ov4-tile__top,
html:not([data-theme="dark"]) main.dashboard-shell .pf-tile__label,
html:not([data-theme="dark"]) main.dashboard-shell .pf-nw-card2 dt,
html:not([data-theme="dark"]) main.dashboard-shell .pf-calc__hl-label {
  text-transform: uppercase; letter-spacing: .06em; font-size: .8rem !important; font-weight: 600; color: var(--calm-muted) !important;
}
html:not([data-theme="dark"]) main.dashboard-shell .pf-nw-tile dd,
html:not([data-theme="dark"]) main.dashboard-shell .ov4-tile__value,
html:not([data-theme="dark"]) main.dashboard-shell .pf-tile__value { color: var(--calm-ink); }
html:not([data-theme="dark"]) main.dashboard-shell .is-debt,
html:not([data-theme="dark"]) main.dashboard-shell .is-neg,
html:not([data-theme="dark"]) main.dashboard-shell .text-danger { color: var(--calm-red) !important; }

/* calculators and net worth: the soft green panels become a quiet warm grey */
html:not([data-theme="dark"]) main.dashboard-shell .pf-calc__result { background: #F6F5F1 !important; color: var(--calm-ink) !important; }
html:not([data-theme="dark"]) main.dashboard-shell .pf-calc__lines div { border-top-color: var(--calm-line) !important; }
html:not([data-theme="dark"]) main.dashboard-shell .pf-nw-card2__icon { background: var(--calm-sage-soft) !important; color: var(--calm-sage-dark);
  font-size: .68rem !important; font-weight: 700; letter-spacing: .02em; }

/* ---- 7. nav bar: white, thin line, the page you're on in ink ---- */
html:not([data-theme="dark"]):has(main.dashboard-shell) .site-navbar { background: var(--calm-card) !important; border-bottom: 1px solid var(--calm-line) !important; box-shadow: none !important; }
html:not([data-theme="dark"]):has(main.dashboard-shell) body .site-navbar .nav-link:not(.btn):not(.signup-btn) { color: var(--calm-text) !important; }
html:not([data-theme="dark"]):has(main.dashboard-shell) body .site-navbar .nav-link[aria-current="page"] { color: var(--calm-ink) !important;
  background: var(--calm-sage-soft) !important; box-shadow: none !important; border-radius: 999px; }

/* =====================================================================================================================
   Step 2 (founder 2026-12-04: "Do step 2"; coloured table headers stay): one dark card per page that reads as one
   thing, no stray accent colours, quieter extras around the page.
   ===================================================================================================================== */

/* ---- 8. the dark answer card: everything inside it in the same soft tones ---- */
html:not([data-theme="dark"]) main.dashboard-shell .ov4-top .ov4-greet { border-bottom-color: rgba(255, 255, 255, .1); }
html:not([data-theme="dark"]) main.dashboard-shell .ov4-top .ov4-greet__face { border-color: rgba(255, 255, 255, .25) !important; }
html:not([data-theme="dark"]) main.dashboard-shell .finance-overview .ov4-top .ov-headline--greet .ov-headline__text { color: #D4D7D3 !important; }
html:not([data-theme="dark"]) main.dashboard-shell .ov4-top .ov4-greet a,
html:not([data-theme="dark"]) main.dashboard-shell .ov4-top .ov4-greet__link { color: #C9D8CF !important; }
/* "Left to spend" sits in the dark card as an inset of it, not a mint card inside a dark card */
html:not([data-theme="dark"]) main.dashboard-shell .finance-overview .ov3 .ov4-safe {
  background: rgba(255, 255, 255, .05) !important; border: 1px solid rgba(255, 255, 255, .1) !important; color: #D4D7D3; }
html:not([data-theme="dark"]) main.dashboard-shell .finance-overview .ov3 .ov4-safe__lbl { color: #fff !important; }
html:not([data-theme="dark"]) main.dashboard-shell .finance-overview .ov3 .ov4-safe__amt { color: #fff !important; }
html:not([data-theme="dark"]) main.dashboard-shell .finance-overview .ov3 .ov4-safe__amt.is-neg { color: #F3A6A0 !important; }
html:not([data-theme="dark"]) main.dashboard-shell .finance-overview .ov3 .ov4-safe__sub,
html:not([data-theme="dark"]) main.dashboard-shell .finance-overview .ov3 .ov4-safe p { color: #C3C7C2 !important; }
html:not([data-theme="dark"]) main.dashboard-shell .finance-overview .ov3 .ov4-safe b,
html:not([data-theme="dark"]) main.dashboard-shell .finance-overview .ov3 .ov4-safe strong { color: #fff; }
html:not([data-theme="dark"]) main.dashboard-shell .finance-overview .ov3 .ov4-safe__how summary { color: #C9D8CF !important; }
html:not([data-theme="dark"]) main.dashboard-shell .finance-overview .ov3 .ov4-safe__warn {
  background: rgba(245, 208, 138, .08) !important; border: 1px solid rgba(245, 208, 138, .3) !important; color: #F2D79C !important; }
/* the tiles inside the dark cards: quiet chips */
html:not([data-theme="dark"]) main.dashboard-shell .pf-cmp__tile-chip { background: rgba(255, 255, 255, .1) !important; color: #DDE2DC !important; border: 0 !important; }
html:not([data-theme="dark"]) main.dashboard-shell .pf-cmp__tile-chip.is-lower { color: #C9D8CF !important; }
html:not([data-theme="dark"]) main.dashboard-shell .pf-cmp__tile-chip.is-higher { color: #F3A6A0 !important; }

/* ---- 9. no stray accents: badges, chips, pills and notes in the one sage or plain grey ---- */
html:not([data-theme="dark"]) main.dashboard-shell .pf-nwf-badge { background: var(--calm-sage-soft) !important; color: var(--calm-sage-dark) !important; }
html:not([data-theme="dark"]) main.dashboard-shell .pf-nwf-badge.is-short { background: #FDEDEC !important; color: var(--calm-red) !important; }
html:not([data-theme="dark"]) main.dashboard-shell .ov-ask__chips button,
html:not([data-theme="dark"]) main.dashboard-shell .ov-lay__btn,
html:not([data-theme="dark"]) main.dashboard-shell .pf-chip {
  background: var(--calm-card) !important; border: 1px solid var(--calm-line) !important; color: var(--calm-ink) !important; box-shadow: none !important; }
html:not([data-theme="dark"]) main.dashboard-shell .pf-seg button.is-on,
html:not([data-theme="dark"]) main.dashboard-shell .pf-seg button.active { background: var(--calm-sage) !important; color: #fff !important; }
html:not([data-theme="dark"]) main.dashboard-shell .pf-seg { background: var(--calm-card) !important; border: 1px solid var(--calm-line) !important; }

/* "Optional: …" above a page: a plain card, not a yellow banner */
html:not([data-theme="dark"]) main.dashboard-shell .pf-ahead {
  background: var(--calm-card) !important; border: 1px solid var(--calm-line) !important; color: var(--calm-text) !important; border-radius: 14px !important; }
html:not([data-theme="dark"]) main.dashboard-shell .pf-ahead a:not(.btn):not(.pf-ahead__btn) { color: var(--calm-muted) !important; }
html:not([data-theme="dark"]) main.dashboard-shell .pf-ahead .pf-ahead__btn { background: var(--calm-sage) !important; color: #fff !important; border-color: var(--calm-sage) !important; }

/* ---- 10. the floating buttons: the coach, the tour and Feedback in the same quiet style ---- */
html:not([data-theme="dark"]):has(main.dashboard-shell) #pf-chat {
  --c-brand: var(--calm-sage); --c-me: var(--calm-sage); --c-coach: #F6F5F1; --c-line: var(--calm-line); --c-ink: var(--calm-ink); }
html:not([data-theme="dark"]):has(main.dashboard-shell) #pf-chat .pfc-fab { box-shadow: 0 4px 14px rgba(27, 29, 27, .18) !important; }
html:not([data-theme="dark"]):has(main.dashboard-shell) #pf-chat .pfc-tourbtn { border-width: 1px !important; border-color: var(--calm-line) !important;
  color: var(--calm-ink) !important; box-shadow: 0 4px 14px rgba(27, 29, 27, .08) !important; }
html:not([data-theme="dark"]):has(main.dashboard-shell) .pf-fb-btn { background: var(--calm-card) !important; border: 1px solid var(--calm-line) !important;
  color: var(--calm-text) !important; box-shadow: 0 4px 14px rgba(27, 29, 27, .08) !important; }

/* How you compare's dark card: its label, Read more and the picked tile in the same greys */
html:not([data-theme="dark"]) main.dashboard-shell .pf-cmp .pf-cmp__glance .pf-cmp__said,
html:not([data-theme="dark"]) main.dashboard-shell .pf-cmp__fold { color: #C9D8CF !important; }
html:not([data-theme="dark"]) main.dashboard-shell .pf-cmp .pf-cmp__glance .pf-cmp__face { border-color: rgba(255, 255, 255, .25) !important; }
html:not([data-theme="dark"]) main.dashboard-shell .pf-cmp .pf-cmp__tile.is-on { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .45) !important; }
