:root{--text-compact-brand:26px;--text-compact-greeting:20px;--text-compact-card:26px;--text-splash-brand:44px;--text-splash-tagline:24px}
.launch-splash{position:fixed;inset:0;z-index:100;background:linear-gradient(145deg,var(--header-end),var(--bg) 48%,var(--header-start));display:flex;align-items:center;justify-content:center;overflow:hidden;transition:opacity .18s ease}
.launch-splash.leaving{opacity:0;pointer-events:none}
.launch-brand{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;text-align:center;padding:30px 20px 55px}
.launch-logo{display:grid;place-items:center;width:108px;height:98px;margin-bottom:22px;border-radius:22px}
.launch-logo img{width:100px;height:86px;object-fit:contain}
:root[data-theme="dark"] .launch-logo{background:#FFF8E9}
.launch-wordmark{font-family:Manrope,system-ui,sans-serif;font-size:var(--text-splash-brand);font-weight:800;letter-spacing:-.075em;line-height:1.1;color:var(--ink)}
.launch-wordmark>span{color:var(--action)}
.launch-with{font-size:var(--text-nav);letter-spacing:.22em;color:var(--muted);margin-top:12px;font-weight:700}
.launch-tagline{font-size:var(--text-splash-tagline);line-height:1.4;letter-spacing:-.01em;font-weight:600;color:var(--ink);margin-top:36px}
.launch-spinner{width:25px;height:25px;border:2px solid color-mix(in srgb,var(--action) 20%,transparent);border-top-color:var(--action);border-radius:50%;margin-top:32px;animation:launch-turn 1.1s linear infinite}
.launch-caption{font-size:var(--text-caption);color:var(--muted);margin-top:15px}
.launch-peak{position:absolute;bottom:-1px;left:-5%;width:110%;height:17%;background:var(--mountain);opacity:.15;-webkit-mask:url("assets/foothills-front.svg") center bottom/100% 100% no-repeat;mask:url("assets/foothills-front.svg") center bottom/100% 100% no-repeat}
.launch-peak.peak-back{height:21%;opacity:.07;-webkit-mask-image:url("assets/foothills-back.svg");mask-image:url("assets/foothills-back.svg")}
.launch-review-continue{position:absolute;z-index:3;bottom:calc(32px + env(safe-area-inset-bottom));min-height:48px;padding:12px 22px;border:1px solid var(--line);border-radius:25px;background:var(--surface);color:var(--ink);font-size:var(--text-label);font-weight:600}
@keyframes launch-turn{to{transform:rotate(360deg)}}
.header{min-height:88px;padding:12px 22px 16px;padding-top:calc(12px + env(safe-area-inset-top))}
.brand strong{font-size:var(--text-compact-brand)}
.brand small{margin-top:5px;font-size:var(--text-nav);letter-spacing:.16em}
.aicsa-logo{width:60px;height:53px;border-radius:11px}
.aicsa-logo img{width:58px;height:50px}
.mountain{height:32px;width:100%;right:0}.mountain-back{height:40px;width:110%;right:-16px}
.background-motifs{inset:90px 0 80px}
:root[data-screen="home"] body{padding:0}
:root[data-screen="home"] .app-shell{height:100dvh;min-height:560px;padding-bottom:0;display:flex;flex-direction:column;border-radius:0;border-top:0;border-bottom:0}
:root[data-screen="home"] .header{flex-shrink:0;border-radius:0}
:root[data-screen="home"] main{min-height:0;flex:1;padding:28px 22px 24px;display:flex;flex-direction:column;justify-content:flex-start;gap:22px}
:root[data-screen="home"] main>*{flex-shrink:0}
:root[data-screen="home"] .greeting-row{margin:0;gap:12px}
:root[data-screen="home"] .greeting{font-size:var(--text-compact-greeting);line-height:1.4;letter-spacing:-.01em;color:var(--ink)}
:root[data-screen="home"] .practice-card{margin:0;padding:22px;border-radius:22px}
:root[data-screen="home"] .practice-copy{max-width:65%;min-height:132px;display:flex;flex-direction:column;justify-content:center}
:root[data-screen="home"] .practice-copy h2{font-size:var(--text-compact-card);line-height:1.2;margin:9px 0 10px}
:root[data-screen="home"] .practice-copy p{font-size:var(--text-meta);line-height:1.6;max-width:190px}
:root[data-screen="home"] .scenery{width:150px;height:132px;right:-27px;top:26px}
:root[data-screen="home"] .practice-card>.button.primary{margin-top:18px}
:root[data-screen="home"] .exam-link{margin:0;min-height:76px;padding:14px}
:root[data-screen="home"] .bottom-tabs{position:relative;left:auto;bottom:auto;transform:none;max-width:none;flex-shrink:0;padding:8px 9px calc(10px + env(safe-area-inset-bottom))}
:root[data-screen="home"] .bottom-tab{min-height:54px;padding:5px 2px;font-size:var(--text-nav)}
@media(max-height:700px){
  :root[data-screen="home"] .header{min-height:72px;padding:8px 18px 10px;padding-top:calc(8px + env(safe-area-inset-top))}
  :root[data-screen="home"] .aicsa-logo{height:48px}
  :root[data-screen="home"] main{padding:12px 18px;gap:12px}
  :root[data-screen="home"] .practice-card{padding:18px}
  :root[data-screen="home"] .practice-copy{min-height:90px;max-width:80%}
  :root[data-screen="home"] .practice-copy h2{margin:7px 0}
  :root[data-screen="home"] .scenery{width:92px;height:94px;top:16px;right:-26px}
  :root[data-screen="home"] .practice-card>.button.primary{margin-top:14px}
  :root[data-screen="home"] .exam-link{min-height:68px;padding:10px 12px}
  :root[data-screen="home"] .bottom-tab{min-height:48px}
  .launch-logo{width:90px;height:80px;margin-bottom:16px}.launch-logo img{width:82px;height:72px}
  .launch-tagline{margin-top:24px}.launch-spinner{margin-top:24px}
}
@media(max-width:355px){
  :root[data-screen="home"] main{padding-left:16px;padding-right:16px}
  :root[data-screen="home"] .practice-copy{max-width:80%}
  :root[data-screen="home"] .class-chip{padding:6px 9px}
  :root[data-screen="home"] .exam-link{gap:9px}
}
@media(prefers-reduced-motion:reduce){.launch-spinner{animation:none}.launch-splash{transition:none}}
.ad-preview{width:calc(100% - 32px);max-width:392px;max-height:calc(100dvh - 48px);overflow:auto;border:1px solid var(--line);border-radius:26px;padding:28px 24px;background:var(--surface);color:var(--ink)}
.ad-preview::backdrop{background:rgb(0 0 0 / .55)}
.ad-preview-content{display:flex;flex-direction:column;align-items:center;text-align:center;gap:20px}
.ad-preview h2{margin:0;font-size:var(--text-section);line-height:1.3}
.ad-preview p{margin:0;color:var(--muted);line-height:1.6}
.ad-spinner{width:32px;height:32px;border:3px solid var(--line);border-top-color:var(--action);border-radius:50%;animation:launch-turn .9s linear infinite}
.ad-preview [hidden]{display:none}
@media(prefers-reduced-motion:reduce){.ad-spinner{animation:none}}

:root[data-skip-splash="true"] .launch-splash{display:none}

.practice-picker{width:calc(100% - 32px);max-height:calc(100dvh - 32px);overflow:auto}
.practice-counts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:22px 0 16px}
.practice-counts button{min-height:84px;border:1px solid var(--line);border-radius:16px;background:var(--bg);color:var(--ink);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}
.practice-counts strong{font-size:var(--text-feature)}
.practice-counts span{font-size:var(--text-caption)}
.practice-counts button[aria-pressed="true"]{background:var(--soft);border:2px solid var(--accent);color:var(--accent)}
.practice-picker .practice-ad-note{font-size:var(--text-meta)}

.course-entry{display:flex;align-items:center;gap:14px;text-decoration:none;color:var(--ink);margin:0 0 24px}
.course-entry>div{flex:1}.course-entry p{font-size:var(--text-meta);color:var(--muted);margin-top:6px}
.course-entry h2,.course-link h2{font-size:var(--text-body-lg)}
.course-list{display:grid;gap:14px}.course-link{display:flex;gap:12px;align-items:flex-start;text-decoration:none;color:var(--ink);margin:0}
.course-link>div{flex:1;min-width:0}.course-link p{font-size:var(--text-body);color:var(--muted);margin-top:8px}.course-link small{font-size:var(--text-caption);color:var(--accent);display:block;margin-top:10px}
.course-number{display:grid;place-items:center;width:30px;height:30px;flex-shrink:0;border-radius:50%;background:var(--soft);color:var(--accent);font-size:var(--text-label);font-weight:600}
.lesson-example{background:var(--soft)}.lesson-example h2{margin-top:12px}.lesson-example summary,.lesson-sources summary{min-height:48px;align-content:center;font-size:var(--text-label);font-weight:600;color:var(--accent);cursor:pointer}.lesson-example details p{font-size:var(--text-body);margin-top:14px}
.lesson-practice{margin:24px 0}.lesson-sources{margin:20px 0}
