/* Alpha-Gal Living v1.4.4: scoped contrast instead of forced white button text. */
html.agl-dark-mode{color-scheme:dark}
/* Never force every button to white: light-background buttons need dark text. */
html.agl-dark-mode :is(.agl-btn.secondary,.agl-provider,.agl-continue-guest,.agl-text-button,.agl-account-close){color:#193d2f!important;background:#eaf5ed!important;border-color:#88ab96!important}
html.agl-dark-mode :is(.agl-btn.secondary,.agl-provider,.agl-continue-guest,.agl-text-button,.agl-account-close):hover{background:#d8eadd!important}
html.agl-dark-mode :is(.agl-btn:not(.secondary),.agl-email-submit,#agl-ai-review){color:#fff!important;background:#226a4b!important}
html.agl-dark-mode :is(.agl-btn:not(.secondary),.agl-email-submit,#agl-ai-review):hover{background:#1a563e!important}
html.agl-dark-mode :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select){background:#152a22!important;color:#effcf3!important;border-color:#537863!important}
html.agl-dark-mode :is(input,textarea)::placeholder{color:#c0d6c8!important;opacity:1}
html.agl-dark-mode :is(button,[role="button"]):disabled{opacity:.7;cursor:not-allowed}
html.agl-dark-mode .agl-account-panel{background:#1b2d25!important;color:#edf5ef!important}
html.agl-dark-mode .agl-account-panel :is(.agl-account-brand h1,.agl-account-brand p,.agl-email-tools,.agl-account-divider,.agl-account-terms,.agl-email-form label){color:#edf5ef!important}
html.agl-dark-mode .agl-account-panel .agl-account-message.is-error{color:#ffb7aa!important}
html.agl-dark-mode .agl-account-panel .agl-account-message.is-success{color:#a4eed0!important}
/* Food/lifestyle illustrations display only in designated page headers. */
.agl-v143-hero{position:relative;overflow:hidden;isolation:isolate}
.agl-v143-hero>*{position:relative;z-index:1}
.agl-v143-hero::before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background-repeat:no-repeat;background-position:right center;background-size:cover}
.agl-v143-hero[data-agl-hero="home"]::before { background-image: linear-gradient(105deg, #103e31, #1e674c); }
#root .welcome-row.agl-v143-hero[data-agl-hero="home"]::after {
  display: block;
  content: "";
  position: absolute;
  inset: auto 20% 0 auto;
  width: clamp(145px, 20vw, 255px);
  height: auto;
  aspect-ratio: 1;
  z-index: 0;
  border: 0;
  background: url("/images/today-food-plate-v1410.webp?v=152") center / contain no-repeat;
  opacity: .55;
  pointer-events: none;
}

@media (max-width: 719px) {
  #root .welcome-row.agl-v143-hero[data-agl-hero="home"]::after {
    width: clamp(100px, 29vw, 145px);
    right: 8%;
    bottom: 1px;
  }
}

.agl-v143-hero[data-agl-hero="recipes"]::before{background-image:linear-gradient(90deg,rgba(12,53,42,.92),rgba(25,121,80,.49)),url('./hero-safe-foods.svg')}
.agl-v143-hero[data-agl-hero="premium"]::before,.agl-v143-hero[data-agl-hero="settings"]::before{background-image:linear-gradient(90deg,rgba(11,54,42,.94),rgba(58,147,92,.48)),url('./hero-safe-people.svg')}
.agl-v143-hero[data-agl-hero="plan"]::before{background-image:linear-gradient(90deg,rgba(11,52,40,.94),rgba(45,124,91,.5)),url('./hero-safe-planning.svg')}
.agl-v143-hero:is([data-agl-hero="home"],[data-agl-hero="recipes"],[data-agl-hero="premium"],[data-agl-hero="settings"],[data-agl-hero="plan"]) :is(h1,h2,h3,p,small){color:#f4fdf5!important;text-shadow:0 2px 8px rgba(9,31,24,.35)}
/* Existing pale home welcome in dark mode should retain its readable dark text. */
html.agl-dark-mode :is(.welcome-row,.agl-modern-welcome):is(.agl-v143-hero){background:#174e3a!important}
html.agl-dark-mode :is(.welcome-row,.agl-modern-welcome).agl-v143-hero :is(h1,h2,h3,p,small){color:#f4fdf5!important}
@media(prefers-reduced-transparency:reduce){.agl-v143-hero::before{opacity:.75}}
