/* One two-colour gradient per section (dark theme). The sidebar icon colours set each pair:
   Home blue→cyan, Gym periwinkle→indigo, Macros mint→sky, Passive Income gold→orange,
   Progress & Data lavender→pink, Tools green→teal. Loaded last so it wins over the older per-card colours. */
html:not([data-theme="light"]) body #homePage{--sa:#60a5fa;--sb:#22d3ee}
html:not([data-theme="light"]) body #gymPage{--sa:#a5b4fc;--sb:#6366f1}
html:not([data-theme="light"]) body #macrosPage{--sa:#5eead4;--sb:#38bdf8}
html:not([data-theme="light"]) body #workPage{--sa:#fcd34d;--sb:#f97316}
html:not([data-theme="light"]) body #progressPage{--sa:#c4b5fd;--sb:#ec4899}
html:not([data-theme="light"]) body #toolsPage{--sa:#4ade80;--sb:#14b8a6}

/* Section headers */
html:not([data-theme="light"]) body :is(#homePage,#gymPage,#workPage,#progressPage,#toolsPage)>.ly-section-hero,
html:not([data-theme="light"]) body #workPage .work-hero.ly-section-hero,
html:not([data-theme="light"]) body #macrosPage header.nv-header.ly-section-hero{
 background:linear-gradient(135deg,color-mix(in srgb,var(--sa) 26%,#141824) 0%,#151a25 55%,color-mix(in srgb,var(--sb) 30%,#141824) 100%)!important;
 border:1.5px solid color-mix(in srgb,var(--sa) 55%,transparent)!important}
html:not([data-theme="light"]) body :is(#homePage,#gymPage,#workPage,#progressPage,#toolsPage) .ly-section-hero h1,
html:not([data-theme="light"]) body #macrosPage header.nv-header.ly-section-hero h1{
 background:linear-gradient(90deg,var(--sa),var(--sb))!important;-webkit-background-clip:text!important;background-clip:text!important;color:transparent!important;-webkit-text-fill-color:transparent!important}
html:not([data-theme="light"]) body :is(#homePage,#gymPage,#workPage,#progressPage,#toolsPage,#macrosPage) .ly-section-hero :is(.eyebrow,.ly-hero-eyebrow){color:var(--sa)!important}

/* Cards inside Progress & Data and Tools: each card keeps its own colour pair (mobile and desktop). */
html body #progressPage #progressGoalsLanding .pg-progress{--hc:#f472b6;--hc2:#c084fc;--hcText:#ffffff}
html body #progressPage #progressGoalsLanding .pg-data{--hc:#22d3ee;--hc2:#818cf8;--hcText:#06212b}
html body #toolsPage #toolsLanding .tl-data{--hc:#10b981;--hc2:#5eead4;--hcText:#052e1c}
html body #toolsPage #toolsLanding .tl-schedule{--hc:#f59e0b;--hc2:#fdba74;--hcText:#2d1b05}
#toolsLanding .tl-tiktok{display:none!important}

/* Home cards: each one wears the colours of the section it opens. */
html:not([data-theme="light"]) body #homePage#homePage#homePage .home-card:nth-child(1){--hc:#a5b4fc;--hc2:#6366f1;--hcText:#141b3a}
html:not([data-theme="light"]) body #homePage#homePage#homePage .home-card:nth-child(2){--hc:#5eead4;--hc2:#38bdf8;--hcText:#062a26}
html:not([data-theme="light"]) body #homePage#homePage#homePage .home-card:nth-child(3){--hc:#fcd34d;--hc2:#f97316;--hcText:#2d1b05}
html:not([data-theme="light"]) body #homePage#homePage#homePage .home-card:nth-child(4){--hc:#c4b5fd;--hc2:#ec4899;--hcText:#ffffff}
html:not([data-theme="light"]) body #homePage#homePage#homePage .home-card:nth-child(5){--hc:#4ade80;--hc2:#14b8a6;--hcText:#052e1c}

html body #progressPage {--progress-surface:#211b2b;--progress-header:#472843}
html[data-theme="light"] body #progressPage {--progress-surface:#fffaff;--progress-header:#ffe2ef}
html body #progressPage #progressGoalsLanding .home-card.pg-progress,
html body[data-progress-area="progress"] #progressPage #progressTrackingPane .settings-card {
 border:2px solid transparent!important;
 background:linear-gradient(125deg,var(--progress-header),var(--progress-surface) 75%) padding-box,linear-gradient(125deg,#f472b6,#c084fc) border-box!important;
}
body[data-progress-area="progress"] #progressPage #progressGoalsBack {
 padding:16px;border-radius:16px;background:linear-gradient(115deg,var(--progress-header),var(--progress-surface));border-inline-start:4px solid #f472b6;
}
html body #progressPage #progressGoalsLanding .home-card.pg-progress button,
html body[data-progress-area="progress"] #progressPage #progressTrackingPane .settings-card :is(.ly-search,.ly-photo-folder-create) button {
 background:linear-gradient(115deg,#f472b6,#c084fc)!important;color:#281328!important;border-color:transparent!important;
}
#mfSchedDlg .mf-agenda {list-style:none;padding:0;margin:4px 0 16px}
#mfSchedDlg .mf-agenda li {display:grid;grid-template-columns:5.5em 1fr;gap:8px;padding:7px 0;border-bottom:1px solid #8884;overflow-wrap:anywhere}
#mfSchedDlg .mf-agenda li span:first-child {font-variant-numeric:tabular-nums}
#mdFocus .mf-sched+.mf-sched {margin-inline-start:6px}
html body #logModal .gym-log-back {width:44px;height:44px;padding:0;border-radius:14px;background:linear-gradient(135deg,#a5b4fc,#6366f1)!important;color:#171838!important;font-size:22px}
html body #logModal :is(.dialog,.field,#logDate) {min-width:0!important;box-sizing:border-box;max-width:100%!important}
html body #logModal #logDate {width:100%!important;display:block}
ul.history-total {display:grid;gap:6px;list-style:none;padding-inline-start:0}
ul.history-total li::before {content:'✓';color:#a5b4fc;margin-inline-end:8px}
#workPage #lyIncomePages .ly-income-page-strip {display:grid;grid-template-columns:minmax(0,1fr);width:fit-content;min-width:min(100%,17rem);max-width:100%;box-sizing:border-box}
#workPage #lyIncomePages :is(.ly-income-page,.ly-income-page-add) {width:100%!important;min-width:0;max-width:100%;box-sizing:border-box;overflow-wrap:anywhere}
#workPage #lyIncomePages .ly-income-page-tab {flex:1;min-width:0;overflow-wrap:anywhere}

html body[data-progress-area="progress"] #progressPage>.ly-section-hero {
 --sa:#f472b6;--sb:#c084fc;
 background:linear-gradient(120deg,var(--progress-header),var(--progress-surface) 80%)!important;
 border-color:#c084fc!important;
}
html body #progressPage #progressGoalsLanding .pg-progress {--li:var(--hc)}
html body #progressPage #progressGoalsLanding .pg-progress h2 {color:var(--hc)!important}
html[data-theme="light"] body #progressPage #progressGoalsLanding .pg-progress h2 {color:#833769!important}

html body[data-progress-area='progress'] #progressPage #progressTrackingPane .settings-card {--k:#f472b6;--k2:#c084fc}
