/* Dark theme, site-wide.
   html[data-hc-theme="dark"] flips the palette tokens, then fixes the few hard-coded colors. */

/* ---------- Switch ---------- */
.hc-theme-switch { position: fixed; right: 1rem; bottom: 1rem; z-index: 50; display: inline-flex; align-items: center; gap: .6rem; padding: .45rem .9rem .45rem .6rem; border-radius: 999px; background: var(--wp--preset--color--white); color: var(--wp--preset--color--charcoal); border: 1px solid var(--wp--preset--color--border); box-shadow: 0 4px 18px rgba(0,0,0,.18); font: 600 .875rem/1 var(--wp--preset--font-family--body); cursor: pointer; }
.hc-theme-switch__track { position: relative; width: 2.75rem; height: 1.5rem; border-radius: 999px; background: #c9ccd0; transition: background .2s; flex: none; }
.hc-theme-switch__thumb { position: absolute; top: .1875rem; left: .1875rem; width: 1.125rem; height: 1.125rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .2s; }
.hc-theme-switch[aria-checked="true"] .hc-theme-switch__track { background: var(--wp--preset--color--burnt-orange); }
.hc-theme-switch[aria-checked="true"] .hc-theme-switch__thumb { transform: translateX(1.25rem); }
@media (prefers-reduced-motion: reduce) { .hc-theme-switch__track, .hc-theme-switch__thumb { transition: none; } }

/* ---------- Palette ---------- */
html[data-hc-theme="dark"] { color-scheme: dark; }
html[data-hc-theme="dark"] body {
	--wp--preset--color--white: #1d252c;
	--wp--preset--color--page-gray: #252e36;
	--wp--preset--color--sand: #2a3036;
	--wp--preset--color--warm-tint: #3b2b1f;
	--wp--preset--color--border: #3a4650;
	--wp--preset--color--ink: #e9e7df;
	--wp--preset--color--charcoal: #eef0f2;
	--wp--preset--color--muted: #b7c0c7;
	--wp--preset--color--link-blue: #74c7e8;
	--wp--preset--color--burnt-orange: #bf5700;
	--wp--preset--color--burnt-orange-dark: #a34b00;
	--wp--preset--shadow--soft: 0 8px 24px rgba(0,0,0,.45);
	background: #13191e;
	color: var(--wp--preset--color--ink);
}

/* Dark bands keep a dark fill (charcoal now means "light text"). */
html[data-hc-theme="dark"] body :is(.is-style-hc-dark, .hc-footer, .hc-logo-panel--dark) { background: #0d1215; color: #e8e5da; }
html[data-hc-theme="dark"] body .hc-footer { border-top: 1px solid #2a343c; }
html[data-hc-theme="dark"] body .hc-footer :is(h2, h3, h4), html[data-hc-theme="dark"] body .is-style-hc-dark :is(h1, h2, h3, h4) { color: #fff; }
html[data-hc-theme="dark"] body .is-style-hc-orange .wp-block-button__link { color: #333f48; }

/* Header */
html[data-hc-theme="dark"] body .hc-header { background: #13191e; border-bottom-color: var(--wp--preset--color--border); }
html[data-hc-theme="dark"] body .hc-brand img { filter: brightness(0) invert(1); }
html[data-hc-theme="dark"] body .hc-brand__name { border-left-color: #4a5762; }
html[data-hc-theme="dark"] body .hc-header .wp-block-navigation a:hover { background: var(--wp--preset--color--page-gray); }
html[data-hc-theme="dark"] body .hc-nav .wp-block-navigation__submenu-container { background: #2d3841; box-shadow: 0 8px 28px rgba(0,0,0,.5), 0 0 0 1px #46535d; }
html[data-hc-theme="dark"] body .hc-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { color: var(--wp--preset--color--ink); }
html[data-hc-theme="dark"] body .hc-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: #3a4650; color: #f0902f; }
html[data-hc-theme="dark"] body .hc-nav .is-menu-open { background: #13191e; color: var(--wp--preset--color--ink); }
html[data-hc-theme="dark"] body .hc-nav .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content { color: var(--wp--preset--color--muted); }
html[data-hc-theme="dark"] body .wp-block-search__input { background: #1d252c; border-color: #4a5762; color: var(--wp--preset--color--ink); }

/* Hard-coded light surfaces */
html[data-hc-theme="dark"] body :is(.hc-tool, .hc-lead-story, .hc-row-link, .hc-listlinks a, .hc-swatch, .hc-svcdir__search) { background: var(--wp--preset--color--white); }
html[data-hc-theme="dark"] body :is(.hc-share a, .hc-formats a, .hc-svcdir__filter, .hc-evt__tag, .hc-evt--past .hc-evt__date) { background: #2a343c; color: var(--wp--preset--color--ink); }
html[data-hc-theme="dark"] body .hc-ai-notice { background: #1d252c; }

/* Pills and badges built on warm-tint with a fixed brown text */
html[data-hc-theme="dark"] body :is(.hc-pill--tint, .hc-term-pills a, .hc-evt__date) { color: #f6b27a; }
html[data-hc-theme="dark"] body .hc-svcdir__badge--page { background: #4a2e18; color: #f6b27a; }
html[data-hc-theme="dark"] body .hc-svcdir__badge--ext { background: #1f3846; color: #8fd3ee; }

/* Logos and brand swatches */
html[data-hc-theme="dark"] body .hc-logo-panel--light .hc-logo img { background: #f3ede1; border-radius: 14px; padding: .75rem; box-sizing: border-box; }
html[data-hc-theme="dark"] body .hc-logo-panel--light { background: #2a3036; }
html[data-hc-theme="dark"] body .hc-swatch--charcoal .hc-swatch__chip { background: #333f48; }
html[data-hc-theme="dark"] body .hc-swatch--sand .hc-swatch__chip { background: #f3ede1; }
html[data-hc-theme="dark"] body .hc-swatch--tint .hc-swatch__chip { background: #fbeee3; }
html[data-hc-theme="dark"] body .hc-swatch--gray .hc-swatch__chip { background: #f5f5f5; }
html[data-hc-theme="dark"] body .hc-swatch--blue .hc-swatch__chip { background: #005f86; }
html[data-hc-theme="dark"] body .hc-swatch--orange .hc-swatch__chip { background: #bf5700; }
html[data-hc-theme="dark"] body .hc-swatch--orange-dark .hc-swatch__chip { background: #9e4900; }

/* Orange used as text needs a lighter tone on dark (backgrounds keep the brand orange so white text passes) */
/* Kept in two rules on purpose: :is() takes the specificity of its most specific member, so folding the compound
   selectors below into this list would outrank the .is-style-hc-orange override two rules down and leave the
   eyebrow tangerine-on-orange. */
html[data-hc-theme="dark"] body :is(.hc-eyebrow, .hc-evcard__mon, .hc-evcard__day, .hc-evcard__kind) { color: #f0902f; }
html[data-hc-theme="dark"] body :is(.hc-news-card .wp-block-post-terms a, .hc-card--compact .hc-cta, .hc-card--compact .hc-cta a) { color: #f0902f; }
html[data-hc-theme="dark"] body .hc-cta, html[data-hc-theme="dark"] body .hc-cta a { color: var(--wp--preset--color--link-blue); }
html[data-hc-theme="dark"] body .is-style-hc-orange .hc-eyebrow { color: #fff; }
html[data-hc-theme="dark"] body .is-style-hc-dark .hc-eyebrow { color: #f8b25a; }
html[data-hc-theme="dark"] body .hc-evcard--live :is(.hc-evcard__mon, .hc-evcard__day, .hc-evcard__dow) { color: #fff; }

/* Cards that hard-code white */
html[data-hc-theme="dark"] body :is(.hc-news-card, .hc-evcard) { background: var(--wp--preset--color--white); }
html[data-hc-theme="dark"] body .hc-pill--amber { color: #1d252c; }

/* Buttons: white text on brand orange (the white token is a dark surface now) */
html[data-hc-theme="dark"] body :is(.wp-block-button__link, .wp-block-search__button) { color: #fff; }
html[data-hc-theme="dark"] body .is-style-outline .wp-block-button__link:not(:hover) { color: var(--wp--preset--color--ink); background: transparent; }
html[data-hc-theme="dark"] body :is(.is-style-hc-dark, .is-style-hc-orange) .is-style-outline .wp-block-button__link { color: #fff; }
html[data-hc-theme="dark"] body .is-style-hc-orange .wp-block-button__link:not(.is-style-outline *) { background: #fff; color: #333f48; }

/* Pills keep their solid brand fills with white text */
html[data-hc-theme="dark"] body .hc-pill--dark { background: #46535d; }
html[data-hc-theme="dark"] body .hc-pill--blue { background: #006c99; }

/* Active / current chips (previously charcoal fill) */
html[data-hc-theme="dark"] body :is(.hc-formats a:hover, .hc-formats a[aria-current], .wp-block-query-pagination .current, .hc-svcdir__filter:hover, .hc-svcdir__filter[aria-pressed="true"]) { background: #46535d; color: #fff; }
html[data-hc-theme="dark"] body :is(.wp-block-query-pagination a, .wp-block-query-pagination .page-numbers) { background: #2a343c; color: var(--wp--preset--color--ink); }

/* Stats and numbers in orange text */
html[data-hc-theme="dark"] body :is(.hc-stat, .hc-num) { color: #f0902f; }
html[data-hc-theme="dark"] body .hc-stats-band .hc-stat { color: #fff; }
html[data-hc-theme="dark"] body .hc-numbers .hc-stat { color: var(--wp--preset--color--tangerine); }
html[data-hc-theme="dark"] body :is(.is-style-hc-dark, .hc-ai-band) .hc-stat { color: #fff; }

/* Cards and rows that hard-code white or near-white */
html[data-hc-theme="dark"] body :is(.hc-callout-tool, .hc-svcdir__group, .hc-evt, .hc-evt--compact) { background: var(--wp--preset--color--white); box-shadow: 0 0 0 1px var(--wp--preset--color--border); }
html[data-hc-theme="dark"] body .hc-callout-tool { box-shadow: var(--wp--preset--shadow--soft), 0 0 0 1px var(--wp--preset--color--border); }
html[data-hc-theme="dark"] body .hc-evt--compact { background: #232c33; }
html[data-hc-theme="dark"] body .hc-aboutnav { background: rgba(29,37,44,.92); box-shadow: 0 0 0 1px var(--wp--preset--color--border); }
html[data-hc-theme="dark"] body .hc-aboutnav a { background: transparent; }
html[data-hc-theme="dark"] body .hc-evt__date { background: #3b2b1f; color: #f6b27a; }
html[data-hc-theme="dark"] body .hc-evt--live .hc-evt__date { background: var(--wp--preset--color--burnt-orange); color: #fff; }
html[data-hc-theme="dark"] body .hc-evt__body h3 a, html[data-hc-theme="dark"] body .hc-news-card .wp-block-post-title a { color: var(--wp--preset--color--ink); }
html[data-hc-theme="dark"] body .hc-evt__body h3 a:hover { color: #f0902f; }
html[data-hc-theme="dark"] body .hc-svcdir__group > h2 { color: #f0902f; }
html[data-hc-theme="dark"] body .hc-svcdir__item a { border-top-color: rgba(255,255,255,.1); color: var(--wp--preset--color--ink); }
html[data-hc-theme="dark"] body .hc-tool-row { border-bottom-color: rgba(255,255,255,.12); }
html[data-hc-theme="dark"] body .wp-block-details { background: var(--wp--preset--color--white); border-color: var(--wp--preset--color--border); }
html[data-hc-theme="dark"] body :is(.wp-block-details summary, .wp-block-details p) { color: var(--wp--preset--color--ink); }

/* Episode facts, initiative cards, event side panel */
html[data-hc-theme="dark"] body .hc-ini { background: var(--wp--preset--color--white); box-shadow: 0 0 0 1px var(--wp--preset--color--border); }
html[data-hc-theme="dark"] body .hc-ini__body h3 a { color: var(--wp--preset--color--ink); }
html[data-hc-theme="dark"] body .hc-ini__body h3 a:hover { color: #f0902f; }
html[data-hc-theme="dark"] body .hc-ep__facts > div { background: var(--wp--preset--color--page-gray); }
html[data-hc-theme="dark"] body .hc-evside__time { color: #f0902f; }

/* Timeline, search result meta, video backdrop */
html[data-hc-theme="dark"] body :is(.hc-timeline__when, .hc-result__meta, .hc-result__type, .hc-evdir__counts strong) { color: #f0902f; }
html[data-hc-theme="dark"] body .hc-embed { background: #0d1215; }

/* Full-bleed photo hero: the scrim is dark in both themes, so keep the light-on-dark pair. */
html[data-hc-theme="dark"] body .hc-photo-hero .hc-photo-hero__copy .hc-eyebrow { color: #fff; }
html[data-hc-theme="dark"] body .hc-photo-hero .hc-photo-hero__copy .wp-block-button__link { background: #fff; color: #333f48; }
html[data-hc-theme="dark"] body .hc-photo-hero .hc-photo-hero__copy .is-style-outline .wp-block-button__link:not(:hover) { background: transparent; color: #fff; }
html[data-hc-theme="dark"] body .hc-photo-hero .hc-photo-hero__copy :is(h1, .hc-lede, .hc-crumbs a) { color: #fff; }

/* Testimonials: the card is a light panel in light mode, so give it the dark surface here. */
html[data-hc-theme="dark"] body .hc-testimonial { background: #222a2f; border-color: #39434a; }
html[data-hc-theme="dark"] body .hc-testimonial .hc-testimonial__name { color: #f0902f; }
