/* Shared by the static homepage and every Next.js route. Media keeps its
   original pixels; only the site's surfaces and controls change theme. */
:root {
  color-scheme: dark;
  --background: var(--bg);
  --foreground: var(--fg, var(--text));
  --theme-app-band: #121212;
  --theme-identity-start: #191d1b;
  --theme-identity-end: #131514;
  --theme-membership-start: #1b2921;
  --theme-membership-end: #141815;
  --theme-support-start: #122119;
  --theme-support-mid: #0d1410;
  --theme-support-end: #0a0d0b;
  --theme-control-bg: rgba(25,29,27,.88);
  --theme-control-fg: #eaf0ec;
  --theme-control-border: rgba(255,255,255,.14);
  --theme-control-shadow: 0 4px 18px rgba(0,0,0,.24);
}
:root:is([data-theme="light"], [data-theme="white"]) {
  color-scheme: light;
  --theme-app-band: #ecf0e9;
  --theme-identity-start: #e9f0e5;
  --theme-identity-end: #ffffff;
  --theme-membership-start: #e3f0dd;
  --theme-membership-end: #f5f8f0;
  --theme-support-start: #e7f2e6;
  --theme-support-mid: #f0f5eb;
  --theme-support-end: #ffffff;
  --bg: #f6f7f4;
  --text: #18221c;
  --fg: #18221c;
  --muted: #56615a;
  --fg-secondary: #56615a;
  --surface: #ffffff;
  --surface-raised: #edf1eb;
  --surface-three: #e6ece5;
  --border: #d5ddd4;
  --divider: #d5ddd4;
  --accent: #18281e;
  --accent-text: #ffffff;
  --success: #087f5b;
  --elevated-border: rgba(26,45,32,.15);
  --section-tint: #edf2eb;
  --glass-surface: rgba(255,255,255,.7);
  --glass-surface-strong: rgba(255,255,255,.88);
  --glass-border: rgba(26,45,32,.15);
  --theme-control-bg: rgba(255,255,255,.88);
  --theme-control-fg: #243b2d;
  --theme-control-border: rgba(26,45,32,.17);
  --theme-control-shadow: 0 4px 18px rgba(26,45,32,.1);
}

.feron-theme-toggle {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--theme-control-border);
  border-radius: 50%;
  background: var(--theme-control-bg);
  color: var(--theme-control-fg);
  box-shadow: var(--theme-control-shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s ease;
}
.feron-theme-toggle .theme-sun { display: none; }
:is([data-theme="light"], [data-theme="white"]) .feron-theme-toggle .theme-sun { display: block; }
:is([data-theme="light"], [data-theme="white"]) .feron-theme-toggle .theme-moon { display: none; }
/* Appearance belongs to the footer, never to the viewport. */
footer.site-footer,footer.legal-footer > div,footer.account-footer > div{display:grid;grid-template-columns:minmax(0,1fr) auto 46px;align-items:center;gap:20px}
.site-footer nav,.legal-footer nav,.account-footer nav{grid-column:1;grid-row:1;justify-self:start;justify-content:flex-start;flex-wrap:wrap;min-width:0;width:100%;text-align:left}
.site-footer>span,.legal-footer > div > span,.account-footer > div > span{grid-column:2;grid-row:1;justify-self:end}
.site-footer .feron-theme-toggle,.legal-footer .feron-theme-toggle,.account-footer .feron-theme-toggle{position:static;grid-column:3;grid-row:1;justify-self:end;box-shadow:none;background:transparent}
@media(max-width:620px){footer.site-footer,footer.legal-footer > div,footer.account-footer > div{grid-template-columns:1fr 46px;gap:18px}.site-footer nav,.legal-footer nav,.account-footer nav{grid-column:1/-1;grid-row:1;justify-self:start}.site-footer>span,.legal-footer > div > span,.account-footer > div > span{order:initial;grid-column:1;grid-row:2;justify-self:start}.site-footer .feron-theme-toggle,.legal-footer .feron-theme-toggle,.account-footer .feron-theme-toggle{grid-column:2;grid-row:2}}


/* Navigation: light glass, with a bare high-contrast home mark. */
:is([data-theme="light"], [data-theme="white"]) :is(.nav-home-mark, .feron-nav-brand) svg { stroke: none; filter: none; }
:is([data-theme="light"], [data-theme="white"]) :is(.nav-island, .feron-nav) {
  background: rgba(255,255,255,.78);
  border-color: var(--glass-border);
  box-shadow: 0 12px 32px rgba(26,45,32,.08), inset 0 1px 0 rgba(255,255,255,.7);
  backdrop-filter: blur(24px) saturate(1.15);
  -webkit-backdrop-filter: blur(24px) saturate(1.15);
}
:is([data-theme="light"], [data-theme="white"]) :is(.nav-menu-home, .feron-nav-menu-home) { color: var(--fg); }
:is([data-theme="light"], [data-theme="white"]) :is(.nav-cart, .feron-cart-link, .feron-menu-toggle) { color: var(--fg-secondary); }
:is([data-theme="light"], [data-theme="white"]) .menu-toggle span { background: var(--fg-secondary); }
:is([data-theme="light"], [data-theme="white"]) :is(.menu-content a, .feron-menu-links a) { color: var(--fg-secondary); }
:is([data-theme="light"], [data-theme="white"]) :is(.menu-content a:first-child, .feron-menu-links) { border-color: var(--border); }
:is([data-theme="light"], [data-theme="white"]) :is(.nav-cart, .feron-cart-link):hover { background: rgba(26,45,32,.05); color: var(--fg); }
:is([data-theme="light"], [data-theme="white"]) :is(.nav-menu-home, .feron-nav-menu-home, .menu-content a, .feron-menu-links a):hover,
:is([data-theme="light"], [data-theme="white"]) :is(.menu-content a, .feron-menu-links a)[aria-current="page"] { color: var(--fg); }
:is([data-theme="light"], [data-theme="white"]) :is(.nav-cart-count, .feron-cart-count) { background: var(--success); color: #fff; }
:is([data-theme="light"], [data-theme="white"]) :is(button, a, summary):focus-visible { outline-color: var(--success); }
:is([data-theme="light"], [data-theme="white"]) .feron-page-curtain { background: #e3ece2; color: #18281e; border-color: #79ac8b; }
:is([data-theme="light"], [data-theme="white"]) .feron-page-curtain-rule { background: #8bad96; }

/* Homepage. The dark device surrounds are deliberate parts of the media. */
:is([data-theme="light"], [data-theme="white"]) :is(.muted, .hero-description, .section-heading > p, .setup-steps p, .story-copy p, .faq-list details p, .faq-list summary span) { color: var(--fg-secondary); }
:is([data-theme="light"], [data-theme="white"]) .primary { background: var(--accent); color: var(--accent-text); }
:is([data-theme="light"], [data-theme="white"]) .primary:hover { background: #2c4333; }
:is([data-theme="light"], [data-theme="white"]) .app-section { background: linear-gradient(var(--bg), var(--theme-app-band) 28%, var(--theme-app-band) 75%, var(--bg)); }
:is([data-theme="light"], [data-theme="white"]) .stage-light { background: radial-gradient(ellipse, rgba(63,102,74,.07), transparent 65%); }
:is([data-theme="light"], [data-theme="white"]) .screen-card { border-color: #68786e; box-shadow: 0 20px 40px rgba(26,45,32,.19); }
:is([data-theme="light"], [data-theme="white"]) .screen-card.is-selected { border-color: #547c62; box-shadow: 0 26px 48px rgba(26,45,32,.23); }
:is([data-theme="light"], [data-theme="white"]) .screen-tabs { background: #e2e8df; border-color: var(--border); }
:is([data-theme="light"], [data-theme="white"]) .screen-tabs button { color: var(--fg-secondary); }
:is([data-theme="light"], [data-theme="white"]) .screen-tabs button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }
:is([data-theme="light"], [data-theme="white"]) .app-ios-link { color: var(--success); }
:is([data-theme="light"], [data-theme="white"]) .app-ios-link:hover { color: var(--fg); }
:is([data-theme="light"], [data-theme="white"]) .setup-steps li { border-color: var(--border); }
:is([data-theme="light"], [data-theme="white"]) .setup-steps li::before { color: var(--fg-secondary); }
:is([data-theme="light"], [data-theme="white"]) .setup-steps li::after { background: var(--success); }
:is([data-theme="light"], [data-theme="white"]) .story-card { background: #fff; border-color: var(--border); box-shadow: 0 8px 32px rgba(26,45,32,.08); }
:is([data-theme="light"], [data-theme="white"]) .story-card::after { background: #253e2b; }
:is([data-theme="light"], [data-theme="white"]) .feature-story { background: linear-gradient(145deg, #fff, #f7f8f6); border-color: var(--border); box-shadow: 0 18px 48px rgba(26,45,32,.08), inset 0 1px 0 #fff; }
:is([data-theme="light"], [data-theme="white"]) .feature-story::after { background: linear-gradient(125deg, rgba(255,255,255,.8), transparent 32%, transparent 72%, rgba(8,127,91,.06)); }
:is([data-theme="light"], [data-theme="white"]) .habit-story { background: linear-gradient(145deg, #fff, #f7f8f6); }
:is([data-theme="light"], [data-theme="white"]) .social-story { background: linear-gradient(145deg, #fff, #f7f8f6); }
:is([data-theme="light"], [data-theme="white"]) .phone-window { box-shadow: 0 20px 40px rgba(26,45,32,.2); }
:is([data-theme="light"], [data-theme="white"]) .share-window { box-shadow: 0 20px 40px rgba(26,45,32,.19); }
:is([data-theme="light"], [data-theme="white"]) .habit-preview { filter: drop-shadow(0 12px 20px rgba(26,45,32,.1)); }
:is([data-theme="light"], [data-theme="white"]) :is(.habit-member, .habit-grove) { background: #fff; border-color: #cbd9c9; }
:is([data-theme="light"], [data-theme="white"]) .habit-avatar { background: #e7eee3; color: #425d49; }
:is([data-theme="light"], [data-theme="white"]) :is(.habit-member strong, .habit-grove-caption span:first-child) { color: var(--success); }
:is([data-theme="light"], [data-theme="white"]) :is(.habit-member strong.is-pending, .habit-grove-caption span:last-child) { color: var(--fg-secondary); }
:is([data-theme="light"], [data-theme="white"]) .comparison-card { background: transparent; }
:is([data-theme="light"], [data-theme="white"]) .comparison-scroll { scrollbar-color: #89998d transparent; }
:is([data-theme="light"], [data-theme="white"]) :is(.comparison-table tbody th, .comparison-table tbody td) { background: transparent; border-top-color: var(--border); }
:is([data-theme="light"], [data-theme="white"]) .comparison-table .is-sensor { background: transparent; }
:is([data-theme="light"], [data-theme="white"]) .comparison-option.is-sensor { color: var(--success); }
:is([data-theme="light"], [data-theme="white"]) :is(.comparison-table .comparison-check, .comparison-table .comparison-cross) { background: transparent; }
:is([data-theme="light"], [data-theme="white"]) .testing-qr { background: transparent; }
:is([data-theme="light"], [data-theme="white"]) :is(.comparison-check, .is-sensor .comparison-price) { color: var(--success); }
:is([data-theme="light"], [data-theme="white"]) :is(.comparison-cross, .comparison-price) { color: var(--fg-secondary); }
:is([data-theme="light"], [data-theme="white"]) :is(.site-footer, .legal-footer, .account-footer > div) { color: var(--fg-secondary); border-color: var(--border); }
:is([data-theme="light"], [data-theme="white"]) .legal-footer > div { border-color: var(--border); }
:is([data-theme="light"], [data-theme="white"]) :is(.site-footer a, .legal-footer a):hover { color: var(--fg); }

/* Product, cart, checkout, testing and supporting pages. */
:is([data-theme="light"], [data-theme="white"]) :is(.snap-product-heading p, .cart-topline a, .testing-card > p, .support-contact-copy > span, .product-lede, .product-story > p) { color: var(--fg-secondary); }
:is([data-theme="light"], [data-theme="white"]) :is(.snap-product-price, .snap-quantity output) { color: var(--fg); }
:is([data-theme="light"], [data-theme="white"]) :is(.snap-gallery-main, .snap-gallery-views button) { border-color: var(--border); }
:is([data-theme="light"], [data-theme="white"]) .snap-gallery-views button[aria-pressed="true"] { border-color: var(--success); box-shadow: 0 0 0 1px var(--success); }
:is([data-theme="light"], [data-theme="white"]) .snap-quantity { background: var(--surface); border-color: var(--border); }
:is([data-theme="light"], [data-theme="white"]) .snap-quantity button { color: var(--fg-secondary); }
:is([data-theme="light"], [data-theme="white"]) .snap-preorder-button { background: var(--accent); color: var(--accent-text); }
:is([data-theme="light"], [data-theme="white"]) .snap-preorder-button:hover { background: #2c4333; }
:is([data-theme="light"], [data-theme="white"]) .snap-preorder-button[data-added="true"] { background: #086c4d; }
:is([data-theme="light"], [data-theme="white"]) :is(.cart-page .cart-summary, .testing-card) { background: var(--surface); border-color: var(--border); }
:is([data-theme="light"], [data-theme="white"]) :is(.checkout-note, .purchase-added, .testing-card > .testing-confirmation) { color: var(--success); }
:is([data-theme="light"], [data-theme="white"]) .shop-error { color: #b42323; }
:is([data-theme="light"], [data-theme="white"]) .support-hero-panel {
  background: radial-gradient(circle at 72% 34%, rgba(16,185,129,.12), transparent 28%), linear-gradient(145deg, var(--theme-support-start), var(--theme-support-mid) 50%, var(--theme-support-end)) !important;
  box-shadow: 0 20px 60px rgba(26,45,32,.08), inset 0 1px 0 #fff;
}
:is([data-theme="light"], [data-theme="white"]) .support-hero-signal { color: var(--success); }
:is([data-theme="light"], [data-theme="white"]) .support-contact-card:hover { background: #edf4ea; border-color: #8eac96; }
:is([data-theme="light"], [data-theme="white"]) .lf-card:hover { border-color: #a9b8ac !important; box-shadow: 0 16px 38px rgba(26,45,32,.12); }
:is([data-theme="light"], [data-theme="white"]) :is(.lf-card, .review-card, .proof-chart-card, .app-preview-screenshot-slot, .step-screenshot-slot, .product-gallery-main, .product-gallery-thumb, .attachment-option, .quantity-control, .support-contact-card, .cart-summary, .cart-empty) {
  box-shadow: 0 10px 32px rgba(26,45,32,.07), inset 0 1px 0 rgba(255,255,255,.65);
}

/* Profile, grouped settings, editing, membership, orders and all auth forms. */
:is([data-theme="light"], [data-theme="white"]) :is(.account-row-list, .account-editor-card, .account-disclosure-list, .account-page .account-delete) { background: var(--surface); border-color: var(--border); }
:is([data-theme="light"], [data-theme="white"]) .account-identity { background: linear-gradient(125deg, var(--theme-identity-start), var(--theme-identity-end) 75%); border-color: var(--border); }
:is([data-theme="light"], [data-theme="white"]) .account-photo { background: #dde9d9; color: #35583f; }
:is([data-theme="light"], [data-theme="white"]) .account-icon-button { color: var(--fg-secondary); border-color: var(--border); }
:is([data-theme="light"], [data-theme="white"]) :is(.account-row, .account-icon-button, .account-disclosure > summary):hover { background: #f0f4ed; }
:is([data-theme="light"], [data-theme="white"]) .account-row-list > li + li .account-row::before { background: #e1e7dd; }
:is([data-theme="light"], [data-theme="white"]) :is(.account-group > h2, .account-row-copy > span, .account-row-chevron, .account-signout button, .account-status, .account-note, .account-field-label small, .account-photo-control > summary, .account-consent > span > span, .account-disclosure-chevron, .account-policy-link, .account-membership-card p, .account-delete-body > p) { color: var(--fg-secondary); }
:is([data-theme="light"], [data-theme="white"]) :is(.account-row-icon, .account-setting-heading > svg, .account-membership-card > svg, .account-empty-order > svg, .account-text-link) { color: var(--success); }
:is([data-theme="light"], [data-theme="white"]) .account-status { border-color: var(--border); }
:is([data-theme="light"], [data-theme="white"]) .account-status.is-on { background: #e4f1e4; border-color: #a2cbae; color: #086443; }
:is([data-theme="light"], [data-theme="white"]) :is(.account-form input:not([type="checkbox"]), .account-form textarea, .account-form select) { background: #fff; color: var(--fg); border-color: #bfcbbc; }
:is([data-theme="light"], [data-theme="white"]) .account-form :is(input, textarea)::placeholder { color: #637160; }
:is([data-theme="light"], [data-theme="white"]) .account-form input::file-selector-button { background: #e6eee1; color: #27452d; }
:is([data-theme="light"], [data-theme="white"]) :is(.account-photo-editor, .account-disclosure + .account-disclosure) { border-color: var(--border); }
:is([data-theme="light"], [data-theme="white"]) .account-consent-card { background: #edf4e9; border-color: #c1d6bc; }
:is([data-theme="light"], [data-theme="white"]) .account-secondary-button { background: #edf2e9; color: var(--fg); border-color: #bdcdb7; }
:is([data-theme="light"], [data-theme="white"]) .account-secondary-button:hover { background: #e0eadd; }
:is([data-theme="light"], [data-theme="white"]) .account-membership-card { background: linear-gradient(120deg, var(--theme-membership-start), var(--theme-membership-end)); border-color: #bfd1b7; }
:is([data-theme="light"], [data-theme="white"]) .account-success { color: var(--success) !important; }
:is([data-theme="light"], [data-theme="white"]) :is(.account-delete > summary, .account-delete summary) { color: #a52626; }
:is([data-theme="light"], [data-theme="white"]) .account-page .account-delete { border-color: #e7caca; }
:is([data-theme="light"], [data-theme="white"]) .account-route-progress span { background: var(--success); box-shadow: 0 0 12px rgba(8,127,91,.25); }
:is([data-theme="light"], [data-theme="white"]) .account-row[data-account-nav-pending="true"] { background: #e3f1e2; }
:is([data-theme="light"], [data-theme="white"]) .account-row[data-account-nav-pending="true"] .account-row-chevron,
:is([data-theme="light"], [data-theme="white"]) :is(.account-back, .account-text-link, .quiet-link)[data-account-nav-pending="true"] { color: var(--success); }
:is([data-theme="light"], [data-theme="white"]) .account-icon-button[data-account-nav-pending="true"] { color: var(--success); border-color: var(--success); }

@media (prefers-reduced-motion: reduce) { .feron-theme-toggle { transition: none; } }
@media print { .feron-theme-picker { display: none !important; } }

/* Admin utility palette is scoped to the admin shell, including loading,
   empty, validation, table, chart and focus states. */
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-[#050505]"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-[#080808]"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-[#080808]/90"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-[#0d0d0d]"] { background-color: var(--bg); }
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-[#111]"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-[#151515]"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-black"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-black/15"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-black/20"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-black/30"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-black/35"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-black/40"] { background-color: #edf2e9; }
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-amber-300/10"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-amber-300/5"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-amber-300/[0.04]"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-amber-300/[0.05]"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-amber-300/[0.06]"] { background-color: #faf0d9; }
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-amber-300/70"] { background-color: #a07015; }
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-emerald-300"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-emerald-300/70"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="hover:bg-emerald-200"]:hover { background-color: #087f5b; }
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-emerald-300/10"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-emerald-300/[0.05]"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-emerald-400/[0.06]"] { background-color: #e5f2e5; }
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-red-300/10"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-red-400/10"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-red-400/[0.06]"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="hover:bg-red-300/10"]:hover,
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="hover:bg-red-400/10"]:hover,
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="hover:bg-red-400/20"]:hover { background-color: #fbe9e7; }
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-white"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-white/70"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="focus:bg-white"]:focus,
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="hover:bg-white/90"]:hover { background-color: var(--accent); }
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-white/10"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-white/[0.12]"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="hover:bg-white/10"]:hover { background-color: #e1e9dd; }
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-white/[.025]"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-white/[0.025]"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-white/[0.035]"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-white/[0.03]"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="hover:bg-white/[0.025]"]:hover,
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="hover:bg-white/[0.03]"]:hover { background-color: var(--surface); }
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-white/[0.04]"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-white/[0.05]"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="bg-white/[0.06]"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="hover:bg-white/[0.04]"]:hover,
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="hover:bg-white/[0.06]"]:hover { background-color: #e7eee1; }
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="border-amber-300/20"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="border-amber-300/25"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="border-amber-300/30"] { border-color: #d6c296; }
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="border-emerald-200/15"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="border-emerald-300/20"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="border-emerald-300/25"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="border-emerald-300/30"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="border-emerald-400/25"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="focus:border-emerald-300/60"]:focus,
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="hover:border-emerald-300"]:hover { border-color: #83b595; }
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="border-red-300/15"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="border-red-300/20"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="border-red-300/25"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="border-red-300/30"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="border-red-300/40"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="border-red-400/25"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="border-red-400/30"] { border-color: #dfb0aa; }
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="border-white/10"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="border-white/15"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="border-white/20"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="divide-white/10"] > :not([hidden]) ~ :not([hidden]) { border-color: var(--border); }
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="decoration-white/20"] { text-decoration-color: #9cac9b; }
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="focus:border-white/30"]:focus,
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="focus:border-white/35"]:focus,
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="hover:border-white/25"]:hover,
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="hover:border-white/30"]:hover { border-color: #9cac9b; }
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="focus:text-black"]:focus,
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-black"] { color: #ffffff; }
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="hover:text-emerald-200"]:hover,
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-emerald-100"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-emerald-200"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-emerald-300"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-green-200"] { color: #08734f; }
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="hover:text-red-200"]:hover,
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-red-100"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-red-200"] { color: #ab2222; }
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="hover:text-white"]:hover,
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-white"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-white/75"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-white/80"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-white/85"] { color: var(--fg); }
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="hover:text-white/70"]:hover,
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-white/25"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-white/30"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-white/35"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-white/40"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-white/45"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-white/50"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-white/55"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-white/60"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-white/65"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-white/70"] { color: var(--fg-secondary); }
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-amber-100"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-amber-100/80"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-amber-100/90"],
:is([data-theme="light"], [data-theme="white"]) .admin-theme [class~="text-amber-200"] { color: #805000; }

:is([data-theme="light"], [data-theme="white"]) .admin-theme .shadow-2xl { box-shadow: 0 18px 45px rgba(26,45,32,.1); }

/* White is a separate neutral palette, with the same readable brand accents. */
:root[data-theme="white"] {
  --bg: #ffffff;
  --text: #1c211e;
  --fg: #1c211e;
  --muted: #59615c;
  --fg-secondary: #59615c;
  --surface-raised: #f4f5f4;
  --surface-three: #edf0ee;
  --border: #dce2de;
  --divider: #dce2de;
  --section-tint: #f7f8f7;
  --theme-app-band: #ffffff;
  --theme-identity-start: #f1f4f2;
  --theme-identity-end: #ffffff;
  --theme-membership-start: #eaf7ee;
  --theme-membership-end: #ffffff;
  --theme-support-start: #eef8f2;
  --theme-support-mid: #f8faf9;
  --theme-support-end: #ffffff;
}
[data-theme="white"] .feron-page-curtain { background: #edf3ef; }
[data-theme="white"] .screen-tabs { background: #edf0ee; }
[data-theme="white"] .habit-story { background: linear-gradient(145deg, #fff, #f7f8f6); }
[data-theme="white"] .social-story { background: linear-gradient(145deg, #fff, #f7f8f6); }
[data-theme="white"] :is(.habit-member, .habit-grove) { border-color: #d4dfd7; }
[data-theme="white"] .habit-avatar { background: #eef2ef; }
[data-theme="white"] :is(.comparison-table tbody th, .comparison-table tbody td) { border-top-color: #e5e9e6; }
[data-theme="white"] .comparison-table .is-sensor { background: transparent; }
[data-theme="white"] .support-contact-card:hover { background: #f0f7f3; }
[data-theme="white"] .account-photo { background: #e6f2e9; }
[data-theme="white"] :is(.account-row, .account-icon-button, .account-disclosure > summary):hover { background: #f4f6f5; }
[data-theme="white"] .account-row-list > li + li .account-row::before { background: #e5e9e6; }
[data-theme="white"] .account-status.is-on { background: #e7f5ec; }
[data-theme="white"] :is(.account-form input:not([type="checkbox"]), .account-form textarea, .account-form select) { border-color: #c7d0cb; }
[data-theme="white"] .account-form :is(input, textarea)::placeholder { color: #607066; }
[data-theme="white"] .account-form input::file-selector-button { background: #edf2ef; }
[data-theme="white"] .account-consent-card { background: #f0faf4; border-color: #c1d9ca; }
[data-theme="white"] .account-secondary-button { background: #f1f4f2; border-color: #c7d1cb; }
[data-theme="white"] .account-secondary-button:hover { background: #e8efea; }
[data-theme="white"] .account-membership-card { border-color: #c8ddcf; }
[data-theme="white"] .account-row[data-account-nav-pending="true"] { background: #eaf7ef; }
[data-theme="white"] .admin-theme :is([class~="bg-[#111]"], [class~="bg-[#151515]"], [class~="bg-black"], [class~="bg-black/15"], [class~="bg-black/20"], [class~="bg-black/30"], [class~="bg-black/35"], [class~="bg-black/40"]) { background-color: #f4f5f4; }
[data-theme="white"] .admin-theme :is([class~="bg-white/10"], [class~="bg-white/[0.12]"], [class~="hover:bg-white/10"]:hover) { background-color: #e7ede9; }
[data-theme="white"] .admin-theme :is([class~="bg-white/[0.04]"], [class~="bg-white/[0.05]"], [class~="bg-white/[0.06]"], [class~="hover:bg-white/[0.04]"]:hover, [class~="hover:bg-white/[0.06]"]:hover) { background-color: #edf2ef; }
[data-theme="white"] .admin-theme :is([class~="bg-emerald-300/10"], [class~="bg-emerald-300/[0.05]"], [class~="bg-emerald-400/[0.06]"]) { background-color: #e7f6ec; }

/* The full-page fade is only active for a deliberate theme selection. */
html[data-theme-transition="crossfade"]::view-transition-group(root),
html[data-theme-transition="crossfade"]::view-transition-old(root),
html[data-theme-transition="crossfade"]::view-transition-new(root) {
  animation-duration: 1.1s;
  animation-timing-function: cubic-bezier(.4,0,.2,1);
}
html[data-theme-transition="crossfade"]::view-transition { pointer-events: none; }
/* Measure the fallback's destination colors without starting component transitions. */
html[data-theme-measuring] *,
html[data-theme-measuring] *::before,
html[data-theme-measuring] *::after { transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  html[data-theme-transition="crossfade"]::view-transition-group(root),
  html[data-theme-transition="crossfade"]::view-transition-old(root),
  html[data-theme-transition="crossfade"]::view-transition-new(root) { animation-duration: 0s; }
}

:is([data-theme="light"], [data-theme="white"]) .cover-control { color: var(--fg); background: #1c302b0a; }
:is([data-theme="light"], [data-theme="white"]) .cover-control:hover { background: #1c302b15; }

.feron-theme-toggle svg{width:22px;height:22px}.feron-theme-toggle:focus-visible{outline:2px solid currentColor;outline-offset:4px}

/* Offset the crescent slightly to balance its visual weight. */
.feron-theme-toggle .theme-moon { transform: translateX(1px); }
