/* hearIT listening identity: navy foundations, teal detail, warm ochre accents. */
:root {
    --lounge-navy: #0b2540;
    --lounge-teal: #087f80;
    --lounge-ochre: #dc9830;
    --lounge-paper: #f5f8fc;
    --lounge-ink: #102d4d;
    --lounge-muted: #536b88;
    --lounge-border: #dce5ef;
    --lounge-shadow: 0 4px 18px rgb(11 37 64 / 3%);
}
body.hearit-theme { background: var(--lounge-paper); color: var(--lounge-ink); }
.hearit-theme .bg-page { background: var(--lounge-paper); color: var(--lounge-ink); }
.hearit-theme :is(h1,h2,h3,h4) { letter-spacing: -.035em; }
.hearit-theme :is(button,a,input,select,textarea):focus-visible { outline: 3px solid var(--lounge-teal); outline-offset: 4px; }
.hearit-theme :is(button,a) { -webkit-tap-highlight-color: transparent; }
.hearit-theme :is(.bg-slate-900,.bg-black) { background-color: var(--lounge-navy); }
.hearit-theme :is(.text-black,.text-slate-900) { color: var(--lounge-ink); }
.hearit-theme .lounge-brand { font-size: 1.85rem; font-weight: 850; letter-spacing: -.065em; color: var(--lounge-navy); line-height: 1; }
.hearit-theme .lounge-brand span { color: var(--lounge-teal); }
.lounge-site-header { box-shadow: 0 2px 12px rgb(11 37 64 / 2%); }
.lounge-site-header nav { gap: 1.8rem; color: var(--lounge-muted); }
.lounge-site-header nav a:hover { color: var(--lounge-teal); }
.lounge-card { border: 1px solid var(--lounge-border); background: #fff; border-radius: 22px; box-shadow: var(--lounge-shadow); }
.lounge-eyebrow { font-size: .71rem; text-transform: uppercase; letter-spacing: .18em; font-weight: 750; color: var(--lounge-muted); line-height: 1.6; }
.lounge-button { display: inline-flex; align-items: center; justify-content: center; gap: .8rem; min-height: 44px; padding: .75rem 1.35rem; border-radius: 999px; font-size: .85rem; font-weight: 700; border: 1px solid transparent; transition: background .18s, box-shadow .18s; text-decoration: none; }
.lounge-button-primary { background: var(--lounge-navy); color: #fff; }
.lounge-button-primary:hover { background: #174463; box-shadow: 0 4px 12px #0b25401a; }
.lounge-button-outline { border-color: #cedce9; color: var(--lounge-ink); background: #fff; }
.lounge-button-outline:hover { background: #eff7f8; border-color: var(--lounge-teal); }
.lounge-button:disabled { opacity: .45; cursor: not-allowed; }
.lounge-link { font-size: .85rem; font-weight: 650; color: var(--lounge-muted); }
.lounge-link:hover { color: var(--lounge-teal); }
.lounge-pattern-strip { position: absolute; height: 12px; inset: auto 0 0; background: url('/images/lounge/pattern.svg') center / 80px 40px repeat-x; }
.lounge-hero-pattern { position: absolute; inset: 0 0 0 auto; width: 96px; background: url('/images/lounge/pattern.svg') center / 180px 90px; opacity: .32; mask-image: linear-gradient(to right,transparent,#000); pointer-events: none; }
.channel-page { max-width: 1240px; margin: 0 auto; display: grid; gap: 24px; }
.channel-navigation { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.channel-hero { position: relative; display: flex; gap: 34px; padding: 24px; align-items: center; overflow: hidden; }
.channel-cover { width: clamp(160px,21vw,245px); aspect-ratio: 1; border-radius: 16px; object-fit: cover; flex-shrink: 0; }
.channel-hero-copy { min-width: 0; padding: 12px 70px 12px 0; position: relative; z-index: 1; }
.channel-hero h1 { font-size: clamp(2rem,4vw,3.4rem); line-height: 1.12; font-weight: 800; margin: 14px 0 12px; overflow-wrap: anywhere; }
.channel-tagline { font-size: clamp(1rem,1.6vw,1.25rem); color: var(--lounge-muted); line-height: 1.55; }
.channel-meta { font-size: .88rem; color: var(--lounge-muted); line-height: 1.6; margin-top: 8px; }
.channel-hero .lounge-button { margin-top: 20px; min-width: 165px; }
.channel-categories { padding: 15px 24px; display: flex; align-items: center; gap: 28px; min-width: 0; }
.channel-categories h2 { font-size: .92rem; font-weight: 750; white-space: nowrap; }
.channel-category-scroll { display: flex; gap: 9px; overflow-x: auto; padding: 5px; scrollbar-width: thin; min-width: 0; }
.lounge-chip { border: 1px solid #d2dfed; border-radius: 999px; color: var(--lounge-ink); font-size: .78rem; font-weight: 650; min-height: 42px; padding: 10px 18px; white-space: nowrap; background: #fff; }
.lounge-chip:hover { border-color: var(--lounge-teal); background: #f1f8f8; }
.lounge-chip.is-active { background: var(--lounge-navy); color: #fff; border-color: var(--lounge-navy); }
.channel-listening-grid { display: grid; grid-template-columns: minmax(0,1.95fr) minmax(290px,1fr); gap: 22px; align-items: start; }
.channel-main { min-width: 0; display: grid; gap: 18px; }
.channel-listening-card { padding: 26px; padding-bottom: 30px; position: relative; overflow: hidden; }
.channel-current-heading { display: flex; align-items: center; gap: 22px; margin-top: 18px; }
.channel-current-heading img { width: 105px; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.channel-current-heading h2 { font-size: clamp(1.5rem,2.6vw,2rem); font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.channel-episode-description { margin-top: 10px; font-size: .85rem; line-height: 1.6; color: var(--lounge-muted); }
.channel-about { padding: 22px 26px; }
.channel-about h2 { font-size: 1.05rem; font-weight: 750; }
.channel-about p { font-size: .84rem; line-height: 1.8; color: var(--lounge-muted); margin-top: 7px; }
.channel-episodes { overflow: hidden; }
.channel-episodes > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 23px; border-bottom: 1px solid var(--lounge-border); }
.channel-episodes h2 { font-size: 1.35rem; font-weight: 800; }
.channel-episodes header > span { font-size: .8rem; color: var(--lounge-muted); }
.channel-episode-list { padding: 12px; max-height: 620px; overflow-y: auto; }
.channel-episode { display: flex; align-items: center; width: 100%; gap: 13px; padding: 14px 12px; border-left: 4px solid transparent; border-bottom: 1px solid #eef2f6; text-align: left; border-radius: 8px; min-height: 96px; transition: background .16s; }
.channel-episode:hover { background: #f5f9fc; }
.channel-episode.is-selected { background: #ebf4fe; border-left-color: #0a9f9b; }
.channel-episode img { width: 56px; height: 56px; object-fit: cover; border-radius: 9px; flex-shrink: 0; }
.channel-episode-copy { display: grid; gap: 5px; flex: 1; min-width: 0; }
.channel-episode-copy strong { font-size: .85rem; line-height: 1.45; overflow-wrap: anywhere; }
.channel-episode-copy > span { font-size: .76rem; color: var(--lounge-muted); }
.channel-row-play { width: 34px; height: 34px; display: grid; place-content: center; flex-shrink: 0; font-size: .72rem; border: 1px solid #cfdeee; border-radius: 50%; background: #fff; }
.channel-equalizer { display: flex; align-items: center; height: 28px; gap: 3px; padding: 0 8px; }
.channel-equalizer i { display: block; width: 3px; height: 16px; background: var(--lounge-teal); animation: lounge-level .9s ease-in-out infinite alternate; }
.channel-equalizer i:nth-child(2) { height: 24px; animation-delay: -.3s; }
.channel-equalizer i:nth-child(3) { height: 11px; animation-delay: -.6s; }
@keyframes lounge-level { to { transform: scaleY(.4); } }
.lounge-empty { padding: 36px 20px; text-align: center; color: var(--lounge-muted); font-size: .9rem; line-height: 1.8; }
.lounge-empty h2 { color: var(--lounge-ink); font-size: 1.3rem; font-weight: 750; margin-bottom: 8px; }
/* Local media controls: the native player remains the fallback until JS mounts. */
.podcast-player { margin-top: 24px; --audio-progress: 0%; }
.podcast-player audio { width: 100%; }
.podcast-custom-controls { display: none; }
.podcast-player[data-enhanced="true"] > audio { display: none; }
.podcast-player[data-enhanced="true"] .podcast-custom-controls { display: block; }
.podcast-waveform { display: flex; align-items: center; gap: 4px; height: 58px; width: 100%; }
.podcast-waveform span { flex: 1; min-width: 1px; border-radius: 5px; background: #dce4ec; transition: background .2s; }
.podcast-waveform span.is-played { background: var(--lounge-ochre); }
.podcast-timeline { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 14px; font-size: .75rem; color: var(--lounge-muted); font-variant-numeric: tabular-nums; margin: 10px 0 20px; }
.podcast-player input[type="range"] { accent-color: var(--lounge-ochre); width: 100%; cursor: pointer; min-height: 28px; background: transparent; }
.podcast-player input:disabled { opacity: .4; cursor: default; }
.podcast-transport { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.podcast-skip-controls { display: flex; align-items: center; justify-content: center; gap: 28px; flex: 1; }
.podcast-play { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; color: #fff; background: var(--lounge-navy); box-shadow: 0 6px 16px #0b254019; }
.podcast-play:hover { background: #174463; }
.podcast-play svg { width: 27px; height: 27px; fill: currentColor; }
.podcast-play [hidden] { display: none; }
.podcast-skip { position: relative; width: 42px; height: 44px; color: var(--lounge-ink); }
.podcast-skip > span { font-size: 2.7rem; line-height: 1; }
.podcast-skip small { position: absolute; top: 20px; left: 14px; font-size: .65rem; font-weight: 800; }
.podcast-secondary-controls { display: flex; align-items: center; gap: 12px; padding-left: 16px; border-left: 1px solid var(--lounge-border); }
.podcast-secondary-controls select { background: #fff; border: none; color: var(--lounge-ink); font-size: .8rem; min-height: 44px; width: 60px; cursor: pointer; }
.podcast-secondary-controls button { min-width: 34px; min-height: 44px; }
.podcast-secondary-controls svg { width: 24px; height: 24px; fill: currentColor; }
.podcast-secondary-controls button[aria-pressed="true"] { opacity: .45; }
.podcast-secondary-controls input[type="range"] { width: 65px; accent-color: var(--lounge-navy); }
.podcast-audio-status { font-size: .8rem; line-height: 1.6; color: #92591d; margin-top: 12px; }
.podcast-audio-status:empty { display: none; }
/* Library and browse catalogue */
.library-hero { padding: 32px; position: relative; overflow: hidden; }
.library-hero h1 { font-weight: 800; }
.library-channel-card { border-radius: 20px; border-color: var(--lounge-border); }
.hearit-theme :is(.library-channel-card,.service-card) > img,
.hearit-theme .service-card .service-image { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.library-channel-card > img { border-bottom: 1px solid var(--lounge-border); }
.hearit-theme .service-card { display: flex; flex-direction: column; border-color: var(--lounge-border); box-shadow: var(--lounge-shadow); }
/* Homepage uses the same editorial card rather than a separate marketing palette. */
.lounge-home-wrap { max-width: 1280px; margin: 0 auto; padding: 36px 32px 0; }
.lounge-home-hero { padding: clamp(28px,5vw,64px); display: grid; grid-template-columns: minmax(0,1.5fr) minmax(220px,1fr); gap: 50px; align-items: center; position: relative; overflow: hidden; }
.lounge-home-copy h1 { font-size: clamp(2rem,4vw,3.65rem); line-height: 1.15; font-weight: 800; margin: 22px 0; }
.lounge-home-copy h1 span { color: var(--lounge-teal); }
.lounge-home-copy > p:not(.lounge-eyebrow) { color: var(--lounge-muted); font-size: 1rem; line-height: 1.8; max-width: 540px; }
.lounge-home-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 16px; }
.lounge-home-copy .lounge-home-note { font-size: .8rem !important; }
.lounge-home-art { max-width: 320px; justify-self: center; }
.lounge-home-art img { aspect-ratio: 1; width: 100%; border-radius: 22px; box-shadow: 16px 16px 0 #f8eed9; }
.lounge-home-art span { display: block; text-align: center; font-size: .75rem; color: var(--lounge-muted); margin-top: 28px; }
.hearit-theme #about { color: var(--lounge-ink); }
/* Entry, legal, utility and admin pages share the same restrained identity. */
.hearit-theme .access-page > div:first-child { box-shadow: var(--lounge-shadow); }
.hearit-theme .terms-page > header { border-bottom: 3px solid #e9c78d; padding-bottom: 26px; }
.hearit-theme .terms-page a[aria-current="page"] { background: var(--lounge-navy); color: white; }
.hearit-theme .site-footer { background: #eef3f8; color: var(--lounge-ink); border-top: 1px solid var(--lounge-border); position: relative; margin-top: 48px; }
.hearit-theme .site-footer :is(.footer-blurb,.footer-links,.footer-legal,.footer-copy) { color: var(--lounge-muted); }
.hearit-theme .admin-workspace { background: var(--lounge-paper); }
.hearit-theme .admin-workspace .admin-brand-mark { background: var(--lounge-navy); border-bottom: 3px solid var(--lounge-ochre); }
.hearit-theme .admin-workspace .admin-primary-button { background: var(--lounge-navy); color: #fff; }
.hearit-theme .admin-workspace .admin-panel { border-color: var(--lounge-border); box-shadow: var(--lounge-shadow); }
.hearit-theme .admin-workspace .service-editor-tabs button[aria-pressed="true"] { background: #e8f5f3; color: #096a6c; box-shadow: inset 0 -2px var(--lounge-teal); }
.hearit-theme .admin-workspace .content-sync-choice { background: #f0f8f7; border-color: #bfdfdb; }
.hearit-theme .admin-workspace .sync-scope-badge { color: #096a6c; background: #e8f5f3; }
.hearit-theme .maintenance-page { font-family: "Manrope","Segoe UI",sans-serif; color: var(--lounge-ink); background: var(--lounge-paper); }
/* Music retains its specialised controls with the same colour system. */
.hearit-theme .pod-page-shell { --pod-bg: #f5f8fc; --pod-surface-soft: #f1f7f8; --pod-border: #dce5ef; --pod-text: #102d4d; --pod-muted: #536b88; --pod-primary: #087f80; --pod-primary-dark: #056264; --pod-primary-soft: #e8f5f3; --pod-navy: #0b2540; --pod-cream: #fffaf1; background: var(--pod-bg); }
.hearit-theme .pod-soft-card { background: #fff; }
.hearit-theme .pod-now-playing-card { border-bottom: 5px solid var(--lounge-ochre); }
.hearit-theme .pod-play-button { background: var(--lounge-navy); }
.hearit-theme .kidsitta-page { border: 1px solid var(--lounge-border); box-shadow: var(--lounge-shadow); }
@media (max-width: 1000px) {
    .channel-listening-grid { grid-template-columns: minmax(0,1fr); }
    .channel-episode-list { max-height: 380px; }
    .channel-hero { gap: 24px; }
    .channel-hero-copy { padding-right: 25px; }
    .channel-categories { gap: 14px; }
    .lounge-home-hero { gap: 26px; }
}
@media (max-width: 600px) {
    .channel-page { gap: 16px; }
    .channel-hero { flex-direction: column; align-items: flex-start; padding: 22px; gap: 20px; }
    .channel-cover { width: 155px; }
    .channel-hero-copy { padding: 0; }
    .channel-hero h1 { font-size: 2rem; }
    .channel-tagline { font-size: .95rem; }
    .channel-hero .lounge-button { margin-top: 16px; }
    .lounge-hero-pattern { width: 70px; opacity: .18; }
    .channel-categories { display: block; padding: 16px; }
    .channel-category-scroll { margin-top: 10px; }
    .channel-listening-card { padding: 22px 18px 28px; }
    .channel-current-heading { gap: 14px; align-items: flex-start; }
    .channel-current-heading img { width: 72px; }
    .channel-current-heading h2 { font-size: 1.5rem; }
    .channel-episode-description { font-size: .78rem; }
    .podcast-transport { flex-direction: column; gap: 16px; }
    .podcast-secondary-controls { border: 0; padding: 0; }
    .podcast-skip-controls { width: 100%; }
    .podcast-waveform { gap: 2px; }
    .channel-about { padding: 20px; }
    .library-hero { padding: 24px 20px; }
    .lounge-home-wrap { padding: 20px 16px 0; }
    .lounge-home-hero { grid-template-columns: minmax(0,1fr); gap: 28px; padding: 26px 22px 32px; }
    .lounge-home-art { width: 180px; }
    .lounge-home-copy h1 { font-size: 2.1rem; }
    .lounge-home-actions { flex-direction: column; }
    .lounge-home-copy > p:not(.lounge-eyebrow) { font-size: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
    .channel-equalizer i { animation: none; }
    .hearit-theme { scroll-behavior: auto; }
    .hearit-theme .hero-card * { animation: none !important; }
}

.podcast-player .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0; }
.podcast-skip svg { width: 34px; height: 34px; margin: auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.podcast-skip small { top: 17px; left: 14px; }
.podcast-player input[type="range"] { appearance: none; -webkit-appearance: none; }
.podcast-player input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: #d9e2ec; }
.podcast-player input[data-seek]::-webkit-slider-runnable-track { background: linear-gradient(to right,var(--lounge-ochre) var(--audio-progress),#d9e2ec var(--audio-progress)); }
.podcast-player input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; height: 15px; width: 15px; margin-top: -5.5px; border-radius: 50%; background: var(--lounge-ochre); }
.podcast-player input[data-volume]::-webkit-slider-thumb { background: var(--lounge-navy); }
.podcast-player input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: #d9e2ec; }
.podcast-player input[type="range"]::-moz-range-progress { background: var(--lounge-ochre); height: 4px; }
.podcast-player input[type="range"]::-moz-range-thumb { height: 15px; width: 15px; border: 0; border-radius: 50%; background: var(--lounge-ochre); }
.music-lounge-header { max-width: 1440px; margin: 0 auto; padding: 6px 0 24px; display: flex; align-items: center; gap: 24px; }
.music-lounge-header > div { flex: 1; }
.music-lounge-header h1 { font-size: 1.25rem; font-weight: 800; margin-top: 5px; }
.hearit-theme .pod-page-shell .pod-mini-play-button { background: var(--lounge-navy); }
.hearit-theme .admin-workspace .admin-nav-item-active { background: #e8f5f3; border-color: #c2dfdc; color: #096a6c; box-shadow: inset 3px 0 var(--lounge-teal); }
.hearit-theme .admin-workspace .admin-sidebar { border-right-color: var(--lounge-border); }
.hearit-theme .admin-workspace .admin-eyebrow { color: var(--lounge-teal); }
@media (max-width:600px) {
    .music-lounge-header { flex-wrap: wrap; gap: 14px; }
    .music-lounge-header > div { order: 3; flex-basis: 100%; }
    .music-lounge-header .lounge-button { margin-left: auto; }
}

.channel-load-more { display: flex; margin: 0 auto 20px; }

.service-card-body { display: flex; flex-direction: column; flex: 1; }
.service-card-actions { margin-top: auto; padding-top: 20px; }
