@font-face { font-family: Onest; src: url("onest.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Onest; src: url("onest-bold.woff2") format("woff2"); font-weight: 500 900; font-display: swap; }
@font-face { font-family: Unbounded; src: url("unbounded-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
/* Сверка: сгруппированные документы и спокойный ритм чтения. */
:root {
  color-scheme: light dark;
  --bg: #f4f0e7;
  --paper: #fcfaf5;
  --reading: #fffdf8;
  --ink: #162522;
  --muted: #495953;
  --line: #e6e0d4;
  --edge: #d5d0c4;
  --accent: #087050;
  --tint: #e2f2ea;
  --pressed: #d6ebe1;
  --header: rgba(252, 250, 245, .95);
  --scrim: rgba(15, 30, 27, .55);
  --header-height: 80px;
  --reader-height: 0px;
}
* { box-sizing: border-box; }
/* Keep short archive pages aligned with pages that need a vertical scrollbar. */
html { scrollbar-gutter: stable; scroll-padding-top: calc(var(--header-height) + var(--reader-height) + env(safe-area-inset-top) + 24px); }
@supports not (scrollbar-gutter: stable) {
  html { overflow-y: scroll; }
}
body { margin: 0; color: var(--ink); background: var(--bg); font: 1rem/1.6 Onest, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-text-size-adjust: 100%; }
.is-reader { --reader-height: 52px; }
button, summary { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a, button, summary { touch-action: manipulation; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.22; letter-spacing: -.035em; }
h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 720; margin-bottom: 16px; }
h2 { font-size: 24px; font-weight: 680; }
h3 { font-size: 19px; }
p, li, td, th, h1, h2, h3, a { overflow-wrap: anywhere; }
svg { display: block; width: 22px; height: 22px; flex: 0 0 auto; }
.shell { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 12px 16px; background: var(--paper); }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 0; z-index: 30; padding-top: env(safe-area-inset-top); background: var(--paper); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(16px)) {
  .site-header { background: transparent; }
  .site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--header); backdrop-filter: blur(16px); pointer-events: none; }
}
.header-inner { min-height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; min-height: 48px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-mark { display: block; width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto; }
.brand-name { display: block; font-size: 18px; font-weight: 730; letter-spacing: -.035em; line-height: 1.3; }
.brand-caption { display: block; font-size: 12px; color: var(--muted); line-height: 1.5; }
.header-nav { display: flex; align-items: center; gap: 8px; }
.header-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.theme-trigger { display: none; }
.theme-ready .theme-trigger { display: inline-flex; }
/* Only the snapshot of the new palette is revealed; the document is never cloned. */
html.theme-revealing::view-transition-old(root), html.theme-revealing::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
html.theme-revealing::view-transition-old(root) { z-index: 1; }
html.theme-revealing::view-transition-new(root) { z-index: 2; }
.header-nav a { padding: 12px 16px; min-height: 48px; display: flex; align-items: center; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.header-nav a:hover, .header-nav a[aria-current="page"] { color: var(--accent); background: var(--tint); }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; flex-shrink: 0; border: 1px solid var(--edge); border-radius: 16px; background: var(--paper); color: var(--ink); text-decoration: none; }
.icon-button:hover { background: var(--tint); }
.icon-button:active, .document-card:active { background: var(--pressed); }
.mobile-menu { display: none; }
.site-main { padding-block: 44px 64px; min-height: 65vh; }
.intro { max-width: 720px; margin-bottom: 36px; }
.intro-text { max-width: 610px; color: var(--muted); font-size: 17px; line-height: 1.65; margin-bottom: 0; }
.hub-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.document-groups { min-width: 0; }
.document-group + .document-group { margin-top: 28px; }
.group-heading { display: flex; align-items: baseline; gap: 12px; padding: 0 4px; margin-bottom: 12px; }
.group-heading h2 { font-size: 18px; margin: 0; letter-spacing: -.02em; }
.document-list { list-style: none; margin: 0; padding: 0 20px; background: var(--paper); border: 1px solid var(--edge); border-radius: 20px; }
.document-list li { margin: 0; min-width: 0; }
.document-card { display: grid; grid-template-columns: 42px minmax(0, 1fr) 20px; align-items: center; gap: 14px; padding: 20px 0; text-decoration: none; color: var(--ink); min-width: 0; border-bottom: 1px solid var(--line); }
.document-list li:last-child .document-card { border: 0; }
.card-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--tint); color: var(--accent); }
.card-title { display: block; font-size: 16px; font-weight: 650; letter-spacing: -.015em; line-height: 1.4; }
.card-description { display: block; margin-top: 5px; font-size: 13px; color: var(--muted); line-height: 1.55; }
.card-arrow { color: var(--muted); }
.card-arrow svg { width: 18px; height: 18px; }
.document-card:hover .card-title { color: var(--accent); }
.hub-rail { position: sticky; top: calc(var(--header-height) + 24px); display: grid; gap: 20px; }
.info-panel { padding: 24px; background: var(--paper); border-radius: 20px; border: 1px solid var(--edge); }
.info-panel h2 { margin: 16px 0 8px; font-size: 19px; }
.info-panel p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.action-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; font-size: 14px; font-weight: 620; text-decoration: none; }
.action-link + .action-link { border-top: 1px solid var(--line); }
.action-link svg { width: 18px; height: 18px; }
.edition-panel { padding: 4px 12px; }
.edition-panel strong { display: block; color: var(--ink); font-weight: 650; font-size: 15px; }
.edition-panel .action-link { justify-content: flex-start; font-weight: 500; }
.reader-bar { border-top: 1px solid var(--line); }
.reader-bar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 52px; gap: 16px; }
.reader-back { display: inline-flex; align-items: center; gap: 9px; min-height: 48px; font-size: 13px; text-decoration: none; font-weight: 600; }
.reader-back svg { width: 18px; height: 18px; }
.reader-label { font-size: 12px; color: var(--muted); }
.contents-menu { display: none; }
.reading-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 40px; align-items: start; }
.document { min-width: 0; padding: 36px 40px; border: 1px solid var(--edge); border-radius: 24px; background: var(--reading); font-size: 17px; line-height: 1.75; }
.document h1 { font-size: clamp(28px, 3vw, 38px); line-height: 1.23; margin: 0 0 22px; }
.document p { margin-bottom: 22px; }
.document h2 { font-size: 23px; margin: 40px 0 18px; }
.document ul { padding-left: 22px; margin-block: 0 22px; }
.document li { padding-left: 2px; margin-block: 10px; }
.document strong { font-weight: 650; }
.toc { position: sticky; top: calc(var(--header-height) + var(--reader-height) + 24px); max-height: calc(100dvh - var(--header-height) - var(--reader-height) - 48px); overflow: auto; scrollbar-width: thin; padding: 4px 0 12px; }
.toc-label { margin: 0 0 16px; font-size: 13px; font-weight: 650; color: var(--ink); }
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list a { display: block; padding: 11px 14px; min-height: 48px; font-size: 13px; line-height: 1.55; color: var(--muted); text-decoration: none; border-left: 2px solid var(--line); }
.toc-list a:hover, .toc-list a[aria-current="location"] { color: var(--accent); background: var(--tint); border-left-color: var(--accent); border-radius: 0 12px 12px 0; }
.toc-note { padding: 20px 14px 0; color: var(--muted); font-size: 12px; }
.toc-note a { display: inline-flex; min-height: 44px; align-items: center; }
.back-top { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; margin-top: 12px; font-size: 14px; text-decoration: none; }
.back-top svg { width: 18px; height: 18px; }
.site-footer { padding-block: 28px max(28px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-brand { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 0; }
.footer-brand strong { display: block; font-size: 14px; color: var(--ink); font-weight: 650; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 24px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 48px; font-size: 13px; text-decoration: none; color: var(--muted); }
.footer-links a:hover { color: var(--accent); }
.sheet > summary { list-style: none; }
.sheet > summary::-webkit-details-marker { display: none; }
.sheet-panel { background: var(--paper); }
.sheet-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.sheet-close, .sheet-backdrop { display: none; }
.sheet-title { margin: 0; font-size: 21px; }
.sheet-top { display: flex; flex-shrink: 0; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.sheet-links { display: grid; gap: 2px; }
.sheet-group-label { margin: 14px 12px 1px; color: var(--muted); font-size: .8rem; font-weight: 600; }
.sheet-links a { display: flex; align-items: center; gap: 14px; color: var(--ink); min-height: 52px; padding: 12px; border-radius: 14px; font-size: 15px; line-height: 1.45; text-decoration: none; }
.sheet-links a svg { color: var(--accent); }
.sheet-links a:hover, .sheet-links a[aria-current="page"] { background: var(--tint); color: var(--accent); }
.sheet-contacts { padding: 16px 12px 0; margin-top: 20px; border-top: 1px solid var(--line); }
.sheet-contacts a { display: flex; align-items: center; min-height: 48px; font-size: 14px; text-decoration: none; }
@media (max-width: 960px) {
  .shell { width: calc(100% - 40px); }
  .hub-layout { grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; }
  .info-panel { padding: 20px; }
  .reading-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .document { max-width: 760px; margin-inline: auto; width: 100%; }
  .contents-menu { display: block; }
  .contents-menu > summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 8px 12px; margin-right: -12px; color: var(--accent); cursor: pointer; font-size: 13px; font-weight: 600; }
  .contents-menu > summary svg { width: 20px; height: 20px; }
  .reader-label { display: none; }
  .sheet[open] > summary { color: var(--accent); }
  .sheet-panel { display: flex; flex-direction: column; position: fixed; top: calc(var(--header-height) + var(--reader-height) + env(safe-area-inset-top)); right: 20px; width: min(420px, calc(100vw - 40px)); max-height: calc(100vh - var(--header-height) - var(--reader-height) - env(safe-area-inset-top) - 24px); max-height: calc(100dvh - var(--header-height) - var(--reader-height) - env(safe-area-inset-top) - 24px); overflow: hidden; padding: 24px; border: 1px solid var(--edge); border-radius: 24px; box-shadow: 0 12px 48px rgba(0, 0, 0, .18); }
  .sheet-panel .toc-list a { font-size: 15px; padding-block: 14px; }
  body.sheet-open .site-header { background: var(--paper); }
  .js .sheet[open] .sheet-backdrop { display: block; position: fixed; inset: 0; z-index: 49; border: 0; width: 100%; height: 100%; background: var(--scrim); cursor: default; }
  .js .sheet[open] .sheet-panel { z-index: 50; top: auto; bottom: 12px; right: 12px; width: min(440px, calc(100vw - 24px)); max-height: min(86vh, 800px); max-height: min(86dvh, 800px); padding-bottom: max(24px, env(safe-area-inset-bottom)); border-radius: 28px; }
  .js .sheet-close { display: inline-flex; }
}
@media (max-width: 720px) {
  :root { --header-height: 68px; }
  .shell { width: auto; margin-left: max(16px, env(safe-area-inset-left)); margin-right: max(16px, env(safe-area-inset-right)); }
  .header-inner { gap: 12px; }
  .header-actions { gap: 8px; }
  .brand { gap: 10px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .brand-name { font-size: 17px; }
  .brand-caption { font-size: 11px; }
  .header-nav { display: none; }
  .mobile-menu { display: block; }
  .mobile-menu > summary { cursor: pointer; }
  .site-main { padding-block: 28px 40px; }
  .intro { margin-bottom: 28px; }
  h1 { font-size: 32px; letter-spacing: -.04em; }
  .intro h1 { max-width: 310px; }
  .intro-text { font-size: 15px; max-width: 480px; line-height: 1.65; }
  .hub-layout { display: block; }
  .document-group + .document-group { margin-top: 26px; }
  .group-heading { margin-bottom: 10px; padding-inline: 4px; }
  .group-heading h2 { font-size: 17px; }
  .document-list { padding-inline: 16px; }
  .document-card { grid-template-columns: 38px minmax(0, 1fr) 16px; gap: 12px; padding-block: 18px; }
  .card-icon { width: 38px; height: 38px; border-radius: 12px; }
  .card-icon svg { width: 21px; height: 21px; }
  .card-title { font-size: 15px; }
  .card-description { font-size: 12px; margin-top: 5px; line-height: 1.55; }
  .hub-rail { position: static; margin-top: 28px; gap: 24px; }
  .info-panel { padding: 22px; }
  .info-panel h2 { margin-top: 12px; }
  .edition-panel { padding: 0 6px; }
  .reader-bar-inner { gap: 8px; }
  .reader-back { font-size: 12px; gap: 6px; }
  .is-reader { background: var(--reading); }
  .is-reader .site-main { padding-top: 28px; padding-bottom: 32px; }
  .reading-layout { display: block; }
  .document { padding: 0 2px; border: 0; border-radius: 0; font-size: 16px; line-height: 1.75; }
  .document h1 { font-size: 28px; line-height: 1.24; margin-bottom: 18px; }
  .document h2 { font-size: 22px; margin-top: 34px; margin-bottom: 16px; }
  .document p { margin-bottom: 20px; }
  .document li { margin-block: 10px; }
  .document ul { padding-left: 20px; }
  .sheet-panel { right: 12px; width: calc(100vw - 24px); padding: 22px; }
  .js .sheet[open] .sheet-panel { left: max(8px, env(safe-area-inset-left)); right: max(8px, env(safe-area-inset-right)); bottom: 8px; width: auto; max-height: 88vh; max-height: 88dvh; padding: 24px 16px max(20px, env(safe-area-inset-bottom)); }
  .sheet-top { padding-inline: 8px; }
  .sheet-title { font-size: 21px; }
  .footer-inner { display: block; }
  .footer-links { gap: 0 20px; margin-top: 12px; }
  .site-footer { padding-top: 24px; }
}
@media (max-width: 360px) {
  .header-inner { gap: 8px; }
  .brand { gap: 8px; }
  .brand-name { font-size: 16px; }
  .brand-caption { font-size: 10px; }
  .document-list { padding-inline: 12px; }
  .document-card { grid-template-columns: 34px minmax(0, 1fr) 14px; gap: 9px; }
  .card-icon { width: 34px; height: 34px; }
  .card-arrow svg { width: 14px; height: 14px; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; --bg: #0a1517; --paper: #112023; --reading: #132326; --ink: #eef6f2; --muted: #afc3bd; --line: #263738; --edge: #374d4d; --accent: #4fe0ae; --tint: #183b32; --pressed: #214b3d; --header: rgba(17, 32, 35, .95); --scrim: rgba(0, 0, 0, .65); }
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; --bg: #0a1517; --paper: #112023; --reading: #132326; --ink: #eef6f2; --muted: #afc3bd; --line: #263738; --edge: #374d4d; --accent: #4fe0ae; --tint: #183b32; --pressed: #214b3d; --header: rgba(17, 32, 35, .95); --scrim: rgba(0, 0, 0, .65); }
@media (prefers-reduced-motion: no-preference) {
  .document-card, .icon-button, .header-nav a, .sheet-links a { transition: background-color .15s ease, color .15s ease; }
  .js .sheet[open] .sheet-panel { animation: sheet-enter .2s ease-out; }
  @keyframes sheet-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
}
@media print {
  html { scrollbar-gutter: auto; overflow-y: visible; }
  :root, :root[data-theme], :root:not([data-theme="light"]) { color-scheme: light; --bg: #fff; --paper: #fcfaf5; --reading: #fffdf8; --ink: #000; --muted: #333; --line: #aaa; --edge: #aaa; --accent: #000; --tint: #eee; }
  .site-header, .site-footer, .toc, .back-top, .skip-link, .sheet { display: none !important; }
  body { background: #fff; position: static !important; top: auto !important; width: auto !important; overflow: visible !important; }
  .shell { width: 100%; margin: 0; }
  .site-main, .is-reader .site-main { padding: 0; }
  .reading-layout, .hub-layout { display: block; }
  .document { border: 0; padding: 0; max-width: none; }
  .document h1 { font-size: 24pt; }
  .document h2 { font-size: 16pt; break-after: avoid; }
  .document p, .document li { font-size: 11pt; }
  .document-card { break-inside: avoid; }
  .hub-rail { position: static; margin-top: 20px; }
}
/* The catalog follows the same navigation as the mobile app, with a dedicated reader. */
.hub-title { font-family: Unbounded, Onest, sans-serif; font-size: clamp(1.9rem, 4.25vw, 3.1rem); font-weight: 600; line-height: 1.18; letter-spacing: -.05em; }
.intro-text { max-width: 34rem; font-size: 1rem; }
.hub-layout { grid-template-columns: minmax(0, 1fr) minmax(17rem, 21rem); }
.document-list { box-shadow: 0 10px 26px -23px rgba(49, 65, 52, .35); }
.document-card { border-radius: 0; }
.document-card:hover .card-arrow, .document-card:focus-visible .card-arrow { color: var(--accent); }
.card-title { font-size: 1rem; }
.card-description { font-size: .875rem; }
.group-heading { flex-wrap: wrap; }
.group-heading span { font-size: .875rem; color: var(--muted); }
.contact-panel address { font-style: normal; }
.contact-link { padding-block: 10px; min-height: 62px; }
.contact-link > span { min-width: 0; }
.contact-link strong, .contact-link span span { display: block; }
.contact-link strong { color: var(--ink); font-size: .875rem; }
.contact-link span span { margin-top: 1px; font-size: .875rem; font-weight: 400; }
.contact-link svg { flex-shrink: 0; }
.edition-panel h2 { margin: 0 0 3px; font-size: .875rem; color: var(--muted); }
.edition-panel strong { font-size: 1rem; }
.edition-panel .action-link { gap: 8px; }
.archive-editions { max-width: 48rem; }
.archive-editions .document-card { min-height: 64px; padding-block: 13px; }
.reader-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .4rem 1rem; padding-bottom: 1.15rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .84rem; }
.reader-meta a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.document h2:target { color: var(--accent); }
.document { font-size: 1.0625rem; }
.document h1 { font-size: clamp(1.75rem, 3vw, 2.45rem); }
.document h2 { font-size: 1.4rem; }
.toc-label, .toc-list a { font-size: .875rem; }
.toc-note a { min-height: 40px; }
.reader-help { max-width: 44rem; margin-top: 1.5rem; }
.data-table { width: 100%; border-spacing: 0; table-layout: fixed; margin: 1.25rem 0; border: 1px solid var(--edge); border-radius: 14px; background: var(--paper); font-size: .9rem; line-height: 1.55; }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: .8rem .9rem; overflow-wrap: anywhere; }
.data-table th { color: var(--ink); background: var(--tint); }
.data-table th:first-child { border-start-start-radius: 13px; }
.data-table th:last-child { border-start-end-radius: 13px; }
.data-table tr + tr td, .data-table tbody tr:first-child td { border-top: 1px solid var(--line); }
.data-table th + th, .data-table td + td { border-inline-start: 1px solid var(--line); }
.cell-label { display: none; }
.document .related-links { list-style: none; padding: 0; margin: -.2rem 0 1.4rem; }
.document .related-links li { margin: 0; padding: 0; }
.related-links a { display: inline-flex; align-items: center; min-height: 2.75rem; padding-block: .3rem; }
@media (max-width: 960px) {
  .reader-help { margin-inline: auto; }
  .reading-layout { gap: 1rem; }
}
@media (max-width: 720px) {
  .hub-title { font-size: clamp(1.75rem, 6.5vw, 2.6rem); }
  html.is-reader body { background: var(--reading); }
  .document { font-size: 1rem; }
  .document h2 { font-size: 1.3rem; }
  .card-description { font-size: .83rem; }
}
@media screen and (max-width: 560px) {
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; }
  .data-table { border-radius: 0; border: 0; background: none; }
  .data-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .data-table tr { border: 1px solid var(--edge); border-radius: 14px; background: var(--paper); }
  .data-table tr + tr { margin-top: .75rem; }
  .data-table tr td, .data-table tbody tr:first-child td { border: 0; }
  .data-table tr td + td, .data-table tbody tr:first-child td + td { border-top: 1px solid var(--line); }
  .cell-label { display: block; margin-bottom: .15rem; color: var(--muted); font-size: .82rem; font-weight: 650; }
}
@media print {
  .reader-help { display: none; }
}
