/* Additions from the accessibility and copy pass (Oct 15), kept apart from style.css, which another pass owns.
   Uses style.css's tokens; fold these into style.css whenever it's convenient. Also linked by /transcripts/*. */

/* Headings that became h1 for their view (consent, postpone, the end screen, the Now block) keep their h2 size. */
.consent h1,.postpone h1,.end h1,.now-block h1{font-size:var(--step-4);line-height:var(--lh-heading)}
/* The lesson part name is now an h2 (focus comes back to it inside a lesson); it keeps its small-caps label look. */
h2#partName{font-family:var(--body);line-height:var(--lh-snug)}
h1[tabindex="-1"]:focus:not(:focus-visible),h2[tabindex="-1"]:focus:not(:focus-visible){outline:none}

/* Lesson bar: Leave, then the transcript link. */
.sbar-left{display:flex;align-items:center;gap:18px;flex-wrap:wrap}
.transcript-link,.link.transcript{color:var(--muted);font-size:var(--step--2)}
.link.transcript{justify-self:start}

/* Under the answer box: where an answer goes; the note beside Speak. */
.answer-links .where{color:var(--muted);font-size:var(--step--2)}

/* Under Start in attention training: practices that don't need sound. */
.att-alt .link{font-size:inherit}

/* Settings: the two "move on" choices. */
.opt-group{border:0;margin:0;padding:0;min-width:0;display:grid;gap:8px}

/* Transcript pages (/transcripts/*.html) */
.transcript p{margin:0}
.transcript .t-part{display:grid;gap:14px;padding-top:6px}
.transcript nav ol{margin:0}
.transcript .t-intro{display:grid;gap:8px;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
.transcript .t-q{display:grid;gap:6px;border-left:3px solid var(--accent);padding:2px 0 2px 14px}
.transcript .t-q .t-who{font-weight:600}
.transcript .t-quiet{color:var(--muted);font-style:italic}
.transcript .t-box{display:grid;gap:8px;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
.transcript .t-box h3{margin:0}
.transcript .t-rate{margin:0;padding-left:20px}
.transcript .t-back{padding-top:10px}
@media print{.transcript .t-intro,.transcript .t-box{border-color:#999;background:none}}

/* Settings (Oct 16, second pass): grouped like a phone's settings, in the house style.
   The account card at the top · Reminders & notifications · In a lesson · Your pace · This device (quieter, last).
   Each section: a Lora title (step-2), then cards (.set-rows) on the quiet surface, each holding settings rows
   (.set-row): the name on the left, its state pill or control on the right, a muted helper line under it.
   Spacing scale: 4 · 8 · 12 · 16 · 24 · 32. */
.set-card{gap:0;padding-bottom:28px}
.set-card .head{align-items:center;padding-bottom:4px}
.set-card .head h2{margin:0;font-family:var(--display);font-weight:400;font-size:var(--step-3);line-height:var(--lh-heading);letter-spacing:var(--ls-heading)}
.set-sec{display:grid;gap:12px;min-width:0;padding-top:32px}
.set-sec.set-acct{padding-top:12px}
.set-card .set-h{margin:0 0 4px;font-family:var(--display);font-weight:500;font-size:var(--step-2);line-height:var(--lh-heading);letter-spacing:var(--ls-heading);color:var(--ink);scroll-margin-top:16px}
.set-h:focus{outline:none}
.set-h:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:4px}
.set-intro{margin:-8px 0 4px}
/* a group inside a section: a small caps label over its card */
.set-group{display:grid;gap:8px;min-width:0}
.set-group + .set-group{margin-top:12px}
.set-group[hidden]{display:none}
.set-group-h{margin:0;padding-inline:16px;font-family:var(--body);font-size:var(--step--3);font-weight:600;line-height:var(--lh-snug);letter-spacing:var(--ls-caps);text-transform:uppercase;color:var(--muted)}
/* the card, and its rows divided by hairlines (only between the rows that show) */
.set-rows{display:grid;min-width:0;padding-inline:16px;border-radius:var(--r);background:var(--surface)}
.set-rows > *{min-width:0}
.set-rows > :not([hidden]) ~ :not([hidden]){border-top:1px solid var(--line)}
.set-row{display:grid;gap:8px;min-width:0;margin:0;padding:14px 0;border:0}
.set-row[hidden]{display:none}
.set-row-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:28px}
.set-row-head > :not(.set-row-t){flex:none}
.set-row .select select,.set-row-head .select{width:auto}
.set-row-t{margin:0;padding:0;font-family:var(--body);font-size:1rem;font-weight:500;line-height:var(--lh-snug);letter-spacing:0;color:var(--ink)}
.set-row-t{flex:1 1 auto;min-width:0}
label.set-row-t{cursor:pointer}
.set-row .link{font-size:var(--step--1)}
.set-row .set-help,.set-row .set-body > .fine{margin:0}
.set-row .set-body{gap:8px}
.set-later{margin:0;padding:14px 0}
/* on the card, the controls sit on the page colour so they still read as fields */
.set-rows input[type=time],.set-rows input[type=text],.set-rows .select select,.set-acct-card input[type=email],.set-acct-card input[type=text],.set-acct-card .select select{background:var(--bg)}
.set-rows .seg{background:var(--surface-2);border-color:transparent}
.set-rows .seg input:checked + span{box-shadow:0 1px 2px rgba(0,0,0,.12)}
/* the old sub-parts, still used by This device and the account card */
.set-body{display:grid;gap:10px;min-width:0}
.set-sub{display:grid;gap:8px;min-width:0;margin:0;padding:0;border:0}
.set-sub-h{margin:0;padding:0;font-family:var(--body);font-weight:600;font-size:var(--step--1);line-height:var(--lh-snug);color:var(--ink);letter-spacing:var(--ls-ui)}
.set-help{max-width:52ch}
/* a row's second line: what it's set to on the left, its action on the right ("Around 8 am      Turn off") */
.set-line{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;font-size:var(--step--1);line-height:var(--lh-snug);color:var(--ink)}
.set-row .set-line{justify-content:space-between}
.set-line .link{min-height:44px;display:inline-flex;align-items:center}
.set-meta{color:var(--muted);overflow-wrap:anywhere;min-width:0}
.set-row .set-line > .set-meta:first-child,.set-row .set-line > span:first-child{color:var(--ink)}
.set-row .set-line{margin-block:-8px}
/* the state pill: On, Off, Not allowed… */
.set-state{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:999px;font-size:var(--step--3);font-weight:600;letter-spacing:var(--ls-ui);line-height:1.3;white-space:nowrap;background:var(--surface-2);color:var(--muted)}
.set-state::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.75}
.set-state.on{background:var(--accent-soft);color:var(--accent)}
.set-state.blocked{background:var(--help-bg);color:var(--help-ink)}
/* "Around [8 am] Turn on": a visible label, the choice and the button */
.set-ctl{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;font-size:var(--step--1)}
.set-ctl > label{color:var(--muted);font-weight:500}
.set-ctl input[type=time]{width:auto;min-width:8.5rem;padding:7px 12px}
.set-ctl .btn{padding:8px 18px}
.set-acts{gap:4px 20px}
.set-row .set-acts{margin-top:-8px}
.set-list{list-style:none;margin:0;padding:0;display:grid;gap:4px;font-size:var(--step--1);line-height:var(--lh-snug)}
.set-list li{display:flex;flex-wrap:wrap;justify-content:space-between;gap:0 12px}
.set-row .set-list .set-meta{color:var(--muted)}
/* Read the lesson aloud: a switch (a checkbox with role=switch) */
.switch{appearance:none;-webkit-appearance:none;flex:none;position:relative;width:46px;height:28px;margin:0;border-radius:999px;cursor:pointer;
  background:var(--surface-2);box-shadow:inset 0 0 0 1px var(--line-strong);transition:background-color var(--dur-quick) var(--ease-calm),box-shadow var(--dur-quick) var(--ease-calm)}
.switch::before{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:var(--bg);box-shadow:0 1px 2px rgba(0,0,0,.2),0 0 0 1px var(--line-strong);
  transition:transform var(--dur-ui) var(--ease-calm)}
.switch:checked{background:var(--accent);box-shadow:none}
.switch:checked::before{transform:translateX(18px);background:var(--accent-ink);box-shadow:0 1px 2px rgba(0,0,0,.2)}
.switch:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media (forced-colors:active){.switch{border:1px solid CanvasText}.switch::before{background:CanvasText}.switch:checked{background:Highlight}}
/* the account card: avatar, who and the status, then its one main action and quiet links */
.set-acct-card{display:grid;gap:16px;padding:16px;border-radius:var(--r);background:var(--surface);border:1px solid var(--line);min-width:0}
.set-acct-card .set-acct-head{padding:0;background:none;border-radius:0;gap:14px}
.set-acct-card .set-acct-head .acct-av{width:48px;height:48px;font-size:1.25rem}
.set-acct-card .set-acct-head .acct-av svg{width:24px;height:24px}
.set-acct-card .set-acct-who{gap:2px}
.set-acct-card .set-acct-who h4{font-size:var(--step-0);font-weight:600}
.set-acct-card .acc-links{gap:0 20px;padding-top:12px;border-top:1px solid var(--line)}
/* signed out: what signing in gives you */
.set-gains{list-style:none;margin:0;padding:0;display:grid;gap:6px;font-size:var(--step--1);line-height:var(--lh-snug);color:var(--ink)}
.set-gains li{position:relative;padding-left:26px}
.set-gains li::before{content:"";position:absolute;left:3px;top:.32em;width:12px;height:7px;border-left:1.8px solid var(--accent);border-bottom:1.8px solid var(--accent);transform:rotate(-45deg)}
.acc-form{display:grid;gap:12px}
.acc-form .actions .btn{width:100%;justify-content:center}
.acc-email{font-weight:600;overflow-wrap:anywhere}
.set-acct-who .acc-email{display:block}
.set-note{color:var(--ink)}
.set-note:focus{outline:none}
/* This device: seldom used, so quieter. A small caps title, plain rows, Start over last in a danger-subtle style. */
.set-quiet{gap:0;padding-top:40px}
.set-card .set-quiet .set-h{margin:0 0 4px;font-family:var(--body);font-size:var(--step--3);font-weight:600;line-height:var(--lh-snug);letter-spacing:var(--ls-caps);text-transform:uppercase;color:var(--muted)}
.set-quiet > .set-sub{padding-block:12px}
.set-quiet > .set-sub:not(:empty) + .set-sub{border-top:1px solid var(--line)}
.set-quiet .set-sub-h{font-weight:500}
#setInstall:empty{display:none}
.set-danger .link.danger{font-size:var(--step--1)}
/* Speed: a segmented row of the six speeds (radio buttons) */
.seg{display:flex;padding:3px;gap:2px;border:1px solid var(--line-strong);border-radius:999px;background:var(--surface);max-width:100%}
.seg label{flex:1 1 0;min-width:0;position:relative;display:flex}
.seg input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer}
.seg span{flex:1;display:flex;align-items:center;justify-content:center;min-height:38px;padding:0 4px;border-radius:999px;font-size:var(--step--2);font-weight:500;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap;
  transition:background-color var(--dur-quick) var(--ease-calm),color var(--dur-quick) var(--ease-calm)}
.seg label:hover span{color:var(--ink)}
.seg input:checked + span{background:var(--bg);color:var(--ink);box-shadow:0 0 0 1px var(--line-strong)}
.seg input:focus-visible + span{outline:2px solid var(--accent);outline-offset:1px}
/* what appears in place (a state, a confirm, the times form, a saved note) settles in gently; none with reduced motion
   (style.css's global rule) */
@keyframes set-in{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.set-card .reset-confirm,.set-card .att-form,.set-card .set-note,.set-card .att-cal:not([hidden]){animation:set-in var(--dur-ui) var(--ease-calm)}
/* Folded rows (.acc, app.js accRow): one calm line, the name, its value in plain words and a chevron, on a button.
   Open, the panel grows to its contents (grid rows 0fr to 1fr) and the chevron turns down. Closed, the panel is
   visibility:hidden once it has folded, so nothing in it can be tabbed to or read out. Instant with reduced motion. */
.set-row.acc{gap:0;padding:0}
.acc-h{margin:0;font:inherit}
.acc-btn{display:flex;align-items:center;gap:12px;width:100%;min-height:56px;margin:0;padding:12px 0;border:0;background:none;color:var(--ink);font:inherit;text-align:left;cursor:pointer;-webkit-tap-highlight-color:transparent;border-radius:6px}
.acc-btn .set-row-t{flex:1 1 auto}
.acc-val{flex:0 1 auto;min-width:0;text-align:right;font-size:var(--step--1);line-height:var(--lh-snug);color:var(--muted);overflow-wrap:anywhere;transition:color var(--dur-quick) var(--ease-calm)}
.acc-val:empty{display:none}
.acc-chev{flex:none;width:8px;height:8px;margin:0 4px 2px 0;border-right:1.6px solid currentColor;border-bottom:1.6px solid currentColor;color:var(--muted);transform:rotate(-45deg);transition:transform var(--dur-ui) var(--ease-calm),color var(--dur-quick) var(--ease-calm)}
.acc-btn:hover .acc-chev,.acc-btn:hover .acc-val{color:var(--ink)}
.acc-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.acc[data-open] .acc-chev{transform:translateY(-2px) rotate(45deg)}
.acc-panel{display:grid;grid-template-rows:0fr;visibility:hidden;transition:grid-template-rows var(--dur-ui) var(--ease-calm),visibility 0s linear var(--dur-ui)}
.acc[data-open] > .acc-panel{grid-template-rows:1fr;visibility:visible;transition:grid-template-rows var(--dur-ui) var(--ease-calm),visibility 0s}
.acc-clip{min-height:0;overflow:hidden}
.acc-body{display:grid;gap:12px;min-width:0;padding:0 0 18px;opacity:0;transition:opacity var(--dur-quick) var(--ease-fade)}
.acc[data-open] .acc-body{opacity:1;transition:opacity var(--dur-ui) var(--ease-calm) 60ms}
.acc-body > .set-body{gap:12px}
.acc-body .set-help,.acc-body .set-body > .fine{margin:0}
.acc-body .set-line{margin-block:0}
.acc-body .opt-group{margin:0;padding:0;border:0;min-width:0}
.acc-body .actions{margin:0}
.acc-body .acc-form .actions .btn{width:auto}
.acc[data-attention] .push-help{display:none}   /* Not allowed: its own line says how to allow them, so just that one */
.set-row-switch .set-row-head{min-height:56px}
.set-row.set-row-switch{padding:0}
@media (prefers-reduced-motion:reduce){.acc-panel,.acc[data-open] > .acc-panel,.acc-body,.acc[data-open] .acc-body,.acc-chev{transition:none}}
/* Links in Settings are tap targets on a phone: at least 44px tall. */
.drawer-card .head .link,.set-card .actions .link,.set-card p > .link,.set-sub > .link{min-height:44px;display:inline-flex;align-items:center}
.set-card .actions .link,.set-sub > .link{justify-self:start}
@media (max-width:359px){.set-rows{padding-inline:12px}.set-acct-card{padding:14px}.set-group-h{padding-inline:12px}}

/* First visit: Lesson 1's picture and name above the one button. */
.cover .hero-lesson{padding-top:4px}

/* Help: this country's lines, above the general list (public/help-lines.js). */
.lines-here{display:grid;gap:10px}
.lines-here .label{color:var(--ink);font-weight:600}

/* ===== App feel (Oct 15): motion and touch for the home page and the lesson player =====
   Calm and slow: long decelerations, no bounce, transform and opacity only. Every animation here is off with reduced
   motion (style.css's global rule, plus the guards below). */

/* First visit: the hero arrives in a soft stagger, once per browser session (public/boot.js sets html.intro). */
@media (prefers-reduced-motion: no-preference){
  .intro #hero > *{animation:hero-in 900ms var(--ease-detach) both}
  .intro #hero > :nth-child(2){animation-delay:90ms}
  .intro #hero > :nth-child(3){animation-delay:180ms}
  .intro #hero > :nth-child(4){animation-delay:270ms}
  .intro #hero > :nth-child(5){animation-delay:360ms}
  .intro #hero > :nth-child(n+6){animation-delay:480ms}
  .intro .sky{animation:fade-in 1.6s var(--ease-detach) both}
  .intro #program,.intro .foot{animation:fade-in 900ms var(--ease-detach) 560ms both}
}
@keyframes hero-in{from{opacity:0;transform:translateY(14px)}}
/* /#start and /#start-at-<n>: the home page stays hidden while app.js opens Lesson 1 or its consent (boot.js sets
   data-deeplink; app.js removes it). On a slow connection a quiet line says what's happening, after half a second. If
   the script never runs, the home page shows anyway after 8 s. The fail-safe is an animation, so with reduced motion it
   is restated more specifically than style.css's global "animation:none" (it's an instant switch, not motion). */
[data-deeplink] #v-home{visibility:hidden;animation:deeplink-show 0s 8s forwards}
.deeplink-wait{display:none}
[data-deeplink] .deeplink-wait{display:flex;justify-content:center;align-items:center;gap:12px;position:absolute;left:0;right:0;top:clamp(140px,22vh,220px);
  margin:0;padding:0 24px;color:var(--muted);font-size:var(--step--1);animation:fade-in .8s var(--ease-detach) .5s both,deeplink-hide 0s 8s forwards}
@media (prefers-reduced-motion: reduce){
  [data-deeplink] #v-home{animation:deeplink-show 0s 8s forwards!important}
  [data-deeplink] .deeplink-wait{animation:deeplink-hide 0s 8s forwards!important}
}
@keyframes deeplink-show{to{visibility:visible}}
@keyframes deeplink-hide{to{visibility:hidden}}

/* Returning visitors: app.js draws the journey just after first paint. What sits below it waits for it, so nothing
   jumps; the journey then rises in once (app.js adds .first on the page's first draw). */
[data-started] .journey:empty ~ .program{visibility:hidden}
[data-started] .wrap:has(.journey:empty) > .foot{visibility:hidden}
.journey.first > *{animation:rise 700ms var(--ease-detach) both}
.journey.first > :nth-child(2){animation-delay:80ms}
.journey.first > :nth-child(n+3){animation-delay:150ms}

/* First visit: a two-minute taste, and the ways in (/for/), both quieter than Begin. */
/* "Hear the first two minutes": a play circle and its label, a 44px target, as on the landing pages (public/for/for.css
   .lp-listen, copied here); quieter than Begin. */
.try-listen{justify-self:start;display:inline-flex;align-items:center;gap:10px;min-height:44px;margin-block:-6px;color:var(--ink);font-weight:500;font-size:var(--step--1);text-decoration:none}
.try-listen span{text-decoration:underline;text-decoration-color:var(--line-strong);text-underline-offset:4px;transition:text-decoration-color var(--switch) var(--ease-detach)}
.try-listen:hover span{text-decoration-color:currentColor}
.try-play{flex:none}
.try-play circle{fill:none;stroke:var(--accent);stroke-width:1.5}
.try-play path{fill:var(--accent)}
@media (forced-colors:active){.try-play circle{stroke:LinkText}.try-play path{fill:LinkText}}
.ways-in{display:grid;gap:10px;margin-top:8px;padding-top:18px;border-top:1px solid var(--line)}
.ways-h{font-family:var(--body);font-size:var(--step--2);font-weight:500;line-height:var(--lh-snug);letter-spacing:var(--ls-ui);color:var(--muted)}
.ways-in ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px}
.ways-in a{display:inline-flex;align-items:center;min-height:38px;padding:6px 14px;border:1px solid var(--line-strong);border-radius:999px;color:var(--ink);background:color-mix(in srgb,var(--bg) 55%,transparent);
  text-decoration:none;font-size:var(--step--2);font-weight:500;line-height:1.3;transition:border-color var(--switch) var(--ease-detach),color var(--switch) var(--ease-detach),transform var(--press) var(--ease-detach)}
.ways-in a:hover{border-color:var(--accent);color:var(--accent)}
.ways-in a.all{border-style:dashed;color:var(--accent)}
.ways-in a:active{transform:scale(.97)}
@media (prefers-reduced-motion: reduce){.ways-in a:active{transform:none}}

/* The lesson's own picture and name at the top of the player; the picture is the same one as on the Now card, and
   moves from there into place when a lesson opens (a shared-element view transition, app.js show()). */
.sem-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;padding-top:10px}
.sem-art{display:block;width:56px;height:42px;border-radius:8px}
.sem-art:not([src]){visibility:hidden}
.sem-titles{display:grid;gap:1px;min-width:0}
.sem-title{font-size:var(--step--2);color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sem-title:empty{display:none}
@media (prefers-reduced-motion: no-preference){.sem-art{view-transition-name:lesson-art}}
::view-transition-group(lesson-art){animation-duration:.6s;animation-timing-function:var(--ease-detach)}
::view-transition-old(lesson-art),::view-transition-new(lesson-art){animation-duration:.6s}
@media (max-width:22.5em){.sem-head{grid-template-columns:minmax(0,1fr) auto}.sem-art{display:none}}

/* The guide is speaking: a small orb that breathes with the voice (app.js reads the level of the recording where the
   browser allows it, and sets --lvl), a slow even pulse where it can't, a slower one while a reply is on its way, and
   at rest when paused or silent. */
.guide{--lvl:0;position:relative;width:36px;height:36px;display:grid;place-items:center;flex:none}
.guide::before{content:"";position:absolute;left:50%;top:50%;width:26px;height:26px;margin:-13px 0 0 -13px;border-radius:50%;background:var(--accent);
  opacity:0;transform:scale(.6);transition:opacity .9s var(--ease-detach),transform .9s var(--ease-detach)}
.guide-orb{position:relative;width:12px;height:12px;border-radius:50%;background:var(--accent);opacity:.32;transform:scale(.85);transition:opacity .9s var(--ease-detach),transform .9s var(--ease-detach)}
.guide[data-state="speaking"] .guide-orb{opacity:1;transform:none}
.guide[data-state="speaking"]::before{opacity:.18;transform:none}
.guide[data-state="thinking"] .guide-orb{opacity:.7;transform:scale(.92)}
@media (prefers-reduced-motion: no-preference){
  .guide[data-state="speaking"]:not(.live)::before{animation:guide-breathe 2.6s ease-in-out infinite}
  .guide[data-state="thinking"]::before{animation:guide-breathe 4s ease-in-out infinite}
  .guide.live[data-state="speaking"]::before{transition:none;opacity:calc(.1 + var(--lvl) * .3);transform:scale(calc(.9 + var(--lvl) * .95))}
  .guide.live[data-state="speaking"] .guide-orb{transition:none;transform:scale(calc(1 + var(--lvl) * .25))}
}
@keyframes guide-breathe{0%,100%{opacity:.1;transform:scale(.9)}50%{opacity:.24;transform:scale(1.45)}}
@media (forced-colors:active){.guide::before,.guide-orb{forced-color-adjust:none;background:Highlight}}

/* A lesson can't be pulled down to reload by accident. */
html:has(> body.in-lesson),body.in-lesson{overscroll-behavior-y:contain}

/* Answers: a chip answers the press, then stays picked while the others step back. The guide's reply comes in
   muted while it's written (three slow dots before the first word), then each word brightens as it's spoken. */
.choices button.picked{border-color:var(--accent);color:var(--accent);background:var(--accent-soft)}
.choices.answered button{pointer-events:none}
.choices.answered button:not(.picked){opacity:.35}
.reply[aria-busy="true"]{color:var(--muted)}
.thinking{display:inline-flex;gap:6px;align-items:center;height:1em;vertical-align:middle}
.thinking i{width:6px;height:6px;border-radius:50%;background:var(--muted);opacity:.4}
@media (prefers-reduced-motion: no-preference){
  .thinking i{animation:think 1.8s ease-in-out infinite both}
  .thinking i:nth-child(2){animation-delay:.3s}
  .thinking i:nth-child(3){animation-delay:.6s}
}
@keyframes think{0%,100%{opacity:.2}50%{opacity:.75}}
.autoplay-note{flex-basis:100%;grid-column:1/-1;text-align:center;margin:0;color:var(--ink);max-width:none}

/* Lesson complete: the clouds part. Two clouds drift apart over a sky that clears and a low sun; once, slowly, then
   still. The resting state is the parted one, so with reduced motion it's simply shown that way. */
.parting{height:clamp(96px,22vw,150px);border-radius:var(--r);overflow:hidden;border:1px solid var(--line)}
.parting svg{display:block;width:100%;height:100%}
.parting .p-base{fill:var(--sky-top)}
.parting .p-clear{fill:var(--sky-clear-top)}
.parting .p-sun{fill:var(--sky-sun);opacity:.9}
.parting .p-cloud{fill:var(--cloud);stroke:var(--cloud-edge);stroke-width:1.6;stroke-linejoin:round}
.parting .p-hill{fill:var(--hill)}
.parting .p-line{fill:none;stroke:var(--horizon);stroke-width:1}
.parting .p-left{transform:translateX(-175px);opacity:.9}
.parting .p-right{transform:translateX(175px);opacity:.9}
.parting .p-low{transform:translateX(-60px)}
@media (prefers-reduced-motion: no-preference){
  .parting .p-left,.parting .p-right,.parting .p-low{animation:part-from 2.8s var(--ease-detach) .45s both}
  .parting .p-clear{animation:fade-in 2.8s var(--ease-detach) .6s both}
  .parting .p-sun{animation:sun-in 2.4s var(--ease-detach) 1.1s both}
}
@keyframes part-from{from{transform:none;opacity:1}}
@keyframes sun-in{from{opacity:0;transform:translateY(8px)}}

/* ===== Consent, first-time visitors (Oct 15) =====
   Order: the safety line, the box, what happens to an answer, a name, then Start, all in the first screen of a 390×844
   or 360×740 phone; the once-only note and Read more come after. Ticking the box brings Start up gently (app.js). */
.consent .consent-back{justify-self:start;min-height:32px}
.consent-go{display:grid;gap:8px}
.consent-go .actions{min-height:44px}
.consent-go .btn{transition:opacity var(--switch) var(--ease-detach),transform var(--press) var(--ease-detach),filter var(--press) var(--ease-detach)}
@media (max-width:520px){
  .consent{gap:12px;padding-top:8px}
  .consent .consent-back{margin-bottom:-6px}
  .consent .field input{padding-block:9px}
}

/* A lesson opening before the list of recordings has arrived (a slow connection): the player is already there, with
   three quiet dots where the first line will be, for up to 2.5 s. They fade in only if the wait is noticeable. */
.stage-wait{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:var(--step--1)}
@media (prefers-reduced-motion: no-preference){.stage-wait{animation:fade-in .8s var(--ease-detach) .35s both}}
/* Several chips can be picked; Continue (with its arrow) appears once one is. A picked chip gets a small tick. */
.ask-actions{margin-top:12px}
.ask-go{gap:6px}
.ask-go:not([hidden]){animation:askGo .24s var(--ease-calm, ease-out)}
@keyframes askGo{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.choices button[aria-pressed="true"]::before{content:"✓";margin-right:6px;font-weight:600}
@media (prefers-reduced-motion: reduce){.ask-go:not([hidden]){animation:none}}

/* "How this works" on the consent screen: the course's shape in three steps, seen before Lesson 1. */
.how3{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:16px 18px 18px}
.how3-h{font-family:var(--body);font-size:var(--step--1);font-weight:600;letter-spacing:var(--ls-ui);color:var(--muted);margin:0 0 10px;text-transform:none}
.how3-list{list-style:none;margin:0;padding:0;display:grid;gap:14px;position:relative}
.how3-list li{display:grid;grid-template-columns:30px 1fr;gap:12px;align-items:start;font-size:var(--step--1);line-height:1.45;position:relative}
.how3-list li b{color:var(--ink);font-weight:600}
.how3-list li:not(:last-child)::before{content:"";position:absolute;left:14.5px;top:30px;bottom:-14px;width:1px;background:var(--line-strong)}
.how3-n{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--accent-soft);color:var(--accent);font-weight:600;font-size:.875rem;position:relative}

/* The living sky behind a lesson (public/sky.js): the time of day as a faint wash at the top of the screen, fading
   into the paper well above the words, and now and then a soft cloud crossing. Low contrast on purpose: every text
   colour (ink, muted, detached, accent) keeps AA (4.5:1) on the strongest point of the wash, light and dark. */
@property --tod-top{syntax:"<color>";inherits:true;initial-value:transparent}
@property --tod-mid{syntax:"<color>";inherits:true;initial-value:transparent}
:root{--tod-top:#DFEAEF;--tod-mid:#EBF1F1}
:root.sky-live{transition:--tod-top 40s linear,--tod-mid 40s linear}
:root[data-tod="dawn"]{--tod-top:#F5E6DB;--tod-mid:#F4ECE4}
:root[data-tod="day"]{--tod-top:#DFEAEF;--tod-mid:#EBF1F1}
:root[data-tod="dusk"]{--tod-top:#F2E5EA;--tod-mid:#F3EBEC}
:root[data-tod="night"]{--tod-top:#E5E9F0;--tod-mid:#ECEEF1}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){--tod-top:#16232B;--tod-mid:#151B1D}
  :root:not([data-theme="light"])[data-tod="dawn"]{--tod-top:#2A2226;--tod-mid:#1C1A1B}
  :root:not([data-theme="light"])[data-tod="day"]{--tod-top:#17242D;--tod-mid:#151C1E}
  :root:not([data-theme="light"])[data-tod="dusk"]{--tod-top:#251D29;--tod-mid:#1A171C}
  :root:not([data-theme="light"])[data-tod="night"]{--tod-top:#0F151D;--tod-mid:#121718}
}
:root[data-theme="dark"]{--tod-top:#16232B;--tod-mid:#151B1D}
:root[data-theme="dark"][data-tod="dawn"]{--tod-top:#2A2226;--tod-mid:#1C1A1B}
:root[data-theme="dark"][data-tod="day"]{--tod-top:#17242D;--tod-mid:#151C1E}
:root[data-theme="dark"][data-tod="dusk"]{--tod-top:#251D29;--tod-mid:#1A171C}
:root[data-theme="dark"][data-tod="night"]{--tod-top:#0F151D;--tod-mid:#121718}
.lsky{position:fixed;inset:0;z-index:-1;pointer-events:none;opacity:0;visibility:hidden;overflow:hidden;
  background:linear-gradient(to bottom,var(--tod-top) 0%,var(--tod-mid) 30%,var(--bg) 62%);
  transition:opacity 1.2s var(--ease-detach),visibility 0s linear 1.2s}
body.in-lesson .lsky{opacity:1;visibility:visible;transition:opacity 1.2s var(--ease-detach),visibility 0s}
body.in-lesson{background:transparent}
.lcl{position:absolute;left:0;width:min(46vw,300px);height:auto;opacity:0;will-change:transform}
.lcl path{fill:var(--cloud);stroke:var(--cloud-edge);stroke-width:1.2;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.lcl1{top:4vh;animation:cloud-cross 150s linear infinite}
.lcl2{top:13vh;width:min(32vw,210px);animation:cloud-cross 190s linear -75s infinite}
.lcl3{top:22vh;width:min(38vw,250px);animation:cloud-cross 230s linear -150s infinite}
/* Each cloud crosses in the first part of its cycle and is gone for the rest: one now and then, never a parade. */
@keyframes cloud-cross{
  0%{transform:translateX(-50vw);opacity:0} 4%{opacity:.55} 40%{opacity:.55} 44%{transform:translateX(110vw);opacity:0} 100%{transform:translateX(110vw);opacity:0}
}
body:not(.in-lesson) .lcl,.sky-still .lcl{animation-play-state:paused}
@media (prefers-reduced-motion:reduce){.lcl{animation:none;opacity:0}:root.sky-live{transition:none}}
