/* Guide (learning path + lesson session) and glossary styles. Mobile-first, light/dark via tokens in style.css. */
:root{--gold:#f5b301;--gold2:#ffd54a;--green:#58cc02;--greenD:#46a302;--redS:#ffe3e3;--greenS:#dff7c8;--t-software:#2563eb;--t-business:#16a34a;--t-advertising:#d97706;--t-marketing:#db2777;--t-foundation:#0891b2;--t-review:#7c3aed}
@media (prefers-color-scheme:dark){:root{--redS:#3b1620;--greenS:#17361a}}
.topbar nav{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none}
.topbar nav a{white-space:nowrap}
body.in-lesson .topbar{display:none}

/* HUD */
.hud{position:sticky;top:58px;z-index:4;padding:10px 14px;margin-bottom:12px}
.hudrow{display:flex;gap:6px;justify-content:space-between;align-items:center;flex-wrap:wrap}
.hstat{display:flex;align-items:center;gap:4px;font-size:1.05rem;white-space:nowrap}
.hstat small{color:var(--muted)}
.htimer{color:var(--muted);margin-left:2px}
.hstat.goal{gap:6px}
.hstat select{font:inherit;font-size:.8rem;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);padding:3px 4px}
.ringwrap{position:relative;width:40px;height:40px;flex:none}
.ring{width:100%;height:100%}
.ring-bg{fill:none;stroke:var(--border);stroke-width:5}
.ring-fg{fill:none;stroke:var(--gold);stroke-width:5;stroke-linecap:round;transition:stroke-dashoffset .5s}
.ringtxt{position:absolute;inset:0;display:grid;place-items:center;font-size:.72rem;font-weight:800}
.levels{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.lvl{font-size:.72rem;font-weight:800;color:#fff;border-radius:999px;padding:2px 9px;text-transform:capitalize;background:var(--t-review)}
.lvl.software{background:var(--t-software)}.lvl.business{background:var(--t-business)}.lvl.advertising{background:var(--t-advertising)}.lvl.marketing{background:var(--t-marketing)}.lvl.core{background:var(--t-foundation)}

/* path */
.unit{margin:0 auto 10px;max-width:520px}
.ubanner{display:flex;justify-content:space-between;align-items:center;gap:10px;color:#fff;border-radius:16px;padding:14px 18px;margin:18px 0 10px;background:var(--t-foundation);box-shadow:0 4px 0 rgba(0,0,0,.2)}
.ubanner.t-software{background:var(--t-software)}.ubanner.t-business{background:var(--t-business)}.ubanner.t-advertising{background:var(--t-advertising)}.ubanner.t-marketing{background:var(--t-marketing)}.ubanner.t-review{background:var(--t-review)}
.ukick{font-size:.75rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;opacity:.9}
.utitle{font-size:1.15rem;font-weight:800;line-height:1.25}
.ucount{font-weight:800;background:rgba(255,255,255,.22);border-radius:999px;padding:4px 12px;white-space:nowrap}
.path{display:flex;flex-direction:column;align-items:center;gap:14px;padding:10px 0 6px}
.nodewrap{position:relative;display:flex;flex-direction:column;align-items:center;transform:translateX(var(--x,0));width:150px}
.node{position:relative;width:74px;height:74px;border-radius:50%;border:0;cursor:pointer;font:inherit;color:#fff;display:grid;place-items:center;background:var(--t-foundation);box-shadow:0 6px 0 rgba(0,0,0,.28);transition:transform .08s,box-shadow .08s}
.node:active{transform:translateY(4px);box-shadow:0 2px 0 rgba(0,0,0,.28)}
.node.t-software{background:var(--t-software)}.node.t-business{background:var(--t-business)}.node.t-advertising{background:var(--t-advertising)}.node.t-marketing{background:var(--t-marketing)}.node.t-review{background:var(--t-review)}
.node .nicon{font-size:1.7rem;line-height:1}
.node .nnum{position:absolute;bottom:-4px;right:-4px;min-width:26px;height:26px;border-radius:999px;background:var(--surface);color:var(--text);border:2px solid var(--border);font-size:.78rem;font-weight:800;display:grid;place-items:center}
.node.done{background:linear-gradient(145deg,var(--gold2),var(--gold));box-shadow:0 6px 0 #b98700}
.node.locked,.node.soon{background:#cbd5e1;color:#64748b;box-shadow:0 6px 0 #94a3b8}
@media (prefers-color-scheme:dark){.node.locked,.node.soon{background:#334155;color:#94a3b8;box-shadow:0 6px 0 #1e293b}}
.node.soon{opacity:.8;border:3px dashed #94a3b8}
.node.current{animation:pulse 1.6s ease-in-out infinite}
@keyframes pulse{0%,100%{box-shadow:0 6px 0 rgba(0,0,0,.28),0 0 0 0 rgba(79,70,229,.45)}50%{box-shadow:0 6px 0 rgba(0,0,0,.28),0 0 0 16px rgba(79,70,229,0)}}
.node.shake{animation:shake .4s}
@keyframes shake{20%,60%{transform:translateX(-6px)}40%,80%{transform:translateX(6px)}}
.startbub{position:absolute;top:-26px;background:var(--surface);color:var(--brand);border:2px solid var(--border);border-radius:10px;padding:1px 10px;font-weight:800;font-size:.78rem;animation:bob 1.2s ease-in-out infinite}
@keyframes bob{50%{transform:translateY(-4px)}}
.ncap{margin-top:10px;text-align:center;font-size:.8rem;color:var(--muted);line-height:1.25;max-width:150px}
.ncap em{font-style:normal;font-weight:700}
.pathfoot{text-align:center;margin-top:24px}

/* toast */
.toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);background:#0f172a;color:#fff;padding:10px 18px;border-radius:12px;z-index:50;font-weight:600;transition:opacity .4s}
.toast.out{opacity:0}

/* lesson session */
.lesson{display:flex;flex-direction:column;min-height:calc(100vh - 28px);max-width:640px;margin:0 auto}
.ltop{display:flex;align-items:center;gap:12px;padding:4px 0 14px}
.lclose{font-size:1.4rem;text-decoration:none;color:var(--muted);padding:4px 8px}
.lbar{flex:1;height:16px;border-radius:999px;background:var(--border);overflow:hidden}
.lbar>i{display:block;height:100%;width:0;background:var(--green);border-radius:999px;transition:width .35s}
.lhearts{font-weight:800;color:#ef4444;white-space:nowrap}
.lmute{border:0;background:none;font-size:1.2rem;cursor:pointer;color:var(--text)}
.lstage{flex:1;padding:8px 4px 150px;display:flex;flex-direction:column;gap:14px}
.lstage.locked{pointer-events:none}
.ltitle{margin:0;font-size:clamp(1.3rem,5vw,1.7rem)}
.imedia{align-self:center;width:170px;height:170px;border-radius:24px;display:grid;place-items:center;font-size:5.5rem;background:linear-gradient(135deg,var(--surface2),var(--bg));overflow:hidden}
.imedia img{width:100%;height:100%;object-fit:cover}
.iword{align-self:center;font-size:2rem;font-weight:800;display:flex;align-items:center;gap:10px;text-align:center}
.ipa{align-self:center;color:var(--muted);font-family:"Segoe UI",system-ui,sans-serif;font-size:.95rem}
.ies{align-self:center;color:var(--brand);font-size:1.3rem;font-weight:700;text-align:center}
.iex{align-self:center;color:var(--muted);font-style:italic;text-align:center}
.abtns{display:flex;gap:10px;align-self:flex-start}
.bigspeak{width:64px;height:64px;border-radius:18px;border:2px solid var(--brand2);background:var(--surface2);font-size:1.7rem;cursor:pointer;box-shadow:0 4px 0 var(--brand2)}
.slowspeak{width:44px;height:44px;border-radius:14px;border:2px solid var(--border);background:var(--surface);font-size:1.2rem;cursor:pointer;align-self:center}
.lopts{display:grid;gap:10px}
.lopt{display:flex;align-items:center;gap:12px;text-align:left;font:inherit;font-weight:600;padding:14px 16px;border-radius:14px;border:2px solid var(--border);border-bottom-width:4px;background:var(--surface);color:var(--text);cursor:pointer;min-height:54px}
.lopt .key{display:grid;place-items:center;width:26px;height:26px;border:2px solid var(--border);border-radius:8px;font-size:.78rem;color:var(--muted);flex:none}
.lopt.sel{border-color:var(--brand2);background:rgba(14,165,233,.12)}
.lopt.right{border-color:var(--green);background:var(--greenS)}
.lopt.wrong{border-color:#ef4444;background:var(--redS)}
.cloze{font-size:1.3rem;font-weight:700;line-height:1.4}
.linput{font:inherit;font-size:1.1rem;padding:14px;border-radius:14px;border:2px solid var(--border);background:var(--surface);color:var(--text);width:100%}
.linput.right{border-color:var(--green);background:var(--greenS)}.linput.wrong{border-color:#ef4444;background:var(--redS)}
.linkbtn{align-self:flex-start;border:0;background:none;color:var(--brand);font:inherit;font-size:.9rem;text-decoration:underline;cursor:pointer;padding:0}
.bline{min-height:64px;display:flex;flex-wrap:wrap;gap:8px;padding:10px 0;border-top:2px solid var(--border);border-bottom:2px solid var(--border);align-items:center}
.bbank{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.wtile{font:inherit;font-weight:600;padding:9px 14px;border-radius:12px;border:2px solid var(--border);border-bottom-width:4px;background:var(--surface);color:var(--text);cursor:pointer}
.wtile.used{opacity:.25}
.mgrid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.mcol{display:grid;gap:10px;align-content:start}
.mtile{font:inherit;font-weight:600;padding:14px 8px;border-radius:14px;border:2px solid var(--border);border-bottom-width:4px;background:var(--surface);color:var(--text);cursor:pointer;min-height:58px}
.mtile.sel{border-color:var(--brand2);background:rgba(14,165,233,.12)}
.mtile.ok{border-color:var(--green);background:var(--greenS);opacity:.7}
.mtile.bad{border-color:#ef4444;background:var(--redS);animation:shake .4s}
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:20;padding:16px clamp(14px,4vw,24px) 22px;background:var(--surface);border-top:2px solid var(--border);display:flex;flex-direction:column;gap:10px}
.sheet>*{max-width:612px;width:100%;margin:0 auto}
.sheet.ok{background:var(--greenS);border-color:var(--green)}
.sheet.bad{background:var(--redS);border-color:#ef4444}
.sheet.ok .sheetmsg{color:var(--greenD)}
.sheet.bad .sheetmsg{color:#dc2626}
.sheetmsg{font-weight:600;font-size:1rem}
.sheetmsg:empty{display:none}
.sheetmsg b{font-size:1.15rem}
.sheetmsg .expected{font-weight:700;color:var(--text)}
.lcheck{width:100%;padding:14px;font-size:1.05rem;border-radius:14px;text-transform:uppercase;letter-spacing:.04em;background:var(--green);border-color:var(--greenD);border-bottom-width:4px;color:#fff}
.sheet.bad .lcheck{background:#ef4444;border-color:#b91c1c}
.lcheck[disabled]{background:var(--border);border-color:var(--border);color:var(--muted);opacity:1}

/* end screen */
.endcard{max-width:520px;margin:20px auto;text-align:center}
.bigemoji{font-size:4rem;animation:bob 1.4s ease-in-out infinite}
.endstats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:16px 0}
.es{border:2px solid var(--border);border-radius:14px;padding:10px 6px}
.es small{display:block;color:var(--muted);font-weight:700;text-transform:uppercase;font-size:.68rem}
.es b{font-size:1.5rem}
.es.xp{border-color:var(--gold);color:#b98700}.es.acc{border-color:var(--green);color:var(--greenD)}.es.fire{border-color:#f97316;color:#ea580c}
.goalline{display:flex;gap:10px;align-items:center;justify-content:center;font-weight:700;margin-bottom:6px}
.endbtns{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:16px}
#confetti{position:fixed;inset:0;pointer-events:none;z-index:60}

/* glossary */
.gl-controls{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:12px}
.gl-controls select,.gl-search{font:inherit;padding:9px 12px;border-radius:12px;border:2px solid var(--border);background:var(--surface);color:var(--text)}
.gl-search{flex:1;min-width:200px}
.gl-check{display:flex;align-items:center;gap:6px;font-weight:600;cursor:pointer}
.gl-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:14px}
.gentry{display:flex;gap:14px;background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:14px;box-shadow:var(--shadow)}
.gentry.playing{border-color:var(--brand);box-shadow:0 0 0 3px rgba(79,70,229,.3)}
.gmedia{width:72px;height:72px;flex:none;border-radius:14px;display:grid;place-items:center;font-size:2.4rem;background:var(--surface2);overflow:hidden}
.gmedia img{width:100%;height:100%;object-fit:cover}
.gbody{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
.gtop{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:8px}
.gen{font-weight:800;font-size:1.15rem;overflow-wrap:break-word;min-width:0}
.gtop .ipa{align-self:auto;flex-basis:100%;order:3}
.gfav{margin-left:auto;border:0;background:none;font-size:1.5rem;color:var(--muted);cursor:pointer;line-height:1}
.gfav.on{color:var(--gold)}
.gmeta{display:flex;align-items:center;gap:8px}
.gmeta .chip{margin-left:0}
.gactions{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.gactions .speak{margin-top:0}
.gadd{padding:5px 12px;font-size:.85rem;border-radius:999px}
@media (max-width:560px){.hud{top:52px}.hstat small{display:none}.nodewrap{width:130px}}
@media (prefers-reduced-motion:reduce){.node.current,.startbub,.bigemoji{animation:none}}
.sheet.ok.typo{background:#fef3c7;border-color:#f59e0b}
.sheet.ok.typo .sheetmsg{color:#92400e}
.cbanner{align-self:center;background:#ede9fe;color:#5b21b6;border-radius:999px;padding:6px 14px;font-weight:700;font-size:.9rem}
.buyheart{margin-left:6px;font-size:.75rem}
.buyheart:disabled{opacity:.45;cursor:not-allowed}

/* lesson preview (T28): bubble anchored to the node on wide screens, bottom sheet on phones (see mobile.css) */
:where(.pv){--bg:var(--surface);--bd:var(--border);--inner:var(--surface2);--badge:var(--brand);--pill:var(--surface2)}
.pv-scrim{position:fixed;inset:0;z-index:70;background:rgba(15,23,42,.45);animation:pvfade .18s ease-out}
.pv{position:fixed;z-index:71;width:344px;max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;background:var(--bg);color:var(--text);border:3px solid var(--bd);border-radius:20px;padding:14px 16px 16px;box-shadow:0 10px 0 rgba(0,0,0,.18),0 18px 40px rgba(0,0,0,.28)}
.pv.pv-down{transform-origin:var(--ax,50%) -12px;animation:pvpop .22s cubic-bezier(.2,1.3,.4,1)}
.pv.pv-up{transform-origin:var(--ax,50%) calc(100% + 12px);animation:pvpop .22s cubic-bezier(.2,1.3,.4,1)}
.pv-arrow{display:none;position:absolute;left:calc(var(--ax,50%) - 11px);width:22px;height:22px;background:var(--bg);border:3px solid var(--bd);transform:rotate(45deg)}
.pv-down .pv-arrow{display:block;top:-13px;border-right:0;border-bottom:0}
.pv-up .pv-arrow{display:block;bottom:-13px;border-left:0;border-top:0}
.pv-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.pv-kick{font-weight:800;font-size:.85rem;text-transform:uppercase;letter-spacing:.04em;color:var(--badge)}
.pv-x{width:var(--tap,48px);height:var(--tap,48px);margin:-8px -10px -8px 0;border:0;background:transparent;color:var(--text);font:inherit;font-size:1.25rem;font-weight:800;border-radius:50%;cursor:pointer}
.pv-x:hover,.pv-x:focus-visible{background:var(--inner)}
.pv-title{margin:2px 0 8px;font-size:1.3rem;line-height:1.2;color:var(--text)}
.pv-chips{display:flex;gap:6px;margin-bottom:10px}
.pv-chip{background:var(--badge);color:var(--bg);font-weight:800;font-size:.78rem;border-radius:999px;padding:2px 11px;text-transform:capitalize}
.pv-state{display:inline-block;font-weight:800;font-size:.95rem;background:var(--inner);border-radius:999px;padding:3px 12px;margin-bottom:6px}
.pv-state.prog{outline:2px solid var(--badge)}
.pv-goal{margin:4px 0 8px;font-weight:600;line-height:1.35}
.pv-sec{background:var(--inner);border-radius:14px;padding:8px 12px;margin:8px 0}
.pv-h{font-weight:800;font-size:.78rem;text-transform:uppercase;letter-spacing:.05em;color:var(--badge);margin-bottom:4px}
.pv-line{font-weight:600;font-size:.95rem;line-height:1.35}
.pv-pills{display:flex;flex-wrap:wrap;gap:6px}
.pv-pill{display:inline-flex;align-items:center;gap:5px;max-width:100%;background:var(--pill);border-radius:999px;padding:4px 11px;font-weight:700;font-size:.92rem}
.pv-pill>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pv-meta{display:flex;flex-wrap:wrap;gap:6px 14px;margin:10px 0;font-weight:700;font-size:.9rem;color:var(--muted)}
.pv-go{width:100%;min-height:var(--tap,52px);font-size:1.05rem;letter-spacing:.06em}
.pv-more{display:flex;gap:8px;margin-top:8px}
.pv-sec2{flex:1;min-height:var(--tap,48px)}
.pv-lock{text-align:center;padding:10px 0}
.pv-lockico{font-size:2.6rem;display:block}
.pv-lock p{font-weight:800;margin:6px 0 0}
.pv-skel i{display:block;height:16px;border-radius:8px;margin:12px 0;background:linear-gradient(90deg,var(--inner) 25%,var(--pill) 50%,var(--inner) 75%);background-size:200% 100%;animation:pvshim 1.2s linear infinite}
.pv-skel i.short{width:55%}
body.pv-open{overflow:hidden}
@keyframes pvpop{from{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}
@keyframes pvfade{from{opacity:0}to{opacity:1}}
@keyframes pvshim{to{background-position:-200% 0}}
@keyframes pvup{from{transform:translateY(40px);opacity:0}to{transform:none;opacity:1}}
@media (prefers-reduced-motion:reduce){.pv,.pv-scrim,.pv-skel i{animation:none!important}}
.pv-actions{position:sticky;bottom:-16px;margin:0 -16px -16px;padding:8px 16px 16px;background:var(--bg)}
.pv-goal{font-size:.98rem}
.pv-more{margin-top:6px}
.pv-pill{font-size:.88rem}

/* Spanish subtitles, pronunciation respelling, day intro (T29) */
.sub{color:var(--muted);font-size:.86rem;font-weight:600;line-height:1.3;margin:2px 0 6px;cursor:pointer}
.sub.sub-off{opacity:.15;filter:blur(3px)}
.dcard .sub,.lesson .sub{text-align:center}
.pron{display:inline-flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:0;min-height:44px;margin:2px auto;padding:4px 14px;border:2px solid var(--bd,var(--border));border-radius:999px;background:var(--inner,var(--surface2));color:var(--text);font:inherit;font-size:1.15rem;cursor:pointer}
.pron-ico{margin-right:4px}
.pron .pron-st{font-weight:900;color:var(--badge,var(--brand))}
.pron-ipa .ipa{color:var(--muted)}
.dpron,.ipron{display:flex;justify-content:center;flex-direction:column;align-items:center}
.ipa-2{font-size:.8rem;color:var(--muted);opacity:.85;margin-top:2px}
.dayintro{display:flex;flex-direction:column;gap:10px;text-align:left}
.intro-title{margin:0;font-weight:800;font-size:1.15rem;line-height:1.25;color:var(--text)}
.intro-sec{background:var(--inner,var(--surface2));border-radius:14px;padding:10px 14px}
.intro-h{font-weight:800;font-size:.8rem;text-transform:uppercase;letter-spacing:.05em;color:var(--badge,var(--brand));margin-bottom:4px}
.intro-p{margin:0;line-height:1.4;font-size:1rem}
.intro-how{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.intro-step{display:flex;gap:8px;align-items:flex-start;background:var(--pill,var(--surface));border-radius:12px;padding:6px 10px;font-weight:600;font-size:.98rem;line-height:1.3}
.intro-n{flex:none;width:24px;height:24px;border-radius:50%;background:var(--badge,var(--brand));color:var(--bg,#fff);font-weight:800;font-size:.85rem;display:grid;place-items:center}
.intro-ex{background:var(--surface);border:2px solid var(--bd,var(--border));border-radius:12px;padding:8px 12px}
.intro-exrow{display:flex;align-items:center;gap:8px;justify-content:space-between}
.intro-en{font-weight:800;font-size:1.05rem;line-height:1.3}
.intro-es{text-align:left!important;font-size:.84rem}
.intro-tips{margin:0;padding-left:20px;font-size:.96rem;line-height:1.35}
.stoggle{display:flex;align-items:center;justify-content:space-between;gap:10px}
.stoggle input{width:26px;height:26px}
.job-es,.phrase-es,.prompt-es{margin-top:0}
