/* Story of the Week (trial/story.js, src/story-client.js). Uses the site colour tokens, so it follows the light/dark theme. */
main.st{max-width:1080px;margin:14px auto 28px;padding:0 16px;box-sizing:border-box;color:var(--ink);font-family:Nunito,system-ui,sans-serif}
main.st *{box-sizing:border-box}
main.st h1,main.st h2,main.st h3{font-family:Fredoka,Nunito,sans-serif;font-weight:600;margin:0;line-height:1.15;color:var(--ink)}
.st-top{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.st-tt{flex:1 1 260px;min-width:0}
.st-tt small{display:block;font-weight:800;font-size:13px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-soft)}
.st-tt h1{font-size:clamp(26px,5vw,38px);margin-top:2px}
.st-tt p{margin:8px 0 0;color:var(--ink-soft);max-width:60ch;line-height:1.5}
.st-up{display:inline-block;font-weight:800;font-size:14px;color:var(--brand);text-decoration:none;margin-bottom:4px}
.st-listen{display:inline-flex;align-items:center;gap:6px;border:2px solid var(--line);background:var(--sheet);color:var(--ink);border-radius:999px;padding:10px 18px;min-height:46px;font:inherit;font-weight:800;font-size:16px;cursor:pointer}
.st-listen[aria-pressed="true"]{background:var(--brand);border-color:var(--brand);color:#fff}
.st-path{display:flex;gap:6px;overflow-x:auto;padding:4px 2px 10px;scrollbar-width:none}
.st-path::-webkit-scrollbar{display:none}
.st-path a{flex:0 0 auto;width:38px;height:38px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-family:Fredoka,Nunito,sans-serif;font-weight:600;font-size:16px;text-decoration:none;color:var(--ink-soft);background:var(--sheet);border:2px solid var(--line)}
.st-path a.ok{background:#3E9B5F;border-color:#3E9B5F;color:#fff}
.st-path a[aria-current]{outline:3px solid var(--brand);outline-offset:2px;color:var(--ink)}
.st-path .st-pfin{width:auto;padding:0 14px;border-radius:999px;color:#B07800}
.st-novoice{font-size:14px;color:var(--ink-soft);margin:0 0 8px}
/* one page of the story */
.st-sc{display:grid;gap:14px;margin-bottom:22px}
.st-fig{margin:0;border-radius:22px;overflow:hidden;border:2px solid var(--line);background:#E6F6FC;line-height:0}
.st-art{display:block;width:100%;height:auto}
.st-body{background:var(--sheet);border:2px solid var(--line);border-radius:22px;padding:16px 18px 18px;min-width:0}
.st-subs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.st-chip{font-size:12px;font-weight:800;border-radius:999px;padding:3px 10px;background:hsl(var(--h) 70% 92%);color:hsl(var(--h) 60% 28%)}
.st-h{font-size:24px;margin-bottom:6px}
.st-x{font-size:19px;line-height:1.65;margin:0 0 14px}
.st-w{border-radius:6px;transition:background .15s}
.st-w.on{background:#FFE58A;color:#2A2140}
.st-nw{font:inherit;font-weight:800;color:hsl(222 74% 40%);background:hsl(222 90% 95%);border:0;border-bottom:3px dotted hsl(222 74% 55%);border-radius:6px;padding:0 4px;cursor:pointer;line-height:inherit}
.st-nw.pulse{animation:st-pop .5s}
.st-task{border-top:2px dashed var(--line);padding-top:12px}
.st-q{margin:0 0 10px;font-size:17px;line-height:1.45}
.st-q b{color:#B07800}
.st-opts{display:flex;flex-wrap:wrap;gap:8px}
.st-o{flex:1 1 150px;min-height:52px;border:2px solid var(--line);background:var(--sheet);color:var(--ink);border-radius:16px;padding:10px 14px;font:inherit;font-weight:800;font-size:17px;cursor:pointer;text-align:center}
.st-o:hover{border-color:var(--brand)}
.st-o.good{background:#E3F5E8;border-color:#3E9B5F;color:#1F6B3A}
.st-o.no{opacity:.55}
.st-o.bad{animation:st-shake .35s}
.st-o:disabled{cursor:default}
.st-task .pic{margin:6px 0 0}
.st-fb{min-height:24px;margin:10px 0 0;font-weight:800;font-size:17px}
.st-fb.ok{color:#2E8A50}.st-fb.no{color:#C8333B}
.st-sc.solved .st-path{}
/* bottom navigation */
.st-nav{display:none}
.st-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:0;background:var(--brand);color:#fff;border-radius:16px;padding:12px 22px;min-height:52px;font:inherit;font-weight:800;font-size:17px;cursor:pointer;text-decoration:none}
.st-btn:disabled{opacity:.4;cursor:default}
.st-ghost{background:var(--sheet);color:var(--ink);border:2px solid var(--line)}
.st-skip{border:0;background:none;color:var(--ink-soft);font:inherit;font-weight:700;font-size:15px;text-decoration:underline;cursor:pointer;padding:10px}
/* finale */
.st-fin{background:var(--sheet);border:2px solid var(--line);border-radius:22px;padding:20px 18px}
.st-finhead{text-align:center;display:grid;justify-items:center;gap:6px}
.st-finhead p{margin:0;color:var(--ink-soft)}
.st-trophy{width:76px;height:76px;border-radius:50%;background:#FFD95A;color:#B07800;display:flex;align-items:center;justify-content:center;font-size:44px;line-height:1}
.st-score{font-size:18px}.st-score b{font-family:Fredoka,Nunito,sans-serif;font-size:30px;color:#B07800}
.st-fin h3{font-size:20px;margin:20px 0 10px}
.st-fq{margin:0;padding-left:22px;display:grid;gap:14px}
.st-fq p{margin:0 0 8px;font-weight:700;font-size:17px}
.st-les{list-style:none;margin:0;padding:0;display:grid;gap:8px;grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}
.st-les a{display:block;padding:10px 12px;border-radius:14px;border:2px solid hsl(var(--h) 60% 85%);background:hsl(var(--h) 80% 97%);color:var(--ink);text-decoration:none;font-weight:700;line-height:1.3}
.st-les small{display:block;font-size:12px;font-weight:800;color:hsl(var(--h) 55% 35%)}
.st-endnav{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px;justify-content:center}
.st-party .st-trophy{animation:st-pop .8s 2}
/* with JS: one page at a time */
.st-js .st-sc{display:none}
.st-js .st-sc.on{display:grid}
.st-js .st-nav{display:flex;align-items:center;justify-content:space-between;gap:8px;position:sticky;bottom:0;padding:10px 0 calc(10px + env(safe-area-inset-bottom,0px));background:linear-gradient(transparent,var(--paper,var(--sheet)) 30%)}
.st-js .st-sc.on{animation:st-in .35s ease-out}
@media (min-width:900px){
  .st-sc{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);align-items:start}
  .st-fig{position:sticky;top:12px}
  .st-fin{grid-template-columns:1fr}
}
/* the list of weeks */
.st-cards{list-style:none;margin:16px 0 0;padding:0;display:grid;gap:12px;grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}
.st-card a,.st-card.soon{display:grid;gap:4px;padding:8px 8px 12px;border-radius:20px;border:2px solid var(--line);background:var(--sheet);color:var(--ink);text-decoration:none;height:100%}
.st-card a:hover{border-color:var(--brand)}
.st-card.seen a{border-color:#3E9B5F}
.st-thumb{display:block;border-radius:14px;overflow:hidden;line-height:0}
.st-card .st-cw{font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-soft);padding:0 4px}
.st-card b{font-family:Fredoka,Nunito,sans-serif;font-weight:600;font-size:18px;padding:0 4px;line-height:1.2}
.st-cs{font-weight:800;color:#B07800;padding:0 4px;min-height:1.2em}
.st-card.soon{opacity:.55;padding:14px;min-height:90px;align-content:center}
.st-about{margin:22px 0 0;color:var(--ink-soft);line-height:1.6;max-width:70ch}
@keyframes st-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes st-pop{0%,100%{transform:scale(1)}50%{transform:scale(1.15)}}
@keyframes st-shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}
@media (prefers-reduced-motion:reduce){.st *{animation:none!important;transition:none!important}}

/* voice picker */
.st-aud{display:flex;gap:8px;flex-wrap:wrap}
.st-vbtn{display:inline-flex;align-items:center;gap:6px;border:2px solid var(--line);background:var(--sheet);color:var(--ink);border-radius:999px;padding:10px 16px;min-height:46px;font:inherit;font-weight:800;font-size:15px;cursor:pointer}
.st-vbtn[aria-expanded="true"]{border-color:var(--brand);color:var(--brand)}
.st-vp{flex:1 1 100%;background:var(--sheet);border:2px solid var(--line);border-radius:20px;padding:14px 16px;display:flex;flex-direction:column;gap:8px}
.st-vh{margin:0;font-weight:800;font-size:13px;letter-spacing:.05em;text-transform:uppercase;color:var(--ink-soft)}
.st-vl{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:8px}
.st-vr{display:flex;gap:6px}
.st-vo{flex:1;min-width:0;text-align:left;border:2px solid var(--line);background:transparent;color:var(--ink);border-radius:14px;padding:8px 12px;min-height:46px;font:inherit;font-weight:800;cursor:pointer}
.st-vo small{display:block;font-weight:600;font-size:12px;color:var(--ink-soft)}
.st-vo[aria-checked="true"]{border-color:var(--brand);background:color-mix(in srgb,var(--brand) 12%,transparent)}
.st-vo[aria-checked="true"]::before{content:"✓ ";color:var(--brand)}
.st-vt{flex:0 0 46px;border:2px solid var(--line);background:transparent;color:var(--ink);border-radius:14px;font-size:16px;cursor:pointer}
.st-vs{display:flex;gap:6px;flex-wrap:wrap}
.st-vs button{border:2px solid var(--line);background:transparent;color:var(--ink);border-radius:999px;padding:8px 16px;min-height:44px;font:inherit;font-weight:800;cursor:pointer}
.st-vs button[aria-checked="true"]{background:var(--brand);border-color:var(--brand);color:#fff}
.st-vnone{margin:0;font-size:15px;line-height:1.5;color:var(--ink-soft)}
.st-vbtn:focus-visible,.st-vo:focus-visible,.st-vt:focus-visible,.st-vs button:focus-visible{outline:3px solid var(--brand);outline-offset:2px}

/* Grade 2+: the question of the week, answered by the story */
.st-puz{margin:0 0 10px;background:color-mix(in srgb,#F2C14E 22%,var(--sheet));border:2px dashed #E3B341;border-radius:16px;padding:10px 14px;font-size:17px;line-height:1.45}
.st-puz b{color:#9A5B00;margin-right:4px}

/* Grade 3+: mystery clues (shown once the page's task is solved) and the diary look */
.st-clue{display:none;margin:10px 0 0;background:color-mix(in srgb,#7C5CFF 12%,var(--sheet));border-left:4px solid #7C5CFF;border-radius:10px;padding:8px 12px;font-size:16px;line-height:1.45}
.st-sc.solved .st-clue{display:block}
.st-clue b{color:#5B3FD6}
.st-clues{margin:0 0 14px;padding-left:22px;line-height:1.55}
.st-diary .st-body{background-image:repeating-linear-gradient(to bottom,transparent 0,transparent 31px,color-mix(in srgb,#5B8DEF 22%,transparent) 31px,color-mix(in srgb,#5B8DEF 22%,transparent) 32px);background-color:var(--sheet);border-left:6px solid #E46A6A}
.st-diary .st-x{line-height:32px;font-size:18px}
.st-diary .st-h{font-family:"Caveat","Comic Sans MS",Fredoka,cursive}

/* Grade 4: reporter format — facts and the newspaper clipping in the finale */
.st-paper .st-clue{border-left-color:#1E55C8;background:color-mix(in srgb,#1E55C8 9%,var(--sheet))}.st-paper .st-clue b{color:#1E55C8}
.st-news{margin:6px 0 18px;background:#FBF8EF;color:#1F1A14;border:1px solid #D9CFB8;border-radius:6px;padding:14px 18px 16px;box-shadow:0 2px 0 #D9CFB8;font-family:Georgia,"Times New Roman",serif}
.st-news .st-mast{margin:0 0 8px;padding-bottom:6px;border-bottom:3px double #1F1A14;font-weight:700;letter-spacing:.12em;text-transform:uppercase;font-size:13px;text-align:center}
.st-news h3{font-family:Georgia,"Times New Roman",serif;font-size:24px;color:#1F1A14;margin:0 0 8px}
.st-news p{margin:0 0 6px;line-height:1.55;font-size:17px}.st-news .st-by{font-style:italic;color:#5A5040;margin:0}
.st-news p,.st-news h3{max-width:none;text-align:left}.st-news .st-mast{text-align:center}

/* Grade 5+: teen chat format — dark "app" panel inside the site page */
.st-teen{--tc-bg:#0F1220;--tc-panel:#171B2E;--tc-panel2:#1F2440;--tc-line:#2C3256;--tc-fg:#EEF0FA;--tc-mute:#9AA2C7;--tc-them:#262C4D;--tc-me:#3D5AFE}
.st-teen .st-sc{background:var(--tc-bg);border-radius:24px;padding:12px;color:var(--tc-fg)}
.st-teen .st-sc.st-fin{background:var(--sheet);color:var(--ink)}
.tc-chat{background:var(--tc-panel);border:1px solid var(--tc-line);border-radius:20px;padding:14px;display:flex;flex-direction:column;gap:8px;min-width:0}
.tc-day{align-self:center;margin:2px 0 4px;font:700 12px ui-monospace,monospace;color:var(--tc-mute);background:var(--tc-panel2);border-radius:999px;padding:3px 12px}
.tc-m{display:flex;gap:8px;align-items:flex-end;max-width:92%}
.tc-m.me{align-self:flex-end;flex-direction:row-reverse}
.tc-av{flex:0 0 auto;width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:12px;color:#11131F}
.tc-b{background:var(--tc-them);color:var(--tc-fg);border-radius:18px 18px 18px 6px;padding:8px 12px;min-width:0}
.tc-m.me .tc-b{background:var(--tc-me);border-radius:18px 18px 6px 18px}
.tc-b i{display:block;font-style:normal;font-size:12px;font-weight:800;margin-bottom:2px}
.st-teen .tc-b .st-x{display:block;font-size:16.5px;line-height:1.5;margin:0;color:inherit}
.st-teen .st-body{background:var(--tc-panel);border-color:var(--tc-line);color:var(--tc-fg)}
.st-teen .st-h,.st-teen .st-q{color:var(--tc-fg)}.st-teen .st-q b{color:#FFB938}
.st-teen .st-o{background:var(--tc-panel2);color:var(--tc-fg);border-color:var(--tc-line)}
.st-teen .st-nw{background:rgba(255,185,56,.16);color:#FFD27A}
.st-teen .st-w.on{background:#FFE58A;color:#2A2140}
.st-teen .st-clue{background:rgba(61,220,151,.12);border-left-color:#3DDC97;color:var(--tc-fg)}.st-teen .st-clue b{color:#3DDC97}
.st-teen .st-sc.solved .tc-lk{filter:hue-rotate(90deg)}
.st-teen .st-fb.ok{color:#3DDC97}.st-teen .st-fb.no{color:#FF5C7A}
.st-teen .st-o.good{background:rgba(61,220,151,.18);border-color:#3DDC97;color:#3DDC97}.st-teen .st-o.bad{border-color:#FF5C7A;color:#FF9DB0}
.st-teen .st-h{border:0}

/* classroom mode (📺): the story fills the screen in big type; arrows/clicker turn pages */
html.st-class{overflow:hidden}
html.st-class main.st{position:fixed;inset:0;z-index:9999;margin:0;max-width:none;width:100%;height:100%;overflow:auto;background:var(--paper,#fff);padding:18px 3vw 90px}
html.st-class .st.st-teen{background:#0F1220}
html.st-class .st-tt h1{font-size:clamp(32px,4vw,56px)}
html.st-class .st-x{font-size:clamp(24px,2.6vw,38px);line-height:1.55}
html.st-class .st-teen .tc-b .st-x{font-size:clamp(22px,2.2vw,32px)}
html.st-class .st-h{font-size:clamp(26px,2.8vw,40px)}
html.st-class .st-q,html.st-class .st-o,html.st-class .st-fb,html.st-class .st-clue{font-size:clamp(20px,2vw,30px)}
html.st-class .st-o{min-height:64px}
html.st-class .st-sc{gap:2vw}
html.st-class .st-nav{position:fixed;left:0;right:0;bottom:0;z-index:10000;background:inherit;padding:10px 3vw}
html.st-class .st-novoice,html.st-class .st-vp{display:none}
.st-clsb[aria-pressed="true"]{border-color:var(--brand);color:var(--brand)}
