/* =====================================================================
   v30 · living gradient typography + readability & layout fixes
   Every text level has its own palette; gradients only move while the
   text is on screen (class .k13v, set by an IntersectionObserver).
   ===================================================================== */
html[data-aura="night"]{
  --t-h1:linear-gradient(100deg,#fff6dc 0%,#f6dc8f 22%,#e9c46a 40%,#fffaf0 52%,#d4af5a 70%,#fff3cf 100%);
  --t-h2:linear-gradient(100deg,#f7f3e8 0%,#e1d6ff 30%,#f6dc8f 60%,#fffaf0 80%,#f7f3e8 100%);
  --t-h3:linear-gradient(100deg,#c8fbf2 0%,#f7f3e8 35%,#f6dc8f 65%,#d6cbff 85%,#c8fbf2 100%);
  --t-sub:linear-gradient(100deg,#ddd5c2 0%,#cfc6ff 40%,#e9dfc4 70%,#ddd5c2 100%);
  --t-body:linear-gradient(100deg,#f1ebdc 0%,#ffffff 35%,#f3e4bd 65%,#f1ebdc 100%);
  --t-small:linear-gradient(100deg,#f0cf7a 0%,#8ff0e0 45%,#f6dc8f 75%,#f0cf7a 100%);
  --t-muted:linear-gradient(100deg,#c6bfab 0%,#ddd6ff 50%,#c6bfab 100%);
}
html[data-aura="day"]{
  --t-h1:linear-gradient(100deg,#2b1f06 0%,#8f6b22 30%,#3a2a0c 50%,#a77a26 72%,#2b1f06 100%);
  --t-h2:linear-gradient(100deg,#1b1608 0%,#4b3a8a 40%,#7a5a1c 70%,#1b1608 100%);
  --t-h3:linear-gradient(100deg,#0e4a44 0%,#1b1608 40%,#7a5a1c 75%,#0e4a44 100%);
  --t-sub:linear-gradient(100deg,#3f3a52 0%,#5a4b8e 50%,#3f3a52 100%);
  --t-body:linear-gradient(100deg,#1b1608 0%,#2f2848 50%,#1b1608 100%);
  --t-small:linear-gradient(100deg,#7a5a1c 0%,#0e6b62 50%,#7a5a1c 100%);
  --t-muted:linear-gradient(100deg,#4a4458 0%,#5b4f8a 50%,#4a4458 100%);
}
/* which elements get which level */
html[data-aura] #main :is(h1):not(.k13x),html[data-aura] .k-modal h2:not(.k13x){--tg:var(--t-h1);--tsp:9s}
html[data-aura] #main h2:not(.k13x){--tg:var(--t-h2);--tsp:12s}
html[data-aura] #main h3:not(.k13x){--tg:var(--t-h3);--tsp:13s}
html[data-aura] #main :is(.page-head p,.k5-hi small,.card>p.small,.k9-sub,.k10-ghl p){--tg:var(--t-sub);--tsp:16s}
html[data-aura] #main :is(.prose p,.prose li,.card>p:not(.small):not(.muted),.tile p,.k9-w p,.k12-tile small){--tg:var(--t-body);--tsp:20s}
html[data-aura] #main :is(.eyebrow,.k9-wh .k9-chip,.k5-stat span,.k6-crumbs,label>small,.k12-tile b+small){--tg:var(--t-small);--tsp:10s}
html[data-aura] #main :is(.muted,.small.muted,.prose small){--tg:var(--t-muted);--tsp:18s}
/* the painting itself */
html[data-aura] #main :is(h1,h2,h3,.page-head p,.k5-hi small,.card>p.small,.k9-sub,.k10-ghl p,.prose p,.prose li,.card>p:not(.small):not(.muted),.tile p,.k9-w p,.eyebrow,.muted,.small.muted,.k12-tile small,.k6-crumbs):not(.k13x){
  background-image:var(--tg)!important;background-size:300% 100%!important;-webkit-background-clip:text!important;background-clip:text!important;-webkit-text-fill-color:transparent;color:transparent}
html[data-aura] #main .k13v{animation:k13-flow var(--tsp,14s) ease-in-out infinite alternate}
@keyframes k13-flow{from{background-position:0% 50%}to{background-position:100% 50%}}
html[data-motion="off"] #main .k13v{animation:none}
/* keep these solid: links, code, chips, buttons, form controls, semantic colours, elements with their own gradient */
html[data-aura] #main :is(h1,h2,h3,p,li,.eyebrow,.muted) :is(a,code,kbd,mark,button,input,select,.pill,.btn,.k9-chip,.good,.bad,em.good,svg,.ki,.ke,.kw,img){-webkit-text-fill-color:currentColor}
html[data-aura] #main :is(h1,h2,h3,p,li) a{color:var(--gold-2)!important;text-decoration-color:rgba(233,196,106,.45)}
html[data-aura="day"] #main :is(h1,h2,h3,p,li) a{color:var(--gold-4)!important}
html[data-aura] #main :is(.prose,.card) :is(strong,b){-webkit-text-fill-color:currentColor;color:#fff4cf}
html[data-aura="day"] #main :is(.prose,.card) :is(strong,b){color:#3a2a0c}
.k5-cont *,.k5-hi h1 span,.k9-lvcard *,.ks *,.k10-ghero *,.kp-box *,.k9-phero *,.k-lhero *,.k9-flip *,.k-sheet *,.k5-stat b,.k9-ringc *,.k9-lvbig *,.k-combo,.btn,.btn *,button,button *,.opt,.opt *,.tabbar *,.nav *,.k6-mt *{--tg:none}
html[data-aura] #main :is(.k5-cont,.k9-lvcard,.k10-ghero,.k-lhero,.k9-phero,.k9-flip,.opt,.btn,button,.k5-stat) :is(h1,h2,h3,p,small,.eyebrow,.muted){background-image:none!important;-webkit-text-fill-color:currentColor;color:inherit}
html[data-aura] #main .k-lhero :is(h1,h2,.eyebrow){color:#fff!important}
html[data-aura] #main .k5-hi h1{background-image:var(--t-h1)!important}
html[data-aura] #main .k5-hi h1 span{-webkit-text-fill-color:transparent}

/* =================== readability over the space scenes =================== */
/* text sitting directly on the universe (not inside a card) gets a soft dark halo */
html[data-aura="night"] #main>.view>:is(.page-head,.k5-sec,.k5-dash>.k5-greet) :is(h1,h2,p,small,.eyebrow){filter:drop-shadow(0 2px 10px rgba(0,0,0,.85)) drop-shadow(0 0 2px rgba(0,0,0,.6))}
html[data-aura="night"] #main>.view>p,html[data-aura="night"] #main>.view>.small{text-shadow:0 2px 10px rgba(0,0,0,.9)}
/* learning-path labels and node captions get a dark backing */
html[data-aura] .path .node>span:not(.dot),html[data-aura] .path .lbl,html[data-aura] .path-node-label,html[data-aura] #main .path a span:last-child{background:rgba(8,7,20,.72);padding:3px 8px;border-radius:8px;border:1px solid rgba(233,196,106,.2)}
/* QR box message: dark text on the white box */
#qr .muted,#qr p{color:#3a3550!important;-webkit-text-fill-color:#3a3550!important;background:none!important}
/* wolf tip never touches the tab bar */
.k12-peek{bottom:calc(var(--tab-h) + 40px + env(safe-area-inset-bottom))!important}
@media (min-width:861px){.k12-peek{bottom:12px!important}}
/* desktop menu: the whole sidebar scrolls instead of a tiny inner list */
@media (min-width:861px){
  html[data-aura] body:not(.auth-gate):not(.focus-mode):not(.test-locked):not(.k6-reading) .rail{overflow-y:auto!important;overflow-x:hidden!important}
  html[data-aura] .rail>#nav{flex:none!important;min-height:0!important;overflow:visible!important}
  html[data-aura] .k6-railbtn{position:fixed!important;left:234px;top:86px}
  body.k6-mini .k6-railbtn{left:70px!important}
  html[data-aura] .rail .k-railprof,html[data-aura] .rail #profChip{padding:8px 10px!important}
}

/* =================== layout fixes from the audit =================== */
/* status bar sits in the flow above the page title, never on top of it */
html[data-aura] #main .k-hud{position:relative!important;top:auto!important;margin:0 0 14px auto!important}
html[data-aura] #main .k-hud+.page-head,html[data-aura] #main .k-hud+.spread{clear:both}
/* calendar "today" glows instead of growing into its neighbours */
.k-calday.today{animation:k13-today 1.8s ease-in-out infinite!important;transform:none!important}
@keyframes k13-today{0%,100%{box-shadow:0 0 0 0 rgba(233,196,106,.55)}50%{box-shadow:0 0 0 4px rgba(233,196,106,0),0 0 18px rgba(233,196,106,.45) inset}}
/* the 520-video list scrolls in its own panel instead of a 50 000px page */
html[data-aura] #main .view>.card>h2+div[style*="margin-top:8px"]{max-height:min(70vh,720px);overflow-y:auto;overscroll-behavior:contain;padding-right:6px;mask-image:linear-gradient(#000 92%,transparent)}
/* horizontal chip rows: show they scroll with a fade instead of chopping a word */
html[data-aura] #main :is(.k-set-tabs,.k6-chips,.k9-chips,.chips){mask-image:linear-gradient(90deg,#000 88%,transparent);scrollbar-width:none}
/* lesson toolbar wraps on narrow phones instead of pushing buttons off-screen */

/* long words never overflow cards */
html[data-aura] #main :is(h1,h2,h3,p,li,.tile b){overflow-wrap:anywhere;hyphens:auto}

/* =================== day theme on top of the universe ===================
   The background is space in both themes, so text sitting on space (or on
   dark/colour hero cards) uses the light palettes; only light cards use dark ink. */
html[data-aura="day"] body.k-space-on #main{
  --t-h1:linear-gradient(100deg,#fff6dc 0%,#f6dc8f 22%,#e9c46a 40%,#fffaf0 52%,#d4af5a 70%,#fff3cf 100%);
  --t-h2:linear-gradient(100deg,#f7f3e8 0%,#e1d6ff 30%,#f6dc8f 60%,#fffaf0 80%,#f7f3e8 100%);
  --t-h3:linear-gradient(100deg,#c8fbf2 0%,#f7f3e8 35%,#f6dc8f 65%,#d6cbff 85%,#c8fbf2 100%);
  --t-sub:linear-gradient(100deg,#ece6d6 0%,#ddd6ff 40%,#f1e8cf 70%,#ece6d6 100%);
  --t-body:linear-gradient(100deg,#f1ebdc 0%,#ffffff 35%,#f3e4bd 65%,#f1ebdc 100%);
  --t-small:linear-gradient(100deg,#f0cf7a 0%,#8ff0e0 45%,#f6dc8f 75%,#f0cf7a 100%);
  --t-muted:linear-gradient(100deg,#d6cfbb 0%,#e4ddff 50%,#d6cfbb 100%)}
html[data-aura="day"] body.k-space-on #main :is(.card:not(.k10-ghero):not(.k5-cont):not(.k-lhero),.tile,.k5-stat,.k9-w,.k-set,.lesson-item,.k12-tile,.reader-bar,.k6-crumbs){
  --t-h1:linear-gradient(100deg,#2b1f06 0%,#8f6b22 30%,#3a2a0c 50%,#a77a26 72%,#2b1f06 100%);
  --t-h2:linear-gradient(100deg,#1b1608 0%,#4b3a8a 40%,#7a5a1c 70%,#1b1608 100%);
  --t-h3:linear-gradient(100deg,#0e4a44 0%,#1b1608 40%,#7a5a1c 75%,#0e4a44 100%);
  --t-sub:linear-gradient(100deg,#3f3a52 0%,#5a4b8e 50%,#3f3a52 100%);
  --t-body:linear-gradient(100deg,#1b1608 0%,#2f2848 50%,#1b1608 100%);
  --t-small:linear-gradient(100deg,#7a5a1c 0%,#0e6b62 50%,#7a5a1c 100%);
  --t-muted:linear-gradient(100deg,#4a4458 0%,#5b4f8a 50%,#4a4458 100%)}
/* hero cards keep white text in both themes */
html[data-aura="day"] #main :is(.k5-cont,.k10-ghero,.k-lhero,.k9-phero) :is(h1,h2,h3,p,small,b,.eyebrow,.muted,span:not([class])){color:#fff8e6!important;-webkit-text-fill-color:#fff8e6!important;background-image:none!important}
html[data-aura="day"] #main .k-lhero h1{background-image:linear-gradient(100deg,#fff,#f6dc8f,#fff)!important;-webkit-text-fill-color:transparent!important;background-size:300% 100%!important}
html[data-aura="day"] body.k-space-on #main>.view>:is(.page-head,.k5-sec,.k5-dash>.k5-greet,section.group>h2) :is(h1,h2,p,small,.eyebrow){filter:drop-shadow(0 2px 10px rgba(0,0,0,.85))}
html[data-aura="day"] body.k-space-on #main section.group>h2{filter:drop-shadow(0 2px 10px rgba(0,0,0,.85))}
html[data-aura="day"] body.k-space-on #main .k6-crumbs{background:rgba(255,253,247,.88)}

/* =================== polish =================== */
::selection{background:rgba(233,196,106,.45);color:#fff;-webkit-text-fill-color:#fff}
html[data-aura] :is(a,button,.btn,.tile,input,select,textarea,[tabindex]):focus-visible{outline:2px solid #f6dc8f!important;outline-offset:3px;box-shadow:0 0 0 6px rgba(233,196,106,.18)!important}
html[data-aura] *{scrollbar-width:thin;scrollbar-color:rgba(233,196,106,.45) transparent}
html[data-aura] ::-webkit-scrollbar{width:9px;height:9px}html[data-aura] ::-webkit-scrollbar-thumb{background:linear-gradient(#e9c46a,#7b5cff);border-radius:9px;border:2px solid transparent;background-clip:padding-box}
@media (hover:hover){html[data-aura] #main :is(.tile,.lesson-item,.k12-tile){transition:transform .35s cubic-bezier(.2,.8,.2,1),box-shadow .35s,border-color .35s}
  html[data-aura] #main :is(.tile,.lesson-item,.k12-tile):hover{transform:translateY(-3px);border-color:rgba(233,196,106,.55)!important;box-shadow:0 14px 34px -14px rgba(0,0,0,.7),0 0 0 1px rgba(233,196,106,.25),0 0 28px -8px rgba(233,196,106,.35)}}
html[data-aura] #main .page-head h1{letter-spacing:-.01em;line-height:1.12}
html[data-aura] #main .page-head p{max-width:68ch;line-height:1.6}
html[data-aura] #main .prose :is(p,li){line-height:1.75}

/* =================== v30 · reworked top bar (mobile) =================== */
@media (max-width:860px){
  html[data-aura] body #mtop.mtop{height:calc(62px + env(safe-area-inset-top))!important;padding:env(safe-area-inset-top) 12px 0!important;gap:10px!important;
    background:linear-gradient(180deg,rgba(16,12,32,.92),rgba(8,7,18,.82))!important;-webkit-backdrop-filter:blur(18px) saturate(1.5);backdrop-filter:blur(18px) saturate(1.5);
    border:0!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 10px 30px -18px rgba(0,0,0,.9)!important;background-image:none}
  html[data-aura] body #mtop.mtop::after{content:""!important;position:absolute;left:0;right:0;bottom:0;top:auto;height:1px!important;opacity:1!important;
    background:linear-gradient(90deg,transparent,rgba(233,196,106,.15) 15%,#f6dc8f 50%,rgba(233,196,106,.15) 85%,transparent)!important;background-size:200% 100%!important;animation:k13-hair 7s linear infinite;pointer-events:none}
  html[data-aura] body #mtop.mtop::before{display:none!important}
  /* round gold-ring buttons */
  html[data-aura] body #mtop .icon-btn{width:40px!important;height:40px!important;min-width:40px;border-radius:50%!important;display:grid;place-items:center;padding:0!important;
    background:radial-gradient(circle at 30% 25%,rgba(255,255,255,.09),rgba(255,255,255,.015) 60%)!important;border:1px solid rgba(233,196,106,.32)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 4px 14px -6px rgba(0,0,0,.8)!important;color:#f3d688!important;transition:transform .2s,border-color .2s,box-shadow .2s}
  html[data-aura] body #mtop .icon-btn:active{transform:scale(.92)}
  html[data-aura] body #mtop .icon-btn svg{width:19px!important;height:19px!important;stroke:#f3d688!important;stroke-width:2!important;fill:none!important;filter:drop-shadow(0 0 6px rgba(233,196,106,.35))}
  html[data-aura] body #mtop #mMenu svg path{d:path("M4 7h16M4 12h11M4 17h16")}
  /* avatar inside a slowly turning gold ring */
  html[data-aura] body #mtop .brand-mark{position:relative;width:38px!important;height:38px!important;flex:none;border-radius:50%!important;display:grid!important;place-items:center;overflow:visible;
    background:#0d0b1a!important;font-size:20px!important;line-height:1;box-shadow:0 0 0 1.5px #0d0b1a,0 0 16px -4px rgba(233,196,106,.6)!important;margin-left:2px}
  html[data-aura] body #mtop .brand-mark::before{content:"";position:absolute;inset:-2.5px;border-radius:50%;z-index:-1;
    background:conic-gradient(from var(--k13a,0deg),#f6dc8f,#7b5cff,#2dd4bf,#e9c46a,#f6dc8f);animation:k13-ring 8s linear infinite}
  html[data-aura] body #mtop .brand-mark>*{max-width:30px;max-height:30px;border-radius:50%;overflow:hidden}
  html[data-aura] body #mtop .brand-mark img{width:30px;height:30px;object-fit:cover}
  html[data-aura] body #mtop .brand-mark :is(.k-av,.av,span){width:30px!important;height:30px!important;font-size:19px!important;display:grid;place-items:center;background:none!important;border:0!important;box-shadow:none!important}
  /* two-line brand block */
  html[data-aura] body #mtop .k13-bt{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;line-height:1.05;gap:3px}
  html[data-aura] body #mtop .k13-wm{font-family:var(--font-display);font-weight:800;font-style:normal;font-size:17px;letter-spacing:.02em;
    background:linear-gradient(100deg,#fff6dc,#f6dc8f 30%,#d4af5a 55%,#fff3cf 80%,#f6dc8f);background-size:250% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;animation:k13-flow 8s ease-in-out infinite alternate}
  html[data-aura] body #mtop #mTitle{display:block!important;opacity:1!important;transform:none!important;flex:none!important;padding:0!important;font-family:var(--font-tech)!important;font-weight:600!important;
    font-size:10px!important;letter-spacing:.16em;text-transform:uppercase;color:rgba(233,210,160,.78)!important;-webkit-text-fill-color:rgba(233,210,160,.78);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:none!important}
  html[data-aura] body #mtop.k6-title-in #mTitle{color:#fff3cf!important;-webkit-text-fill-color:#fff3cf}
  /* gem capsule */
  html[data-aura] body #mtop .k-mgems{height:36px!important;padding:0 12px 0 8px!important;gap:6px!important;border-radius:999px!important;display:flex;align-items:center;text-decoration:none;
    background:linear-gradient(180deg,rgba(255,255,255,.06),rgba(255,255,255,.015))!important;border:1px solid rgba(233,196,106,.32)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.07)!important}
  html[data-aura] body #mtop .k-mgems .ki{width:18px!important;height:18px!important;filter:drop-shadow(0 0 6px rgba(120,200,255,.6))}
  html[data-aura] body #mtop .k-mgems b{font-family:var(--font-tech)!important;font-size:14px!important;font-weight:700!important;color:#f6dc8f!important;-webkit-text-fill-color:#f6dc8f;letter-spacing:.02em}
  html[data-aura] body #mtop #mXP{display:none!important}
}
@keyframes k13-hair{from{background-position:200% 0}to{background-position:0 0}}
@property --k13a{syntax:"<angle>";inherits:false;initial-value:0deg}
@keyframes k13-ring{to{--k13a:360deg}}
html[data-motion="off"] #mtop *,html[data-motion="off"] #mtop::after{animation:none!important}

/* =================== v30 · reworked desktop header area =================== */
@media (min-width:861px){
  /* rail: obsidian glass, gold hairline instead of the blue strip */
  html[data-aura] body .rail::before{background:linear-gradient(90deg,transparent,#f6dc8f,transparent)!important;height:1px!important;opacity:.7}
  html[data-aura] body .rail{background-color:rgba(10,9,22,.72)!important;border-right:1px solid rgba(233,196,106,.16)!important}
  html[data-aura] body .rail .brand .brand-text b{font-family:var(--font-display);font-weight:800;letter-spacing:.01em;
    background:linear-gradient(100deg,#fff6dc,#f6dc8f 30%,#d4af5a 55%,#fff3cf 80%,#f6dc8f);background-size:250% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;animation:k13-flow 8s ease-in-out infinite alternate}
  html[data-aura] body .rail .brand .brand-text b .k-wordmark-s{-webkit-text-fill-color:transparent;color:transparent;background:none}
  html[data-aura] body .rail .brand .brand-text>span{font-family:var(--font-tech);font-size:10.5px;letter-spacing:.12em;text-transform:uppercase;color:rgba(233,210,160,.7)!important}
  html[data-aura] body .rail .brand .brand-mark{filter:drop-shadow(0 0 14px rgba(233,196,106,.35))}
  /* status capsule */
  html[data-aura] body #main #kHud.k-hud{gap:0!important;padding:4px!important;border-radius:999px!important;height:auto;
    background:linear-gradient(180deg,rgba(18,14,34,.9),rgba(9,8,20,.84))!important;border:1px solid rgba(233,196,106,.3)!important;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 12px 30px -16px rgba(0,0,0,.9),0 0 30px -14px rgba(233,196,106,.35)!important;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}
  html[data-aura] body #main #kHud .k-hud-i{position:relative;height:34px;min-width:34px;padding:0 12px!important;display:flex;align-items:center;gap:7px;border-radius:999px!important;
    background:none!important;border:0!important;box-shadow:none!important;text-decoration:none;transition:background .2s}
  html[data-aura] body #main #kHud .k-hud-i+.k-hud-i::before{content:"";position:absolute;left:0;top:9px;bottom:9px;width:1px;background:linear-gradient(transparent,rgba(233,196,106,.35),transparent)}
  html[data-aura] body #main #kHud .k-hud-i:hover{background:rgba(233,196,106,.1)!important}
  html[data-aura] body #main #kHud .k-hud-i b,html[data-aura] body #main #kHud .k-hud-i strong{font-family:var(--font-tech)!important;font-size:13.5px!important;font-weight:700!important;color:#f6dc8f!important;-webkit-text-fill-color:#f6dc8f;background:none!important}
  html[data-aura] body #main #kHud .k-hud-i span:not(.kiw):not(.k-flame){font-family:var(--font-tech);font-size:12px;letter-spacing:.06em;color:#eadbb4!important;-webkit-text-fill-color:#eadbb4}
  html[data-aura] body #main #kHud :is(.ki,.kiw svg,img){width:18px!important;height:18px!important}
  html[data-aura] body #main #kHud .k-hud-goal svg{width:24px!important;height:24px!important}
  html[data-aura] body #main #kHud .k-hud-goal svg circle:first-child{stroke:rgba(233,196,106,.22)!important}
  html[data-aura] body #main #kHud .k-hud-goal svg circle:last-child,html[data-aura] body #main #kHud .k-hud-goal svg circle+circle{stroke:#f6dc8f!important}
}
@media (min-width:861px){
  html[data-aura] body .rail .brand .brand-text>span{font-size:9.5px!important;letter-spacing:.07em!important;white-space:nowrap}
  html[data-aura] body .rail :is(.k-railprof,#profChip) b{color:#f6dc8f!important;-webkit-text-fill-color:#f6dc8f}
  html[data-aura] body .rail :is(.k-railprof,#profChip){background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.015))!important;border:1px solid rgba(233,196,106,.22)!important}
}
@media (min-width:861px){
  html[data-aura] body .rail .k-railprof #profChip,html[data-aura] body .rail .k-railprof>*{background:transparent!important;border:0!important;box-shadow:none!important}
  html[data-aura] body .rail :is(.k-railprof,#profChip) :is(.k-av,.av,.k-avf){box-shadow:0 0 0 2px rgba(233,196,106,.55)!important;border-color:transparent!important}
}
@media (min-width:861px){html[data-aura] body .rail #profChip .prof-main{background:transparent!important;border:0!important;box-shadow:none!important}
  html[data-aura] body .rail #profChip{border-radius:18px!important;overflow:hidden}}

/* =================== v31 · lite profile (phones / low-power) ===================
   Same look; drops the effects that cost the most on mobile GPUs. */
/* 1. no live blur: a blur over an animating canvas is recomputed every frame */
html.k-lite *,html.k-lite *::before,html.k-lite *::after{-webkit-backdrop-filter:none!important;backdrop-filter:none!important}
html.k-lite[data-aura] body #mtop.mtop{background:linear-gradient(180deg,rgba(16,12,32,.97),rgba(9,8,20,.95))!important}
html.k-lite[data-aura="night"] .tabbar{background:rgba(12,10,26,.95)!important}html.k-lite[data-aura="day"] .tabbar{background:rgba(255,253,247,.97)!important}
html.k-lite[data-aura="night"] body.k-space-on{--surface:rgba(12,11,26,.86);--glass:rgba(12,11,26,.9)}
html.k-lite :is(.k-modal,.k-sheet,.k6-more,#k5-pal,.dialog,.drawer-open .rail){background-color:rgba(14,12,28,.97)!important}
html.k-lite[data-aura="day"] :is(.k-modal,.k-sheet,.k6-more,#k5-pal,.dialog){background-color:rgba(255,253,247,.98)!important}
/* 2. gradient text stays, but is painted once instead of every frame */
html.k-lite #main .k13v,html.k-lite #mtop .k13-wm{animation:none!important;background-position:30% 50%!important}
/* 3. decorative layers the space canvas already covers */
html.k-lite :is(#k8-dust,.k7-sweep,.k8-spot,.k8-hex,.k12-shoot,.k12-sp,.k7-floor,.k7-horizon){display:none!important}
html.k-lite #mtop::after{animation:none!important}
html.k-lite #mtop .brand-mark::before{animation-duration:16s}
/* 4. big soft shadows and filters are expensive to repaint while scrolling */
html.k-lite #main :is(.card,.tile,.k5-stat,.lesson-item,.k12-tile){box-shadow:0 6px 18px -10px rgba(0,0,0,.7)!important;filter:none!important}
html.k-lite[data-aura] #main>.view>:is(.page-head,.k5-sec,.k5-dash>.k5-greet) :is(h1,h2,p,small,.eyebrow){filter:none!important}
html.k-lite[data-aura] #main :is(h1,h2,h3,p,.eyebrow,.muted).k13v,html.k-lite[data-aura] #main :is(h1,h2,h3,p,.eyebrow,.muted)[data-k13]{text-shadow:none}
/* 5. cheap readability halo behind text that sits on the universe (replaces the filter) */
html.k-lite[data-aura] #main>.view>:is(.page-head,.k5-greet,.k5-sec){position:relative;isolation:isolate}
html.k-lite[data-aura="night"] #main>.view>:is(.page-head,.k5-greet)::before{content:"";position:absolute;inset:-12px -16px;z-index:-1;pointer-events:none;background:radial-gradient(ellipse 80% 90% at 35% 50%,rgba(5,4,14,.6),rgba(5,4,14,0) 75%)}

/* =================== v31 · mobile overlap fixes =================== */
/* dashboard learning-path: labels get real width (they were squeezed into 5-line columns and stacked on each other) */
html[data-aura] .k9-trail .k9-node{width:max-content}
html[data-aura] .k9-trail .k9-lbl{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;width:max-content;max-width:min(200px,50vw);white-space:normal;text-align:inherit}
html[data-aura] .k9-trail .k9-lbl b{display:block}
html[data-aura] .k9-trail .k9-node.rt .k9-lbl{text-align:right}
/* "NEW" ribbon no longer lies on top of the level pill: it becomes a small chip beside the icon */
html[data-aura] #main .k-new{top:16px!important;right:auto!important;left:70px!important;transform:none!important;padding:3px 9px!important;font-size:9.5px!important;border-radius:6px!important;box-shadow:0 0 14px -4px rgba(233,196,106,.8)!important;max-width:none}

/* lesson toolbar on phones: ONE compact, solid, swipeable row (it had grown into a 4-row see-through block over the text) */
@media (max-width:860px){
  html[data-aura] #main .reader-bar{flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden;scrollbar-width:none;gap:6px!important;
    top:calc(62px + env(safe-area-inset-top))!important;margin:0 -12px 10px!important;padding:7px 12px!important;border-radius:0!important;border-left:0!important;border-right:0!important;
    background:rgba(11,10,24,.97)!important;box-shadow:0 10px 24px -14px rgba(0,0,0,.9)!important;
    -webkit-mask-image:linear-gradient(90deg,#000 90%,transparent);mask-image:linear-gradient(90deg,#000 90%,transparent);transition:top .35s}
  html[data-aura] #main .reader-bar::-webkit-scrollbar{display:none}
  html[data-aura] #main .reader-bar>*,html[data-aura] #main .reader-bar>.row{flex:none!important;flex-wrap:nowrap!important}
  html[data-aura] #main .reader-bar .btn{height:34px;padding:0 11px!important;font-size:12.5px!important;white-space:nowrap}
  html.k17-barup #main .reader-bar{top:env(safe-area-inset-top)!important}
  html[data-aura="day"] #main .reader-bar{background:rgba(255,253,247,.97)!important}
}
/* back-to-top: smaller and clear of the tab bar */
@media (max-width:860px){html[data-aura] .k6-btt{width:42px!important;height:42px!important;right:12px!important;bottom:calc(var(--tab-h,64px) + 22px + env(safe-area-inset-bottom))!important}}
/* reward tiles: blue titles on dark gold were hard to read */
html[data-aura="night"] #main .k-hg b,html[data-aura="night"] #main .k-odtile b,html[data-aura="night"] #main :is(.k-rw,.k-reward) :is(b,strong,h3){color:#f6dc8f!important;-webkit-text-fill-color:#f6dc8f}
#main .k13-perf{display:grid;gap:6px;margin-top:10px}#main .k13-perf select{max-width:320px}

/* day theme in lite: drawer stays light */
html.k-lite[data-aura="day"] body.drawer-open .rail{background-color:rgba(255,253,247,.98)!important}
