/* WalkForward v0.7.5 — clean theme engine
   This file is authoritative for all theme palettes. Theme selection is
   controlled only by body[data-theme], so older theme class patches in the
   legacy stylesheet no longer participate in rendering. */

body[data-theme] {
  --wf-canvas-start: #f8fcfd;
  --wf-canvas-end: #eef8fb;
  --wf-glow-a: rgba(135,185,212,.38);
  --wf-glow-b: rgba(99,184,167,.25);
  --surface: rgba(255,255,255,.94);
  --surface-solid: #ffffff;
  --surface-muted: #f2f8f7;
  --text-primary: #243d39;
  --text-secondary: #607873;
  --border: #cde3df;
  --seafoam-dark: #3d8478;
  --seafoam: #63b8a7;
  --seafoam-light: #dff4ef;
  --seafoam-pale: #f0faf8;
  --ocean-blue: #87b9d4;
  --ocean-blue-light: #d9ecf6;
  --ocean-blue-pale: #eff8fc;
  color: var(--text-primary);
  background:
    radial-gradient(circle at 8% 8%, var(--wf-glow-a), transparent 30%),
    radial-gradient(circle at 92% 18%, var(--wf-glow-b), transparent 29%),
    linear-gradient(180deg,var(--wf-canvas-start) 0%,var(--wf-canvas-end) 100%);
}

/* DAY PALETTES */
body[data-theme="default"] {
  --seafoam-dark:#3d8478; --seafoam:#63b8a7; --seafoam-light:#dff4ef; --seafoam-pale:#f0faf8;
  --ocean-blue:#87b9d4; --ocean-blue-light:#d9ecf6; --ocean-blue-pale:#eff8fc;
  --border:#cde3eb; --wf-canvas-start:#f8fcfd; --wf-canvas-end:#eef8fb;
  --wf-glow-a:rgba(135,185,212,.38); --wf-glow-b:rgba(99,184,167,.25);
}
body[data-theme="light"] {
  --seafoam-dark:#397da6; --seafoam:#69a9cf; --seafoam-light:#dceef8; --seafoam-pale:#eef8fd;
  --ocean-blue:#6ba7ca; --ocean-blue-light:#d5ebf7; --ocean-blue-pale:#edf7fc;
  --border:#bddbe9; --wf-canvas-start:#f8fcff; --wf-canvas-end:#eaf5fb;
  --wf-glow-a:rgba(89,157,197,.34); --wf-glow-b:rgba(154,207,232,.28);
}
body[data-theme="sunrise"] {
  --seafoam-dark:#ae5639; --seafoam:#ed865f; --seafoam-light:#ffe1d3; --seafoam-pale:#fff4ee;
  --ocean-blue:#d99a52; --ocean-blue-light:#ffebcf; --ocean-blue-pale:#fff8ed;
  --border:#efc8b4; --wf-canvas-start:#fffaf5; --wf-canvas-end:#fff0e6;
  --wf-glow-a:rgba(239,139,97,.30); --wf-glow-b:rgba(233,173,100,.24);
}
body[data-theme="blossom"] {
  --seafoam-dark:#9f486d; --seafoam:#d0789d; --seafoam-light:#f7dbe7; --seafoam-pale:#fff1f7;
  --ocean-blue:#b987c0; --ocean-blue-light:#eadcf0; --ocean-blue-pale:#faf3fc;
  --border:#e7c5d5; --wf-canvas-start:#fffafd; --wf-canvas-end:#fff0f6;
  --wf-glow-a:rgba(208,120,157,.28); --wf-glow-b:rgba(185,135,192,.22);
}
body[data-theme="twilight"] {
  --seafoam-dark:#625098; --seafoam:#8974c0; --seafoam-light:#e3ddf6; --seafoam-pale:#f3f0fc;
  --ocean-blue:#667db2; --ocean-blue-light:#dce4f7; --ocean-blue-pale:#f1f4fc;
  --border:#d1cae9; --wf-canvas-start:#faf9ff; --wf-canvas-end:#eeebf8;
  --wf-glow-a:rgba(137,116,192,.28); --wf-glow-b:rgba(102,125,178,.22);
}
body[data-theme="golden"] {
  --seafoam-dark:#92691f; --seafoam:#c3943d; --seafoam-light:#f7e6b9; --seafoam-pale:#fff8e6;
  --ocean-blue:#c9a255; --ocean-blue-light:#f5e5bf; --ocean-blue-pale:#fff9eb;
  --border:#e5d19f; --wf-canvas-start:#fffdf7; --wf-canvas-end:#fff5da;
  --wf-glow-a:rgba(195,148,61,.28); --wf-glow-b:rgba(201,162,85,.22);
}

/* NIGHT PALETTES: dark canvas and surfaces, light text, palette-specific accents. */
body[data-theme="dark"],
body[data-theme="evergreen-night"],
body[data-theme="river-night"],
body[data-theme="sunrise-night"],
body[data-theme="blossom-night"],
body[data-theme="twilight-night"],
body[data-theme="golden-night"] {
  --wf-canvas-start:#172727;
  --wf-canvas-end:#0f1c1d;
  --surface:rgba(29,45,45,.96);
  --surface-solid:#213534;
  --surface-muted:#293f3e;
  --text-primary:#f3faf8;
  --text-secondary:#bfd0cc;
  --border:#405c59;
  --wf-glow-a:rgba(99,184,167,.15);
  --wf-glow-b:rgba(135,185,212,.13);
  color-scheme:dark;
}
body[data-theme="dark"] {
  --seafoam-dark:#4a9a89; --seafoam:#68c3af; --seafoam-light:#244d46; --seafoam-pale:#1d3935;
  --ocean-blue:#789fbd; --ocean-blue-light:#2d4559; --ocean-blue-pale:#223543;
}
body[data-theme="evergreen-night"] {
  --seafoam-dark:#3f947f; --seafoam:#65c0a6; --seafoam-light:#244b42; --seafoam-pale:#1b3832;
  --ocean-blue:#709cad; --ocean-blue-light:#2c4851; --ocean-blue-pale:#21373d;
}
body[data-theme="river-night"] {
  --seafoam-dark:#3d82aa; --seafoam:#65add5; --seafoam-light:#254a61; --seafoam-pale:#1c3849;
  --ocean-blue:#71b7dc; --ocean-blue-light:#2a5065; --ocean-blue-pale:#203c4c;
  --wf-canvas-start:#152630; --wf-canvas-end:#0e1921;
}
body[data-theme="sunrise-night"] {
  --seafoam-dark:#b85c3e; --seafoam:#ef8b61; --seafoam-light:#5d3428; --seafoam-pale:#43251e;
  --ocean-blue:#d59a55; --ocean-blue-light:#5b442a; --ocean-blue-pale:#42321f;
  --wf-canvas-start:#2b1d1a; --wf-canvas-end:#1a1110;
}
body[data-theme="blossom-night"] {
  --seafoam-dark:#a74f77; --seafoam:#db7faa; --seafoam-light:#583044; --seafoam-pale:#402333;
  --ocean-blue:#a87ab2; --ocean-blue-light:#4d3655; --ocean-blue-pale:#38273e;
  --wf-canvas-start:#291b25; --wf-canvas-end:#190f17;
}
body[data-theme="twilight-night"] {
  --seafoam-dark:#7360aa; --seafoam:#9a86d1; --seafoam-light:#41385d; --seafoam-pale:#302943;
  --ocean-blue:#7186bd; --ocean-blue-light:#36445e; --ocean-blue-pale:#283346;
  --wf-canvas-start:#201d32; --wf-canvas-end:#13111f;
}
body[data-theme="golden-night"] {
  --seafoam-dark:#a77b2c; --seafoam:#d1a24a; --seafoam-light:#594722; --seafoam-pale:#403319;
  --ocean-blue:#b99b5b; --ocean-blue-light:#53482d; --ocean-blue-pale:#3c3421;
  --wf-canvas-start:#292317; --wf-canvas-end:#19150e;
}

/* Normalize every common surface to the active palette. */
body[data-theme] .launch-card,
body[data-theme] .top-bar,
body[data-theme] .stat-card,
body[data-theme] .summary-card,
body[data-theme] .goal-card,
body[data-theme] .activity-card,
body[data-theme] .challenge-card,
body[data-theme] .badge-card,
body[data-theme] .team-overview-card,
body[data-theme] .selected-team-inline,
body[data-theme] .team-form-panel,
body[data-theme] .team-invitation-note,
body[data-theme] .content-card,
body[data-theme] .form-card,
body[data-theme] .account-accordion,
body[data-theme] .privacy-promise-card,
body[data-theme] .drawer-profile-card,
body[data-theme] .compact-invite-details,
body[data-theme] .developer-inbox-item,
body[data-theme] .release-category,
body[data-theme] .profile-drawer,
body[data-theme] .modal-card {
  background:var(--surface);
  border-color:var(--border);
  color:var(--text-primary);
}
body[data-theme] .surface-muted,
body[data-theme] .identity-option,
body[data-theme] .data-explanation-grid > div,
body[data-theme] .diagnostic-grid > div,
body[data-theme] .release-check-item,
body[data-theme] .policy-version-card {
  background:var(--surface-muted);
  border-color:var(--border);
}
body[data-theme] h1,
body[data-theme] h2,
body[data-theme] h3,
body[data-theme] h4,
body[data-theme] strong,
body[data-theme] label,
body[data-theme] summary { color:var(--text-primary); }
body[data-theme] p,
body[data-theme] small,
body[data-theme] .privacy-helper,
body[data-theme] .empty-message { color:var(--text-secondary); }

body[data-theme] input,
body[data-theme] select,
body[data-theme] textarea {
  background:var(--surface-solid);
  color:var(--text-primary);
  border-color:var(--border);
  color-scheme:inherit;
}
body[data-theme] input::placeholder,
body[data-theme] textarea::placeholder { color:var(--text-secondary); opacity:.82; }
body[data-theme] option { background:var(--surface-solid); color:var(--text-primary); }

/* Keep call-to-action labels readable regardless of palette. */
body[data-theme] .primary-button,
body[data-theme] .developer-tab.active { color:#fff; }

/* Light themes: selected team pills use the same readable text color as unselected pills. */
body[data-theme] .team-tab.active { color:var(--text-secondary); }

/* Night themes retain light selected-pill text on their dark surfaces. */
body[data-theme="dark"] .team-tab.active,
body[data-theme="evergreen-night"] .team-tab.active,
body[data-theme="river-night"] .team-tab.active,
body[data-theme="sunrise-night"] .team-tab.active,
body[data-theme="blossom-night"] .team-tab.active,
body[data-theme="twilight-night"] .team-tab.active,
body[data-theme="golden-night"] .team-tab.active { color:#fff; }

/* v0.6.9 — targeted final UI polish.
   Keep these selectors narrow so the clean palette engine remains unchanged. */

/* The bottom navigation sits on a light translucent bar even in Night themes.
   Use a darker label color there instead of the global light secondary text. */
body[data-theme="dark"] .bottom-navigation .bottom-nav-button:not(.active),
body[data-theme="evergreen-night"] .bottom-navigation .bottom-nav-button:not(.active),
body[data-theme="river-night"] .bottom-navigation .bottom-nav-button:not(.active),
body[data-theme="sunrise-night"] .bottom-navigation .bottom-nav-button:not(.active),
body[data-theme="blossom-night"] .bottom-navigation .bottom-nav-button:not(.active),
body[data-theme="twilight-night"] .bottom-navigation .bottom-nav-button:not(.active),
body[data-theme="golden-night"] .bottom-navigation .bottom-nav-button:not(.active) {
  color: #3f5054;
}

/* The drawer header remains light, so the account email needs a readable
   dark secondary color rather than the Night palette's light secondary text. */
body[data-theme="dark"] #profileEmailDisplay,
body[data-theme="evergreen-night"] #profileEmailDisplay,
body[data-theme="river-night"] #profileEmailDisplay,
body[data-theme="sunrise-night"] #profileEmailDisplay,
body[data-theme="blossom-night"] #profileEmailDisplay,
body[data-theme="twilight-night"] #profileEmailDisplay,
body[data-theme="golden-night"] #profileEmailDisplay {
  color: #46575b;
}

/* Balance the brand mark with the profile control: retain the rounded-square
   silhouette and purple footprints, but place them on a soft white tile. */
body[data-theme] .top-logo-icon {
  background: #fbfaf7;
  border-color: rgba(76, 67, 112, 0.18);
  box-shadow: 0 2px 8px rgba(20, 38, 40, 0.10);
}

/* v0.7.2 Live QA contrast patch.
   These components intentionally use light cards even in Night palettes, so
   they require dark local typography instead of the global Night text tokens. */
body[data-theme="dark"] .announcement-card,
body[data-theme$="-night"] .announcement-card,
body[data-theme="dark"] .selected-team-inline,
body[data-theme$="-night"] .selected-team-inline,
body[data-theme="dark"] .notification-item,
body[data-theme$="-night"] .notification-item {
  color: #24383b;
}

body[data-theme="dark"] .announcement-card h2,
body[data-theme="dark"] .announcement-card p,
body[data-theme="dark"] .announcement-card .eyebrow,
body[data-theme$="-night"] .announcement-card h2,
body[data-theme$="-night"] .announcement-card p,
body[data-theme$="-night"] .announcement-card .eyebrow,
body[data-theme="dark"] .selected-team-inline h3,
body[data-theme="dark"] .selected-team-inline p,
body[data-theme$="-night"] .selected-team-inline h3,
body[data-theme$="-night"] .selected-team-inline p,
body[data-theme="dark"] .notification-item strong,
body[data-theme="dark"] .notification-item p,
body[data-theme="dark"] .notification-item small,
body[data-theme$="-night"] .notification-item strong,
body[data-theme$="-night"] .notification-item p,
body[data-theme$="-night"] .notification-item small {
  color: #24383b;
  opacity: 1;
}

body[data-theme="dark"] .notification-drawer .drawer-header h2,
body[data-theme="dark"] .notification-drawer .drawer-header .eyebrow,
body[data-theme$="-night"] .notification-drawer .drawer-header h2,
body[data-theme$="-night"] .notification-drawer .drawer-header .eyebrow {
  color: #f5f2ff;
}

body[data-theme="dark"] .notification-item .text-button,
body[data-theme$="-night"] .notification-item .text-button,
body[data-theme="dark"] .announcement-card .text-button,
body[data-theme$="-night"] .announcement-card .text-button {
  color: #334f58;
}


/* v0.7.3 final contrast and family-profile polish. */
body[data-theme] .developer-record,
body[data-theme] .admin-list-item,
body[data-theme] .developer-inbox-item,
body[data-theme] .notification-item {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-primary);
}
body[data-theme] .developer-record strong,
body[data-theme] .developer-record p,
body[data-theme] .developer-record small,
body[data-theme] .developer-record .developer-record-meta,
body[data-theme] .admin-list-item strong,
body[data-theme] .admin-list-item p,
body[data-theme] .developer-inbox-item strong,
body[data-theme] .developer-inbox-item p {
  color: inherit;
  opacity: 1;
}

/* Stronger action and highlighted-text contrast on all day palettes. */
body[data-theme="default"] .text-button,
body[data-theme="light"] .text-button,
body[data-theme="sunrise"] .text-button,
body[data-theme="blossom"] .text-button,
body[data-theme="twilight"] .text-button,
body[data-theme="golden"] .text-button,
body[data-theme="default"] .eyebrow,
body[data-theme="light"] .eyebrow,
body[data-theme="sunrise"] .eyebrow,
body[data-theme="blossom"] .eyebrow,
body[data-theme="twilight"] .eyebrow,
body[data-theme="golden"] .eyebrow {
  color: var(--seafoam-dark);
  font-weight: 700;
}

.child-generated-name-toggle { margin: .35rem 0 .75rem; }
body[data-theme] .child-generated-name-panel {
  margin: 0 0 1rem;
  padding: .85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-muted);
  color: var(--text-primary);
}
body[data-theme] .child-generated-name-panel p { margin: 0 0 .6rem; color: var(--text-primary); }
