/**
 * YSP Audio Cast Browser — same visual system as course-browser.css
 * (teal page, white cards), muted band accents: A1 slate blue, A2 sage, B1 amber.
 */

body.ysp-acb-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0f6174;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    color: #314357;
}

.ysp-acb {
    --acb-teal:      #2a7f92;
    --acb-teal-dk:   #1b6b7e;
    --acb-ink:       #2f4054;
    --acb-muted:     #6b7785;
    --acb-line:      #d9dee5;
    --acb-a1:        #5b7fb3;
    --acb-a2:        #4f9a85;
    --acb-b1:        #c08a3e;
    max-width: 1200px;
    margin: 0 auto;
}

/* ── header ───────────────────────────────────────────────────────── */
.ysp-acb-header {
    background: linear-gradient(135deg, #2a7f92 0%, #236f81 100%);
    color: #fff;
    padding: 30px 30px 26px;
    text-align: center;
    border-radius: 18px;
    margin-bottom: 22px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.ysp-acb-nav { text-align: left; margin-bottom: 14px; }
.ysp-acb-home {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    display: inline-block;
}
.ysp-acb-home:hover { background: rgba(255, 255, 255, 0.2); color: #fff; }

.ysp-acb-kicker {
    display: inline-block;
    margin: 0 0 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    padding: 5px 14px;
}
.ysp-acb-header h1 {
    font-size: 2.4rem;
    margin: 0 0 10px;
    color: #fff !important;
}
.ysp-acb-lead {
    max-width: 680px;
    margin: 0 auto 18px;
    font-size: 1.1rem;
    line-height: 1.55;
    opacity: 0.95;
}
.ysp-acb-howto {
    list-style: none;
    padding: 0;
    margin: 0 auto 14px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.ysp-acb-howto li {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 0.93rem;
}
.ysp-acb-howto li span {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: #fff;
    color: var(--acb-teal-dk);
    font-weight: 700;
    font-size: 0.8rem;
    display: flex; align-items: center; justify-content: center;
}
.ysp-acb-schedule {
    margin: 0;
    font-size: 0.92rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
}

/* ── landing: band cards ─────────────────────────────────────────── */
.ysp-acb-bands {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    justify-content: center;
    padding: 10px 0 30px;
}
.ysp-acb-band {
    --band: var(--acb-a1);
    flex: 1 1 320px;
    max-width: 380px;
    background: #fff;
    border: 1px solid var(--acb-line);
    border-top: 5px solid var(--band);
    border-radius: 16px;
    padding: 26px 28px 24px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ysp-acb-band:hover,
.ysp-acb-band:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
    outline: none;
}
.ysp-acb-band-a1 { --band: var(--acb-a1); }
.ysp-acb-band-a2 { --band: var(--acb-a2); }
.ysp-acb-band-b1 { --band: var(--acb-b1); }

.ysp-acb-band-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.ysp-acb-band-icon { font-size: 1.6rem; }
.ysp-acb-band-level {
    font-weight: 800;
    font-size: 0.9rem;
    color: #fff;
    background: var(--band);
    border-radius: 8px;
    padding: 4px 10px;
    letter-spacing: 0.05em;
}
.ysp-acb-band-badge {
    margin: 0 0 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--band);
}
.ysp-acb-band-title {
    font-size: 1.5rem;
    color: var(--acb-ink);
    margin: 0 0 10px;
}
.ysp-acb-band-desc {
    color: #5f6b7a;
    line-height: 1.6;
    margin: 0 0 18px;
    flex-grow: 1;
}
.ysp-acb-band-metrics {
    display: flex;
    gap: 22px;
    margin-bottom: 18px;
}
.ysp-acb-band-metrics div { display: flex; flex-direction: column; }
.ysp-acb-band-metrics strong { font-size: 1.4rem; color: var(--acb-ink); }
.ysp-acb-band-metrics span {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--acb-muted);
}
.ysp-acb-btn {
    align-self: flex-start;
    background: var(--acb-teal-dk);
    color: #fff;
    padding: 11px 22px;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s ease;
}
.ysp-acb-band:hover .ysp-acb-btn { background: #165a69; }

.ysp-acb-new {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a4b2f;
    background: #fbe7dc;
    border-radius: 999px;
    padding: 3px 9px;
}

/* ── drill-down ──────────────────────────────────────────────────── */
.ysp-acb-drill {
    background: linear-gradient(135deg, #2a7f92 0%, #236f81 100%);
    border-radius: 18px;
    padding: 26px 32px 34px;
}
.ysp-acb-drill-head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.ysp-acb-drill-head h2 { margin: 0; font-size: 1.9rem; color: #fff; }
.ysp-acb-back {
    background: #f6f7f9;
    border: 1px solid #d8dee6;
    color: #4b5563;
    padding: 9px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}
.ysp-acb-back:hover { border-color: var(--acb-teal); color: var(--acb-teal); }

.ysp-acb-filters {
    background: #f7f8fa;
    border: 1px solid #e6eaf0;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 26px;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: flex-end;
}
.ysp-acb-filter { display: flex; flex-direction: column; gap: 6px; min-width: 220px; flex: 1 1 220px; }
.ysp-acb-filter label { font-weight: 600; font-size: 0.88rem; color: #4b5563; }
.ysp-acb-filter select,
.ysp-acb-filter input {
    padding: 10px 14px;
    border: 1px solid #d8dee6;
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
}
.ysp-acb-filter select:focus,
.ysp-acb-filter input:focus {
    outline: none;
    border-color: var(--acb-teal);
    box-shadow: 0 0 0 3px rgba(42, 127, 146, 0.12);
}
.ysp-acb-clear {
    background: #fff;
    color: #6b4f4f;
    border: 1px solid #e3d3d3;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
}
.ysp-acb-clear:hover { background: #fbf3f3; }

/* ── episode cards ───────────────────────────────────────────────── */
.ysp-acb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.ysp-acb-ep {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    padding: 20px 22px 18px;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--acb-line);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ysp-acb-ep:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}
.ysp-acb-ep.is-new { border-color: #e9c7b6; }

.ysp-acb-ep-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.8rem;
}
.ysp-acb-ep-num {
    font-weight: 700;
    color: var(--acb-teal-dk);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.ysp-acb-ep-date { margin-left: auto; color: var(--acb-muted); }

.ysp-acb-ep-title {
    font-size: 1.2rem;
    line-height: 1.3;
    color: white;
    margin: 0 0 10px;
}
.ysp-acb-ep-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.ysp-acb-chip {
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 4px 11px;
}
.ysp-acb-chip-grammar { background: #e6edf7; color: #3d5f8f; }
.ysp-acb-chip-word    { background: #efeaf6; color: #62508a; }

.ysp-acb-ep-desc {
    margin: 0 0 14px;
    font-size: 0.93rem;
    line-height: 1.55;
    color: #5f6b7a;
    flex-grow: 1;
}
.ysp-acb-ep-cta {
    align-self: flex-start;
    margin-top: auto;
    font-weight: 600;
    font-size: 0.92rem;
    color: #fff;
    background: var(--acb-teal-dk);
    border-radius: 8px;
    padding: 8px 16px;
}
.ysp-acb-ep:hover .ysp-acb-ep-cta { background: #165a69; }

.ysp-acb-muted,
.ysp-acb-empty {
    color: #e6f1f3;
    text-align: center;
    padding: 30px 10px;
    font-size: 1.05rem;
}

/* ── phone ───────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    body.ysp-acb-body { padding: 10px; }
    .ysp-acb-header { padding: 22px 18px; }
    .ysp-acb-header h1 { font-size: 1.9rem; }
    .ysp-acb-howto { flex-direction: column; align-items: stretch; }
    .ysp-acb-bands { flex-direction: column; align-items: stretch; gap: 16px; }
    .ysp-acb-band { max-width: none; padding: 20px; }
    .ysp-acb-drill { padding: 18px 16px 24px; }
    .ysp-acb-drill-head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .ysp-acb-grid { grid-template-columns: 1fr; }
}

/* ── Access badges + "try for free" block (guests only) ───────────── */
.ysp-acb-ep { position: relative; }
.ysp-acb-access {
    align-self: flex-start;
    margin: -4px 0 10px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 5px 11px;
}
.ysp-acb-access-free {
    color: #0b5560;
    background: linear-gradient(135deg, #b9f0f3, #7fdde4);
    border: 1px solid #5fcfd8;
}
.ysp-acb-access-members {
    color: #fff;
    background: #1b6b7e;
    border: 1px solid #165a69;
}
.ysp-acb-ep.is-free { border-color: #5fcfd8; box-shadow: 0 0 0 2px rgba(95, 207, 216, 0.35), 0 4px 12px rgba(0,0,0,.06); }

.ysp-acb-free {
    background: rgba(255, 255, 255, 0.1);
    border: 1px dashed rgba(255, 255, 255, 0.45);
    border-radius: 16px;
    padding: 20px 20px 22px;
    margin-bottom: 28px;
}
.ysp-acb-free-head h3 {
    margin: 0 0 4px;
    color: #fff;
    font-size: 1.35rem;
}
.ysp-acb-free-head p {
    margin: 0 0 16px;
    color: rgba(255, 255, 255, 0.88);
}
.ysp-acb-all-title {
    color: #fff;
    font-size: 1.2rem;
    margin: 0 0 14px;
}

/* ── Two families: section titles + kind chip on the level cards ──── */
.ysp-acb-kind-title {
    color: #fff;
    font-size: 1.3rem;
    margin: 6px 0 12px;
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.ysp-acb-kind-title small {
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
}
.ysp-acb-kind-chip {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #2f4054;
    background: #eef2f6;
    border-radius: 999px;
    padding: 3px 9px;
}
.ysp-acb-kind-lexicast .ysp-acb-kind-chip { background: #efeaf6; color: #62508a; }
.ysp-acb-kind-lexicast { --band: #7a64a8; }       /* LexiCast cards take the violet accent */
.ysp-acb-bands + .ysp-acb-kind-title { margin-top: 10px; }

/* ═══════════════════════════════════════════════════════════════════
   ON THE GO (30 Oct 26) — members only. Built for a hand that is not
   looking: 64px+ targets, one accent colour, nothing small near a control.
   ═══════════════════════════════════════════════════════════════════ */
.ysp-acb-otg-launch { margin: 0 0 26px; }
.ysp-acb-otg-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    background: #fff;
    color: var(--acb-ink);
    border: 1px solid var(--acb-line);
    border-left: 8px solid #e0892f;
    border-radius: 16px;
    cursor: pointer;
    text-align: left;
    font: inherit;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ysp-acb-otg-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.14); }
.ysp-acb-otg-btn-icon { font-size: 2.2rem; line-height: 1; }
.ysp-acb-otg-btn-text { display: flex; flex-direction: column; gap: 3px; }
.ysp-acb-otg-btn-text strong { font-size: 1.3rem; }
.ysp-acb-otg-btn-text small { font-size: 0.92rem; color: #5f6b7a; }

.ysp-acb-otg {
    background: #16323b;
    color: #eef5f7;
    border-radius: 18px;
    padding: 22px 22px 30px;
}
.ysp-acb-otg-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 18px;
}
.ysp-acb-otg-head h2 { margin: 0; font-size: 1.7rem; color: #fff; flex: 1 1 auto; }
.ysp-acb-otg-level { display: flex; gap: 6px; }
.ysp-acb-otg-level button {
    min-width: 56px; min-height: 48px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font: inherit; font-weight: 700;
    cursor: pointer;
}
.ysp-acb-otg-level button.is-on { background: #e0892f; border-color: #e0892f; color: #1b1b1b; }

/* now-playing card */
.ysp-acb-otg-player {
    background: #0f2229;
    border-radius: 16px;
    padding: 20px 20px 18px;
    margin-bottom: 18px;
    text-align: center;
}
.ysp-acb-otg-player[hidden] { display: none; }
.ysp-acb-otg-now-kicker {
    margin: 0 0 6px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ec5cf;
}
.ysp-acb-otg-now { margin: 0 0 4px; font-size: 1.45rem; line-height: 1.25; color: #fff; }
.ysp-acb-otg-chapter { margin: 0 0 12px; font-size: 1rem; color: #e0892f; font-weight: 600; min-height: 1.4em; }
.ysp-acb-otg-progress {
    height: 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    overflow: hidden;
    cursor: pointer;
    margin: 0 0 6px;
}
.ysp-acb-otg-progress span { display: block; height: 100%; width: 0; background: #e0892f; transition: width 0.25s linear; }
.ysp-acb-otg-time { font-size: 0.95rem; color: #bcd3da; font-variant-numeric: tabular-nums; margin-bottom: 14px; }
.ysp-acb-otg-controls { display: flex; justify-content: center; align-items: center; gap: 18px; }
.ysp-acb-otg-ctl {
    width: 72px; height: 72px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 1.7rem;
    cursor: pointer;
}
.ysp-acb-otg-ctl:active { background: rgba(255, 255, 255, 0.28); }
.ysp-acb-otg-ctl-main { width: 104px; height: 104px; background: #e0892f; color: #1b1b1b; font-size: 2.4rem; }
.ysp-acb-otg-ctl-main:active { background: #f3a452; }
.ysp-acb-otg-hint { margin: 14px 0 0; font-size: 0.85rem; color: #9ec5cf; }

/* start block */
.ysp-acb-otg-start { text-align: center; margin: 4px 0 20px; }
.ysp-acb-otg-playall {
    width: 100%;
    max-width: 520px;
    min-height: 76px;
    padding: 18px 24px;
    border: none;
    border-radius: 16px;
    background: #e0892f;
    color: #1b1b1b;
    font: inherit;
    font-size: 1.35rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}
.ysp-acb-otg-playall:disabled { opacity: 0.45; cursor: default; box-shadow: none; }
.ysp-acb-otg-count { margin: 10px 0 0; color: #bcd3da; font-size: 1rem; }

/* queue rows */
.ysp-acb-otg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ysp-acb-otg-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 14px;
}
.ysp-acb-otg-item.is-current { border-color: #e0892f; background: rgba(224, 137, 47, 0.14); }
.ysp-acb-otg-item.is-done { opacity: 0.5; }
.ysp-acb-otg-play {
    flex: 0 0 64px;
    width: 64px; height: 64px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #16323b;
    font-size: 1.5rem;
    cursor: pointer;
}
.ysp-acb-otg-item.is-current .ysp-acb-otg-play { background: #e0892f; color: #1b1b1b; }
.ysp-acb-otg-body { flex: 1 1 auto; min-width: 0; }
.ysp-acb-otg-body h3 { margin: 4px 0 2px; font-size: 1.15rem; line-height: 1.3; color: #fff; }
.ysp-acb-otg-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ysp-acb-otg-chip {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
    border-radius: 999px; padding: 3px 9px;
    background: rgba(255, 255, 255, 0.12); color: #e6f1f3;
}
.ysp-acb-otg-chip-band { background: #e0892f; color: #1b1b1b; }
.ysp-acb-otg-chip-seen { background: rgba(255, 255, 255, 0.06); color: #9ec5cf; }
.ysp-acb-otg-len { margin-left: auto; font-size: 0.85rem; color: #bcd3da; font-variant-numeric: tabular-nums; }
.ysp-acb-otg-sub  { margin: 0 0 4px; font-size: 0.9rem; color: #9ec5cf; }
.ysp-acb-otg-desc { margin: 0 0 8px; font-size: 0.92rem; line-height: 1.5; color: #d5e4e8; }
.ysp-acb-otg-actions { display: flex; gap: 10px; align-items: center; }
.ysp-acb-otg-heard,
.ysp-acb-otg-page {
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: #e6f1f3;
    font: inherit; font-size: 0.88rem; font-weight: 600;
    text-decoration: none;
    display: inline-flex; align-items: center;
    cursor: pointer;
}
.ysp-acb-otg-heard:disabled { opacity: 0.6; cursor: default; }

.ysp-acb-otg button { text-transform: none; }
.ysp-acb-otg h3 { border: none; padding-bottom: 0; }

@media (max-width: 768px) {
    .ysp-acb-otg { padding: 16px 12px 24px; border-radius: 14px; }
    .ysp-acb-otg-head h2 { font-size: 1.4rem; }
    .ysp-acb-otg-now { font-size: 1.25rem; }
    .ysp-acb-otg-ctl { width: 64px; height: 64px; }
    .ysp-acb-otg-ctl-main { width: 96px; height: 96px; }
    .ysp-acb-otg-desc { display: none; }      /* less to read at a red light */
}


/* ── Jonathan's theme fixes (30 Oct 26) ───────────────────────────── */
.ysp-acb-otg button { text-transform: none; }
.ysp-acb-otg h3 { border: none; padding-bottom: 0; }
 
/* ── TravelCast (3 Nov 26) ─────────────────────────────────────────── */
.ysp-acb-kind-travelcast { --band: #3f8f7a; }     /* TravelCast cards take the sea-green accent */
.ysp-acb-kind-travelcast .ysp-acb-kind-chip { background: #e4f3ee; color: #2f6f5e; }
.ysp-acb-chip-place { background: #e4f3ee; color: #2f6f5e; }
.ysp-acb-chip-tag   { background: #f1f3f5; color: #5a6675; text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.05em; }



/* ── ThemeCast (4 Nov 26) ──────────────────────────────────────────── */
.ysp-acb-kind-themecast { --band: #8a5a9e; }      /* ThemeCast cards take a plum accent */
.ysp-acb-kind-themecast .ysp-acb-kind-chip { background: #f1e8f5; color: #5e3a70; }

.ysp-audiocast-sense-head { font-weight: 600; color: #1d3b53; }