/* AtomicVerse 3 — page-isolated source animation layers */
.av-new.av-custom .ambient,.av-new.av-custom.focusing .ambient{display:block;overflow:hidden;background:#030406;isolation:isolate;pointer-events:none}
.av-custom .design-layer{position:absolute;inset:0;overflow:hidden;opacity:.69;pointer-events:none}
.av-custom .design-layer>div{width:100%;height:100%}
.av-custom .design-fallback{position:absolute;inset:0;overflow:hidden;display:grid;place-items:center;color:#8294b4;z-index:-1;pointer-events:none}
.av-custom .ambient:after{content:'';position:absolute;inset:0;background:linear-gradient(180deg,rgba(2,5,11,.42),rgba(2,5,11,.08) 40%,rgba(2,5,11,.46));pointer-events:none}
.av-custom.focusing,.av-custom.focusing.av-midnight,.av-custom.focusing.av-observatory{background:#030406}
.av-custom[data-page=mathematics] .design-fallback{background:#05070b url('effects/math-fallback.svg') repeat;background-size:580px 420px;opacity:.6;animation:chalk-drift 44s linear infinite}
@keyframes chalk-drift{to{background-position:-580px -420px}}
.av-custom[data-page=physics] .design-fallback:before{content:'PHYSICS';font-size:clamp(78px,19vw,260px);font-weight:900;letter-spacing:-.08em;color:transparent;-webkit-text-stroke:1px #99afd4;opacity:.35;text-shadow:0 0 45px #97a8ee35}
.av-custom[data-page=physics] .design-fallback{background:repeating-linear-gradient(90deg,transparent 0 79px,#97b9ee0b 80px),repeating-linear-gradient(0deg,transparent 0 79px,#97b9ee0b 80px)}
.av-custom[data-page=biology] .design-fallback{background:#000 url('effects/helix-fallback.svg') center/cover no-repeat;opacity:.68}
.av-custom[data-page=examverse] .design-fallback:before{content:'PRACTICE HARD';font:900 clamp(60px,14vw,200px)/.9 Inter,system-ui,sans-serif;letter-spacing:-.08em;text-align:center;color:#ff973c;opacity:.28;filter:drop-shadow(0 0 25px #ff7c2a66)}
.av-custom[data-page=examverse] .design-layer{opacity:.55}
.av-custom[data-page=neurofocus] .design-fallback:before{content:'BE\A FOCUSED';white-space:pre;text-align:center;font:900 clamp(70px,15vw,220px)/.85 Inter,system-ui,sans-serif;letter-spacing:-.085em;color:#9db8ff;text-shadow:0 8px #11234f,0 15px #0b1530;transform:rotate(-12deg);opacity:.32}
.av-custom[data-page=neurofocus] .design-layer{opacity:.58}
.av-custom[data-page=ai-coach] .design-fallback:before{content:'AI COACH';font:800 clamp(70px,17vw,230px)/1 Inter,system-ui,sans-serif;letter-spacing:-.07em;background:linear-gradient(110deg,#fa6d0f,#57f2ac,#fa6d0f);background-size:300%;background-clip:text;color:transparent;opacity:.25;animation:aurora-fallback 8s ease-in-out infinite alternate}
@keyframes aurora-fallback{to{background-position:100% 0}}
.av-custom[data-page=ai-coach] .design-layer{display:grid;place-items:center;opacity:.28}
.av-custom[data-page=membership] .design-layer{inset:14px;opacity:.8;overflow:visible}
.av-custom[data-page=membership] .design-fallback{inset:15px;border-radius:30px;border:1px solid #cc914965;box-shadow:inset 0 0 45px #cc91491a,0 0 30px #cc91491a;background:radial-gradient(ellipse at 80% 0%,#49301544,transparent 45%)}
.av-custom[data-page=membership] .ambient:after{background:none}
.av-custom .center{min-height:62vh;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:5vh 0;text-shadow:0 3px 36px #000,0 2px 8px #000}
.av-custom .center h1{font-size:clamp(38px,7.2vw,94px);letter-spacing:-.065em;max-width:100%;margin:0 0 24px}
.av-custom .center .coming{font-size:clamp(13px,2vw,21px);font-weight:700;letter-spacing:.26em;background:#080b14d9;border:1px solid #d4e2ff38;border-radius:99px;padding:11px 20px;color:#edf4ff}
.av-custom[data-page=biology] .coming{color:#70ffc4;border-color:#70ffc455}
.av-custom .panel{background:linear-gradient(145deg,#111a2beb,#080e1aeb);border-color:#a1bce829;backdrop-filter:blur(10px)}
.av-custom .study-hero{min-height:280px}.av-custom .study-hero h1{text-shadow:0 3px 30px #0009}
.av-custom .focus-visual:before{display:none}.av-custom .feature-mark{width:min(100%,230px);aspect-ratio:1;display:grid;place-items:center;border:1px solid #f7c28b55;border-radius:32%;background:linear-gradient(145deg,#151d2bdd,#090b13bb);box-shadow:0 0 65px #ff975a14,inset 0 0 22px #ffffff09;transform:rotate(-7deg)}
.av-custom .feature-mark svg{width:64%;height:64%;transform:rotate(7deg);filter:drop-shadow(0 0 12px #e3af6a44)}
.av-custom[data-page=neurofocus] .feature-mark{border-color:#79a8ff66;box-shadow:0 0 55px #4f85fd22}
.av-custom .focus-workspace{background:#080d19ee}.av-custom.focusing .study-hero{display:none}
/* Petrol Glob is the submitted 3D animation. Fallback is a local breathing orb. */
.av-custom .coach-orb{position:relative;isolation:isolate;overflow:hidden;width:min(100%,270px);margin:4px auto 20px;border-radius:50%;border:1px solid #8ca9bf38;background:#000;box-shadow:0 0 50px #00a5ff16;display:grid;place-items:center}
.voice-fallback{position:absolute;inset:17%;border-radius:45% 55% 60% 40%;background:radial-gradient(circle at 52% 49%,#130919 5%,#251e36 44%,#be4a69 61%,#ffbc52 72%,#35c6ff 84%,#131c48 100%);box-shadow:0 0 20px #ff884b6b,inset 0 0 15px #ffffff8c;animation:orb-breathe 6s ease-in-out infinite;filter:saturate(1.25)}
#av-voice-orb{position:absolute;inset:0;z-index:1;width:100%;height:100%;transition:transform .3s ease}
@keyframes orb-breathe{0%,100%{transform:scale(.96) rotate(0deg);border-radius:45% 55% 60% 40%}50%{transform:scale(1.06) rotate(35deg);border-radius:56% 44% 42% 58%}}
body[data-voice-state=speaking] .voice-fallback{animation-duration:.85s}body[data-voice-state=listening] .voice-fallback{animation-duration:1.5s}body[data-voice-state=speaking] #av-voice-orb{transform:scale(1.12)}body[data-voice-state=listening] #av-voice-orb{transform:scale(1.05)}
.voice-state{text-align:center;color:#b5c5dc;font-size:12px;letter-spacing:.15em;text-transform:uppercase;min-height:18px;margin-bottom:20px}
/* Membership: one consistent comparison, not ambiguous pricing tiles. */
.av-custom[data-page=membership] .kicker{color:#e7b77c}.plan-intro{text-align:center;margin:10px auto 35px}.plan-intro p{margin:12px auto}.plan-intro h1{font-size:clamp(38px,6vw,74px)}
.plan-table-wrap{border:1px solid #b18a5d45;border-radius:25px;overflow-x:auto;background:#0c1019ee;box-shadow:0 24px 80px #0007}.plan-table{width:100%;border-collapse:collapse;min-width:660px;table-layout:fixed}.plan-table th,.plan-table td{padding:16px 15px;border-bottom:1px solid #9daec31c;text-align:center;vertical-align:middle;font-size:14px}.plan-table th:first-child,.plan-table td:first-child{text-align:left;width:31%;padding-left:24px}.plan-table thead th{padding-top:28px;padding-bottom:25px;vertical-align:top}.plan-table thead th:nth-child(3),.plan-table td:nth-child(3){background:#cc91490d}.plan-table thead th:nth-child(4),.plan-table td:nth-child(4){background:#70d6d90a}.plan-table .plan-name{display:block;letter-spacing:.1em;text-transform:uppercase;font-size:12px;color:#b6c3d8}.plan-table .plan-price{font:700 clamp(28px,4vw,48px)/1.15 'Space Grotesk',system-ui,sans-serif;display:block;margin:12px 0}.plan-table small{display:block;color:#aebed3;font-size:12px;font-weight:400}.plan-table .yes{color:#71e2b3;font-weight:700}.plan-table .no{color:#738198}.plan-table .limited{color:#e5c49a}.plan-table .btn,.plan-table button{font-size:12px;width:100%;padding:8px}.plan-note{font-size:13px;margin:20px auto;text-align:center}
/* Student profile: compact reference-style sidebar, card mosaic, profile column */
.av-custom[data-page=dashboard] .ambient{background:radial-gradient(ellipse at 80% 0%,#17233b,#070a12 62%)}
.student-layout{display:grid;grid-template-columns:195px minmax(0,1fr) 258px;gap:15px;align-items:start}.student-sidebar,.student-right{display:grid;gap:14px}.student-sidebar{position:sticky;top:16px;padding:20px 13px!important;background:#111b30!important}.student-sidebar .student-mini{display:grid;place-items:center;gap:5px;padding:16px 8px;border-bottom:1px solid #aebede20;text-align:center}.student-mini img{width:62px;height:62px;border-radius:18px}.student-nav{display:grid;gap:5px;margin-top:12px}.student-nav a{font-size:13px;text-decoration:none;color:#aebed6;display:flex;gap:10px;padding:10px;border-radius:9px;align-items:center}.student-nav a:hover,.student-nav a[aria-current]{background:#273b57;color:#fff}.student-nav small{padding:12px 10px 2px;color:#8594ad;font-size:10px;letter-spacing:.12em}.student-main{min-width:0;display:grid;gap:14px}.student-main .student-heading{padding:0 5px}.student-main h1{font-size:clamp(30px,4vw,49px);margin:8px 0}.student-main .panel,.student-right .panel{border-radius:19px;padding:18px}.student-layout h2{font-size:18px;margin-bottom:10px}.student-layout p{font-size:13px}.student-layout #metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin:0}.student-layout #metrics .panel{padding:15px;border-radius:16px;background:#131f31}.student-layout #metrics .metric{font-size:clamp(25px,3vw,35px);letter-spacing:-.04em;color:#9df7de}.student-layout #metrics p{margin:2px 0}.student-mosaic{display:grid;grid-template-columns:1fr 1fr;gap:14px}.student-profile{text-align:center}.student-profile .profile-avatar{width:100px;height:100px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#344b75,#182d46);margin:8px auto 15px;color:#d6edff;font-size:32px;font-weight:700;overflow:hidden}.profile-avatar img{width:100%;height:100%;object-fit:cover}.student-profile .profile-name{overflow-wrap:anywhere}.student-profile .profile-description{margin:8px auto 15px}.student-profile .btn{width:100%;font-size:12px}.student-right .student-status{padding:13px;border-radius:12px;background:#18263c;color:#d0e1ff;text-align:left}.student-history #history,.student-mosaic #mistakes{max-height:360px;overflow:auto;overflow-wrap:anywhere}.student-mosaic progress{height:7px;margin-bottom:7px}.student-layout #clearData{font-size:12px}.student-right .quick-links{display:grid;gap:8px}.student-right .quick-links a{color:#9bf4ec;font-size:13px;text-decoration:none}.student-layout .session-ring{display:grid;place-items:center;aspect-ratio:1;width:110px;border-radius:50%;background:conic-gradient(#8ef2cc var(--ratio,0%),#27364d 0);margin:12px auto}.session-ring div{width:84%;height:84%;border-radius:50%;background:#0b1525;display:grid;place-items:center;font-weight:700;font-size:23px}
@media(max-width:1050px){.student-layout{grid-template-columns:160px minmax(0,1fr)}.student-right{grid-column:2;grid-template-columns:1fr 1fr}.student-sidebar{grid-row:span 2}}
@media(max-width:680px){.student-layout{display:flex;flex-direction:column}.student-layout>*{width:100%}.student-sidebar{position:static;order:0}.student-sidebar .student-mini{display:none}.student-nav{display:flex;overflow-x:auto;margin:0;white-space:nowrap}.student-nav small{display:none}.student-right{display:grid;grid-template-columns:1fr 1fr}.student-mosaic{grid-template-columns:1fr}.av-custom .study-hero{min-height:0}.av-custom .feature-mark{width:130px}.av-custom .center{min-height:58vh}.plan-table-wrap{border-radius:15px}.plan-table th,.plan-table td{padding:11px 8px}.av-custom[data-page=membership] .design-layer{inset:6px}}
@media(max-width:400px){.student-right{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.av-custom .design-layer,#av-voice-orb{display:none}.av-custom .design-fallback,.voice-fallback{animation:none!important}}
/* Full supplied rendering, not the static fallback. */
.av-custom[data-page=physics].av-effect-live .design-layer,.av-custom[data-page=biology].av-effect-live .design-layer{opacity:1}.av-effect-live .design-fallback{display:none}.av-custom[data-page=physics].av-effect-live .ambient:after,.av-custom[data-page=biology].av-effect-live .ambient:after{display:none}.av-custom[data-page=physics] .design-layer,.av-custom[data-page=biology] .design-layer{opacity:0}.av-custom[data-page=physics].av-effect-live .design-layer,.av-custom[data-page=biology].av-effect-live .design-layer{opacity:1}
.live-controls{display:grid;gap:8px;margin:12px 0 17px}.live-controls button{width:100%;min-height:42px}.live-controls p{font-size:12px;margin:4px 0;color:#a0e9e0}.live-controls button:disabled{opacity:.5;cursor:not-allowed}

/* V5: the canvas must have a real viewport-sized surface. Keep fallback until a frame arrives. */
.av-custom[data-page=physics] .design-layer>div,.av-custom[data-page=biology] .design-layer>div{min-width:0;min-height:0;width:100%;height:100%}
.av-custom[data-page=physics] .design-layer canvas,.av-custom[data-page=biology] .design-layer canvas{display:block;width:100%;height:100%}
.av-animation-status{position:relative;z-index:2;max-width:540px;margin:0 auto 18px;text-align:center;font-size:12px;color:#acbcd2}.av-animation-status button{margin-left:10px}.av-animation-status[hidden]{display:none}
@media(prefers-reduced-motion:reduce){.av-custom[data-page=physics]:not(.av-effect-opt-in) .design-layer,.av-custom[data-page=biology]:not(.av-effect-opt-in) .design-layer{display:none}.av-custom.av-effect-opt-in .design-layer{display:block}.av-custom.av-effect-opt-in .design-layer canvas{display:block}}
