/* Render-blocking semantic themes. Loaded once, before the first body paint. */
html{color-scheme:light;--ui-canvas:#f5f7fa;--ui-panel:#fff;--ui-raised:#edf3fa;--ui-ink:#172d4e;--ui-muted:#526981;--ui-border:#cbd8e6;--ui-accent:#2864a6;--ui-primary:#3268a9;--ui-on-primary:#fff;--ui-gold-panel:#faf4e4;--ui-gold-ink:#765314;--ui-gold-border:#c6ac6a;--ui-focus:#2563a6;--ui-selected:#e2effb;--ui-selection-ink:#205eaa}
html[data-theme="dark"]{color-scheme:dark;--ui-canvas:#101925;--ui-panel:#182435;--ui-raised:#22344b;--ui-ink:#e4edf8;--ui-muted:#adbed3;--ui-border:#526780;--ui-accent:#91bcf3;--ui-primary:#376aa6;--ui-on-primary:#fff;--ui-gold-panel:#3b3320;--ui-gold-ink:#f1d794;--ui-gold-border:#8c783f;--ui-focus:#a5d8ff;--ui-selected:#223c58;--ui-selection-ink:#b2d8ff}
html[data-theme="cyberpunk"]{color-scheme:dark;--ui-canvas:#0b1018;--ui-panel:#131e2b;--ui-raised:#1c3040;--ui-ink:#edf5f5;--ui-muted:#b3c7cf;--ui-border:#4a6979;--ui-accent:#6cecf3;--ui-primary:#f6ef35;--ui-on-primary:#10141c;--ui-gold-panel:#34351c;--ui-gold-ink:#f6ef35;--ui-gold-border:#8f9150;--ui-focus:#6cecf3;--ui-selected:#273b43;--ui-selection-ink:#f6ef35}
html:is([data-theme="dark"],[data-theme="cyberpunk"]){--ink:var(--ui-ink);--navy:var(--ui-ink);--muted:var(--ui-muted);--accent:var(--ui-accent);--blue:var(--ui-accent);--line:var(--ui-border);--paper:var(--ui-panel);--tool:var(--ui-canvas);--pale:var(--ui-raised);--reading-ink:var(--ui-ink);--reading-muted:var(--ui-muted)}
html{background:var(--ui-canvas);scrollbar-color:var(--ui-border) var(--ui-canvas)}
html body{background-color:var(--ui-canvas);color:var(--ui-ink)}
html :is(input,select,textarea){color-scheme:inherit;accent-color:var(--ui-primary);caret-color:var(--ui-accent)}
html ::selection{background:var(--ui-accent);color:var(--ui-canvas)}
html :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid var(--ui-focus);outline-offset:3px}
/* A theme switch is atomic: no old background transitions through a light frame. */
html[data-theme-switching] *,html[data-theme-switching] *::before,html[data-theme-switching] *::after{transition:none!important}
/* Shared controls never fall back to a browser's white surface. */
html body :is(#sidebar,.stats-sidebar,.topic-search input,.stats-filters input,.stats-filters select,.filters input,.filters select,.alltopics,.topicselection button){background:var(--ui-panel);color:var(--ui-ink);border-color:var(--ui-border)}
html body :is(.topicbtn,.stats-sidebar nav .topicbtn){background:transparent;color:var(--ui-ink)}
html body :is(.topicbtn:hover,.topicbtn:focus-visible,.topicbtn.active,.stats-sidebar .topicbtn[aria-current=true]){background:var(--ui-selected);color:var(--ui-selection-ink)}
html body :is(.topicselection button.active,.courses button.active){background:var(--ui-primary);color:var(--ui-on-primary)}
html body :is(.topic-search input,.filters input)::placeholder{color:var(--ui-muted);opacity:1}
html body :is(.topic-search-count,.topic-list-empty){color:var(--ui-muted)}
html body select option{background:var(--ui-panel);color:var(--ui-ink)}
html body :is(.filters,.topic-search,.topicselection,.topicbtn,#sidebar,.stats-sidebar){transition:none}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body{background:var(--ui-canvas);color:var(--ui-ink)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) :is(h1,h2,h3,h4,label,legend,summary){color:var(--ui-ink)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) :is(a,button){color:var(--ui-accent)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) :is(input,select,textarea,dialog){background-color:var(--ui-panel);color:var(--ui-ink);border-color:var(--ui-border)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) button{background-color:var(--ui-panel);color:var(--ui-ink);border-color:var(--ui-border)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) input::placeholder,html:is([data-theme="dark"],[data-theme="cyberpunk"]) textarea::placeholder{color:var(--ui-muted)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) :is(.site-header,.platform-footer,.platform-mega,.platform-student-options,.platform-program-options,.layout>aside,.question,.qhead,.qbody,.question-main,.panel,.topic-card,.course-card,.feature-card,.explore-course,.explore-benefits,.empty,.auth-form-panel,.auth-shell,.auth-main,.signup-form-panel,.pricing-body,.pricing-card,.pricing-caption,.benefit-scroll,dialog){background:var(--ui-panel);color:var(--ui-ink);border-color:var(--ui-border)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) :is(.bank-banner,.course-hero,.questionbank-hero,.site-hero,.filters,.platform-board-list,.question-tools,.tip,.printoptions,.pricing-periods,.pricing-details thead,.checkout-benefits,.signup-story,.auth-story,.edu-sidebar,.edu-card,.edu-panel,.assessment-card,.stats-unit,.stats-topic,.stats-filters){background:var(--ui-raised);color:var(--ui-ink);border-color:var(--ui-border)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) :is(.stem,.prompt,.choices,.choice,.solutionbody,.assessment-content,.edu-mark-scheme,.stats-native-question,.stats-native-choices,.sol-section,.solutionbody p,.solutionbody li,.solutionbody h3,.solutionbody h4,.lab-question,.concept-solution){color:var(--ui-ink)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) :is(.qhead,.part,.partbar,.solution,.sources,.chapter,.modebar,.rail-links,.question-flags,.cartrow,.question-tools,hr,td,th){border-color:var(--ui-border)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) :is(.datatable,table){color:var(--ui-ink)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) :is(th,.datatable th){background:var(--ui-raised);color:var(--ui-ink)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) :is(td,.datatable td){background:var(--ui-panel);color:var(--ui-ink)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) :is(.qref,.partname,.badge,.rail-tip,.sidefoot,.sideintro p,.selectionhint,.resultbar,.intro p,.smallnote,.mainfoot,.hint,.muted,.small,.pricing-intro p,.pricing-bill,.pricing-note,.pricing-selection p,.pricing-extras,.pricing-sales,.pricing-body li,.pricing-details details p,.site-breadcrumb,.platform-footer p,.platform-footer a,.platform-menu-courses small,.platform-board-list p,.platform-menu-courses>p){color:var(--ui-muted)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) :is(.site-brand.kapok-brand,.site-brand.kapok-brand strong,.kapok-brand .site-logo,.platform-account-icon,.site-links summary,.platform-student-options a,.platform-menu-courses #menuCourses>a,.platform-board-list>a,.bank-name h2,.qhead h2,.topicbtn,.chapter summary){color:var(--ui-ink)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) :is(.topicbtn.active,.topicchip,.topicbtn .count,.rail-action,.rail-action.secondary,.courses,.badge,.pricing-periods button[aria-pressed=true]){background:var(--ui-raised);color:var(--ui-accent);border-color:var(--ui-border)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) :is(.topicbtn:hover,.platform-menu-courses #menuCourses>a:hover,.platform-student-options a:hover,.platform-account-icon:hover){background:var(--ui-raised);color:var(--ui-accent)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) :is(.primary,.platform-button,.topic-open,.site-primary,.site-plan-link,.courses .active,.topicselection .active){background:var(--ui-primary);color:var(--ui-on-primary);border-color:var(--ui-primary)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) .pricing-total{color:var(--ui-ink)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) :is(.pricing-caption,.single .pricing-caption){background:var(--ui-raised);color:var(--ui-ink)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) :is(.all .pricing-caption,.pricing-details td:last-child,.pricing-details th:last-child,.checkout-gold){background:var(--ui-gold-panel);color:var(--ui-gold-ink)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) .pricing-saving{color:#8bd4ac}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) :is(.badge.calc,.rail-action.membership){background:var(--ui-gold-panel);color:var(--ui-gold-ink);border-color:var(--ui-gold-border)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) :is(.graph img,.stem img,.prompt img,.solutionbody img,.stats-native-question img,.assessment-content img,#paymentQr){background:#fff;border-radius:5px;color:#132b4e}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) :is(.difficulty-easy,[data-difficulty="easy"]){color:#89d7ac}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) :is(.difficulty-medium,[data-difficulty="medium"]){color:#f0ca73}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) :is(.difficulty-hard,[data-difficulty="hard"]){color:#f69b9b}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) dialog::backdrop{background:#020814b8}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body.study-page .layout>#sidebar{background:var(--ui-panel);border-color:var(--ui-border)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) #bankStudyTopic{color:var(--ui-ink)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.filters label,.jumpfilter,.filter-summary,.resultbar,.sideintro p,.sidefoot,.selectionhint,.topicbtn .code,.question-flags button,.modebar button,.partbar .addpart){color:var(--ui-muted)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.filters select,.filters input,.modebar button.active){color:var(--ui-ink)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.modebar button,.topicbtn,.question-flags button){background:transparent}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body .topicbtn.active{background:var(--ui-raised);color:var(--ui-accent)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.practice-tools>summary,.practice-tools-panel){background:var(--ui-panel);border-color:var(--ui-border);color:var(--ui-ink)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.rail-action[data-subscribe],.rail-action[data-membership]){background:var(--ui-gold-panel);color:var(--ui-gold-ink);border-color:var(--ui-gold-border)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(#filterSummary,#resultCount,#reset,#addVisible,#addVisibleWhole,.practice-tools-panel button,.syllabus-topics,.syllabus-topics span,.solution>summary,.solutionbody .tip,.partbar strong){color:var(--ui-muted)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body .solutionbody .sol-section{background:var(--ui-panel);border-color:var(--ui-border)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body .solutionbody .sol-answer{background:var(--ui-raised)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body .qmeta .badge.calc{background:var(--ui-gold-panel);color:var(--ui-gold-ink);border-color:var(--ui-gold-border)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) .site-skip{background:var(--ui-panel)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body.study-page .filters #reset,html:is([data-theme="dark"],[data-theme="cyberpunk"]) #sidebar label,html:is([data-theme="dark"],[data-theme="cyberpunk"]) .syllabus-tags>span{color:var(--ui-muted)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) .practice-tools-panel #startQuiz{color:var(--ui-on-primary)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.course-tile,.bloom-lab,.lab-main,.auth-form-column,.auth-panel,.account-type-option,.edu-welcome,.edu-choice-card,.edu-topic-panel,.edu-selection,.edu-stat,.edu-table-wrap){background:var(--ui-panel);color:var(--ui-ink);border-color:var(--ui-border)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.bloom-lab-section,.bloom-membership,.lab-aside,.signup-story,.educator-hero,.edu-builder-meta,.edu-builder-toolbar,.edu-process,.stats-sidebar){background:var(--ui-raised);color:var(--ui-ink);border-color:var(--ui-border)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.course-tile h3,.course-tile a,.course-tile a span,.bloom-section-title h2,.lab-aside h3,.bloom-membership h2,.auth-heading h1,.auth-intro h1,.account-type-name,.signup-story h2,.signup-features strong){color:var(--ui-ink)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.bloom-section-title p,.lab-heading,.lab-heading span,.lab-instruction,.lab-aside p,.bloom-membership p,.auth-heading p,.auth-intro p,.auth-panel label,.auth-switch,.signup-story-lead,.signup-features p,.edu-muted,.edu-welcome p,.edu-process span){color:var(--ui-muted)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.tile-icon,.lab-readout,.signup-course-links a){background:var(--ui-raised);color:var(--ui-accent);border-color:var(--ui-border)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body .ap-subject-group:not(.physics){background:var(--ui-raised)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body .course-pick{color:var(--ui-ink)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body .bloom-button:not(.outline){background:var(--ui-primary);color:var(--ui-on-primary)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body .bloom-button.outline{color:var(--ui-ink)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.edu-primary,.auth-panel .primary){background:var(--ui-primary);color:var(--ui-on-primary);border-color:var(--ui-primary)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) #conceptChart{background:#fff;border-radius:10px;color:#132b4e}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) .platform-header .site-menu-toggle{background:var(--ui-panel);color:var(--ui-ink);border-color:var(--ui-border)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.tagrow>span,.account-type-caption,.signup-features span,#checkoutLead){color:var(--ui-muted)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(#showPassword,.compare-pane,.compare-answer){background:var(--ui-panel);color:var(--ui-ink);border-color:var(--ui-border)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.payment-total,#paymentTotal,#orderAmount){color:var(--ui-ink)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body #checkoutPeriods button{background:var(--ui-panel);color:var(--ui-ink);border-color:var(--ui-border)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body #checkoutPeriods button[aria-pressed="true"]{background:var(--ui-gold-panel);border-color:#bd9b48;color:var(--ui-gold-ink)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body #checkoutPeriods button :is(strong,small,span){color:inherit}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body .pricing-tier{background:#e4c475;color:#31270e}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body .pricing-periods small{background:var(--ui-primary);color:var(--ui-on-primary)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body .pricing-periods button{background:transparent}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body .pricing-periods button[aria-pressed="true"]{background:var(--ui-primary);color:var(--ui-on-primary);box-shadow:inset 0 0 0 1px var(--ui-accent)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.directory-hero,.directory-next,.chapter-jump,.course-selector,.course-resources,.syllabus-section,.syllabus-topics,.student-progress,.student-feedback,.student-response,.stats-lesson-callout,.stats-empty){background:var(--ui-raised);color:var(--ui-ink)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.directory-chapter:nth-child(even),.resource-card,.compare-header,.compare-answer .solutionbody,.membership-art-card,.edu-summary div,.edu-list,.edu-empty,.edu-class-card,.student-question,.student-submit,.edu-review-student,.edu-topics-table,.stats-question,.stats-lesson,.stats-paper-card){background:var(--ui-panel);color:var(--ui-ink);border-color:var(--ui-border)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.topic-card p,.topic-card-meta,.topic-card-meta span,.directory-chapter-head span,.resource-card p,.course-lead,.directory-lead,.chapter-heading>span,.topic-card>div>p,.edu-list p,.edu-empty p,.stats-hero p,.stats-meta,.stats-sidebar p){color:var(--ui-muted)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.course-selector a[aria-current=page],.chapter-jump a[aria-current=location],.chapter-jump a:hover,.stats-sidebar nav button[aria-current=true]){background:var(--ui-panel);color:var(--ui-accent)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.site-button,.navy-button,.course-monogram,.directory-monograms>span){background:var(--ui-primary);color:var(--ui-on-primary);border-color:var(--ui-primary)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.site-button.secondary,.directory-monograms>span:last-child,.resource-icon,.stats-actions button,.stats-actions a,.stats-paper-card a){background:var(--ui-raised);color:var(--ui-accent);border-color:var(--ui-border)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.student-options label:has(input:checked),.edu-topic-panel button[aria-pressed=true]){background:var(--ui-raised);color:var(--ui-ink)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body .access-badge{background:var(--ui-primary);color:var(--ui-on-primary)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body .access-badge.gold{background:#e4c475;color:#31270e}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body .membership-rail{background:var(--ui-gold-panel)!important;color:var(--ui-gold-ink)!important;border-color:var(--ui-gold-border)!important}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body .stats-hero-shell{background:var(--ui-raised);border-color:var(--ui-border)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.educator-heading p,.stats-muted,.stats-unit header span,.stats-tabbar button,.stats-resultbar,.stats-sidebar label){color:var(--ui-muted)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.edu-secondary,#statsAllTopics,#statsMobileTopics,#mobileTopics){background:var(--ui-panel);color:var(--ui-accent);border-color:var(--ui-border)}
@media print{#siteSettings{display:none!important}html:is([data-theme="dark"],[data-theme="cyberpunk"]){color-scheme:light;--ui-ink:#132b4e;--ui-muted:#526981;--ui-panel:#fff;--ui-raised:#fff;--ui-canvas:#fff;--ui-border:#aaa;--reading-ink:#132b4e}html:is([data-theme="dark"],[data-theme="cyberpunk"]) body{background:#fff;color:#132b4e}}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) .directory-chapter-heading>span,html:is([data-theme="dark"],[data-theme="cyberpunk"]) .directory-chapter-heading>div>span{color:var(--ui-muted)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.solutionbody,.whole-question-note,.part-focus,.tagrow button){background:var(--ui-raised);color:var(--ui-ink);border-color:var(--ui-border)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body :is(.difficulty-easy,.difficulty-medium,.difficulty-hard){background:var(--ui-panel);border-color:var(--ui-border)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body .topicbtn .count{color:var(--ui-ink);background:var(--ui-raised)}
/* Cyberpunk: an independent reading palette, not a filter over the light theme. */
html[data-theme="cyberpunk"]{--bloom-navy:var(--ui-ink);--bloom-blue:var(--ui-primary);--bloom-muted:var(--ui-muted)}
html[data-theme="cyberpunk"] body :is(.bloom-night,.bloom-learning,.bloom-features,.site-header,.platform-footer){background:var(--ui-canvas);color:var(--ui-ink)}
html[data-theme="cyberpunk"] body .site-notice{background:var(--ui-primary);color:var(--ui-on-primary)}
html[data-theme="cyberpunk"] body :is(.bloom-highlight,.bank-name h1,.directory-hero h1,.course-hero h1){color:var(--ui-primary)}
html[data-theme="cyberpunk"] body .bloom-highlight::after{background:var(--ui-accent);height:2px;border-radius:0;transform:none}
html[data-theme="cyberpunk"] body :is(.bloom-proof,.bloom-proof article,.ap-subject-group,.ap-subject-group.physics){background:var(--ui-panel);border-color:var(--ui-border)}
html[data-theme="cyberpunk"] body :is(.ap-subject-group summary,.subject-icons){color:var(--ui-accent)}
html[data-theme="cyberpunk"] body :is(.bloom-button:not(.outline),.site-button:not(.secondary),.primary,.platform-button,.topic-open,.edu-primary,.auth-panel .primary,.access-badge,#startQuiz){background:var(--ui-primary);border-color:var(--ui-primary);color:var(--ui-on-primary)}
html[data-theme="cyberpunk"] body :is(.bloom-button.outline,.site-button.secondary){background:transparent;border-color:var(--ui-accent);color:var(--ui-accent)}
html[data-theme="cyberpunk"] body :is(.topicbtn.active,.stats-sidebar .topicbtn[aria-current=true],.topicchip){background:var(--ui-selected);color:var(--ui-selection-ink)}
html[data-theme="cyberpunk"] body :is(.question,.topic-card,.course-tile,.pricing-card){border-radius:10px;border-color:var(--ui-border)}
html[data-theme="cyberpunk"] body :is(.bank-banner,.directory-hero,.course-hero){border-bottom:1px solid var(--ui-accent)}
html[data-theme="cyberpunk"] body :is(.modebar button.active,.stats-tabbar button[aria-selected=true]){color:var(--ui-primary);border-bottom-color:var(--ui-primary)}
html[data-theme="cyberpunk"] body :is(.tile-icon,.resource-icon){background:var(--ui-raised);color:var(--ui-accent)}
html[data-theme="cyberpunk"] body :is(.settings-appearance button,.topicselection button){border-radius:6px}
html[data-theme="cyberpunk"] body .pricing-tier{background:var(--ui-primary);color:var(--ui-on-primary)}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
/* Contrast repairs shared by all palettes. */
html body :is(.learning-grid p,.bloom-section-title p,.bloom-membership p,.lab-aside p,.lab-instruction,.stats-sidebar p,.stats-muted,#statsMessage,#selectedTopics>span){color:var(--ui-muted)}
html body :is(.site-breadcrumb,.site-breadcrumb a,.topicchip){color:var(--ui-accent)}
html body .lab-symbol{color:var(--ui-accent)}
html body :is(.lab-readout,.lab-readout strong,#conceptSlope){color:var(--ui-ink)}
html body .topicbtn .count{background:var(--ui-raised);color:var(--ui-muted)}
html body #sidebar .topicbtn.active .count{background:var(--ui-primary);color:var(--ui-on-primary)}
html body #sidebar .topicselection button.active{background:var(--ui-primary);color:var(--ui-on-primary);border-color:var(--ui-primary)}
html body :is(.bloom-button:not(.outline),#singleRequest,.pricing-periods small){background:var(--ui-primary);color:var(--ui-on-primary)}
html body .bloom-button:not(.outline) span{color:inherit}
html body .pricing-tier{background:var(--ui-gold-panel);color:var(--ui-gold-ink)}
html body .lab-aside a{color:var(--ui-accent)}
html:is([data-theme="dark"],[data-theme="cyberpunk"]) body .topactions button:not(.primary){background:var(--ui-panel);color:var(--ui-accent);border-color:var(--ui-border)}
@media print{html[data-theme]{--ui-primary:#132b4e;--ui-on-primary:#fff;--ui-selected:#eee;--ui-selection-ink:#132b4e}html[data-theme="cyberpunk"] body :is(.bloom-night,.bloom-learning,.bloom-features,.site-header,.platform-footer){background:#fff;color:#132b4e}}
/* Cyberpunk UI typography: independently scoped; academic reading faces are untouched. */
@font-face{font-family:Kapok Rajdhani;src:url('/fonts/rajdhani-medium.ttf?v=7d1adb8e257ded4b5daf') format('truetype');font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:Kapok Rajdhani;src:url('/fonts/rajdhani-bold.ttf?v=7d1adb8e257ded4b5daf') format('truetype');font-weight:700;font-style:normal;font-display:swap}
html[data-theme="cyberpunk"]{--cyber-ui:"Kapok Rajdhani","Microsoft YaHei","PingFang SC",sans-serif}
html[data-theme="cyberpunk"] body :is(.site-nav,.site-notice,.site-breadcrumb,.platform-footer nav,#settingsPanel,#sidebar,.stats-sidebar,.modebar,.filters,.resultbar,.topic-card,.directory-chapters,.pricing-periods){font-family:var(--cyber-ui);font-weight:500;letter-spacing:.015em}
html[data-theme="cyberpunk"] body :is(button,select,input,.site-button,.bloom-button,.platform-button,.topic-open,.site-nav a,.site-nav summary,.site-nav button){font-family:var(--cyber-ui);font-weight:700;letter-spacing:.025em}
html[data-theme="cyberpunk"] body :is(.bloom-hero h1,.bloom-section-title h2,.bloom-membership h2,.bloom-proof strong,.learning-grid h3,.ap-subject-group h2,.ap-subject-group h3,.bank-name h1,.bank-name h2,.directory-hero h1,.directory-hero h2,.course-hero h1,.course-hero h2,.topic-card h3,.resource-card h2,.pricing-card h2,.pricing-card h3,.pricing-hero h1,#settingsPanel h2,.sideintro h2){font-family:var(--cyber-ui);font-weight:700;letter-spacing:.015em;line-height:1.12}
html[data-theme="cyberpunk"] body :is(.site-nav>a,.site-nav summary,.bloom-button,.site-button,.platform-button,.modebar button){text-transform:uppercase;letter-spacing:.055em}
html[data-theme="cyberpunk"] body :is(.bloom-button,.site-button,.platform-button){border-radius:3px}
/* Input answers and controls embedded in academic content keep their established reading font. */
html[data-theme="cyberpunk"] body :is(.stem,.prompt,.solutionbody,.stats-native-question,.stats-solution,.student-options) :is(button,input,select){font-family:inherit;font-weight:inherit;letter-spacing:normal;text-transform:none}
html[data-theme="cyberpunk"] body .site-brand strong{font-family:Manrope,Inter,sans-serif;letter-spacing:normal}
html[data-theme="cyberpunk"] body .site-brand{text-transform:none;letter-spacing:normal}
/* Neon technical frames: decorative layers never clip content or dropdowns. */
html[data-theme="cyberpunk"] body .bloom-proof{background:transparent;border:0;border-radius:0;padding:0;gap:20px}
html[data-theme="cyberpunk"] body .bloom-proof article{position:relative;border:0;border-radius:0;background:#0b141d;padding:28px 24px 30px;--frame-color:var(--ui-primary)}
html[data-theme="cyberpunk"] body .bloom-proof article:nth-child(even){--frame-color:var(--ui-accent)}
html[data-theme="cyberpunk"] body .bloom-proof article::before{content:"";position:absolute;inset:0;pointer-events:none;background:var(--frame-color);clip-path:polygon(18px 0,100% 0,100% calc(100% - 18px),calc(100% - 18px) 100%,0 100%,0 18px,18px 0,18.5px 1px,1px 18.5px,1px calc(100% - 1px),calc(100% - 18.5px) calc(100% - 1px),calc(100% - 1px) calc(100% - 18.5px),calc(100% - 1px) 1px,18.5px 1px)}
html[data-theme="cyberpunk"] body .bloom-proof article::after{content:"";position:absolute;left:24px;bottom:0;width:46px;height:3px;background:var(--frame-color);pointer-events:none}
html[data-theme="cyberpunk"] body .bloom-proof article strong{color:var(--frame-color)}
html[data-theme="cyberpunk"] body .bloom-proof article h2{color:var(--ui-ink)}
html[data-theme="cyberpunk"] body .proof-symbol{border-radius:0;background:transparent!important;border:1px solid var(--frame-color);color:var(--frame-color)!important;width:40px;height:40px}
html[data-theme="cyberpunk"] body :is(.bloom-button,.site-button,.platform-button,.topic-open){border-radius:0;position:relative;clip-path:polygon(0 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%);padding-right:30px}
html[data-theme="cyberpunk"] body :is(.bloom-button,.site-button,.platform-button,.topic-open):focus-visible{outline:3px solid var(--ui-accent);outline-offset:-5px}
html[data-theme="cyberpunk"] body :is(.bloom-button,.site-button,.platform-button,.topic-open):hover{box-shadow:inset 0 -3px 0 var(--ui-accent)}
html[data-theme="cyberpunk"] body :is(.course-tile,.topic-card,.pricing-card,.learning-grid article,#settingsPanel){border-radius:0;border-color:var(--ui-border)}
html[data-theme="cyberpunk"] body :is(.course-tile,.learning-grid article){border-top:1px solid var(--ui-accent);background:var(--ui-panel)}
html[data-theme="cyberpunk"] body :is(.course-tile h3,.learning-grid h3,.bloom-section-title h2,.bloom-membership h2){color:var(--ui-primary)}
html[data-theme="cyberpunk"] body :is(.course-row,.settings-subscription,.settings-plans){color:var(--ui-accent)}
html[data-theme="cyberpunk"] body .ap-subject-group{border-radius:0;border-color:var(--ui-accent)}
html[data-theme="cyberpunk"] body .site-header{border-bottom:1px solid #596327}
html[data-theme="cyberpunk"] body .site-nav summary{border-radius:0;border-bottom:1px solid transparent;color:var(--ui-primary)}
html[data-theme="cyberpunk"] body .site-nav summary:hover,html[data-theme="cyberpunk"] body .site-nav details[open]>summary{background:var(--ui-primary);color:var(--ui-on-primary);border-bottom-color:var(--ui-primary)}
html[data-theme="cyberpunk"] body .bloom-membership{border-top:1px solid var(--ui-primary);border-bottom:1px solid var(--ui-primary)}
@media(max-width:600px){html[data-theme="cyberpunk"] body .bloom-proof{gap:14px}html[data-theme="cyberpunk"] body .bloom-proof article{padding:22px 18px 26px}}
@media(forced-colors:active){html[data-theme="cyberpunk"] body .bloom-proof article{border:1px solid CanvasText}html[data-theme="cyberpunk"] body .bloom-proof article::before,html[data-theme="cyberpunk"] body .bloom-proof article::after{display:none}html[data-theme="cyberpunk"] body :is(.bloom-button,.site-button,.platform-button,.topic-open){clip-path:none}}
html[data-theme="cyberpunk"] body.bloom-home .ap-subject-group{border-radius:0!important;border:1px solid var(--ui-accent)!important}
html[data-theme="cyberpunk"] body .site-header .site-nav .site-brand{text-transform:none!important}
html[data-theme="cyberpunk"] body .site-header .site-links summary{color:var(--ui-primary)!important;border-radius:0!important}
html[data-theme="cyberpunk"] body .site-header .site-links details[open]>summary{background:var(--ui-primary)!important;color:var(--ui-on-primary)!important}
html[data-theme="cyberpunk"] body .bloom-button.outline::after{content:"";position:absolute;right:0;bottom:0;width:14px;height:1px;background:var(--ui-accent);transform:rotate(-45deg);transform-origin:right bottom;pointer-events:none}
