:root { --ink:#192344; --paper:#f4f6ff; --muted:#505b73; --dark:#182341; --sage:#e4ecff; --line:#d9dfee; --green:#273f88; --accent:#a6f2d3; color:var(--ink); background:var(--paper); }
.top { background:#fff; }
.bar { padding-block:12px; }
.brand { gap:11px; }
.brand img { border-radius:11px; }
.header-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px 16px; font-size:.88rem; font-weight:750; }
.header-actions a { text-underline-offset:4px; }
.install-button { background:#182341; color:white; border:0; border-radius:9px; padding:8px 13px; min-height:38px; font-weight:750; }
.install-status { max-width:1028px; margin:0 auto 10px; padding:8px 14px; background:#e7eeff; border-radius:8px; }
#portal-menu { background:#182341; color:#eef1ff; }
.portal-inner { max-width:1100px; padding:10px clamp(16px,4vw,36px) 9px; margin:auto; }
.source-switch,.menu-tabs,.menu-sub { display:flex; flex-wrap:wrap; gap:6px; }
.source-switch button,.menu-tabs button { border:0; color:inherit; background:transparent; border-radius:8px; font-weight:750; padding:7px 11px; min-height:36px; }
.source-switch button { border:1px solid #52618a; font-size:.86rem; }
.source-switch [aria-pressed=true] { background:#a6f2d3; color:#182341; border-color:#a6f2d3; }
.menu-tabs { margin-top:8px; }
.menu-tabs button { transition:background .18s ease,color .18s ease; }
.menu-tabs button:hover,.menu-tabs [aria-expanded=true] { background:#34446c; }
.menu-tabs span { display:inline-block; margin-left:5px; color:#a6f2d3; }
.menu-tabs [aria-expanded=true] span { transform:rotate(180deg); }
.menu-sub { margin-top:6px; padding:6px 0 0; border-top:1px solid #4a5778; animation:menu-enter .22s ease both; }
.menu-sub a { text-decoration:none; padding:7px 9px; font-size:.88rem; border-radius:8px; }
.menu-sub a:hover,.menu-sub a[aria-current=page] { background:#dbe5ff; color:#192344; }
.atlas-hero { max-width:1028px; margin:24px auto; width:calc(100% - 36px); display:grid; grid-template-columns:minmax(0,1.4fr) minmax(0,1fr); gap:12px; }
.atlas-copy { border-radius:22px; padding:clamp(20px,4vw,36px); background:#242d56; color:white; }
.atlas-copy .eyebrow { color:#a6f2d3; }
.atlas-copy h1 { font-size:clamp(2.3rem,5.3vw,4rem); }
.atlas-copy p { max-width:31rem; }
.atlas-copy .primary { background:#a6f2d3; color:#182341; }
.atlas-copy .primary:hover { background:#dcfff1; }
.atlas-side { border-radius:22px; background:#ece9fc; padding:clamp(16px,3vw,25px); }
.atlas-side h2 { font-size:1.45rem; }
.level-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
.level-choices a { text-decoration:none; background:#fff; padding:11px 8px; border-radius:12px; text-align:center; color:#202950; border:1px solid #c9cff4; transition:transform .18s ease,background .18s ease; }
.level-choices a:hover { background:#dff9ed; transform:translateY(-2px); }
.level-choices span { display:block; color:var(--muted); font-size:.75rem; }
.atlas-links { display:grid; gap:6px; margin-top:15px; font-weight:750; }
.atlas-links a { text-underline-offset:4px; }
.lesson-card,.primary,.secondary,.install-button { transition:box-shadow .18s ease,transform .18s ease,background .18s ease; }
.lesson-card:hover { transform:translateY(-3px); }
.primary:active,.secondary:active,.install-button:active { transform:translateY(1px); }
.panel,.collection-group { border-color:var(--line); }
.collection-group,.read-along { background:#edf1ff; }
.guide-line,.teacher-note { border-color:#556da6; }
.portal-route { animation:page-enter .22s ease both; }
@keyframes menu-enter { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
@keyframes page-enter { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:translateY(0); } }
@media(max-width:620px){.atlas-hero{grid-template-columns:1fr}.header-actions{gap:5px 10px}.menu-tabs button{padding-inline:8px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
.topic-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.topic-choices a { display:flex; align-items:center; min-height:45px; background:#fff; padding:9px 10px; border:1px solid #ccd2f1; border-radius:10px; font-weight:750; text-decoration:none; transition:background .18s ease; }
.topic-choices a:hover { background:#dff9ed; }
.tile { min-height:104px; }
.lesson-art { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.tile:has(.lesson-art) .tile-label { color:#fff; background:#182341; padding:2px 7px; border-radius:5px; }

/* Classroom visual refresh */
:root {
  --ink:#262643; --muted:#55566b; --paper:#f7f6f1; --line:#dfddea;
  --dark:#242549; --green:#493a9e; --sage:#ece8ff; --accent:#e4f6a8;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}
h1,h2 { font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; letter-spacing:-.052em; }
h1,h2,h3 { text-wrap:balance; }
.top { background:#fff; border-bottom:1px solid var(--line); }
.brand { font-weight:750; }
.brand img { width:38px; height:38px; }
.brand small { font-weight:650; color:#64647b; }
.header-actions { font-weight:600; }
.header-actions a { text-decoration:none; }
.header-actions a:hover { text-decoration:underline; }
.install-button { background:#f0edff; color:#43338a; border:1px solid #dfd7fc; border-radius:999px; }
.install-button:hover { background:#e7e0ff; }
#portal-menu { background:#fff; color:var(--ink); }
.portal-inner { display:flex; flex-wrap:wrap; align-items:center; gap:8px 18px; padding-block:7px; }
.source-switch { gap:2px; background:#f3f1fa; padding:4px; border-radius:999px; }
.source-switch button,.menu-tabs button { font-weight:650; font-size:.88rem; }
.source-switch button { border:0; border-radius:999px; }
.source-switch [aria-pressed=true] { color:#43338a; background:#fff; box-shadow:0 1px 4px #28214822; }
.menu-tabs { margin:0; gap:4px; }
.menu-tabs button { border-radius:999px; }
.menu-tabs button:hover,.menu-tabs [aria-expanded=true] { color:#43338a; background:#f0edff; }
.menu-tabs span { color:#5843a5; }
#portal-menu .menu-sub { width:100%; margin:0; padding:5px 0 0; border-top:1px solid #ebe8f2; gap:4px; }
.menu-sub a { color:#514775; font-weight:600; border-radius:999px; }
.menu-sub a:hover,.menu-sub a[aria-current=page] { color:#43338a; background:#f0edff; }
.atlas-hero { gap:15px; margin-block:24px; grid-template-columns:minmax(0,1.55fr) minmax(0,1fr); }
.atlas-copy {
  min-height:265px; display:flex; align-items:flex-start; justify-content:center; flex-direction:column;
  background:radial-gradient(ellipse at 100% 10%,#6150ad 0%,transparent 61%),linear-gradient(133deg,#23254c,#363266);
  border-radius:25px; box-shadow:0 14px 30px #2723471e;
}
.atlas-copy h1 { font-size:clamp(2.35rem,5.1vw,4.15rem); line-height:1.02; margin:0; }
.atlas-copy p { margin:12px 0 17px; color:#f1eefe; }
.atlas-copy .primary { background:#e4f6a8; color:#25263d; border-radius:999px; }
.atlas-copy .primary:hover { background:#effbc9; }
.atlas-side { background:#fff; border:1px solid var(--line); border-radius:25px; }
.atlas-side h2 { margin-bottom:12px; }
.topic-choices a { min-height:50px; border-radius:12px; background:#eee9ff; color:#443583; border:1px solid transparent; font-size:.88rem; }
.topic-choices a:nth-child(3n+2) { background:#e8f5ee; color:#275942; }
.topic-choices a:nth-child(3n) { background:#faeddb; color:#654b33; }
.topic-choices a:hover { border-color:currentColor; }
.catalog-controls { background:#fff; padding:12px; border:1px solid var(--line); border-radius:15px; }
.catalog-controls label { font-weight:650; }
.catalog-controls input,.catalog-controls select { border-color:#d7d5e4; border-radius:9px; }
.filters { margin-block:13px; gap:6px; }
.filters button { min-height:36px; border-radius:999px; padding:5px 11px; font-weight:600; font-size:.86rem; }
.filters button[aria-pressed=true] { background:#493a9e; border-color:#493a9e; color:#fff; }
.cards { gap:14px; }
.lesson-card { border-radius:17px; box-shadow:0 3px 10px #2924470b; display:flex; flex-direction:column; }
.lesson-card:hover { border-color:#9a8bc9; box-shadow:0 10px 20px #29244718; }
.tile,.tile[data-kind] {
  min-height:105px; color:#4c4189; background:
  radial-gradient(ellipse at 88% 15%,#ffffffa0 0%,transparent 60%),linear-gradient(135deg,#e5dbff,#cfc0fa);
}
.tile[data-kind="Story"],.tile[data-kind="Everyday life"] { color:#28533d; background:linear-gradient(130deg,#dcf3e5,#b1dcc7); }
.tile[data-kind="Newspaper"],.tile[data-kind="TV news"] { color:#695036; background:linear-gradient(130deg,#fff1dc,#f1cea2); }
.tile-symbol { opacity:.32; right:10%; font-size:6.4rem; }
.tile-label,.card-source { position:relative; align-self:flex-end; padding:3px 7px; border-radius:999px; font-size:.74rem; color:#252343; background:#fffc; font-weight:700; }
.card-source { margin-inline-start:auto; }
.tile:has(.lesson-art) .tile-label { color:white; background:#242549; border-radius:999px; }
.card-body { display:flex; flex:1; flex-direction:column; }
.card-body h3 { font-size:1.07rem; }
.meta { font-weight:650; font-size:.79rem; }
.card-action { margin-top:auto; padding-top:8px; font-size:.83rem; font-weight:750; color:#493a9e; display:flex; justify-content:space-between; }
.card-action span { font-size:1.15rem; line-height:1; transition:transform .18s ease; }
.lesson-card:hover .card-action span { transform:translateX(2px); }
.primary,.secondary { border-radius:10px; font-weight:675; }
.primary { background:#493a9e; }
.primary:hover:not(:disabled) { background:#392c79; }
.secondary { color:#493a9e; border-color:#d9d1f1; }
.secondary:hover { background:#f0edff; }
.panel,.publisher { border-color:var(--line); border-radius:17px; box-shadow:0 4px 14px #2924470a; }
.collection-group,.read-along,.teacher-note { background:#f0ecfc; }
.resource-card { background:white; border:1px solid var(--line); padding:clamp(15px,3vw,22px); display:flex; flex-direction:column; gap:6px; }
.resource-card h2 { font-size:clamp(1.2rem,2vw,1.55rem); margin:0; }
.resource-card p { margin:0 0 6px; }
.resource-card .secondary { margin-top:auto; align-self:flex-start; }
.site-footer { align-items:center; padding-block:22px; gap:14px 22px; }
.footer-brand { display:flex; gap:8px; align-items:center; }
.footer-brand small { display:block; color:var(--muted); }
.site-footer nav,.policy-links { display:flex; flex-wrap:wrap; gap:10px 16px; }
.site-footer nav a,.policy-links a,.policy-back { font-weight:650; text-underline-offset:4px; }
.footer-made { margin:0; }
.footer-heart { color:#a22e58; }
.policy-page { max-width:850px; }
.policy-page h1 { margin-top:10px; }
.policy-page .panel section + section { margin-top:19px; border-top:1px solid var(--line); padding-top:14px; }
.policy-page h2 { font-size:1.22rem; margin-bottom:5px; }
.policy-page section p { margin:0; }
.policy-links { margin-top:18px; }
@media(max-width:620px){.atlas-hero{grid-template-columns:1fr}.portal-inner{gap:6px 12px}.source-switch{align-self:flex-start}.site-footer{justify-content:flex-start}}

/* Compact lesson workspace */
.lesson-intro { padding:15px 0 10px; }
.lesson-intro .back { margin-bottom:7px; font-size:.87rem; }
.lesson-intro .eyebrow { margin-bottom:4px; }
.lesson-intro h1 { font-size:clamp(1.8rem,4vw,2.65rem); margin:0; }
.lesson-intro > p:last-child { margin-top:4px; }
.section-tabs { display:flex; align-items:center; flex-wrap:wrap; gap:4px; }
.section-tabs button,.phrase-choices button {
  padding:6px 11px; min-height:36px; background:transparent; color:#48436b; border:1px solid transparent;
  border-radius:8px; font-size:.86rem; font-weight:700; transition:background .18s ease,color .18s ease,border-color .18s ease;
}
.section-tabs button:hover,.phrase-choices button:hover { background:#ece8ff; }
.section-tabs button[aria-pressed=true],.phrase-choices button[aria-pressed=true] { background:#493a9e; color:white; }
.lesson-tabs { background:#fff; padding:4px; border:1px solid var(--line); border-radius:11px; margin:0 0 10px; }
.lesson-workspace,.episode-workspace { display:grid; grid-template-columns:minmax(0,.77fr) minmax(0,1.23fr); gap:12px; align-items:start; }
.lesson-workspace > * { min-width:0; }
.lesson-workspace .panel,.episode-workspace .panel { margin-bottom:0; }
.lesson-player { padding:13px; }
.lesson-player h2 { font-size:1.13rem; line-height:1.23; margin:0 0 8px; }
.lesson-player .eyebrow { font-size:.74rem; margin:0 0 4px; }
.lesson-player audio,.lesson-player video,.lesson-player iframe { width:100%; display:block; margin:0 0 7px; }
.lesson-player .watch-for,.lesson-player .subtle { font-size:.86rem; margin:7px 0; }
.lesson-player .source-details { margin-top:8px; padding-top:6px; }
.lesson-player .source-actions { margin-top:4px; gap:5px 10px; }
.lesson-pane { padding:clamp(12px,2.5vw,20px); }
.lesson-pane h2,.episode-workspace h2 { font-size:clamp(1.18rem,2.6vw,1.55rem); margin:0 0 8px; }
.lesson-pane:focus:not(:focus-visible) { outline:none; }
.reading-tabs { border-bottom:1px solid var(--line); padding-bottom:6px; margin-bottom:10px; }
.reading-pane:not([hidden]),.lesson-pane:not([hidden]),.phrase-pane:not([hidden]) { animation:page-enter .19s ease both; }
.idea-list { margin:0 0 10px; }
.idea-list dt { font-weight:750; }
.idea-list dd { margin:2px 0 8px; }
.phrase-choices { display:flex; flex-wrap:wrap; gap:4px; margin:0 0 8px; }
.phrase-choices button { border-color:var(--line); }
.phrase-pane { background:#f4f0ff; padding:9px 11px; border-radius:9px; }
.phrase-pane p { margin:6px 0; }
.phrase-pane blockquote { margin:4px 0 6px; background:white; }
.lesson-pane summary,.lesson-player summary { list-style:none; cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
.lesson-pane summary::-webkit-details-marker,.lesson-player summary::-webkit-details-marker { display:none; }
.practice-passage { margin:0 0 8px; padding:0; border:0; }
.practice-next { margin-top:8px; }
.latest-select { display:block; }
.latest-view select { margin:4px 0 12px; width:min(100%,470px); padding:7px 10px; border:1px solid var(--line); border-radius:9px; background:white; color:var(--ink); }
.episode-workspace { grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr); }
@media(max-width:690px) {
  .lesson-workspace,.episode-workspace { grid-template-columns:minmax(0,1fr); }
  .lesson-tabs,.reading-tabs { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:thin; }
  .section-tabs button { white-space:nowrap; }
  .lesson-player video { max-height:36vh; object-fit:contain; background:#161627; }
}
@media(prefers-reduced-motion:reduce) {
  .reading-pane:not([hidden]),.lesson-pane:not([hidden]),.phrase-pane:not([hidden]) { animation:none; }
}

.bar,.portal-inner,.library,.lesson,.progress-view,.site-footer {
  max-width:none;
  padding-inline:clamp(14px,2.5vw,44px);
}
.atlas-hero { max-width:none; width:calc(100% - clamp(28px,5vw,88px)); }
.lesson-player .watch-for,.lesson-player .subtle,.presenter-intro p { font-size:1rem; line-height:1.55; }
.presenter-intro { margin-top:12px; padding:12px; background:#f4f0ff; border-radius:10px; }
.presenter-intro h3 { font-size:1rem; margin:0 0 4px; }
.presenter-intro p,.presenter-intro blockquote { margin:4px 0; }
.presenter-intro blockquote { background:white; font-size:.95rem; }
.transcript-dialog {
  box-sizing:border-box;
  width:calc(100% - clamp(12px,3vw,48px));
  height:94dvh;
  max-width:none;
  max-height:none;
  padding:0;
  background:white;
  color:var(--ink);
  border:1px solid var(--line);
  border-radius:14px;
}
.transcript-dialog[open] { display:grid; grid-template-rows:auto minmax(0,1fr); }
.transcript-dialog::backdrop { background:rgb(20 19 39 / .68); }
body:has(.transcript-dialog[open]) { overflow:hidden; }
.transcript-dialog header,.transcript-actions {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 16px;
}
.transcript-dialog header { justify-content:space-between; padding:8px 14px; }
.transcript-dialog header h2 { margin:0; }
.transcript-dialog iframe { width:100%; height:100%; border:0; }
@media(min-width:900px) {
  .lesson-workspace { grid-template-columns:minmax(320px, min(36%, 540px)) minmax(0,1fr); }
}

.broadcaster-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-bottom:16px; }
.broadcaster-card { display:grid; gap:5px; align-content:start; padding:12px; border-radius:12px; text-decoration:none; transition:transform .18s ease; }
.broadcaster-card:hover { transform:translateY(-2px); }
.broadcaster-card span { font-size:.85rem; line-height:1.35; }
.broadcaster-bbc { background:#fce5ea; color:#701c36; }
.broadcaster-voa { background:#e1edff; color:#183d71; }
.presenter-intro ol { padding-inline-start:1.4rem; }
.presenter-intro li + li { margin-top:8px; }
.presenter-intro li span { display:block; }
@media(max-width:420px) { .broadcaster-grid { grid-template-columns:1fr; } }
@media(prefers-reduced-motion:reduce) { .broadcaster-card { transition:none; } }

.menu-tabs a { display:inline-flex; align-items:center; min-height:36px; padding:5px 11px; border-radius:999px; color:inherit; font-weight:650; font-size:.88rem; text-decoration:none; transition:background .18s ease,color .18s ease; }
.menu-tabs a:hover,.menu-tabs a[aria-current="true"] { color:#43338a; background:#f0edff; }
@media(prefers-reduced-motion:reduce) { .menu-tabs a { transition:none; } }

/* Shared theme for browsing, playback and reading. */
:root {
  --ink:#15223a;
  --paper:#f3f8f9;
  --muted:#49586e;
  --line:#d5dee7;
  --dark:#101b2d;
  --green:#14604e;
  --sage:#d9f4e9;
  --accent:#a6f2cf;
  --surface:#fff;
}
body { background:var(--paper); }
.top { background:linear-gradient(112deg,#e1f6ed,#e4f2fb 54%,#efe9fa); color:var(--ink); }
#portal-menu { background:transparent; color:var(--ink); }
.top { border-bottom:1px solid #cedfe7; }
.bar { padding-block:13px; }
.brand small { color:#4c6079; }
.brand img { outline:1px solid #bdcfdd; }
.top .header-actions a,.top #portal-menu a { text-decoration:none; }
.header-actions a:hover { color:#14604e; }
.install-button { background:#ffffffb5; border-color:#c7dce6; color:#245571; }
.install-button:hover { background:#fff; }
.source-switch { background:#fff9; border:1px solid #cfe0e9; }
.source-switch button:not([aria-pressed="true"]) { color:#344963; }
.source-switch [aria-pressed="true"] { background:linear-gradient(120deg,#c4efdb,#cce9f8); color:#183d4d; box-shadow:0 2px 6px #304a6120; }
.menu-tabs a { padding-inline:13px; font-weight:650; border:1px solid transparent; }
.menu-tabs a:hover { color:#20495e; background:#ffffffa8; }
.menu-tabs a[aria-current="true"] { color:#21516a; background:linear-gradient(115deg,#fff,#e2edfc); border-color:#c8dbe9; box-shadow:0 2px 8px #30517814; }
#portal-menu .menu-sub { border-top:1px solid #cedfe7; padding-block:8px 4px; gap:7px; }
.menu-sub a { color:#3e536b; border:1px solid transparent; }
.menu-sub a:hover { background:#ffffffba; color:#214d66; }
.menu-sub a[aria-current="page"] { background:linear-gradient(110deg,#d6f3e6,#e3edff); border-color:#b7dcca; color:#214959; }
.top :focus-visible { outline:2px solid #35738d; outline-offset:3px; }

.atlas-copy {
  min-height:320px;
  position:relative;
  overflow:hidden;
  isolation:isolate;
  color:var(--ink);
  background:radial-gradient(ellipse at 100% 90%,#d7cff7,transparent 64%),linear-gradient(120deg,#d8f5e8,#d9eff9 62%,#e8e2fa);
  box-shadow:0 14px 32px #15243b24;
}
.atlas-copy::after {
  content:"";
  position:absolute;
  z-index:-1;
  inset:-55% -31% -65% 42%;
  pointer-events:none;
  background:repeating-radial-gradient(ellipse at center,transparent 0 24px,#507da031 25px 26px,transparent 27px 43px);
  transform:rotate(-25deg);
  mask-image:linear-gradient(90deg,transparent,#000 55%);
}
.atlas-copy h1 { max-width:15ch; font-weight:780; }
.atlas-copy p { color:#344c67; }
.atlas-copy .primary,.atlas-copy .primary:hover { background:#f6fffb; color:#1b524c; box-shadow:0 3px 10px #365c6322; }
.atlas-side,.catalog-controls { border-color:var(--line); box-shadow:0 5px 20px #15243b0d; }
.broadcaster-card { min-height:87px; padding:13px; }
.broadcaster-bbc { background:#f4e3ed; color:#612348; }
.broadcaster-voa { background:#e1eaff; color:#1b3d75; }
.topic-choices a,.topic-choices a:nth-child(n) { background:#edf2f8; color:#223c59; }
.filters button[aria-pressed="true"],.section-tabs button[aria-pressed="true"] { background:linear-gradient(113deg,#ccefe1,#dceaff); border-color:#accaD7; color:#1a4057; }
.primary { background:#21665f; color:#fff; }
.primary:hover:not(:disabled) { background:#19534e; }
.secondary { background:#e8f4ef; border:1px solid #c3ded3; color:#145644; }
.secondary:hover { background:#d5eee3; }
.card-action,.text-button { color:#145e4c; }
.lesson-card,.resource-card,.panel,.publisher { background:var(--surface); border-color:var(--line); }
.tile,.tile[data-kind] { min-height:128px; color:#1b4865; background:linear-gradient(135deg,#caeeef,#9dbbe8); }
.tile[data-kind="Story"],.tile[data-kind="Everyday life"] { color:#205342; background:linear-gradient(135deg,#d6f6df,#9dddc7); }
.tile[data-kind="Newspaper"],.tile[data-kind="TV news"] { color:#5b421e; background:linear-gradient(135deg,#fff1d5,#e8c58e); }
.lesson-card:hover,.resource-card:focus-within { border-color:#668ca3; box-shadow:0 12px 25px #203a5420; }
.resource-card { border-radius:18px; border-top:3px solid #6b9daf; min-height:170px; }
.resource-card .secondary { padding-inline:12px; }
.progress-view > h1 { margin-bottom:18px; }
.presenter-intro,.phrase-pane,.teacher-note,.guide-line,.read-along,.collection-group:not(.resource-card) { background:#eaf3f7; }
.site-footer nav a { text-decoration:none; }
.site-footer nav a:hover { color:var(--green); }
@media(max-width:620px) {
  .atlas-copy { min-height:240px; }
  .menu-tabs a { padding-inline:9px; }
  .tile,.tile[data-kind] { min-height:100px; }
}

/* Topic resources and guided lessons share the same column breakpoints. */
.cards,.collection-groups:has(> .resource-card) {
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:clamp(12px,1.5vw,22px);
}
.resource-card {
  --card-tint:#d9eefb;
  --card-wash:#e8f7ef;
  margin:0;
  padding:0 18px 18px;
  gap:10px;
  min-width:0;
  min-height:248px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:20px;
  box-shadow:0 4px 14px #203a540c;
  transition:transform .18s ease,box-shadow .18s ease;
}
.resource-card[data-publisher="bbc"] { --card-tint:#e8def8; --card-wash:#fbeef1; }
.resource-card > .eyebrow {
  display:flex;
  align-items:flex-end;
  min-height:90px;
  padding:16px 18px;
  margin:0 -18px 3px;
  background:
    radial-gradient(ellipse at 100% 0%,#fff9,transparent 63%),
    linear-gradient(123deg,var(--card-wash),var(--card-tint));
  color:#244761;
  font-size:.72rem;
}
.resource-card h2 { overflow-wrap:anywhere; }
.resource-card > p:not(.eyebrow) { color:var(--muted); }
.resource-card .secondary { border-radius:999px; min-height:42px; }
@media(hover:hover) {
  .resource-card:hover { transform:translateY(-3px); box-shadow:0 12px 24px #203a5419; }
}
@media(max-width:1199px) {
  .cards,.collection-groups:has(> .resource-card) { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:859px) {
  .cards,.collection-groups:has(> .resource-card) { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:519px) {
  .cards,.collection-groups:has(> .resource-card) { grid-template-columns:minmax(0,1fr); }
  .resource-card { min-height:220px; }
  .resource-card > .eyebrow { min-height:70px; }
}

.latest-view .episode-workspace { display:block; max-width:880px; }
.latest-view .show-player { height:200px; margin-block:8px; }
.episode-practice { margin-top:12px; padding:9px 13px; background:#eaf5f1; border:1px solid #d6e9e2; border-radius:12px; font-size:.9rem; }
.episode-practice summary { cursor:pointer; color:#185a4a; font-weight:700; }
.episode-practice ol { padding-inline-start:22px; margin-block:8px; }
@media(max-width:520px) { .latest-view .show-player { height:245px; } }

.latest-episodes { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.latest-view .episode-panel {
  margin:0;
  padding:clamp(12px,2vw,20px);
  background:linear-gradient(145deg,#fff,#f1f9f7);
}
.latest-episodes .episode-panel { display:flex; flex-direction:column; align-items:stretch; }
.latest-episodes .episode-panel h2 { margin:0; font-size:clamp(1.05rem,2vw,1.4rem); }
.latest-episodes .episode-panel .secondary { align-self:flex-start; margin-top:auto; }
.podcast-actions { display:flex; flex-wrap:wrap; gap:8px; }
@media(max-width:760px) { .latest-episodes { grid-template-columns:minmax(0,1fr); } }

.lesson-intro-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px 14px; margin-bottom:8px; }
.lesson-intro-actions .back { margin:0; }
.save-lesson { border-radius:999px; }
.save-lesson[aria-pressed="true"] { background:#d3efdf; border-color:#9ccdb8; }
.study-overview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:20px; }
.study-overview > div { display:grid; align-content:start; gap:4px; padding:clamp(10px,2vw,18px); border:1px solid var(--line); border-radius:16px; background:linear-gradient(140deg,#fff,#edf8f5); }
.study-overview span { color:var(--muted); font-size:.85rem; }
.study-overview strong { font-size:clamp(1.2rem,3vw,1.8rem); }
.study-overview progress { height:8px; }

.lesson-sections { min-width:0; }
.lesson-workspace .reading-tabs { flex-wrap:wrap; }
.listening-opening { overflow-wrap:anywhere; }
.listening-opening ol { padding-inline-start:1.5rem; }
.listening-opening li + li { margin-top:.55rem; }
.listening-opening li span { display:block; }
@media(min-width:900px) {
  .lesson-workspace { grid-template-columns:minmax(0,1.16fr) minmax(0,1fr); gap:clamp(14px,2vw,26px); }
}
@media(min-width:900px) and (min-height:720px) {
  .lesson-player:not(:has(video)) { position:sticky; top:14px; }
}
@media(max-width:690px) {
  .lesson-workspace .reading-tabs { overflow:visible; }
}

/* Give portrait tablets the same full-width player and reading flow as phones. */
@media(max-width:899px), (max-width:1100px) and (orientation:portrait) {
  .lesson-workspace { grid-template-columns:minmax(0,1fr); }
  .lesson-workspace .lesson-player { position:static; }
}

/* Let the home intro and discovery panel breathe on portrait tablets. */
@media(max-width:1000px), (max-width:1100px) and (orientation:portrait) {
  .atlas-hero { grid-template-columns:minmax(0,1fr); }
  .atlas-copy { min-height:220px; }
  .atlas-side { padding:clamp(16px,3vw,26px); }
  .atlas-side .broadcaster-grid { gap:10px; }
  .atlas-side .broadcaster-card { min-height:0; padding:14px; gap:4px; }
}
@media(min-width:500px) and (max-width:1100px) {
  .atlas-side .topic-choices { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .atlas-side .topic-choices a { min-height:44px; }
}
