/* Story reader as a player (see reader.js). Core stories use the light page colours, series episodes the dark ott ones. */
.rd-bar{--rd-acc:#145C63;--rd-acc-tx:#fff;--rd-nav:#fff;--rd-nav-tx:#16202C;--rd-nav-bd:rgba(20,92,99,.28);--rd-tr:#E3E7EA;--rd-tx:#4B5563;
  display:flex;align-items:center;gap:14px;margin:16px 0 0;font-family:Inter,system-ui,sans-serif}
body.ott .rd-bar{--rd-acc:#F4A340;--rd-acc-tx:#16202C;--rd-nav:rgba(255,255,255,.08);--rd-nav-tx:#fff;--rd-nav-bd:rgba(255,255,255,.2);--rd-tr:#2A3240;--rd-tx:#C9CED6}
.rd-nav{flex:none;width:56px;height:56px;border-radius:50%;display:grid;place-items:center;padding:0;cursor:pointer;background:var(--rd-nav);color:var(--rd-nav-tx);border:1.5px solid var(--rd-nav-bd);transition:transform .12s,opacity .2s,background .2s}
.rd-nav:hover:not(:disabled){background:var(--rd-acc);color:var(--rd-acc-tx);border-color:transparent}
.rd-nav:active:not(:disabled){transform:scale(.94)}
.rd-nav:disabled{opacity:.3;cursor:default}
.rd-bar.rd-last .rd-next{opacity:.3}
.rd-mid{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;align-items:center;gap:10px}
.rd-listen{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:56px;min-width:180px;padding:0 30px;border:0;border-radius:999px;cursor:pointer;
  background:var(--rd-acc);color:var(--rd-acc-tx);font:700 19px/1 Inter,system-ui,sans-serif;box-shadow:0 8px 22px rgba(0,0,0,.18);transition:transform .12s}
.rd-listen[hidden]{display:none}
.rd-listen:active{transform:scale(.97)}
.rd-listen .rd-i-stop,.rd-listen[aria-pressed="true"] .rd-i-play{display:none}
.rd-listen[aria-pressed="true"] .rd-i-stop{display:block}
.rd-listen[aria-pressed="true"]{background:#16202C;color:#fff;box-shadow:inset 0 0 0 2px var(--rd-acc)}
.rd-nav:focus-visible,.rd-listen:focus-visible,.rd-resume button:focus-visible{outline:3px solid var(--rd-acc,#F4A340);outline-offset:3px}
.rd-prog{width:100%;max-width:380px;display:flex;flex-direction:column;align-items:center;gap:7px}
.rd-count{font:600 15px/1.2 Inter,system-ui,sans-serif;color:var(--rd-tx);letter-spacing:.01em}
.rd-track{display:block;width:100%;height:6px;border-radius:3px;background:var(--rd-tr);overflow:hidden}
.rd-track i{display:block;height:100%;width:0;border-radius:3px;background:var(--rd-acc);transition:width .3s}

/* "Continue from page N" */
.rd-resume{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 14px;font-family:Inter,system-ui,sans-serif}
.rd-resume button{min-height:52px;padding:0 22px;border-radius:999px;font:700 17px/1 Inter,system-ui,sans-serif;cursor:pointer}
.rd-cont{background:#145C63;color:#fff;border:0}
.rd-over{background:transparent;color:#145C63;border:1.5px solid rgba(20,92,99,.35)}
body.ott .rd-cont{background:#F4A340;color:#16202C}
body.ott .rd-over{color:#fff;border-color:rgba(255,255,255,.25)}
.rd-cont::before{content:"\25B6";font-size:.75em;margin-right:9px;vertical-align:1px}

/* one Listen control: the hero's own Listen button moves into the player */
html.rd-on .cta-row .cta-listen{display:none!important}

/* ---- paged reader (tablet and desktop, and core stories on phones) ---- */
.rd-stage{position:relative;scroll-margin-top:84px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;min-height:min(60vh,540px);border-radius:22px;overflow:hidden;
  background:#FFFDF8;box-shadow:0 1px 0 rgba(0,0,0,.04),0 14px 34px rgba(22,32,44,.10);border:1px solid #EDE6D8}
.rd-stage.rd-nopic{grid-template-columns:1fr}
/* core stories: the book is the card, so the story column loses its own card frame and gets a little wider */
main>article.story.rd-paged:not(.ot-story){background:none!important;box-shadow:none!important;border:0!important;padding:0!important;max-width:980px;width:100%;box-sizing:border-box}
/* the book's spine */
.rd-stage:not(.rd-nopic)::after{content:"";position:absolute;top:0;bottom:0;left:50%;width:28px;margin-left:-14px;pointer-events:none;background:linear-gradient(90deg,rgba(0,0,0,0),rgba(0,0,0,.07) 50%,rgba(0,0,0,0))}
.rd-pic{display:flex;align-items:center;justify-content:center;padding:22px;background:#F6F1E6;min-width:0}
.rd-pic img,.rd-pic svg{display:block;max-width:100%;max-height:min(56vh,500px);width:auto;height:auto;border-radius:14px;object-fit:contain}
.rd-pic svg{width:100%;height:auto;max-width:380px}
.rd-page{display:flex;flex-direction:column;justify-content:center;padding:30px 40px;min-width:0}
article.rd-paged .rd-page>section{display:none;border:0!important;padding:0!important;margin:0!important;background:none!important;box-shadow:none!important}
article.rd-paged .rd-page>section.rd-cur{display:block;animation:rd-in .28s ease}
article.rd-paged .rd-page>section>h2{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
article.rd-paged .rd-page p{font-size:clamp(20px,1.7vw,24px);line-height:1.6;margin:0}
@keyframes rd-in{from{opacity:0;transform:translateX(10px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){article.rd-paged .rd-cur{animation:none!important}.rd-track i{transition:none}}
/* episodes: dark book */
body.ott .rd-stage{background:#151B25;border-color:rgba(255,255,255,.08);box-shadow:0 18px 40px rgba(0,0,0,.35)}
body.ott .rd-pic{background:#0F141C}
body.ott .rd-stage:not(.rd-nopic)::after{background:linear-gradient(90deg,rgba(0,0,0,0),rgba(0,0,0,.35) 50%,rgba(0,0,0,0))}
body.ott article.rd-paged .ot-pages{display:block;margin:0}
body.ott article.rd-paged .ot-pages>li,body.ott article.rd-paged .rd-page>.ot-moral,body.ott article.rd-paged .rd-page>.ot-ask{display:none}
body.ott article.rd-paged .ot-pages>li.rd-cur{display:block;background:none;border:0;padding:0;animation:rd-in .28s ease}
body.ott article.rd-paged .ot-pages>li .ot-pg{display:none}
body.ott article.rd-paged .rd-page>.ot-moral.rd-cur,body.ott article.rd-paged .rd-page>.ot-ask.rd-cur{display:block;margin:0 0 16px;animation:rd-in .28s ease}
body.ott article.rd-paged .rd-page>.ot-moral.rd-cur span{display:block;font-size:clamp(22px,2vw,26px);line-height:1.45;margin-top:6px}
body.ott article.rd-paged .rd-page>.ot-ask.rd-cur{font-size:19px;line-height:1.55}
/* episodes on desktop: the reader takes the full width, the colouring sheet sits under it */
@media (min-width:761px){
  body.ott .ot-two:has(article.rd-paged){display:block}
  body.ott .ot-two:has(article.rd-paged)>article.rd-paged{max-width:none;width:auto}
  body.ott .ot-two:has(article.rd-paged)>.ot-side{max-width:none;width:auto;margin-top:28px;position:static}
  /* colouring sheet under the reader: name and actions on the left, the picture on the right */
  body.ott .ot-two:has(article.rd-paged) .ot-sheet{display:grid;grid-template-columns:minmax(0,1fr) minmax(200px,300px);column-gap:36px;align-content:start;padding:28px}
  body.ott .ot-two:has(article.rd-paged) .ot-sheet>*{grid-column:1}
  body.ott .ot-two:has(article.rd-paged) .ot-sheet>.pic,body.ott .ot-two:has(article.rd-paged) .ot-sheet>img{grid-column:2;grid-row:1/span 8;margin:0;align-self:start;width:100%;height:auto;max-width:300px}
  body.ott .ot-two:has(article.rd-paged) .ot-sheet>.ot-btns{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px;margin-top:18px;align-self:start}
  body.ott .ot-two:has(article.rd-paged) .ot-sheet>.ot-btns>*{min-height:56px;margin:0;width:auto}
}
/* iPad portrait and narrow windows: picture on top, then the page, then the controls, sized to one screen */
@media (max-width:1023px) and (orientation:portrait),(max-width:760px){
  .rd-stage{grid-template-columns:1fr;min-height:0}
  .rd-stage:not(.rd-nopic)::after{display:none}
  .rd-pic{padding:16px}
  .rd-pic img,.rd-pic svg{max-height:38svh}
  .rd-pic svg{max-width:min(100%,46svh)}
  .rd-page{padding:22px 26px 24px;min-height:20svh;justify-content:flex-start}
}
@media (min-width:761px) and (max-width:1366px){
  article.rd-paged .rd-page p{font-size:21px}
}
/* phones (core stories): smaller controls, same layout */
@media (max-width:760px){
  .rd-bar{gap:10px;margin-top:12px}
  .rd-nav{width:52px;height:52px}
  .rd-listen{min-height:52px;min-width:0;padding:0 22px;font-size:17px}
  .rd-page{padding:18px 18px 20px}
  article.rd-paged .rd-page p{font-size:19px}
  .rd-resume button{min-height:48px;font-size:16px;padding:0 18px}
}

/* ---- phones: the episode swipe viewer gets the same controls under it ---- */
@media (max-width:760px){
  html.rd-on body.ott .pp-dots{display:none}
  body.ott .rd-bar{flex:none;margin:8px 0 0;gap:8px;width:100%;align-self:stretch;box-sizing:border-box}
  body.ott .rd-bar .rd-nav{width:48px;height:48px}
  body.ott .rd-bar .rd-mid{flex-direction:row;gap:10px}
  body.ott .rd-bar.rd-has-listen .rd-prog{width:auto;flex:1 1 auto;min-width:0}
  body.ott .rd-bar .rd-listen{min-height:48px;padding:0 14px;font-size:15px;flex:none;gap:7px}
  body.ott .rd-bar .rd-count{font-size:13px;white-space:nowrap}
  body.ott .rd-bar .rd-resume{flex:1 1 auto;min-width:0;margin:0}
  body.ott .rd-bar.rd-has-rs .rd-prog{display:none}
  body.ott .rd-bar .rd-resume .rd-cont{width:100%;min-height:48px;font-size:15px;padding:0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.ott .rd-bar .rd-resume .rd-cont::before{margin-right:6px}
}
/* landscape tablets on the phone layout (tablet.js): picture beside the text, like an open book */
@media (max-width:760px) and (orientation:landscape) and (min-width:600px){
  body.ott .ot-story .ot-pages li{flex-direction:row!important;align-items:center}
  body.ott .ot-story .ot-pages li .pp-artw{flex:0 0 46%!important;align-self:stretch}
  body.ott .ot-story .ot-pages li .pp-tx{flex:1 1 auto;align-content:center}
}

/* episodes, phones: the child's-name box gets its visible label back (beside the box, so the screen still fits) */
@media (max-width:760px){
  body.ott .ot-side .ot-sheet .nm{display:flex;align-items:center;gap:10px;margin:0 0 8px}
  body.ott .ot-side .ot-sheet .nm span{display:block;flex:none;margin:0;font:600 14px/1.2 Inter,system-ui,sans-serif;color:#E8E4DA}
  body.ott .ot-side .ot-sheet .nm input{flex:1 1 auto;min-width:0;height:48px;min-height:48px}
}
