/* Original palette remains untouched unless a student selects a theme. */
:root{--theme-panel:var(--card-bg,var(--bg-card,#141e32));--theme-ink:var(--text-primary,#f4f7fc);--theme-muted:var(--text-secondary,#a4b2c8);--theme-line:var(--border-color,#3b4961);--theme-accent:var(--accent,var(--accent-blue,#3b82f6));--theme-radius:18px}
:root[data-academy-theme="light"]{color-scheme:light;--theme-bg:#f3f6fc;--theme-panel:#fff;--theme-panel2:#eaf0fa;--theme-ink:#16243c;--theme-muted:#52627c;--theme-line:#c4d0e2;--theme-accent:#2054c9;--theme-radius:20px;--theme-shadow:0 8px 32px #243b5b0b;--theme-hero:linear-gradient(120deg,#e6efff,#f3f5ff 60%,#e4f6f0)}
:root[data-academy-theme="night"]{color-scheme:dark;--theme-bg:#101225;--theme-panel:#1b1f39;--theme-panel2:#252b48;--theme-ink:#f1f3ff;--theme-muted:#b2bad6;--theme-line:#424a70;--theme-accent:#aaa2ff;--theme-radius:24px;--theme-shadow:0 12px 36px #05071630;--theme-hero:linear-gradient(120deg,#202340,#312449 60%,#152d3e)}
:root[data-academy-theme="warm"]{color-scheme:light;--theme-bg:#f6f2e9;--theme-panel:#fffcf6;--theme-panel2:#eae7dc;--theme-ink:#263b36;--theme-muted:#596b61;--theme-line:#c9cec0;--theme-accent:#216652;--theme-radius:12px;--theme-shadow:0 6px 24px #3743380a;--theme-hero:linear-gradient(120deg,#e6ecdc,#f8f4e9 65%,#f3e6d5)}
:root[data-academy-theme]{--bg-color:var(--theme-bg);--bg-dark:var(--theme-bg);--bg:var(--theme-bg);--bg-card:var(--theme-panel);--card-bg:var(--theme-panel);--bg-secondary:var(--theme-panel2);--panel:var(--theme-panel);--panel2:var(--theme-panel2);--text-primary:var(--theme-ink);--text:var(--theme-ink);--text-secondary:var(--theme-muted);--text-muted:var(--theme-muted);--muted:var(--theme-muted);--border-color:var(--theme-line);--line:var(--theme-line);--accent:var(--theme-accent);--accent-blue:var(--theme-accent);--blue:var(--theme-accent);--shadow:var(--theme-shadow);--gradient-primary:var(--theme-hero)}
html[data-academy-theme] body{background:var(--theme-bg)!important;color:var(--theme-ink)!important}
html[data-academy-theme] :is(.header,.site-header,.footer,.site-footer,.mobile-nav,.mobile-menu,.cookie-banner,.cookie-notice,.admin-top,.admin-sidebar,.track-nav){background:var(--theme-panel)!important;color:var(--theme-ink);border-color:var(--theme-line)!important}
html[data-academy-theme] :is(.course-card,.task-card,.lesson-row,.lesson-card,.stat-card,.feature-card,.advantage-card,.pricing-card,.review-card,.profile-card,.card,.panel,.a-card,.trainer-card,.practice-card,.py3-card,.p4card,.pc-card,.py3-code-task,.pc-code-task,.pv4-task,.notes-panel,.auth-container,.auth-card,.login-box,.register-box,.stat-chip,.mission-strip){background:var(--theme-panel)!important;color:var(--theme-ink);border-color:var(--theme-line)!important;border-radius:var(--theme-radius);box-shadow:var(--theme-shadow)}
html[data-academy-theme] :is(.hero,.course-hero,.py3-hero,.pc-hero,.p4hero,.auth-hero){background:var(--theme-hero)!important;border-color:var(--theme-line)!important;color:var(--theme-ink)}
html[data-academy-theme] :is(.hero-title,.hero h1,.hero h1 span,.section-title,.course-card h3){color:var(--theme-ink);-webkit-text-fill-color:currentColor;background-image:none}
html[data-academy-theme] :is(.hero p,.course-card p,.course-meta,.stat-chip small,.nav-link,.footer-link,.mobile-nav-link,.back-link,.top-back,.badge,.section-kicker,.eyebrow){color:var(--theme-muted)}
html[data-academy-theme] :is(.top-back,.hero-btn.secondary,.mission-strip a,.btn-secondary,.btn-outline,.track-tab){background:var(--theme-panel2);color:var(--theme-ink);border-color:var(--theme-line)}
html[data-academy-theme] :is(.btn-primary,.hero-btn.primary,.track-tab.active){background:#285aca;color:#fff;border-color:transparent}
html[data-academy-theme="warm"] :is(.btn-primary,.hero-btn.primary,.track-tab.active){background:#216652}
html[data-academy-theme="night"] :is(.btn-primary,.hero-btn.primary,.track-tab.active){background:#7160d2}
html[data-academy-theme] :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea:not(.pc-code-editor):not([data-code]):not([id^=py3Code])){background-color:var(--theme-panel);color:var(--theme-ink);border-color:var(--theme-line)}
html[data-academy-theme] :is(.code-preview,pre code,.code-block){color:#e7efff}
html[data-academy-theme] :is(.lesson-content,.task-description) :is(.py3-example,.p4code,.pc-code,pre){background:#101a2a;color:#e7efff}
html[data-academy-theme] .lesson-content pre *{color:inherit}
html[data-academy-theme] :is(a,button,input,select,textarea,summary):focus-visible{outline:3px solid var(--theme-accent);outline-offset:3px}
.theme-section{margin:0 auto 44px;padding-top:22px;max-width:1200px}.theme-section-inner{margin:0 20px;padding:24px;border:1px solid var(--theme-line);border-radius:20px;background:var(--theme-panel);color:var(--theme-ink)}.theme-kicker{text-transform:uppercase;letter-spacing:.14em;font-size:11px;font-weight:800;color:var(--theme-muted)}.theme-heading{font-size:clamp(22px,3vw,30px);line-height:1.25;margin:8px 0}.theme-description{font-size:14px;color:var(--theme-muted);margin:0 0 18px}.theme-choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.theme-choice{padding:10px;text-align:left;font:inherit;color:var(--theme-ink);background:var(--theme-panel);border:2px solid var(--theme-line);border-radius:14px;cursor:pointer;min-width:0;position:relative}.theme-choice[aria-pressed=true]{border-color:var(--theme-accent)}.theme-choice[aria-pressed=true] .theme-label:after{content:' ✓';color:var(--theme-accent)}.theme-preview{height:78px;border-radius:8px;padding:10px;display:grid;grid-template-columns:21% 1fr;gap:7px;margin-bottom:9px;background:var(--preview-bg)}.theme-preview i{display:block;border-radius:4px;background:var(--preview-card)}.theme-preview i:last-child{border-top:6px solid var(--preview-accent)}.theme-choice[data-theme=original]{--preview-bg:#0f172a;--preview-card:#29364a;--preview-accent:#3b82f6}.theme-choice[data-theme=light]{--preview-bg:#eaf0fc;--preview-card:#fff;--preview-accent:#2054c9}.theme-choice[data-theme=night]{--preview-bg:#101225;--preview-card:#343451;--preview-accent:#aaa2ff}.theme-choice[data-theme=warm]{--preview-bg:#ede9df;--preview-card:#fffcf6;--preview-accent:#216652}.theme-label{font-weight:750;display:block;font-size:14px}.theme-caption{font-size:12px;color:var(--theme-muted);display:block;margin-top:2px}.theme-open{position:fixed;right:16px;bottom:18px;z-index:990;border:1px solid var(--theme-line);border-radius:100px;background:var(--theme-panel);color:var(--theme-ink);padding:11px 17px;min-height:44px;font:600 13px/1.3 system-ui;box-shadow:0 4px 18px #0002;cursor:pointer}.theme-open:focus-visible,.theme-choice:focus-visible{outline:3px solid var(--theme-accent);outline-offset:3px}.theme-dialog{position:fixed;inset:0;z-index:10020;display:grid;place-items:center;padding:20px;background:#070d2080;backdrop-filter:blur(5px)}.theme-dialog[hidden]{display:none}.theme-dialog-card{background:var(--theme-panel);color:var(--theme-ink);width:min(660px,100%);max-height:90vh;overflow:auto;border:1px solid var(--theme-line);border-radius:20px;padding:24px;box-shadow:0 20px 100px #0004}.theme-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:14px}.theme-close{min-width:44px;min-height:44px;border:1px solid var(--theme-line);background:transparent;color:var(--theme-ink);border-radius:10px;font:inherit;cursor:pointer}.theme-message{margin:12px 0 0;color:var(--theme-muted);font-size:13px}.theme-dialog .theme-choices{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:600px){.theme-choices{grid-template-columns:repeat(2,minmax(0,1fr))}.theme-section-inner{margin:0 12px;padding:16px}.theme-open{bottom:12px;right:12px;font-size:12px;padding:10px 13px}.theme-dialog-card{padding:16px}.theme-preview{height:62px}input,select,textarea{font-size:16px}.lesson-row{flex-wrap:wrap}.lesson-row .lesson-title{min-width:140px}.lesson-content img,.task-description img{max-width:100%;height:auto}.theme-dialog{padding:10px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
@media print{.theme-open,.theme-dialog,.theme-section{display:none!important}html[data-academy-theme] body{background:#fff!important;color:#111!important}}
html[data-academy-theme] :is(.tr-app,.pb-app,.hub-app,.a-page,.admin-v2){color:var(--theme-ink);--a-bg:var(--theme-bg);--a-bg-card:var(--theme-panel);--a-border:var(--theme-line);--a-text-muted:var(--theme-muted);--a-accent:var(--theme-accent)}
html[data-academy-theme] :is(.tr-card,.tr-round,.tr-rules,.tr-controls,.tr-orbit span,.admin-operational>a,.a-stat-card,.pb-card,.pb-panel,.login-card,.auth-panel,.security-note,.login-options){background:var(--theme-panel)!important;border-color:var(--theme-line);color:var(--theme-ink)}
html[data-academy-theme] :is(.tr-card p,.tr-card-foot,.tr-hero p,.tr-rules,.tr-app label,.admin-group summary,.admin-sidebar label,.admin-side-note,.admin-logo b,.admin-top-actions>a,.admin-operational p,.security-note,.lead){color:var(--theme-muted)}
html[data-academy-theme] :is(.tr-rules summary,.tr-hero h1 span,.tr-row a,.home-link,.admin-nav-row>a){color:var(--theme-ink)}
html[data-academy-theme] :is(.tr-formula,.tr-circuit>*,.tr-badge,.tr-orbit,.tr-quiet,.admin-nav-row:hover,.admin-nav-row:has(.active)){background:var(--theme-panel2);color:var(--theme-ink);border-color:var(--theme-line)}
html[data-academy-theme] :is(#answerFeedback,#hintText,#trNotice:not(:empty)){background:var(--theme-panel2);color:var(--theme-ink)}
html[data-academy-theme] .tr-primary{background:#285aca;color:#fff;border-color:transparent}
html[data-academy-theme="warm"] .tr-primary{background:#216652}
html[data-academy-theme="night"] .tr-primary{background:#7160d2}
html[data-academy-theme] .theme-preview{background:var(--preview-bg)}
html[data-academy-theme] :is(.cookie-header h4,.cookie-text){color:var(--theme-ink)}
html[data-academy-theme] .cookie-text a{color:var(--theme-accent)}
html[data-academy-theme] .cookie-notice{box-shadow:0 -8px 28px #243b5b18}
html[data-academy-theme] .header .nav-link:not(.auth-link){color:var(--theme-muted)}
html[data-academy-theme] .header .nav-link.active{color:var(--theme-accent)}
html[data-academy-theme] .intro-panel{background:var(--theme-hero);color:var(--theme-ink);border-color:var(--theme-line)}
html[data-academy-theme] :is(.intro-panel h1,.intro-copy h1,.brand-name,.intro-copy p,.benefit strong,.login-card h2,.provider-copy strong){color:var(--theme-ink)}
html[data-academy-theme] :is(.intro-copy p,.brand-caption,.benefit span,.provider-copy small,.security-note p,.card-kicker){color:var(--theme-muted)}
html[data-academy-theme] :is(.login-button.vk,.login-button.yandex,.benefit,.online-pill){background:var(--theme-panel2);color:var(--theme-ink)}
html[data-academy-theme] .provider-icon{color:#fff}
html[data-academy-theme] :is(.provider-copy span,.login-button > .fa-arrow-right){color:var(--theme-muted)}
/* Keep the fuller course navigation readable at laptop widths. */
@media(min-width:769px){.header .header-content{gap:24px}.header .logo{flex-shrink:0}.header .nav{min-width:0;justify-content:flex-end;column-gap:18px;row-gap:6px;flex-wrap:wrap}.header .nav-link{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}}
html[data-academy-theme] :is(.nav-link.auth-link,.mobile-nav-link.auth-link){background:#285aca;color:#fff}
html[data-academy-theme="warm"] :is(.nav-link.auth-link,.mobile-nav-link.auth-link){background:#216652}
html[data-academy-theme="night"] :is(.nav-link.auth-link,.mobile-nav-link.auth-link){background:#7160d2}
html[data-academy-theme] .formula-box{background:#101a2a;color:#e7efff}
html[data-academy-theme] .python-lab .lab-run{background:#285aca!important;color:#fff!important}
html[data-academy-theme="warm"] .python-lab .lab-run{background:#216652!important}
html[data-academy-theme="night"] .python-lab .lab-run{background:#7160d2!important}

/* Compact navigation, in every theme including the original. */
.header .header-content{padding:8px 0!important;gap:20px}
.header .logo{background:transparent!important;padding:0!important;box-shadow:none!important;flex-shrink:0}
.header .logo img,.header img.site-logo{width:108px!important;height:60px!important;object-fit:contain;display:block}
.header .nav{column-gap:15px;row-gap:5px}
.header .nav-link{font-size:14px}
.header .auth-link{padding:8px 12px}
@media(max-width:768px){.header .logo img,.header img.site-logo{width:88px!important;height:50px!important}.header .header-content{padding:6px 0!important}.header .nav{background:var(--theme-panel,var(--card-bg,#141e32))}.header .nav-link{font-size:16px}.header .mobile-menu-toggle{flex-shrink:0}}
html[data-academy-theme] .intro-panel .brand-logo{background:transparent;padding:0;box-shadow:none}
/* Theme controls now live in the page footer, never over the content. */
.theme-toolbar{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;width:100%;grid-column:1/-1;margin:24px 0 8px;padding:12px 0;border-top:1px solid var(--theme-line);font:13px/1.5 system-ui;color:var(--theme-muted)}
.theme-open{position:static!important;inset:auto!important;z-index:auto!important;box-shadow:none!important;background:transparent;border:1px solid var(--theme-line);border-radius:8px;padding:7px 11px;min-height:36px;font-size:12px}
@media(max-width:600px){.theme-toolbar{justify-content:center}.theme-open{padding:8px 12px}}
:root[data-academy-theme]{--ink:var(--theme-ink);--text-light:var(--theme-ink);--text-dark:var(--theme-ink);--text-white:var(--theme-ink);--accent-light:var(--theme-accent);--theme-action:#285aca;--theme-success:#17633d;--theme-error:#a82a35;--theme-warning:#855b10;--dash-bg:var(--theme-bg);--dash-card:var(--theme-panel);--dash-card-2:var(--theme-panel2);--dash-line:var(--theme-line);--dash-muted:var(--theme-muted);--dash-blue:var(--theme-accent)}
:root[data-academy-theme=night]{--theme-action:#7160d2;--theme-success:#95e4ba;--theme-error:#ffadb2;--theme-warning:#f1d083}
:root[data-academy-theme=warm]{--theme-action:#216652}
html[data-academy-theme]{background:var(--theme-bg)!important}
html[data-academy-theme] :is(.about-page,.reviews-v2,.life11){background:var(--theme-bg)!important;color:var(--theme-ink)}
html[data-academy-theme] :is(.about-text h2,.stats .stat-number){color:var(--theme-ink)!important}
html[data-academy-theme] :is(.about-text p,.stats .stat-label){color:var(--theme-muted)!important}
html[data-academy-theme] .stats{background:var(--theme-panel)!important}
/* Reviews use the same surfaces and text colours as the rest of the platform. */
html[data-academy-theme] :is(.reviews-hero-v2,.reviews-cta,.dash-hero,.focus-card,.balance-hero){background:var(--theme-hero);color:var(--theme-ink);border-color:var(--theme-line);box-shadow:var(--theme-shadow)}
html[data-academy-theme] :is(.review-card-v2,.reviews-stat,.hero-review-art,.review-filter-bar,.reviews-empty,.mini-bubble){background:var(--theme-panel);color:var(--theme-ink);border-color:var(--theme-line);box-shadow:var(--theme-shadow)}
html[data-academy-theme] .review-card-v2{--source:var(--theme-accent)!important}
html[data-academy-theme] :is(.reviews-hero-v2 h1 span,.hero-copy h1 span){color:var(--theme-accent);background:none;-webkit-text-fill-color:currentColor}
html[data-academy-theme] :is(.review-author-v2,.reviews-stat strong,.review-text-v2){color:var(--theme-ink)}
html[data-academy-theme] :is(.reviews-hero-v2 p,.reviews-stat small,.review-date-v2,.reviews-cta p,.review-filter,.mini-bubble){color:var(--theme-muted)}
html[data-academy-theme] :is(.review-eyebrow,.expand-review,.review-source-link){color:var(--theme-accent)}
html[data-academy-theme] .review-stars-v2{color:var(--theme-warning)}
html[data-academy-theme] .result-chip-v2{color:var(--theme-success);background:var(--theme-panel2);border-color:var(--theme-line)}
html[data-academy-theme] .review-filter:hover{color:var(--theme-ink);background:var(--theme-panel2)}
html[data-academy-theme] .review-filter.active{background:var(--theme-action);color:#fff;box-shadow:none}
html[data-academy-theme] :is(.review-avatar-v2,.quote-orb){color:#fff}
/* Task bank has its own variable namespace. */
html[data-academy-theme] .pb{--pb-ink:var(--theme-ink);--pb-muted:var(--theme-muted);--pb-surface:var(--theme-panel);--pb-border:var(--theme-line);--pb-accent:var(--theme-accent);--pb-blue:var(--theme-accent)}
html[data-academy-theme] :is(.pb-hero,.pb-dashboard,.pb-controls,.pb-list-panel,.pb-card,.pb-reveal,.pb-sourcebox,.pb-source-link,.pb-sources a){background:var(--theme-panel);color:var(--theme-ink);border-color:var(--theme-line)}
html[data-academy-theme] :is(.pb h1,.pb-dashboard strong,.pb-content){color:var(--theme-ink)}
html[data-academy-theme] :is(.pb button,.pb input,.pb select,.pb textarea,.pb-tag,.pb-content blockquote,.pb-feedback){background:var(--theme-panel2);color:var(--theme-ink);border-color:var(--theme-line)}
html[data-academy-theme] .pb .pb-list-item:hover,html[data-academy-theme] .pb .pb-list-item[aria-current=true]{background:var(--theme-panel2);color:var(--theme-ink);border-color:var(--theme-accent)}
html[data-academy-theme] .pb :is(.pb-primary,.pb-exams button[aria-pressed=true]){background:var(--theme-action);color:#fff;border-color:var(--theme-action)}
html[data-academy-theme] .pb :is(.pb-primary:hover,.pb-exams button[aria-pressed=true]:hover){filter:brightness(.95);background:var(--theme-action);color:#fff}
html[data-academy-theme] .pb-content table{background:var(--theme-panel)}
html[data-academy-theme] .pb-content :is(td,th){color:var(--theme-ink)!important;border-color:var(--theme-line)}
html[data-academy-theme] .pb-content th{background:var(--theme-panel2)}
html[data-academy-theme] .pb-content td.diag{background:var(--theme-line)}
html[data-academy-theme] .pb-feedback.ok{background:var(--theme-panel2);color:var(--theme-success)}
html[data-academy-theme] .pb-feedback.wrong{background:var(--theme-panel2);color:var(--theme-error)}
/* Account and study panels; decorative game scenes retain their artwork. */
html[data-academy-theme] .life11{--ink:var(--theme-ink);--muted:var(--theme-muted);--line:var(--theme-line);--card:var(--theme-panel)}
html[data-academy-theme] :is(.life11-top,.life11-world-card,.life11-card,.life11-progress,.life11-useful,.life11-shop-card,.life11-bottom,.life11-pill,.modal-box,.modal-head,.dash-modal-card,.metric-card,.my-course-card,.level-panel,.dash-nav,.side-card){background:var(--theme-panel);color:var(--theme-ink);border-color:var(--theme-line);box-shadow:var(--theme-shadow)}
html[data-academy-theme] :is(.useful-row,.attendance-item,.attendance-empty,.coin-source,.coin-daily-box,.week-quest,.timeline-row,.progress-stat,.price-card,.modal-metric,.evo-step,.hero-badge,.quick-card,.goal-options button,.timeline-item,.achievement,.activity-row,.transaction-row,.sync-plan,.setting-card){background:var(--theme-panel2);color:var(--theme-ink);border-color:var(--theme-line)}
html[data-academy-theme] :is(.life11 h1,.life11 h2,.life11 h3,.useful-row b,.today-row strong,.account-mini,.level-ring-content strong,.metric-value,.my-course-card h3){color:var(--theme-ink)}
html[data-academy-theme] :is(.life11-card p,.progress-copy small,.progress-stat span,.progress-next,.useful-row small,.useful-row em,.attendance-main small,.attendance-closed,.coin-source span,.coin-daily-head span,.week-quest-foot small,.week-quest-status,.timeline-body small,.life11-shop-card p,.today-row small,.life11-navitem,.modal-lead,.price-card li,.modal-metric span,.evo-step small,.hero-copy p,.dash-field label,.privacy-mini){color:var(--theme-muted)!important}
html[data-academy-theme] :is(.life11-level,.progress-level,.life11-navitem.active,.life11-account-id,.course-type,.focus-kicker,.sync-mark,.sync-price,.card-title a){background:var(--theme-panel2);color:var(--theme-accent)}
html[data-academy-theme] :is(.coin-source b,.week-quest-top span,.balance-number,.streak-dot.done){color:var(--theme-warning)}
html[data-academy-theme] :is(.progress-next strong,.progress-level strong,.progress-level small,.price-card .price){color:var(--theme-ink)}
html[data-academy-theme] :is(.parent-box input,.parent-row input,.demographics-form select,.demographics-form input,.dash-field input){background:var(--theme-panel2);color:var(--theme-ink);border-color:var(--theme-line)}
html[data-academy-theme] :is(.life11-btn,.life11-navitem.shop,.dash-btn.primary,.dash-nav button.active){background:var(--theme-action);color:#fff}
html[data-academy-theme] :is(.life11-btn.secondary,.dash-btn,.dash-nav button,.modal-close){background:var(--theme-panel2);color:var(--theme-ink)}
html[data-academy-theme] :is(.dash-btn.primary,.dash-btn.green,.dash-nav button.active){background:var(--theme-action);color:#fff}
html[data-academy-theme] :is(.life11-message,.dash-toast){background:var(--theme-panel2);color:var(--theme-success)}
html[data-academy-theme] :is(.life11-message.error,.dash-toast.error,.tx-negative){color:var(--theme-error)}
html[data-academy-theme] :is(.attendance-done,.week-quest-status.done,.tx-positive,.account-status){color:var(--theme-success)}
html[data-academy-theme] .life11-world{color:#eaf2fb;--ink:#eaf2fb;--muted:#a8bed3}
html[data-academy-theme] :is(.level-ring:before,.mini-ring:before){background:var(--theme-panel)}
/* Shared legacy course and task labels. */
html[data-academy-theme] :is(.exam-badge,.badge,.task-type,.hint,.solution,.run-status,.empty,.counter,.catalog-subtitle){color:var(--theme-accent)}
html[data-academy-theme] :is(.form-control,.answer-section,.filter-bar,.task-box,.task-card,.task-panel){background:var(--theme-panel);color:var(--theme-ink);border-color:var(--theme-line)}
html[data-academy-theme] :is(.result-success,.result.ok){color:var(--theme-success)}
html[data-academy-theme] :is(.result-error,.result.bad){color:var(--theme-error)}
html[data-academy-theme=light] .lb-rank.top1,html[data-academy-theme=warm] .lb-rank.top1{color:#8a6014}
html[data-academy-theme=light] .lb-rank.top2,html[data-academy-theme=warm] .lb-rank.top2{color:#546079}

.course-return-nav{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:0 0 24px;padding:14px 16px;background:var(--theme-panel,#172033);border:1px solid var(--theme-line,#475569);border-radius:14px}.course-return{display:inline-flex;align-items:center;gap:14px;min-height:48px;text-decoration:none;color:var(--theme-ink,#f1f5f9)!important;font:750 17px/1.3 system-ui}.course-return>span:first-child{display:grid;place-items:center;width:44px;height:44px;flex:0 0 44px;border-radius:10px;background:var(--theme-action,#285aca);color:#fff;font-size:28px}.course-return small{display:block;margin-top:4px;max-width:65ch;color:var(--theme-muted,#a4b2c8);font-size:12px;font-weight:400}.course-return-secondary{display:inline-flex;align-items:center;min-height:44px;font-size:14px;color:var(--theme-accent,#91b5ff)}.course-return:focus-visible{outline:3px solid var(--theme-accent,#91b5ff);outline-offset:5px}@media(max-width:600px){.course-return-nav{padding:12px;margin-bottom:18px}.course-return{font-size:16px}.course-return small{max-width:calc(100vw - 125px)}}

.header{padding:0!important}.academy-home>main{margin-top:77px!important}html:is([data-academy-theme=light],[data-academy-theme=warm]) :is(.header .logo img,.intro-panel .brand-logo){filter:brightness(.58) saturate(1.3)}@media(max-width:768px){.academy-home>main{margin-top:63px!important}}
html[data-academy-theme] :is(.as-current-price-v4 small,.as-current-list-v4 li,.as-current-note-v4){color:var(--theme-muted)!important}html[data-academy-theme] .as-current-check-v4{color:var(--theme-success)!important}html[data-academy-theme] .as-current-price-v4{color:var(--theme-accent)}html[data-academy-theme] .info-card{background:var(--theme-panel2);color:var(--theme-ink);border-color:var(--theme-line)}html[data-academy-theme] .text-link{color:var(--theme-accent)}

html[data-academy-theme] .tr-eyebrow{color:var(--theme-accent)}html[data-academy-theme] .tr-controls{background:transparent!important}

/* Theme-specific surfaces must change together with their text. */
html:not([data-academy-theme]) .catalog-hero-title {
  color: #f7faff;
  background: none;
  -webkit-text-fill-color: currentColor;
}
html:not([data-academy-theme]) .footer-bottom p { color: #a4b2c8; }
html[data-academy-theme] {
  --v3-line: var(--theme-line);
  --accent-hover: var(--theme-accent);
}
html[data-academy-theme] .catalog-hero-v3 { background: transparent !important; }
html[data-academy-theme] :is(.catalog-hero-grid, .ege-hero, .oge-hero) {
  background: var(--theme-hero) !important;
  color: var(--theme-ink);
  border-color: var(--theme-line);
  box-shadow: var(--theme-shadow);
}
html[data-academy-theme] :is(.catalog-card-fx, .catalog-info-card-v3, .catalog-stat-pill, .variant-card) {
  background: var(--theme-panel) !important;
  color: var(--theme-ink);
  border-color: var(--theme-line);
  box-shadow: var(--theme-shadow);
}
html[data-academy-theme] :is(.catalog-card h3, .catalog-info-main h3, .catalog-stat-pill b, .catalog-hero-title, .courses-hero-title, .ege-hero-title, .oge-hero-title, .lb-hero h1, .sch-hero h1) {
  background: none;
  color: var(--theme-ink);
  -webkit-text-fill-color: currentColor;
}
html[data-academy-theme] .catalog-hero-title span {
  background: none;
  color: var(--theme-accent);
  -webkit-text-fill-color: currentColor;
}
html[data-academy-theme] :is(.catalog-card p, .catalog-info-main p, .catalog-stat-pill span, .catalog-footer, .catalog-info-steps span, .catalog-info-steps i, .ege-hero-description, .oge-hero-description, .ege-hero-stat small, .oge-hero-stat small, .login-card .divider) {
  color: var(--theme-muted);
}
html[data-academy-theme] :is(.catalog-kicker, .catalog-card-kicker, .catalog-card-fx .catalog-badge, .catalog-card-fx .catalog-card-cta, .course-go, .variant-badge) {
  color: var(--theme-accent);
}
html[data-academy-theme] :is(.catalog-kicker, .catalog-card-fx .catalog-badge, .catalog-ghost-btn, .catalog-info-steps b, .ege-hero-stat, .oge-hero-stat, .back-to-catalog, .variant-badge) {
  background: var(--theme-panel2);
  border-color: var(--theme-line);
}
html[data-academy-theme] :is(.catalog-ghost-btn, .catalog-info-steps b, .ege-hero-stat span, .oge-hero-stat span, .back-to-catalog) {
  color: var(--theme-ink);
}
html[data-academy-theme] :is(.catalog-main-btn, .exam-switch a.active, .reviews-cta a) {
  background: var(--theme-action);
  color: #fff;
  -webkit-text-fill-color: currentColor;
  box-shadow: none;
}
html[data-academy-theme] :is(.catalog-main-btn:hover, .exam-switch a.active:hover, .reviews-cta a:hover) { filter: brightness(.94); }
html[data-academy-theme] :is(.catalog-ghost-btn:hover, .back-to-catalog:hover, .track-tab:not(.active):hover) {
  background: var(--theme-panel2);
  color: var(--theme-ink);
  border-color: var(--theme-accent);
}
html[data-academy-theme] :is(.catalog-icon, .catalog-info-icon, .mission-icon) { color: #fff; }
html[data-academy-theme] .tr-orbit :is(b, small) { color: var(--theme-accent); }
html[data-academy-theme] .catalog-card-footer { border-color: var(--theme-line); }
html[data-academy-theme] :is(.catalog-card-fx:hover, .variant-card:hover) {
  border-color: var(--theme-accent);
  box-shadow: var(--theme-shadow);
}
html[data-academy-theme] :is(.courses-hero, .lb-hero, .sch-hero)::before,
html[data-academy-theme] :is(.courses-hero, .lb-hero, .sch-hero)::after { opacity: .12; }

/* Remaining legacy components found by checking each palette on the live pages. */
html[data-academy-theme] .academy-home .about { background: var(--theme-panel) !important; }
html[data-academy-theme] .eyebrow {
  background: var(--theme-panel2);
  color: var(--theme-accent);
  border-color: var(--theme-line);
}
.about-text .section-title { background: none; -webkit-text-fill-color: currentColor; }
.review-avatar-v2 { background: var(--theme-action, #285aca) !important; color: #fff; }
.carousel-caption { background: rgba(9,16,30,.88) !important; padding: 12px 18px; color: #fff; }
.cookie-btn.accept { background: #17633d; color: #fff; }
.cookie-btn.decline { background: #8f2634; color: #fff; }
html:not([data-academy-theme]) :is(.header .auth-link, .exam-switch a.active, .reviews-cta a) {
  background: #285aca;
  color: #fff;
}
html:not([data-academy-theme]) :is(.info-card .text-link, .py-foundation .lesson-row, .tr-card-rating, .tr-rules a, .read-more, .cookie-text a, .back-to-catalog, .variant-badge) { color: #a9caff; }
html:not([data-academy-theme]) :is(.py-foundation .lesson-row small, .catalog-footer, .section-subtitle, .news-author, .news-date, .login-card .divider) { color: #a4b2c8; }
html:not([data-academy-theme]) :is(.ege-hero-title, .oge-hero-title) { background: none; color: #f7faff; -webkit-text-fill-color: currentColor; }
html:is([data-academy-theme=light], [data-academy-theme=warm]) .lb-rank.top3 { color: #8c4b12; }

/* The desktop logo has more room; the compact phone navigation is preserved. */
@media (min-width: 769px) {
  .header .logo img, .header img.site-logo { width: 140px !important; height: 76px !important; }
  .academy-home > main { margin-top: 93px !important; }
}

/* Decorative hero layers must never intercept navigation or touch input. */
.hero::before,.hero::after{pointer-events:none!important}
.hero>.container{position:relative;z-index:1}
.course-return-nav{position:relative;z-index:2;display:block;padding:0}
.course-return-nav .course-return{padding:14px 16px;display:flex;width:100%;box-sizing:border-box;border-radius:14px;min-height:76px}
.course-return-nav .course-return:hover{background:var(--theme-panel2,var(--card-bg));text-decoration:none}
.course-return-nav:has(.course-return-secondary){display:flex;flex-wrap:wrap;padding-right:16px}
.course-return-nav:has(.course-return-secondary) .course-return{width:auto;flex:1}
.course-return-secondary{padding:12px}

/* Neutral default links yield to local cards, buttons and purchased profile palettes. */
:root{--ui-link:var(--theme-ink,#e2e8f0);--ui-accent:#a9c7ed}
:root[data-academy-theme="night"]{--ui-accent:#afc9f2}
:root[data-academy-theme="light"]{--ui-accent:#2859a0}
:root[data-academy-theme="warm"]{--ui-accent:#355d83}
html body :where(a:not([class]):not([role="button"]):not(footer a)){color:var(--ui-link);text-decoration-color:currentColor;text-underline-offset:.22em}
html body :is(.breadcrumb,.breadcrumbs,.back-link,.top-back) a,html body a:is(.back-link,.top-back){color:var(--ui-link)}
/* The home next-step link is a filled purple CTA, including its visited state. */
html body #homeRoute>a,
html body #homeRoute>a:is(:visited,:hover,:active){color:#fff!important}

/* Restore centered appearance control; keep the phone footer compact. */
body.academy-home .theme-toolbar{justify-content:center}
@media(max-width:767px){.footer .footer-content>.footer-section:last-child:has(a[href$="catalog.php"]){display:none}}

/* 2026-10-07: paired colours verified in all four palettes. */
:root[data-academy-theme="warm"]{--theme-muted:#506057}
html body .ac-directions a[aria-current="page"],html body .se-duel-cta{background:var(--theme-action,#285aca);color:#fff!important;-webkit-text-fill-color:currentColor}
html[data-academy-theme] body .about-page .eyebrow{color:var(--theme-accent);-webkit-text-fill-color:currentColor}
html[data-academy-theme] body .intro-copy h1 span{background:none;color:var(--theme-accent);-webkit-text-fill-color:currentColor}
html[data-academy-theme] body .se-duel-art>span{color:var(--theme-ink);-webkit-text-fill-color:currentColor}
html:not([data-academy-theme]) body .header .nav-link:not(.auth-link){color:#c6d2e4}
html:not([data-academy-theme]) body :is(.aw-kicker,.aw-section-title>a,.aw-extras b,.aw-no-print:not(button)){color:#a9c7ed}
html:not([data-academy-theme]) body :is(.home-route-card,.route-card) span{color:#a9c7ed}
html:not([data-academy-theme]) body.academy-home .about{--text-primary:#eef0ff;--text-secondary:#b8c0d7}
html:not([data-academy-theme]) body.academy-home .about .section-title{color:#eef0ff!important;-webkit-text-fill-color:currentColor}

html:not([data-academy-theme]) body.academy-home .about :is(.teacher-kicker,#aboutIntroText,#aboutFooterText){color:#b8c0d7!important;-webkit-text-fill-color:currentColor}
html:not([data-academy-theme]) body .discovery-heading>div>span{color:#a9c7ed}
html[data-academy-theme] body #academyInfoMain .info-intro .eyebrow{color:var(--theme-accent);-webkit-text-fill-color:currentColor}
