:root{--paper:#fffef9;--ink:#1a1a1a;--muted:#333333;--accent:#33567a;--hairline:rgba(26,26,26,.18);--rule:rgba(26,26,26,.25)}
*{box-sizing:border-box}
html{color-scheme:light;scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--ink);font:400 17px/1.62 'PT Serif',Georgia,serif;overflow-wrap:break-word;counter-reset:figure}
a{color:var(--accent);text-underline-offset:3px}
a{touch-action:manipulation}
a:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
.page{max-width:740px;margin:0 auto;padding:72px 22px 64px}
h1{font-size:1.9em;line-height:1.15;font-weight:400;margin:0 0 18px}
h2{font-size:1.4em;line-height:1.3;font-weight:400;margin:0 0 16px}
h3{font-size:1.1em;font-weight:700;margin:28px 0 12px}
p{margin:0 0 1em}
.lede{font-size:1.1em}
.meta,.toc,.source,figcaption,.site-top,.site-bottom{font-family:'PT Mono',monospace;font-weight:400}
.meta,.source{font-size:11.5px;line-height:1.6;color:var(--muted)}
nav.toc{margin:28px 0 36px;font-size:12.5px;line-height:2.1}
.toc ul{padding:0;margin:0;list-style:none}
section{padding-top:44px;scroll-margin-top:24px}
ul,ol{padding-left:24px;margin:0 0 22px}
li+li{margin-top:8px}
figure{width:114%;max-width:860px;margin:26px 0 26px -7%;counter-increment:figure}
figure svg,figure img,figure video{display:block;width:100%;height:auto}
figcaption{font-size:11px;line-height:1.6;color:var(--muted);text-align:center;margin-top:10px}
figcaption::before{content:'Рис. ' counter(figure) '. '}
img,video{max-width:100%;height:auto}
.diagram-scroll{max-width:100%;overflow:auto}
.lead-mobile{display:none}
code{font-family:'PT Mono',monospace;font-size:.85em;overflow-wrap:anywhere}
.site-top,.site-bottom{max-width:1116px;margin:0 auto;padding:22px;font-size:11.5px;display:flex;justify-content:space-between;gap:18px;flex-wrap:wrap}
.site-top span,.site-bottom span:last-child{display:flex;gap:20px;flex-wrap:wrap}
.site-bottom{border-top:1px solid var(--hairline);color:var(--muted)}
@media(max-width:840px){.page{padding-top:48px}figure{width:100%;margin-left:0}}
@media(max-width:700px){.diagram-scroll svg{min-width:580px}.site-top,.site-bottom{padding:18px 22px}.site-top span,.site-bottom span:last-child{gap:14px}}
@media(max-width:480px){h1{font-size:1.6em}.page{padding-top:36px}}
@media(max-width:540px){.lead-desktop{display:none}.lead-mobile{display:block}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
@media print{@page{size:A4;margin:18mm}body{font-size:11pt}.page{max-width:none;margin:0;padding:0}.site-top,.site-bottom{display:none}figure{width:100%;margin-left:0;break-inside:avoid}section{padding-top:24px}a{color:var(--ink)}h2,h3{break-after:avoid}.diagram-scroll svg{min-width:0}}
