
/* TutorMost 3.2 · Accessible light/dark themes. Same theme across RU and EN. */
:root{--bg:#ffffff;--surface:#ffffff;--surface-2:#f6f8fc;--surface-3:#eaf0fb;--fg:#19253e;--subtle-fg:#60738f;--theme-border:#dfe7f3;--header-bg:rgba(255,255,255,.96);--shadow-ui:0 14px 40px rgba(26,53,105,.08)}
html{background:var(--bg);color-scheme:light}
body{background:var(--bg);transition:background-color .23s ease,color .23s ease}
.theme-toggle{display:inline-flex;flex:0 0 auto;justify-content:center;align-items:center;width:38px;height:38px;border:1px solid var(--theme-border);border-radius:12px;background:var(--surface-2);color:var(--fg);cursor:pointer;transition:background .2s,border-color .2s,transform .15s}
.theme-toggle:hover{background:var(--surface-3);border-color:var(--blue);transform:translateY(-1px)}
.theme-toggle:focus-visible{outline:3px solid #79a4ff;outline-offset:3px}
.theme-icon{display:flex;align-items:center;justify-content:center}
.theme-sun{display:none}
html[data-theme="dark"] .theme-moon{display:none}
html[data-theme="dark"] .theme-sun{display:flex}
@media(max-width:520px){.theme-toggle{width:34px;height:34px;border-radius:10px}}
@media(prefers-reduced-motion:reduce){body,.theme-toggle{transition:none}}

html[data-theme="dark"]{color-scheme:dark;--ink:#edf3ff;--muted:#b4c2da;--blue:#8daaff;--line:#303d58;--pale:#18243b;--bg:#0d1423;--surface:#162138;--surface-2:#1c2942;--surface-3:#273957;--fg:#edf3ff;--subtle-fg:#b4c2da;--theme-border:#344563;--header-bg:rgba(17,26,44,.97);--shadow-ui:0 16px 40px rgba(0,0,0,.25)}
html[data-theme="dark"] body{background:var(--bg);color:var(--fg)}
html[data-theme="dark"] :is(h1,h2,h3,h4,h5,strong,b){color:var(--fg)}
html[data-theme="dark"] :is(p,li,small,label){color:var(--muted)}
html[data-theme="dark"] :is(a,button){transition:background-color .16s,color .16s,border-color .16s}
html[data-theme="dark"] .site-header{background:var(--header-bg);border-color:var(--line)}
html[data-theme="dark"] :is(.desktop-nav a,.account-link,.header-search,.mobile-menu a){color:#c6d3e8}
html[data-theme="dark"] :is(.mobile-menu,.site-header .menu-toggle){background:#142039;color:var(--fg)}
html[data-theme="dark"] .mobile-menu{box-shadow:0 20px 35px rgba(0,0,0,.42)}
html[data-theme="dark"] .mobile-menu a{border-color:var(--line)}
html[data-theme="dark"] .language-switch{background:#1b2942;border-color:var(--line)}
html[data-theme="dark"] .language-switch .lang-option{color:#bdcee7}
html[data-theme="dark"] .language-switch .lang-option:hover{background:#2f456a;color:white}
html[data-theme="dark"] .language-switch .lang-option.is-active{background:#526feb;color:white}
html[data-theme="dark"] .mobile-lang-row{color:#aebbd2}
html[data-theme="dark"] .logo{color:#f1f6ff}
html[data-theme="dark"] :is(.hero,.inner-hero,.hub-hero,.journal-head,.editorial-hero,.account-hero,.ecos-intro){background:linear-gradient(125deg,#101d33,#182844 64%,#102b30)!important}
html[data-theme="dark"] .soft-bg{background:#121e31}
html[data-theme="dark"] :is(.quick-strip,.quick-inner,.article-aside){border-color:var(--line)}
html[data-theme="dark"] :is(.benefit-card,.price-card,.step-card,.subject-chip,.portal-tile,.ecosystem-map a,.journal-card,.route-card,.planner-box,.search-result,.doc-sidebar,.document-link,.subject-list-item,.role-panel,.workspace-mock,.study-window,.floating-note,.test-graphic-card,.tag,.journal-search,.search-box,.filter-pill,.journey-links a,.resource-visual,.account-caution,.quiz-option,.form-panel,.big-choice,.post-card,.format-card,.role-tab,.mock-card,.mock-header,.portal-panel,.portal-item,.tutor-card,.portal-admin-nav button,.portal-stat,.portal-tabs button.active){background:var(--surface)!important;border-color:var(--line)!important;color:var(--fg)!important}
html[data-theme="dark"] :is(.cta-panel,.article-ending,.doc-close,.cta-small,.planner-result,.empty-state,.form-note,.resource-feature,.lesson-tags span,.mock-rail,.mock-badge,.mock-rail-item.active,.mock-shapes span,.mock-progress,.role-tab,.portal-tabs,.portal-empty,.portal-note,.portal-disclaimer,.portal-hero,.portal-stat,.account-symbol,.notice,.portal-badge){background:var(--surface-2)!important;border-color:var(--line)!important;color:var(--muted)}
html[data-theme="dark"] :is(.blue-tint,.green-tint,.cream-tint){background:#20324e;color:#d8e7ff}
html[data-theme="dark"] :is(.subject-icon,.price-icon,.icon-disc,.big-choice-icon,.post-icon,.route-steps b,.ws-feature-icon){background:#283e63;color:#aec4ff}
html[data-theme="dark"] :is(.hero-points span,.quick-inner span,.doc-sidebar a,.doc-article p,.doc-article li,.article-content section p,.route-steps div,.resource-visual span,.plan-day span,.journal-search,.portal-form label,.portal-small){color:var(--muted)}
html[data-theme="dark"] :is(.btn-outline,.btn-white,.btn-pale){background:#253551;border-color:#476083;color:#f2f6ff}
html[data-theme="dark"] :is(.btn-outline:hover,.btn-pale:hover){background:#344b70;border-color:#85a4e5}
html[data-theme="dark"] .btn-blue{background:#4b6be8;color:#fff}
html[data-theme="dark"] .btn-blue:hover{background:#6083ff}
html[data-theme="dark"] :is(.test-panel,.workspace-cta,.cta-panel-blue){background:linear-gradient(120deg,#233f85,#192d5a)}
html[data-theme="dark"] :is(.test-panel,.workspace-cta) :is(h1,h2,h3,p){color:#fff}
html[data-theme="dark"] :is(.format-card h3,.price-card h3,.role-tab.active,.role-tab.active span){color:var(--fg)}
html[data-theme="dark"] .role-tab.active{background:#4468d8!important;border-color:#5579e5!important;color:#fff!important}
html[data-theme="dark"] .role-tab.active span{color:#fff}
html[data-theme="dark"] :is(input,textarea,select,.form-panel input,.form-panel select,.form-panel textarea,#study-planner select,.portal-form input,.portal-form select,.portal-form textarea,.portal-filters input,.portal-table select){background:#132039!important;color:#ecf2ff!important;border-color:#465b7b!important}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#a9b9d1}
html[data-theme="dark"] :is(.lesson-content p,.lesson-content small,.mock-card>span,.workspace-upcoming,.workspace-info,.workspace-disclaimer){color:#b7c5da}
html[data-theme="dark"] :is(.window-top,.mock-header,.resource-visual>div,.plan-day,.integration-list div,.portal-table th,.portal-table td){border-color:var(--line)}
html[data-theme="dark"] :is(.mock-rail,.mock-badge,.mock-layout,.mock-shapes span,.lesson-tags span,.study-inner,.test-choice,.progress-track){background:var(--surface-2)}
html[data-theme="dark"] .study-inner{color:var(--fg)}
html[data-theme="dark"] .site-footer{background:#080f1d;color:white}
html[data-theme="dark"] .site-footer :is(h1,h2,h3,h4,strong,b){color:#f6f8ff}
html[data-theme="dark"] .site-footer :is(p,li,small){color:#aabdd7}
html[data-theme="dark"] a:focus-visible{outline:3px solid #8aa7ff;outline-offset:3px}

/* Journal, cards, planners and search */
html[data-theme="dark"] :is(.journal-card,.journal-cover,.journal-top,.journal-body,.article-ending,.resource-feature,.planner-box,.portal-grid,.journal-toolbar){border-color:var(--line)}
html[data-theme="dark"] :is(.journal-tag,.filter-pill,.article-ending p,.article-aside a,.eyebrow,.text-link){color:#9ab9ff}
html[data-theme="dark"] :is(.art-1,.art-2,.art-3,.art-4,.art-5,.art-6){background:#273758}
html[data-theme="dark"] :is(.planner-result,.search-result,.route-card,.portal-item,.portal-empty){color:#f0f5ff}
html[data-theme="dark"] :is(.portal-note,.portal-disclaimer,.portal-status,.portal-badge,.portal-small,.portal-item p,.tutor-card p,.portal-stat span){color:#bdcbe0}
html[data-theme="dark"] :is(.portal-form input,.portal-form textarea,.portal-form select){background:#15233c;color:#f0f5ff}
html[data-theme="dark"] :is(.portal-tabs,.portal-admin-nav button,.portal-empty){border-color:var(--line)}
html[data-theme="dark"] .portal-tabs button:not(.active){color:#aebed9}
html[data-theme="dark"] .portal-tabs button.active{color:#f4f7ff}
html[data-theme="dark"] :is(.tutor-card h3,.portal-item strong,.portal-stat strong){color:#edf3ff}
html[data-theme="dark"] .portal-hero{background:linear-gradient(125deg,#121f37,#192c4a)!important}
html[data-theme="dark"] .tutor-avatar{background:linear-gradient(135deg,#3c5685,#273c63);color:#dce9ff}

/* Workspace gateway: keep mock dashboard intentionally distinct and legible. */
html[data-theme="dark"] .workspace-intro{background:radial-gradient(circle at 94% 4%,#263d60,transparent 44%),linear-gradient(137deg,#111b30,#182c49)!important}
html[data-theme="dark"] .workspace-sections{background:var(--bg)}
html[data-theme="dark"] :is(.workspace-visual,.workspace-feature-grid article,.ws-cards>div,.ws-lesson,.workspace-tag){background:var(--surface);border-color:var(--line);color:var(--fg)}
html[data-theme="dark"] :is(.ws-bottom,.ws-live){background:var(--surface-2);color:#bdd1f0}
html[data-theme="dark"] :is(.workspace-intro h1,.workspace-section-heading h2,.workspace-feature-grid h3,.ws-welcome strong,.ws-cards strong,.ws-lesson strong){color:#ecf3ff}
html[data-theme="dark"] :is(.workspace-lead,.workspace-section-heading p,.workspace-feature-grid p,.ws-welcome p,.ws-cards span,.ws-cards small,.ws-lesson small,.workspace-info){color:#b4c5df}
html[data-theme="dark"] :is(.ws-chrome,.ws-welcome,.ws-lesson){border-color:var(--line)}
html[data-theme="dark"] :is(.ws-cards>div,.ws-lesson){background:#1d2e4a}
html[data-theme="dark"] .workspace-cta{background:linear-gradient(120deg,#213e78,#152a53)}
/* Workspace brand blue needs extra contrast against a dark gradient. */
html[data-theme="dark"] .workspace-intro h1 em{color:#98b5ff}
html[data-theme="dark"] :is(.workspace-textlink,.workspace-info a){color:#a9c6ff}
html[data-theme="dark"] :is(.ws-chrome,.ws-live,.ws-welcome small,.mock-label,.mock-card>span){color:#bbd0ed}
