/* ==========================================================================
   Полимагия — типографика и интерфейс
   Статический сайт. Без внешних шрифтов и зависимостей.
   ========================================================================== */

:root {
  --bg: #0a0c12;
  --bg-deep: #07080d;
  --bg-soft: #10131c;
  --surface: #141824;
  --surface-2: #1a1f2d;
  --line: rgba(214, 196, 161, 0.14);
  --line-strong: rgba(214, 196, 161, 0.28);
  --text: #e9e3d6;
  --text-soft: #c4beb1;
  --muted: #938e83;
  --gold: #c9a45c;
  --gold-bright: #e0bd76;
  --gold-wash: rgba(201, 164, 92, 0.12);
  --violet: #9480d8;
  --violet-wash: rgba(148, 128, 216, 0.12);
  --teal: #65aaa1;
  --teal-wash: rgba(101, 170, 161, 0.12);
  --danger: #c97b6a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --max: 1180px;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.85);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html[data-theme="light"] {
  --bg: #f2ecdf;
  --bg-deep: #eae3d4;
  --bg-soft: #f7f2e8;
  --surface: #fbf7ee;
  --surface-2: #f3ecdf;
  --line: rgba(63, 49, 28, 0.16);
  --line-strong: rgba(63, 49, 28, 0.32);
  --text: #211d16;
  --text-soft: #3d372c;
  --muted: #6f6759;
  --gold: #8a6722;
  --gold-bright: #6e511a;
  --gold-wash: rgba(138, 103, 34, 0.1);
  --violet: #5b4a9e;
  --violet-wash: rgba(91, 74, 158, 0.09);
  --teal: #2f6f68;
  --teal-wash: rgba(47, 111, 104, 0.09);
  --shadow: 0 22px 50px -32px rgba(50, 38, 18, 0.45);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--line-strong) transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 620px at 78% -8%, var(--violet-wash), transparent 62%),
    radial-gradient(760px 540px at 8% 4%, var(--gold-wash), transparent 60%),
    radial-gradient(900px 700px at 50% 105%, rgba(101, 170, 161, 0.06), transparent 65%);
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.28;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.24'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

::selection { background: var(--gold); color: #0a0c12; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold-bright); }

img, svg { max-width: 100%; }
img { height: auto; }

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.2em; padding-left: 1.25em; }
li { margin-bottom: 0.45em; }
li::marker { color: var(--gold); }

hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  margin: 56px 0;
}

:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  transform: translateY(-160%);
  background: var(--gold);
  color: #0a0c12;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: none; }

.shell {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Шапка
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(18px) saturate(120%);
  border-bottom: 1px solid var(--line);
}

@supports not (background: color-mix(in srgb, red, blue)) {
  .site-header { background: rgba(10, 12, 18, 0.88); }
  html[data-theme="light"] .site-header { background: rgba(242, 236, 223, 0.9); }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.brand-mark {
  width: 34px;
  height: 34px;
  color: var(--gold);
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.brand-sub {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  font-size: 12.5px;
  letter-spacing: 0.04em;
}
.nav a {
  position: relative;
  padding: 6px 0;
  color: var(--text-soft);
  white-space: nowrap;
  transition: color 0.2s;
}
.nav a:hover { color: var(--text); }
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav a:hover::after,
.nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--gold-bright); }

.tools {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.tool {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text-soft);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.tool:hover {
  color: var(--gold-bright);
  border-color: var(--line-strong);
  background: var(--gold-wash);
}
.tool svg { width: 17px; height: 17px; }

html[data-theme="dark"] .theme-sun { display: none; }
html[data-theme="light"] .theme-moon { display: none; }

.menu-toggle { display: none; }
.menu-toggle span {
  display: block;
  width: 15px;
  height: 1.5px;
  background: currentColor;
  margin: 3px 0;
  transition: transform 0.2s;
}

.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1.5px;
  background: transparent;
}
.read-progress i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--gold), var(--violet));
  transform: scaleX(0);
  transform-origin: left;
}

/* --------------------------------------------------------------------------
   Мобильное меню и поиск
   -------------------------------------------------------------------------- */

.mobile-nav {
  position: fixed;
  top: 74px;
  left: 0;
  right: 0;
  z-index: 55;
  max-height: calc(100vh - 74px);
  overflow-y: auto;
  padding: 32px 0 44px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}
.mobile-nav .shell {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.mobile-nav h3 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav li { margin: 0 0 7px; }
.mobile-nav a { font-size: 15px; color: var(--text-soft); }
.mobile-nav a:hover { color: var(--gold-bright); }

.search {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  grid-template-rows: 1fr;
  padding: 10vh 20px 20px;
}
.search[hidden] { display: none; }
.search-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 10, 0.72);
  backdrop-filter: blur(8px);
}
.search-panel {
  position: relative;
  width: min(760px, 100%);
  margin: 0 auto;
  align-self: start;
  max-height: 76vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 40px 120px -30px #000;
  overflow: hidden;
}
.search-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 0;
}
.search-top h2 {
  font-size: 13px;
  font-family: var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}
.search-close {
  background: none;
  border: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  padding: 4px 6px;
}
.search-close:hover { color: var(--gold-bright); }
.search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.search-field svg { width: 20px; height: 20px; flex-shrink: 0; }
.search-field input {
  flex: 1;
  background: none;
  border: 0;
  outline: 0;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--text);
  min-width: 0;
}
.search-field input::placeholder { color: var(--muted); opacity: 0.8; }
.search-field kbd {
  font-family: var(--mono);
  font-size: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--muted);
}
.search-results {
  overflow-y: auto;
  padding: 10px;
}
.search-hint {
  padding: 20px 14px 24px;
  color: var(--muted);
  font-size: 14px;
}
.search-hit {
  display: block;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
}
.search-hit:hover,
.search-hit:focus-visible {
  background: var(--surface-2);
  border-color: var(--line);
}
.search-hit b {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
}
.search-hit span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}
.search-hit em {
  display: block;
  font-style: normal;
  font-size: 13px;
  color: var(--text-soft);
  margin-top: 4px;
}
.search-count {
  padding: 6px 14px 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Главная
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding: 82px 0 68px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 22px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.75;
}
.hero h1 {
  font-size: clamp(44px, 6.9vw, 86px);
  line-height: 0.94;
  letter-spacing: -0.035em;
  margin-bottom: 26px;
  overflow-wrap: break-word;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold-bright);
  font-weight: 400;
}
.hero-lede {
  max-width: 54ch;
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-soft);
  margin-bottom: 30px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-bottom: 46px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { border-color: var(--gold); color: var(--gold-bright); transform: translateY(-1px); }
.btn-solid {
  background: var(--gold);
  border-color: var(--gold);
  color: #0a0c12;
  font-weight: 600;
}
.btn-solid:hover { background: var(--gold-bright); border-color: var(--gold-bright); color: #0a0c12; }
.link-quiet {
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}
.link-quiet:hover { color: var(--gold-bright); border-color: var(--gold); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: start;
  gap: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.hero-stat b {
  display: block;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 500;
  color: var(--text);
  line-height: 1;
}
.hero-stat span {
  display: block;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-art {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}
.orbit {
  width: 100%;
  height: 100%;
  color: var(--gold);
  overflow: visible;
}
.orbit .ring-1 { animation: spin 90s linear infinite; transform-origin: 250px 250px; }
.orbit .ring-2 { animation: spin-rev 64s linear infinite; transform-origin: 250px 250px; }
.orbit .ring-3 { animation: spin 130s linear infinite; transform-origin: 250px 250px; }
.orbit .star { animation: pulse 7s ease-in-out infinite; transform-origin: 250px 250px; }
.orbit text {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  fill: currentColor;
  opacity: 0.65;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-rev { to { transform: rotate(-360deg); } }
@keyframes pulse {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.96); }
}

.hero-caption {
  position: absolute;
  left: 4%;
  bottom: 2%;
  max-width: 210px;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.7;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-left: 1px solid var(--line-strong);
  padding-left: 12px;
}

/* Бегущая строка */
.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 11px 0;
  background: var(--bg-soft);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 60s linear infinite;
}
.ticker span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  padding-right: 48px;
  white-space: nowrap;
}
.ticker span::after { content: "✦"; color: var(--gold); margin-left: 48px; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Секции */
.section { padding: 78px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}
.section-head h2 { font-size: clamp(30px, 4vw, 46px); }
.section-head .eyebrow { margin-bottom: 12px; }
.section-head p {
  max-width: 36ch;
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 4px;
}

.epoch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.epoch-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 268px;
  padding: 26px 26px 22px;
  background: linear-gradient(155deg, var(--surface), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.epoch-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(340px 180px at 80% 0%, var(--accent-wash, var(--gold-wash)), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}
.epoch-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.epoch-card:hover::before { opacity: 1; }
.epoch-card > * { position: relative; }
.epoch-num {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--accent, var(--gold));
  margin-bottom: 22px;
}
.epoch-glyph {
  position: absolute;
  top: 20px;
  right: 22px;
  font-family: var(--serif);
  font-size: 28px;
  color: var(--accent, var(--gold));
  opacity: 0.55;
}
.epoch-card h3 { font-size: 24px; margin-bottom: 8px; }
.epoch-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 20px;
}
.epoch-card .meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.epoch-card .meta svg { width: 14px; height: 14px; transition: transform 0.2s; }
.epoch-card:hover .meta svg { transform: translateX(4px); color: var(--gold); }
.c-gold { --accent: var(--gold); --accent-wash: var(--gold-wash); }
.c-violet { --accent: var(--violet); --accent-wash: var(--violet-wash); }
.c-teal { --accent: var(--teal); --accent-wash: var(--teal-wash); }

/* Хронология */
.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 132px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(var(--line-strong), var(--line), transparent);
}
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 34px;
  padding: 0 0 34px;
  margin: 0;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 127px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--gold);
  box-shadow: 0 0 0 4px var(--bg);
}
.timeline time {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--gold);
  padding-top: 3px;
  text-align: right;
}
.timeline h3 { font-size: 21px; margin-bottom: 4px; }
.timeline p { color: var(--muted); font-size: 14px; max-width: 66ch; margin: 0; }

/* Цитата */
.quote-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 72px 0;
  background: var(--bg-soft);
}
.quote-band blockquote {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  font-family: var(--serif);
  font-size: clamp(24px, 3.6vw, 40px);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.quote-band blockquote::before {
  content: "✦";
  display: block;
  font-size: 16px;
  color: var(--gold);
  margin-bottom: 22px;
}
.quote-band cite {
  display: block;
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Полка / три колонки */
.ledger {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.ledger > div {
  padding: 28px 28px 28px 0;
  border-bottom: 1px solid var(--line);
}
.ledger > div + div { padding-left: 28px; border-left: 1px solid var(--line); }
.ledger h3 { font-size: 20px; margin-bottom: 8px; }
.ledger p { font-size: 14px; color: var(--muted); margin: 0; }
.ledger .num {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 14px;
}

/* Широкая врезка */
.feature-band {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 44px;
  align-items: center;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(600px 260px at 92% 8%, var(--violet-wash), transparent 70%),
    linear-gradient(150deg, var(--surface), var(--bg-soft));
}
.feature-band h2 { font-size: clamp(28px, 3.4vw, 42px); margin-bottom: 14px; }
.feature-band p { color: var(--text-soft); font-size: 16px; max-width: 52ch; }
.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.feature-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-soft);
}
.feature-list b {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
}
.feature-list span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 860px) {
  .feature-band { grid-template-columns: 1fr; gap: 26px; padding: 26px; }
}

/* --------------------------------------------------------------------------
   Внутренние страницы
   -------------------------------------------------------------------------- */

.page-head {
  padding: 60px 0 44px;
  border-bottom: 1px solid var(--line);
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 26px;
}
.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs .sep { color: var(--line-strong); }
.page-head h1 {
  font-size: clamp(38px, 5.6vw, 68px);
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}
.page-lede {
  max-width: 68ch;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-soft);
}
.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 24px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.page-meta span { display: inline-flex; align-items: center; gap: 7px; }
.page-meta span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.7;
}

.article-wrap { padding: 54px 0 80px; }
.article-layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.article-layout > * { min-width: 0; }
.toc {
  position: sticky;
  top: 104px;
  font-size: 13px;
  border-left: 1px solid var(--line);
  padding-left: 18px;
}
.toc-title {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
}
.toc li { margin: 0 0 7px; counter-increment: toc; }
.toc li::before {
  content: "0" counter(toc) " ";
  font-family: var(--mono);
  font-size: 9px;
  color: var(--gold);
  opacity: 0.75;
}
.toc a { color: var(--text-soft); line-height: 1.4; }
.toc a:hover { color: var(--gold-bright); }

.prose {
  max-width: 74ch;
  font-size: 17.5px;
  line-height: 1.78;
  color: var(--text-soft);
}
.prose > p:first-of-type { font-size: 19px; color: var(--text); }
.prose h2 {
  font-size: clamp(26px, 3vw, 34px);
  margin: 58px 0 18px;
  color: var(--text);
  padding-top: 8px;
}
.prose h2:first-child { margin-top: 0; }
.prose h2 .h-num {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 400;
}
.prose h3 {
  font-size: 22px;
  margin: 34px 0 10px;
  color: var(--text);
}
.prose h4 {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 28px 0 8px;
  color: var(--gold);
}
.prose strong { color: var(--text); font-weight: 600; }
.prose em { color: var(--text); }
.prose a {
  color: var(--gold-bright);
  border-bottom: 1px solid rgba(201, 164, 92, 0.35);
}
.prose a:hover { border-color: var(--gold-bright); }
.prose ul, .prose ol { color: var(--text-soft); }
.prose li strong { color: var(--text); }
.prose blockquote {
  margin: 34px 0;
  padding: 4px 0 4px 26px;
  border-left: 1px solid var(--gold);
  font-family: var(--serif);
  font-size: 23px;
  line-height: 1.45;
  color: var(--text);
}
.prose blockquote p { margin: 0 0 10px; }
.prose blockquote cite {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-style: normal;
  color: var(--muted);
}
.prose .dropcap::first-letter {
  float: left;
  font-family: var(--serif);
  font-size: 72px;
  line-height: 0.78;
  padding: 8px 10px 0 0;
  color: var(--gold);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 14px;
  line-height: 1.5;
}
.prose th {
  text-align: left;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 400;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-strong);
}
.prose td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose tr:hover td { background: var(--surface); }

.note {
  margin: 30px 0;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 15px;
  line-height: 1.65;
}
.note-label {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.note p { margin: 0; color: var(--text-soft); }
.note--violet { border-left-color: var(--violet); }
.note--violet .note-label { color: var(--violet); }

.term-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 26px 0;
}
.term {
  padding: 18px 18px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.term b {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 5px;
}
.term span { font-size: 13.5px; color: var(--muted); line-height: 1.55; }

.figure {
  margin: 34px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.figure svg { display: block; width: 100%; height: auto; }
.figure figcaption {
  padding: 13px 18px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.split {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin: 28px 0;
}
.split .term { height: 100%; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 22px 0 0; }
.tag {
  display: inline-flex;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.pager a {
  display: block;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, background 0.2s;
}
.pager a:hover { border-color: var(--line-strong); background: var(--surface); }
.pager span {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.pager b { font-family: var(--serif); font-size: 20px; font-weight: 500; }
.pager .next { text-align: right; }

/* Фильтры */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 28px;
}
.chip {
  padding: 7px 14px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 12px;
  color: var(--muted);
  transition: all 0.2s;
}
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: #0a0c12;
  font-weight: 600;
}

/* Библиотека */
.book-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.book {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.book-year {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.08em;
  padding-top: 4px;
}
.book h3 { font-size: 21px; margin-bottom: 3px; }
.book .author {
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 9px;
}
.book p { font-size: 14.5px; color: var(--text-soft); margin: 0; max-width: 68ch; }
.book .tag { margin-top: 10px; }
.book[hidden] { display: none; }

/* Словарь */
.letter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin: 0 0 30px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.letter {
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.letter:hover { color: var(--text); border-color: var(--line); }
.letter.is-active { background: var(--gold); color: #0a0c12; }
.dict-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.dict-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.dict-card[hidden] { display: none; }
.dict-card dt {
  font-family: var(--serif);
  font-size: 21px;
  color: var(--text);
  margin-bottom: 4px;
}
.dict-card dd { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.dict-card .origin {
  display: block;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.8;
}
.dict-empty { color: var(--muted); padding: 24px 0; }

/* Календарь */
.month-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.month {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.month h3 {
  font-size: 20px;
  margin-bottom: 4px;
}
.month .date {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}
.month p { font-size: 13.5px; color: var(--muted); margin: 0; }
.month ul { margin: 10px 0 0; font-size: 13.5px; color: var(--text-soft); }

/* --------------------------------------------------------------------------
   Подвал
   -------------------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 58px 0 24px;
  background: var(--bg-deep);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p {
  max-width: 32ch;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.footer-note {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.footer h3 {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  font-weight: 400;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 8px; }
.footer a { font-size: 13.5px; color: var(--text-soft); }
.footer a:hover { color: var(--gold-bright); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Анимации появления
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Адаптивность
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
  .nav { gap: 15px; font-size: 11.5px; }
  .hero-grid { gap: 24px; }
  .article-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 40px; }
  .epoch-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .menu-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .menu-toggle span { margin: 2px 0; }
  body.menu-open .menu-toggle span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
  body.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
  body.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-3.5px) rotate(-45deg); }
  .hero { padding: 56px 0 50px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-grid > * { min-width: 0; }
  .hero-art { width: 100%; max-width: 360px; min-width: 0; margin: 4px auto 0; order: -1; }
  .hero-caption { display: none; }
  .hero h1 { font-size: clamp(44px, 11vw, 72px); }
  .article-layout { grid-template-columns: 1fr; }
  .toc {
    position: static;
    border-left: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
    margin-bottom: 8px;
  }
  .toc ol { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
  .toc li { margin: 0; min-width: 0; }
  .toc a { overflow-wrap: anywhere; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .mobile-nav .shell { grid-template-columns: 1fr 1fr; }
  .section { padding: 58px 0; }
  .timeline::before { left: 92px; }
  .timeline li { grid-template-columns: 92px 1fr; gap: 24px; }
  .timeline li::before { left: 87px; }
}

@media (max-width: 680px) {
  .shell { width: calc(100% - 30px); }
  .header-inner { height: 66px; gap: 12px; }
  .brand-name { font-size: 17px; }
  .brand-sub { display: none; }
  .brand-mark { width: 29px; height: 29px; }
  .mobile-nav { top: 66px; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 20px; }
  .hero-lede { font-size: 17px; }
  .hero-art { max-width: 300px; }
  .epoch-grid { grid-template-columns: 1fr; }
  .epoch-card { min-height: 0; }
  .ledger { grid-template-columns: 1fr; }
  .ledger > div + div { padding-left: 0; border-left: 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .term-grid, .split, .dict-grid, .month-grid { grid-template-columns: 1fr; }
  .book { grid-template-columns: 1fr; gap: 4px; }
  .book-year { padding-top: 0; }
  .pager { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .article-wrap { padding: 34px 0 56px; }
  .prose { font-size: 16.5px; }
  .prose table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .prose th, .prose td { min-width: 108px; }
  .prose blockquote { font-size: 20px; }
  .mobile-nav .shell { grid-template-columns: 1fr; gap: 22px; }
  .page-head { padding: 40px 0 32px; }
  .timeline::before { display: none; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; padding-bottom: 26px; }
  .timeline li::before { display: none; }
  .timeline time { text-align: left; }
  .search { padding: 5vh 10px 10px; }
  .search-field input { font-size: 18px; }
  .quote-band { padding: 50px 0; }
  .footer { padding-top: 40px; }
}

/* Печать */
@media print {
  body::before, body::after, .site-header, .footer, .toc, .pager, .search, .mobile-nav { display: none !important; }
  body { background: #fff; color: #000; }
  .prose { max-width: none; font-size: 11pt; }
  .page-head h1 { font-size: 28pt; }
  a { color: #000; text-decoration: underline; }
}
