/* Optional semantic palette. Original values remain each component's dark fallback. */
html[data-theme="light"] {
  color-scheme:light;
  --theme-canvas:#f7f2e7;
  --theme-surface:#fffcf5;
  --theme-ink:#193d30;
  --theme-primary:#176047;
  --theme-on-primary:#fffaf0;
  --theme-line:#b8c4af;
  --theme-danger:#9a342c;
  --theme-danger-surface:#fbe9e1;
  --bg:#f7f2e7;--panel:#fffcf5;--text:#193d30;--muted:#506457;--accent:#176047;--mint:#276346;--line:#b8c4af;
  background:var(--bg);color:var(--text);
}
html[data-theme="light"] body,
html[data-theme="light"] body .site-header {
  --episode-bg:#f7f2e7;--episode-panel:#fffcf5;--episode-text:#193d30;--episode-muted:#506457;--episode-line:#b8c4af;--episode-gold:#176047;
}
html[data-theme="light"] body {background:#f7f2e7;color:#193d30}
html[data-theme="light"] body .site-header {background:transparent}
html[data-theme="light"] .site-brand-mark {filter:brightness(.4) sepia(.3)}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {color:#667466;opacity:1}
html[data-theme="light"] ::selection {background:#cbdcc4;color:#193d30}
html[data-theme="light"] {scrollbar-color:#80977e #ede8da;caret-color:#176047}
html[data-theme="light"] :focus-visible {outline-color:#176047}
html[data-theme="light"] :is(.library-topics input:checked+span,.library-filter-actions button) {color:#fffaf0;background:#176047}
html[data-theme="light"] :is(.tape-play,.book-primary-action,.episode-main-action) {background:#176047;color:#fffaf0!important}
html[data-theme="light"] .tape-transport .tape-play {background:#176047;color:#fffaf0}
html[data-theme="light"] :is(.book-chapter-action,.tape-seek-row button,.tape-transport a) {color:#193d30}
html[data-theme="light"] :is(.episode-chapter-list a[aria-current=page],.book-chapter.is-resume,.subscription-option:has(input:checked)) {background:#e1ebd9;border-color:#176047}
html[data-theme="light"] :is(.book-chapter-access,.chapter-copy small,.discovery-card .book-access,.taxonomy-chapter-access.is-available) {color:#276346}
html[data-theme="light"] .library-topics {scrollbar-color:#80977e #ede8da}
html[data-theme="light"] :is(.discovery-card-author,.discovery-card-facts,.library-note,.book-chapter-meta,.study-path-summary,.subscription-duration,footer) {color:#506457}
html[data-theme="light"] .podcast-dock-progress input {background:linear-gradient(to right,#176047 var(--seek-progress,0%),#d5dfce var(--seek-progress,0%))}
html[data-theme="light"] .podcast-dock-progress input::-webkit-slider-thumb {background:#176047}
html[data-theme="light"] .autonext-track {background:#176047}
html[data-theme="light"] .autonext-track i {background:#fffaf0}
html[data-theme="light"] .tape-autonext[aria-checked=false] .autonext-track,
html[data-theme="light"] .podcast-dock [aria-checked=false] .autonext-track {background:#63705e}
html[data-theme="light"] #public-navigation-status[data-state="loading"]::before {background:#176047}
/* Photo overlays and the physical radio keep their own material palette. */
html[data-theme="light"] .study-paths--carousel .study-path-copy {background:linear-gradient(90deg,#071c17dc,#071c17ac)}
html[data-theme="light"] .study-paths--carousel .study-path-copy strong {color:#fff5dd}
html[data-theme="light"] jdp-container {--jdp-color-0:#fffcf5;--jdp-color-1:#f7f2e7;--jdp-color-2:#dce5d4;--jdp-color-3:#667466;--jdp-color-4:#506457;--jdp-color-5:#193d30;--jdp-primary:#176047;--jdp-red:#9a342c}
body .site-header .theme-toggle {display:inline-flex;gap:6px;align-items:center;justify-content:center;min-width:44px;min-height:44px;margin:0;padding:8px;border:1px solid var(--episode-line,#365448);border-radius:8px;background:transparent;color:var(--episode-text,#f3efdf);font:inherit;font-size:12px;cursor:pointer;flex-shrink:0}
.theme-toggle svg {width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle [data-theme-moon] {display:none}
html[data-theme="light"] .theme-toggle [data-theme-sun] {display:none}
html[data-theme="light"] .theme-toggle [data-theme-moon] {display:block}
body .site-header .theme-toggle:hover {background:#879c761a}
@media(max-width:767px){.theme-toggle [data-theme-label]{display:none}body .site-header-actions{gap:8px}body .site-header{gap:8px}}

html[data-theme="light"] .library-modern .study-path-copy {background:transparent}
html[data-theme="light"] .library-modern .study-path-copy strong {color:#193d30}
html[data-theme="light"] .library-modern :is(.study-path-card,.discovery-card) {background:#fffcf5}
html[data-theme="light"] .study-paths-controls button {color:#193d30}
html[data-theme="light"] .listener-login-top button {color:#176047}

html[data-theme="light"] .error-page :is(h1,header a) {color:#193d30}
html[data-theme="light"] .error-page :is(p,header span,footer,.error-number small) {color:#506457}
html[data-theme="light"] .error-page .error-number {color:#176047;border-color:#80977e}
html[data-theme="light"] .error-page .error-actions a {color:#176047;border-color:#176047}
html[data-theme="light"] .error-page .error-actions a:first-child {background:#176047;color:#fffaf0}

html[data-theme="light"] .podcast-dock-progress input::-moz-range-thumb {background:#176047}

html[data-theme="light"] :is(.podcast-dock .podcast-dock-transport button:not(.radio-dock-play),.tape-transport a,.tape-seek-row button,.book-chapter-action,.android-app-promo-dismiss):hover {background:#e1ebd9;color:#193d30}
