@font-face {
  font-family: Literata;
  src: url('../fonts/literata-cyrillic.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Literata;
  src: url('../fonts/literata-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light dark;
  --paper: #f5f0e6;
  --ink: #231f1a;
  --quiet: #6b6258;
  --rule: #cfc5b6;
  --link: #724b2b;
  --focus: #1556a3;
  --blue: #587b91;
  --gold: #d8a83e;
  font-family: Literata, Georgia, 'Times New Roman', serif;
  font-size: 20px;
  line-height: 1.7;
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); }
body { margin: 0; min-width: 280px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
a { color: var(--link); text-decoration-thickness: .07em; text-underline-offset: .16em; }
a:hover { text-decoration-thickness: .12em; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 2px; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 10; padding: .45rem .7rem; background: var(--ink); color: var(--paper); }
.skip-link:focus { top: 1rem; }
.site-header, main, .site-footer { width: min(40rem, calc(100% - 2.5rem)); margin-inline: auto; }
.site-header { padding-block: 1rem .8rem; border-bottom: 1px solid var(--rule); display: flex; gap: .7rem 1rem; align-items: center; justify-content: space-between; }
.site-name { color: var(--ink); font-weight: 600; text-decoration: none; font-size: 1.08rem; display: inline-flex; align-items: center; gap: .55rem; }
.site-logo { width: 2rem; height: 2rem; flex: none; overflow: visible; }
.site-logo__canopy { fill: var(--paper); stroke: currentColor; stroke-width: 2.15; stroke-linejoin: round; }
.site-logo__blue { fill: var(--blue); opacity: .9; }
.site-logo__gold { fill: var(--gold); opacity: .95; }
.site-logo__handle { fill: none; stroke: currentColor; stroke-width: 2.15; stroke-linecap: round; }
.site-promise { margin: 0; color: var(--quiet); font-size: .72rem; letter-spacing: .01em; }
main { padding-block: clamp(2rem, 7vw, 4.5rem); }
.story-header { margin-bottom: 2.2rem; }
.story-header time, .byline, .translator { color: var(--quiet); font-size: .76rem; }
h1 { font-size: clamp(1.75rem, 7vw, 2.7rem); line-height: 1.12; letter-spacing: -.025em; margin: .45rem 0 .65rem; text-wrap: balance; }
h2 { font-size: 1rem; line-height: 1.35; margin-top: 2.4rem; }
.byline, .translator { margin: .15rem 0; }
.story-body { font-size: 1rem; hyphens: auto; hanging-punctuation: first last; }
.story-body p { margin: 0 0 1.15em; }
.story-body p + p { text-indent: 1.4em; }
.story-body hr { border: 0; width: 3rem; border-top: 1px solid var(--rule); margin: 2.5rem auto; }
.story-body blockquote { margin: 1.5rem 0; padding-left: 1rem; border-left: 2px solid var(--rule); color: var(--quiet); }
.story-share { margin-top: 2.5rem; text-align: center; }
.story-share button { min-width: 12.5rem; border: 1px solid var(--link); border-radius: .35rem; padding: .55rem .9rem; background: transparent; color: var(--link); font: 600 .76rem/1.4 Literata, Georgia, 'Times New Roman', serif; cursor: pointer; }
.story-share button:hover { background: color-mix(in srgb, var(--link) 8%, transparent); }
.story-share button:disabled { cursor: wait; opacity: .7; }
.ad { min-height: 5.5rem; margin: 3.5rem 0 2.5rem; padding-top: .55rem; border-top: 1px solid var(--rule); text-align: center; }
.ad-label { display: block; color: var(--quiet); font: .58rem/1.4 system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.source { margin-top: 3rem; border-top: 1px solid var(--rule); color: var(--quiet); font-size: .72rem; }
.source p { margin: .45rem 0; }
summary { cursor: pointer; color: var(--link); }
.archive h1, .prose-page h1, .empty-state h1 { margin-top: 0; }
.archive ol { list-style: none; padding: 0; margin: 2rem 0; }
.archive li { padding: .85rem 0; border-top: 1px solid var(--rule); }
.archive time { display: block; color: var(--quiet); font-size: .68rem; }
.archive span { color: var(--quiet); font-size: .82rem; }
.prose-page { max-width: 34rem; }
.empty-state { max-width: 30rem; min-height: 45vh; }
.error-code { color: var(--quiet); font-size: .72rem; }
.site-footer { padding-block: 1.2rem 2.5rem; border-top: 1px solid var(--rule); color: var(--quiet); font-size: .66rem; }
.push-settings { margin: 0 0 1rem; padding: 0 0 1rem; border-bottom: 1px solid var(--rule); }
.push-settings p { margin: 0 0 .55rem; }
.push-settings button { border: 1px solid var(--rule); border-radius: .3rem; padding: .4rem .65rem; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.push-settings button:hover { border-color: var(--link); }
.push-settings button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.push-settings button:disabled { cursor: wait; opacity: .65; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }
.telegram-link { display: inline-flex; align-items: center; gap: .3rem; }
.telegram-link svg { width: 1em; height: 1em; flex: none; fill: currentColor; }
.site-footer p { margin: .6rem 0 0; }

@media (max-width: 28rem) {
  :root { font-size: 19px; }
  .site-header, main, .site-footer { width: calc(100% - 2rem); }
  .site-header { align-items: flex-start; flex-direction: column; gap: .1rem; }
}

@media (prefers-color-scheme: dark) {
  :root { --paper: #1d1a17; --ink: #e9e0d1; --quiet: #b1a697; --rule: #4a433a; --link: #d5a777; --focus: #79b4ff; --blue: #78a4bd; --gold: #e0b451; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .story-share, .ad, .skip-link { display: none; } main { width: 100%; padding: 0; } }
