/* Levels Academy: Levels app UI (light cards, orange tiles, pills) inside our paper-grain video world.
   Layout rules:
   - The shell adapts to the screen's shape. Tall screens get the guide + caption docked at the bottom;
     wide screens get them in a side column; short landscape phones get a compact side column.
   - Scenes are designed once at a fixed size (.ls 1000×660 or .pt 440×720) inside .fit and scaled to fit
     the stage, so every device sees the same composition. */
@font-face{font-family:I;font-weight:400;font-style:italic;src:url(../fonts/inter-latin-400-italic.woff2)}
@font-face{font-family:I;font-weight:500;src:url(../fonts/inter-latin-500-normal.woff2)}
@font-face{font-family:I;font-weight:600;src:url(../fonts/inter-latin-600-normal.woff2)}
@font-face{font-family:I;font-weight:700;src:url(../fonts/inter-latin-700-normal.woff2)}
@font-face{font-family:I;font-weight:800;src:url(../fonts/inter-latin-800-normal.woff2)}
:root{
  --o1:#E8692E;--o2:#C24E1E;--o3:#7A2D10;--o4:#F6C7A2;--o5:#FBE3D0;
  --ink:#1F1A17;--ink2:#3A3330;--ink3:#5A514C;--tx:#111827;--mut:#8A8F9C;--line:#E3E5EC;--ui:#F3F4F8;
  --grn:#2E9D5B;--grnBg:#E2F3E7;--red:#D9483B;--redBg:#FBE4E1;--amb:#D08A22;--ambBg:#FBEFD9;--gold:#F2B544;
  --paper:#F4F1EC;--tileG:linear-gradient(135deg,#F28C4E,#D9582A);--ctaG:linear-gradient(135deg,#F59A55 0%,#E8692E 55%,#D9582A 100%);
  --r:22px;--shadow:0 1px 0 rgba(17,24,39,.04),0 12px 32px -14px rgba(60,35,15,.28);
  --topH:64px;--safeT:env(safe-area-inset-top,0px);--safeB:env(safe-area-inset-bottom,0px);
  --capFs:22px;--capLines:3;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;background:var(--paper);color:var(--tx);font-family:I,system-ui,sans-serif;-webkit-font-smoothing:antialiased;overflow:hidden;overscroll-behavior:none;-webkit-text-size-adjust:100%}
button{font:inherit;color:inherit;border:0;background:none;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
em{font-style:italic;font-weight:400}
#paper{position:fixed;inset:0;background:radial-gradient(ellipse 80% 65% at 50% 40%,#FBF9F6 0%,#F4F1EC 48%,#E7E1D9 100%);z-index:-2}
#grain{position:fixed;inset:-20px;background:url(../assets/grain.png);mix-blend-mode:multiply;opacity:.32;pointer-events:none;z-index:50}

/* ---------- top bar ---------- */
#top{position:fixed;top:0;left:0;right:0;height:calc(var(--topH) + var(--safeT));padding:var(--safeT) max(22px,env(safe-area-inset-right)) 0 max(22px,env(safe-area-inset-left));display:flex;align-items:center;justify-content:space-between;z-index:40;gap:12px}
.brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:17px;letter-spacing:-.01em;white-space:nowrap}
.brand em{color:var(--o1);font-weight:400}
.logo{width:22px;height:23px;flex:none}
.where{flex:1;max-width:560px;min-width:0;display:flex;flex-direction:column;align-items:center;gap:7px;opacity:0;transition:opacity .4s}
body.inlesson .where{opacity:1}
#chapLabel{font-size:11px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--ink3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
#chapLabel b{color:var(--tx);letter-spacing:0;text-transform:none;font-size:13px;margin-left:6px}
#progress{display:flex;gap:5px;width:100%}
#progress i{flex:1;height:5px;border-radius:3px;background:rgba(31,26,23,.1);overflow:hidden;position:relative}
#progress i b{position:absolute;inset:0;width:0;background:var(--ctaG);border-radius:3px;transition:width .5s}
.tools{display:flex;gap:4px;align-items:center;flex:none}
.ghost{min-height:40px;padding:0 12px;border-radius:12px;font-size:14px;font-weight:600;color:var(--ink3);display:inline-flex;align-items:center;gap:4px}
.ghost:hover{background:rgba(31,26,23,.06)}
.ghost.wide{width:100%;margin-top:6px;justify-content:center}
body:not(.inlesson) #btnBack,body:not(.inlesson) #btnSkip{display:none}
.icon{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;color:var(--ink2)}
.icon svg{width:22px;height:22px}
.icon:hover{background:rgba(31,26,23,.06)}
body.muted #snd{opacity:.15}

/* ---------- buttons ---------- */
.cta{display:inline-flex;align-items:center;justify-content:space-between;gap:18px;min-width:280px;min-height:64px;padding:12px 12px 12px 26px;border-radius:20px;background:var(--ctaG);color:#fff;font-weight:700;font-size:19px;box-shadow:0 14px 30px -12px rgba(217,88,42,.65),inset 0 1px 0 rgba(255,255,255,.35);transition:translate .15s,scale .15s}
.cta i{font-style:normal;width:40px;height:40px;border-radius:13px;background:rgba(255,255,255,.22);display:grid;place-items:center;font-size:20px;flex:none}
.cta:hover{translate:0 -1px}.cta:active{scale:.98}

/* ---------- intro ---------- */
#intro{position:fixed;top:calc(var(--topH) + var(--safeT));left:0;right:0;bottom:var(--riskH,40px);display:grid;grid-template-columns:1fr 1fr;align-items:center;padding:0 6vw var(--safeB);gap:4vw;overflow-y:auto}
.intro-guide{height:min(60vh,540px);display:flex;justify-content:center;align-items:center}
.intro-guide svg{height:100%;width:auto;max-width:100%;aspect-ratio:1;overflow:visible;flex:none}
.kicker{font-size:12px;font-weight:700;letter-spacing:.2em;text-transform:uppercase;color:var(--o1);margin-bottom:14px}
h1{font-size:clamp(30px,min(4.6vw,7.4vh),64px);line-height:1.02;letter-spacing:-.035em;font-weight:800;margin-bottom:16px}
h1 em{color:var(--o1);font-weight:400;letter-spacing:-.03em}
.lead{font-size:clamp(15px,min(1.3vw,2.4vh),18px);color:var(--ink3);max-width:440px;margin-bottom:clamp(14px,3vh,26px);line-height:1.45}
.pick{display:flex;align-items:center;gap:8px;margin-bottom:clamp(14px,2.6vh,22px);font-size:13px;font-weight:600;color:var(--ink3)}
.pick>span{margin-right:4px}
.seg{min-height:40px;padding:0 18px;border-radius:999px;background:rgba(255,255,255,.6);border:1.5px solid var(--line);font-size:14px}
.seg.on{border-color:var(--o1);background:#fff;color:var(--o2);box-shadow:0 4px 14px -6px rgba(232,105,46,.5)}
.meta{margin-top:16px;font-size:12px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--ink3)}
.meta .dot{margin:0 8px;opacity:.5}
.risk{margin-top:clamp(12px,2.4vh,22px);max-width:480px;font-size:11px;line-height:1.45;color:var(--ink3);opacity:.75}

/* ---------- lesson shell ---------- */
#lesson{position:fixed;top:calc(var(--topH) + var(--safeT));left:0;right:0;bottom:var(--riskH,40px);display:grid}
#lesson[hidden],#intro[hidden],#done[hidden]{display:none}
#stage{position:relative;overflow:hidden;min-height:0;min-width:0}
#dock{display:flex;align-items:center;position:relative;min-width:0}
#guide{flex:none;aspect-ratio:1}
#guide svg{width:100%;height:100%;overflow:visible;display:block}
#bubble{background:#fff;border-radius:26px;box-shadow:var(--shadow);position:relative;flex:1;min-width:0;
  height:calc(var(--capFs) * 1.38 * var(--capLines) + 2 * var(--bubPad,22px));padding:var(--bubPad,22px) calc(var(--bubPad,22px) + 2px);display:flex;align-items:center}
#bubble:before{content:"";position:absolute;width:20px;height:20px;background:#fff;transform:rotate(45deg);border-radius:4px}
#caption{font-size:var(--capFs);line-height:1.38;letter-spacing:-.012em;font-weight:500;width:100%}
#caption span{color:rgba(17,24,39,.2);transition:color .12s}
#caption span.on{color:var(--tx)}
#caption span.b{font-weight:800}
#caption span.b.on{color:var(--o2)}

/* wide screens: guide + caption in a side column */
@media (min-aspect-ratio:1/1){
  #lesson{grid-template-columns:clamp(300px,28vw,470px) 1fr}
  #dock{grid-column:1;grid-row:1}
  #stage{grid-column:2;grid-row:1}
  #dock{flex-direction:column;justify-content:center;padding:0 clamp(16px,2vw,34px) max(4vh,var(--safeB)) max(clamp(16px,2vw,34px),env(safe-area-inset-left));gap:6px}
  #guide{width:clamp(170px,min(21vw,36vh),340px)}
  #bubble{width:100%;flex:none}
  #bubble:before{top:-9px;left:50%;margin-left:-10px}
  :root{--capFs:clamp(17px,min(1.45vw,2.6vh),24px)}
}
/* tall screens: guide + caption docked at the bottom */
@media (max-aspect-ratio:1/1){
  :root{--topH:58px;--capFs:clamp(15px,min(4vw,2.2vh),23px);--bubPad:clamp(12px,2.4vw,20px)}
  #top{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right));gap:8px}
  .brand span{display:none}
  .where{max-width:none}
  #chapLabel b{display:none}
  #lesson{grid-template-rows:1fr auto;grid-template-columns:100%}
  #stage{grid-row:1;grid-column:1}
  #dock{grid-row:2;grid-column:1}
  #dock{flex-direction:row;align-items:flex-end;padding:4px max(12px,env(safe-area-inset-right)) 8px max(8px,env(safe-area-inset-left))}
  #guide{width:clamp(92px,min(24vw,15vh),180px);margin-right:-2px;z-index:2}
  #bubble{border-radius:20px}
  #bubble:before{bottom:24px;left:-8px}
  #intro{grid-template-columns:1fr;grid-template-rows:auto auto;align-content:center;padding:8px 22px 14px;gap:0}
  .intro-guide{height:clamp(140px,30vh,340px)}
  .intro-copy{text-align:center;display:flex;flex-direction:column;align-items:center;margin-top:10px}
  .cta{min-width:min(100%,360px);width:min(100%,360px)}
  .risk{font-size:10px}
}
@media (max-aspect-ratio:1/1) and (max-width:380px){
  .ghost{padding:0 9px}.ghost span{display:none}
}
/* short landscape phones */
@media (min-aspect-ratio:1/1) and (max-height:560px){
  :root{--topH:48px;--capFs:15px;--bubPad:12px}
  #chapLabel{display:none}
  #lesson{grid-template-columns:clamp(220px,30vw,320px) 1fr}
  #dock{gap:2px;padding-bottom:max(8px,var(--safeB))}
  #guide{width:min(120px,30vh)}
  #bubble{border-radius:18px}
  #intro{gap:3vw}
  .intro-guide{height:70vh}
  .kicker{margin-bottom:6px}.meta{margin-top:10px}.risk{display:none}
  .cta{min-height:54px;font-size:17px}
}

/* ---------- stage scenes (scaled-to-fit design canvas) ---------- */
.scene{position:absolute;inset:0}
.fit{position:absolute;left:50%;top:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;transform-origin:50% 50%}
.fit>*{max-width:100%;flex:none}

/* ---------- glow-to-tap ---------- */
.glow{position:relative;z-index:5;animation:glow 1.6s ease-in-out infinite;outline:none}
@keyframes glow{0%,100%{box-shadow:0 0 0 0 rgba(232,105,46,.55),0 0 0 0 rgba(232,105,46,.25)}50%{box-shadow:0 0 0 7px rgba(232,105,46,.35),0 0 0 18px rgba(232,105,46,0)}}
.tapped{animation:none!important}

/* ---------- choice cards ---------- */
.choices{display:flex;flex-direction:column;gap:12px;width:460px;max-width:100%}
.choice{display:flex;align-items:center;gap:16px;min-height:64px;padding:14px 20px;border-radius:20px;background:#fff;border:2px solid var(--line);text-align:left;font-size:18px;font-weight:600;box-shadow:var(--shadow);transition:translate .15s,border-color .15s}
.choice .ch-i{width:44px;height:44px;border-radius:14px;background:var(--o5);display:grid;place-items:center;font-size:22px;flex:none}
.choice:hover{border-color:var(--o4);translate:0 -2px}
.choice.picked{border-color:var(--o1)}
.choice.right{border-color:var(--grn);background:var(--grnBg)}
.choice.wrong{border-color:var(--red);background:var(--redBg)}

/* ---------- Levels app UI kit ---------- */
.lv-card{background:#fff;border:1.5px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow)}
.lv-tile{display:grid;place-items:center;border-radius:24%;background:var(--tileG);color:#fff;font-weight:800;letter-spacing:.02em;flex:none}
.lv-pill{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap}
.lv-pill.grey{background:#EEF0F4;color:var(--mut)}
.lv-pill.green{background:var(--grnBg);color:var(--grn)}
.lv-pill.amber{background:var(--ambBg);color:var(--amb)}
.lv-pill.red{background:var(--redBg);color:var(--red)}
.lv-pill.dot:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.lv-lab{font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--mut)}
.lv-big{font-size:30px;font-weight:800;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.pos{color:var(--grn)}.neg{color:var(--red)}
.lv-btn{display:flex;align-items:center;justify-content:center;gap:8px;height:52px;border-radius:26px;border:1.5px solid var(--line);background:#fff;font-weight:700;font-size:16px;width:100%}
.lv-btn.orange{background:var(--ctaG);border:0;color:#fff}
.phone{width:340px;height:690px;background:var(--ink);border-radius:52px;padding:12px;box-shadow:0 30px 60px -24px rgba(40,22,10,.45);position:relative}
.phone .scr{width:100%;height:100%;background:var(--ui);border-radius:41px;overflow:hidden;overflow:clip;position:relative}

/* ---------- boards ---------- */
.board{width:100%;display:flex;flex-direction:column;align-items:center;gap:18px;text-align:center}
.board h2{font-size:46px;letter-spacing:-.03em;line-height:1.05;font-weight:800}
.board h2 em{color:var(--o1)}
.board .sub{color:var(--ink3);font-size:17px}
.pt .board h2{font-size:34px}
.pt .board .sub{font-size:16px}
.kicker.sm{margin-bottom:0}

/* chapter complete */
#done{position:fixed;top:calc(var(--topH) + var(--safeT));left:0;right:0;bottom:var(--riskH,40px);display:grid;place-items:center;z-index:30;background:rgba(244,241,236,.72);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);padding:16px}
.done-card{width:min(420px,100%);background:#fff;border-radius:30px;padding:34px 28px 24px;text-align:center;box-shadow:var(--shadow)}
.tick{width:72px;height:72px;border-radius:50%;margin:0 auto 16px;background:var(--grnBg);color:var(--grn);font-size:36px;font-weight:800;display:grid;place-items:center}
.done-card h2{font-size:28px;letter-spacing:-.02em;margin-bottom:6px}
.done-card p{color:var(--ink3);margin-bottom:22px}
.done-card .cta{width:100%;min-width:0;justify-content:center}

/* ---------- scene pieces (design px; .pt = tall canvas) ---------- */
.row{display:flex;align-items:center;gap:12px}
.hello-art{position:relative;width:100%;height:380px}
.hello-art .fl{position:absolute;padding:16px 18px;display:flex;flex-direction:column;gap:10px;text-align:left}
.hello-art .f1{left:60px;top:10px;width:320px}
.hello-art .f2{right:60px;top:110px;width:270px}
.hello-art .f3{left:250px;bottom:0;width:250px}
.pt .hello-art{height:470px}
.pt .hello-art .f1{left:22px;top:14px;width:280px}
.pt .hello-art .f2{right:22px;top:180px;width:230px}
.pt .hello-art .f3{left:30px;bottom:18px;width:230px}
.spk{width:100%;height:60px}
.path{position:relative;display:flex;justify-content:space-between;width:100%;max-width:900px;margin-top:22px}
.pline{position:absolute;left:10%;right:10%;top:36px;height:6px;border-radius:3px;background:rgba(31,26,23,.1)}
.pline b{display:block;height:100%;width:0;border-radius:3px;background:var(--ctaG)}
.pnode{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;gap:6px;width:20%}
.pi{width:76px;height:76px;border-radius:24px;background:#fff;border:2px solid var(--o4);display:grid;place-items:center;color:var(--o1);box-shadow:var(--shadow)}
.pi svg{width:34px;height:34px}
.pn{font-size:11px;font-weight:800;color:var(--o1);letter-spacing:.1em}
.pl{font-size:15px;font-weight:700}
.pt .path{flex-direction:column;gap:14px;margin-top:8px;align-items:flex-start;padding-left:40px}
.pt .pline{left:76px;right:auto;top:30px;bottom:30px;width:6px;height:auto}
.pt .pline b{width:100%!important;height:var(--ph,0%);transition:height .5s}
.pt .pnode{flex-direction:row;width:auto;gap:14px}
.pt .pi{width:62px;height:62px;border-radius:20px}.pt .pi svg{width:28px;height:28px}
.pt .pl{font-size:18px}
.big-ready{width:auto;padding:0 44px;height:76px;font-size:22px;border-radius:24px}
.stampwrap{padding:20px}
.stamp{font-size:58px;font-weight:800;letter-spacing:.08em;color:var(--red);border:7px solid var(--red);border-radius:18px;padding:10px 26px;background:rgba(255,253,249,.85);white-space:nowrap}
.pt .stamp{font-size:36px;border-width:5px;padding:8px 18px}
.pb{padding:20px 28px;display:flex;flex-direction:column;align-items:center;gap:8px}
.mirror-art{display:flex;align-items:center;justify-content:center;gap:10px;width:100%}
.mirror-art .who{display:flex;flex-direction:column;align-items:center;gap:10px;font-size:18px}
.mirror-art .arr{width:260px}
.pt .mirror-art .arr{width:130px}
.prof{width:600px;max-width:100%;padding:26px}
.ph{display:flex;gap:18px;align-items:center}
.pn2{font-size:28px;font-weight:800;letter-spacing:-.02em}
.pills{display:flex;gap:6px;margin:6px 0}
.meta2{font-size:14px;color:var(--mut);font-weight:600}
.pchart{width:100%;height:auto;display:block}
.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:14px}
.stats>div{background:var(--ui);border-radius:16px;padding:14px}
.stats .lv-big{font-size:24px}
.pt .prof{padding:20px}.pt .stats{gap:8px}.pt .stats>div{padding:12px 10px}.pt .stats .lv-big{font-size:19px}.pt .stats .lv-lab{font-size:9.5px;letter-spacing:.08em}.pt .pn2{font-size:24px}
.foot{margin-top:14px;font-size:11px;color:var(--mut)}
.mirror{display:flex;align-items:center;gap:14px;width:100%;max-width:900px}
.mirror .mid{width:90px;flex:none}
.acct{flex:1;padding:18px;display:flex;flex-direction:column;gap:14px;min-height:230px}
.ah{display:flex;align-items:center;gap:12px}
.ah .bal{margin-left:auto;font-size:26px}
.slot{display:flex;flex-direction:column;gap:10px}
.ticket{display:flex;align-items:center;gap:10px;padding:14px;border-radius:16px;background:var(--ui);border:1.5px solid var(--line);font-size:17px}
.ticket .lot{margin-left:auto;font-weight:800;font-variant-numeric:tabular-nums}
.copied{align-self:flex-start}
.mirror.small .acct{min-height:0}
.pt .mirror{flex-direction:column;gap:6px}.pt .mirror .mid{transform:rotate(90deg);width:56px;margin:4px 0}
.pt .acct{min-height:0;width:100%;flex:none}
.pt .mirror:not(.small) .acct{min-height:190px}
.dial{width:540px;max-width:100%;padding:22px 24px;display:flex;flex-direction:column;gap:16px}
.dial .row{display:flex;justify-content:space-between;align-items:baseline}
.track{position:relative;height:14px;border-radius:7px;background:#EEF0F4;margin:18px 10px}
.track:before{content:"";position:absolute;inset:-24px -10px}
.track .fill{position:absolute;left:0;top:0;bottom:0;border-radius:7px;background:var(--ctaG)}
.track .knob{position:absolute;top:50%;width:46px;height:46px;margin:-23px 0 0 -23px;border-radius:50%;background:#fff;border:3px solid var(--o1);box-shadow:0 6px 16px -6px rgba(217,88,42,.6);touch-action:none;cursor:grab}
.ticks{display:flex;justify-content:space-between;font-size:12px;font-weight:700;color:var(--mut);padding:0 4px}
.swing{width:100%;height:110px}
.ctrl{display:grid;grid-template-columns:1fr 1.3fr;gap:16px;width:100%;max-width:840px}
.pt .ctrl{grid-template-columns:1fr}
.vault{padding:24px;display:flex;flex-direction:column;align-items:center;gap:10px;justify-content:center}
.pt .vault{flex-direction:row;flex-wrap:wrap;padding:18px;gap:8px 14px}
.pt .vault .vi{width:56px;height:56px;border-radius:18px}
.vi{width:76px;height:76px;border-radius:24px;background:var(--o5);color:var(--o1);display:grid;place-items:center}.vi svg{width:40px}
.perms{padding:22px;display:flex;flex-direction:column;gap:10px}
.perms>b{font-size:20px}
.pr{padding:12px 14px;border-radius:14px;font-weight:600}
.pr.ok{background:var(--grnBg);color:var(--grn)}.pr.no{background:var(--redBg);color:var(--red)}
.tog{display:flex;align-items:center;justify-content:space-between;margin-top:6px;font-weight:700}
.sw{width:58px;height:34px;border-radius:17px;background:#D7DAE2;position:relative;transition:background .3s;flex:none}
.sw i{position:absolute;top:4px;left:4px;width:26px;height:26px;border-radius:50%;background:#fff;transition:left .3s;box-shadow:0 2px 6px rgba(0,0,0,.2)}
.sw.on{background:var(--o1)}.sw.on i{left:28px}
.tstat{align-self:flex-start}

@media (prefers-reduced-motion:reduce){.glow{animation:none;box-shadow:0 0 0 4px rgba(232,105,46,.5)}}

/* ================= v2: Levels app simulator (phone) ================= */
.appwrap{display:flex;align-items:center;justify-content:center;gap:56px;width:100%}
.callout{width:300px;text-align:left}
.callout .ct{font-size:40px;font-weight:800;letter-spacing:-.03em;line-height:1.05;margin-top:10px}
.callout .ct em{color:var(--o1)}
.pt .callout{display:none}
.appwrap .phone{width:310px;height:640px;padding:10px;border-radius:46px;flex:none}
.pt .appwrap .phone{width:330px;height:690px}
.appwrap .scr{border-radius:37px;display:flex;flex-direction:column;font-size:13px;background:var(--ui)}
.ap-top{flex:none;height:60px;padding:22px 16px 0;display:flex;align-items:center;gap:8px;background:#fff;border-bottom:1px solid var(--line);font-size:13px}
.ap-logo{width:16px;height:17px}.ap-top span{flex:1;color:var(--mut)}.ap-top b{color:var(--tx)}
.av{width:28px;height:28px;border-radius:50%;background:var(--tileG);color:#fff;font-style:normal;font-weight:800;font-size:10px;display:grid;place-items:center}
.ap-body{flex:1;overflow:hidden;overflow:clip;position:relative}
.pg{padding:12px 12px 16px;display:flex;flex-direction:column;gap:9px}
.ap-nav{flex:none;height:62px;display:grid;grid-template-columns:repeat(4,1fr);background:#fff;border-top:1px solid var(--line);padding:4px 4px 10px}
.ap-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:9.5px;font-weight:700;color:var(--mut);border-radius:12px}
.ap-nav svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.ap-nav button.on{color:var(--o1)}
.nonav .ap-nav{display:none}
.ap-dim{position:absolute;inset:0;background:rgba(17,24,39,.35);opacity:0;pointer-events:none}
.ap-sheet{position:absolute;left:0;right:0;bottom:0;background:#fff;border-radius:24px 24px 0 0;padding:10px 16px 22px;z-index:6;visibility:hidden}
.sheeted .ap-sheet{visibility:visible}
.sheeted .ap-dim{pointer-events:auto}
.ap-toast{position:absolute;top:66px;left:14px;right:14px;background:var(--ink);color:#fff;border-radius:14px;padding:10px 12px;font-weight:700;font-size:12px;opacity:0;z-index:8;text-align:center}
.sh{display:flex;flex-direction:column;gap:6px}.grab{width:40px;height:5px;border-radius:3px;background:var(--line);margin:0 auto 6px}
.sh-t{font-size:17px;text-align:center}.sh>.mut{text-align:center}
.mut{color:var(--mut)}.sm{font-size:11px;text-align:center}.xs{font-size:10px;text-align:center}
h3.ttl{font-size:18px;letter-spacing:-.01em;margin:2px 2px 0}
.su{padding:34px 8px 0;display:flex;flex-direction:column;gap:9px}
.su-logo{width:30px;height:31px;margin:0 auto 4px}.su h4{font-size:20px;text-align:center}.su>.mut{text-align:center;margin-bottom:6px}
.su label{font-size:11px;font-weight:700;color:var(--mut);display:flex;flex-direction:column;gap:4px}
.fld{height:40px;border-radius:12px;background:#fff;border:1.5px solid var(--line);display:flex;align-items:center;padding:0 12px;font-size:13px;color:var(--tx);font-weight:500}
.fld.sel{justify-content:space-between;width:100%;color:var(--mut);border-color:var(--o1)}.fld.sel.chosen{color:var(--tx);font-weight:700}
.appwrap .lv-btn{height:44px;font-size:14px;border-radius:22px}
.banner{display:flex;align-items:center;justify-content:space-between;gap:8px;background:var(--ambBg);border-radius:14px;padding:10px 12px}
.banner b{display:block;font-size:13px}.banner span{font-size:11px;color:var(--amb);font-weight:600}
.banner.ok{background:var(--grnBg);color:var(--grn);font-weight:700;justify-content:center}
.mini{height:32px;padding:0 14px;border-radius:16px;background:var(--o1);color:#fff;font-weight:700;font-size:12px;flex:none}
.bal{background:var(--ctaG);color:#fff;border-radius:18px;padding:14px}
.bal span{font-size:10px;font-weight:700;letter-spacing:.12em;opacity:.85}.bal b{display:block;font-size:28px;letter-spacing:-.02em;margin:2px 0 10px}
.bal-b{display:flex;gap:6px}.bal-b i{font-style:normal;font-size:11px;font-weight:700;background:rgba(255,255,255,.22);border-radius:10px;padding:6px 10px}
.lv-lab.pad{margin:4px 2px 0}
.acc,.wal{display:flex;justify-content:space-between;align-items:center;background:#fff;border:1.5px solid var(--line);border-radius:14px;padding:11px 12px}
.acc span,.wal span{display:block;font-size:11px;color:var(--mut)}.wal b{font-size:22px}
.empty{background:#fff;border:1.5px dashed var(--line);border-radius:14px;padding:12px;text-align:center;color:var(--mut);font-size:12px}
.row2{display:grid;grid-template-columns:1.4fr 1fr;gap:8px}
.chips{display:flex;gap:6px}.chips span{font-size:11px;font-weight:700;padding:5px 10px;border-radius:99px;background:#fff;border:1.5px solid var(--line);color:var(--mut)}.chips .on{border-color:var(--o1);color:var(--o2)}
.pc{background:#fff;border:1.5px solid var(--line);border-radius:16px;padding:10px 11px;display:flex;flex-direction:column;gap:6px;cursor:pointer}
.pc-h{display:flex;gap:9px;align-items:center}.pc-h b{font-size:14px}
.pc-tags{display:flex;gap:4px;margin-top:3px}.pc-tags .lv-pill{font-size:8.5px;padding:2px 7px}
.pc-spk{width:100%;height:34px}
.pc-st{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.pc-st i,.grid4 i,.ptop i{display:block;font-style:normal;font-size:8.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--mut)}
.pc-st b{font-size:13px}
.back{font-size:12px;color:var(--mut);font-weight:600}
.pf-h{display:flex;gap:11px;align-items:center}.pf-h b{font-size:17px}.pf-h .mut{font-size:10px;display:block;margin-top:2px}
.grid4{display:grid;grid-template-columns:1fr 1fr;gap:7px}
.grid4>div,.ptop>div{background:#fff;border:1.5px solid var(--line);border-radius:13px;padding:9px 10px}.grid4 b{font-size:18px;letter-spacing:-.01em}
.pf-ch{width:100%;height:58px}
.offer{background:#fff;border:1.5px solid var(--line);border-radius:13px;padding:9px 11px}.offer b{display:block}.offer span{display:block;font-size:11px;color:var(--mut)}
.agree{display:flex;align-items:center;gap:9px;font-size:12px;font-weight:600;padding:8px 2px;text-align:left}
.cb{width:20px;height:20px;border-radius:6px;border:2px solid var(--mut);flex:none;display:grid;place-items:center}
.agree.on .cb{background:var(--o1);border-color:var(--o1)}.agree.on .cb:after{content:"✓";color:#fff;font-style:normal;font-weight:800;font-size:12px}
.note{font-size:10.5px;color:var(--mut);background:var(--ui);border-radius:10px;padding:8px 10px}
.pm{display:flex;align-items:center;gap:12px;background:var(--ui);border:1.5px solid var(--line);border-radius:14px;padding:11px 12px;text-align:left}
.pm i{font-style:normal;font-size:22px}.pm b{display:block;font-size:13px}.pm span{font-size:11px;color:var(--mut)}
.trd{display:flex;align-items:center;gap:8px;background:#fff;border:1.5px solid var(--line);border-radius:12px;padding:9px 10px;font-size:12px}.trd>b{flex:1}
.ptop{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.ptop b{font-size:14px}
.prow{display:flex;justify-content:space-between;align-items:center;background:#fff;border:1.5px solid var(--line);border-radius:14px;padding:10px 11px;cursor:pointer}
.pr-l{display:flex;gap:8px;align-items:center}.pr-l b{font-size:12.5px}.pr-l span,.pr-r span{display:block;font-size:10.5px;color:var(--mut)}.pr-r{text-align:right}

/* ================= v2 boards ================= */
.cmp{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;width:100%}
.cc{padding:14px 12px;display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;transition:border-color .3s}
.cc>b{font-size:15px}.cc svg{width:100%;height:36px}
.cs{display:flex;justify-content:space-between;width:100%;font-size:12px}.cs i{font-style:normal;color:var(--mut);font-weight:600}
.cc.hl{border-color:var(--o1);box-shadow:0 0 0 4px rgba(232,105,46,.18),var(--shadow)}
.pt .cmp{grid-template-columns:1fr;gap:7px}
.pt .cc .lv-tile{width:34px!important;height:34px!important;font-size:13px!important}.pt .cc>b{font-size:13px}.pt .cs{font-size:11px}
.chk{display:flex;flex-direction:column;gap:12px;width:100%;max-width:640px}
.ci{display:flex;align-items:center;gap:14px;padding:16px 18px;text-align:left;font-size:18px;font-weight:600}
.ci .ic{width:44px;height:44px;border-radius:14px;background:var(--o5);display:grid;place-items:center;font-size:20px;flex:none}
.ci .tx{flex:1}.ci .tk{width:30px;height:30px;border-radius:50%;background:var(--grnBg);color:var(--grn);display:grid;place-items:center;font-weight:800;opacity:0}
.ci.done .tk{opacity:1}
.pt .ci{font-size:15px;padding:12px 12px;gap:10px}
.paid{display:grid;grid-template-columns:1fr 1fr;gap:16px;width:100%;max-width:760px}
.pt .paid{grid-template-columns:1fr}
.pcase{padding:20px;text-align:left;display:flex;flex-direction:column;gap:12px}.pcase p{font-size:16px}.pcase p b{color:var(--o2)}
.bar{display:flex;height:46px;border-radius:14px;overflow:hidden;font-size:13px;font-weight:800;color:#fff}
.bar i{font-style:normal;display:grid;place-items:center}.bar .you{background:var(--grn)}.bar .fee{background:var(--o1)}.bar .zero{width:100%;background:#EEF0F4;color:var(--mut)}
.tie{font-size:26px;font-weight:800;letter-spacing:-.02em}.tie em{color:var(--o1)}
.team{display:flex;align-items:center;gap:28px}
.pt .team{flex-direction:column;gap:12px}
.hub{padding:18px;display:flex;flex-direction:column;align-items:center;gap:10px;width:220px}
.donut{position:relative;width:130px;height:130px}.donut svg{width:100%;height:100%}.donut b{position:absolute;inset:0;display:grid;place-items:center;font-size:14px}
.mates{display:flex;flex-direction:column;gap:10px}
.pt .mates{width:100%}
.mate{display:flex;align-items:center;gap:12px;padding:12px 14px;text-align:left;min-width:280px}.mate b{display:block}.mate span{font-size:13px;color:var(--mut)}
.mate.hl{border-color:var(--o1)}
.ona{width:auto;padding:0 28px}
.recap{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;width:100%;max-width:860px}
.pt .recap{grid-template-columns:1fr 1fr}
.rc{padding:14px;font-weight:700;display:flex;align-items:center;gap:8px;text-align:left}.rc .tk{width:26px;height:26px;border-radius:50%;background:var(--grnBg);color:var(--grn);display:grid;place-items:center;flex:none}
.cta.big{text-decoration:none;min-width:360px;font-size:20px}
.pt .cta.big{min-width:0;width:100%}
.disc{font-size:11px;color:var(--mut);max-width:560px}

/* ================= phones (tall canvas): the practice app fills the screen, bigger type ================= */
.pt .appwrap{height:100%;padding:4px 0}
.pt .appwrap .phone{width:100%;height:100%;padding:0;background:none;box-shadow:none;border-radius:0}
.pt .appwrap .scr{border-radius:22px;border:1.5px solid var(--line);font-size:14.5px;box-shadow:var(--shadow)}
.pt .ap-top{height:52px;padding:0 14px;font-size:14px}
.pt .ap-nav{height:66px;padding:4px 4px 8px}.pt .ap-nav button{font-size:11px}.pt .ap-nav svg{width:22px;height:22px}
.pt .pc-tags .lv-pill,.pt .ap-body .lv-pill{font-size:10.5px;padding:3px 8px}
.pt .pc-st i,.pt .grid4 i,.pt .ptop i,.pt .ap-body .lv-lab{font-size:10.5px}
.pt .pc-st b{font-size:15px}.pt .pc-h b{font-size:16px}.pt .grid4 b{font-size:20px}.pt .ptop b{font-size:16px}
.pt .ap-body .mut.xs,.pt .ap-body .mut.sm{font-size:12px}.pt .note{font-size:12px}
.pt .appwrap .lv-btn{height:50px;font-size:16px}.pt .mini{height:38px;font-size:13px}
.pt .fld{height:46px;font-size:15px}.pt .su label{font-size:12px}
.pt .trd,.pt .acc,.pt .prow{font-size:14px}.pt .pr-l b{font-size:14px}.pt .pr-l span,.pt .pr-r span,.pt .acc span,.pt .wal span{font-size:12px}
.pt .banner b{font-size:14px}.pt .banner span{font-size:12px}.pt .agree{font-size:14px}.pt .pm b{font-size:15px}.pt .pm span{font-size:12px}
.pt .ap-toast{top:60px;font-size:13px}
.pt .lv-pill{font-size:11px}.pt .lv-lab{font-size:11px}
.pt .cs{font-size:12px}.pt .cc .lv-pill{font-size:10px}
.pt .hello-art .fl .lv-pill{font-size:11px}

/* landscape phones: suggest portrait */
#rotate{display:none}
@media (orientation:landscape) and (max-height:500px) and (pointer:coarse){
  body.inlesson #rotate:not(.dismissed){display:grid;position:fixed;inset:0;z-index:60;place-items:center;background:rgba(244,241,236,.96);text-align:center;padding:20px}
  #rotate .rc-i{font-size:44px;display:inline-block;animation:rot 2s ease-in-out infinite}
  #rotate b{display:block;font-size:20px;margin:10px 0 4px}#rotate p{color:var(--ink3);margin-bottom:14px}
}
@keyframes rot{0%,30%{transform:rotate(90deg)}60%,100%{transform:rotate(0)}}

/* short phones (SE): scenes shrink to the canvas height */
.pt .hello-art{height:min(470px,calc(var(--fh,720px) - 250px))}
.pt .hello-art .f3{bottom:16px}
.pt .hello-art .f2{top:38%}
.pt .cc svg{display:none}.pt .cmp{gap:7px}.pt .board{gap:12px}
.pt .hub{flex-direction:row;flex-wrap:wrap;justify-content:center;width:100%;padding:12px;gap:8px 14px}
.pt .donut{width:92px;height:92px}.pt .donut b{font-size:12px}
.pt .mate{padding:9px 12px;min-width:0}

/* phones: compare = compact rows */
.pt .cc{display:grid;grid-template-columns:36px 1fr 66px 54px 62px;grid-template-rows:auto auto;column-gap:8px;row-gap:2px;align-items:center;text-align:left;padding:9px 10px}
.pt .cc .lv-tile{grid-row:1/3;width:36px!important;height:36px!important;font-size:13px!important}
.pt .cc>b{grid-column:2;grid-row:1;font-size:14px}.pt .cc>.lv-pill{grid-column:2;grid-row:2;justify-self:start;font-size:9.5px;padding:2px 7px}
.pt .cs{grid-row:1/3;flex-direction:column;align-items:flex-end;width:auto;font-size:13px}.pt .cs i{font-size:10px}
.pt .cmp .foot{display:none}

/* ---------- v3: risk bar, languages, richer boards ---------- */
#riskbar{position:fixed;left:0;right:0;bottom:0;z-index:45;padding:7px max(16px,env(safe-area-inset-right)) calc(7px + var(--safeB)) max(16px,env(safe-area-inset-left));
  font-size:10.5px;line-height:1.38;color:var(--ink3);text-align:center;background:rgba(244,241,236,.94);border-top:1px solid rgba(31,26,23,.08);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
#riskbar b{color:var(--o2);font-weight:800}
@media (max-aspect-ratio:1/1){#riskbar{font-size:9.5px;padding-top:5px;padding-bottom:calc(5px + var(--safeB))}}
.langs{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:clamp(14px,2.6vh,22px)}
@media (max-aspect-ratio:1/1){.langs{justify-content:center}}
.lang{min-height:40px;padding:0 14px;border-radius:999px;background:rgba(255,255,255,.65);border:1.5px solid var(--line);font-size:14px;font-weight:600;display:flex;align-items:center;gap:6px;transition:border-color .2s,background .2s}
.lang span{font-size:16px}
.lang.on{border-color:var(--o1);background:#fff;color:var(--o2);box-shadow:0 4px 14px -6px rgba(232,105,46,.5)}
.ci .ic.art{background:var(--o5);padding:6px}.ci .ic.art svg{width:100%;height:100%;overflow:visible}
.pgraph{width:100%;height:64px}
.coins{position:relative;height:0}.coins b{position:absolute;left:50%;top:-58px;width:22px;height:22px;border-radius:50%;background:#F2B544;color:#8A5A0B;font-size:12px;display:grid;place-items:center;box-shadow:0 2px 0 #C98F22}
.riskpill{margin-top:18px;display:inline-block;padding:10px 18px;border-radius:999px;background:#FDECEA;color:#B23A2E;font-weight:700;font-size:16px;border:1.5px solid #F6C9C3}
.pt .riskpill{font-size:14px;text-align:center}
.livebox{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#fff;border:1.5px solid var(--line);border-radius:14px;padding:10px 12px;margin:10px 0 4px}
.livebox i{display:block;font-style:normal;font-size:8.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--mut)}
.livebox b{font-size:18px;font-variant-numeric:tabular-nums}.livebox b.pos{color:var(--grn)}.livebox b.neg{color:#D9483B}
.livebox svg{width:110px;height:32px}
.pt .livebox b{font-size:20px}.pt .livebox i{font-size:11px}
.pf-ch.sm{height:44px;margin:6px 0 2px}
.fee{display:inline-block;margin-top:2px}
.confetti{position:relative;width:0;height:0;margin:0 auto}.confetti i{position:absolute;width:10px;height:6px;border-radius:2px;left:0;top:-40px}
#rotate b,#rotate p{display:block}
/* v3: long-language fixes (DE/RU/ES/PT) on phones */
.pt .cs{min-width:0;overflow:hidden}.pt .cs i{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;display:block}
.pt .cc>.lv-pill{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pt .board h2{overflow-wrap:break-word;max-width:100%}
html:not([lang=en]) .pt .board h2{font-size:29px}
.pt .pgraph{height:36px}.pt .pcase{padding:12px 14px;gap:7px}.pt .pcase p{font-size:14px}.pt .bar{height:34px}.pt .tie{font-size:20px}.pt .paid{gap:9px}
@media (max-aspect-ratio:1/1) and (max-width:480px){html:not([lang=en]) .ghost span{display:none}html:not([lang=en]) .ghost{padding:0 10px}}
.pt .cs i{font-size:9px!important;letter-spacing:-.01em}
@media (max-aspect-ratio:1/1) and (max-height:720px){#riskbar{font-size:8.6px;line-height:1.25;padding-top:4px;padding-bottom:calc(4px + var(--safeB))}}
html:not([lang=en]) .pt .ci{font-size:13.5px;padding:10px 12px}html:not([lang=en]) .pt .chk{gap:8px}

/* ---- Oct 21 content additions: both ways, drawdown, knowledge checks ---- */
.both .stmts{display:flex;gap:10px;width:100%;max-width:860px}
.both .st{flex:1;padding:12px 14px;font-size:16px;font-weight:600;border-radius:16px}
.both .st[data-k=win]{border-color:var(--grn)}.both .st[data-k=lose]{border-color:var(--red)}
.bw{width:100%;max-width:620px;padding:6px 16px 10px;border-radius:18px}
.bw-r{display:grid;grid-template-columns:1.6fr 1fr 1fr;align-items:center;gap:8px;padding:10px 0;border-bottom:1px solid var(--line);text-align:left;font-size:16px}
.bw-r b{text-align:right}.bw-r b.big{font-size:22px}.bw-h{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--mut)}
.bw-f{font-size:12px;color:var(--mut);padding-top:8px;text-align:left}
.pos{color:var(--grn)}.neg{color:var(--red)}
.bnote{max-width:640px;border-left:4px solid var(--o1);padding:6px 12px;text-align:left;font-size:16px;color:var(--ink2);background:rgba(255,255,255,.7);border-radius:0 10px 10px 0}
.riskpill.calm{background:var(--grnBg);color:#1F6B3E;border-color:var(--grn)}
.ddc{width:100%;max-width:560px;padding:12px 16px;border-radius:18px}
.ddg{width:100%;height:auto;display:block}
.ddg .even{stroke:var(--mut);stroke-width:2;stroke-dasharray:6 6}.ddg .ev{font-size:12px;fill:var(--mut);font-weight:700}
.ddg .dn{fill:none;stroke:var(--red);stroke-width:5;stroke-linecap:round}.ddg .up{fill:none;stroke:var(--grn);stroke-width:5;stroke-linecap:round}
.ddg .dot{fill:#fff;stroke:var(--o1);stroke-width:4}
.ddg .lbl text{font-size:16px;font-weight:800;text-anchor:middle;fill:#fff}.ddg .ldn rect{fill:var(--red)}.ddg .lup rect{fill:var(--grn)}
.ddrow{display:flex;justify-content:space-between;padding:8px 2px;border-top:1px solid var(--line);font-size:16px;text-align:left}.ddrow b{font-size:20px}
.quiz .qq{font-size:30px;line-height:1.2;max-width:640px;letter-spacing:-.02em}
.quiz .kicker{margin-bottom:0}
.qbox .choices{width:520px}
.qfb{max-width:560px;padding:12px 16px;text-align:left;font-size:16px;border-radius:16px;border-color:var(--o4)}
.qfb.ok{border-color:var(--grn);background:var(--grnBg)}.qfb .qok{color:var(--o2)}.qfb.ok .qok{color:#1F6B3E}
/* phone */
.pt .both .stmts{flex-direction:column;gap:6px}.pt .both .st{padding:8px 12px;font-size:14px}
.pt .bw-r{font-size:13px;padding:7px 0}.pt .bw-r b.big{font-size:17px}
.pt .bnote,.pt .ddrow{font-size:13px}.pt .ddrow b{font-size:16px}
.pt .quiz .qq{font-size:22px}.pt .qbox .choices{width:100%}.pt .qfb{font-size:14px}
.pt .qbox .choice{min-height:52px;padding:10px 14px;font-size:15px;gap:12px}.pt .qbox .ch-i{width:34px;height:34px;font-size:16px}
.pt .board.quiz{padding:0 16px}.pt .board.both,.pt .board.dd{padding:0 12px}

.ddps{display:flex;gap:14px;width:100%;max-width:760px}
.ddp{flex:1;padding:10px 14px 8px;border-radius:18px}.ddh{display:flex;align-items:center;gap:10px;font-size:17px}
.ddg .bdn{fill:var(--red)}.ddg .bup{fill:var(--grn)}.ddg .vdn,.ddg .vup{font-size:17px;font-weight:800;text-anchor:middle}.ddg .vdn{fill:var(--red)}.ddg .vup{fill:var(--grn)}
.dd .foot{font-size:11px;color:var(--mut)}
.pt .ddps{gap:8px}.pt .ddp{padding:8px 8px 6px}.pt .ddh{font-size:13px;gap:6px}.pt .ddh .lv-tile{width:26px!important;height:26px!important;font-size:10px!important}
.pt .ddg{height:140px}.pt .ddp .ddrow{font-size:11px;padding:5px 0}.pt .ddp .ddrow b{font-size:13px}

.ddp .ddg{height:180px;width:100%}.ddg .ev{font-size:11px}
@media (max-height:720px){ .pt .ddg{height:96px} .pt .dd .bnote{display:none} .pt .board.dd{gap:8px} .pt .dd .riskpill{margin-top:4px;font-size:13px;padding:7px 12px}
  .pt .both .st{padding:6px 10px;font-size:13px} .pt .both .bnote{font-size:12px} .pt .board.both{gap:8px} .pt .both .riskpill{margin-top:4px;font-size:13px;padding:7px 12px} }
