html[data-theme=light]{color-scheme:light}
html[data-theme=dark]{color-scheme:dark;
 --colorNeutralBackground1:#171e25;--colorNeutralBackground1Hover:#26333e;--colorNeutralBackground1Pressed:#30414e;--colorNeutralBackground1Selected:#2a3945;
 --colorNeutralBackground2:#0e1419;--colorNeutralBackground2Hover:#202a33;--colorNeutralBackground2Pressed:#30414e;--colorNeutralBackground2Selected:#26333e;
 --colorNeutralBackground3:#202a33;--colorNeutralBackground3Hover:#2a3945;--colorNeutralBackground4:#293640;--colorNeutralBackground5:#26333e;--colorNeutralBackground6:#30414e;--colorNeutralBackground8:#1a232c;
 --colorNeutralBackgroundDisabled:#202a33;--colorNeutralBackgroundAlpha:rgba(0,0,0,.6);--colorNeutralBackgroundAlpha2:rgba(23,30,37,.94);--colorBackgroundOverlay:rgba(0,0,0,.65);
 --colorNeutralForeground1:#e9eff4;--colorNeutralForeground1Hover:#fff;--colorNeutralForeground1Pressed:#fff;--colorNeutralForeground1Selected:#fff;
 --colorNeutralForeground2:#c7d1da;--colorNeutralForeground2Hover:#e9eff4;--colorNeutralForeground2Pressed:#e9eff4;--colorNeutralForeground2Selected:#fff;
 --colorNeutralForeground3:#a9b6c2;--colorNeutralForeground3Hover:#c7d1da;--colorNeutralForeground4:#98a8b6;--colorNeutralForeground5:#a9b6c2;--colorNeutralForegroundDisabled:#748491;
 --colorNeutralForegroundOnBrand:#fff;--colorNeutralStroke1:#3a4a58;--colorNeutralStroke1Hover:#53697a;--colorNeutralStroke2:#2c3945;--colorNeutralStroke3:#2a3945;--colorNeutralStrokeAccessible:#91a4b3;--colorNeutralStrokeDisabled:#34424e;
 --colorSubtleBackgroundHover:#26333e;--colorSubtleBackgroundPressed:#30414e;--colorSubtleBackgroundSelected:#2a3945;
 --colorBrandBackground:#006b46;--colorBrandBackgroundHover:#008557;--colorBrandBackgroundPressed:#005c3c;--colorBrandBackgroundSelected:#007e51;
 --colorBrandBackground2:#143c2c;--colorBrandBackground2Hover:#1a4c37;--colorBrandBackground2Pressed:#205c43;
 --colorBrandForeground1:#6bd9a3;--colorBrandForeground2:#80e2b3;--colorBrandForegroundLink:#80e2b3;--colorBrandForegroundLinkHover:#a4efca;--colorBrandForegroundLinkPressed:#6bd9a3;
 --colorBrandStroke1:#44be89;--colorBrandStroke2:#317f5d;--colorCompoundBrandBackground:#007e51;--colorCompoundBrandForeground1:#6bd9a3;--colorCompoundBrandStroke:#44be89;
 --colorStatusDangerBackground1:#442126;--colorStatusDangerForeground1:#ffb3bb;--colorStatusDangerBorder1:#a85460;
 --colorStatusSuccessBackground1:#173d2d;--colorStatusSuccessForeground1:#91dda9;--colorStatusSuccessBorder1:#4d9268;
 --colorStatusWarningBackground1:#3d321b;--colorStatusWarningForeground1:#f2d18c;--colorStatusWarningBorder1:#a0874a;
 --colorPaletteGreenForeground1:#91dda9;--colorPaletteRedForeground1:#ffb3bb;
 --colorPaletteGreenForeground2:#91dda9;--colorPaletteTealForeground2:#72d1cf;--colorPaletteGoldForeground2:#e8c37c;
 --shadow4:0 2px 5px rgba(0,0,0,.24),0 0 0 1px rgba(224,238,248,.025);--shadow16:0 8px 24px rgba(0,0,0,.38);--shadow28:0 14px 40px rgba(0,0,0,.48);
 --radarCanvas:var(--colorNeutralBackground2);--radarPanel:var(--colorNeutralBackground1);--radarRaised:var(--colorNeutralBackground3);--radarInset:#11191f;
 --primary:#007652;--primary-ink:#ffffff;--accent-ink:#80e2b3;--brand-red:#ff9da8;--selection:#143c2c;
}
html[data-theme=dark] body{background:var(--colorNeutralBackground2);color:var(--colorNeutralForeground1)}
html[data-theme=dark] .paper-snippet,html[data-theme=dark] .abstract,html[data-theme=dark] .guru-message,html[data-theme=dark] .guru-message-content{color:var(--colorNeutralForeground1)}
html[data-theme=dark] :is(.practice-chat,.guru-scroll-bottom,.wb-button,.wb-task-form textarea,.wb-search-status,.wb-semantic-results>.wb-summary,.wb-search-challenges,.wb-case,.wb-choice-list>button,.wb-challenge-cards article,.wb-evidence-layout,.wb-matrix-scroll,.wb-timeline-scroll,.wb-flow-scroll){background:var(--colorNeutralBackground1);color:var(--colorNeutralForeground1);border-color:var(--colorNeutralStroke2)}
html[data-theme=dark] :is(.wb-matrix th:first-child,.wb-timeline th:first-child){background:var(--colorNeutralBackground1);color:var(--colorNeutralForeground1)}
html[data-theme=dark] :is(.guru-send,.practice-chat-launch){background:var(--colorBrandBackground);color:var(--colorNeutralForegroundOnBrand)}
html[data-theme=dark] .opportunity-modes button[aria-pressed=true]{background:var(--colorBrandBackground2);color:var(--colorBrandForeground1)}
html[data-theme=dark] :is(input,textarea,select){color-scheme:dark}
html[data-theme=dark] :is(.gate-field input,.login-card input,.account-form input){background:var(--colorNeutralBackground1);color:var(--colorNeutralForeground1);border-color:var(--colorNeutralStroke1)}
html[data-theme=dark] .flag,html[data-theme=dark] .brand-mark,html[data-theme=dark] .library-cover img{color-scheme:light}
/* Поверхности: фон → панели → приподнятые элементы; поля утоплены в панель. */
html.fluent-ui[data-theme=dark] body .sheet{background:var(--radarCanvas)}
html.fluent-ui[data-theme=dark] :is(.app-header,.knowledge-tabs,.sidebar){background:var(--radarPanel);border-color:var(--colorNeutralStroke2)}
html.fluent-ui[data-theme=dark] :is(.list-panel,.library-card,.library-detail,.pp-side section,.related,.overview-section,.overview-viz,.dialog,.login-card,.practice-chat){background:var(--radarPanel);border-color:var(--colorNeutralStroke2)}
html.fluent-ui[data-theme=dark] :is(.free-compose,.guru-compose,.theme-popover,.account-form .theme-choices){background:var(--radarRaised);border-color:var(--colorNeutralStroke1)}
html.fluent-ui[data-theme=dark] :is(.input,.library-search,.library-editions,.gate-field input,.login-card input,.account-form input){background:var(--radarInset);border-color:var(--colorNeutralStroke1)}
html.fluent-ui[data-theme=dark] :is(.free-compose textarea,.guru-compose textarea){background:transparent;color:var(--colorNeutralForeground1)}
html.fluent-ui[data-theme=dark] .pp-side section{border:1px solid var(--colorNeutralStroke2)}
html.fluent-ui[data-theme=dark] .library-card:hover{background:var(--radarRaised)}
html.fluent-ui[data-theme=dark] .library-card.selected{background:var(--colorBrandBackground2)}
html.fluent-ui[data-theme=dark] .library-detail{border-left-color:var(--colorNeutralStroke1)}
.theme-menu{position:relative}
.theme-menu summary{display:flex;align-items:center;justify-content:center;width:32px;height:32px;list-style:none;cursor:pointer;font-size:24px;color:var(--colorNeutralForeground2);border-radius:var(--borderRadiusMedium)}
.theme-menu summary::-webkit-details-marker{display:none}
.theme-menu summary:hover{background:var(--colorNeutralBackground3Hover)}
.theme-popover{position:absolute;right:0;top:calc(100% + 8px);z-index:70;min-width:180px;padding:12px;background:var(--colorNeutralBackground1);color:var(--colorNeutralForeground1);border:1px solid var(--colorNeutralStroke2);border-radius:var(--borderRadiusXLarge);box-shadow:var(--shadow16)}
.theme-choices{margin:0;padding:0;border:0;min-width:0}
.theme-choices legend{padding:0;margin-bottom:8px;font-size:var(--fontSizeBase200);color:var(--colorNeutralForeground2)}
.theme-choices label{display:flex;align-items:center;gap:8px;padding:7px 4px;font-size:var(--fontSizeBase300);cursor:pointer;white-space:nowrap}
.theme-choices input{width:16px;height:16px;margin:0;accent-color:var(--colorBrandForeground1)}
.account-form .theme-choices{padding:12px 0;border-block:1px solid var(--colorNeutralStroke2)}
.account-form .theme-choices label{display:inline-flex;margin-right:8px}
@media(max-width:760px){#theme-picker{display:none}.account-form .theme-choices label{min-height:44px}}
