@font-face { font-family: "Literata"; src: url("/assets/fonts/literata-cyrillic-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-style: normal; 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("/assets/fonts/literata-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212; }
@font-face { font-family: "Literata"; src: url("/assets/fonts/literata-cyrillic-wght-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; 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("/assets/fonts/literata-latin-wght-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212; }
@font-face { font-family: "Golos Text"; src: url("/assets/fonts/golos-text-cyrillic-wght-normal.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; src: url("/assets/fonts/golos-text-latin-wght-normal.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212; }

:root {
  --paper: #f5eee0;
  --paper-raised: #fbf6ec;
  --paper-sunk: #ecdfc9;
  --ink: #2c1f15;
  --ink-soft: #604c3a;
  --rule: #d6c5a9;
  --rule-strong: #4a2f1b;
  --brown: #6b4226;
  --link: #7c3f17;
  --link-hover: #a2521d;
  --green: #35664a;
  --green-wash: #e4ead8;
  --amber: #8a5a10;
  --amber-wash: #f3e3bd;
  --rust: #93391f;
  --rust-wash: #f3dcc9;
  --mark: #f1d48c;
  --serif: "Literata", "PT Serif", Georgia, "Times New Roman", serif;
  --sans: "Golos Text", "PT Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --measure: 40rem;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1f1813;
    --paper-raised: #2a211a;
    --paper-sunk: #171210;
    --ink: #ece0cf;
    --ink-soft: #bcab96;
    --rule: #463729;
    --rule-strong: #c9a77f;
    --brown: #d3a878;
    --link: #e2b07c;
    --link-hover: #f2cda2;
    --green: #93c6a4;
    --green-wash: #233229;
    --amber: #e3bb6b;
    --amber-wash: #352a14;
    --rust: #eb9f7e;
    --rust-wash: #3a2219;
    --mark: #6b5016;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--serif); font-feature-settings: "kern", "liga", "onum"; overflow-wrap: break-word; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.16em; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0 0 1em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10; font: 500 0.9rem var(--sans); }
.skip:focus { top: 8px; color: var(--paper); }

.site-header { border-bottom: 3px double var(--rule-strong); background: var(--paper); }
.header-inner { max-width: 72rem; margin: 0 auto; padding: 14px var(--gutter) 10px; display: flex; gap: 12px 28px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand:hover { color: var(--brown); }
.search-form { display: flex; flex: 0 1 22rem; min-width: min(100%, 15rem); }
.search-form input, .search-page input, .registry-tools input { width: 100%; font: 400 0.95rem var(--sans); color: var(--ink); background: var(--paper-raised); border: 1px solid var(--rule); border-radius: 3px; padding: 8px 10px; min-height: 40px; }
.search-form input { border-right: 0; border-radius: 3px 0 0 3px; }
.search-form input::placeholder, .search-page input::placeholder, .registry-tools input::placeholder { color: var(--ink-soft); }
.search-form button { font: 500 0.9rem var(--sans); color: var(--paper); background: var(--brown); border: 1px solid var(--brown); border-radius: 0 3px 3px 0; padding: 0 14px; min-height: 40px; cursor: pointer; }
.site-nav { max-width: 72rem; margin: 0 auto; padding: 0 var(--gutter) 8px; display: flex; gap: 4px 20px; flex-wrap: wrap; font: 500 0.875rem var(--sans); }
.site-nav a { color: var(--ink-soft); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brown); }

.is-home .header-inner { flex-direction: column; align-items: center; padding-top: 22px; }
.is-home .site-nav { justify-content: center; }
.is-home .search-form { flex-basis: auto; width: min(100%, 30rem); }
.masthead { text-align: center; }
.edition, .motto { font: 500 0.78rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin: 0; }
.wordmark { font-size: clamp(2rem, 6.4vw, 3.9rem); line-height: 1.05; margin: 8px 0; letter-spacing: -0.022em; font-weight: 800; }

main { min-height: 50vh; }
.home, .page, .article { max-width: 72rem; margin: 0 auto; padding: 24px var(--gutter) 48px; }
.page { max-width: 50rem; }
.page-hronologiya, .page-slovar { max-width: 46rem; }

.crumbs { font: 400 0.82rem var(--sans); color: var(--ink-soft); margin-bottom: 18px; }
.crumbs a { color: var(--ink-soft); }
.crumbs i { font-style: normal; margin: 0 6px; opacity: 0.6; }
.kicker { font: 600 0.76rem var(--sans); letter-spacing: 0.09em; text-transform: uppercase; color: var(--brown); margin: 0 0 6px; }
.article-head { max-width: 46rem; margin-bottom: 22px; }
.article-head h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); margin: 0 0 8px; }
.article-head h1.source-title { font-size: clamp(1.4rem, 3.6vw, 2rem); }
.aliases { font: 400 0.88rem var(--sans); color: var(--ink-soft); margin: 0 0 12px; }
.lede { font-size: 1.2rem; line-height: 1.5; margin: 0 0 12px; color: var(--ink); }
.grade { font: 400 0.84rem/1.45 var(--sans); padding-left: 10px; border-left: 3px solid var(--ink-soft); color: var(--ink-soft); margin: 0; }
.grade span { font-weight: 600; }
.grade-stable { border-left-color: var(--green); }
.grade-versions { border-left-color: var(--amber); }
.grade-thin { border-left-color: var(--rust); }

.article-grid { display: grid; grid-template-columns: minmax(0, var(--measure)) minmax(15rem, 19rem); gap: 0 48px; align-items: start; justify-content: space-between; }
.article-grid > .article-head { grid-column: 1; grid-row: 1; }
.article-main { min-width: 0; grid-column: 1; grid-row: 2; }
.infobox { grid-column: 2; grid-row: 1 / span 2; background: var(--paper-raised); border: 1px solid var(--rule); border-top: 3px solid var(--brown); padding: 12px 16px 14px; font: 400 0.88rem/1.45 var(--sans); position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; }
.infobox-title { font-weight: 600; margin: 0 0 8px; font-size: 0.76rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--brown); }
.infobox dl { margin: 0; }
.infobox dl div { padding: 7px 0; border-top: 1px solid var(--rule); }
.infobox dt { color: var(--ink-soft); font-size: 0.8rem; }
.infobox dd { margin: 0; }

.toc { background: var(--paper-sunk); padding: 10px 16px; margin: 0 0 22px; font: 400 0.9rem/1.5 var(--sans); }
.toc p { font-weight: 600; margin: 0 0 4px; }
.toc ol { margin: 0; padding-left: 1.3em; }

.prose { max-width: var(--measure); }
.prose h2 { font-size: 1.5rem; margin: 1.7em 0 0.5em; padding-bottom: 4px; border-bottom: 1px solid var(--rule); }
.prose h3 { font-size: 1.16rem; margin: 1.5em 0 0.35em; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
sup.fn { font: 600 0.68rem/0 var(--sans); }
sup.fn a { text-decoration: none; padding: 0 2px; }
sup.fn a:target { background: var(--mark); }

.callout { margin: 1.2em 0; padding: 10px 14px 2px; border-left: 3px solid var(--brown); background: var(--paper-raised); font-size: 0.98rem; }
.callout-title { font: 600 0.76rem var(--sans); letter-spacing: 0.08em; text-transform: uppercase; margin: 2px 0 4px; color: var(--brown); }
.callout p { margin-bottom: 0.7em; }
.callout-calc { border-left-color: var(--green); background: var(--green-wash); }
.callout-calc .callout-title { color: var(--green); }
.callout-hypothesis, .callout-unclear { border-left-color: var(--amber); background: var(--amber-wash); }
.callout-hypothesis .callout-title, .callout-unclear .callout-title { color: var(--amber); }
.callout-caution { border-left-color: var(--rust); background: var(--rust-wash); }
.callout-caution .callout-title { color: var(--rust); }
.article-main > .callout { max-width: var(--measure); margin-top: 0; }

.table { overflow-x: auto; margin: 1.2em 0; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font: 400 0.9rem/1.45 var(--sans); }
th { text-align: left; font-weight: 600; border-bottom: 2px solid var(--rule-strong); padding: 6px 10px 6px 0; vertical-align: bottom; }
td { border-bottom: 1px solid var(--rule); padding: 7px 10px 7px 0; vertical-align: top; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.prose .route, .prose .timeline { padding-left: 0; }
.infobox figure { margin: 0 0 12px; }
.infobox img { display: block; width: 100%; height: auto; background: var(--paper-sunk); }
.infobox figcaption { font-size: 0.78rem; line-height: 1.4; color: var(--ink-soft); margin-top: 6px; }
.route { list-style: none; counter-reset: step; margin: 1.3em 0; padding: 0; }
.route li { counter-increment: step; position: relative; padding: 0 0 14px 44px; margin: 0; }
.route li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--brown); color: var(--paper); font: 600 0.82rem/30px var(--sans); text-align: center; }
.route li::after { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: var(--rule); }
.route li:last-child::after { display: none; }
.route strong, .route span { display: block; }
.route span { color: var(--ink-soft); font-size: 0.95rem; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 1.3em 0; }
.stats div { background: var(--paper-raised); padding: 10px 12px; }
.stats dt { font-weight: 700; font-size: 1.3rem; line-height: 1.2; font-variant-numeric: lining-nums; }
.stats dd { margin: 2px 0 0; font: 400 0.82rem/1.4 var(--sans); color: var(--ink-soft); }

.house { margin: 1.3em 0; }
.house-grid { display: inline-grid; grid-template-columns: repeat(4, 44px); gap: 6px; padding: 8px; background: var(--paper-sunk); }
.stack { display: grid; gap: 2px; }
.stack i { display: block; height: 10px; background: var(--brown); opacity: 0.85; }
.house figcaption { font: 400 0.84rem var(--sans); color: var(--ink-soft); margin-top: 4px; }

.timeline { list-style: none; margin: 0 0 1.5em; padding: 0; }
.timeline li { display: grid; grid-template-columns: 6.4rem 1fr; gap: 0 12px; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.timeline time { font: 600 0.86rem/1.5 var(--sans); font-variant-numeric: tabular-nums; }
.tl-kind { grid-column: 1; grid-row: 2; font: 500 0.72rem var(--sans); color: var(--ink-soft); }
.timeline p { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
.tl-world time { color: var(--green); }
.tl-plan time { color: var(--amber); }

.notes { margin-top: 2.4em; border-top: 2px solid var(--rule-strong); padding-top: 4px; font: 400 0.88rem/1.5 var(--sans); max-width: var(--measure); }
.notes h2 { font-size: 1.1rem; margin: 10px 0 2px; }
.notes-hint { color: var(--ink-soft); font-size: 0.82rem; }
.notes ol { padding-left: 1.7em; margin: 0; }
.notes li { margin-bottom: 7px; scroll-margin-top: 8px; }
.notes li:target { background: var(--mark); }
.back a { text-decoration: none; }
.stamp { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

.article-foot { margin-top: 28px; padding-top: 6px; border-top: 1px solid var(--rule); max-width: 46rem; font-family: var(--sans); }
.article-foot h2, .page section h2 { font-size: 1rem; margin: 16px 0 8px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; font: 400 0.88rem var(--sans); }
.tags a { display: inline-block; padding: 4px 10px; border: 1px solid var(--rule); border-radius: 3px; background: var(--paper-raised); text-decoration: none; }
.tags a:hover { border-color: var(--link); }

.cards { list-style: none; margin: 0; padding: 0; }
.cards a { display: block; padding: 12px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.cards strong { display: block; font-size: 1.15rem; color: var(--link); }
.cards a:hover strong { color: var(--link-hover); }
.cards span { display: block; color: var(--ink-soft); font-size: 0.98rem; }

.button { display: inline-block; font: 500 0.92rem var(--sans); background: var(--brown); color: var(--paper); padding: 9px 16px; border-radius: 3px; text-decoration: none; border: 1px solid var(--brown); }
.button:hover { color: var(--paper); opacity: 0.9; }
.button-quiet { background: transparent; color: var(--link); }
.button-quiet:hover { color: var(--link-hover); }

.front { display: grid; grid-template-columns: minmax(0, 1fr) minmax(17rem, 22rem); gap: 24px 48px; padding: 12px 0 30px; border-bottom: 1px solid var(--rule-strong); }
.front h2 { font-size: clamp(1.9rem, 4.4vw, 2.8rem); margin: 0 0 12px; }
.front h2 a { color: var(--ink); text-decoration: none; }
.front h2 a:hover { color: var(--brown); }
.front-links { margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.ledger { background: var(--paper-raised); border: 1px solid var(--rule); padding: 12px 16px; font-family: var(--sans); }
.ledger-title { font-weight: 600; font-size: 0.76rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--brown); margin: 0 0 4px; }
.ledger dl { margin: 0; }
.ledger dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 6px 0; border-top: 1px solid var(--rule); }
.ledger dt { font: 700 1.15rem var(--serif); font-variant-numeric: lining-nums; white-space: nowrap; }
.ledger dd { margin: 0; font-size: 0.85rem; color: var(--ink-soft); text-align: right; }
.sections > h2 { font-size: 1.5rem; margin: 26px 0 12px; }
.section-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 8px 40px; }
.section-grid h3 { font-size: 1.14rem; margin: 10px 0 6px; padding-bottom: 4px; border-bottom: 2px solid var(--rule-strong); display: flex; justify-content: space-between; }
.section-grid h3 a { color: var(--ink); text-decoration: none; }
.section-grid h3 span { font: 500 0.82rem var(--sans); color: var(--ink-soft); }
.section-grid ul { list-style: none; padding: 0; margin: 0 0 12px; font-size: 1rem; line-height: 1.4; }
.section-grid li { padding: 4px 0; }
.reading { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 8px 40px; margin-top: 26px; padding-top: 10px; border-top: 1px solid var(--rule-strong); font-size: 0.98rem; }
.reading h2 { font-size: 1.1rem; margin: 10px 0 6px; }
.reading p { margin-bottom: 0.5em; }

.registry-tools { display: flex; gap: 8px 12px; flex-wrap: wrap; margin: 18px 0 4px; align-items: stretch; }
.registry-tools input { flex: 1 1 15rem; }
.segmented { display: flex; }
.segmented button { font: 500 0.85rem var(--sans); color: var(--ink); background: var(--paper-raised); border: 1px solid var(--rule); padding: 0 12px; min-height: 40px; cursor: pointer; }
.segmented button + button { border-left: 0; }
.segmented button[aria-pressed="true"] { background: var(--brown); border-color: var(--brown); color: var(--paper); }
.stamp-cell { font-weight: 600; white-space: nowrap; }
.flag { font-size: 0.74rem; color: var(--rust); white-space: nowrap; }
.source-card { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 0 0 18px; font: 400 0.9rem/1.4 var(--sans); }
.source-card div { background: var(--paper-raised); padding: 8px 12px; }
.source-card dt { font-size: 0.78rem; color: var(--ink-soft); }
.source-card dd { margin: 0; }
.fragments { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 2px 12px; font: 400 0.86rem/1.7 var(--sans); }

.search-page input { font-size: 1.05rem; min-height: 46px; }
.search-status { font: 400 0.88rem var(--sans); color: var(--ink-soft); margin: 10px 0; }
.results { list-style: none; margin: 0; padding: 0; }
.results a { display: block; padding: 11px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.results strong { display: block; color: var(--link); font-size: 1.1rem; }
.result-kind { font: 600 0.7rem var(--sans); letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-soft); }
.result-text { display: block; font-size: 0.95rem; color: var(--ink-soft); }
mark { background: var(--mark); color: inherit; }

.site-footer { border-top: 3px double var(--rule-strong); margin-top: 16px; font: 400 0.84rem/1.5 var(--sans); color: var(--ink-soft); }
.footer-inner { max-width: 72rem; margin: 0 auto; padding: 18px var(--gutter) 28px; display: flex; gap: 20px; align-items: flex-start; }
.footer-inner p { margin-bottom: 0.5em; }
.seal { flex: 0 0 84px; width: 84px; height: 84px; color: var(--brown); }

@media (max-width: 62rem) {
  .article-grid { grid-template-columns: minmax(0, 1fr); }
  .article-main { grid-row: 3; grid-column: 1; }
  .infobox { grid-column: 1; grid-row: 2; position: static; max-height: none; margin-bottom: 22px; max-width: var(--measure); }
  .front { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 34rem) {
  body { font-size: 1.03rem; }
  .lede { font-size: 1.1rem; }
  .site-nav { gap: 2px 14px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; white-space: nowrap; }
  .is-home .site-nav { justify-content: flex-start; }
  .timeline li { grid-template-columns: minmax(0, 1fr); }
  .tl-kind { grid-column: 1; grid-row: 2; }
  .timeline p { grid-column: 1; grid-row: 3; margin-top: 2px; }
  .footer-inner { flex-direction: column; }
  .edition, .motto { font-size: 0.68rem; letter-spacing: 0.06em; }
}
@media print {
  .site-header, .site-footer, .toc { display: none; }
  body { background: #fff; color: #000; }
}
