/* Appearance tokens keep photographs and the score preview's own colours intact. */
:root {color-scheme:light;--page-bg:#faf9f6;--page-panel:#f0efe9;--page-field:#fff;--theme-border:#d7d8d0;--theme-control:#f0f0eb;--theme-selected:#fff;--focus-ring:#1684bc;}
:root[data-theme="dark"] {color-scheme:dark;--page-bg:#111318;--page-panel:#1a1d24;--page-field:#20242d;--ink:#f1f0ec;--ink-soft:#b9bdc7;--ink-faint:#949ba9;--hairline:#ffffff26;--theme-border:#3b414d;--theme-control:#20242d;--theme-selected:#363d4a;--focus-ring:#79caff;}
html,body {background:var(--page-bg);}
.site-nav,.site-nav.is-scrolled {background:var(--page-bg);border-color:var(--hairline);}
.theme-toggle {display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;padding:0;border:1px solid var(--theme-border);border-radius:50%;background:var(--theme-control);color:var(--ink);transition:background-color 180ms,transform 180ms,border-color 180ms;}
.theme-toggle svg {width:19px;height:19px;grid-area:1 / 1;}
.theme-toggle .theme-sun {display:none;}
[data-theme="dark"] .theme-toggle .theme-moon {display:none;}
[data-theme="dark"] .theme-toggle .theme-sun {display:block;}
.theme-toggle:hover {background:var(--theme-selected);transform:translateY(-2px);}
.theme-toggle:active {transform:scale(.94);}
.language-switch {background:var(--theme-control);border-color:var(--theme-border);}
.language-switch button[aria-pressed="true"],.language-switch button:hover {background:var(--theme-selected);border-color:var(--theme-border);}
:is(button,a,input,summary,[tabindex="0"]):focus-visible {outline:3px solid var(--focus-ring);outline-offset:4px;}
.theme-toggle:focus-visible {box-shadow:0 0 0 2px var(--page-bg);}

/* Fixed light labels on the brand's filled buttons. */
.btn-light {background:#faf9f6;color:#191919;border-color:#faf9f6;}
.btn-light:hover {background:#fff;color:#ae1d2e;}
.btn-outline-light:hover {color:#191919;}
[data-theme="dark"] .hero-title em,[data-theme="dark"] .section h2 em,[data-theme="dark"] .eyebrow {color:#ff8191;}
[data-theme="dark"] .eyebrow::before {background:#ff8191;}
[data-theme="dark"] .hero-plane {background:#a82034;}
[data-theme="dark"] .hero-sub {color:var(--ink-soft);}
[data-theme="dark"] .brand span {color:#ff8191;}
[data-theme="dark"] .btn-secondary:hover {background:#f1f0ec;color:#191919;}
[data-theme="dark"] .skill-tabs {background:#20242b;border-color:var(--hairline);}
[data-theme="dark"] .skill-tab[aria-selected="true"] {background:#363d48;border-color:#525c6b;box-shadow:none;}
[data-theme="dark"] .skill-tab[aria-selected="true"] .skill-icon {color:#ff8191;}
[data-theme="dark"] .skill-active-dot,[data-theme="dark"] .skill-points li::before {background:#ff8191;}
[data-theme="dark"] .skill-panels {background:var(--page-panel);border-color:var(--hairline);}
[data-theme="dark"] .skill-name {background:#242932;}
[data-theme="dark"] .skill-detail .text-link {border-color:var(--hairline);}
[data-theme="dark"] .text-link:hover,[data-theme="dark"] .question summary:hover {color:#ff8191;}
[data-theme="dark"] .prediction-offer,[data-theme="dark"] .closing-section {background:#771c2b;color:#faf9f6;}
[data-theme="dark"] .prediction-offer .eyebrow,[data-theme="dark"] .closing-section .eyebrow {color:#faf9f6;}
[data-theme="dark"] .prediction-offer .eyebrow::before,[data-theme="dark"] .closing-section .eyebrow::before {background:#faf9f6;}
[data-theme="dark"] .trainer-window {background:#222730;color:#ecedf0;border-color:#ffffff29;box-shadow:0 18px 30px #0003;}
[data-theme="dark"] .trainer-window-top,[data-theme="dark"] .trainer-window-bottom,[data-theme="dark"] .trainer-window-body>div+div {border-color:#ffffff26;}
[data-theme="dark"] .trainer-small-label,[data-theme="dark"] .trainer-window-bottom {color:#adb5c3;}
[data-theme="dark"] .trainer-highlight {color:#201d10;background:#e3c56a;}
[data-theme="dark"] .result-lab,[data-theme="dark"] .diploma-section,[data-theme="dark"] .questions-section {background:var(--page-panel);}
[data-theme="dark"] .score-palette button {border-color:#555e6b;}
[data-theme="dark"] .score-palette button[aria-pressed="true"] {background:#353d49;border-color:#bdc8d9;}
[data-theme="dark"] .result-name-input {background:var(--page-field);border-color:#555e6b;}
[data-theme="dark"] .result-name-input::placeholder {color:#adb4c2;}
[data-theme="dark"] .result-lab-note,[data-theme="dark"] .result-estimate-note {color:#adb4c2;}
[data-theme="dark"] .result-download-status {color:#94dca8;}
[data-theme="dark"] .btn-ink {background:#e5e8ed;color:#191d23;border-color:#e5e8ed;}
[data-theme="dark"] .btn-ink:hover {background:#fff;color:#191d23;}
[data-theme="dark"] .journey-section {background:#11151c;}
[data-theme="dark"] .journey-section h2 em {color:#c9dcef;}
[data-theme="dark"] .journey-section .eyebrow {color:#a9c9e5;}
[data-theme="dark"] .diploma {background:#24272c;border-color:#827250;color:#f2e9d7;box-shadow:0 20px 35px #0002;}
[data-theme="dark"] .diploma-subtitle,[data-theme="dark"] .diploma-course,[data-theme="dark"] .diploma-sample {color:#c6bda9;}
[data-theme="dark"] .diploma-seal {color:#ddc17f;border-color:#b39d6e;}
[data-theme="dark"] .mentor-section {background:var(--page-bg);}
[data-theme="dark"] .mentor-glass {background:linear-gradient(145deg,#55534c66,#292c3480 50%,#716d6352);border-color:#ffffff40;box-shadow:0 24px 56px #0003,inset 0 1px 2px #ffffff40;}
[data-theme="dark"] .mentor-glass::before,[data-theme="dark"] .mentor-glass-image {border-color:#ffffff35;}
[data-theme="dark"] .mentor-glass-caption {background:linear-gradient(135deg,#1e222cde,#242934c4);border-color:#ffffff30;color:#f5f3ef;}
[data-theme="dark"] .mentor-glass-caption div>span {color:#c2c7d0;}
[data-theme="dark"] .question,[data-theme="dark"] .questions-list {border-color:#ffffff29;}
[data-theme="dark"] .question summary>span {color:#ff8191;}

/* On a phone the main Telegram action is in the hero; keep the header uncluttered. */
.nav-actions {gap:10px;}
@media(max-width:1100px) and (min-width:901px) {.nav-links{gap:13px}.nav-links a{font-size:12px}.nav-actions{gap:7px}.nav-cta{padding-inline:13px}.language-switch button{width:29px}.theme-toggle{width:40px;height:40px;flex-basis:40px;}}
@media(max-width:600px) {
 .nav-actions>.nav-cta {display:none;}
 .site-nav {gap:8px;padding-inline:20px;}
 .nav-actions {gap:8px;}
 .theme-toggle {width:42px;height:42px;flex-basis:42px;}
 .language-switch button {width:32px;height:38px;}
 .language-switch button span {font-size:22px;}
 .brand {font-size:17px;}
 .question summary {min-height:56px;}
}
@media(max-width:360px) {.site-nav{padding-inline:14px}.brand{font-size:16px}.nav-actions{gap:6px}.language-switch button{width:30px}.theme-toggle{width:40px;height:40px;flex-basis:40px;}}

/* Круговая смена темы (View Transitions API) */
@keyframes themeIconSpin{from{transform:rotate(-110deg) scale(.4);opacity:0}to{transform:none;opacity:1}}
html.theme-transition .theme-toggle svg{animation:themeIconSpin 520ms cubic-bezier(.2,.8,.2,1)}

/* Во время волны отключаем цветовые transition у элементов, иначе внутри круга цвета «доезжают» и видны серые полутона */
html.theme-transition *,html.theme-transition *::before,html.theme-transition *::after{transition:none!important}
