/* Dark, one-page look. Loaded after main.css and episodes.css.
   To undo: remove the dark.css <link> from the pages (and class="home" on index.html's body). */

:root {
    --dk-ink: #08070d;
    --dk-glass: #13111b;
    --dk-line: rgba(255, 255, 255, 0.13);
    --dk-mist: #ffffff;
}

/* ---------- Header: dark on every page ---------- */

html[data-theme="dark"] .main-header,
html[data-theme="dark"] .main-header.scrolled {
    background: rgba(8, 7, 13, 0.9);
    border-bottom: 1px solid var(--dk-line);
    box-shadow: none;
}

html[data-theme="dark"] .logo-title { color: #fff; }

html[data-theme="dark"] .main-nav ul {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--dk-line);
    box-shadow: none;
}

html[data-theme="dark"] .main-nav a { color: #ffffff; }

html[data-theme="dark"] .main-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .main-nav a.active,
html[data-theme="dark"] .main-nav a.active:hover {
    color: var(--dk-ink);
    background: #fff;
    box-shadow: none;
}

html[data-theme="dark"] .mobile-nav-toggle .hamburger,
html[data-theme="dark"] .mobile-nav-toggle .hamburger::before,
html[data-theme="dark"] .mobile-nav-toggle .hamburger::after { background: #fff; }

html[data-theme="dark"] .mobile-nav-toggle:hover { background: rgba(255, 255, 255, 0.1); }

html[data-theme="dark"] .mobile-nav { background: var(--dk-ink); }

html[data-theme="dark"] .mobile-nav a { color: #fff; }

/* ---------- Homepage: the header sits on the hero ---------- */

html[data-theme="dark"] body.home { background: var(--dk-ink); }

/* first screen fills the window */

html[data-theme="dark"] body.home .hero-new {
    min-height: 100vh;
    min-height: calc(100svh - 100px);
    overflow: hidden;
}

html[data-theme="dark"] body.home .hero-new::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 22vh;
    background: linear-gradient(0deg, var(--dk-ink), rgba(8, 7, 13, 0));
    z-index: 2;
    pointer-events: none;
}

/* ---------- Homepage: every section on the same dark page ---------- */

html[data-theme="dark"] body.home .homepage-band,
html[data-theme="dark"] body.home .pe-home {
    background: var(--dk-ink);
    box-shadow: none;
    color: #fff;
}

html[data-theme="dark"] body.home .homepage-band::before,
html[data-theme="dark"] body.home .homepage-band-about::after { display: none; }

/* a thin line between sections, nothing heavier */

html[data-theme="dark"] body.home .homepage-band + .homepage-band { border-top: 1px solid var(--dk-line); }

html[data-theme="dark"] body.home .homepage-band h2,
html[data-theme="dark"] body.home .homepage-band h3 { color: #fff; }

html[data-theme="dark"] body.home .homepage-band p,
html[data-theme="dark"] body.home .subscribe-cta-sub { color: var(--dk-mist); }

/* this week */

html[data-theme="dark"] body.home .pe-hero {
    background: var(--dk-glass);
    border: 1px solid var(--dk-line);
    box-shadow: none;
}

html[data-theme="dark"] body.home .pe-shelf-head h3,
html[data-theme="dark"] body.home .pe-tile-title { color: #fff; }

html[data-theme="dark"] body.home .pe-shelf-head a { color: #fff; border-bottom: 1px solid rgba(255, 255, 255, 0.4); }

html[data-theme="dark"] body.home .pe-shelf-head a:hover { text-decoration: none; border-color: #fff; }

html[data-theme="dark"] body.home .pe-tile .pe-meta,
html[data-theme="dark"] body.home .pe-meta { color: var(--dk-mist); }

html[data-theme="dark"] body.home .spotify-browse-btn,
html[data-theme="dark"] body.home .books-cta,
html[data-theme="dark"] body.home .about-preview-cta,
html[data-theme="dark"] body.home .subscribe-form .btn {
    background: #fff;
    color: var(--dk-ink);
    box-shadow: none;
}

html[data-theme="dark"] body.home .spotify-browse-btn:hover,
html[data-theme="dark"] body.home .books-cta:hover,
html[data-theme="dark"] body.home .about-preview-cta:hover,
html[data-theme="dark"] body.home .subscribe-form .btn:hover { background: #ebe8f6; }

/* subscribe */

html[data-theme="dark"] body.home .subscribe-form input[type="email"] {
    background: var(--dk-glass);
    border: 1px solid var(--dk-line);
    color: #fff;
}

html[data-theme="dark"] body.home .subscribe-form input[type="email"]::placeholder { color: #8a869c; }

html[data-theme="dark"] body.home .subscribe-platform-card {
    background: #fff;
    border: 0;
    box-shadow: none;
}

/* books */

html[data-theme="dark"] body.home .books-badge {
    background: transparent;
    color: #f5b942;
    border: 1px solid rgba(245, 185, 66, 0.55);
}

html[data-theme="dark"] body.home .books-features,
html[data-theme="dark"] body.home .books-features li,
html[data-theme="dark"] body.home .books-features strong { color: #ffffff; }

html[data-theme="dark"] body.home .books-features strong { color: #fff; }

html[data-theme="dark"] body.home .books-preview-image img {
    border-radius: 14px;
    box-shadow: none;
}

/* about */

html[data-theme="dark"] body.home .about-preview-image {
    background: transparent;
    box-shadow: none;
    border: 0;
    padding: 0;
}

html[data-theme="dark"] body.home .about-preview-image img { border-radius: 16px; }

/* footer matches the page */

html[data-theme="dark"] .main-footer {
    background: #050409;
    border-top: 1px solid var(--dk-line);
}

html[data-theme="dark"] .main-footer::before { display: none; }

/* main.css forces some colours with !important; these match it on the dark homepage */

html[data-theme="dark"] body.home .books-preview-text h2,
html[data-theme="dark"] body.home .about-preview-text h2,
html[data-theme="dark"] body.home .homepage-band h2 { color: #fff !important; }

html[data-theme="dark"] body.home .about-preview-text p,
html[data-theme="dark"] body.home .books-preview-note,
html[data-theme="dark"] body.home .books-features li { color: #ffffff !important; }

html[data-theme="dark"] body.home .books-features strong { color: #fff !important; }

html[data-theme="dark"] body.home .spotify-browse-btn,
html[data-theme="dark"] body.home .spotify-browse-btn:visited,
html[data-theme="dark"] body.home .spotify-browse-btn:hover,
html[data-theme="dark"] body.home .books-cta,
html[data-theme="dark"] body.home .books-cta:hover,
html[data-theme="dark"] body.home .about-preview-cta,
html[data-theme="dark"] body.home .about-preview-cta:hover,
html[data-theme="dark"] body.home .subscribe-form .btn,
html[data-theme="dark"] body.home .subscribe-form .btn:hover { color: var(--dk-ink) !important; }

html[data-theme="dark"] body.home .btn-primary:hover { transform: translateY(-1px); }

/* Rabbi's photo is the cut-out on black, so it sits on the page instead of in a white box */

html[data-theme="dark"] body.home .about-preview-image { max-width: 460px; }

html[data-theme="dark"] body.home .about-preview-image img {
    border-radius: 0;
    width: 100%;
    height: auto;
    -webkit-mask-image: linear-gradient(0deg, transparent 0, #000 18%);
    mask-image: linear-gradient(0deg, transparent 0, #000 18%);
}

/* the cut-out photo is transparent; main.css gives the image a white box, so switch that off */

html[data-theme="dark"] body.home .about-preview-image img {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    max-width: none !important;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: top;
}

/* Logo for the dark page: the prism from the black-background image, black turned into transparency */

html[data-theme="dark"] .logo-container { isolation: auto; }




/* Text on the dark pages is pure white, not off-white */

:root { --dk-mist: #ffffff; --pe-on-night: #ffffff; }

html[data-theme="dark"] .main-nav a,
html[data-theme="dark"] .mobile-nav a,
html[data-theme="dark"] body.home .about-preview-text p,
html[data-theme="dark"] body.home .books-preview-note,
html[data-theme="dark"] body.home .books-features li,
html[data-theme="dark"] body.home .homepage-band p,
html[data-theme="dark"] body.home .subscribe-cta-sub,
html[data-theme="dark"] body.home .pe-hero .pe-desc,
html[data-theme="dark"] body.home .pe-hero .pe-meta,
html[data-theme="dark"] body.home .pe-tile .pe-meta,
html[data-theme="dark"] body.home .pe-meta,
html[data-theme="dark"] body.home .hero-tagline,
html[data-theme="dark"] body.home .hero-new-text p,
html[data-theme="dark"] body.home .hero-line-1,
html[data-theme="dark"] .footer-brand-copy,
html[data-theme="dark"] .footer-newsletter p,
html[data-theme="dark"] .main-footer a,
html[data-theme="dark"] .main-footer li,
html[data-theme="dark"] .footer-bottom p,
html[data-theme="dark"] .footer-brand-links a { color: #fff !important; }

html[data-theme="dark"] body.home .hero-new h1,
html[data-theme="dark"] body.home .hero-new h1 span { color: #fff !important; text-shadow: none; }

/* the current page's pill is white, so its label stays dark */

html[data-theme="dark"] .main-nav a.active,
html[data-theme="dark"] .main-nav a.active:hover { color: var(--dk-ink) !important; }


/* ---------- Light theme keeps the original look; only the logo and the toggle are set here ---------- */


.theme-toggle {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(128, 128, 140, 0.4);
    background: transparent;
    color: inherit;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    margin-left: 0.6rem;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
html[data-theme="dark"] .theme-toggle { color: #fff; border-color: var(--dk-line); }
html[data-theme="dark"] .theme-toggle:hover { background: rgba(255, 255, 255, 0.12); }
html[data-theme="dark"] .theme-toggle .i-sun { display: block; }
html[data-theme="dark"] .theme-toggle .i-moon { display: none; }
html[data-theme="light"] .theme-toggle { color: #312a69; }
html[data-theme="light"] .theme-toggle:hover { background: rgba(76, 29, 149, 0.1); }

/* ---------- Dark theme on the inner pages (podcast, books, about, contact, legal, episodes, 404) ---------- */
html[data-theme="dark"] body:not(.home) { background: var(--dk-ink); color: #fff; }

html[data-theme="dark"] body:not(.home) main,
html[data-theme="dark"] body:not(.home) main > section,
html[data-theme="dark"] body:not(.home) .shop-deals,
html[data-theme="dark"] body:not(.home) .shop-order,
html[data-theme="dark"] body:not(.home) .shop-stores,
html[data-theme="dark"] body:not(.home) .shop-soon,
html[data-theme="dark"] body:not(.home) .endorsements-bar,
html[data-theme="dark"] body:not(.home) .author-section { background-color: var(--dk-ink); background-image: none; }

/* white and pale boxes become dark glass */
html[data-theme="dark"] body:not(.home) .philosophy-card,
html[data-theme="dark"] body:not(.home) .deal-card,
html[data-theme="dark"] body:not(.home) .order-summary,
html[data-theme="dark"] body:not(.home) .store-card,
html[data-theme="dark"] body:not(.home) .coming-soon,
html[data-theme="dark"] body:not(.home) .endorsement-item,
html[data-theme="dark"] body:not(.home) .contact-card,
html[data-theme="dark"] body:not(.home) .form-container,
html[data-theme="dark"] body:not(.home) .abroad-amazon,
html[data-theme="dark"] body:not(.home) .legal-page > .container,
html[data-theme="dark"] body:not(.home) .error-page-content > .container {
    background: var(--dk-glass) !important;
    border: 1px solid var(--dk-line) !important;
    box-shadow: none !important;
}

/* text */
html[data-theme="dark"] body:not(.home) main :is(h1, h2, h3, h4, h5, p, li, span, small, strong, label, legend, blockquote, dt, dd, td, th, option),
html[data-theme="dark"] body:not(.home) .pe-row-title a,
html[data-theme="dark"] body:not(.home) .pe-ep-meta { color: #fff !important; }

html[data-theme="dark"] body:not(.home) main a:not(.btn):not(.shop-btn):not(.pe-play):not(.store-link) { color: #fff !important; }
html[data-theme="dark"] body:not(.home) .pe-row-title a { color: #fff !important; }

/* form fields */
html[data-theme="dark"] body:not(.home) input,
html[data-theme="dark"] body:not(.home) select,
html[data-theme="dark"] body:not(.home) textarea {
    background: var(--dk-ink) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
}

html[data-theme="dark"] body:not(.home) input::placeholder,
html[data-theme="dark"] body:not(.home) textarea::placeholder { color: rgba(255, 255, 255, 0.6) !important; }

/* secondary and outline buttons: white outline on dark */
html[data-theme="dark"] body:not(.home) .btn-secondary,
html[data-theme="dark"] body:not(.home) .shop-btn-outline,
html[data-theme="dark"] body:not(.home) .quick-btn,
html[data-theme="dark"] body:not(.home) .step,
html[data-theme="dark"] body:not(.home) .abroad-author-toggle,
html[data-theme="dark"] body:not(.home) .pe-tab,
html[data-theme="dark"] body:not(.home) .pe-readmore {
    background: transparent !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body:not(.home) .pe-tab[aria-selected="true"],
html[data-theme="dark"] body:not(.home) .pe-tab.is-active { border-color: #fff !important; background: rgba(255, 255, 255, 0.12) !important; }

/* podcast archive rows and the episode page */
html[data-theme="dark"] body:not(.home) .pe-row { border-color: var(--dk-line) !important; }
html[data-theme="dark"] body:not(.home) .pe-archive,
html[data-theme="dark"] body:not(.home) .pe-controls { background: transparent !important; }

html[data-theme="dark"] body:not(.home) .legal-page,
html[data-theme="dark"] body:not(.home) .error-page-content { background: var(--dk-ink) !important; }
html[data-theme="dark"] body:not(.home) .error-links a { color: #fff !important; }

/* archive: episode titles stay white; the sefer tabs are an underline row, not boxes */
html[data-theme="dark"] body:not(.home) main .pe-row-title a:not(.btn):not(.shop-btn):not(.pe-play):not(.store-link):not(.x) { color: #fff !important; }

html[data-theme="dark"] body:not(.home) .pe-tab {
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    background: transparent !important;
}

html[data-theme="dark"] body:not(.home) .pe-tab[aria-selected="true"],
html[data-theme="dark"] body:not(.home) .pe-tab.is-active { border-bottom-color: #fff !important; background: transparent !important; }

/* ---------- Homepage tidy: calmer subscribe block and button (both themes) ---------- */
body.home .spotify-browse-btn {
    min-width: 0 !important;
    font-size: 1rem !important;
    padding: 0.8rem 1.75rem !important;
    border-radius: 999px !important;
}

body.home .subscribe-form { max-width: 600px; margin-left: auto; margin-right: auto; }
body.home .subscribe-form input[type="email"] { font-size: 1rem; padding: 0.85rem 1.1rem; }
body.home .subscribe-form .btn { font-size: 0.95rem; padding: 0 1.4rem; white-space: nowrap; }

body.home .subscribe-platforms { gap: 0.6rem; margin-top: 1.25rem; }
body.home .subscribe-platform-card {
    height: 44px;
    padding: 0 1rem;
    border-radius: 999px;
}
body.home .subscribe-platform-card img { height: 22px; }

body.home .subscribe-cta-section { padding: 3rem 0; }
body.home .subscribe-cta-section h2 { font-size: 2rem; }

@media (min-width: 641px) {
    body.home .subscribe-form { max-width: 680px; }
    body.home .subscribe-inline { flex-wrap: nowrap; }
    body.home .subscribe-inline > :first-child { flex: 1 1 auto; min-width: 0; }
    body.home .subscribe-form .btn { flex: none; }
}
body.home .pe-play-float { width: 38px; height: 38px; right: 8px; bottom: 8px; }

/* Homepage sections: each band gets its own tone and a small label so they read as separate parts */
html[data-theme="dark"] body.home .homepage-band-episode { background: #0b0a12 !important; }
html[data-theme="dark"] body.home .homepage-band-subscribe { background: #1a1233 !important; border-top: 1px solid rgba(167,139,250,.35); border-bottom: 1px solid rgba(167,139,250,.35); }
html[data-theme="dark"] body.home .homepage-band-books { background: #11101a !important; }
html[data-theme="dark"] body.home .homepage-band-about { background: #17122b !important; border-top: 1px solid rgba(167,139,250,.35); }
html[data-theme="light"] body.home .homepage-band-subscribe { background: #efeafc !important; }
html[data-theme="light"] body.home .homepage-band-about { background: #f4f1fb !important; }

body.home .homepage-band-subscribe h2::before,
body.home .homepage-band-books h2::before,
body.home .homepage-band-about h2::before {
    display: block; margin-bottom: .5rem;
    font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
    color: #a78bfa;
}
body.home .homepage-band-subscribe h2::before { content: "Listen anywhere"; }
body.home .homepage-band-books h2::before { content: "In print"; }
body.home .homepage-band-about h2::before { content: "The teacher"; }
body.home .homepage-band-subscribe h2 { text-align: center; }

/* Archive rows read as separate cards; the playing row is violet, never white */
html[data-theme="dark"] body:not(.home) .pe-row {
    background: #14121f !important;
    border: 1px solid rgba(167, 139, 250, .22) !important;
    border-radius: 14px !important;
    padding: 1rem 1.1rem !important;
    margin-bottom: .75rem;
}
html[data-theme="dark"] body:not(.home) .pe-row:hover { background: #1b1830 !important; border-color: rgba(167, 139, 250, .5) !important; }
html[data-theme="dark"] body:not(.home) .pe-row.is-current {
    background: #251a4a !important;
    border-color: #a78bfa !important;
    box-shadow: inset 4px 0 0 #a78bfa;
}
html[data-theme="dark"] body:not(.home) .pe-row.is-current * { color: #fff; }
html[data-theme="dark"] body:not(.home) .pe-row .pe-desc { color: #ffffff !important; }
html[data-theme="dark"] body:not(.home) .pe-readmore { border: 0 !important; background: none !important; color: #fff !important; padding: .25rem 0 0 !important; }

/* Archive finder in dark: one panel, filled pill for the chosen sefer, parsha chips below */
html[data-theme="dark"] body:not(.home) .pe-finder { background: #14121f !important; border-color: rgba(167, 139, 250, .28) !important; }
html[data-theme="dark"] body:not(.home) .pe-chips { border-top-color: rgba(167, 139, 250, .18) !important; }
html[data-theme="dark"] body:not(.home) .pe-finder .pe-tab { border: 0 !important; border-radius: 999px !important; color: #ffffff !important; }
html[data-theme="dark"] body:not(.home) .pe-finder .pe-tab:hover { color: #fff !important; background: rgba(255, 255, 255, .06) !important; }
html[data-theme="dark"] body:not(.home) .pe-finder .pe-tab[aria-pressed="true"] { background: #6d4bd8 !important; color: #fff !important; }
html[data-theme="dark"] body:not(.home) .pe-finder .pe-search input { background: #0b0a12 !important; border-color: rgba(255, 255, 255, .18) !important; color: #fff !important; }
html[data-theme="dark"] body:not(.home) .pe-chip { color: #ffffff !important; border-color: rgba(255, 255, 255, .18) !important; background: transparent !important; }
html[data-theme="dark"] body:not(.home) .pe-chip:hover { border-color: #a78bfa !important; }
html[data-theme="dark"] body:not(.home) .pe-chip.is-week::before { background: #a78bfa; }
html[data-theme="dark"] body:not(.home) .pe-chip[aria-pressed="true"] { background: #fff !important; border-color: #fff !important; color: #14121f !important; }
html[data-theme="dark"] body:not(.home) .pe-chips-label { color: #fff !important; }
html[data-theme="dark"] body:not(.home) .pe-order { color: #fff !important; }
html[data-theme="dark"] body:not(.home) .pe-chip[aria-pressed="true"] span { color: #14121f !important; }

/* Readable text in dark: body copy, meta lines and labels are pure white, not grey or faded */
html[data-theme="dark"] main p,
html[data-theme="dark"] main li,
html[data-theme="dark"] main h1, html[data-theme="dark"] main h2, html[data-theme="dark"] main h3, html[data-theme="dark"] main h4,
html[data-theme="dark"] .pe-meta,
html[data-theme="dark"] .pe-meta *,
html[data-theme="dark"] .pe-desc,
html[data-theme="dark"] .pe-summary,
html[data-theme="dark"] .pe-group-head span,
html[data-theme="dark"] .pe-pagehead p,
html[data-theme="dark"] .pe-pagehead-links span,
html[data-theme="dark"] .pe-ep-meta,
html[data-theme="dark"] .pe-ep-back,
html[data-theme="dark"] .pe-ep-desc,
html[data-theme="dark"] footer p,
html[data-theme="dark"] footer li,
html[data-theme="dark"] footer a { color: #ffffff !important; opacity: 1 !important; }
html[data-theme="dark"] .pe-chip span { opacity: .75; }
html[data-theme="dark"] input::placeholder { color: rgba(255, 255, 255, .75) !important; }
html[data-theme="dark"] body:not(.home) .delivery-toggle label:has(input:checked) { background: #6d4bd8 !important; border-color: #a78bfa !important; color: #fff !important; }
html[data-theme="dark"] body:not(.home) .store-link { color: #fff !important; }
html[data-theme="dark"] body:not(.home) button:disabled,
html[data-theme="dark"] body:not(.home) .btn:disabled { background: #2a2540 !important; border-color: #2a2540 !important; color: #ffffff !important; opacity: 1 !important; }

/* About: quote box dark with white text; book picture shown whole */
html[data-theme="dark"] body:not(.home) .book-text blockquote {
    background: #17122b !important;
    border-left: 4px solid #a78bfa !important;
    color: #ffffff !important;
    opacity: 1 !important;
    box-shadow: none !important;
}
html[data-theme="dark"] body:not(.home) .book-text blockquote::before { color: #a78bfa !important; }
body.about-page .book-image img, .book-image img[src*="books-prism-plus-5"] { width: 100%; height: auto !important; max-height: none !important; object-fit: contain !important; border-radius: 14px; }

/* ---------- One hero background on every page (the Contact/About prism rays) ---------- */

.hero-prism-rays {
    -webkit-filter: none !important;
    filter: none !important;
}
.hero-prism-rays::before,
.hero-prism-rays::after { background: none !important; }

.shop-hero,
.pe-pagehead {
    position: relative;
    isolation: isolate;
    background: #0a0a0b url('../Images/background1.png') center center / cover no-repeat !important;
}
.shop-hero h1, .shop-hero-sub,
.pe-pagehead h1, .pe-pagehead p { text-shadow: 0 1px 3px rgba(0, 0, 0, .45); }
/* the books photo has a black backdrop: let it melt into the rays instead of sitting in a box */
.shop-hero-image img {
    mix-blend-mode: screen;
    border-radius: 0 !important;
    box-shadow: none !important;
    -webkit-mask-image: radial-gradient(ellipse 70% 72% at 50% 50%, #000 62%, transparent 100%);
    mask-image: radial-gradient(ellipse 70% 72% at 50% 50%, #000 62%, transparent 100%);
}
.shop-hero {
    background:
        radial-gradient(ellipse 34% 48% at 66% 52%, #050508 0%, #050508 55%, rgba(5, 5, 8, 0) 100%),
        #0a0a0b url('../Images/background1.png') center center / cover no-repeat !important;
}
.shop-hero-image img { mix-blend-mode: lighten; }
.shop-hero-image img {
    -webkit-mask-image: radial-gradient(ellipse 62% 60% at 50% 46%, #000 55%, transparent 100%);
    mask-image: radial-gradient(ellipse 62% 60% at 50% 46%, #000 55%, transparent 100%);
}

/* ---------- Text is pure white on dark and pure black on light, in both themes ---------- */
/* filled controls (white or coloured buttons, the chosen pill, badges) keep their own text colour */
html[data-theme] body *:not(:is(.btn-primary, .shop-btn-primary, .sticky-bar-btn, .pe-play, .pe-chip[aria-pressed="true"], .pe-tab[aria-pressed="true"], .main-nav a.active, .soon-pill, .books-badge, .deal-tag, .order-step legend span, .order-float, .pe-big, .delivery-toggle label:has(input:checked), button[type="submit"], .theme-toggle, svg, svg *), :is(.btn-primary, .shop-btn-primary, .sticky-bar-btn, .pe-play, .pe-chip[aria-pressed="true"], .pe-tab[aria-pressed="true"], .main-nav a.active, .soon-pill, .books-badge, .deal-tag, .order-step legend span, .order-float, .pe-big, button[type="submit"]) *) { color: #000 !important; }

/* dark bands: everything in dark mode, and the heroes, "this week" card, sticky bar and footer in light mode */
html[data-theme="dark"] body *:not(:is(.btn-primary, .shop-btn-primary, .sticky-bar-btn, .pe-play, .pe-chip[aria-pressed="true"], .pe-tab[aria-pressed="true"], .main-nav a.active, .soon-pill, .books-badge, .deal-tag, .order-step legend span, .order-float, .pe-big, .delivery-toggle label:has(input:checked), button[type="submit"], .theme-toggle, svg, svg *), :is(.btn-primary, .shop-btn-primary, .sticky-bar-btn, .pe-play, .pe-chip[aria-pressed="true"], .pe-tab[aria-pressed="true"], .main-nav a.active, .soon-pill, .books-badge, .deal-tag, .order-step legend span, .order-float, .pe-big, button[type="submit"]) *),
html[data-theme="light"] :is(.hero, .hero-new, .shop-hero, .shop-different, .pe-pagehead, body.home .pe-hero, .main-footer, .sticky-podcast-bar) *:not(:is(.btn-primary, .shop-btn-primary, .sticky-bar-btn, .pe-play, .pe-chip[aria-pressed="true"], .pe-tab[aria-pressed="true"], .main-nav a.active, .soon-pill, .books-badge, .deal-tag, .order-step legend span, .order-float, .pe-big, button[type="submit"], .theme-toggle, svg, svg *), :is(.btn-primary, .shop-btn-primary, .sticky-bar-btn, .pe-play, .soon-pill, .books-badge, .deal-tag, .order-step legend span, .order-float, .pe-big, button[type="submit"]) *) { color: #fff !important; }

/* links stay recognisable by their underline now that they share the text colour */
html[data-theme] main p a, html[data-theme] main li a, html[data-theme] .store-link, html[data-theme] .error-links a { text-decoration: underline !important; text-underline-offset: 3px; }

/* no faded text */
html[data-theme] :is(.pe-dot, .hero-badge-sep, .pe-chip span, .social-proof, .sub-header, .hero-tagline, .footer-bottom p) { opacity: 1 !important; }
html[data-theme] .pe-ep-back, html[data-theme] .pe-ep-meta { opacity: 1 !important; }
