@layer accessibility {
/* Общие стили */
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,[tabindex]:focus-visible {outline:3px solid var(--forest-light);outline-offset:4px}
[hidden] {display:none}
.sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.sidebar button:focus-visible,.sidebar a:focus-visible {outline-color:#e3ead4}
.skip-link {position:fixed;left:12px;top:-100px;background:var(--paper);padding:12px 18px;z-index:2000;border:2px solid var(--forest);border-radius:8px}
.skip-link:focus {top:12px}
@media(prefers-reduced-motion:reduce) {
html {scroll-behavior:auto}
*,*:before,*:after {animation:none;transition:none;scroll-behavior:auto}
.intro-video {display:none}
.intro-overlay:after {background:#173f36d4}
.chapter-tile:hover,.chapter-tile:hover .chapter-art,.week-section-card:hover,.journey-node:hover,.view-art-header:hover .view-art {transform:none}
}
@media print {
.sidebar,.topbar,.actions,.button,.intro-overlay,.toast,.task-actions,.chapter-grid {display:none!important}
.app-shell {display:block}
.main {padding:0}
.panel,.route-zone {break-inside:avoid;box-shadow:none}
body {background:white}
.ritm-markdown table {min-width:0}
.thread-hero {min-height:250px}
.thread-hero-copy {width:60%}
}
@media(prefers-reduced-motion:reduce) {
.chapter-tile:hover,.chapter-tile:hover .chapter-art,.week-section-card:hover,.journey-node:hover,.view-art-header:hover .view-art,.button:hover,.button:active {transform:none}
*,*:before,*:after {animation:none;transition:none;scroll-behavior:auto}
}
.intro-play:focus-visible,.intro-chapter:focus-visible,.intro-scrubber:focus-visible {outline:2px solid #f4f0e6;outline-offset:4px}
@media(prefers-reduced-motion:reduce) {
.intro-play,.intro-chapter,.intro-scrubber {transition:none}
.intro-chapter:hover,.intro-play:hover {transform:none}
.intro-poster {transform:none}
.intro-content {scroll-behavior:auto}
}
@media(prefers-reduced-motion:reduce) {
.boot-loading-mark,.state-card[data-state="busy"] .state-icon:before {animation:none}
.boot-chapter-graphic {transition:none}
.asset-fallback:after {transition:none}
}
.import-busy[hidden] {display:none}
.bootstrap-panel .button:focus-visible,.state-card .button:focus-visible,.offline-banner .button:focus-visible {outline:3px solid var(--forest);outline-offset:4px}
@media(prefers-reduced-motion:reduce) {
.bootstrap-panel[data-state="loading"] .bootstrap-status:before,.import-busy:before,.button[aria-busy="true"]:before {animation:none}
}
.week-calendar:focus-visible {outline:2px solid var(--forest-light);outline-offset:5px}
@media print {
.week-cover {min-height:230px;break-inside:avoid}
.week-cover-copy {padding:20px}
.week-cover-title {font-size:42px}
.week-cover-stage {padding:10px}
.week-cover-materials {display:none}
}
@media(prefers-reduced-motion:reduce) {
.week-cover.is-entering .week-cover-copy,.week-cover.is-entering .week-cover-art,.week-cover.is-entering .week-cover-thread path {animation:none;transform:none}
}

/* Цвет и типографика */
html[data-theme] button:focus-visible,
html[data-theme] a:focus-visible,
html[data-theme] input:focus-visible,
html[data-theme] select:focus-visible,
html[data-theme] textarea:focus-visible,
html[data-theme] summary:focus-visible,
html[data-theme] [tabindex]:focus-visible { outline-color: #bbd7ff; }
html[data-theme] .sidebar button:focus-visible,
html[data-theme] .sidebar a:focus-visible { outline-color: #bbd7ff; }
html[data-theme] .skip-link { background: #10151e; color: #fff; border-color: #bbd7ff; }
@media screen {
html[data-theme] .week-edit-history :is(summary, pre):focus-visible {
    outline: 2px solid #bbd7ff;
    outline-offset: -3px;
  }
}
@media(prefers-reduced-motion:reduce) {
html[data-theme] .chapter-tile:hover { transform: none; }
}
@media print {
html[data-theme] { --bg: #fff; --paper: #fff; --ink: #111; --muted: #444; --line: #bbb; color-scheme: light; }
html[data-theme] body,
  html[data-theme] .main,
  html[data-theme] .panel,
  html[data-theme] .reader-content,
  html[data-theme] .ritm-markdown { color: #111; background: #fff; }
html[data-theme] h1,
  html[data-theme] h2,
  html[data-theme] h3,
  html[data-theme] h4 { color: #111; }
}

/* Фон */
@media(prefers-reduced-motion:reduce) {
html[data-theme] .thread-hero-art {animation:none;transform:none;will-change:auto}
}
@media(prefers-reduced-motion:reduce) {
.oled-intro-photo {animation:none;transform:none}
}
@media print {
.ambient-scene {display:none!important}
html[data-theme] #app * {color:#111!important;text-shadow:none!important;box-shadow:none!important}
html[data-theme] .panel,html[data-theme] .panel *,html[data-theme] .reader-content,html[data-theme] .reader-content *,html[data-theme] .week-day,html[data-theme] .week-day * {background:#fff!important;border-color:#999!important}
}

/* Движение */
@media (prefers-reduced-motion:reduce) {
html[data-theme] :is(.motion-aura,.motion-orbits) { display: none; }
html[data-theme] :is(.thread-hero-art,.oled-intro-photo,.motion-reactive) { translate: none; rotate: none; }
html[data-theme]::view-transition-group(*),
  html[data-theme]::view-transition-old(*),
  html[data-theme]::view-transition-new(*) { animation: none; }
}
@media print {
html[data-theme] :is(.motion-aura,.motion-orbits,.motion-progress),
  html[data-theme] .motion-reactive:before { display: none !important; }
html[data-theme] :is(.motion-reactive,.thread-hero-art,.oled-intro-photo) { transform: none !important; translate: none !important; rotate: none !important; animation: none !important; }
}

/* Читаемость */
html[data-theme] .button:is(:hover,:focus-visible):not(:disabled) { background: #294769; border-color: #c1dcff; color: #fff; }
html[data-theme] .button.primary:is(:hover,:focus-visible):not(:disabled) { background: #bcd9ff; border-color: #e6f1ff; color: #0b1728; }
html[data-theme] .button.quiet:is(:hover,:focus-visible):not(:disabled) { color: #fff; background: #263d58; border-color: #adcbee; }
html[data-theme] .button.danger:is(:hover,:focus-visible):not(:disabled) { color: #180d0b; background: #ffb69d; border-color: #ffd7c7; }
html[data-theme] :is(button,a,input,select,textarea,summary,[tabindex]):focus-visible { outline: 3px solid #c3ddff; outline-offset: 4px; }
html[data-theme] .button.danger:is(:hover,:focus-visible) .action-hint { color: #4d2117; }
html[data-theme] .button:is(:hover,:focus-visible) .action-hint,
html[data-theme] .button[aria-busy="true"] .action-hint { opacity: 1; translate: 0 0; }
html[data-theme] .thread-hero-actions .button.secondary:is(:hover,:focus-visible) { color: #fff; background: #294769; border-color: #c1dcff; }
html[data-theme] .table-scroll:focus-visible,
html[data-theme] .task-table-scroll:focus-visible { outline: 3px solid #c3ddff; outline-offset: 4px; }
@media (prefers-reduced-motion:reduce) {
html[data-theme] :is(.action-label,.action-hint) { transition: none; translate: none; }
}
@media print {
html[data-theme] .table-scroll,
  html[data-theme] .task-table-scroll { max-height: none; overflow: visible; width: 100%; border: 1px solid #777; box-shadow: none; }
html[data-theme] .table-scroll table,
  html[data-theme] .task-table { min-width: 0; width: 100%; font-size: 9pt; color: #111; background: #fff; }
html[data-theme] .table-scroll :is(th,td),
  html[data-theme] .task-table :is(th,td) { min-width: 0; max-width: none; padding: 6pt; color: #111 !important; background: #fff !important; border-color: #777; }
html[data-theme] .table-scroll th,
  html[data-theme] .task-table th { position: static; color: #000 !important; background: #e8e8e8 !important; border-bottom: 2px solid #444; }
html[data-theme] .table-scroll thead,
  html[data-theme] .task-table thead { display: table-header-group; }
html[data-theme] .table-scroll tr,
  html[data-theme] .task-table tr { break-inside: avoid; }
html[data-theme] .task-table .task-title { min-width: 0; max-width: none; }
html[data-theme] .action-hint { opacity: 1; translate: none; }
html[data-theme] :is(.table-caption,.table-instruction,.task-meta,.task-priority,.task-status) { color: #111 !important; }
}

/* Трекер */
html[data-theme] .tracker-table-wrap:focus-visible { outline: 3px solid #c3ddff; outline-offset: 4px; border-color: #9fbee8; }
html[data-theme] .tracker-root :is(.tracker-catalog,.tracker-history) > summary:focus-visible { outline: 3px solid #c3ddff; outline-offset: 4px; }
@media print {
@page { size: A4 portrait; margin: 12mm; }
html[data-theme] .tracker-root { font-size: 10pt; }
html[data-theme] .tracker-root :is(.tracker-toolbar,.tracker-actions,.tracker-print-status,.tracker-trend-toolbar,.tracker-journal-toolbar,.tracker-journal-more,.tracker-catalog) { display: none !important; }
html[data-theme] .tracker-root > .panel { padding: 10pt; margin-bottom: 10pt; break-inside: auto; }
html[data-theme] .tracker-journal-print-summary { display: block; margin: 0 0 8pt; color: #111 !important; font-weight: 650; }
html[data-theme] .tracker-root :is(.tracker-summary-card,.tracker-catalog,.tracker-catalog-card,.tracker-category-row,.tracker-log-row,.tracker-history,.tracker-run-latest,.tracker-run-feedback,.tracker-run-record-pill) { color: #111 !important; background: #fff !important; border-color: #888; box-shadow: none; break-inside: avoid; }
html[data-theme] .tracker-root :is(.tracker-intro,.tracker-section-hint,.tracker-catalog-status,.tracker-log-row > p,.tracker-history > :not(summary),.tracker-run-latest > strong,.tracker-run-feedback > p) { color: #222 !important; background: #fff !important; }
html[data-theme] .tracker-table-wrap .tracker-table { min-width: 0; width: 100%; table-layout: fixed; }
html[data-theme] .tracker-table-wrap .tracker-table :is(th,td) { min-width: 0; max-width: none; overflow-wrap: anywhere; }
html[data-theme] .tracker-table-wrap .tracker-trend-table { min-width: 0 !important; width: 100%; table-layout: fixed; }
html[data-theme] .tracker-table-wrap .tracker-trend-table :is(th,td) { min-width: 0 !important; max-width: none; }
html[data-theme] .tracker-plan-table :is(th,td):last-child { display: none; }
html[data-theme] .tracker-plan-table :is(th,td):first-child { width: 25%; }
html[data-theme] .tracker-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
html[data-theme] .tracker-catalog-grid,
  html[data-theme] .tracker-category-list { grid-template-columns: minmax(0,1fr); }
html[data-theme] .tracker-transfer-choice,
  html[data-theme] .tracker-transfer-note { color: #111 !important; background: #fff !important; border-color: #777; }
}

/* Переходы */
html[data-theme] .sidebar .nav-item:is(:hover,:focus-visible) { color:#fff; background:#ffffff12; }
html[data-theme] .kinetic-action.has-action-hint:is(:hover,:focus-visible):before { transform:scale(34); }
html[data-theme] .chapter-tile:is(:hover,:focus-visible) { background:linear-gradient(145deg,#20283a,#0a0d14 76%); border-color:#a8bfff78; translate:0 -5px; }
html[data-theme] .chapter-tile:is(:hover,:focus-visible):after { scale:1.18; translate:-8% 7%; border-color:#ffffff80; }
@media (prefers-reduced-motion:reduce) {
html[data-theme] :is(.thread-hero-title,.chapter-heading,.view-title-copy h1) { animation:none; clip-path:none; }
html[data-theme] :is(.chapter-tile,.chapter-tile:after,.kinetic-action:before,.thread-hero-art) { transition:none; translate:none; scale:none; }
}
@media print {
html[data-theme] .main { width:100%; max-width:none; padding:0; }
html[data-theme] .sidebar,
  html[data-theme] .topbar,
  html[data-theme] .thread-hero-marks,
  html[data-theme] .thread-hero-stage-label { display:none!important; }
html[data-theme] :is(.panel,.view-art-header,.week-cover) { box-shadow:none; }
}

/* Рабочие разделы */
@media screen {
html[data-theme] .field :is(input,select,textarea):focus-visible {
    outline: 2px solid var(--work-focus); outline-offset: 3px; border-color: #b9d3f7; background: #151e2c;
  }
html[data-theme] .button:is(:hover,:focus-visible):not(:disabled) { background: #2a3b55; border-color: #b4cff4; color: #fff; }
html[data-theme] .button.primary:is(:hover,:focus-visible):not(:disabled) { background: #bfd6ff; color: #081326; border-color: #e8f0ff; }
html[data-theme] .button.danger:is(:hover,:focus-visible):not(:disabled) { background: #ffc0aa; color: #2a1010; border-color: #ffe4d9; }
html[data-theme] .button:focus-visible { outline: 3px solid var(--work-focus); outline-offset: 4px; }
}
@media (prefers-reduced-motion:reduce) {
html[data-theme] :is(.button,.field input,.field select,.field textarea,.tracker-catalog-card,.tracker-table-wrap) { transition: none; scroll-behavior: auto; }
html[data-theme] .button:is(:hover,:active) { transform: none; }
}

/* История */
@media (prefers-reduced-motion:reduce) {
.time-strata :is(.strata-float,.strata-plate) { animation:none; }
.strata-stack { transition:none; }
}
@media print {
.time-strata { display:none!important; }
}

/* Меню */
@media screen {
html[data-theme] .sidebar-foot .menu-toggle:is(:hover,:focus-visible) {
    color:#fff; background:#274ae8; border-color:#8ca4ff;
  }
html[data-theme] .site-menu-panel .menu-close:is(:hover,:focus-visible) { background:#2d4361; border-color:#c3d8f7; }
.menu-panel-item:is(:hover,:focus-visible) { background:#d8e4f4; }
.menu-panel-item:is(:hover,:focus-visible) .menu-panel-arrow { color:#1d3fd7; transform:translateX(3px); }
.menu-panel-item:focus-visible { outline:3px solid #284de5; outline-offset:-3px; }
html[data-theme] .menu-panel-actions .button:is(:hover,:focus-visible) { background:#253b5c; color:#fff; border-color:#a2bfeb; }
}
@media (prefers-reduced-motion:reduce) {
.site-menu-panel *,.menu-toggle-mark { animation:none; transition:none; }
}
@media print {
.site-menu-panel,.menu-toggle { display:none!important; }
}

/* Главная */
@media screen {
html[data-theme] .sidebar-foot .reference-header-action:is(:hover,:focus-visible) { color:#fff; background:#1a2ffb; border-color:#98a6ff; }
html[data-theme] .sidebar-foot .reference-header-action:focus-visible { outline:3px solid #d6e6ff; outline-offset:5px; }
html[data-theme] .reference-scroll:focus-visible { outline:2px solid #c5d9ff; outline-offset:6px; }
html[data-theme] .reference-intro-actions .reference-pill:is(:hover,:focus-visible) {
    color:#fff; border-color:#aab5ff; background:#f0f1fa;
  }
html[data-theme] .reference-intro-actions .reference-pill.secondary:is(:hover,:focus-visible) { color:#10141b; border-color:#ffbba4; background:#191d27; }
html[data-theme] .reference-intro-actions .reference-pill:is(:hover,:focus-visible):before { transform:translateX(2em) scale(100); }
html[data-theme] .reference-intro-actions .reference-pill:is(:hover,:focus-visible):after { translate:0 -50%; opacity:1; }
html[data-theme] .reference-intro-actions .reference-pill:is(:hover,:focus-visible) :is(.action-label,.action-hint) { translate:-8px 0; }
html[data-theme] .reference-intro-actions .reference-pill:focus-visible { outline:3px solid #d9e6ff; outline-offset:5px; }
}
html[data-theme][data-ambient-motion="off"] .reference-intro-actions .reference-pill:is(:hover,:focus-visible) :is(.action-label,.action-hint) { translate:none; }
@media (prefers-reduced-motion:reduce) {
html[data-theme] .reference-hero *,html[data-theme] .reference-hero *:after,
  html[data-theme] .reference-introduction *,html[data-theme] .reference-introduction *:before,
  html[data-theme] .reference-introduction *:after { transition:none; animation:none; }
html[data-theme] .reference-intro-actions .reference-pill:is(:hover,:focus-visible) :is(.action-label,.action-hint) { translate:none; }
}
@media print {
.reference-hero-stage,.reference-intro-actions { display:none!important; }
.reference-hero,.reference-introduction { margin:0 0 18px!important; color:#111!important; }
.reference-hero-intro,.reference-intro-detail { display:block; }
.reference-intro-title { font-size:30px!important; }
.reference-intro-title > span { display:inline; margin:0!important; padding:0; }
}
@media screen and (prefers-reduced-motion: no-preference) and (forced-colors: none) {
html[data-theme][data-ambient-motion="on"] .reference-hero-stage .home-cover-film.is-playing {
    display:block; position:absolute; z-index:-1; inset:0; width:100%; height:100%;
    object-fit:cover; object-position:50% 56%; opacity:.88;
    filter:saturate(.58) contrast(1.03); scale:1.02; pointer-events:none;
  }
html[data-theme][data-ambient-motion="on"] .reference-hero-stage:has(.home-cover-film.is-playing) .thread-hero-art {
    visibility:hidden;
  }
}

/* Карточки разделов */
@media screen {
html[data-theme] .section-card:focus-visible { outline:2px solid #bdd2ff; outline-offset:9px; }
html[data-theme][data-ambient-motion="on"] .section-card:focus-visible .section-card-title { transform:translateX(1.1em); }
html[data-theme][data-ambient-motion="on"] .section-card:focus-visible .section-card-arrow { transform:translateX(0); opacity:1; }
}
@media (prefers-reduced-motion:reduce) {
.section-card,.section-card * { animation:none; transition:none; }
.section-card-landscape { transform:none; }
.section-card-motif { translate:none; }
.section-card-title { transform:none; }
.section-card-arrow { display:none; }
}
@media print {
.section-card-art,.section-card-arrow { display:none!important; }
.section-grid { display:block; }
.section-card { display:block; width:100%; padding:12px 0; margin:12px 0; border:0; background:none; break-inside:avoid; }
.section-card-meta,.section-card-top,.section-card-copy { display:block; }
}

/* Итоги */
@media screen {
.reference-finale-open:hover .reference-finale-pill,.reference-finale-open:focus-visible .reference-finale-pill { color:#fff; border-color:var(--finale-accent); }
.reference-finale-open:hover .reference-finale-point,.reference-finale-open:focus-visible .reference-finale-point { transform:scale(110); }
.reference-finale-open:hover .reference-finale-action,.reference-finale-open:focus-visible .reference-finale-action { transform:translateX(-3px); }
.reference-finale-open:hover .reference-finale-arrow,.reference-finale-open:focus-visible .reference-finale-arrow { transform:translateX(0); }
.reference-finale-open:hover .is-underlined:after,.reference-finale-open:focus-visible .is-underlined:after { transform:scaleX(1); }
.reference-finale-open:focus-visible { outline:2px solid #c2d9ff; outline-offset:8px; border-radius:12px; }
.reference-finale-back:hover,.reference-finale-back:focus-visible { background:#253cf3; }
.reference-finale-back:hover .reference-finale-back-arrow:not(.is-next),.reference-finale-back:focus-visible .reference-finale-back-arrow:not(.is-next) { transform:translateY(-120%); }
.reference-finale-back:hover .reference-finale-back-arrow.is-next,.reference-finale-back:focus-visible .reference-finale-back-arrow.is-next { transform:translateY(0); }
.reference-finale-base :is(button):focus-visible { outline:2px solid #1a2ffb; outline-offset:6px; }
@media (prefers-reduced-motion:reduce) {
.reference-finale *,.reference-finale *:before,.reference-finale *:after { animation:none; transition:none; }
}
}
@media print {
.reference-finale { display:none!important; }
}

/* Неделя */
@media screen {
html[data-theme] .reference-week-action:is(:hover,:focus-visible) { color:#fff; border-color:#a6b5ff; }
html[data-theme] .reference-week-action.is-secondary:is(:hover,:focus-visible) { color:#11151c; border-color:#ffc9b6; }
html[data-theme] .reference-week-action:is(:hover,:focus-visible):before { transform:scale(100); }
html[data-theme] .reference-week-action:is(:hover,:focus-visible) .reference-week-action-arrow { translate:0 3px; }
html[data-theme] .reference-week-action:focus-visible { outline:3px solid #c9dfff; outline-offset:5px; }
html[data-theme] .reference-week-cover .week-cover-art[hidden] { display:none; }
@media (prefers-reduced-motion:reduce) {
.reference-week-cover *,.reference-week-cover *:before,.reference-week-cover *:after { animation:none; transition:none; }
}
}
@media print {
html[data-theme] .week-cover.reference-week-cover { display:block; min-height:0; padding:0; margin:0 0 18px; border:0; border-radius:0; background:none; box-shadow:none; overflow:visible; }
html[data-theme] .reference-week-cover .week-cover-copy { display:block; padding:0; margin:0; }
html[data-theme] .reference-week-cover .week-cover-title { margin:0 0 8px; padding:0; color:#000; font-size:30px; line-height:1.1; }
html[data-theme] .reference-week-cover .week-cover-kicker,
  html[data-theme] .reference-week-cover .week-cover-description,
  html[data-theme] .reference-week-cover .week-cover-stage,
  html[data-theme] .reference-week-cover .week-cover-actions,
  html[data-theme] .reference-week-cover > :is(.motion-aura,.motion-orbits) { display:none!important; }
html[data-theme] .reference-week-range { color:#000; font-size:11px; }
}

/* Содержание разделов */
@media screen {
.reference-section-jump:is(:hover,:focus-visible) { color:#fff; border-color:#788dff; }
.reference-section-jump:is(:hover,:focus-visible):before { transform:scale(90); }
.reference-section-jump:is(:hover,:focus-visible) .reference-section-jump-label { transform:translateX(-7px); }
.reference-section-jump:is(:hover,:focus-visible) .reference-section-jump-arrow { opacity:1; transform:translateY(0); }
.reference-section-jump:focus-visible { outline:3px solid #bdd7ff; outline-offset:5px; }
@media (prefers-reduced-motion:reduce) {
.reference-section-heading *, .reference-section-heading *:before { transition:none; animation:none; }
.reference-section-jump:is(:hover,:focus-visible) .reference-section-jump-label { transform:none; }
}
}
@media screen and (forced-colors: none) {
html[data-theme] [data-view="tracker"] .reference-section-heading {
    --tracker-crop: right 55%;
    --tracker-shade: linear-gradient(90deg, #090c10 2%, #090c10ed 27%, #090c10ba 47%, transparent 75%);
    background-image: url('../assets/tracker-track.webp');
    background-size: cover;
    background-position: var(--tracker-crop);
    background-repeat: no-repeat;
  }
html[data-theme] [data-view="tracker"] .reference-section-heading::after {
    content: '';
    display: block;
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: var(--tracker-shade);
    pointer-events: none;
  }
}
@media screen and (forced-colors: none) and (prefers-reduced-motion: no-preference) {
html[data-theme][data-ambient-motion="on"] .tracker-cover-film {
    display: block;
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    object-position: var(--tracker-crop);
    pointer-events: none;
    opacity: 0;
    transition: opacity 360ms ease-out;
  }
html[data-theme][data-ambient-motion="on"] .tracker-cover-film.is-playing { opacity: 1; }
}
@media screen and (max-width: 650px) {
@media (forced-colors: none) {
html[data-theme] [data-view="tracker"] .reference-section-heading {
      --tracker-crop: 71% center;
      --tracker-shade: linear-gradient(0deg, #090c10 0%, #090c10f5 32%, #090c1000 90%),
                       linear-gradient(90deg, #090c10e6, #090c1070 66%, transparent);
    }
}
}
@media print {
html[data-theme] .view-art-header.reference-section-heading {
    display:block; min-height:0; margin:0 0 16px; padding:0 0 10px;
    border:0; border-bottom:1px solid #aaa; border-radius:0; background:none; color:#000; box-shadow:none;
  }
.reference-section-heading:before,.reference-section-heading:after,
  .reference-section-heading .reference-section-top,.reference-section-heading .reference-section-jump { display:none!important; }
html[data-theme] .reference-section-heading .view-title-copy { max-width:none; }
html[data-theme] .reference-section-heading .view-title-copy h1 { color:#000; font-size:26px; line-height:1.15; margin:0; letter-spacing:-.02em; }
.reference-section-summary { margin:7px 0; color:#000; }
.reference-section-count { display:inline; font-size:14px; margin-right:6px; }
.reference-section-count-label { display:inline; color:#222; font-size:11px; }
.reference-section-description { margin:8px 0 0; color:#222; font-size:11px; }
}

/* Элементы управления */
@media (prefers-reduced-motion:reduce) {
html[data-theme] :is(.interface-samples-summary:after,.button[aria-busy="true"]:after) { animation: none; transition: none; }
}
@media print {
html[data-theme] .interface-samples { display: none !important; }
}

/* Состояния задач */
@media print {
html[data-theme] :is(.task-state-summary,.tracker-state-summary) { display:none!important; }
}

/* Сохранение и импорт */
html[data-theme] .workflow-operation[hidden] { display: none; }
html[data-theme] :is(.schedule-stale,.schedule-batch > .notice)[hidden] { display: none; }
html[data-theme] .manual-prompt-editor:not([hidden]) {
  display: grid;
  gap: 10px;
  min-inline-size: 0;
  margin-block-start: 16px;
}
.chatgpt-summary-controls:not([hidden]) {
  display: grid;
  gap: 8px;
  padding-block: 12px;
  border-block: 1px solid var(--control-border);
}
@media (prefers-reduced-motion: reduce) {
html[data-theme] .workflow-operation[data-state="checking"] .workflow-operation-mark { animation: none; border-style: dashed; }
html[data-theme] .archive-state-card[data-state="loading"] .workflow-operation-mark { animation: none; border-style: dashed; }
}
@media (forced-colors: active) {
html[data-theme] :is(.manual-prompt-groups,.manual-prompt-options > .check-label) {
    border-color: CanvasText;
    color: CanvasText;
  }
html[data-theme] .manual-prompt-groups > legend { color: CanvasText; }
html[data-theme] .manual-prompt-options > .check-label:has(:checked) { border-color: Highlight; }
html[data-theme] .manual-prompt-options input[type="checkbox"] { accent-color: Highlight; }
html[data-theme] :is(.schedule-availability,.proposal-addition-row,.schedule-batch,.schedule-stale.notice.error) {
    background: Canvas;
    color: CanvasText;
    border-color: CanvasText;
  }
html[data-theme] :is(.schedule-availability-bar,.schedule-availability-mark) { display: none; }
html[data-theme] .schedule-availability-legend > div { border-color: CanvasText; }
html[data-theme] :is(
    .schedule-availability-legend dt,.unscheduled-row .unscheduled-reason,.comparison-day-heading > .hint,
    .proposal-addition-title .comparison-tag,.proposal-addition-time,.comparison-column h4,.comparison-column.after h4
  ) { color: CanvasText; }
}
@media print {
.workflow-operation, .helper-readiness { display: none!important; }
}

/* Главы */
@media (prefers-reduced-motion: reduce) {
.chapter-tab,
  .subtab-button,
  .reserve-bar-fill,
  .completeness-meter-fill {
    transition: none;
  }
}
@media (forced-colors: active) {
.chapters-tabs,
  .planner-tabs,
  .integrations-tabs,
  .chapter-card,
  .goal-card,
  .planner-card,
  .integration-card,
  .conflict-card,
  .t033-episode-row,
  .exchange-preview-row,
  .token-status-row,
  .goal-id-chip,
  .sphere-chip,
  .status-pill,
  .deferral-badge,
  .deferral-warning {
    background: Canvas;
    color: CanvasText;
    border: 1px solid ButtonText;
  }
.chapter-tab[aria-selected="true"],
  .subtab-button[aria-selected="true"] {
    background: Highlight;
    color: HighlightText;
    border-color: Highlight;
  }
.reserve-bar-fill,
  .completeness-meter-fill {
    background: Highlight;
  }
}
@media print {
.chapters-tabs,
  .planner-tabs,
  .integrations-tabs {
    display: none;
  }
.chapter-card,
  .goal-card,
  .planner-card,
  .integration-card {
    break-inside: avoid;
    border: 1px solid #000;
    background: #fff;
    color: #000;
  }
}

/* Компактный интерфейс */
@media screen {
html[data-theme] .sidebar .nav-item:is(:hover, :focus-visible) {
    background: #18202f;
    color: #f3f6fc;
    border-color: #2b384f;
    transform: none;
  }
html[data-theme] .sidebar-foot .menu-toggle:is(:hover, :focus-visible) {
    background: #1e283b;
    border-color: #4c82f7;
    color: #ffffff;
  }
html[data-theme] .site-menu-panel .menu-close:is(:hover, :focus-visible) {
    background: var(--card-surface);
    border-color: #5b8ff9;
  }
html[data-theme] .menu-panel-item:is(:hover, :focus-visible) {
    background: #192233;
    color: #ffffff;
  }
html[data-theme] .menu-panel-item:is(:hover, :focus-visible) .menu-panel-arrow {
    color: #8ab4ff;
    transform: translateX(2px);
  }
html[data-theme] .visual-metric:is(:hover, :focus-visible) {
    background: #192130;
    border-color: #3a4964;
  }
html[data-theme] .button:is(:hover, :focus-visible):not(:disabled) {
    background: var(--card-surface);
    border-color: #5b8ff9;
    color: #ffffff;
    transform: none;
  }
html[data-theme] .button.primary:is(:hover, :focus-visible):not(:disabled) {
    background: #5f90fa;
    border-color: #7ea6fb;
    color: #ffffff;
  }
html[data-theme] .button.danger:is(:hover, :focus-visible):not(:disabled) {
    background: #4a2327;
    border-color: #d6767e;
    color: #ffe2e5;
  }
html[data-theme] .field :is(input, select, textarea):focus-visible {
    outline: 2px solid #5b8ff9;
    outline-offset: 2px;
    border-color: #7aa6ff;
    background: #111826;
  }
html[data-theme] .section-card:is(:hover, :focus-visible) {
    background: #1c2536;
    border-color: #4c82f7;
  }
html[data-theme] .command-trigger:is(:hover, :focus-visible) {
    background: #1b2334;
    border-color: #4c82f7;
    color: #ffffff;
  }
html[data-theme] .palette-search:focus-visible {
    outline: none;
  }
html[data-theme] .ritual-pill:is(:hover, :focus-visible) {
    background: #1a2436;
    border-color: #4c82f7;
    color: #ecf1f8;
  }
html[data-theme] .filter-pill:is(:hover, :focus-visible) {
    background: #192233;
    border-color: #4c82f7;
    color: #f0f4fa;
  }
html[data-theme] .nav-sphere-item:is(:hover, :focus-visible) {
    background: #242e42;
    color: #ffffff;
    border-color: var(--border-hover);
  }
html[data-theme] .today-hub-row:is(:hover, :focus-visible),
  html[data-theme] .today-hub-goal-row:is(:hover, :focus-visible) {
    border-color: #4c82f7;
    background: #1b2538;
  }
html:root[data-theme="light"] .today-hub-row:is(:hover, :focus-visible),
  html:root[data-theme="light"] .today-hub-goal-row:is(:hover, :focus-visible) {
    background: #f3eee3;
    border-color: #1f6b5a;
  }
html[data-theme] .day-heading-btn:is(:hover, :focus-visible) {
    color: #8cb4ff;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
html[data-theme] .month-cell:is(:hover, :focus-visible) {
    border-color: #6b9bff;
    background: #1b2538;
  }
}

/* Размер текста */
@media screen {
html[data-text-scale="large"] { --ritm-text-factor: 1.25; }
html[data-text-scale="xlarge"] { --ritm-text-factor: 1.5; }
html[data-text-scale="large"] body,
  html[data-text-scale="xlarge"] body {
    font-size: calc(15px * var(--ritm-text-factor));
    line-height: 1.65;
  }
html[data-text-scale="large"] :is(
    p,li,label,summary,button,input,select,textarea,th,td,
    .hint,.eyebrow,.action-hint,.save-state,.notice,.badge,
    .task-status,.tracker-goal-status,.task-state-pill,.tracker-state-pill,
    .menu-panel-description,.section-card-description,.section-card-count,
    .reference-card-description,.reference-card-count,.reference-week-range,
    .reference-week-weekday,.reference-week-materials,.tracker-scroll-hint
  ),
  html[data-text-scale="xlarge"] :is(
    p,li,label,summary,button,input,select,textarea,th,td,
    .hint,.eyebrow,.action-hint,.save-state,.notice,.badge,
    .task-status,.tracker-goal-status,.task-state-pill,.tracker-state-pill,
    .menu-panel-description,.section-card-description,.section-card-count,
    .reference-card-description,.reference-card-count,.reference-week-range,
    .reference-week-weekday,.reference-week-materials,.tracker-scroll-hint
  ) {
    font-size: max(1em, calc(13px * var(--ritm-text-factor)));
    line-height: 1.55;
  }
html[data-text-scale="large"] :is(h2,h3,h4,.panel-heading h2,.panel-heading h3),
  html[data-text-scale="xlarge"] :is(h2,h3,h4,.panel-heading h2,.panel-heading h3) {
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
html[data-text-scale="large"] :is(.topbar,.topbar-actions,.panel-heading,.title-row,.archive-row,.helper-window,.modal-head),
  html[data-text-scale="xlarge"] :is(.topbar,.topbar-actions,.panel-heading,.title-row,.archive-row,.helper-window,.modal-head) {
    flex-wrap: wrap;
  }
html[data-text-scale="large"] :is(.button,button,input,select,textarea),
  html[data-text-scale="xlarge"] :is(.button,button,input,select,textarea) {
    min-height: max(46px, 2.75em);
    white-space: normal;
    scroll-margin-block: 16px;
    scroll-margin-inline: 12px;
  }
html[data-text-scale="large"] :is(.task-table-wrap,.tracker-table-wrap),
  html[data-text-scale="xlarge"] :is(.task-table-wrap,.tracker-table-wrap) {
    scroll-margin-block: 16px;
    scroll-margin-inline: 12px;
  }
html[data-text-scale="large"] :is(.topbar-actions,.actions,.task-actions,.comparison-actions),
  html[data-text-scale="xlarge"] :is(.topbar-actions,.actions,.task-actions,.comparison-actions) {
    row-gap: 10px;
  }
html[data-text-scale="large"] :is(.modal,.modal-body,.navigation-panel),
  html[data-text-scale="xlarge"] :is(.modal,.modal-body,.navigation-panel) {
    overflow-wrap: anywhere;
  }
html[data-text-scale="large"] .reference-intro-actions .button.reference-pill,
  html[data-text-scale="xlarge"] .reference-intro-actions .button.reference-pill {
    width: min(100%, 340px);
    min-width: 0;
    padding-inline: 30px;
  }
html[data-text-scale="large"] .reference-pill :is(.action-label,.action-hint),
  html[data-text-scale="xlarge"] .reference-pill :is(.action-label,.action-hint) {
    overflow-wrap: anywhere;
  }
@media (max-width: 650px) {
html[data-text-scale="large"] .topbar,
    html[data-text-scale="xlarge"] .topbar {
      position: relative;
      top: auto;
    }
html[data-text-scale="large"] .topbar-actions,
    html[data-text-scale="xlarge"] .topbar-actions {
      width: 100%;
    }
html[data-text-scale="large"] .topbar-actions > *,
    html[data-text-scale="xlarge"] .topbar-actions > * {
      flex: 1 1 132px;
    }
html[data-text-scale="large"] :is(.panel-heading,.archive-row,.helper-window,.modal-head),
    html[data-text-scale="xlarge"] :is(.panel-heading,.archive-row,.helper-window,.modal-head) {
      align-items: flex-start;
    }
}
@media (max-width: 650px) and (max-height: 550px) {
html[data-text-scale="large"] .menu-panel-item,
    html[data-text-scale="xlarge"] .menu-panel-item {
      min-height: 0;
      padding-block: 7px;
    }
html[data-text-scale="large"] .menu-panel-copy,
    html[data-text-scale="xlarge"] .menu-panel-copy {
      gap: 0;
    }
html[data-text-scale="large"] .menu-panel-description,
    html[data-text-scale="xlarge"] .menu-panel-description {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
}
}

/* Системная контрастность */
@media (forced-colors: active) {
html[data-theme] {
    color-scheme: light dark;
    background: Canvas;
    color: CanvasText;
  }
html[data-theme] body,
  html[data-theme] .main,
  html[data-theme] :is(.panel,.modal,.modal-head,.modal-body,.reader-content,.day-column,.task-table-wrap,.tracker-table-wrap,.tracker-summary-card,.tracker-catalog,.tracker-catalog-card,.tracker-log-row,.reference-section-content,.reference-finale-light) {
    background: Canvas;
    color: CanvasText;
  }
html[data-theme] :is(.ambient-scene,.thread-hero-art,.week-cover-art,.reference-card-photo,.reference-card-depth,.strata-visual) {
    opacity: .16;
  }
html[data-theme] :is(h1,h2,h3,h4,p,label,.hint,.eyebrow,.action-hint,.task-status,.tracker-goal-status,.task-state-pill,.tracker-state-pill) {
    color: CanvasText;
  }
html[data-theme] a { color: LinkText; }
html[data-theme] a:visited { color: VisitedText; }
html[data-theme] :is(.button,button,input,select,textarea,summary,[tabindex]):focus-visible {
    outline: 3px solid Highlight;
    outline-offset: 3px;
  }
html[data-theme] :is(.button,button,input,select,textarea) {
    border: 2px solid ButtonText;
    background: ButtonFace;
    color: ButtonText;
    box-shadow: none;
  }
html[data-theme] :is(.button.primary,.nav-item.active,.reference-menu-trigger,.reference-pill.primary) {
    border-color: Highlight;
    background: Highlight;
    color: HighlightText;
  }
html[data-theme] :is(.button,button,input,select,textarea):disabled {
    border-color: GrayText;
    color: GrayText;
  }
html[data-theme] :is(.panel,.modal,.modal-head,.modal-actions,.notice,.state-card,.workflow-operation,.archive-state-card,.task-table-wrap,.tracker-table-wrap,.tracker-summary-card,.tracker-catalog,.tracker-catalog-card,.tracker-log-row,.reference-card,.reference-section-content) {
    border-color: CanvasText;
    box-shadow: none;
  }
html[data-theme] :is(table,th,td) { border-color: CanvasText; }
html[data-theme] th { background: Canvas; color: CanvasText; }
html[data-theme] :is(.task-table,.tracker-plan-table,.tracker-trend-table) tr:focus-within > * {
    outline: 2px solid Highlight;
    outline-offset: -2px;
  }
html[data-theme] :is(.task-status,.tracker-goal-status,.task-state-pill,.tracker-state-pill,.badge,.save-state,.notice) {
    border: 1px solid CanvasText;
    background: Canvas;
    color: CanvasText;
  }
html[data-theme] :is(.task-status,.tracker-goal-status,.save-state):before {
    border: 1px solid CanvasText;
    background: CanvasText;
    box-shadow: none;
  }
html[data-theme] :is(input[type="checkbox"],input[type="radio"],progress) { accent-color: Highlight; }
html[data-theme] :is(.modal-body,.task-table-wrap,.tracker-table-wrap) { scrollbar-color: CanvasText Canvas; }
html[data-theme] :is(.motion-orb,.ambient-orb,.reference-card-shine,.thread-hero-thread,.route-thread) {
    display: none;
  }
html[data-theme] *,
  html[data-theme] *::before,
  html[data-theme] *::after {
    text-shadow: none;
  }
}
@media (prefers-contrast: more) and (forced-colors: none) {
html[data-theme] :is(.button,input,select,textarea,.panel,.modal,.task-table-wrap,.tracker-table-wrap) {
    border-width: 2px;
  }
html[data-theme] :is(.hint,.eyebrow,.action-hint) { color: var(--ink); }
html[data-theme] :is(.button,button,input,select,textarea,summary,[tabindex]):focus-visible { outline-width: 4px; }
}
}

@media print {
  body:has(#journey-chronicle[open] #chronicle-report) *:not(:has(#chronicle-report)):not(#chronicle-report):not(#chronicle-report *) {
    display: none !important;
  }
  body:has(#journey-chronicle[open] #chronicle-report),
  body:has(#journey-chronicle[open] #chronicle-report) :has(#chronicle-report) {
    display: block !important;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    overflow: visible !important;
    border: 0 !important;
    background: white !important;
  }
  #chronicle-report { color: #111; background: #fff; font: 11pt/1.45 Georgia, serif; }
  #chronicle-report h2, #chronicle-report h3 { color: #111; break-after: avoid; }
  #chronicle-report p { margin: 0.2em 0; orphans: 2; widows: 2; }
  #chronicle-report section { margin-block: 1em; }
  #chronicle-report p { break-inside: avoid; }
}
