/* Site identity layer. Color only: existing layout, motion and semantic feedback remain intact. */
:root { --brand-bg:#f8f5fc;--brand-panel:#ffffff;--brand-ink:#2c2043;--brand-muted:#71647f;--brand-line:#e1d7ee;--brand-soft:#f0e8fb;--brand-field:#fcfaff;--brand-accent:#7042c1;--brand-secondary:#b94383;--brand-secondary-soft:#faeaf2;--brand-button:#7042c1;--brand-button-hover:#5931a0;--brand-shadow:#7042c114;--brand-glow:#7042c1;--brand-halo:#7042c122; }
:root[data-theme="dark"] { --brand-bg:#161121;--brand-panel:#231a32;--brand-ink:#f2eafb;--brand-muted:#b9accd;--brand-line:#443451;--brand-soft:#302241;--brand-field:#1c142a;--brand-accent:#ccb3ff;--brand-secondary:#ed9dc4;--brand-secondary-soft:#402338;--brand-button:#7042c1;--brand-button-hover:#5931a0;--brand-shadow:#7042c124;--brand-glow:#ccb3ff;--brand-halo:#ccb3ff22; color-scheme:dark; }
:root,:root body,:root .speech-card,:root #contentHavanaText.reading-card {
 --bg:var(--brand-bg)!important;
 --muted:var(--brand-muted)!important;
 --blue:var(--brand-accent)!important;
 --modern-bg:var(--brand-bg)!important;
 --modern-ink:var(--brand-ink)!important;
 --modern-panel:var(--brand-panel)!important;
 --modern-border:var(--brand-line)!important;
 --a-bg:var(--brand-bg)!important;
 --a-ink:var(--brand-ink)!important;
 --a-muted:var(--brand-muted)!important;
 --a-line:var(--brand-line)!important;
 --a-soft:var(--brand-soft)!important;
 --a-panel:var(--brand-panel)!important;
 --a-card:var(--brand-panel)!important;
 --a-blue:var(--brand-accent)!important;
 --a-accent:var(--brand-accent)!important;
 --s-bg:var(--brand-bg)!important;
 --s-ink:var(--brand-ink)!important;
 --s-muted:var(--brand-muted)!important;
 --s-line:var(--brand-line)!important;
 --s-soft:var(--brand-soft)!important;
 --s-panel:var(--brand-panel)!important;
 --s-card:var(--brand-panel)!important;
 --s-blue:var(--brand-accent)!important;
 --s-accent:var(--brand-accent)!important;
 --p-bg:var(--brand-bg)!important;
 --p-ink:var(--brand-ink)!important;
 --p-muted:var(--brand-muted)!important;
 --p-line:var(--brand-line)!important;
 --p-soft:var(--brand-soft)!important;
 --p-panel:var(--brand-panel)!important;
 --p-card:var(--brand-panel)!important;
 --p-blue:var(--brand-accent)!important;
 --p-accent:var(--brand-accent)!important;
 --hub-bg:var(--brand-bg)!important;
 --hub-ink:var(--brand-ink)!important;
 --hub-muted:var(--brand-muted)!important;
 --hub-line:var(--brand-line)!important;
 --hub-soft:var(--brand-soft)!important;
 --hub-panel:var(--brand-panel)!important;
 --hub-card:var(--brand-panel)!important;
 --hub-blue:var(--brand-accent)!important;
 --hub-accent:var(--brand-accent)!important;
 --cat-bg:var(--brand-bg)!important;
 --cat-ink:var(--brand-ink)!important;
 --cat-muted:var(--brand-muted)!important;
 --cat-line:var(--brand-line)!important;
 --cat-soft:var(--brand-soft)!important;
 --cat-panel:var(--brand-panel)!important;
 --cat-card:var(--brand-panel)!important;
 --cat-blue:var(--brand-accent)!important;
 --cat-accent:var(--brand-accent)!important;
 --lp-bg:var(--brand-bg)!important;
 --lp-ink:var(--brand-ink)!important;
 --lp-muted:var(--brand-muted)!important;
 --lp-line:var(--brand-line)!important;
 --lp-soft:var(--brand-soft)!important;
 --lp-panel:var(--brand-panel)!important;
 --lp-card:var(--brand-panel)!important;
 --lp-blue:var(--brand-accent)!important;
 --lp-accent:var(--brand-accent)!important;
 --a-field:var(--brand-field)!important;
 --a-glow:var(--brand-soft)!important;
 --amir-purple:var(--brand-secondary)!important;
 --amir-teal:var(--brand-accent)!important;
 --amir-paper:var(--brand-panel)!important;
 --amir-line:var(--brand-line)!important;
 --amir-text:var(--brand-ink)!important;
 --memad-purple:var(--brand-secondary)!important;
 --memad-teal:var(--brand-accent)!important;
 --memad-paper:var(--brand-panel)!important;
 --memad-line:var(--brand-line)!important;
 --memad-text:var(--brand-ink)!important;
 --psycho-purple:var(--brand-secondary)!important;
 --psycho-teal:var(--brand-accent)!important;
 --psycho-paper:var(--brand-panel)!important;
 --psycho-line:var(--brand-line)!important;
 --psycho-text:var(--brand-ink)!important;
 --reading-paper:var(--brand-panel)!important;
 --reading-text:var(--brand-ink)!important;
 --reading-border:var(--brand-line)!important;
 --reading-header:var(--brand-soft)!important;
}
html:root body,html:root body:is(.colorful-home,.auth-page,.portal-page,.modern-study,.learning-page,.category-page) {background-color:var(--brand-bg)!important;color:var(--brand-ink)!important}
html:root body.colorful-home {background-image:radial-gradient(ellipse at 15% 0%,var(--brand-soft),transparent 45%),radial-gradient(ellipse at 95% 20%,var(--brand-secondary-soft),transparent 48%)!important}
html:root .colorful-home .hero {background:radial-gradient(ellipse at 50% 60%,var(--brand-soft),transparent 66%)!important}
html:root .category-page {background:radial-gradient(ellipse at 90% 0%,var(--brand-soft),transparent 42%),var(--brand-bg)!important}
html:root .colorful-home header,html:root .colorful-home footer {border-color:var(--brand-line)!important;color:var(--brand-ink)}
html:root .colorful-home h1,html:root .colorful-home h2,html:root .colorful-home h3,html:root .colorful-home .brand,html:root .colorful-home .category b {color:var(--brand-ink)!important}
html:root .colorful-home h1 em {background-image:linear-gradient(110deg,var(--brand-accent),var(--brand-secondary))!important;color:var(--brand-accent);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
html:root .colorful-home :is(.intro,.click-hint,.bottom-note,.category small,.brand small,.pricing-note,.calculator-note,.path-card p,.path-card small,.hero-chips,.news-item p) {color:var(--brand-muted)!important}
html:root :is(.section-label,.form-kicker,.study-eyebrow,.category-eyebrow,.portal-eyebrow,.lp-eyebrow,.hub-eyebrow,.study-back,.category-back,.hub-header-link) {color:var(--brand-accent)!important}
html:root .colorful-home :is(.category,.hero-chips>span,.learning-grid>a,.learning-grid>div>div>a,.path-card,.price-card,.exam-notice,.news-item,.calculator-controls) {background:var(--brand-panel)!important;border-color:var(--brand-line)!important;box-shadow:0 12px 30px var(--brand-shadow)!important}
html:root .colorful-home .category {--tone:var(--brand-accent);--icon-color:var(--brand-accent);--icon-bg:var(--brand-soft);border-top-color:var(--brand-accent)!important}
html:root .colorful-home .category:nth-of-type(even) {--tone:var(--brand-secondary);--icon-color:var(--brand-secondary);--icon-bg:var(--brand-secondary-soft);border-top-color:var(--brand-secondary)!important}
html:root .colorful-home :is(.category:hover,.learning-grid>a:hover,.path-card:hover) {border-color:var(--brand-accent)!important;box-shadow:0 14px 36px var(--brand-shadow)!important}
html:root .colorful-home .logo {background:radial-gradient(circle at 35% 25%,var(--brand-panel),var(--brand-soft) 85%)!important;border-color:var(--brand-line)!important;box-shadow:0 0 0 10px var(--brand-halo),0 18px 48px var(--brand-shadow)!important}
html:root .colorful-home .logo-wrap::before {background:radial-gradient(ellipse at 30% 30%,var(--brand-glow),transparent 65%)!important;opacity:.3!important}
html:root .colorful-home .logo-wrap::after {background:radial-gradient(ellipse at 70% 65%,var(--brand-secondary-soft),transparent 65%)!important;opacity:.35!important}
html:root .colorful-home .orbit {border-color:var(--brand-line)!important}
html:root .colorful-home .orbit-two {border-color:var(--brand-halo)!important}
html:root .colorful-home :is(.formula,.demo) {color:var(--brand-muted)!important}
html:root .colorful-home .star {background:var(--brand-secondary)!important;box-shadow:0 0 12px var(--brand-halo)!important}
html:root :is(#theme,#motion,.account-link,.social-toggle,#modern-tools,.social-rail,.social-context-menu) {background:var(--brand-panel)!important;border-color:var(--brand-line)!important;color:var(--brand-ink)!important}
html:root :is(.social-toggle,.social-context-menu a:hover,.social-context-menu a:focus) {color:var(--brand-accent)!important}
html:root :is(.auth-primary,.portal-primary,.lp-primary,.category-cta,.calculate-button,.plan-select,.signup-link,#quiz-start-btn,#quiz-next-btn,#quiz-restart-btn,.study-start-button) {background:var(--brand-button)!important;color:#fff!important;border-color:var(--brand-button)!important;box-shadow:0 6px 18px var(--brand-shadow)!important}
html:root :is(.auth-primary,.portal-primary,.lp-primary,.category-cta,.calculate-button,.plan-select,.signup-link,#quiz-start-btn,#quiz-next-btn,#quiz-restart-btn):hover {background:var(--brand-button-hover)!important;color:#fff!important}
html:root :is(.auth-input,.portal-input,.resource-search input,.study-search input) {background:var(--brand-field)!important;border-color:var(--brand-line)!important;color:var(--brand-ink)!important}
html:root :is(input,select,textarea,button,a):focus-visible {outline-color:var(--brand-accent)!important}
html:root :is(input[type=checkbox],input[type=radio],input[type=range]) {accent-color:var(--brand-button)}
html:root :is(.auth-story h1 em,.story-ar,.password-toggle,.form-kicker,.signup-progress li.is-current,.signup-progress li.active) {color:var(--brand-accent)!important}
html:root .signup-progress :is(.is-current,.active) b {background:var(--brand-button)!important;color:white!important}
html:root :is(.portal-icon,.study-subject-icon,.category-symbol,.hub-hero-icon,.admin-card-icon,.resource-icon,.floating-topic b) {background:var(--brand-soft)!important;color:var(--brand-accent)!important}
html:root :is(.study-nav a.active,.admin-nav a[aria-current=page],.study-filter.is-active,.study-filter.active) {background:var(--brand-soft)!important;border-color:var(--brand-line)!important;color:var(--brand-accent)!important}
html:root .study-timer:not([data-state=low]):not([data-state=urgent]) {--timer-tone:var(--brand-accent)!important;--timer-tint:var(--brand-soft)!important;background:linear-gradient(115deg,var(--brand-panel),var(--brand-soft))!important;border-color:var(--brand-line)!important;box-shadow:0 8px 24px var(--brand-shadow)!important}
html:root .study-progress span {background:var(--brand-accent)!important}
html:root .study-card-index {background:var(--brand-soft)!important;color:var(--brand-accent)!important}
html:root .study-list :is(.amir-stage-path,.memad-stage-path,.psycho-stage-path)::before {background:repeating-linear-gradient(to bottom,var(--brand-line) 0 9px,transparent 9px 17px)!important}
html:root .study-quiz-card[data-completed=true] .study-card-index {background:var(--s-success)!important;color:var(--s-green)!important}
html:root .modern-study #ChooseTimeDiv input.is-selected {background:var(--brand-soft)!important;border-color:var(--brand-accent)!important;color:var(--brand-accent)!important;box-shadow:0 0 0 3px var(--brand-halo)!important}
html:root .modern-study #quiz-buttons a,html:root .modern-study #resultDiv a {background:var(--brand-button)!important;color:white!important}
html:root .modern-study #quiz-buttons a:hover,html:root .modern-study #resultDiv a:hover {background:var(--brand-button-hover)!important}
html:root .admin-page #InnerDivQ :is(input[type=submit],input[type=button],input[type=reset],button) {background:var(--brand-button)!important;color:white!important}
html:root .admin-page #InnerDivQ :is(input[type=submit],input[type=button],input[type=reset],button):hover {background:var(--brand-button-hover)!important}
html:root .admin-page #InnerDivQ input[type=file]::file-selector-button {background:var(--brand-button)!important;color:white!important}
html:root .admin-page #InnerDivQ .admin-action-card input[type=submit],html:root .admin-page #InnerDivQ .admin-action-card input[type=submit]:hover {background:var(--brand-soft)!important;color:var(--brand-accent)!important;border-color:var(--brand-line)!important}
html:root .admin-page #InnerDivQ .pager span {background:var(--brand-button)!important;color:white!important}
html:root :is(.price-card,.price-blue,.price-purple,.price-pink,.price-cyan) {--plan-color:var(--brand-accent)!important;--plan-pale:var(--brand-soft)!important}
html:root .price-card:nth-child(even) {--plan-color:var(--brand-secondary)!important;--plan-pale:var(--brand-secondary-soft)!important}
html:root .price-top {background:linear-gradient(145deg,var(--plan-pale),var(--brand-panel))!important;border-color:var(--brand-line)!important}
html:root .plan-price {color:var(--brand-ink)!important}
html:root .plan-duration {background:var(--plan-pale)!important;color:var(--plan-color)!important}
html:root .practice-banner {background:linear-gradient(115deg,var(--brand-soft),var(--brand-secondary-soft))!important;border-color:var(--brand-line)!important;color:var(--brand-ink)!important}
html:root .practice-banner a {background:var(--brand-button)!important;color:white!important;border-color:transparent!important}
html:root .path-card {--path-tint:var(--brand-soft)!important;border-color:var(--brand-line)!important}
html:root .path-card:nth-child(even) {--path-tint:var(--brand-secondary-soft)!important}
html:root :is(.amir-track,.memad-track,.psycho-track,.rocheld-legacy-content,.amir-legacy-content,.memad-legacy-content,.psycho-legacy-content) {background:var(--brand-panel)!important;border-color:var(--brand-line)!important;color:var(--brand-ink)!important}
html:root :is(.memad-track a,.psycho-track a) {background:var(--brand-soft)!important;color:var(--brand-ink)!important;border-color:var(--brand-line)!important}
html:root :is(.memad-track a,.psycho-track a):hover {border-color:var(--brand-accent)!important}
html:root :is(.memad-track small,.psycho-track small) {color:var(--brand-muted)!important}
html:root :is(.amir-alert,.memad-alert,.psycho-alert,.ui-dialog) {background:var(--brand-panel)!important;color:var(--brand-ink)!important;border-color:var(--brand-line)!important}
html:root :is(.amir-alert,.memad-alert,.psycho-alert) button {background:var(--brand-button)!important;color:#fff!important}
html:root :is(.amir-alert-icon,.memad-alert-icon,.psycho-alert-icon) {background:var(--brand-soft)!important;color:var(--brand-accent)!important}
html:root #StudyprogrammerButtonBuild {background:var(--brand-button)!important;color:white!important}
html:root :is(.memad-planner,.psycho-planner) #inputStudyprogrammer {background:linear-gradient(125deg,var(--brand-soft),var(--brand-secondary-soft))!important;border-color:var(--brand-line)!important}
html:root #score-result:not([data-level=perfect]):not([data-level=practice]) {--score-from:var(--brand-secondary);--score-to:var(--brand-accent);--score-soft:var(--brand-soft)}
html:root #score-result {--score-ink:var(--brand-ink);--score-muted:var(--brand-muted);--score-paper:var(--brand-panel);--score-border:var(--brand-line);--score-track:var(--brand-line)}
/* Correct answers, errors, low-time warnings and the golden 100% award keep their semantic colors. */
@media print {html:root body{background:white!important;color:black!important}}
