/* Общие элементы оформления для главной, гайдов, тренерских страниц и входа. */
html[data-theme="light"]{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark}
.home-theme{position:relative;display:flex;align-items:center;justify-content:space-around;flex:none;width:88px;height:44px;min-height:44px;padding:4px;border:1px solid var(--theme-line);border-radius:24px;background:var(--theme-ground);color:var(--theme-ink);isolation:isolate;cursor:pointer;touch-action:manipulation}
.home-theme:hover{background:var(--theme-ground);border-color:var(--theme-brand)}
.home-theme:focus-visible{outline:3px solid var(--theme-brand);outline-offset:4px}
.home-theme svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;z-index:1;pointer-events:none}
.home-theme-thumb{position:absolute;inset:4px auto 4px 4px;width:36px;border-radius:50%;background:var(--theme-paper);box-shadow:0 1px 4px #0002;transition:transform .18s ease;pointer-events:none}
.home-theme[aria-checked="true"] .home-theme-thumb{transform:translateX(42px);background:var(--theme-wash)}
.home-theme[aria-checked="false"] svg:first-of-type,.home-theme[aria-checked="true"] svg:last-of-type{color:var(--theme-brand)}
.guide-page .site-header{flex-wrap:wrap}
.guide-page .site-header .brand{margin-right:auto;min-width:0}
.auth-page{background:var(--theme-ground);color:var(--theme-ink)}
@media(max-width:560px){
  .guide-page .site-header{display:grid;grid-template-columns:minmax(0,1fr) 88px;gap:12px 16px}
  .guide-page .site-header .brand img{width:100%;max-width:200px;height:auto}
  .guide-page .site-header .guide-home,.guide-page .site-header .free-label{grid-column:1/-1;justify-self:end}
}
@media screen{
  /* Переменные старых гайдов связаны с той же палитрой, что и кабинет. */
  html[data-theme="dark"] .guide-page{--bg:var(--theme-ground);--paper:var(--theme-paper);--ink:var(--theme-ink);--muted:var(--theme-soft);--line:var(--theme-line);--accent:var(--theme-brand);--soft:var(--theme-wash);background:var(--bg);color:var(--ink)}
  html[data-theme="dark"] .guide-page .guide-sidebar,
  html[data-theme="dark"] .guide-page .guide-home,
  html[data-theme="dark"] .guide-page .free-label,
  html[data-theme="dark"] .guide-page .skip,
  html[data-theme="dark"] .guide-page #image-viewer,
  html[data-theme="dark"] .guide-page .viewer-bar{background:var(--paper);color:var(--ink);border-color:var(--line)}
  html[data-theme="dark"] .guide-page .guide-sidebar li a{color:var(--ink)}
  html[data-theme="dark"] .guide-page .guide-sidebar li a span,
  html[data-theme="dark"] .guide-page .guide-figure figcaption,
  html[data-theme="dark"] .guide-page .reference-note{color:var(--muted)}
  html[data-theme="dark"] .guide-page .guide-sidebar li a:hover,
  html[data-theme="dark"] .guide-page .guide-home:hover,
  html[data-theme="dark"] .guide-page .chapter a:not(.back-top):not(.next-section):hover,
  html[data-theme="dark"] .guide-page .owner-links a:hover{background:var(--soft);color:var(--accent);border-color:var(--accent)}
  html[data-theme="dark"] .guide-page .guide-sidebar li a[aria-current="location"],
  html[data-theme="dark"] .guide-page .guide-sidebar li a[aria-current="location"] span{background:var(--accent);color:var(--theme-on-brand);border-color:var(--accent)}
  html[data-theme="dark"] .guide-page .comparison-prompt,
  html[data-theme="dark"] .guide-page .source-case,
  html[data-theme="dark"] .guide-page .draft-note,
  html[data-theme="dark"] .guide-page .codex-note,
  html[data-theme="dark"] .guide-page .reading-error,
  html[data-theme="dark"] .guide-page .section-number{background:var(--soft);color:var(--ink);border-color:var(--line);border-left-color:var(--accent)}
  html[data-theme="dark"] .guide-page .prompt-toolbar,
  html[data-theme="dark"] .guide-page .comparison-prompt pre,
  html[data-theme="dark"] .guide-page .comparison-prompt .copy-status,
  html[data-theme="dark"] .guide-page .chapter .point-title,
  html[data-theme="dark"] .guide-page .chapter h3{color:var(--ink);border-color:var(--line)}
  html[data-theme="dark"] .guide-page .comparison-prompt .prompt-toggle,
  html[data-theme="dark"] .guide-page .reference-note a{color:var(--accent)}
  html[data-theme="dark"] .guide-page .comparison-table tr{background:var(--paper);border-color:var(--line)}
  html[data-theme="dark"] .guide-page .comparison-table tr:nth-child(even) td{background:var(--bg)}
  html[data-theme="dark"] .guide-page .chapter-actions,
  html[data-theme="dark"] .guide-page .chapter-heading,
  html[data-theme="dark"] .guide-page .reading-takeaway,
  html[data-theme="dark"] .guide-page .related-guide,
  html[data-theme="dark"] .guide-page .next-guide,
  html[data-theme="dark"] .guide-page .image-zoom{border-color:var(--line)}
  html[data-theme="dark"] .guide-page .important{background:var(--theme-warm-bg);color:var(--ink);border-color:var(--theme-warm)}
  html[data-theme="dark"] .guide-page .replacement{color:var(--theme-warm);border-color:var(--theme-warm)}
  html[data-theme="dark"] .guide-page .practice{background:var(--theme-good-bg)}
  html[data-theme="dark"] .guide-page .checks li::marker{color:var(--theme-good)}
  html[data-theme="dark"] .guide-page .source-list li::marker{color:var(--accent)}
  html[data-theme="dark"] .guide-page .finish{background:var(--soft);color:var(--ink)}
  html[data-theme="dark"] .guide-page .finish .eyebrow{color:var(--accent)}
  html[data-theme="dark"] .guide-page .download-guide,
  html[data-theme="dark"] .guide-page .chapter-actions .back-top{background:var(--soft);color:var(--accent);border-color:var(--line)}
  html[data-theme="dark"] .guide-page .button,
  html[data-theme="dark"] .guide-page .copy-prompt,
  html[data-theme="dark"] .guide-page .chapter-actions .next-section,
  html[data-theme="dark"] .guide-page .floating-toc,
  html[data-theme="dark"] .guide-page .viewer-close{background:var(--accent);color:var(--theme-on-brand);border-color:var(--accent)}
  html[data-theme="dark"] .guide-page :is(.button,.copy-prompt,.next-section,.floating-toc,.viewer-close):hover{background:var(--accent);color:var(--theme-on-brand);filter:brightness(.92)}
  html[data-theme="dark"] .guide-page :is(a,button,summary,pre):focus-visible{outline-color:var(--accent)}
  /* Скриншоты и обложки сохраняют исходные цвета и читаемость. */
  html[data-theme="dark"] .guide-page .brand{background:#fff;border-radius:8px;padding:4px 8px}
}
@media(prefers-reduced-motion:reduce){.home-theme-thumb{transition:none}}
@media print{.home-theme{display:none}}

