@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Rubik:wght@500;600;700;800&display=swap');
/* Ортақ стиль: тіл/контраст/дауыс тақтасы, ақ-қара режим, өзін-өзі бағалау */
.a11y{position:fixed;right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom));z-index:2147483000;display:flex;align-items:center;gap:6px;padding:5px;border-radius:999px;background:rgba(14,14,18,.86);border:1px solid rgba(255,255,255,.22);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);font-family:'Inter Tight',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;font-size:13px;line-height:1;box-shadow:0 8px 30px rgba(0,0,0,.45);-webkit-tap-highlight-color:transparent}
.a11y *{box-sizing:border-box}
.a11y .lg{display:flex;border-radius:999px;background:rgba(255,255,255,.08);padding:2px}
.a11y button{all:unset;box-sizing:border-box;cursor:pointer;color:#fff;font:inherit;font-weight:600;letter-spacing:.04em;height:34px;min-width:34px;padding:0 10px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;gap:6px;transition:background .2s,color .2s}
.a11y button:hover{background:rgba(255,255,255,.16)}
.a11y button:focus-visible{outline:2px solid #fff;outline-offset:2px}
.a11y button[aria-pressed=true]{background:#fff;color:#000}
.a11y button svg{width:17px;height:17px;flex:none}
.a11y .lg button{height:30px;min-width:36px;padding:0 8px;font-size:12px}
.a11y .lb{font-weight:500;letter-spacing:0}
.a11y .a11y-stop{display:none}
.a11y.speaking .a11y-stop{display:inline-flex;background:#ff3d5a}
@media(max-width:560px){.a11y .lb{display:none}.a11y{gap:4px;padding:4px}.a11y button{min-width:32px;padding:0 8px}}
.a11y-toast{position:fixed;left:50%;bottom:72px;transform:translateX(-50%);z-index:2147483001;max-width:min(92vw,460px);padding:11px 16px;border-radius:14px;background:#fff;color:#000;font:500 14px/1.35 'Inter Tight',system-ui,sans-serif;box-shadow:0 8px 30px rgba(0,0,0,.5);opacity:0;pointer-events:none;transition:opacity .3s}
.a11y-toast.on{opacity:1}
::highlight(tts){background-color:rgba(255,107,138,.42);color:inherit}
html.hc ::highlight(tts){background-color:#fff;color:#000}

/* ---------- ақ-қара режим (әлсіз көретіндерге) ---------- */
html.hc{--ink:#fff;--mute:#fff;--dim:#eee;--line:#fff;--hot:#fff;--ember:#fff;--a1:#fff;--a2:#fff;--c-blue:#fff;--c-green:#fff;--c-violet:#fff;--blue:#fff;--green:#fff;--violet:#fff;--gold:#fff;filter:grayscale(1);scroll-behavior:auto}
html.hc body{background:#000!important;color:#fff!important;font-weight:500}
html.hc *{text-shadow:none!important}
html.hc .ly:not(.keep),html.hc .plx-planet,html.hc .plx-astro,html.hc .astro,html.hc .planet,html.hc .glowtop,html.hc .vig,html.hc #bg,html.hc canvas#stars,html.hc canvas#atom{display:none!important}
html.hc .ly.keep{transform:none!important}
html.hc .big{text-shadow:none;font-weight:700}
html.hc .sub{color:#fff}
html.hc :is(p,li,span,label,td,th,small){color:#fff}
html.hc :is(h1,h2,h3,h4){color:#fff!important;-webkit-text-fill-color:#fff!important;background:none!important}
html.hc .grad,html.hc .grad *{background:none!important;-webkit-text-fill-color:#fff!important;color:#fff!important}
html.hc :is(a,button,[role=button],.row,.card,.sa-row,.opt,.tile):not(.a11y button){border-color:#fff}
html.hc .rv{opacity:1!important;transform:none!important}
html.hc :focus-visible{outline:3px solid #fff!important;outline-offset:3px}
html.hc .pill{background:#fff;color:#000;border-color:#fff}
html.hc .pill.ghost{background:#000;color:#fff;border:2px solid #fff}
html.hc .chips span{border-color:#fff;color:#fff}
html.hc .nav.sc{background:#000;border-bottom:2px solid #fff}
html.hc [aria-pressed=true],html.hc [aria-pressed=true] *{color:#000!important}
html.hc .o0,html.hc .o1,html.hc .o2,html.hc .o3{background:#000!important;border:3px solid #fff!important;color:#fff!important}
html.hc .opt.right,html.hc .opt.right *{background:#fff!important;color:#000!important}
html.hc .opt.dim{opacity:.55}
html.hc :is(.panel,.brow,.pod,.chip,.field){background:#000!important;border:2px solid #fff!important;color:#fff!important}
html.hc .btn.hot,html.hc .btn{background:#fff!important;color:#000!important;border:2px solid #fff!important}
html.hc .btn.ghost{background:#000!important;color:#fff!important}
html.hc .seg button.on{background:#fff;color:#000}
html.hc .bar i,html.hc #sBar,html.hc #tBar{background:#fff!important}
html.hc :is(.glass,.m-card,.gz-card,#nav,#exits){background:#000!important;border:2px solid #fff!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:none!important}
html.hc .glass::before{display:none!important}
html.hc :is(.muted,.pt-tab th,.info-grid dt,.pt .gnum,.pt .pnum,.pt .flab,.cnt span,.gl-card p,.gl-hint){color:#fff!important}
html.hc .btn:not(.on):not(.primary){background:#000!important;color:#fff!important;border:2px solid #fff!important;box-shadow:none!important}
html.hc :is(.btn.on,.btn.primary){background:#fff!important;color:#000!important;border:2px solid #fff!important;box-shadow:none!important}
html.hc .pt-el{background:#000!important;border:1px solid #fff!important;color:#fff!important;box-shadow:none!important}
html.hc :is(.pt-el b,.cnt b,.ctl b,.gl-card b,.q-f,.task-t){color:#fff!important;-webkit-text-fill-color:#fff!important;background:none!important}
html.hc .pt-el.dim{opacity:.3}
html.hc :is(.rule,.note,.mb-it,.cnt,.cv-box,.mb-box,.mb-found){background:#000!important;border:2px solid #fff!important;box-shadow:none!important}
html.hc .term{color:#fff!important;border-bottom:2px dotted #fff!important}
html.hc :is(.nbtn,.pm){background:#000!important;color:#fff!important;border:2px solid #fff!important}
html.hc :is(#spot,#progress){display:none!important}
html.hc .row::before{display:none}
html.hc .row:hover .arr{background:#fff;color:#000}
html.hc .a11y{background:#000;border:2px solid #fff}
html.hc .a11y button[aria-pressed=true]{background:#fff;color:#000}

/* ---------- өзін-өзі бағалау ---------- */
.sa-lead{max-width:640px;margin:-30px 0 44px;color:var(--mute);font-size:clamp(16px,1.6vw,19px)}
.sa{border-top:1px solid var(--line)}
.sa-row{display:grid;grid-template-columns:44px 1fr auto;gap:12px 22px;align-items:center;padding:22px 0;border-bottom:1px solid var(--line)}
.sa-row .no{font-family:var(--mono);font-size:13px;color:var(--dim)}
.sa-row .tx{font-size:clamp(16px,1.7vw,20px);color:var(--ink);font-weight:300;line-height:1.35}
.sa-opts{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.sa-opts button{all:unset;box-sizing:border-box;cursor:pointer;display:inline-flex;align-items:center;gap:8px;height:44px;padding:0 16px;border-radius:999px;border:1px solid rgba(255,255,255,.28);color:var(--mute);font-size:14px;font-weight:400;transition:background .25s,color .25s,border-color .25s;-webkit-tap-highlight-color:transparent}
.sa-opts button:hover{border-color:#fff;color:#fff}
.sa-opts button:focus-visible{outline:2px solid var(--hot);outline-offset:2px}
.sa-opts button i{font-style:normal;font-size:18px;line-height:1}
.sa-opts button[aria-pressed=true]{color:#000;border-color:transparent}
.sa-opts button[data-v="0"][aria-pressed=true]{background:#ff6b8a}
.sa-opts button[data-v="1"][aria-pressed=true]{background:#ffc857}
.sa-opts button[data-v="2"][aria-pressed=true]{background:#5ee6a0}
html.hc .sa-opts button{border:2px solid #fff;color:#fff}
html.hc .sa-opts button[aria-pressed=true]{background:#fff!important;color:#000}
.sa-res{display:grid;grid-template-columns:auto 1fr;gap:26px 48px;align-items:center;margin-top:44px;padding:34px;border:1px solid var(--line);border-radius:28px;background:rgba(255,255,255,.03)}
.sa-ring{position:relative;width:150px;height:150px}
.sa-ring svg{width:100%;height:100%;transform:rotate(-90deg)}
.sa-ring circle{fill:none;stroke-width:9}
.sa-ring .bg{stroke:rgba(255,255,255,.14)}
.sa-ring .fg{stroke:var(--hot);stroke-linecap:round;transition:stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1)}
html.hc .sa-ring .bg{stroke:#555}html.hc .sa-ring .fg{stroke:#fff}
.sa-ring b{position:absolute;inset:0;display:grid;place-items:center;font-weight:300;font-size:38px;letter-spacing:-.03em}
.sa-msg{font-size:clamp(20px,2.4vw,30px);font-weight:300;letter-spacing:-.02em;line-height:1.2;margin:0 0 6px;color:var(--ink)}
.sa-sub{margin:0 0 18px;color:var(--mute);font-size:15px}
.sa-todo{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}
.sa-todo a{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border-radius:999px;border:1px solid rgba(255,255,255,.3);font-size:13px;color:var(--ink);transition:background .25s}
.sa-todo a:hover{background:rgba(255,255,255,.12)}
html.hc .sa-todo a{border:2px solid #fff}
.sa-reset{all:unset;cursor:pointer;font-family:var(--mono);font-size:12px;letter-spacing:.08em;color:var(--dim);border-bottom:1px solid var(--line);padding-bottom:2px}
.sa-reset:hover{color:#fff;border-color:#fff}
.sa-reset:focus-visible{outline:2px solid var(--hot);outline-offset:3px}
@media(max-width:760px){
  .sa-row{grid-template-columns:1fr;gap:10px}.sa-row .no{display:none}.sa-opts{justify-content:flex-start}
  .sa-opts button{flex:1 1 30%;justify-content:center;padding:0 8px;font-size:13px;height:48px}
  .sa-res{grid-template-columns:1fr;padding:24px;gap:22px}.sa-ring{width:128px;height:128px}
}

.sa-class{display:flex;gap:24px;align-items:center;justify-content:space-between;flex-wrap:wrap;border:1px solid var(--line);border-radius:24px;padding:22px 26px;margin-bottom:34px;background:rgba(255,255,255,.03)}.sa-class p{margin:0;max-width:640px;color:var(--mute)}
html.hc .sa-class{border:2px solid #fff;background:#000}

/* ---------- бүйір мәзір ---------- */
.nav-burger{position:fixed;top:max(12px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));z-index:2147482000;width:46px;height:46px;border-radius:14px;border:1px solid rgba(255,255,255,.25);background:rgba(14,14,18,.82);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;cursor:pointer;padding:0;-webkit-tap-highlight-color:transparent}
.nav-burger span{display:block;width:22px;height:2px;border-radius:2px;background:#fff}
.nav-burger:hover{background:rgba(40,40,48,.95)}
.nav-burger:focus-visible,.nav-drawer a:focus-visible,.nd-x:focus-visible{outline:2px solid #ff6b8a;outline-offset:2px}
.nav-scrim{position:fixed;inset:0;z-index:2147482500;background:rgba(0,0,0,.6);opacity:0;pointer-events:none;transition:opacity .3s}
.nav-scrim.open{opacity:1;pointer-events:auto}
.nav-drawer{position:fixed;top:0;bottom:0;left:0;z-index:2147482600;width:min(340px,88vw);background:#0b0b10;border-right:1px solid rgba(255,255,255,.18);transform:translateX(-102%);transition:transform .32s cubic-bezier(.2,.8,.2,1);display:flex;flex-direction:column;font-family:'Inter Tight',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;color:#fff;overflow-y:auto}
.nav-drawer.open{transform:none;box-shadow:0 0 60px rgba(0,0,0,.7)}
.nd-head{display:flex;align-items:center;justify-content:space-between;padding:20px 20px 14px;border-bottom:1px solid rgba(255,255,255,.12)}
.nd-head b{font-weight:600;font-size:18px;letter-spacing:-.01em}
.nd-x{all:unset;cursor:pointer;width:38px;height:38px;border-radius:12px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.25);font-size:16px}
.nd-body{padding:14px 12px 30px;display:flex;flex-direction:column;gap:4px}
.nd-link{display:flex;align-items:center;gap:12px;padding:13px 14px;border-radius:14px;color:#fff;text-decoration:none;font-size:16px;font-weight:400}
.nd-link span{width:26px;text-align:center;font-size:18px}
.nd-link:hover{background:rgba(255,255,255,.09)}
.nd-link.on{background:#fff;color:#000;font-weight:600}
.nd-grade{margin-top:12px;padding:12px 6px 6px;border-top:1px solid rgba(255,255,255,.12)}
.nd-gt{font-family:'JetBrains Mono',ui-monospace,monospace;font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:#ff6b8a;padding:0 8px 8px}
.nd-topic{padding:6px 8px 8px;font-size:17px;font-weight:500;color:#fff}
.nd-link.sub{margin-left:10px;font-size:15px}
.nd-soon{margin:22px 8px 0;font-size:13px;color:rgba(255,255,255,.5)}
html.hc .nav-burger,html.hc .nav-drawer{background:#000;border:2px solid #fff}
html.hc .nd-gt{color:#fff}
@media(max-width:560px){.nav-burger{width:42px;height:42px}}
/* мәзір түймесіне орын босату */
.back{left:max(64px,calc(env(safe-area-inset-left) + 64px))!important}
.nav{padding-left:max(72px,env(safe-area-inset-left))!important}

.topbar{padding-left:max(72px,16px)!important}
body:has(#play:not([hidden])) .nav-burger{display:none}


.nd-topic{all:unset;box-sizing:border-box;width:100%;cursor:pointer;display:flex;align-items:center;gap:10px;padding:12px 10px;border-radius:14px;font-size:16px;font-weight:500;color:#fff;line-height:1.25}
.nd-topic:hover{background:rgba(255,255,255,.07)}
.nd-topic:focus-visible{outline:2px solid #ff6b8a;outline-offset:2px}
.nd-topic .ti{width:26px;text-align:center;font-size:18px;flex:none}
.nd-topic .tt{flex:1}
.nd-topic .chev{width:9px;height:9px;border-right:2px solid rgba(255,255,255,.7);border-bottom:2px solid rgba(255,255,255,.7);transform:rotate(45deg);transition:transform .25s;flex:none;margin-right:4px}
.nd-topic.open .chev{transform:rotate(-135deg)}
.nd-topic.open{background:rgba(255,255,255,.06)}
.nd-sub{padding:2px 0 8px 12px}
.nd-sub[hidden]{display:none}

@media(max-width:1500px){.slide .sl-head{padding-left:56px}}


.nd-sec{all:unset;box-sizing:border-box;width:100%;cursor:pointer;display:flex;align-items:center;gap:10px;padding:13px 10px;margin-top:2px;border-radius:14px;font-size:17px;font-weight:700;color:#fff;line-height:1.25;background:rgba(255,107,138,.12);border:1px solid rgba(255,107,138,.35)}
.nd-sec:hover{background:rgba(255,107,138,.2)}
.nd-sec:focus-visible{outline:2px solid #ff6b8a;outline-offset:2px}
.nd-sec .ti{width:26px;text-align:center;font-size:18px;flex:none}
.nd-sec .tt{flex:1}
.nd-sec .chev{width:9px;height:9px;border-right:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(45deg);transition:transform .25s;flex:none;margin-right:4px}
.nd-sec.open .chev{transform:rotate(-135deg)}
.nd-secbody{padding:6px 0 4px 10px;border-left:2px solid rgba(255,255,255,.14);margin:4px 0 0 14px}
.nd-secbody[hidden]{display:none}
html.hc .nd-sec{background:#000;border:2px solid #fff}

/* ---------- жарық фон ---------- */
html.light{background:#000;filter:invert(1) hue-rotate(180deg)}
html.light :is(img,video,iframe){filter:invert(1) hue-rotate(180deg)}
html.light .plx-planet{opacity:.3}
html.light ::highlight(tts){background-color:rgba(255,107,138,.5)}

/* тіл/тақта панелі бүйір мәзірде тұрады */
.a11y.in-drawer{position:static;z-index:auto;margin:18px 4px 10px;flex-wrap:wrap;justify-content:flex-start;border-radius:18px;padding:8px;gap:6px;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
.a11y.in-drawer .lb{display:inline!important}
.a11y.in-drawer .lg{width:100%}
.a11y.in-drawer .lg button{flex:1}

/* ===== әдемі қаріп және сәл ашық түс (ақ-қара және жарық режимге тимейді) ===== */
html:not(.hc) body,html:not(.hc) body *:not(code):not(pre):not(.mono){font-family:'Nunito','Inter Tight',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif!important}
html:not(.hc) body :is(h1,h2,h3,h4,.big,.brand,.sl-num,.kick,.tag,.pill,.btn,.no,.nd-head b,.world h3,.card h3){font-family:'Rubik','Nunito','Inter Tight',system-ui,sans-serif!important;letter-spacing:-.01em}
html:not(.hc) body :is(p,li,td,label,.muted,.desc){line-height:1.55}
html:not(.hc):not(.light) body{background-color:#141c3f!important}
html:not(.hc):not(.light) :is(section,.intro,footer){background-color:#141c3f}
html:not(.hc):not(.light) .nav-drawer{background:#18214a}
html:not(.hc):not(.light) .glass{background-color:rgba(255,255,255,.09)}
html:not(.hc):not(.light) .a11y{background:rgba(28,36,76,.92)}html:not(.hc):not(.light) .nav-burger{background:rgba(30,40,86,.92)!important;border-color:rgba(255,255,255,.28)!important}
