/* Lesson reader. Loads after theme.css (fonts, colours, pixel frames, buttons). The Direction A layer at the end restyles
   the older rules above; when you change a component's look, change it there or in theme.css.
   Light-theme text colors are chosen to pass WCAG AA (4.5:1) on every surface they sit on:
   --gold-text #6f5206 (6.7:1 on cream), --tr #5c4710 (8.2:1), --muted #5f594f (6.4:1).
   The bright gold (--gold) is only used for fills, borders and accents, never for small text. */

/* colours are tokens in theme.css; these are the reader's own */
:root{--ctl:#7d6f4a;--bar-c:#6f5206;--fs:1;--bar-h:9rem}
:root[data-theme="dark"]{--bg:#0f0e0c;--bg2:#17150f;--card:#1b1812;--ink:#f7f5f0;--ink2:#e6e2d8;--body:#c9c6bd;--muted:#9a9488;--gold:#d4af50;--gold2:#f0cc72;--gold-text:#d4af50;--tr:#d4af50;--ctl:rgba(212,175,80,.32);--line:rgba(212,175,80,.32);--line2:rgba(212,175,80,.16);--hi:rgba(212,175,80,.18);--hi-on:rgba(212,175,80,.26);--bar-c:#d4af50}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%;scroll-padding-top:4.6rem;scroll-padding-bottom:calc(var(--bar-h) + 1rem)}
body{background:var(--bg);color:var(--ink);font-family:var(--f-body);font-weight:400;font-size:1rem;line-height:1.6;min-height:100vh;transition:background .25s,color .25s}
a{color:inherit}
button{font:inherit;color:inherit;cursor:pointer;background:none;border:0}
:focus-visible{outline:2px solid var(--gold-text);outline-offset:2px}
.top{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:1rem;padding:.9rem clamp(1rem,4vw,2.5rem);border-bottom:1px solid var(--line2)}
.brand{font-family:var(--f-head);letter-spacing:.14em;text-transform:uppercase;font-size:1rem;font-weight:500;text-decoration:none}
.brand span{color:var(--gold-text)}
.top a.back{font-size:.82rem;font-weight:500;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);text-decoration:none}
.top a.back:hover{color:var(--gold-text)}
.wrap{max-width:760px;margin:0 auto;padding:2.2rem clamp(1rem,4vw,1.6rem) calc(var(--bar-h) + 2.5rem)}
.eyebrow{font-size:.82rem;font-weight:500;letter-spacing:.16em;text-transform:uppercase;color:var(--gold-text);margin-bottom:.7rem}
h1.page-title{font-family:var(--f-head);font-weight:400;font-size:clamp(2.2rem,6vw,3.4rem);line-height:1.1;margin-bottom:.6rem}
h1.page-title[dir="rtl"]{text-align:left;font-family:var(--f-rtl);font-weight:700;line-height:1.5}
.tt-title{color:var(--tr);font-weight:500;margin-bottom:.5rem}
.lead{color:var(--body);max-width:600px;font-size:1.05rem}
.badge{display:inline-block;font-size:.82rem;font-weight:500;letter-spacing:.1em;text-transform:uppercase;border:1px solid var(--gold-text);color:var(--gold-text);padding:.18rem .55rem;border-radius:1px}
.badge.fill{background:var(--gold-text);color:var(--bg);border-color:var(--gold-text)}
.notice{margin:1.2rem 0;padding:.75rem 1rem;border:1px dashed var(--ctl);background:var(--bg2);font-size:.92rem;color:var(--body)}

/* list page */
.lang-h{font-family:var(--f-head);font-weight:500;font-size:1.7rem;margin:2.4rem 0 .9rem;padding-bottom:.4rem;border-bottom:1px solid var(--line)}
.cards{list-style:none;display:grid;gap:1rem}
.card{display:block;text-decoration:none;background:var(--card);border:1px solid var(--line2);border-top:3px solid var(--gold);padding:1.3rem 1.4rem;transition:border-color .2s,transform .2s}
.card:hover{border-color:var(--gold);transform:translateY(-1px)}
.card .t{font-size:1.7rem;line-height:1.6;margin-bottom:.1rem;font-family:var(--f-rtl);font-weight:700}
.card .tt{color:var(--tr);font-weight:500;font-size:.95rem;margin-bottom:.5rem}
.card .s{color:var(--body);font-size:.98rem;margin-bottom:.8rem}
.meta{display:flex;flex-wrap:wrap;gap:.5rem .9rem;align-items:center;font-size:.84rem;font-weight:500;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}

/* lesson header, level tabs, toolbar */
.tabs{display:flex;gap:.2rem;margin:1.6rem 0 1rem;border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tab{display:flex;flex-direction:column;align-items:center;gap:.05rem;padding:.55rem 1.1rem;min-height:44px;font-size:.88rem;font-weight:500;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);border-bottom:3px solid transparent;margin-bottom:-1px;white-space:nowrap}
.tab:hover{color:var(--ink)}
.tab[aria-selected="true"]{color:var(--ink);border-bottom-color:var(--gold-text)}
.tools{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:.9rem}
.tog{padding:.5rem .9rem;min-height:44px;border:1px solid var(--ctl);font-size:.84rem;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:var(--body);border-radius:1px}
.tog[aria-pressed="true"]{background:var(--ink);border-color:var(--ink);color:var(--gold2)}
.tog:hover{border-color:var(--gold-text)}
.fsgrp,.seg{display:inline-flex}.fsgrp .tog+.tog,.seg .tog+.tog{border-left:0}
.seg .tog{padding:.5rem 1.2rem;font-size:.9rem}
.regnote{font-size:.92rem;color:var(--muted);margin-bottom:1.2rem}
.regnote b{color:var(--ink);font-weight:500}

/* section navigation (sticky) */
.secnav{position:sticky;top:0;z-index:40;background:var(--bg);border-bottom:1px solid var(--line);margin:0 calc(-1 * clamp(1rem,4vw,1.6rem));padding:.5rem clamp(1rem,4vw,1.6rem);display:flex;gap:.4rem;overflow-x:auto;scrollbar-width:none}
.secnav::-webkit-scrollbar{display:none}
.secnav a{flex:0 0 auto;text-decoration:none;padding:.5rem .85rem;min-height:40px;display:inline-flex;align-items:center;gap:.45rem;font-size:.84rem;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:var(--body);border:1px solid var(--line);border-radius:999px}
.secnav a small{font-size:.82rem;color:var(--muted);letter-spacing:0}
.secnav a:hover{border-color:var(--gold-text)}
.secnav a[aria-current="true"]{background:var(--ink);border-color:var(--ink);color:var(--gold2)}
.secnav a[aria-current="true"] small{color:inherit}
:root[data-theme="dark"] .secnav a[aria-current="true"]{background:var(--gold);border-color:var(--gold);color:#0f0e0c}

/* sections */
.block{margin-top:2.2rem}
.sec-h{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:.4rem}
.sec-h h2{font-family:var(--f-head);font-weight:500;font-size:1.9rem;line-height:1.2}
.sec-h .tog{min-height:40px;padding:.35rem .8rem;font-size:.84rem}
.sec-note{margin-top:.6rem;color:var(--body);font-size:.98rem}

/* sentences */
.sents{list-style:none}
.sent{display:flex;gap:.9rem;padding:1.1rem .8rem;border-bottom:1px solid var(--line2);border-radius:2px;transition:background .2s,box-shadow .2s}
.sent.on{background:var(--hi-on);box-shadow:inset 5px 0 0 var(--bar-c)}
.sent .num{flex:0 0 auto;width:1.8rem;font-size:.85rem;font-weight:500;color:var(--muted);padding-top:.8rem;text-align:center}
.sent.on .num{color:var(--ink)}
.sent .play{flex:0 0 auto;width:40px;height:40px;display:flex;align-items:center;justify-content:center;align-self:flex-start;margin-top:.1rem}
.sent .body{flex:1;min-width:0}
.spk{display:block;font-size:.84rem;font-weight:500;letter-spacing:.12em;text-transform:uppercase;color:var(--gold-text);margin-bottom:.1rem}
.words{display:flex;flex-wrap:wrap;gap:.2rem .9rem;font-size:calc(1.75rem*var(--fs));line-height:1.4}
.words[dir="rtl"]{font-family:var(--f-rtl);font-weight:400;line-height:1.85}
.words.ar{font-family:var(--f-ar);font-size:calc(2rem*var(--fs))}
.w{display:inline-flex;flex-direction:column;align-items:center;text-align:center;padding:.1rem .3rem;border-radius:3px;cursor:pointer;border:0}
.w:hover,.w.open{background:var(--hi)}
.wt{unicode-bidi:isolate}
.wr{font-family:var(--f-body);font-size:calc(.95rem*var(--fs));font-weight:500;color:var(--tr);line-height:1.25;direction:ltr}
.tr{margin-top:.5rem;color:var(--body);font-size:calc(1.02rem*var(--fs));direction:ltr;text-align:left}
body.no-translit .wr{display:none}
body.no-trans .tr{display:none}
body.listen .words,body.listen .tr,body.listen .sent .play,body.listen .spk{visibility:hidden}
body.listen .sent{align-items:center;padding:.7rem .8rem}
body.listen .sent .body{height:1.4rem;overflow:hidden}
.listen-hint{display:none;margin:.2rem 0 1rem;color:var(--muted);font-size:.92rem}
body.listen .listen-hint{display:block}

/* vocab list + popover */
h2.sec{font-family:var(--f-head);font-weight:500;font-size:1.9rem;margin:2.6rem 0 1rem}
.vocab{list-style:none;display:grid;gap:.7rem}
.vocab li{background:var(--card);border:1px solid var(--line2);padding:.9rem 1.1rem;display:grid;gap:.15rem}
.vocab .vw{font-size:1.6rem;line-height:1.7;font-family:var(--f-rtl);font-weight:400}
.vocab .vt{color:var(--tr);font-weight:500;font-size:.95rem}
.vocab .vm{color:var(--ink2)}
.vocab .ve{color:var(--body);font-size:.95rem;display:grid;gap:.1rem;margin-top:.3rem}
.vocab .vex{font-family:var(--f-rtl);font-size:1.2rem;line-height:1.8;color:var(--ink)}
.pop{position:fixed;z-index:60;width:min(330px,calc(100vw - 1.6rem));background:var(--card);border:1px solid var(--gold-text);box-shadow:0 14px 34px rgba(0,0,0,.28);padding:1rem 1.1rem;border-radius:2px}
.pop[hidden]{display:none}
.pop .pw{font-size:1.8rem;line-height:1.6;font-family:var(--f-rtl)}
.pop .pt{color:var(--tr);font-weight:500;font-size:1rem}
.pop .pm{margin-top:.3rem;color:var(--ink)}
.pop .pe{margin-top:.6rem;padding-top:.6rem;border-top:1px solid var(--line2);font-size:.95rem;color:var(--body)}
.pop .pe .ex{font-family:var(--f-rtl);font-size:1.2rem;line-height:1.8;color:var(--ink)}
.pop .none{color:var(--muted);font-size:.92rem;margin-top:.3rem}
.pop .x{position:absolute;top:.3rem;right:.5rem;color:var(--muted);font-size:1.3rem;min-width:36px;min-height:36px}
@media(max-width:640px){.pop{left:.6rem!important;right:.6rem;bottom:calc(var(--bar-h) + .6rem);top:auto!important;width:auto}}

/* audio bar */
.bar{position:fixed;left:0;right:0;bottom:0;z-index:50;background:var(--card);border-top:2px solid var(--gold-text);padding:.6rem clamp(.6rem,3vw,1.4rem) calc(.6rem + env(safe-area-inset-bottom))}
.ctrls{display:flex;align-items:center;gap:.35rem}
.cb{width:44px;height:44px;border:1px solid var(--ctl);border-radius:50%;display:flex;align-items:center;justify-content:center;color:var(--ink)}
.cb:hover{border-color:var(--gold-text);color:var(--gold-text)}
.cb.main{width:52px;height:52px}
.cb svg{width:18px;height:18px;fill:currentColor}
.speed{display:inline-flex}.speed button{padding:.45rem .7rem;min-height:44px;border:1px solid var(--ctl);font-size:.84rem;font-weight:500;letter-spacing:.06em}
.speed button+button{border-left:0}
.speed button[aria-pressed="true"]{background:var(--ink);color:var(--gold2);border-color:var(--ink)}
.bar .tog{min-height:44px}
@media(max-width:480px){.tab{padding:.7rem .6rem;letter-spacing:.05em}.cb{width:40px;height:40px}.cb.main{width:46px;height:46px}.speed button,.bar .tog{min-height:40px}.bar{padding-top:.45rem}.bar-in{gap:.4rem}.stat{font-size:.88rem}}
@media (prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* dark mode: "pressed" controls are solid gold with dark text (cream-on-gold would be unreadable) */
:root[data-theme="dark"] .tog[aria-pressed="true"],:root[data-theme="dark"] .speed button[aria-pressed="true"],:root[data-theme="dark"] .cb.main{background:var(--gold);border-color:var(--gold);color:#0f0e0c}

/* ---------- v2: top bar, icon toolbar, level tabs with CEFR, header ---------- */
.top .brand{white-space:nowrap}
.pickbtn{justify-self:center;width:min(100%,360px);text-align:left;padding:.45rem .9rem;border:1px solid var(--ctl);border-radius:6px;background:var(--card);color:var(--ink);display:flex;align-items:center;justify-content:space-between;gap:.6rem;min-height:48px}
.pickbtn small{display:block;font-size:.82rem;font-weight:500;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);line-height:1.2}
.pickbtn span{font-weight:500;line-height:1.25}
.pickbtn::after{content:"";width:8px;height:8px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg) translateY(-2px);flex:none}
.pickbtn:hover{border-color:var(--gold-text)}
.help{width:44px;height:44px;display:flex;align-items:center;justify-content:center;border:1px solid var(--ctl);border-radius:50%;text-decoration:none;font-weight:500;color:var(--body)}
.help:hover{border-color:var(--gold-text);color:var(--gold-text)}
.iconbar{display:grid;grid-template-columns:repeat(auto-fit,minmax(44px,1fr));gap:.35rem;margin-bottom:1.4rem}
.ib{height:48px;border:1px solid transparent;border-radius:8px;display:flex;align-items:center;justify-content:center;color:var(--body);background:var(--bg2)}
.ib:hover{border-color:var(--gold-text);color:var(--ink)}
.ib[aria-pressed="true"]{color:var(--gold-text);background:var(--hi);border-color:var(--line)}
.ib-t{font-family:var(--f-head);font-size:1.35rem;font-weight:500;line-height:1}
.ib-i{font-style:italic}.ib-s{font-family:var(--f-body);font-size:.9rem;font-weight:500;letter-spacing:.04em}
.tab small{font-size:.82rem;font-weight:500;letter-spacing:.04em;color:var(--muted);text-transform:none}
.tab[aria-selected="true"] small{color:var(--gold-text)}
.tabs{margin-top:0}
.eyebrow{display:flex;align-items:center;gap:.7rem;flex-wrap:wrap}
.lead{font-style:italic;color:var(--muted);max-width:none;font-size:1rem;margin-bottom:.9rem}
h1.page-title{margin-bottom:.1rem}
.sub-en{font-size:1.15rem;color:var(--body);margin-bottom:.6rem}
.tt-title{margin-bottom:.2rem}
.w.hl .wt{text-decoration:underline;text-decoration-color:var(--gold-text);text-decoration-thickness:2px;text-underline-offset:.28em}
.pfh{margin-top:.8rem;width:100%;min-height:44px;display:flex;align-items:center;justify-content:center;gap:.5rem;border:1px solid var(--ctl);border-radius:6px;color:var(--gold-text);font-weight:500;font-size:.95rem}
.pfh:hover{background:var(--hi)}
:root[data-theme="dark"] .btn{background:var(--gold);border-color:var(--gold);color:#0f0e0c}
:root[data-theme="dark"] .lockbox{margin:2rem 0;padding:2rem;border:1px solid var(--line);background:var(--card);border-radius:8px;text-align:center;display:grid;gap:.8rem;justify-items:center}
.lockbox h2{font-family:var(--f-head);font-weight:500;font-size:1.8rem}
.lockbox p{color:var(--body);max-width:420px}

/* ---------- audio bar v2 ---------- */
.bar-in{max-width:900px;margin:0 auto;display:flex;align-items:center;gap:.9rem}
.bar-mid{flex:1 1 auto;min-width:0}
.stat{font-size:.9rem;color:var(--body);min-height:1.3em;padding:.1rem 0;line-height:1.35}
.stat.warn{color:var(--ink);font-weight:500;border:1px solid var(--ctl);background:var(--bg2);border-radius:4px;padding:.15rem .5rem}
.prog{height:4px;border-radius:2px;background:var(--line2);margin-top:.35rem;overflow:hidden}
.prog i{display:block;height:100%;width:0;background:var(--gold-text);transition:width .25s}
@media(max-width:699px){
  .bar-in{display:grid;grid-template-columns:1fr auto;grid-template-areas:"mid listen" "ctrls speed" "pv pv";gap:.45rem .6rem}
  .bar-mid{grid-area:mid}.ctrls{grid-area:ctrls}.speed{grid-area:speed;justify-self:end}#listen{grid-area:listen}#pv{grid-area:pv}
}
@media(max-width:480px){.tab{padding:.55rem .6rem}.top{gap:.5rem}.pickbtn{padding:.4rem .6rem}.brand{font-size:.9rem}.help{width:40px;height:40px}}
.tabs{gap:0}

/* ---------- modals ---------- */
body.modal-open{overflow:hidden}
.modal-ov{position:fixed;inset:0;z-index:100;background:rgba(15,14,12,.55);backdrop-filter:blur(3px);display:flex;align-items:center;justify-content:center;padding:1rem}
.modal{background:var(--card);color:var(--ink);width:min(520px,100%);max-height:min(88vh,100%);overflow:auto;border-radius:12px;padding:1.4rem 1.5rem 1.3rem;box-shadow:0 24px 60px rgba(0,0,0,.4);border:1px solid var(--line2)}
.modal.wide{width:min(640px,100%)}
.modal-h{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.8rem}
.modal-h h2{font-family:var(--f-head);font-weight:500;font-size:1.7rem;line-height:1.2}
.modal-h h2 small{font-family:var(--f-body);font-size:.9rem;font-weight:500;color:var(--muted);margin-left:.7rem}
.modal-x{width:44px;height:44px;display:flex;align-items:center;justify-content:center;color:var(--ink);border-radius:50%}
.modal-x:hover{background:var(--hi)}
.modal-d{color:var(--body);margin-bottom:1rem}
.modal-n{color:var(--muted);font-size:.92rem;margin-top:1rem}
.choices{display:grid;gap:.5rem}
.choice{display:grid;gap:.15rem;text-align:left;padding:.8rem 1rem;border:1px solid var(--line);border-radius:8px;background:transparent;min-height:56px}
.choice:hover{border-color:var(--gold-text)}
.choice .c-t{font-weight:500;color:var(--ink)}
.choice .c-d{font-size:.93rem;color:var(--body)}
.choice[aria-checked="true"]{border-color:var(--gold-text);background:var(--hi);box-shadow:inset 0 0 0 1px var(--gold-text)}
.choice[aria-checked="true"] .c-t{color:var(--gold-text)}
.chips{display:flex;flex-wrap:wrap;gap:.45rem;margin-top:.3rem}
.chip{min-height:44px;padding:.4rem .95rem;border:1px solid var(--ctl);border-radius:999px;color:var(--body);font-weight:500}
.chip[aria-pressed="true"]{background:var(--ink);border-color:var(--ink);color:var(--gold2)}
:root[data-theme="dark"] .chip[aria-pressed="true"]{background:var(--gold);border-color:var(--gold);color:#0f0e0c}
.pk-l{margin:1rem 0 .3rem;font-size:.84rem;font-weight:500;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.demo-line{margin-top:1rem;padding:.8rem 1rem;background:var(--bg2);border-radius:8px;font-family:var(--f-rtl);line-height:1.6;text-align:center}
.mini-w{font-size:2.6rem;line-height:1.6;font-family:var(--f-rtl);margin-top:.2rem}
.mini-t{color:var(--tr);font-weight:500;font-size:1.1rem}
.mini-back{min-height:7rem;margin:1rem 0;display:grid;align-content:start;gap:.3rem}
.mini-m{font-size:1.3rem;font-weight:500}
.mini-e{font-size:1.35rem;line-height:1.8;font-family:var(--f-rtl);margin-top:.5rem}
.mini-et{color:var(--body)}
.mini-nav{display:flex;justify-content:space-between;gap:.6rem}

/* ---------- picker ---------- */
.pk-bar{display:flex;align-items:center;justify-content:space-between;gap:.6rem;margin-bottom:.8rem;flex-wrap:wrap}
.pk-tabs{display:flex;gap:.3rem;background:var(--bg2);padding:.25rem;border-radius:8px;overflow-x:auto}
.pk-tabs button{min-height:40px;padding:.3rem .9rem;border-radius:6px;font-weight:500;color:var(--body);white-space:nowrap}
.pk-tabs button[aria-selected="true"]{background:var(--card);color:var(--gold-text);box-shadow:0 1px 3px rgba(0,0,0,.18)}
.pk-f{display:inline-flex;align-items:center;gap:.4rem;border-radius:6px;text-transform:none;letter-spacing:0;font-size:.95rem}
.pk-f[aria-expanded="true"] svg{transform:rotate(180deg)}
.pk-filters{padding:.4rem 0 1rem;border-bottom:1px solid var(--line2);margin-bottom:.8rem}
.pk-list{list-style:none;display:grid;gap:.6rem}
.pk-card{display:block;text-decoration:none;padding:.9rem 1rem;border:1px solid var(--line2);border-radius:10px;background:var(--bg2);color:var(--ink)}
.pk-card:hover{border-color:var(--gold-text)}
.pk-card.now{border-color:var(--gold-text);background:var(--hi)}
.pk-card.locked{opacity:.88}
.pk-card.locked .pk-t{color:var(--body)}
.pk-meta{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem .8rem;font-size:.84rem;font-weight:500;color:var(--muted);letter-spacing:.04em}
.pk-lock{display:inline-flex;align-items:center;gap:.3rem;color:var(--ink)}
.pk-now{color:var(--gold-text)}
.pk-t{font-size:1.5rem;line-height:1.7;font-family:var(--f-rtl);font-weight:700}
.pk-t[dir="ltr"],.pk-t:not([dir]){font-family:var(--f-head);font-weight:500;line-height:1.3}
.pk-s{color:var(--body)}
.pk-c{margin-top:.3rem;font-size:.84rem;font-weight:500;color:var(--muted);letter-spacing:.04em}

/* ---------- landing + guide pages ---------- */
.land{max-width:760px}
.land .eyebrow{margin-top:1.4rem}
.land h1{font-family:var(--f-head);font-weight:500;font-size:clamp(2.4rem,7vw,3.6rem);line-height:1.1;margin:.3rem 0 .8rem}
.land .sub{font-size:1.15rem;color:var(--body);max-width:540px}
.land .cta{margin:1.6rem 0 .6rem}
.land .price{color:var(--muted);font-size:.95rem}
.free-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1rem;margin:2.2rem 0}
.free-card{display:grid;gap:.4rem;align-content:start;text-decoration:none;padding:1.2rem 1.3rem;border:1px solid var(--line2);border-top:3px solid var(--gold);border-radius:10px;background:var(--card);min-height:220px}
.free-card:hover{border-color:var(--gold-text)}
.free-card .t{font-size:1.7rem;line-height:1.7;font-family:var(--f-rtl);font-weight:700}
.free-card .t:not([dir]){font-family:var(--f-head);font-weight:500;line-height:1.25}
.free-card .s{color:var(--body)}
.free-card .go{margin-top:auto;display:inline-flex;align-items:center;gap:.5rem;color:var(--gold-text);font-weight:500}
.foot{margin-top:3rem;padding-top:1.2rem;border-top:1px solid var(--line2);display:flex;flex-wrap:wrap;gap:.4rem 1.4rem;color:var(--muted);font-size:.95rem}
.foot a{color:var(--body);text-underline-offset:.25em}
.foot a:hover{color:var(--gold-text)}

.gprog{position:sticky;top:0;z-index:30;background:var(--bg);border-bottom:1px solid var(--line2)}
.gprog-in{max-width:760px;margin:0 auto;padding:.6rem clamp(1rem,4vw,1.6rem);display:flex;align-items:center;gap:1rem}
.gprog .bar-track{flex:1;height:5px;border-radius:3px;background:var(--line2);overflow:hidden}
.gprog .bar-track i{display:block;height:100%;width:0;background:var(--gold-text);transition:width .2s}
.gprog span{font-size:.9rem;font-weight:500;color:var(--muted);white-space:nowrap}
.step{padding:2.6rem 0 1.4rem;border-bottom:1px solid var(--line2)}
.step .n{font-size:.84rem;font-weight:500;letter-spacing:.14em;text-transform:uppercase;color:var(--gold-text)}
.step h2{font-family:var(--f-head);font-weight:500;font-size:2rem;line-height:1.2;margin:.2rem 0 .4rem}
.step>p{color:var(--body);margin-bottom:1rem;max-width:560px}
.demo{padding:1.1rem 1.2rem;border:1px solid var(--line2);border-radius:12px;background:var(--card);display:grid;gap:.9rem}
.demo .row{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}
.demo .fa{font-family:var(--f-rtl);font-size:1.7rem;line-height:1.8}
.demo .out{padding:.7rem .9rem;background:var(--bg2);border-radius:8px;color:var(--body);min-height:3rem}
.demo .tabs{margin:0}
@media(max-width:359px){.demo .tabs{grid-auto-flow:row}}   /* three level tabs side by side need 287 px, more than the card has on a 320 px phone (the page scrolled sideways): stack them */
.demo .sent{cursor:pointer;border-radius:8px}
.demo .fake-bar{display:flex;align-items:center;gap:.8rem;padding:.6rem .8rem;border:1px solid var(--line);border-radius:10px}
.faq details{border-bottom:1px solid var(--line2);padding:.9rem 0}
.faq summary{cursor:pointer;font-weight:500;min-height:44px;display:flex;align-items:center}
.faq p{color:var(--body);margin-top:.4rem}
kbd{font-family:var(--f-body);font-weight:500;border:1px solid var(--ctl);border-bottom-width:2px;border-radius:4px;padding:.05rem .45rem;background:var(--bg2)}

.pk-card.now .pk-meta,.pk-card.now .pk-c{color:var(--body)}

/* ---------- v3: calmer toolbar, battery level, settings groups, blurred pop-ups ---------- */
.toprow{display:flex;align-items:center;justify-content:space-between;gap:.7rem 1rem;flex-wrap:wrap;margin-bottom:.6rem}
.iconbar{display:flex;gap:.3rem;margin:0;flex-wrap:nowrap}
.ib{width:48px;height:48px;flex:none;background:transparent;border-radius:10px;color:var(--ink2)}
.ib:hover{background:var(--bg2)}
.ib[aria-pressed="true"]{background:var(--hi);color:var(--gold-text);border-color:transparent}
.ib svg{display:block}
.regnote{margin:.1rem 0 1rem}
.seg .tog{min-height:48px}

.set{padding:1rem 0;border-top:1px solid var(--line2)}
.set:first-of-type{border-top:0;padding-top:.2rem}
.set-t{font-family:var(--f-body);font-size:1rem;font-weight:500;color:var(--ink)}
.set-d{color:var(--body);font-size:.95rem;margin:.1rem 0 .6rem}
.set-x{color:var(--muted);font-size:.9rem;margin:.5rem 0 .2rem}
.chip[aria-checked="true"]{background:var(--ink);border-color:var(--ink);color:var(--gold2)}
:root[data-theme="dark"] .chip[aria-checked="true"]{background:var(--gold);border-color:var(--gold);color:#0f0e0c}
.choice.lvl{display:flex;align-items:center;gap:1rem}
.lvl-b{flex:none;color:var(--gold-text);display:flex;width:44px;justify-content:center}
.lvl-t{display:grid;gap:.1rem}
.choice.lvl[aria-checked="true"] .lvl-b{color:var(--gold-text)}

.modal-ov{background:rgba(15,14,12,.5);-webkit-backdrop-filter:blur(10px) saturate(.9);backdrop-filter:blur(10px) saturate(.9)}
.modal{max-height:min(88vh,100%);max-height:min(88dvh,100%);overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.modal.tall{display:flex;flex-direction:column;height:min(86vh,780px);height:min(86dvh,780px);padding-bottom:.9rem}
.modal.tall .modal-b{flex:1;min-height:0;display:flex;flex-direction:column}
.guide-frame{flex:1;width:100%;min-height:0;border:0;border-radius:8px;background:var(--bg)}
.full-link{align-self:center;margin-top:.6rem;font-size:.92rem;color:var(--muted);text-underline-offset:.25em}
body.embed .top{display:none}
body.embed .wrap{padding-top:1rem}
body.embed .gprog{top:0}

/* Spanish, Italian and other Latin-script lessons: a proper reading serif instead of the plain UI sans */
body[data-script="latin"] .words{font-family:var(--f-head);font-weight:500;font-size:calc(2.15rem*var(--fs));line-height:1.2;letter-spacing:.005em;gap:.35rem 1.1rem}
body[data-script="latin"] .vocab .vw,body[data-script="latin"] .pop .pw,body[data-script="latin"] .mini-w,body[data-script="latin"] .free-card .t{font-family:var(--f-head);font-weight:500}
body[data-script="latin"] .vocab .vex,body[data-script="latin"] .pop .pe .ex,body[data-script="latin"] .mini-e{font-family:var(--f-head);font-weight:500;font-size:1.35rem;line-height:1.4}
body[data-script="latin"] .wr{font-size:calc(.9rem*var(--fs))}
body[data-script="latin"] h1.page-title{font-weight:500}

/* ---------- phones and iPads ---------- */
html{-webkit-tap-highlight-color:transparent}
button,a,.w,.choice,.chip{touch-action:manipulation}
.w,.play,.ib,.cb{-webkit-user-select:none;user-select:none}
.top{padding-left:max(clamp(1rem,4vw,2.5rem),env(safe-area-inset-left));padding-right:max(clamp(1rem,4vw,2.5rem),env(safe-area-inset-right));padding-top:max(.9rem,env(safe-area-inset-top))}
.wrap{padding-left:max(clamp(1rem,4vw,1.6rem),env(safe-area-inset-left));padding-right:max(clamp(1rem,4vw,1.6rem),env(safe-area-inset-right))}
.bar{padding-left:max(clamp(.6rem,3vw,1.4rem),env(safe-area-inset-left));padding-right:max(clamp(.6rem,3vw,1.4rem),env(safe-area-inset-right))}
@media(hover:none){.card:hover,.free-card:hover{transform:none}.tog:hover,.ib:hover,.cb:hover,.choice:hover,.pk-card:hover{border-color:inherit;background-color:revert}}
@media(max-width:600px){
  .modal-ov{align-items:flex-end;padding:0}
  .modal,.modal.wide{width:100%;max-height:92vh;max-height:92dvh;border-radius:18px 18px 0 0;padding:1.1rem 1.1rem calc(1.2rem + env(safe-area-inset-bottom));border-bottom:0}
  .modal.tall{height:92vh;height:92dvh;padding-bottom:calc(.8rem + env(safe-area-inset-bottom))}
  .toprow{justify-content:space-between}
  .iconbar{margin-left:auto}
  .ib{width:44px;height:44px}
  body[data-script="latin"] .words{font-size:calc(1.9rem*var(--fs))}
}
@media(min-width:601px) and (max-width:1100px){
  .wrap{max-width:820px;padding-top:2rem}
  .words{font-size:calc(2rem*var(--fs))}
  body[data-script="latin"] .words{font-size:calc(2.4rem*var(--fs))}
  .wr{font-size:calc(1rem*var(--fs))}
  .tr{font-size:calc(1.1rem*var(--fs))}
  .bar-in{max-width:820px}
  .sent{padding:1.3rem 1rem}
  .free-grid{grid-template-columns:repeat(2,1fr)}
}
@media(min-width:601px) and (max-width:900px){
  .bar-in{flex-wrap:wrap;row-gap:.5rem}
  .bar-mid{order:-1;flex:1 1 100%}
}
@media(orientation:landscape) and (max-height:520px){
  .modal{max-height:94vh;max-height:94dvh}.modal.tall{height:94vh;height:94dvh}
  .bar{padding-top:.4rem}
}

/* =====================================================================================
   v4: sticky header, wider page, softer type, segmented levels, floating player
   ===================================================================================== */
:root{--page:1040px;--bar-h:9rem;--h1:64px;--hdr-h:64px}
html{scroll-padding-top:calc(var(--hdr-h) + 5.5rem);scroll-padding-bottom:calc(var(--bar-h) + 1rem)}
body{font-size:1.02rem;line-height:1.65}

/* header: stays on screen while you scroll, like a toolbar */
.top{display:block;position:sticky;top:0;z-index:50;padding:0;background:var(--bg);border-bottom:1px solid var(--line2)}
.top-in{max-width:var(--page);margin:0 auto;display:grid;grid-template-columns:1fr minmax(0,420px) 1fr;align-items:center;gap:1rem;padding:.8rem clamp(1rem,3vw,2rem);padding-left:max(clamp(1rem,3vw,2rem),env(safe-area-inset-left));padding-right:max(clamp(1rem,3vw,2rem),env(safe-area-inset-right));padding-top:max(.8rem,env(safe-area-inset-top))}
.brand{font-size:1.05rem;letter-spacing:.12em;justify-self:start;white-space:nowrap}
.brand b{font-weight:500}
.help{justify-self:end;border-color:var(--line);color:var(--muted);font-weight:400}
.pickbtn{justify-self:center;width:100%;border-radius:12px;border-color:var(--line);min-height:52px;box-shadow:0 1px 2px rgba(0,0,0,.05)}
.pickbtn small{font-size:.8rem;font-weight:400;letter-spacing:.02em;text-transform:none;color:var(--muted)}
.pickbtn span{font-weight:500;font-size:1.02rem}
.tools-row{position:sticky;top:var(--h1);z-index:49;background:var(--bg);border-bottom:1px solid var(--line2)}
.tools-row[hidden]{display:none}
.tools-in{max-width:var(--page);margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:.8rem;padding:.55rem clamp(1rem,3vw,2rem)}
.tools-in .iconbar{margin:0}
.ib{width:50px;height:46px;border-radius:12px;background:var(--bg2);color:var(--ink2)}
.ib[aria-pressed="true"]{background:var(--hi);color:var(--gold-text)}
.seg{background:var(--bg2);border-radius:12px;padding:3px;display:inline-flex}
.seg .tog{border:0;border-radius:9px;min-height:40px;padding:.4rem 1.1rem;text-transform:none;letter-spacing:0;font-size:.98rem;font-weight:500;color:var(--muted);background:transparent}
.seg .tog+.tog{border-left:0}
.seg .tog[aria-pressed="true"]{background:var(--card);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.14)}
:root[data-theme="dark"] .seg .tog[aria-pressed="true"]{background:var(--card);color:var(--gold2)}

/* page: use the width */
.wrap{max-width:var(--page);padding-top:2.6rem;padding-bottom:calc(var(--bar-h) + 3rem)}
.land{max-width:var(--page)}

/* level tabs: one rounded control, like a segmented switch */
.tabs{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:.25rem;background:var(--bg2);padding:.3rem;border-radius:14px;border:0;margin:0 0 2.2rem;overflow:visible}
.tab{border-radius:11px;margin:0;border:0;min-height:60px;padding:.55rem .4rem;font-size:1rem;font-weight:500;letter-spacing:0;text-transform:none;color:var(--muted);align-items:center;justify-content:center}
.tab small{font-size:.84rem;font-weight:400}
.tab[aria-selected="true"]{background:var(--card);color:var(--ink);border:0;box-shadow:0 1px 4px rgba(0,0,0,.14)}
.tab[aria-selected="true"] small{color:var(--gold-text)}

/* header block: quiet and spaced */
.eyebrow{font-size:.98rem;font-weight:400;letter-spacing:0;text-transform:none;color:var(--muted);margin-bottom:.5rem;gap:.9rem}
.badge{font-size:.82rem;font-weight:500;letter-spacing:0;text-transform:none;border:0;border-radius:999px;padding:.15rem .7rem}
.badge.fill{background:var(--hi-on);color:var(--gold-text)}
.lead{font-size:1.05rem;margin-bottom:1.8rem;line-height:1.6}
h1.page-title{font-size:clamp(2.1rem,4.4vw,3rem);margin-bottom:.2rem}
h1.page-title[dir="rtl"]{font-weight:700}
.tt-title{font-weight:400;font-size:1.05rem}
.sub-en{font-size:1.2rem;color:var(--body);margin-bottom:1.2rem}
.regnote{font-size:.95rem;margin:0 0 1.8rem}
.notice{border-radius:10px;border:1px solid var(--line2);background:var(--bg2)}

/* section chips + headings */
.secnav{top:var(--hdr-h);margin:0 calc(-1 * clamp(1rem,3vw,2rem));padding:.7rem clamp(1rem,3vw,2rem);background:var(--bg);gap:.5rem}
.secnav a{text-transform:none;letter-spacing:0;font-size:.98rem;font-weight:500;color:var(--body);border-color:var(--line);min-height:42px;padding:.45rem 1rem}
.block{margin-top:3.4rem}
.sec-h{border-bottom:1px solid var(--line2);padding-bottom:.8rem}
.sec-h h2{font-size:2.1rem}
.sec-h .tog{text-transform:none;letter-spacing:0;font-size:.95rem;font-weight:500;border-radius:10px;min-height:42px}
.sec-note{font-size:1rem;margin-top:.9rem;color:var(--muted)}

/* sentences: more air */
.sent{padding:1.7rem 1.2rem;gap:1.2rem;border-bottom:1px solid var(--line2);border-radius:12px}
.sent .num{font-size:.9rem;font-weight:400;padding-top:.9rem}
.sent .play{width:42px;height:42px}
.sent.on{box-shadow:inset 4px 0 0 var(--bar-c)}
.spk{text-transform:none;letter-spacing:0;font-size:.95rem;font-weight:500}
.words{gap:.3rem 1.2rem}
.wr{font-weight:400;font-size:calc(.95rem*var(--fs))}
.tr{margin-top:.8rem;color:var(--muted);font-size:calc(1.05rem*var(--fs))}
.w{padding:.15rem .4rem}
h2.sec{font-size:2.1rem;margin-top:4rem}
.vocab{grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:1rem}
.vocab li{border-radius:12px;padding:1.1rem 1.3rem}
.vocab .vt{font-weight:400}

/* player: a floating rounded card */
.bar{left:50%;right:auto;transform:translateX(-50%);width:min(var(--page),calc(100% - 1.6rem));bottom:calc(.8rem + env(safe-area-inset-bottom));padding:.7rem 1rem;border:1px solid var(--line);border-top:1px solid var(--line);border-radius:18px;box-shadow:0 12px 36px rgba(0,0,0,.22);padding-left:1rem;padding-right:1rem}
.bar-in{max-width:none}
.stat{font-size:.95rem}
.speed button{text-transform:none;letter-spacing:0;font-weight:500;font-size:.92rem}
.bar .tog{text-transform:none;letter-spacing:0;font-size:.92rem;border-radius:10px}
.cb{border-color:var(--line)}

/* landing + guide in the same frame */
.land h1{font-size:clamp(2.6rem,6vw,4.2rem)}
.land .eyebrow{margin-top:2rem}
.free-grid{gap:1.4rem;margin:3rem 0}
.free-card{border-radius:14px;padding:1.6rem 1.7rem;min-height:240px}
.gprog{top:var(--hdr-h)}
.wrap.guide-wrap,#guide{max-width:820px}
body.embed #guide{max-width:none}

/* ---- tablets ---- */
@media(min-width:601px) and (max-width:1100px){
  :root{--page:900px}
  .words{font-size:calc(2rem*var(--fs))}
  .sent{padding:1.5rem 1rem}
  .vocab{grid-template-columns:repeat(2,1fr)}
}
@media(min-width:601px) and (max-width:900px){
  .top-in{grid-template-columns:auto minmax(0,1fr) auto}
}
/* ---- phones: only the top bar stays; the toolbar scrolls with the page ---- */
@media(max-width:700px){
  .tools-row{position:static}
  .top-in{grid-template-columns:auto minmax(0,1fr) auto;gap:.6rem;padding:.6rem .9rem}
  .brand{font-size:0}
  .brand b{font-size:1.15rem;letter-spacing:.06em}
  .brand span{display:none}
  .pickbtn{min-height:46px}
  .wrap{padding-top:1.4rem}
  .tools-in{padding:.5rem .9rem}
  .seg .tog{padding:.4rem .8rem;font-size:.92rem}
  .ib{width:42px;height:42px}
  .tabs{margin-bottom:1.6rem}
  .tab{min-height:56px}
  .sent{padding:1.3rem .7rem;gap:.8rem}
  .sec-h h2,h2.sec{font-size:1.8rem}
  .block{margin-top:2.6rem}
  .vocab{grid-template-columns:1fr}
  .bar{width:calc(100% - 1rem);bottom:calc(.5rem + env(safe-area-inset-bottom));border-radius:16px}
}
.wrap{padding-left:max(clamp(1rem,3vw,2rem),env(safe-area-inset-left));padding-right:max(clamp(1rem,3vw,2rem),env(safe-area-inset-right))}
@media(max-width:700px){.wrap{padding-left:max(.9rem,env(safe-area-inset-left));padding-right:max(.9rem,env(safe-area-inset-right))}.secnav{margin:0 -.9rem;padding-left:.9rem;padding-right:.9rem}}
@media(max-width:700px){
  .tools-in{flex-wrap:wrap;row-gap:.5rem}
  .tools-in .iconbar{margin-left:auto}
  .bar-in{grid-template-columns:minmax(0,1fr) auto}
  .bar-mid,.ctrls,.speed{min-width:0}
  #pv{justify-self:stretch}
}

/* ---- zoomed out: the whole page is scaled down, and there is no text-size setting ---- */
html{font-size:87.5%}
@media(max-width:700px){html{font-size:93.75%}}
:root{--page:1000px}

/* =====================================================================================
   v5: one-row header, one calm control row, labelled switches, quieter sections
   ===================================================================================== */
:root{--h1:60px;--hdr-h:60px}
.top-in{grid-template-columns:1fr minmax(0,360px) 1fr;padding-top:.7rem;padding-bottom:.7rem}
.pickbtn{min-height:44px;padding:.35rem 1rem;border-radius:999px;box-shadow:none;background:var(--bg2);border-color:transparent;justify-content:center;gap:.7rem}
.pickbtn span{font-weight:500}
.pickbtn:hover{background:var(--card);border-color:var(--line)}
.help{width:40px;height:40px}
.tools-row{display:none}

.ctl{display:flex;align-items:center;justify-content:space-between;gap:.8rem 1.2rem;flex-wrap:wrap;margin:1.8rem 0 .6rem}
.ctl-r{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.seg .tog{font-size:1rem}
.pill{display:inline-flex;align-items:center;gap:.6rem;min-height:44px;padding:.3rem 1rem .3rem .7rem;border-radius:999px;border:1px solid var(--line);background:var(--card);color:var(--body);font-weight:500;font-size:.98rem}
.pill:hover{border-color:var(--gold-text)}
.pill.action{padding:.3rem 1rem .3rem .8rem}
.pill.action svg{flex:none}
.pill .sw{position:relative;flex:none;width:34px;height:20px;border-radius:999px;background:var(--line);transition:background .15s}
.pill .sw::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:var(--card);box-shadow:0 1px 2px rgba(0,0,0,.3);transition:transform .15s}
.pill[aria-pressed="true"]{border-color:var(--gold-text);color:var(--ink)}
.pill[aria-pressed="true"] .sw{background:var(--gold-text)}
.pill[aria-pressed="true"] .sw::after{transform:translateX(14px)}
.regnote{margin:.2rem 0 2rem;font-size:.92rem}

/* sections: plain, quiet headings */
.block{margin-top:3rem}
.sec-h{border-bottom:0;padding-bottom:0}
.sec-h h2{font-size:1.5rem;color:var(--ink2)}
.sec-note{margin-top:.2rem}
.sents{margin-top:.6rem}

/* pronunciation: the learner's line, easy to see */
.wr{font-size:calc(1.05rem*var(--fs));font-weight:500;color:var(--tr);margin-top:.1rem}
body[data-script="latin"] .wr{font-size:calc(1rem*var(--fs))}
.title-block{margin-bottom:1rem}
.eyebrow{margin-bottom:.4rem}
h1.page-title{margin-bottom:.1rem}
.lead{margin:.6rem 0 1.2rem;font-size:1rem}
.notice{padding:.5rem .9rem;font-size:.9rem;margin:.8rem 0}

@media(max-width:700px){
  .top-in{grid-template-columns:auto minmax(0,1fr) auto;gap:.5rem}
  .brand{font-size:.9rem;letter-spacing:.08em}
  .brand b{font-size:inherit;letter-spacing:inherit}
  .brand span{display:inline}
  .pickbtn{min-height:42px;padding:.3rem .8rem}
  .ctl{margin-top:1.2rem}
  .ctl-r{width:100%}
  .pill{font-size:.92rem;padding-right:.8rem}
}

/* ---------- v6: header buttons, right-to-left rows, one type weight per script, word meanings, a quiet audio status ---------- */
.top-r{justify-self:end;display:flex;align-items:center;gap:.45rem}
.top-r .help{justify-self:auto}
.help[hidden]{display:none}
#theme svg{display:block}

/* a sentence and its translation share one column, capped so the eye never has to cross the page */
.sent .body{max-width:46rem}
.sent[dir="rtl"] .tr,.sent[dir="rtl"] .spk{text-align:right}
.sent[dir="rtl"].on{box-shadow:inset -4px 0 0 var(--bar-c)}

/* one weight per script: Persian in Vazirmatn 400, Arabic in Amiri 400, Spanish/Italian in Cormorant 500 (Cormorant is thin, 500 reads like the others' 400) */
h1.page-title[dir="rtl"],.words[dir="rtl"],.vocab .vw,.vocab .vex,.pop .pw,.pop .pe .ex,.mini-w,.mini-e{font-weight:400}
body[data-lang="ar"] h1.page-title,body[data-lang="ar"] .vocab .vw,body[data-lang="ar"] .vocab .vex,body[data-lang="ar"] .pop .pw,body[data-lang="ar"] .pop .pe .ex,body[data-lang="ar"] .pop .pd bdi,body[data-lang="ar"] .mini-w,body[data-lang="ar"] .mini-e{font-family:var(--f-ar);font-weight:400}
body[data-lang="ar"] h1.page-title{font-size:clamp(2.4rem,5vw,3.3rem);line-height:1.7}
body[data-lang="ar"] .vocab .vw,body[data-lang="ar"] .pop .pw{font-size:1.9rem;line-height:1.9}
body[data-lang="ar"] .vocab .vex,body[data-lang="ar"] .pop .pe .ex{font-size:1.35rem;line-height:2}
.words.ar{font-size:calc(2.1rem*var(--fs));line-height:2.05}
body[data-script="rtl"] .pop .pd bdi{font-family:var(--f-rtl);font-size:1.1rem}
body[data-script="latin"] .pop .pd bdi{font-family:var(--f-head);font-weight:500;font-size:1.15rem}

/* tap a word: word, sound, meaning first; the word-list entry underneath */
.pop .pt{margin-top:.1rem}
.pop .pm{margin-top:.45rem;font-size:1.08rem;font-weight:500;color:var(--ink);line-height:1.4;padding-right:1.6rem}
.pop .pe{margin-top:.75rem}
.pop .pl{display:block;font-size:.76rem;font-weight:500;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin-bottom:.25rem}
.pop .pd{color:var(--body);font-size:.95rem;margin-bottom:.2rem}

/* the audio status is information, not an alarm */
.stat{font-size:.86rem;color:var(--muted)}
.stat.warn{border:0;background:none;padding:.1rem 0;font-weight:400;color:var(--body)}
body[data-script="rtl"] .pop .x{right:auto;left:.4rem}
body[data-script="rtl"] .pop .pm{padding-right:0}
.pk-short{display:none}
@media(max-width:480px){.pk-long{display:none}.pk-short{display:inline}.pickbtn{white-space:nowrap}}
@media(max-width:480px){
  .ctl-r{gap:.4rem}
  .pill{min-height:40px;padding:.25rem .75rem .25rem .55rem;gap:.45rem;font-size:.9rem}
  .pill.action{padding:.25rem .75rem .25rem .6rem}
  .words{gap:.2rem .75rem}
  .pill .sw{width:28px;height:16px}.pill .sw::after{width:12px;height:12px}.pill[aria-pressed="true"] .sw::after{transform:translateX(12px)}
}

/* ---------- v7: paragraphs for stories and articles; rows back to the original direction ---------- */
.sent .body{max-width:none}
.para{display:flex;gap:1.2rem;padding:1.7rem 1.2rem;border-bottom:1px solid var(--line2)}
.para .play{flex:0 0 auto;width:42px;height:42px;display:flex;align-items:center;justify-content:center;align-self:flex-start;margin-top:.1rem}
.para .body{flex:1;min-width:0}
.ps{display:contents}
.ps.on .w{background:var(--hi-on)}
.ptext{row-gap:.8rem}
.para .tr{margin-top:1.1rem;line-height:1.7;max-width:46rem}
body.listen .para .play{visibility:visible}
@media(max-width:700px){.para{padding:1.3rem .7rem;gap:.8rem}}

/* ---------- v8: a narrower reading column, and a backdrop so text never shows around the audio bar ---------- */
@media(min-width:900px){:root{--page:820px}}   /* reading column, header and bar all share one width */
.bar{backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);background:var(--card)}
body:has(#bar:not([hidden]))::after{content:"";position:fixed;left:0;right:0;bottom:0;height:calc(var(--bar-h) - 10px);background:linear-gradient(to top,var(--bg) 62%,rgba(247,245,240,0));pointer-events:none;z-index:40}

/* ---------- v9: guide pages (contents, lesson, drill) ---------- */
.arb{font-family:var(--f-ar);font-weight:400;unicode-bidi:isolate}
.cs{max-width:760px}
.cs-p,.cs-ul li{font-size:1.08rem;line-height:1.75;color:var(--ink2)}
.cs-p{margin:0 0 1.1rem}
.cs-p .arb,.cs-ul .arb{font-size:1.3em;line-height:1.5}
.cs-h{font-family:var(--f-head);font-weight:500;font-size:1.65rem;margin:2.1rem 0 .6rem}
.cs-ul{margin:0 0 1.2rem;padding-left:1.3rem;display:grid;gap:.45rem}
.cs-back{display:inline-flex;align-items:center;gap:.4rem;color:var(--muted);text-decoration:none;font-size:.95rem;margin-bottom:1.2rem}
.cs-back svg{transform:scaleX(-1)}
.cs-back:hover{color:var(--gold-text)}
.cs-callout{border-left:3px solid var(--gold-text);background:var(--bg2);padding:.9rem 1.1rem;border-radius:0 12px 12px 0;margin:1.4rem 0}
.cs-callout p{margin:0;color:var(--ink2);line-height:1.65}
.cs-callout-label{display:block;font-size:.74rem;font-weight:500;letter-spacing:.1em;text-transform:uppercase;color:var(--gold-text);margin-bottom:.2rem}
.term{border:0;background:none;padding:0;font:inherit;color:inherit;cursor:help;border-bottom:2px dotted var(--gold-text)}
.term:hover{color:var(--gold-text)}
.cs-ex{background:var(--card);border:1px solid var(--line2);border-radius:14px;padding:1rem 1.2rem;margin:.8rem 0;text-align:center}
.cs-ex .arb{font-size:2rem;line-height:1.9}
.cs-extr{color:var(--tr);font-weight:500}
.cs-exen{color:var(--ink2);margin-top:.15rem}
.cs-exnote{color:var(--muted);font-size:.92rem;margin-top:.5rem}
.cs-forms{display:flex;flex-wrap:wrap;gap:.7rem;justify-content:center;margin:1rem 0 1.4rem}
.cs-form{background:var(--card);border:1px solid var(--line2);border-radius:14px;padding:.7rem 1rem;text-align:center;min-width:104px}
.cs-form .arb{font-size:2.2rem;line-height:1.8}
.cs-form small{display:block;color:var(--muted);font-size:.84rem;line-height:1.3}
.cs-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:.7rem;margin:1rem 0 1.4rem}
.cs-letter{background:var(--card);border:1px solid var(--line2);border-radius:14px;padding:.7rem .8rem;text-align:center}
.cs-letter .arb{font-size:2.4rem;line-height:1.7}
.cs-letter b{display:block;font-weight:500;color:var(--ink)}
.cs-lt2{display:block;color:var(--tr);font-weight:500;font-size:.95rem}
.cs-letter{position:relative}.cs-letter .cs-ltplay{position:absolute;top:.5rem;right:.5rem}
.cs-letter small{display:block;color:var(--muted);font-size:.82rem;line-height:1.3;margin-top:.15rem}
.cs-card{background:var(--card);border:1px solid var(--line2);border-radius:16px;padding:1.2rem 1.4rem;margin:1.2rem 0}
.cs-top{display:flex;gap:1.5rem;align-items:center;justify-content:space-between;flex-wrap:wrap}
.cs-prog{flex:1 1 320px}
.cs-big{font-size:1.15rem;font-weight:500;color:var(--ink);margin:0 0 .5rem}
.cs-note{color:var(--muted);font-size:.95rem;margin:.4rem 0 0;line-height:1.5}
.cs-bar{height:8px;background:var(--bg2);border-radius:99px;overflow:hidden;margin:.5rem 0}
.cs-bar i{display:block;height:100%;background:var(--gold-text);border-radius:99px;transition:width .3s}
.cs-stats{display:grid;gap:.7rem;justify-items:start}
.cs-stat b{font-family:var(--f-head);font-size:2.2rem;line-height:1;margin-right:.4rem;color:var(--ink)}
.cs-stat span{color:var(--muted)}
.cs-kicker{font-size:.76rem;font-weight:500;letter-spacing:.1em;text-transform:uppercase;color:var(--gold-text);margin:0 0 .5rem}
.cs-wrow{display:flex;align-items:center;gap:1rem;padding:.55rem 0;border-top:1px solid var(--line2);flex-wrap:wrap}
.cs-wt{flex:1 1 220px;font-weight:500;color:var(--ink)}
.cs-wn{color:var(--muted)}
.cs-link{background:none;border:0;padding:0;color:var(--gold-text);font:inherit;font-weight:500;text-decoration:underline;cursor:pointer}
.cs-ch{margin:1.4rem 0}
.cs-chh{display:flex;align-items:baseline;gap:.8rem;flex-wrap:wrap;margin-bottom:.4rem}
.cs-chn{font-size:.76rem;font-weight:500;letter-spacing:.1em;text-transform:uppercase;color:var(--gold-text)}
.cs-chh h3{font-family:var(--f-head);font-weight:500;font-size:1.5rem;margin:0}
.cs-les{display:flex;align-items:center;gap:1rem;padding:.9rem 1rem;border:1px solid var(--line2);border-radius:14px;background:var(--card);text-decoration:none;color:inherit;margin:.45rem 0;min-height:60px}
.cs-les:hover{border-color:var(--gold-text)}
.cs-ln{flex:none;width:2.6rem;color:var(--muted);font-weight:500}
.cs-lt{flex:1;display:grid;gap:.1rem;min-width:0}
.cs-lt b{font-weight:500;color:var(--ink)}
.cs-lt small{color:var(--muted);font-size:.9rem}
.cs-ls{flex:none;color:var(--muted);font-size:.9rem}
.cs-les.done{background:var(--bg2)}
.cs-les.done .cs-ls{color:var(--gold-text);font-weight:500}
.cs-drill{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:1.4rem;margin:2.4rem 0 1rem;outline:0}
.cs-btns{display:flex;gap:.7rem;flex-wrap:wrap;margin-top:1rem}
.cs-nextl{display:inline-block;margin-top:1rem}
.cs-q{font-size:1.25rem;line-height:1.5;font-weight:500;color:var(--ink);margin:.4rem 0 .6rem}
.cs-qar{font-size:3rem;text-align:center;line-height:1.6;margin:.2rem 0 .8rem}
.cs-opts{display:grid;gap:.6rem;margin-top:.6rem}
.cs-opt{display:flex;align-items:center;gap:.9rem;text-align:left;min-height:54px;padding:.6rem 1rem;border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--ink);font-size:1.02rem}
.cs-opt:hover:not(:disabled){border-color:var(--gold-text);background:var(--hi)}
.cs-opt:disabled{cursor:default}
.cs-key{flex:none;width:1.7rem;height:1.7rem;border-radius:50%;border:1px solid var(--line);display:grid;place-items:center;font-size:.85rem;color:var(--muted)}
.cs-ot{flex:1}
.cs-ot.arb{font-size:1.8rem;line-height:1.6;text-align:right}
.cs-opt.right{border-color:#2e7d4f;background:rgba(46,125,79,.12)}
.cs-opt.wrong{border-color:#b3342b;background:rgba(179,52,43,.1)}
.cs-fb{margin-top:.9rem;line-height:1.55;min-height:1.4em}
.cs-fb.good{color:#1f6b3f}.cs-fb.bad{color:#9a2a22}
.cs-score{font-family:var(--f-head);font-size:3.6rem;line-height:1;margin:.2rem 0 .6rem;color:var(--ink)}
.cs-review{margin-top:1.2rem}
.cs-rv{border-top:1px solid var(--line2);padding:.8rem 0}
.cs-rq{margin:0 0 .3rem;font-weight:500;color:var(--ink)}
.cs-ra{margin:.2rem 0;color:var(--ink2)}
.cs-ra .arb{font-size:1.5rem}
.cs-ps .arb{font-size:1.2em}
@media(max-width:700px){.cs-grid{grid-template-columns:repeat(2,1fr)}.cs-ex .arb{font-size:1.7rem}.cs-les{padding:.8rem}.cs-ls{display:none}.cs-drill{padding:1.1rem}}
.pop .pm{font-weight:400}
.cs ~ .pop .pw{font-family:var(--f-body);font-size:1.1rem;font-weight:500}

/* ---------- v10: audio, say-it, word cards, build-the-sentence ---------- */
.cs-play{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;min-width:44px;min-height:44px;padding:0 .8rem;font-weight:500;font-size:.95rem}
.cs-ex{position:relative}
.cs-exp{position:absolute;top:.7rem;right:.7rem;min-width:44px;min-height:44px;padding:0}
.cs-words{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:.7rem;margin:1rem 0 1.4rem}
.cs-word{background:var(--card);border:1px solid var(--line2);border-radius:14px;padding:.7rem .8rem .8rem;text-align:center;display:grid;justify-items:center;gap:.1rem}
.cs-word .arb{font-size:2rem;line-height:1.7}
.cs-word b{font-weight:500;color:var(--tr)}
.cs-word small{color:var(--muted);font-size:.88rem;line-height:1.3;margin-bottom:.4rem}
.cs-say{display:grid;gap:.7rem;margin:1rem 0 1.4rem}
.cs-sayrow{display:flex;gap:1rem;align-items:center;justify-content:space-between;flex-wrap:wrap;background:var(--card);border:1px solid var(--line2);border-radius:14px;padding:.8rem 1rem}
.cs-saytx .arb{font-size:1.9rem;line-height:1.7}
.cs-saybtns{display:flex;gap:.5rem;flex-wrap:wrap}
.cs-rec{display:inline-flex;align-items:center;gap:.5rem;min-height:44px;padding:0 .9rem;border:1px solid var(--line);border-radius:999px;background:var(--card);color:var(--ink);font-weight:500;font-size:.95rem}
.cs-rec i{width:12px;height:12px;border-radius:50%;background:#b3342b;display:block}
.cs-rec.on{border-color:#b3342b;background:rgba(179,52,43,.1)}
.cs-rec.on i{animation:csblink 1s infinite}
@keyframes csblink{50%{opacity:.25}}
.cs-big-play{min-height:54px;padding:0 1.3rem;margin:.2rem 0 .6rem;font-size:1.05rem}
.cs-oline{min-height:64px;display:flex;flex-wrap:wrap;gap:.5rem;padding:.7rem;border:2px dashed var(--line);border-radius:14px;margin:.6rem 0;align-items:center}
.cs-oline.right{border-style:solid;border-color:#2e7d4f;background:rgba(46,125,79,.1)}
.cs-oline.wrong{border-style:solid;border-color:#b3342b;background:rgba(179,52,43,.08)}
.cs-opool{display:flex;flex-wrap:wrap;gap:.5rem;padding:.4rem 0;min-height:56px}
.cs-chip{min-height:48px;padding:.1rem 1rem;border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--ink);font-size:1.6rem;line-height:1.7}
.cs-chip:hover:not(:disabled){border-color:var(--gold-text);background:var(--hi)}
@media(max-width:700px){.cs-words{grid-template-columns:repeat(2,1fr)}.cs-chip{font-size:1.4rem}.cs-exp{position:static;margin-top:.5rem}}
.cs-play[hidden],.cs-rec[hidden]{display:none}
.btn[hidden]{display:none!important}

/* ---------- v11: two-step answers, mascot feedback, Practice picker, library badges ---------- */
.cs-opt.sel{border-color:var(--gold-text);background:var(--hi);box-shadow:0 0 0 2px var(--gold-text) inset}
.cs-check{width:100%;margin-top:1rem;min-height:52px;font-size:1.02rem;justify-content:center}
.cs-check:disabled{background:var(--bg2);border-color:var(--line2);color:var(--muted);cursor:default}
.cs-check.ready:not(:disabled){background:#e8742f;border-color:#e8742f;color:#fff}
.cs-fbx{display:grid;grid-template-columns:auto 1fr;gap:1rem;align-items:start;margin-top:1.1rem}
.cs-mascot{display:grid;justify-items:center;gap:.4rem;min-width:84px}
.cs-mascot .mascot{image-rendering:pixelated;animation:csbob 1.6s ease-in-out infinite}
.cs-fbx.bad .cs-mascot .mascot{animation:none}
@keyframes csbob{50%{transform:translateY(-4px)}}
.cs-bubble{font-size:.84rem;font-weight:500;background:var(--bg2);border:1px solid var(--line2);border-radius:999px;padding:.2rem .7rem;white-space:nowrap}
.cs-fbcard{border-radius:14px;padding:1rem 1.15rem;border:2px solid var(--line);background:var(--card)}
.cs-fbx.good .cs-fbcard{border-color:#2e7d4f;background:rgba(46,125,79,.08)}
.cs-fbx.bad .cs-fbcard{border-color:#b3342b;background:rgba(179,52,43,.06)}
.cs-fbh{margin:0 0 .35rem;font-weight:500;font-size:1.12rem;color:var(--ink)}
.cs-fbh .arb{font-size:1.4rem}
.cs-fbt{margin:.2rem 0;color:var(--ink2);line-height:1.6}
.cs-fbw{margin:.7rem 0 .2rem;padding:.6rem .8rem;border-left:3px solid #b3342b;background:rgba(179,52,43,.07);border-radius:0 10px 10px 0;line-height:1.55}
.cs-fbhear{display:flex;align-items:center;gap:.7rem;margin-top:.8rem;color:var(--muted);font-size:.95rem}
.cs-fbdeep{margin-top:.9rem;padding-top:.7rem;border-top:1px solid var(--line2);display:grid;gap:.25rem}
.cs-fbdeep .cs-kicker{margin:0}
.cs-drill>.btn:not(.cs-check){margin-top:1rem}
.cs-result{display:flex;gap:1.4rem;align-items:center;flex-wrap:wrap}
.cs-mastery{display:flex;align-items:center;gap:.6rem;margin:.4rem 0 0;color:var(--muted)}
.cs-mastery b{font-family:var(--f-head);font-size:1.8rem;color:var(--ink);line-height:1}
.badge.strong{background:rgba(46,125,79,.14);color:#1f6b3f;border-color:rgba(46,125,79,.4)}
.badge.solid{background:rgba(184,150,46,.16);color:var(--gold-text);border-color:var(--gold-text)}
.badge.review{background:rgba(179,52,43,.1);color:#9a2a22;border-color:rgba(179,52,43,.4)}
.cs-sum{display:flex;gap:1.6rem;flex-wrap:wrap;margin:.4rem 0 .5rem}
.cs-sum div{display:grid}
.cs-sum b{font-family:var(--f-head);font-size:2rem;line-height:1;color:var(--ink)}
.cs-sum span{color:var(--muted);font-size:.85rem}
.confetti{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:90}
.confetti i{position:absolute;top:-12px;width:9px;height:14px;border-radius:2px;animation:csfall linear forwards;opacity:.95}
@keyframes csfall{to{transform:translate(var(--dx),105vh) rotate(720deg);opacity:.9}}
/* Practice picker */
.pz-sec{margin:1.6rem 0}
.pz-langs{display:flex;gap:.5rem;flex-wrap:wrap}
.pz-lang{min-height:44px;padding:0 1.1rem;border:1px solid var(--line);border-radius:999px;background:var(--card);color:var(--body);font-weight:500}
.pz-lang[aria-pressed="true"]{background:var(--ink);color:var(--bg);border-color:var(--ink)}
.pz-lang:disabled{opacity:.45;cursor:default}
.pz-tiers{display:grid;grid-template-columns:repeat(4,1fr);gap:.7rem}
.pz-tier{display:grid;justify-items:center;gap:.3rem;padding:.8rem .4rem;border:2px solid var(--line2);border-radius:14px;background:var(--card);font-weight:500;color:var(--ink)}
.pz-tier[aria-pressed="true"]{border-color:var(--gold-text);background:var(--hi);box-shadow:0 0 0 2px var(--gold-text) inset}
.pz-skills{display:grid;grid-template-columns:repeat(2,1fr);gap:.7rem}
.pz-skill{display:flex;align-items:center;gap:.9rem;text-align:left;padding:.75rem .9rem;border:2px solid var(--line2);border-radius:14px;background:var(--card);min-height:64px}
.pz-skill[aria-pressed="true"]{border-color:var(--gold-text);background:var(--hi)}
.pz-skill:disabled{opacity:.45;cursor:default}
.pz-glyph{flex:none;width:44px;height:44px;border-radius:12px;background:var(--bg2);display:grid;place-items:center;font-size:1.5rem;color:var(--gold-text);line-height:1}
.pz-st{display:grid}
.pz-st b{font-weight:500;color:var(--ink)}
.pz-st small{color:var(--muted);font-size:.85rem}
.pz-go{width:100%;margin-top:.6rem;min-height:56px;font-size:1.05rem;justify-content:center}
.pz-go:disabled{background:var(--bg2);border-color:var(--line2);color:var(--muted)}
.pz-go.ready:not(:disabled){background:#e8742f;border-color:#e8742f;color:#fff}
.pz-extra{display:grid;grid-template-columns:repeat(3,1fr);gap:.7rem;margin-top:1.6rem}
.pz-tile{display:grid;gap:.15rem;padding:.9rem 1rem;border:1px solid var(--line2);border-radius:14px;background:var(--card);text-decoration:none;color:inherit}
.pz-tile:hover:not(.off){border-color:var(--gold-text)}
.pz-tile.off{opacity:.55}
.pz-tile b{font-weight:500;color:var(--ink)}
.pz-tile small{color:var(--muted);font-size:.85rem;line-height:1.35}
.pz-head{display:flex;align-items:center;gap:.5rem;margin-bottom:.4rem}
.pz-tag{font-size:.74rem;font-weight:500;letter-spacing:.08em;text-transform:uppercase;padding:.2rem .6rem;border-radius:999px;background:var(--ink);color:var(--bg)}
.pz-tag.soft{background:var(--bg2);color:var(--ink2)}
.pz-lv{margin-left:auto;color:var(--muted);font-size:.85rem}
.pz-bm{min-width:40px;min-height:40px;display:grid;place-items:center;border:1px solid var(--line2);border-radius:10px;background:var(--card);color:var(--muted)}
.pz-bm[aria-pressed="true"]{color:var(--gold-text);border-color:var(--gold-text)}
.pz-stats{color:var(--muted);font-size:.88rem;margin:0 0 .6rem}
@media(max-width:700px){.pz-tiers{grid-template-columns:repeat(2,1fr)}.pz-skills{grid-template-columns:1fr}.pz-extra{grid-template-columns:1fr}.cs-fbx{grid-template-columns:1fr;justify-items:start}.cs-mascot{grid-auto-flow:column;align-items:center;justify-items:start}}
/* Arabic inside an English line: a touch bigger so it is readable next to Latin text */
.cs-q .arb,.cs-ot .arb,.cs-fbt .arb,.cs-fbw .arb,.cs-rq .arb{font-size:1.25em;line-height:1.45}
.cs-q,.cs-fbt,.cs-fbw{line-height:1.6}

/* ---------- v12: callouts, tables, FAQ, glossary, previous/next ---------- */
.cs-callout--key{border-left-color:var(--gold-text);background:rgba(184,150,46,.09)}
.cs-callout--trap{border-left-color:#b3342b;background:rgba(179,52,43,.06)}
.cs-callout--trap .cs-callout-label{color:#9a2a22}
.cs-callout--story,.cs-callout--note{border-left-color:var(--line);background:var(--card)}
.cs-callout--story .cs-callout-label,.cs-callout--note .cs-callout-label{color:var(--muted)}
.cs-ol{list-style:decimal}
.cs-ol li::marker{color:var(--gold-text);font-weight:500}
.cs-tablew{overflow-x:auto;margin:1rem 0 1.4rem;-webkit-overflow-scrolling:touch}
.cs-table{width:100%;border-collapse:collapse;background:var(--card);border:1px solid var(--line2);border-radius:14px;overflow:hidden;font-size:1rem}
.cs-table th,.cs-table td{padding:.6rem .8rem;text-align:left;vertical-align:middle;border-bottom:1px solid var(--line2)}
.cs-table th{font-size:.76rem;font-weight:500;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);background:var(--bg2)}
.cs-table tr:last-child td{border-bottom:0}
.cs-table td .arb{font-size:1.55rem;line-height:1.6}
.cs-table td{white-space:nowrap}
.cs-table td:nth-child(n+3){white-space:normal}   /* a four-column table (8.3) fits the desktop column instead of scrolling sideways */
.cs-table td:last-child{white-space:normal;color:var(--ink2)}
.cs-tdplay{min-width:44px;min-height:44px;padding:0;margin-left:.5rem;vertical-align:middle}
.cs-faq{margin-top:2rem}
.cs-faq details{border-top:1px solid var(--line2);padding:.7rem 0}
.cs-faq details:last-child{border-bottom:1px solid var(--line2)}
.cs-faq summary{cursor:pointer;font-weight:500;color:var(--ink);list-style:none;display:flex;justify-content:space-between;gap:1rem;line-height:1.5}
.cs-faq summary::-webkit-details-marker{display:none}
.cs-faq summary::after{content:"+";color:var(--gold-text);font-size:1.3rem;line-height:1;flex:none}
.cs-faq details[open] summary::after{content:"\2212"}
.cs-faq p{margin:.5rem 0 0;color:var(--ink2);line-height:1.65}
.cs-gloss{margin-top:2rem}
.cs-gloss dl{margin:0;display:grid;gap:.55rem}
.cs-gloss dt{font-weight:500;color:var(--ink)}
.cs-gloss dd{margin:0 0 .3rem;color:var(--ink2);line-height:1.6}
.cs-gloss .arb,.cs-faq .arb{font-size:1.2em}
.cs-prevnext{display:flex;justify-content:space-between;gap:1rem;margin:1rem 0 2rem}
.cs-pn{display:inline-flex;align-items:center;gap:.45rem;color:var(--muted);text-decoration:none;font-size:.95rem;max-width:48%}
.cs-pn:hover{color:var(--gold-text)}
.cs-pn.prev svg{transform:scaleX(-1)}
.cs-pn span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* phones: a table becomes a stack of rows, each row a small card, so nothing scrolls sideways */
@media(max-width:700px){
  /* a table row is a stacked card on phones: cell 1 (Arabic, play, flag) on one line, cell 2 (how it sounds) under it, every
     further cell on its own line with its column header as a small label (td[data-label], set in study.js) */
  .cs-table,.cs-table tbody{display:block}
  .cs-table thead{display:none}
  .cs-table tr{display:block;padding:.75rem .85rem .8rem;border-bottom:1px solid var(--line2)}
  .cs-table tr:last-child{border-bottom:0}
  .cs-table td{display:block;padding:.1rem 0;border:0;white-space:normal;line-height:1.45}
  .cs-table td:first-child{display:flex;align-items:center;gap:.5rem;flex-wrap:nowrap;padding:0}
  .cs-table td:first-child .arb{flex:0 1 auto;min-width:0}
  .cs-table td .arb{font-size:1.45rem}
  .cs-table td:nth-child(2){color:var(--tr);font-size:1rem}
  .cs-table td:nth-child(n+3){color:var(--ink2);font-size:.95rem}
  .cs-table td:nth-child(n+3)::before{content:attr(data-label);display:block;font-size:.7rem;font-weight:500;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin-top:.35rem}
  .cs-table td:nth-child(n+3):empty,.cs-table td:nth-child(n+3)[data-label=""]::before{display:none}
  .cs-tdplay{margin-left:0}
}

/* ---------- v13: one top bar for the whole platform, the hub and the language home ---------- */
.top-in.nav2{display:flex;align-items:center;gap:1rem;max-width:1200px}
.nav2 .brand{display:inline-flex;align-items:center;gap:.55rem;text-decoration:none;color:var(--ink)}
.beta{font-style:normal;font-family:var(--f-body);font-size:.6rem;letter-spacing:.14em;text-transform:uppercase;border:1px solid var(--gold-text);color:var(--gold-text);border-radius:999px;padding:.14rem .5rem;line-height:1.2}
.nav-mid{flex:1;display:flex;align-items:center;gap:.9rem;min-width:0}
.nav-lang{display:inline-flex;align-items:center;gap:.45rem;min-height:40px;padding:0 .8rem 0 .9rem;border:1px solid var(--line);border-radius:999px;background:var(--card);color:var(--ink);font-weight:500;white-space:nowrap;font-size:.95rem}
.nav-lang:hover{border-color:var(--gold-text)}
.nav-native{font-family:var(--f-ar);font-size:1.1rem;line-height:1}
.nav-tabs{display:flex;gap:.2rem;background:var(--bg2);padding:3px;border-radius:12px}
.nav-tab{min-height:36px;padding:0 .9rem;border-radius:9px;display:inline-flex;align-items:center;gap:.35rem;text-decoration:none;color:var(--muted);font-weight:500;font-size:.95rem;white-space:nowrap}
.nav-tab:hover{color:var(--ink)}
.nav-tab.current{background:var(--card);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.12)}
.nav-tab.soon{opacity:.5;cursor:default}
.nav-tab small{font-size:.62rem;letter-spacing:.08em;text-transform:uppercase}
.nav-site{color:var(--muted);text-decoration:none;font-size:.9rem;white-space:nowrap;margin-right:.3rem}
.nav-site:hover{color:var(--gold-text)}
.nav-menubtn{display:none}
.nav-sheet{display:grid;gap:.3rem;margin-bottom:1rem}
.nav-sheetlink{display:flex;align-items:center;justify-content:space-between;min-height:48px;padding:0 1rem;border:1px solid var(--line2);border-radius:12px;background:var(--card);color:var(--ink);text-decoration:none;font-weight:500}
.nav-sheetlink.current{border-color:var(--gold-text);color:var(--gold-text)}
.nav-sheetlink.soon{opacity:.5}
.nav-sheetlink small{font-size:.65rem;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
a.nav-sheetlink:hover{border-color:var(--gold-text)}
.nav-langrow{text-decoration:none}
.nav-langrow .nav-native{font-size:1.25rem;margin-right:.3rem}
@media(max-width:1000px){.nav-tab small{display:none}.nav-tab{padding:0 .75rem}.top-in.nav2{gap:.7rem}}
@media(max-width:860px){.nav-tabs,.nav-site{display:none}.nav-menubtn{display:flex}}
@media(max-width:700px){.nav2 .brand{font-size:0;gap:.4rem}.nav2 .brand b{font-size:1.15rem}.nav2 .brand span{display:none}.nav-lang{min-height:38px;padding:0 .7rem;font-size:.9rem}.nav-lang>span{display:none}.nav-mid{gap:.5rem}.top-r{display:flex;gap:.4rem}}
/* hub */
.hub-card{display:grid;gap:.35rem;align-content:start;text-decoration:none;color:inherit;padding:1.2rem 1.3rem;border:1px solid var(--line2);border-top:3px solid var(--gold);border-radius:12px;background:var(--card);min-height:200px}
.hub-card:hover{border-color:var(--gold-text)}
.hub-card .hn{font-family:var(--f-ar);font-size:2rem;line-height:1.5}
.hub-card .hn[dir="ltr"]{font-family:var(--f-head);font-weight:500;font-size:1.9rem;line-height:1.25}
.hub-card .he{font-size:1.15rem;font-weight:500;color:var(--ink)}
.hub-card .hw{color:var(--ink2);line-height:1.5}
.hub-card .hp{color:var(--gold-text);font-weight:500;font-size:.92rem}
.hub-card .go{margin-top:auto;padding-top:.6rem;display:inline-flex;align-items:center;gap:.5rem;color:var(--gold-text);font-weight:500}
.hub-card.soon{border-top-color:var(--line)}
.hub-what{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.8rem;margin:1.6rem 0 .4rem}
.hub-what div{padding:.9rem 1rem;border:1px solid var(--line2);border-radius:12px;background:var(--card)}
.hub-what b{display:block;font-weight:500;color:var(--ink);margin-bottom:.15rem}
.hub-what span{color:var(--muted);font-size:.92rem;line-height:1.45}
/* language home */
.lh-title{display:flex;align-items:baseline;gap:1rem;flex-wrap:wrap}
.lh-title .nat{font-family:var(--f-ar);font-size:2.2rem;color:var(--gold-text);line-height:1.2}
.lh-sec{margin:2.2rem 0 1rem;display:flex;align-items:baseline;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.lh-sec h2{font-family:var(--f-head);font-weight:500;font-size:1.7rem;margin:0}
.lh-sec a{color:var(--gold-text);font-weight:500;text-decoration:none}
.lh-chs{display:grid;gap:.45rem}
.lh-ch{display:flex;align-items:center;gap:1rem;padding:.8rem 1rem;border:1px solid var(--line2);border-radius:12px;background:var(--card);text-decoration:none;color:inherit}
.lh-ch:hover{border-color:var(--gold-text)}
.lh-n{flex:none;width:2.4rem;color:var(--muted);font-weight:500;font-size:.85rem;letter-spacing:.08em}
.lh-t{flex:1;font-weight:500;color:var(--ink);min-width:0}
.lh-m{color:var(--muted);font-size:.9rem;white-space:nowrap}
.lh-ch.soon{opacity:.6}
.lh-tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.8rem}
.lh-tile{display:grid;gap:.2rem;padding:1rem 1.1rem;border:1px solid var(--line2);border-radius:12px;background:var(--card);text-decoration:none;color:inherit}
.lh-tile:hover{border-color:var(--gold-text)}
.lh-tile b{font-weight:500;color:var(--ink)}
.lh-tile small{color:var(--muted);line-height:1.4}
.lh-tile.off{opacity:.55;pointer-events:none}
@media(max-width:700px){.lh-m{display:none}.hub-card{min-height:0}}
.free-card .t[lang="ar"]{font-family:var(--f-ar);font-weight:400;font-size:1.9rem;line-height:1.6}

/* ---------- the lion (mascot/lion-<mood>.png): keep the pixels sharp at every size ---------- */
.mascot{image-rendering:pixelated;image-rendering:crisp-edges;-ms-interpolation-mode:nearest-neighbor;user-select:none;-webkit-user-drag:none}

/* =====================================================================================
   v14: DIRECTION A ("Gold Arcade"), 2026-11-04. Restyles everything above with the tokens and parts in theme.css:
   pixel frames instead of rounded borders, Fraunces 700 headings, Silkscreen for small labels only, block progress,
   a black top bar with the lion, a phone tab bar, and a drill dock. Body text stays DM Sans.
   ===================================================================================== */
:root{--f-rtl:var(--f-fa)}
body[data-lang="ar"],[lang="ar"]{--f-rtl:var(--f-ar)}
body{background:var(--bg)}
.wrap{padding-bottom:4rem}
body.has-dock .wrap{padding-bottom:calc(var(--dock-h,88px) + 3rem)}
body:has(#bar:not([hidden])) .wrap{padding-bottom:calc(var(--bar-h) + 3rem)}
@media(max-width:700px){body.has-dock .wrap{padding-bottom:calc(var(--dock-h,128px) + 2.5rem)}}
html{scroll-padding-top:calc(var(--top-h) + 1.5rem)}

/* the old top bar rules no longer apply: the bar is .app-top (theme.css). Reset the bits that would leak in */
.app-top .help{width:auto;height:auto;border:0;border-radius:0;color:var(--gold3);justify-self:auto}
.app-top .help:hover{color:var(--gold3)}
.app-top .nav-lang{border:0;border-radius:0;background:transparent;color:var(--bg);min-height:44px;padding:0 .7rem;font-weight:500;font-size:.95rem}
.app-top .nav-lang:hover{box-shadow:0 0 0 2px var(--gold3)}
.app-top .nav-lang svg{color:var(--gold3)}
.app-top .nav-native{font-family:var(--f-rtl);font-size:1.15rem;line-height:1;color:var(--gold3)}
.app-top .nav-native:not([dir]){font-family:var(--f-body)}
.app-top .nav-menubtn svg{display:block}

/* headings: Fraunces 700. Arabic and Persian titles use a real bold */
h1.page-title,.land h1,.lh-sec h2,.cs-h,.sec-h h2,h2.sec,.lockbox h2,.modal-h h2,.step h2,.lang-h,.cs-chh h3{font-family:var(--f-head);font-weight:700;letter-spacing:-.01em;color:var(--ink)}
h1.page-title,.land h1{font-size:clamp(2.2rem,5vw,3.2rem);line-height:1.08}
.cs-h{font-size:1.6rem}.lh-sec h2{font-size:1.6rem}.sec-h h2{font-size:1.45rem}.cs-chh h3{font-size:1.3rem}.modal-h h2{font-size:1.45rem;display:flex;align-items:center;gap:.6rem}
h1.page-title[dir="rtl"],body[data-lang="ar"] h1.page-title{font-family:var(--f-rtl);font-weight:700;line-height:1.7}
.lead{color:var(--body)}

/* small labels in the pixel font (16 px, see theme.css) */
.eyebrow,.cs-kicker,.cs-chn,.lh-n,.cs-callout-label,.pk-l,.spk,.step .n,.cs-table th,.pz-tag,.pop .pl{font-family:var(--f-pixel);font-weight:400;font-size:16px;line-height:1.25;letter-spacing:0;text-transform:uppercase;color:var(--gold-text)}
.eyebrow{display:flex;align-items:center;gap:.7rem;margin-bottom:.6rem}
.lh-n{color:var(--muted);width:3.4rem}
.cs-table th{color:var(--muted);background:var(--bg2)}
.badge,.beta{display:inline-flex;align-items:center;font-family:var(--f-pixel);font-size:16px;font-weight:400;line-height:1.5;letter-spacing:0;text-transform:uppercase;padding:0 .35rem;border:0;border-radius:0;color:var(--gold-text);background:transparent;box-shadow:0 0 0 2px var(--gold)}
.badge.fill{background:var(--gold3);color:var(--ink);box-shadow:none}
.badge.strong{color:var(--ok);background:var(--ok-bg);box-shadow:0 0 0 2px var(--ok)}
.badge.solid{color:var(--gold-text);background:var(--hi);box-shadow:0 0 0 2px var(--gold)}
.badge.review{color:var(--bad);background:var(--bad-bg);box-shadow:0 0 0 2px var(--bad)}

/* framed surfaces: no rounded corners anywhere; a strong frame + gold drop on the thing to act on, a quiet frame elsewhere */
.hub-card,.free-card,.cs-card,.cs-drill,.lockbox,.demo{border:0;border-radius:0;background:var(--card);box-shadow:var(--frame-drop);margin:3px 9px 9px 3px}
.hub-card.soon,.lh-ch,.lh-tile,.cs-les,.pz-tile,.pz-skill,.pz-tier,.vocab li,.cs-ex,.cs-form,.cs-letter,.cs-word,.cs-sayrow,.hub-what div,.choice,.nav-sheetlink,.pk-card,.cs-table,.notice,.pz-lang,.chip,.cs-chip{border:0;border-radius:0;box-shadow:var(--frame-soft);margin:2px}
.hub-card.soon{background:var(--bg)}
.hub-card:not(.soon){background:linear-gradient(var(--gold3),var(--gold3)) top/100% 8px no-repeat,var(--card);padding-top:1.5rem}
.hub-card:hover,.free-card:hover{transform:translate(-2px,-2px)}
.hub-card.soon:hover{transform:none}
.lh-ch:hover,.lh-tile:hover,.cs-les:hover,.pz-tile:hover:not(.off),.choice:hover,a.nav-sheetlink:hover,.pk-card:hover{box-shadow:var(--frame-sm);border:0}
.choice[aria-checked="true"],.nav-sheetlink.current,.pk-card.now{box-shadow:var(--frame-sm);background:var(--hi);border:0}
.notice{background:var(--bg2);color:var(--body)}
.free-grid{gap:1.4rem}
.hub-card .hn{font-family:var(--f-rtl);font-weight:700;font-size:2.1rem;line-height:1.6}
.hub-card .hn[dir="ltr"],.free-card .t:not([dir]),.pk-t[dir="ltr"],.pk-t:not([dir]){font-family:var(--f-head);font-weight:700;font-size:1.9rem;line-height:1.25}
.hub-card .he{display:flex;align-items:center;gap:.6rem}
.hub-card .badge{margin-left:0!important}
.hub-card .go,.free-card .go{color:var(--ink);font-weight:700}
.hub-card:not(.soon) .go{align-self:start;background:var(--ink);color:var(--gold3);padding:.55rem 1rem;box-shadow:var(--frame-sm-drop);margin:4px 8px 6px 2px}
.free-card .t,.free-card .t[lang="ar"],.lh-title .nat,.pk-t{font-family:var(--f-rtl);font-weight:700}
.lh-title .nat{color:var(--gold-text);font-size:2.3rem;line-height:1.5}
.cs-card{padding:1.4rem 1.5rem}
.cs-drill{padding:1.5rem}
@media(max-width:700px){.cs-drill{padding:1.15rem}.hub-card,.free-card,.cs-card,.cs-drill{margin:3px 7px 9px 3px}}

/* numbers */
.cs-stat b,.cs-sum b,.cs-score,.cs-mastery b{font-family:var(--f-head);font-weight:700}
.cs-score{font-size:3.2rem}
.cs-stat{display:flex;align-items:center;flex-wrap:wrap;gap:.1rem .4rem;margin:0}
.cs-stat .mascot{margin:0 .2rem 0 0;vertical-align:middle}
.cs-stat small{flex-basis:100%;color:var(--bad);font-weight:700;font-size:.92rem}
.cs-stats .btn{width:100%}

/* block progress on the old bars */
.cs-bar.blocks{height:14px;border-radius:0;overflow:visible;background:var(--track);margin:.6rem 2px}
.cs-bar.blocks i{border-radius:0;background:var(--gold2)}
.gprog{background:var(--bg);border-bottom:0;box-shadow:0 2px 0 var(--line2)}
.gprog .bar-track{height:12px;border-radius:0;background:var(--track);box-shadow:var(--frame-sm)}
.gprog .bar-track i{background:var(--gold2)}
.gprog{top:var(--top-h)}
.prog{height:8px;border-radius:0;background:var(--track)}.prog i{background:var(--gold2)}

/* lists of lessons and chapters */
.lh-ch,.cs-les{background:var(--card)}
.cs-les.done{background:var(--bg2)}
.cs-les.done .cs-ls{color:var(--ok);font-weight:700}
.lh-ch.soon{opacity:.6;background:var(--bg)}
.cs-back,.cs-pn{color:var(--gold-text);font-weight:500}
.cs-link,.lh-sec a{color:var(--gold-text);font-weight:700}

/* callouts */
.cs-callout{border:0;border-left:6px solid var(--gold);border-radius:0;background:var(--bg2);margin:1.4rem 0}
.cs-callout--key{border-left-color:var(--gold);background:#f3e9cc}
.cs-callout--trap{border-left-color:var(--bad);background:var(--bad-bg)}
.cs-callout--story,.cs-callout--note{border-left-color:var(--edge);background:var(--card)}

/* play buttons: a black square with a gold triangle */
.cs-play.lab{padding:0 .9rem}
.cs-rec{border:0;border-radius:0;box-shadow:var(--frame-soft);background:var(--card)}
.cs-rec i{border-radius:0;background:var(--bad)}
.cs-rec.on{box-shadow:0 0 0 2px var(--bad);background:var(--bad-bg)}

/* letter cards and letter forms: Amiri via teach.css, large, with room for the vowel marks */
.cs-grid{gap:.9rem}
.cs-letter{padding:.9rem .7rem 1rem;background:var(--card)}
.cs-letter .arb{font-size:2.8rem;line-height:1.75;display:block}
.cs-letter b{font-weight:700}
.cs-letter .cs-ltplay{position:static;margin:.55rem auto 0;display:flex}
.cs-form .arb{font-size:2.5rem;line-height:1.8}
.cs-ex .arb{font-size:2.1rem;line-height:2}
.cs-word .arb{font-size:2.1rem;line-height:1.9}
.cs-table td .arb{font-size:1.6rem;line-height:1.8}
@media(max-width:700px){.cs-grid{grid-template-columns:repeat(2,1fr);gap:.8rem}.cs-letter .arb{font-size:2.5rem}}

/* Arabic in drills and readings: Noto Naskh, roomy */
.arb{font-family:var(--f-ar)}
.cs-qar{font-size:2.9rem;line-height:2}
.cs-ot.arb{font-size:1.9rem;line-height:1.8}
.cs-q .arb,.cs-ot .arb,.cs-fbt .arb,.cs-fbw .arb,.cs-rq .arb{font-size:1.25em;line-height:1.6}
.words.ar{font-size:calc(2.05rem*var(--fs));line-height:2.15}
.words[dir="rtl"]{font-family:var(--f-rtl)}
.cs-chip{font-family:var(--f-ar);font-size:1.7rem;line-height:1.8;background:var(--card)}

/* transliteration never splits at a hyphen (common.js wraps hyphenated words in .nb) */
.nb,.wr{white-space:nowrap}

/* drill: options, check, feedback */
.cs-opt{border:0;border-radius:0;background:var(--card);box-shadow:var(--frame-soft);margin:2px}
.cs-opt:hover:not(:disabled){background:#fff7e2;box-shadow:var(--frame-sm);border:0}
.cs-opt.sel{background:var(--hi);box-shadow:var(--frame-sm),0 0 0 5px var(--gold3)}
.cs-opt.right{background:var(--ok-bg);box-shadow:0 0 0 3px var(--ok);border:0}
.cs-opt.wrong{background:var(--bad-bg);box-shadow:0 0 0 3px var(--bad);border:0}
.cs-key{border:0;border-radius:0;background:var(--ink);color:var(--gold3);font-family:var(--f-pixel);font-size:16px;width:28px;height:28px}
.cs-opt.right .cs-key{background:var(--ok);color:#fff}.cs-opt.wrong .cs-key{background:var(--bad);color:#fff}
.cs-check,.pz-go{width:auto;min-width:min(100%,280px);margin:1.2rem 2px 6px}
.cs-check:disabled,.pz-go:disabled{background:var(--bg2);color:var(--muted);box-shadow:var(--frame-soft)}
.cs-check.ready:not(:disabled),.pz-go.ready:not(:disabled){background:var(--ink);color:var(--gold3);box-shadow:var(--frame-sm-drop)}
.cs-fbcard{border:0;border-radius:0;box-shadow:var(--frame-soft);background:var(--card)}
.cs-fbx.good .cs-fbcard{background:var(--ok-bg);box-shadow:0 0 0 3px var(--ok)}
.cs-fbx.bad .cs-fbcard{background:var(--bad-bg);box-shadow:0 0 0 3px var(--bad)}
.cs-fbh{font-weight:700}
.cs-fbw{border-left:6px solid var(--bad);border-radius:0;background:#fbeeea}
.cs-fb.good{color:var(--ok)}.cs-fb.bad{color:var(--bad)}
.cs-bubble{border:0;border-radius:0;background:var(--ink);color:var(--gold3);font-family:var(--f-pixel);font-size:16px;font-weight:400;text-transform:uppercase;padding:.15rem .5rem}
/* the lion's moves are in whole blocks (the head art is one block per css px) and steps(), so it never blurs between pixels */
.cs-mascot .mascot{animation:none}
.cs-oline{border:2px dashed var(--edge);border-radius:0}
.cs-oline.right{border:0;box-shadow:0 0 0 3px var(--ok);background:var(--ok-bg)}
.cs-oline.wrong{border:0;box-shadow:0 0 0 3px var(--bad);background:var(--bad-bg)}
.cs-result{gap:1.6rem}
.confetti i{border-radius:0;width:8px;height:8px}

/* Practice picker */
.pz-lang[aria-pressed="true"],.chip[aria-pressed="true"],.chip[aria-checked="true"]{background:var(--ink);color:var(--gold3);box-shadow:var(--frame-sm)}
.pz-tier[aria-pressed="true"],.pz-skill[aria-pressed="true"]{background:var(--hi);box-shadow:var(--frame-sm),0 0 0 5px var(--gold3);border:0}
.pz-glyph{border-radius:0;background:var(--ink);color:var(--gold3)}
.pz-tag{background:var(--ink);color:var(--gold3);border-radius:0;padding:0 .35rem}
.pz-tag.soft{background:var(--bg2);color:var(--ink2)}
.pz-bm{border:0;border-radius:0;box-shadow:var(--frame-soft)}
.pz-bm[aria-pressed="true"]{color:var(--gold-text);box-shadow:var(--frame-sm)}

/* reading page: level tabs, toggles, sentences, the audio bar, word pop-up */
.tabs{border-radius:0;background:transparent;padding:0;gap:.5rem}
.tab{border-radius:0;box-shadow:var(--frame-soft);margin:2px;background:var(--card)}
.tab[aria-selected="true"]{background:var(--gold3);box-shadow:var(--frame-sm);color:var(--ink)}
.tab[aria-selected="true"] small{color:var(--ink)}
.seg{border-radius:0;background:transparent;padding:0;gap:0}
.seg .tog{border-radius:0;box-shadow:var(--frame-soft);margin:2px 0 2px 2px}
.seg .tog[aria-pressed="true"]{background:var(--ink);color:var(--gold3);box-shadow:var(--frame-sm)}
.pill{border:0;border-radius:0;box-shadow:var(--frame-soft);margin:2px;background:var(--card)}
.pill[aria-pressed="true"]{box-shadow:var(--frame-sm);color:var(--ink)}
.pill .sw{border-radius:0;background:var(--track)}
.pill .sw::after{border-radius:0;box-shadow:none;background:var(--card);outline:2px solid var(--edge)}
.pill[aria-pressed="true"] .sw{background:var(--ink)}
.pill[aria-pressed="true"] .sw::after{background:var(--gold3);outline-color:var(--ink)}
.sent{border-radius:0}
.sent.on{background:var(--hi-on);box-shadow:inset 6px 0 0 var(--ink)}
.sent[dir="rtl"].on{box-shadow:inset -6px 0 0 var(--ink)}
.w:hover,.w.open{background:var(--hi);border-radius:0}
.ps.on .w{background:var(--hi-on)}
.tr{color:var(--body)}
body[data-script="latin"] .words,body[data-script="latin"] .vocab .vw,body[data-script="latin"] .pop .pw,body[data-script="latin"] .mini-w,body[data-script="latin"] .free-card .t{font-family:var(--f-body);font-weight:500}
body[data-script="latin"] .vocab .vex,body[data-script="latin"] .pop .pe .ex,body[data-script="latin"] .mini-e,body[data-script="latin"] .pop .pd bdi{font-family:var(--f-body);font-weight:400}
body[data-script="latin"] .words{font-size:calc(1.85rem*var(--fs));line-height:1.35}
.bar{border:0;border-radius:0;background:var(--card);box-shadow:var(--frame-drop);backdrop-filter:none;-webkit-backdrop-filter:none}
.cb{border:0;border-radius:0;box-shadow:var(--frame-soft)}
.speed button{border:0;box-shadow:var(--frame-soft);margin:2px 0 2px 2px}
.speed button[aria-pressed="true"]{background:var(--ink);color:var(--gold3)}
.bar .tog{border:0;border-radius:0;box-shadow:var(--frame-soft)}
.bar .tog[aria-pressed="true"]{background:var(--ink);color:var(--gold3)}
@media(max-width:700px){.bar{bottom:calc(var(--tab-h) + .6rem + env(safe-area-inset-bottom));width:calc(100% - 1.4rem)}.pop{bottom:calc(var(--tab-h) + var(--bar-h) + .6rem)}}
body:has(#bar:not([hidden]))::after{display:none}
.pop{border:0;border-radius:0;box-shadow:var(--frame-drop),0 14px 30px rgba(0,0,0,.18)}
.vocab li{background:var(--card)}

/* modals and the phone menu sheet */
.modal{border:0;border-radius:0;box-shadow:var(--frame-drop),0 24px 60px rgba(0,0,0,.35)}
.modal-x{border-radius:0}
.modal-x:hover{background:var(--hi)}
@media(max-width:600px){.modal,.modal.wide{border-radius:0;box-shadow:0 -3px 0 var(--ink),0 -6px 0 var(--gold2)}}
.nav-sheetlink{background:var(--card)}
.nav-sheetlink small{font-family:var(--f-pixel);font-size:16px}

/* the drill dock (study.js): fixed to the bottom while reading; hides when the drill is on screen */
.drill-dock{position:fixed;z-index:45;left:50%;transform:translateX(-50%);bottom:calc(1rem + env(safe-area-inset-bottom));width:min(var(--page),calc(100% - 2rem));
  display:flex;align-items:center;gap:1rem;padding:.7rem .8rem .7rem 1rem;background:var(--ink);color:var(--bg);box-shadow:0 -3px 0 var(--ink),0 3px 0 var(--ink),-3px 0 0 var(--ink),3px 0 0 var(--ink),6px 6px 0 var(--gold2);transition:transform .2s,opacity .2s}
.drill-dock.away{transform:translate(-50%,140%);opacity:0;pointer-events:none}
.drill-dock .dd-t{flex:1;min-width:0;display:grid;gap:.15rem}
.drill-dock .dd-t b{color:var(--gold3)}
.drill-dock .dd-t span{color:var(--dim);font-size:.95rem}
.drill-dock .blocks{margin:.35rem 0 0;height:10px}
.drill-dock .dd-go{background:var(--gold3);color:var(--ink);box-shadow:none;flex:none}
.drill-dock .dd-go:hover{background:#ffe08f}
@media(max-width:700px){.drill-dock{bottom:calc(var(--tab-h) + .6rem + env(safe-area-inset-bottom));width:calc(100% - 1.4rem);gap:.7rem;padding:.6rem .6rem .6rem .7rem}.drill-dock .dd-t span{font-size:.88rem}.drill-dock .dd-go{min-height:48px;padding:.5rem .9rem;font-size:1rem}}

/* empty states and the hub's "what is inside" row */
.empty{display:flex;align-items:center;gap:1rem;padding:1rem 1.2rem;margin:1rem 2px;background:var(--bg2);box-shadow:var(--frame-soft)}
.empty p{margin:0;color:var(--body)}
.hub-what div{background:var(--card)}
.foot{border-top:2px solid var(--line2)}
kbd{border-radius:0}
.term{border-bottom:2px dotted var(--gold-text)}
/* the top bar's tabs also carry .nav-tab (nav.js syncs them by it): undo the old pill look */
.app-tab.nav-tab{border-radius:0;background:transparent;box-shadow:none;color:var(--dim);min-height:44px;font-weight:400;font-size:16px;gap:0}
.app-tab.nav-tab:hover{color:var(--gold3)}
.app-tab.nav-tab.current{background:var(--gold3);color:var(--ink);box-shadow:none}
.app-tab.nav-tab.soon{opacity:.5}
.streak[hidden]{display:none}
.hub-card .go{justify-self:start}
.hub-card .he{font-weight:700}
.drill-dock[hidden]{display:none}
/* the help window shows guide.html in a frame: no top bar or tab bar inside it */
body.embed .app-top,body.embed .tabbar{display:none}
body.embed{padding-bottom:0}
body.embed .gprog{top:0}
.pk-tabs{border-radius:0;background:transparent;padding:0;gap:.4rem}
.pk-tabs button{border-radius:0;box-shadow:var(--frame-soft);margin:2px}
.pk-tabs button[aria-selected="true"]{background:var(--ink);color:var(--gold3);box-shadow:var(--frame-sm)}
/* lion sizes come from the width/height mascot.js writes (whole-number multiples); CSS never resizes them */
/* letter cards: the play button sits on the same line in every card, however long the description is */
.cs-letter{display:flex;flex-direction:column;align-items:center}
.cs-letter .cs-ltplay{margin-top:auto;position:static}
.cs-letter small{margin-bottom:.55rem}
/* play buttons on reading lines are 44 px like every other target; their look is .pp in theme.css */
.sent .play,.para .play{width:44px;height:44px;min-width:44px;min-height:44px}
.cb.main.pp{width:52px;height:52px}
/* the pixel play button keeps its own colours: theme.css paints it ink with a gold icon, but .cb (later in this file, same
   specificity) was turning the icon ink on ink, so the big button looked like a blank black square (fixed 2026-11-07) */
.cb.pp,.cb.pp:hover{color:var(--gold3)}
.cb.pp.is-playing,.cb.pp.is-playing:hover{color:var(--ink)}
.cb.main.pp:not(.is-playing){box-shadow:var(--frame-sm-drop)}

/* ---------- v15: reader control row, and toggles that never move the text ----------
   Pronunciation and English used display:none, so every line under them jumped (up to 420 px). Now the lines keep
   their space and only fade: visibility + opacity, nothing that changes layout. */
.ctl{align-items:center;gap:.6rem 1rem}
.ctl-r{gap:.5rem;align-items:center}
.ctl .rtog{min-height:44px}
.seg.rseg .tog{border:0;border-radius:0;min-height:44px;padding:0 .9rem;font-size:.95rem;font-weight:700;letter-spacing:0;text-transform:none;color:var(--ink);background:var(--card);box-shadow:var(--frame-soft)}
.seg.rseg .tog[aria-pressed="true"]{background:var(--ink);color:var(--gold3);box-shadow:var(--frame-sm-drop)}
.seg.rseg .tog:hover:not([aria-pressed="true"]){box-shadow:var(--frame-sm)}
body.no-translit .wr{display:block;visibility:hidden;opacity:0}
body.no-trans .tr{display:block;visibility:hidden;opacity:0}
.wr,.tr{transition:opacity .15s linear,visibility 0s linear}
body.no-translit .wr,body.no-trans .tr{transition:opacity .15s linear,visibility 0s linear .15s}
@media(max-width:700px){.ctl{gap:.5rem}.ctl-r{gap:.4rem;width:100%}.ctl .rtog{padding:0 .7rem;font-size:.9rem}}
/* a language that is not ready yet: listed with Soon, not clickable */
.choice.soon{opacity:.6;cursor:default}
.choice.soon:hover{box-shadow:var(--frame-soft)}
.choice.soon .tag{margin-left:.5rem;vertical-align:middle}

/* ---------- lesson feedback (report.js): the flags, and the panel they open ----------
   A flag is a 44 px target around a 16 px pixel glyph. It never sits inside a play button, and where it shares a column with
   one (reading sentences) its outer 2 px overhang, so the column keeps the play button's width and nothing moves. */
.rp-flag{display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;padding:0;margin:0;border:0;border-radius:0;
  background:transparent;color:var(--muted);cursor:pointer;vertical-align:middle;-webkit-tap-highlight-color:transparent}
.rp-flag:hover{color:var(--gold-text);background:var(--hi)}
.rp-flag:focus-visible{outline:3px solid var(--gold-text);outline-offset:-3px}
.rp-flag svg{display:block}
/* headings and drill questions: the row is a plain block, so the heading keeps its own margins and the spacing above and
   below is exactly what it was. The flag is placed over the row's right edge, and the text keeps clear of it with padding.
   On wide screens the flag hangs in the empty margin beside the column instead, so the heading keeps its full width too. */
.rp-hrow,.rp-qrow{position:relative}
.rp-hrow>.rp-flag{position:absolute;top:50%;right:-10px;margin-top:-22px}
.rp-hrow>h1,.rp-hrow>h2,.rp-qrow>.cs-q{padding-right:34px}
.rp-qrow>.rp-flag{position:absolute;top:-.35rem;right:-10px}
@media(min-width:960px){.rp-hrow>h1,.rp-hrow>h2{padding-right:0}.rp-hrow>.rp-flag{right:-56px}}
/* narrower screens: the heading runs inline and the flag follows its last word, so a heading only gets a new line when its
   last line is already full. The row carries the heading's margins. */
@media(max-width:959px){
  .rp-hrow{font-size:0}                                    /* a unitless line-height times 0: the row adds no line of its own */
  .rp-hrow>h1,.rp-hrow>h2{display:inline;padding-right:0}
  .rp-hrow>.rp-flag{position:static;margin:-3px -10px -12px 2px;vertical-align:top}       /* 29 px of layout height: never taller than the line */
  .cs-body>.rp-hrow{margin:2.1rem 0 .6rem}
  #app>.rp-hrow{margin:0 0 .1rem}
}
.cs-table .rp-flag{margin:-4px 0}
/* audio cards */
.cs-ex>.rp-flag{position:absolute;top:.7rem;left:.7rem}
.cs-letter>.rp-flag,.cs-word>.rp-flag{position:absolute;top:0;right:0}
.cs-word{position:relative}
@media(max-width:700px){
  .cs-ex>.rp-flag{position:static;margin-top:.5rem}
  .cs-ex>.rp-flag,.cs-ex>.cs-exp{vertical-align:top}            /* side by side, so the card keeps its height */
  /* say-it rows: the flag takes the top-right corner and the buttons sit at the bottom, so the buttons never wrap under the text */
  .cs-sayrow{position:relative}
  .cs-saybtns>.rp-flag{position:absolute;top:0;right:0}
  .cs-saybtns{align-self:flex-end}
}
/* reading sentences and paragraphs: the flag sits under the play button */
.rp-ctl{flex:0 0 auto;display:flex;flex-direction:column;align-items:center;gap:.2rem;align-self:flex-start}
.rp-ctl>.play{align-self:center}
.rp-ctl>.rp-flag{margin:0 -2px}
body.listen .rp-ctl>.rp-flag{display:none}
.rp-link{display:inline-flex;align-items:center;min-height:44px;margin-top:.3rem;color:var(--muted);font-size:.95rem}
.rp-link:hover{color:var(--gold-text)}
/* the top bar's Feedback button (desktop; phones have it in the menu sheet) */
.app-top .nav-fb svg{display:block}
@media(max-width:1360px){.app-top .nav-fb span{display:none}}   /* the flag alone below 1360: the picker's bar also carries Free guide */
.nav-fbrow{width:calc(100% - 4px);font:inherit;font-weight:500;text-align:left;cursor:pointer}
.nav-fbrow:hover{box-shadow:var(--frame-sm)}

/* the panel */
.modal.rp-sheet{width:min(560px,100%)}
.rp-what,.rp-ans{color:var(--body);line-height:1.5;margin:0 0 .4rem}
.rp-what b,.rp-ans b{color:var(--ink);font-weight:700;overflow-wrap:anywhere}
.rp-l{display:block;font-weight:700;font-size:.95rem;color:var(--ink);margin:1rem 0 .45rem}
.chips.rp-cats{margin-top:0}
.rp-sents{display:grid;gap:.35rem}
.rp-sents .c-d{overflow-wrap:anywhere}
.rp-ta,.rp-in{display:block;width:calc(100% - 4px);margin:2px;padding:.65rem .8rem;font:inherit;font-size:16px;line-height:1.5;color:var(--ink);
  background:var(--card);border:0;border-radius:0;box-shadow:var(--frame-soft);-webkit-appearance:none;appearance:none}
.rp-ta{min-height:5.5rem;resize:vertical}
.rp-in{min-height:48px}
.rp-ta:focus,.rp-in:focus{outline:3px solid var(--gold-text);outline-offset:2px;box-shadow:var(--frame-sm)}
.rp-count{font-size:.8rem;color:var(--muted);text-align:right;margin:.3rem 0 0}
.rp-hp{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}
.rp-ts:not(:empty){margin-top:.8rem}
.rp-note{font-size:.88rem;line-height:1.5;color:var(--muted);margin:1rem 0 0}
.rp-note a{color:var(--gold-text)}
.rp-err:not(:empty){color:#8a1c1c;font-weight:600;line-height:1.45;margin-top:.7rem}
.rp-send{width:calc(100% - 4px);margin-top:.8rem}
.rp-done{display:grid;justify-items:center;text-align:center;gap:.35rem;padding:.4rem 0 .2rem;color:var(--body)}
.rp-thanks{font-family:var(--f-head);font-weight:700;font-size:1.6rem;color:var(--ink)}
.rp-done .btn{margin-top:.6rem;min-width:9rem}
@media(max-width:600px){.modal.rp-sheet{max-height:min(92dvh,100%)}}

/* ---------- drill result: the checking beat, then the verdict (quiz.js done()) ----------
   The result is laid out invisibly during the Check click (.cs-wait), so revealing it moves nothing. */
.cs-live{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
.cs-fbx{position:relative}
.cs-wait{visibility:hidden}
.cs-chk{visibility:visible;position:absolute;top:0;left:0;display:flex;align-items:center;gap:.8rem;color:var(--muted);font-weight:700}
.cs-blink{position:relative;width:120px;height:120px;flex:none}
.cs-blink img{position:absolute;inset:0;image-rendering:pixelated}
.cs-blink img+img{opacity:0;animation:cschk .5s steps(1) 1}
@keyframes cschk{0%,39%{opacity:0}40%,59%{opacity:1}60%,100%{opacity:0}}
.cs-ico{display:inline-flex;vertical-align:-3px;margin-right:.4rem}
.cs-fbx.good .cs-ico{color:var(--ok)}.cs-fbx.bad .cs-ico{color:var(--bad)}
.cs-ico svg{stroke-width:2.6}
/* happy: two quick hops of 2 then 4 blocks. sad: sinks 2 blocks, then sways one block left and right, slowly */
.cs-fbx.good:not(.cs-wait) .cs-mascot .mascot{animation:cshop .64s steps(1) 2}
@keyframes cshop{0%{transform:translateY(0)}20%{transform:translateY(-4px)}40%{transform:translateY(-8px)}60%{transform:translateY(-4px)}80%,100%{transform:translateY(0)}}   /* 2 css px per art pixel: steps of whole blocks */
.cs-fbx.bad:not(.cs-wait) .cs-mascot .mascot{animation:csdroop .36s steps(1) forwards,cssway 2.4s steps(1) .36s infinite}
@keyframes csdroop{0%{transform:translateY(0)}33%{transform:translateY(2px)}66%,100%{transform:translateY(4px)}}
@keyframes cssway{0%,100%{transform:translate(0,4px)}25%{transform:translate(-2px,4px)}50%{transform:translate(0,4px)}75%{transform:translate(2px,4px)}}
/* the burst stays inside the lion's column */
.cs-fbx>.cs-mascot{position:relative;align-self:stretch;align-content:start}
.cs-burst{position:absolute;inset:0;overflow:hidden;pointer-events:none}
.cs-fbx>.cs-mascot>.cs-bubble{position:relative;z-index:1}          /* the words stay on top of the squares */
/* the squares start on a ring outside the lion (--sx, --sy) and move outward (--dx, --dy): never across its face */
.cs-burst i{position:absolute;left:50%;top:30px;width:6px;height:6px;margin:-3px 0 0 -3px;opacity:0;animation:csburst .9s steps(9) forwards}
@keyframes csburst{0%{opacity:0;transform:translate(var(--sx),var(--sy))}12%{opacity:1;transform:translate(var(--sx),var(--sy))}60%{opacity:1;transform:translate(var(--dx),var(--dy))}100%{opacity:0;transform:translate(var(--dx),var(--dy))}}
@media(prefers-reduced-motion:reduce){
  .cs-fbx .cs-mascot .mascot,.cs-fbx.good:not(.cs-wait) .cs-mascot .mascot,.cs-fbx.bad:not(.cs-wait) .cs-mascot .mascot{animation:none}
  .cs-blink img+img{animation:none}
  .cs-burst{display:none}
}

/* a length ("6 min", "About 5 min"): bold and the darkest ink, wherever it shows (R.mins in ui.js) */
.len-min,.cs-lt small .len-min{font-weight:700;color:var(--ink)}

/* ---------- the length chip (R.minChip): gold fill, 2 px ink pixel frame, clock, "6 MIN" ---------- */
.len-chip{display:inline-flex;align-items:center;gap:6px;height:26px;padding:0 7px 0 6px;margin:2px;vertical-align:middle;background:var(--gold3);color:var(--ink);
  box-shadow:var(--frame-sm);font-family:var(--f-pixel);font-size:16px;font-weight:400;font-synthesis:none;line-height:1;letter-spacing:0;text-transform:uppercase;white-space:nowrap}
.len-chip .len-clock{display:block;flex:none;image-rendering:pixelated}
.len-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
/* guide contents: chip above the status, both right-aligned, in a fixed-width column */
.cs-lmeta{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:.4rem;width:8.5rem;text-align:right}
.cs-lmeta .cs-ls{display:flex;align-items:center;justify-content:flex-end;height:28px;line-height:1.2}         /* one height for text and badge: a new status never moves the chip */
@media(max-width:700px){
  .cs-les{display:grid;grid-template-columns:2.2rem minmax(0,1fr);column-gap:.7rem;row-gap:.55rem;align-items:start}
  .cs-les .cs-ln{width:auto;padding-top:.05rem}
  .cs-lmeta{grid-column:2;flex-direction:row;align-items:center;justify-content:flex-start;gap:.75rem;width:auto;text-align:left}
  .cs-lmeta .cs-ls{display:flex;justify-content:flex-start;white-space:nowrap}
}

/* ---------- drill result, 2026-11-07: the lion centred under the answers, its line in a pill under it, then the card full width,
   then Next and "Report this question". The checking lion sits in the same spot, so the reveal moves nothing. ---------- */
.cs-fbx{display:block;justify-items:normal;margin-top:1.1rem}   /* WebKit honours the old phone rule's justify-items:start even on a block */
.cs-fbx>.cs-mascot{display:flex;flex-direction:column;align-items:center;gap:.75rem;min-width:0;padding:20px 0 4px;margin:0 0 1rem}
.cs-fbx .cs-bubble{background:var(--card);color:var(--ink);font-family:var(--f-body);font-weight:700;font-size:1rem;line-height:1.3;text-transform:none;letter-spacing:0;
  padding:.4rem .95rem;margin:2px 6px 6px 2px;box-shadow:var(--frame-sm-drop);white-space:normal;text-align:center;max-width:calc(100% - 8px)}
.cs-fbx.good .cs-bubble{background:var(--ok-bg)}
.cs-fbx.bad .cs-bubble{background:var(--bad-bg)}
.cs-chk{left:0;right:0;flex-direction:column;justify-content:flex-start;align-items:center;gap:.75rem;padding-top:20px}
.cs-burst i{top:80px;width:8px;height:8px;margin:-4px 0 0 -4px}   /* the lion's centre: 20 px padding + half of 120 */
.rp-link.rp-after{margin:1rem 0 0 1rem;vertical-align:middle}
/* build-the-sentence: the answer line keeps its 2 px border (transparent) when it turns green or red, so it never shrinks (layout shift 0) */
.cs-oline.right,.cs-oline.wrong{border:2px solid transparent}

/* ---------- v12: typed answers, the on-screen keyboard, say-it questions, the kind tag ---------- */
.cs-inrow{display:flex;gap:.6rem;align-items:center;flex-wrap:wrap;margin-top:.6rem}
.cs-in{flex:1 1 240px;min-width:0;min-height:56px;padding:.5rem .9rem;border:2px solid var(--line);border-radius:12px;background:var(--bg);color:var(--ink);font:inherit;font-size:1.15rem}
.cs-in.arb{font-size:1.9rem;line-height:1.5;font-family:var(--f-ar);text-align:right}
.cs-in:focus{outline:0;border-color:var(--gold-text);box-shadow:0 0 0 2px var(--gold-text) inset}
.cs-in.right{border-color:#2e7d4f;background:rgba(46,125,79,.1)}
.cs-in.wrong{border-color:#b3342b;background:rgba(179,52,43,.08)}
.cs-in:disabled{color:var(--ink);opacity:1}
.kb-toggle{flex:none;min-height:44px;padding:0 .9rem;border:1px solid var(--line);border-radius:999px;background:var(--card);color:var(--ink);font-family:var(--f-body);font-weight:500;font-size:.92rem}
.kb-toggle[aria-pressed="true"]{border-color:var(--gold-text);background:var(--hi)}
/* The on-screen keyboard (kbd.js). Apple's iPhone key order; every row is one 11-column grid, so every key is the same size.
   Every label names its font: a button does not inherit the page font on an iPhone, which is how "space" once showed in the
   system face. Letters use the Arabic or Persian face, words use DM Sans. */
.kb{margin:.7rem auto .2rem;padding:8px;max-width:540px;border:1px solid var(--line2);border-radius:14px;background:var(--bg2);display:grid;gap:7px;direction:ltr;touch-action:manipulation;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.kb[hidden]{display:none}
.kb-grid{display:grid;gap:7px}
.kb-row{display:grid;grid-template-columns:repeat(11,minmax(0,1fr));gap:5px}
.kb-k{-webkit-appearance:none;appearance:none;box-sizing:border-box;min-width:0;height:46px;margin:0;padding:0;display:flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:8px;background:var(--card);color:var(--ink);box-shadow:0 1px 0 var(--line);font-family:var(--f-body);font-size:1rem;font-weight:500;line-height:1;letter-spacing:0;text-transform:none;white-space:nowrap;overflow:hidden;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.kb-ch{font-weight:400;font-size:1.5rem}
.kb-ar .kb-ch{font-family:var(--f-ar);padding-bottom:6px}       /* the Naskh face sits low in its box: lift it to the optical centre */
.kb-fa .kb-ch{font-family:var(--f-fa);font-size:1.32rem;padding-bottom:2px}
.kb-mark{color:var(--gold-text)}
.kb-ar .kb-mark{font-family:var(--f-ar-teach);font-size:1.55rem;padding-bottom:2px}      /* Amiri carries the dotted circle; Noto Naskh's subset does not */
.kb-fa .kb-mark{font-size:1.45rem}
.kb-k.kb-down,.kb-k:active{border-color:var(--gold-text);background:var(--hi)}
@media(hover:hover){.kb-k:hover{border-color:var(--gold-text)}}
.kb-fn{background:var(--bg);color:var(--ink2);font-family:var(--f-body);font-size:.84rem;font-weight:500}
.kb-fn.kb-del{color:var(--ink)}
.kb-del svg{display:block;flex:none}
.kb-ctl{display:flex;gap:5px}
.kb-ctl .kb-k{flex:0 0 auto;padding:0 .75rem}
.kb-ctl .kb-space{flex:1 1 auto}
.kb-ctl .kb-swap{min-width:4rem;font-size:1.05rem;padding-bottom:0;color:var(--ink)}
.kb-ctl .kb-go{min-width:4.6rem;background:var(--ink);border-color:var(--ink);color:var(--gold3);font-weight:600}
.kb-ctl .kb-go.kb-down,.kb-ctl .kb-go:active{background:var(--ink2);border-color:var(--gold-text)}
.kb-ctl .kb-go.kb-off{background:var(--bg2);border-color:var(--line);color:var(--muted);box-shadow:none}
.kb-ar .kb-swap{font-family:var(--f-ar)}
.kb-fa .kb-swap{font-family:var(--f-fa)}
.kb-bar .kb-ctl{flex-wrap:wrap;justify-content:center}
.kb-bar .kb-k{min-width:44px}
.kb-acc{font-size:1.15rem}
@media(max-width:700px) and (orientation:portrait){
  /* a phone held upright: pinned to the bottom edge like the system keyboard, over the tab bar, edge to edge */
  .kb-script{position:fixed;left:0;right:0;bottom:0;z-index:70;max-width:none;margin:0;padding:8px 3px calc(8px + env(safe-area-inset-bottom));border-width:1px 0 0;border-radius:14px 14px 0 0;box-shadow:0 -8px 24px rgba(15,14,12,.16)}
  .kb-script .kb-row,.kb-script .kb-ctl{gap:4px}
  .kb-ctl .kb-k{padding:0 .55rem}
  body.kb-open{padding-bottom:var(--kb-h,260px)}
}
@media(max-width:359px){.kb-ar .kb-ch{font-size:1.36rem}.kb-fa .kb-ch{font-size:1.16rem}.kb-ctl .kb-k{padding:0 .45rem}}
.cs-diff{margin:.8rem 0 .2rem;display:grid;gap:.35rem}
.cs-diffrow{margin:0;display:flex;gap:.6rem;align-items:baseline;flex-wrap:wrap}
.cs-difflab{flex:none;font-size:.76rem;font-weight:500;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);min-width:6.5rem}
.cs-diffval{font-size:1.1rem;color:var(--ink);word-break:break-word}
.cs-diffval.arb{font-size:1.7rem;line-height:1.5}
.cs-extra{background:rgba(179,52,43,.18);color:#9a2a22;text-decoration:line-through;border-radius:3px;padding:0 .1em}
.cs-missing{background:rgba(184,150,46,.22);color:var(--ink);border-radius:3px;padding:0 .1em;text-decoration:underline;text-underline-offset:.15em}
.cs-diffmarks{flex-basis:100%;color:var(--muted);font-size:1.5rem;margin-top:.1rem}
.cs-difflegend{margin-top:.1rem;font-size:.85rem}
.cs-lenient{color:#8a5a00}
.cs-reveal{margin-top:1rem;display:grid;gap:.8rem}
.cs-rate{display:flex;gap:.6rem;flex-wrap:wrap}
.cs-ratebtn{min-height:48px;padding:0 1.1rem;border:2px solid var(--line);border-radius:999px;background:var(--card);color:var(--ink);font-weight:500}
.cs-ratebtn[aria-pressed="true"]{border-color:var(--gold-text);background:var(--hi);box-shadow:0 0 0 2px var(--gold-text) inset}
.cs-kind{display:inline-block;margin-left:.5rem;padding:.05rem .5rem;border:1px solid var(--line2);border-radius:999px;font-size:.7rem;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);vertical-align:middle}
@media(max-width:700px){.cs-in.arb{font-size:1.6rem}.cs-difflab{min-width:100%}}

/* the 30-day plan tracker's rules (.pl-*) were removed with the card on 2026-11-16 */
@media(max-width:700px){.pl-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:.35rem}.pl-day{min-height:42px;font-size:.9rem}}

/* v14: the free tier. The gate card (first name + email) and the founding-members lock card share one look; locked rows on the
   contents page and locked days on the 30-day tracker are muted with a lock. */
.gt-card{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:1.5rem 1.4rem 1.3rem;margin:1.4rem 0;max-width:560px}
.gt-ico{width:44px;height:44px;border-radius:12px;background:var(--bg2);display:grid;place-items:center;color:var(--gold-text);margin-bottom:.6rem}
.gt-ico svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.gt-t{font-family:var(--f-head);font-weight:500;font-size:1.6rem;line-height:1.2;margin:0 0 .5rem;color:var(--ink)}
.gt-s{color:var(--body);line-height:1.6;margin:0 0 1rem}
.gt-form{display:grid;gap:.6rem}
.gt-row{display:grid;grid-template-columns:1fr 1fr;gap:.6rem}
.gt-in{width:100%;min-height:48px;padding:.6rem .9rem;border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--ink);font:inherit;font-size:16px}
.gt-in:focus{border-color:var(--gold-text);outline:2px solid var(--gold-text);outline-offset:1px}
.gt-hp{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.gt-go{min-height:48px;justify-content:center}
.gt-msg{min-height:1.2rem;margin:0;font-size:.92rem;color:var(--muted)}
.gt-msg.err{color:#b4472f}
.gt-fine{color:var(--muted);font-size:.8rem;margin:.8rem 0 0;line-height:1.5}
.gt-back{display:inline-block;margin-left:1rem}
.cs-les.locked{background:var(--bg2);color:var(--muted);cursor:default}
.cs-les.locked .cs-ln{display:grid;place-items:center;color:var(--muted)}
.cs-les.locked .cs-ln svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8}
.cs-les.locked .cs-lt b{color:var(--muted)}
.cs-les.locked .cs-lmeta{display:grid;gap:.35rem;justify-items:end}
.cs-lockedtag{font-size:.78rem;color:var(--gold-text);font-weight:500}
.cs-join{min-height:40px;padding:.3rem .8rem;font-size:.86rem}
@media(max-width:700px){.gt-row{grid-template-columns:1fr}.cs-les.locked .cs-lmeta{justify-items:start}.cs-les.locked{flex-wrap:wrap}}
/* 2026-11-17: the email gate and the lock card on a desktop (1024 px up). The pixel frame (theme.css --frame-drop, the site's
   .frame-card), square corners, a wider panel (720 px) centred on the page under the lesson title with one gentle gap
   (clamp: 68 px at 1440, 75 at 1920, 84 at 2560; the lead's own margin collapses into it), bigger type, 52 px inputs and buttons,
   and on the gate the happy lion at the top right (gate.js adds it; hidden below 1024 px). Phones keep both cards exactly as they
   were: nothing below applies under 1024 px. */
.gt-lion{display:none}
@media(min-width:1024px){
  .gt-card{position:relative;width:100%;max-width:720px;margin:clamp(4.25rem,3rem + 1.4vw,5.5rem) auto 6px;border:0;border-radius:0;background:var(--card);box-shadow:var(--frame-drop);
    padding:clamp(2rem,1.2rem + .9vw,3rem) clamp(2rem,1.2rem + 1vw,3.2rem) clamp(1.8rem,1rem + .9vw,2.8rem)}
  .gt-card .cs-kicker{font-size:24px;margin:0 0 .6rem}
  .gt-card .gt-t{font-size:clamp(2.2rem,1.2rem + .9vw,3rem);line-height:1.1;margin:0 0 .8rem}
  .gt-gate .cs-kicker,.gt-gate .gt-t{margin-right:96px}               /* keeps the lion's corner clear */
  .gt-card .gt-s{font-size:clamp(1.1rem,.7rem + .4vw,1.35rem);line-height:1.6;margin:0 0 1.4rem;max-width:36em}
  .gt-card .gt-form,.gt-card .gt-row{gap:.9rem}
  .gt-card .gt-in{min-height:52px;padding:.6rem 1rem;border-radius:0;border:2px solid var(--line);font-size:1.05rem}
  .gt-card .gt-go{min-height:52px;font-size:1.05rem}
  .gt-card .gt-msg{font-size:1rem}
  .gt-card .gt-fine{font-size:.92rem;margin-top:1rem}
  .gt-lock .gt-ico{width:52px;height:52px;border-radius:0;margin-bottom:.9rem}
  .gt-lock .gt-ico svg{width:30px;height:30px}
  .gt-lock .gt-go{padding-left:1.6rem;padding-right:1.6rem}
  .gt-lock .gt-back{font-size:1.05rem}
  .gt-lion{display:block;position:absolute;top:clamp(1.6rem,1rem + .7vw,2.4rem);right:clamp(1.6rem,1rem + .8vw,2.6rem);line-height:0}
}
/* 2026-11-16, simplicity batch 1: one next step. The home and contents cards (progress.js R.nextCard) show a kicker, "Next: Lesson
   2.1 ...", its length and one button; the numbers come under the button only once a drill has been taken. The contents page has one
   "founding members" line above its first locked row; a reading ends with a Next lesson button. */
.nx-big{font-size:1.3rem;line-height:1.35;margin:0 0 .6rem}
.nx-meta{margin:0}
.nx-stats{flex:1 1 100%;border-top:1px solid var(--line2);padding-top:.9rem;margin-top:.3rem;display:flex;flex-wrap:wrap;align-items:center;gap:.6rem 1.8rem}
.nx-stats .cs-sum{margin:0}
.nx-stats .cs-sum b,.nx-stats .cs-stat b{font-size:1.5rem}
.nx-done{flex:1 1 100%;margin:0}
.nx-spot{margin:.7rem 0 .6rem}
.rd-end{display:flex;flex-direction:column;align-items:flex-start;gap:1rem;margin:2.4rem 0 1rem}
/* batch 1b (2026-11-16): the home's progress row under the button (lessons done + the block bar, the streak beside), and the note a
   reviewer sees beside a visitor's "Founding members" badge */
.nx-row{display:flex;align-items:center;gap:1.4rem 2rem;flex-wrap:wrap;flex:1 1 100%}
.nx-prog{flex:1 1 220px;min-width:0}
.nx-prog .cs-bar{margin:.4rem 0 0}
.nx-row .cs-stat{margin:0}
.nx-foryou{display:inline-block;color:var(--muted);font-size:.82rem;margin-left:.5rem}
/* the status column of a contents row that carries the visitor's badge plus the note: two lines, never wider than the column */
.cs-lmeta .cs-ls.nx-vis{height:auto;flex-direction:column;align-items:flex-end;white-space:normal;gap:.15rem}
.cs-lmeta .cs-ls.nx-vis .nx-foryou{margin:0}
@media(max-width:700px){.cs-lmeta .cs-ls.nx-vis{align-items:flex-start;white-space:normal}.cs-lmeta.nx-wrap{flex-wrap:wrap}}

/* ---- two registers side by side (Farsi): the written form and the spoken form of one word or sentence, each with its own clip */
.rg-chip{display:inline-block;justify-self:start;font-size:.7rem;font-weight:500;letter-spacing:.08em;text-transform:uppercase;line-height:1.3;border-radius:999px;padding:.16rem .6rem;border:1px solid var(--line);color:var(--muted);background:var(--card);white-space:nowrap}
.rg-chip--spoken{border-color:var(--gold-text);color:var(--gold-text);background:rgba(184,150,46,.09)}
.rg-chip--both{border-style:dashed}
.rg-ask{margin:.2rem 0 0}
.rg-pair{background:var(--card);border:1px solid var(--line2);border-radius:14px;padding:.7rem 1rem .8rem;margin:.8rem 0}
.rg-row{display:grid;grid-template-columns:5.6rem minmax(0,1fr) 44px auto;align-items:center;gap:.2rem .7rem;padding:.35rem 0}
.rg-row+.rg-row{border-top:1px dashed var(--line2)}
.rg-tx{text-align:center;min-width:0}
.rg-tx .arb{font-size:1.75rem;line-height:1.85}
.rg-play{min-width:44px;min-height:44px;padding:0}
.rg-en{color:var(--ink2);text-align:center;margin:.3rem 0 0;padding-top:.5rem;border-top:1px solid var(--line2)}
.rg-who{font-size:.76rem;font-weight:500;letter-spacing:.1em;text-transform:uppercase;color:var(--gold-text);margin:0 0 .1rem}
.rg-list,.rg-dlg{display:grid;gap:.7rem;margin:1rem 0 1.4rem}
.rg-list .rg-pair,.rg-dlg .rg-pair{margin:0}
.rg-dlg .cs-kicker{margin:0}
.rg-ex .cs-exnote{text-align:center}
.rg-wsp{display:grid;justify-items:center;gap:.15rem;width:100%;margin-top:.5rem;padding-top:.55rem;border-top:1px dashed var(--line2)}
.rg-wsp .arb{font-size:1.6rem;line-height:1.6}
.rg-also{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem .6rem;margin-top:.45rem;color:var(--muted)}
.rg-also .arb{font-size:1.25rem;line-height:1.5}
.cs-saytx .rg-chip{margin-bottom:.15rem}
@media(max-width:700px){
  .rg-row{grid-template-columns:minmax(0,1fr) 44px auto}
  .rg-row .rg-chip{grid-column:1/-1;justify-self:center}
  .rg-tx .arb{font-size:1.5rem}
}
/* ---- a short route through a guide ("I can speak but can't read") */
.pth-card{display:grid;gap:.5rem}
.pth-tx{margin:0;color:var(--ink2);line-height:1.6}
.pth-ls{display:grid;gap:.35rem;margin:.3rem 0 .4rem}
.pth-l{display:block;padding:.6rem .8rem;border:1px solid var(--line2);border-radius:12px;background:var(--card);color:var(--ink);text-decoration:none;min-height:44px}
.pth-l:hover{border-color:var(--gold-text)}
.pth-l.done{color:var(--muted)}
.pth-l.locked{color:var(--muted);border-style:dashed}
.pth-go{justify-self:start}

/* ---- local review strip (gate.js): only ever drawn when the page is served from localhost */
.lp-strip{margin:0;padding:.45rem 1rem;text-align:center;font-size:.82rem;line-height:1.5;color:var(--ink2);background:rgba(184,150,46,.12);border-bottom:1px solid var(--line2)}
.lp-sw{color:var(--gold-text);text-decoration:underline;text-underline-offset:2px;white-space:nowrap}

/* ---------- progress that feels good (2026-11-14): quiz.js meter / trail / countUp, used by study.js and practice.js ----------
   Quiet on purpose: one eased fill, one soft pulse, a small "+1" for a right answer, the lion's sunglasses at a streak.
   theme.css switches every animation and transition off for reduced motion, and the scripts skip the "+1" then. */
.cs-meterwrap{position:sticky;top:var(--top-h);z-index:6;margin:0 -4px;padding:8px 4px 6px;background:var(--card)}
.cs-meterwrap .cs-meter{margin:0 2px}
body.embed .cs-meterwrap{top:0}
.cs-meter i{transition:width .5s cubic-bezier(.2,.9,.3,1)}
.cs-meter.cs-pulse{animation:csmeter .6s ease-out}
@keyframes csmeter{0%{box-shadow:var(--frame-sm),0 0 0 0 rgba(212,175,80,.6)}100%{box-shadow:var(--frame-sm),0 0 0 9px rgba(212,175,80,0)}}
.cs-plus{position:absolute;bottom:calc(100% + 3px);z-index:2;font-family:var(--f-pixel);font-size:14px;line-height:1;color:var(--gold-text);pointer-events:none;transform:translateX(-50%);animation:csplus .95s ease-out forwards}
@keyframes csplus{0%{opacity:0;transform:translate(-50%,6px)}20%,70%{opacity:1}100%{opacity:0;transform:translate(-50%,-12px)}}
/* a streak moment: the bubble turns black and gold, the lion wears its sunglasses (quiz.js feedback) */
.cs-fbx.cs-streak .cs-bubble{background:var(--ink);color:var(--gold3);box-shadow:0 0 0 2px var(--gold2)}
/* the end of a drill or a session: every answer in order, gold for right, hollow for missed, grey for one you rated yourself */
.cs-trail{display:flex;flex-wrap:wrap;gap:4px;margin:.1rem 0 .8rem}
.cs-trail i{flex:none;width:14px;height:14px;background:var(--track);box-shadow:0 0 0 2px var(--ink) inset;animation:cstrail .28s ease-out both}
.cs-trail i.ok{background:var(--gold2)}
.cs-trail i.no{background:var(--card)}
@keyframes cstrail{0%{opacity:0;transform:scale(.4)}100%{opacity:1;transform:scale(1)}}
.cs-beststreak{margin:0 0 .5rem;font-family:var(--f-pixel);font-size:14px;line-height:1.3;text-transform:uppercase;color:var(--gold-text)}
.cs-mascot.cs-cheer .mascot{animation:cshop .64s steps(1) 3}
/* practice: the session length (two buttons, the same frame as the difficulty tiles) */
.pz-goals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem;max-width:440px}
.pz-goal{display:grid;justify-items:center;gap:.15rem;min-height:64px;margin:2px;padding:.7rem .6rem;border:0;border-radius:0;background:var(--card);color:var(--ink);font-family:var(--f-body);box-shadow:var(--frame-soft)}
.pz-goal b{font-weight:700}
.pz-goal small{color:var(--muted);font-size:.84rem}
.pz-goal[aria-pressed="true"]{background:var(--hi);box-shadow:var(--frame-sm),0 0 0 5px var(--gold3)}
/* readings: the gold line under the top bar is the progress. Dim at the top of the page, it fills as you read down and empties
   as you scroll back up (reader.js). It takes the place of the top bar's own gold line, so the page gains no new stripe. */
.rd-prog{position:fixed;left:0;right:0;top:var(--top-h);z-index:49;height:4px;background:#5c4b1d;pointer-events:none}
.rd-prog i{display:block;height:100%;background:var(--gold3);transform-origin:0 50%;transform:scaleX(0);transition:transform .12s linear}
.rd-prog[hidden]{display:none}
body.has-rdprog .app-top{box-shadow:none}
body.embed .rd-prog{top:0}
/* the practice question's tag row: on a phone the tags wrap instead of pushing the bookmark off the screen */
.pz-head{flex-wrap:wrap;row-gap:.35rem}
.pz-head .pz-bm{margin-left:auto}


/* ---------- tables with audio, aligned (2026-11-14) ----------
   Every cell of an audio column is one grid: the word in its own area, then the play button and the flag in two fixed 44 px
   columns. The cells of a column share a width, so the buttons line up down the table whatever the length of the word.
   Persian and Arabic words sit against the buttons (they start on the right); the header sits over the word area. */
.cs-table td.cs-tda{white-space:normal;padding-top:.25rem;padding-bottom:.25rem}
/* a word or short phrase is never broken (خوب است stays on one line): its slot is as wide as the phrase, so the column grows and the
   text columns give way; .9rem of air before the play button. Only a long sentence (cs-tdc-long) may wrap. */
.cs-tdc{display:grid;grid-template-columns:minmax(max-content,1fr) 44px 44px;align-items:center;column-gap:0;min-height:52px}
.cs-tdc-long{grid-template-columns:minmax(4.5rem,1fr) 44px 44px}
.cs-tdw{min-width:0;padding-right:.9rem;white-space:nowrap}
.cs-tdw-long{white-space:normal}
/* a form and its sound in one cell (رو rav): the script in a fixed slot at full size, the sound beside it */
.cs-tdpair{display:inline-grid;grid-template-columns:minmax(3.4rem,max-content) auto;align-items:baseline;column-gap:.8rem;white-space:nowrap}
.cs-tdpair .arb{display:block;text-align:start}
.cs-tdtr{color:var(--tr)}
.cs-tdw .arb{display:block;text-align:start}
.cs-tdc .cs-tdplay{grid-column:2;margin:0}
.cs-tdc .rp-flag{grid-column:3;margin:0}
.cs-table th.cs-tha{padding-right:calc(.8rem + 88px)}
.cs-table{width:calc(100% - 4px)}                               /* the frame's 2 px margins used to make every table scroll 4 px sideways */
.cs-table td.cs-tdlong{white-space:normal}
.cs-table-au td{height:60px}
/* five columns (the verb table): tighter cells on a wide screen, so nothing is cut off at the right edge */
@media(min-width:701px){
  .cs-table-wide th,.cs-table-wide td{padding-left:.5rem;padding-right:.5rem}
  .cs-table-wide td .arb{font-size:1.4rem}
  .cs-table-wide .cs-tdc{grid-template-columns:minmax(max-content,1fr) 40px 34px}
  .cs-table-wide .cs-tdw{padding-right:.6rem}
  .cs-table-wide .cs-tdplay{min-width:40px;width:40px}
  .cs-table-wide .rp-flag{width:34px}
  .cs-table-wide th.cs-tha{padding-right:calc(.5rem + 74px)}
  .cs-table-wide .cs-tdpair{column-gap:.5rem}
}                                   /* one row height for the whole table unless a cell wraps */
@media(max-width:700px){
  /* phones: each row is a card. The audio line is word | play | flag with the buttons on the card's right edge, on every card. */
  .cs-table td.cs-tda{padding:0}
  .cs-table-au td{height:auto}
  .cs-table td:first-child.cs-tda{display:block}
  .cs-tdc{grid-template-columns:minmax(max-content,1fr) 44px 44px;min-height:48px}
  .cs-tdc-long{grid-template-columns:minmax(0,1fr) 44px 44px}
  .cs-table td:nth-child(2).cs-tda{color:inherit;font-size:inherit}
  /* written and spoken side by side: every line of the card is label | value, so the words start on one line down the card */
  .cs-table-au2 td,.cs-table-au2 td:first-child.cs-tda{display:grid;grid-template-columns:4.9rem minmax(0,1fr);column-gap:.6rem;align-items:center;padding:.12rem 0}
  .cs-table-au2 td::before,.cs-table-au2 td:nth-child(n+3)::before{content:attr(data-label);display:block;margin:0;font-size:.68rem;font-weight:500;letter-spacing:.06em;line-height:1.25;text-transform:uppercase;color:var(--muted)}
  .cs-table-au2 td:nth-child(2):not(.cs-tda){color:var(--ink2);font-size:.95rem}
  .cs-table-au2 td:not(.cs-tda){min-height:34px}
}

/* "Correct! Also written: seven": the answer was right in another form (a digit, a synonym, a missing half space) */
.cs-also{font-weight:500;color:var(--ink2)}
.cs-also .cs-alsov{font-weight:700;color:var(--ink)}
.cs-also .cs-alsov.arb{font-size:1.35em;line-height:1.4}

/* ---------- the compact progress bar beside Next, and a tidy question header (2026-11-14) ---------- */
.cs-nextrow{display:flex;align-items:center;flex-wrap:wrap;gap:.8rem 1.1rem;margin-top:1rem}
.cs-nextrow>.btn{margin:0;flex:none}
.cs-minibar{display:flex;align-items:center;gap:.6rem;flex:1 1 150px;min-width:140px;max-width:280px}
.cs-minibar[hidden]{display:none}
.cs-minibar .cs-mini{flex:1;height:10px;margin:0 2px}
.cs-minin{flex:none;font-family:var(--f-pixel);font-size:14px;line-height:1;color:var(--muted);white-space:nowrap}
/* "Question 3 of 12 · Level 3/5 [Say it]": one line when it fits; on a phone the count, then level and kind as two tags */
.cs-qhead{display:flex;align-items:center;flex-wrap:wrap;gap:.35rem .5rem}
.cs-qhead .cs-klv::before{content:"\00b7";margin-right:.5rem}
.cs-qhead .cs-kind{margin-left:auto}
@media(max-width:600px){
  .cs-qhead .cs-kq{flex:1 0 100%}
  .cs-qhead .cs-klv::before{content:none}
  .cs-qhead .cs-klv,.cs-qhead .cs-kind{margin:0;padding:.1rem .5rem;border:1px solid var(--line2);border-radius:999px;font-family:var(--f-body);font-size:.7rem;font-weight:500;letter-spacing:.06em;line-height:1.5;text-transform:uppercase;color:var(--muted)}
}

/* ---------- accounts: the sign-in page (account.html, signin.js) and the small account entries on other pages (account.js).
   Gold Arcade: the lion stands on a pixel-framed card; pixel type only for the kicker, the labels and the code's digits.
   No inline styles anywhere: the page is served with a strict Content-Security-Policy. ---------- */
.ac-wrap{max-width:440px;margin:0 auto;display:grid;justify-items:center}
.ac-lion{position:relative;z-index:1;margin:0 0 -4px}                      /* the lion stands on the card's top edge */
.ac-lion img{display:block}
.ac-card{width:calc(100% - 12px);margin:3px 9px 9px 3px;padding:1.7rem 1.4rem 1.4rem}
.ac-k{margin:0 0 .45rem}
.ac-t{font-family:var(--f-head);font-weight:700;font-size:1.9rem;line-height:1.15;margin:0 0 .6rem;color:var(--ink)}
.ac-t:focus{outline:none}
.ac-s{color:var(--body);line-height:1.6;margin:0 0 1.2rem}
.ac-mail{color:var(--ink);overflow-wrap:anywhere}
.ac-form{display:grid;gap:.55rem;margin:0}
.ac-lab{font-family:var(--f-pixel);font-size:16px;line-height:1.25;text-transform:uppercase;color:var(--gold-text)}
.ac-in{width:calc(100% - 4px);min-height:52px;margin:2px;padding:.6rem .9rem;border:0;border-radius:0;background:var(--bg);color:var(--ink);font:inherit;font-size:17px;box-shadow:var(--frame-sm);-webkit-appearance:none;appearance:none}
.ac-in::placeholder{color:var(--edge)}
.ac-in:focus{outline:none;box-shadow:var(--frame-sm),0 0 0 5px var(--gold2)}
.ac-go{width:calc(100% - 8px);margin:.6rem 6px 4px 2px}
.ac-msg{min-height:1.35rem;margin:.1rem 0 0;font-size:.92rem;line-height:1.45;color:var(--muted)}
.ac-msg.err{color:var(--bad)}
.ac-fine{color:var(--muted);font-size:.82rem;line-height:1.55;margin:.9rem 0 0}
.ac-under{display:flex;flex-wrap:wrap;gap:.2rem 1.5rem;justify-content:center;align-items:center;margin:1.1rem 0 0;font-size:.95rem}
.ac-link,.ac-back{display:inline-flex;align-items:center;min-height:44px}
.ac-link:disabled{color:var(--muted);text-decoration:none;cursor:default}
/* the code: one real input over six boxes, so iPhone's "From Mail" suggestion and paste both work */
.ac-code{position:relative;height:60px;margin:2px}
.ac-cells{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;height:100%}
.ac-cell{display:grid;place-items:center;background:var(--bg);box-shadow:var(--frame-soft);font-family:var(--f-pixel);font-size:24px;line-height:1;color:var(--ink)}
.ac-cell.has{background:var(--card);box-shadow:var(--frame-sm)}
.ac-cell.at{box-shadow:var(--frame-sm),0 0 0 5px var(--gold2)}
.ac-cell.at:empty::after{content:"";width:3px;height:24px;background:var(--ink);animation:ac-caret 1s steps(1) infinite}
@keyframes ac-caret{50%{opacity:0}}
.ac-codein{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:0;background:transparent;color:transparent;caret-color:transparent;font-size:16px;outline:none;-webkit-appearance:none;appearance:none}
.ac-codein::selection{background:transparent}
/* test mode (preview and local only): the code is shown because no email is sent yet */
.ac-test{display:grid;gap:.35rem;justify-items:start;margin:0 2px 1.1rem;padding:.8rem .9rem .5rem;background:rgba(240,204,114,.3);box-shadow:0 0 0 2px var(--gold)}
.ac-testtx{margin:0;font-size:.92rem;line-height:1.5;color:var(--ink2)}
.ac-testcode{font-family:var(--f-pixel);font-size:24px;font-weight:400;line-height:1;letter-spacing:.08em;color:var(--ink);white-space:nowrap}
/* your account */
.ac-ok{margin:0 0 1rem;padding:.6rem .8rem;background:var(--ok-bg);color:var(--ok);font-size:.95rem;line-height:1.45}
.ac-facts{display:grid;grid-template-columns:auto 1fr;gap:.6rem 1.1rem;align-items:baseline;margin:0 0 .6rem;padding:.9rem 0;border-top:2px solid var(--line2);border-bottom:2px solid var(--line2)}
.ac-facts dt{font-family:var(--f-pixel);font-size:16px;line-height:1.4;text-transform:uppercase;color:var(--gold-text)}
.ac-facts dd{margin:0;color:var(--ink);overflow-wrap:anywhere;line-height:1.4}
.ac-sync{display:block;color:var(--muted);font-size:.82rem;margin-top:.1rem}
.ac-nameform{margin:1.5rem 0 0}
.ac-outs{display:grid;gap:.3rem;justify-items:start;margin:1.2rem 0 0;padding-top:1rem;border-top:2px solid var(--line2)}
.ac-outs .ac-go{width:auto;margin:2px}
@media(max-width:420px){.ac-facts{grid-template-columns:1fr;gap:.1rem}.ac-facts dd{margin-bottom:.6rem}.ac-facts dd:last-child{margin-bottom:0}.ac-card{padding:1.5rem 1.1rem 1.2rem}.ac-cells{gap:8px}}
/* on other pages: the dashboard's account line, the gate's "already have an account", the menu row, the top bar's button */
.ac-strip{margin:.3rem 0 1.3rem 3px;font-size:.92rem;line-height:1.5;color:var(--muted)}
.ac-strip[hidden],.ac-have[hidden]{display:none}
.nav-sheetlink .ac-rowmail{max-width:58%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-family:var(--f-body);font-weight:400;font-size:.82rem;text-transform:none;letter-spacing:0}   /* an email is not a pixel label */
.app-top .nav-acct svg{display:block}
.app-top .nav-acct.on{background:var(--gold3);color:var(--ink);box-shadow:0 0 0 2px var(--gold3)}
@media(max-width:1360px){.app-top .nav-acct-t{display:none}}                /* the icon alone, like Feedback */
@media(max-width:700px){.app-top .nav-acct{display:none}}                   /* phones: the row in the menu sheet and the line on the dashboard. From 701 up the button fits (the tabs are in the menu up to 1040) */
/* accounts, batch 2: the human check's box, the email-list box, Delete my account */
.ac-human{margin:.2rem 2px 0}
.ac-human:empty{display:none}
.ac-tick{position:relative;display:grid;grid-template-columns:auto 1fr;gap:.75rem;align-items:start;margin:.6rem 2px .2rem;padding:.85rem .9rem;background:rgba(240,204,114,.24);box-shadow:0 0 0 2px var(--gold);cursor:pointer}
.ac-tickin{position:absolute;left:.9rem;top:.85rem;width:28px;height:28px;margin:0;opacity:0;cursor:pointer}      /* the real box, over the drawn one */
.ac-tickbox{width:28px;height:28px;display:grid;place-items:center;background:var(--card);box-shadow:var(--frame-sm);color:transparent}
.ac-tickbox svg{display:block;stroke-width:3}
.ac-tickin:checked+.ac-tickbox{background:var(--ink);color:var(--gold3)}
.ac-tickin:focus-visible+.ac-tickbox{box-shadow:var(--frame-sm),0 0 0 5px var(--gold2)}
.ac-ticktx b{display:block;color:var(--ink);font-weight:700;line-height:1.35}
.ac-ticktx small{display:block;margin-top:.2rem;color:var(--body);font-size:.84rem;line-height:1.45}
.ac-listform{margin:1.3rem 0 0}
.ac-testhuman{color:var(--muted);font-size:.84rem}
.ac-del{margin:1.2rem 0 0;padding-top:.6rem;border-top:2px solid var(--line2)}
.ac-delopen{color:var(--bad)}
.ac-delopen[hidden]{display:none}
.ac-delbox{display:grid;gap:.55rem;margin:.5rem 2px 0;padding:.95rem .9rem .6rem;background:var(--bad-bg);box-shadow:0 0 0 2px var(--bad)}
.ac-delbox p{margin:0;color:var(--ink2);font-size:.93rem;line-height:1.5}
.ac-delbox .ac-delt{font-family:var(--f-head);font-weight:700;font-size:1.2rem;color:var(--ink)}
.ac-delbox .ac-lab{color:var(--bad)}
.btn.ac-danger{background:var(--bad);color:#fff;box-shadow:var(--frame-sm)}
.btn.ac-danger:hover{background:#7f2019}
/* accounts, batch 3: Continue with Google / Apple, the plain tick box in the delete panel, the admin link */
.ac-or{display:flex;align-items:center;gap:.8rem;margin:.9rem 2px .2rem;font-family:var(--f-pixel);font-size:16px;text-transform:uppercase;color:var(--muted)}
.ac-or::before,.ac-or::after{content:"";flex:1;height:2px;background:var(--line2)}
.ac-prov{gap:.65rem;text-decoration:none}
.ac-provmark{flex:none;display:block}
.ac-provtest{margin-left:.2rem}
.ac-tick-plain{background:var(--card);box-shadow:0 0 0 2px var(--bad)}
.ac-adminlink{text-decoration:none}
@media(max-width:700px){.ac-lion{margin-bottom:-2px}.ac-t{font-size:1.65rem}.ac-s{margin-bottom:.9rem}}   /* phones: a little tighter, so the button is on the screen */
/* the email gate for a signed-in visitor (2026-11-19, gate.js): the account's email in the field's own box, dashed because it cannot
   be edited, under a small "Signed in as"; then the one button */
.gt-acct{display:grid;gap:.3rem}
.gt-acctl{font-size:.8rem;color:var(--muted)}
.gt-card .gt-mail{display:flex;align-items:center;overflow-wrap:anywhere;word-break:break-word;cursor:default;background:transparent;border-style:dashed}
