/* ============================================================
   СПАДОК — редакційна система 2026
   Архівна палітура: темний оксамит, теплий папір, латунь.
   ============================================================ */

:root {
  --ink: #14150f;
  --ink-2: #1b1c15;
  --ink-3: #26271d;
  --ink-soft: #343528;
  --paper: #efe5d2;
  --paper-2: #e3d6bd;
  --paper-3: #f8f1e2;
  --paper-deep: #d2bf9b;
  --gold: #bd9857;
  --gold-2: #d6b678;
  --gold-3: #8b6a37;
  --oxblood: #8a3b31;
  --moss: #596b52;
  --slate: #3d515c;
  --muted: #a39780;
  --muted-dark: #6f6250;
  --line: rgba(20, 21, 15, 0.16);
  --line-strong: rgba(20, 21, 15, 0.3);
  --line-light: rgba(239, 229, 210, 0.14);
  --line-gold: rgba(189, 152, 87, 0.44);
  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --body: "Literata", "Times New Roman", Georgia, serif;
  --sans: "Manrope", "Segoe UI", system-ui, sans-serif;
  --shadow: 0 34px 90px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 18px 50px rgba(20, 21, 15, 0.1);
  --container: 1320px;
  --pad: clamp(20px, 4vw, 60px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --header-h: 76px;
}

html { background: var(--ink); }

body {
  background:
    radial-gradient(circle at 8% -4%, rgba(189, 152, 87, 0.13), transparent 30rem),
    radial-gradient(circle at 92% 4%, rgba(138, 59, 49, 0.09), transparent 26rem),
    var(--ink);
  font-size: 16.5px;
  line-height: 1.72;
}

::selection { background: var(--gold-2); color: var(--ink); }

h1, h2, h3, h4 { font-weight: 500; letter-spacing: -0.028em; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

[hidden] { display: none !important; }

.container { width: min(calc(100% - (var(--pad) * 2)), var(--container)); }

/* ── Header ─────────────────────────────────────────────── */

.site-header {
  border-bottom: 1px solid rgba(239, 229, 210, 0.08);
  background: linear-gradient(180deg, rgba(20, 21, 15, 0.94), rgba(20, 21, 15, 0.68));
  backdrop-filter: blur(10px);
}
.site-header.is-scrolled {
  background: rgba(20, 21, 15, 0.95);
  border-bottom-color: var(--line-light);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}
.header-inner { height: var(--header-h); gap: 26px; }

.brand-mark {
  width: 38px; height: 38px;
  border-color: rgba(214, 182, 120, 0.34);
  background: rgba(189, 152, 87, 0.04);
}
.brand-mark svg { width: 30px; height: 30px; }
.brand-copy strong { font-size: 20px; letter-spacing: 0.18em; }
.brand-copy small { font-size: 7.5px; letter-spacing: 0.28em; }

.primary-nav { gap: clamp(12px, 1.7vw, 26px); }
.primary-nav a {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  padding: 10px 0;
}
.primary-nav a.is-active { color: var(--gold-2); }

.header-actions { gap: 10px; }

.header-search {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-light);
  background: rgba(239, 229, 210, 0.03);
  color: rgba(239, 229, 210, 0.78);
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}
.header-search:hover {
  border-color: var(--line-gold);
  background: rgba(189, 152, 87, 0.1);
  color: var(--paper);
}
.header-search kbd {
  font-family: var(--sans);
  font-size: 8px;
  padding: 2px 5px;
  border: 1px solid var(--line-light);
  color: var(--muted);
}

.seal-balance {
  min-height: 38px;
  border-color: var(--line-light);
  padding: 0 10px;
  font-size: 10px;
}
.header-cta { min-height: 38px; padding: 8px 14px; font-size: 9px; }

/* ── Shared editorial pieces ─────────────────────────────── */

.kicker { letter-spacing: 0.2em; }
.section { padding: clamp(72px, 9vw, 130px) 0; }
.section-dark { background: var(--ink); }
.section-paper {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 20%),
    var(--paper);
  color: var(--ink);
}
.section-head { align-items: end; gap: clamp(26px, 5vw, 80px); }
.section-head .section-title { margin-top: 14px; }
.section-head p { max-width: 440px; }
.section-head--compact { align-items: end; margin-bottom: 30px; }
.section-head--compact .section-title { font-size: clamp(2.1rem, 3.4vw, 3.4rem); }

.page-hero {
  padding: calc(var(--header-h) + clamp(64px, 8vw, 108px)) 0 clamp(58px, 7vw, 92px);
}
.page-hero::before { opacity: 0.25; }
.page-hero-grid { grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.65fr); gap: clamp(32px, 6vw, 90px); }
.page-title { font-size: clamp(3.2rem, 7vw, 7rem); line-height: 0.86; }
.page-hero .lead { max-width: 660px; }
.page-hero-aside {
  border-left: 1px solid var(--line-gold);
  padding-left: 26px;
}

.btn { min-height: 48px; font-size: 10px; letter-spacing: 0.16em; }
.btn-primary { background: var(--gold-2); border-color: var(--gold-2); color: var(--ink); }
.btn-primary:hover { background: var(--paper-3); border-color: var(--paper-3); }
.btn-outline { border-color: var(--line-gold); }
.btn-ink { background: var(--ink); }

.empty-state { border: 1px solid var(--line); padding: clamp(34px, 6vw, 70px); }

/* ── Home hero ──────────────────────────────────────────── */

.home-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--header-h) + clamp(56px, 7vw, 96px)) 0 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(189, 152, 87, 0.14), transparent 30rem),
    radial-gradient(circle at 84% 26%, rgba(61, 81, 92, 0.2), transparent 34rem),
    linear-gradient(180deg, #171811, #12130d 74%);
  color: var(--paper);
}
.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(239, 229, 210, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239, 229, 210, 0.035) 1px, transparent 1px);
  background-size: 92px 92px;
  mask-image: radial-gradient(circle at 60% 30%, #000 0, transparent 72%);
  pointer-events: none;
}
.home-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: clamp(38px, 6vw, 96px);
  align-items: center;
  padding-bottom: clamp(54px, 7vw, 92px);
}
.home-kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.home-kicker .rule { width: 52px; background: var(--gold); }
.home-title {
  margin: clamp(22px, 3vw, 36px) 0 0;
  font-family: var(--serif);
  font-size: clamp(3.7rem, 8.4vw, 8.7rem);
  font-weight: 500;
  line-height: 0.82;
  letter-spacing: -0.052em;
  max-width: 1000px;
}
.home-title em { font-style: italic; color: var(--gold-2); }
.home-lead {
  max-width: 690px;
  margin-top: clamp(22px, 3vw, 32px);
  font-size: clamp(0.98rem, 1.3vw, 1.08rem);
  line-height: 1.78;
  color: rgba(239, 229, 210, 0.68);
}
.home-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 720px;
  margin-top: clamp(28px, 4vw, 42px);
  padding: 7px 7px 7px 18px;
  border: 1px solid rgba(214, 182, 120, 0.42);
  background: rgba(239, 229, 210, 0.045);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.home-search:focus-within { border-color: var(--gold-2); background: rgba(239, 229, 210, 0.07); }
.home-search__icon { color: var(--gold-2); font-size: 18px; line-height: 1; }
.home-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--paper);
  font-family: var(--body);
  font-size: 14px;
  outline: none;
  padding: 10px 0;
}
.home-search input::placeholder { color: rgba(239, 229, 210, 0.42); }
.home-search .btn { min-height: 44px; padding: 0 18px; }

.home-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 16px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(239, 229, 210, 0.48);
}
.home-quick a, .home-quick button {
  border: 0; background: none; padding: 0;
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  color: rgba(239, 229, 210, 0.66);
  border-bottom: 1px solid transparent;
}
.home-quick a:hover, .home-quick button:hover { color: var(--gold-2); border-bottom-color: var(--line-gold); }
.home-quick kbd { font-family: var(--sans); font-size: 8px; padding: 1px 4px; border: 1px solid var(--line-light); }

.home-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 3vw, 44px);
  margin-top: clamp(30px, 4vw, 46px);
  padding-top: 22px;
  border-top: 1px solid var(--line-light);
}
.home-stats div { display: flex; flex-direction: column; gap: 2px; }
.home-stats strong {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 2.6vw, 2.5rem);
  font-weight: 500;
  line-height: 1;
  color: var(--paper);
}
.home-stats span {
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.home-ledger {
  position: relative;
  padding: clamp(26px, 3vw, 38px);
  border: 1px solid rgba(214, 182, 120, 0.34);
  background:
    linear-gradient(145deg, rgba(189, 152, 87, 0.09), transparent 46%),
    rgba(20, 21, 15, 0.52);
  box-shadow: var(--shadow);
}
.home-ledger::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(239, 229, 210, 0.08);
  pointer-events: none;
}
.home-ledger__head {
  display: flex;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.home-ledger__seal {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  margin: 26px 0 20px;
  border: 1px solid var(--line-gold);
  transform: rotate(45deg);
}
.home-ledger__seal span {
  transform: rotate(-45deg);
  font-family: var(--serif);
  font-size: 27px;
  color: var(--gold-2);
}
.home-ledger__label {
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.home-ledger h2 {
  margin: 10px 0 12px;
  font-family: var(--serif);
  font-size: clamp(2rem, 2.5vw, 2.6rem);
  line-height: 0.96;
  color: var(--paper);
}
.home-ledger p { font-size: 12.5px; line-height: 1.7; color: rgba(239, 229, 210, 0.56); }
.home-ledger__rows { margin: 24px 0; border-top: 1px solid var(--line-light); }
.home-ledger__rows a {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-light);
  font-family: var(--sans);
  font-size: 9.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(239, 229, 210, 0.74);
}
.home-ledger__rows a:hover { color: var(--gold-2); }
.home-ledger__rows span:last-child { color: var(--muted); }
.home-ledger .link-arrow { color: var(--gold-2); }

.home-hero__foot {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 18px 0 22px;
  border-top: 1px solid var(--line-light);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(239, 229, 210, 0.34);
}

/* ── Home entries ───────────────────────────────────────── */

.home-entries { padding-top: clamp(64px, 8vw, 108px); }
.home-entries .home-section-head { margin-bottom: clamp(34px, 5vw, 60px); }
.home-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.55fr);
  gap: clamp(22px, 5vw, 70px);
  align-items: end;
}
.home-section-head h2 {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4.6vw, 4.6rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
}
.home-section-head p { max-width: 430px; justify-self: end; color: rgba(20, 21, 15, 0.64); }
.section-dark .home-section-head p { color: var(--muted); }

.entry-rail {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
}
.entry-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 270px;
  padding: clamp(24px, 3vw, 36px);
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.entry-card:hover { background: var(--paper-3); }
.entry-card--lead {
  grid-row: span 2;
  min-height: 100%;
  background: var(--ink);
  color: var(--paper);
}
.entry-card--lead:hover { background: var(--ink-3); }
.entry-card__top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-3);
}
.entry-card--lead .entry-card__top { color: var(--gold-2); }
.entry-card__num {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4vw, 4rem);
  line-height: 0.8;
  color: var(--gold-3);
  opacity: 0.5;
}
.entry-card--lead .entry-card__num { color: var(--gold-2); opacity: 0.8; }
.entry-card h3 {
  margin: 20px 0 10px;
  font-family: var(--serif);
  font-size: clamp(2rem, 3.1vw, 3.2rem);
  line-height: 0.94;
}
.entry-card p { font-size: 13px; line-height: 1.68; color: rgba(20, 21, 15, 0.62); }
.entry-card--lead p { color: rgba(239, 229, 210, 0.6); max-width: 420px; }
.entry-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 22px;
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-dark);
}
.entry-card--lead .entry-card__meta { color: var(--muted); }
.entry-card__arrow {
  position: absolute;
  right: clamp(20px, 3vw, 34px);
  bottom: clamp(20px, 3vw, 34px);
  font-size: 20px;
  color: var(--gold-3);
  transition: transform 0.3s var(--ease);
}
.entry-card:hover .entry-card__arrow { transform: translate(3px, -3px); }
.entry-card--lead .entry-card__arrow { color: var(--gold-2); }

/* ── Century rail ───────────────────────────────────────── */

.home-centuries { background: var(--ink-2); }
.century-rail {
  display: grid;
  grid-template-columns: repeat(12, minmax(78px, 1fr));
  margin-top: clamp(32px, 4vw, 50px);
  border-top: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
  overflow-x: auto;
}
.century-spine {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 188px;
  padding: 22px 12px 18px;
  border-right: 1px solid var(--line-light);
  transition: background 0.25s ease, color 0.25s ease;
}
.century-spine:first-child { border-left: 1px solid var(--line-light); }
.century-spine:hover { background: rgba(189, 152, 87, 0.09); }
.century-spine__roman {
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1;
  color: var(--gold-2);
}
.century-spine__years {
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.08em;
  color: var(--muted);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  margin: 2px 0 auto;
}
.century-spine__count {
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.08em;
  color: rgba(239, 229, 210, 0.48);
}
.century-spine:hover .century-spine__count { color: var(--gold-2); }

/* ── Home topic grid ────────────────────────────────────── */

.home-topics .home-section-head { margin-bottom: 28px; }
.home-topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}
.home-topic-grid .topic-card {
  border: 0;
  background: var(--paper-3);
  min-height: 250px;
}
.home-topic-grid .topic-card:hover { background: #fff9ec; }
.home-topics__foot { display: flex; justify-content: center; margin-top: 32px; }

.topic-card {
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: clamp(22px, 2.6vw, 32px);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.2);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.topic-card:hover { background: rgba(255, 255, 255, 0.46); border-color: var(--line-strong); transform: translateY(-2px); }
.topic-card__top { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.topic-card__type {
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-3);
}
.topic-card__arrow { color: var(--gold-3); transition: transform 0.25s ease; }
.topic-card:hover .topic-card__arrow { transform: translate(2px, -2px); }
.topic-card h3 { margin: 20px 0 10px; font-family: var(--serif); font-size: clamp(1.7rem, 2.2vw, 2.3rem); line-height: 0.98; }
.topic-card p { font-size: 13px; line-height: 1.65; color: rgba(20, 21, 15, 0.62); }
.topic-card__tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 16px; }
.topic-card__tags span {
  font-family: var(--sans);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 7px;
  border: 1px solid var(--line);
  color: var(--muted-dark);
}
.topic-card__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-dark);
}
.topic-card__foot span:last-child { margin-left: auto; color: var(--gold-3); }

/* ── Home epoch ─────────────────────────────────────────── */

.home-epoch { background: linear-gradient(180deg, #191a13, #14150f); }
.home-epoch__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(32px, 6vw, 90px);
  align-items: center;
}
.home-epoch figure { margin: 0; position: relative; }
.home-epoch figure img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: sepia(0.16) contrast(1.02) brightness(0.92);
}
.home-epoch figure::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(239, 229, 210, 0.18);
  pointer-events: none;
}
.home-epoch figcaption {
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.home-epoch__copy h2 { margin: 16px 0 20px; font-size: clamp(2.8rem, 5.2vw, 5.4rem); line-height: 0.88; }
.home-epoch__copy .lead { max-width: 520px; color: rgba(239, 229, 210, 0.66); }
.home-epoch__list { margin: 30px 0; border-top: 1px solid var(--line-light); }
.home-epoch__list a {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-light);
  transition: color 0.2s ease, padding-left 0.25s ease;
}
.home-epoch__list a:hover { color: var(--gold-2); padding-left: 4px; }
.home-epoch__list span { font-family: var(--sans); font-size: 8.5px; letter-spacing: 0.1em; color: var(--gold-2); }
.home-epoch__list strong { font-family: var(--body); font-size: 14px; font-weight: 500; }
.home-epoch__list small { font-family: var(--sans); font-size: 8px; letter-spacing: 0.08em; color: var(--muted); }

/* ── Home reading ───────────────────────────────────────── */

.home-reading .home-section-head { margin-bottom: 38px; }
.home-reading-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: clamp(28px, 4vw, 56px);
}
.home-feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.25);
  transition: background 0.3s ease;
}
.home-feature:hover { background: var(--paper-3); }
.home-feature__image { min-height: 340px; overflow: hidden; }
.home-feature__image img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.14); transition: transform 0.6s var(--ease); }
.home-feature:hover img { transform: scale(1.02); }
.home-feature__copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(24px, 3vw, 40px); }
.home-feature__copy h3 { margin: 14px 0 12px; font-size: clamp(2rem, 3vw, 3rem); line-height: 0.96; }
.home-feature__copy p { font-size: 13.5px; line-height: 1.68; color: rgba(20, 21, 15, 0.64); }
.home-feature__copy .link-underline { align-self: flex-start; margin-top: 24px; color: var(--ink); }
.home-article-list { display: flex; flex-direction: column; border-top: 1px solid var(--line-strong); }
.home-article-list a {
  display: grid;
  gap: 7px;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.25s ease;
}
.home-article-list a:hover { padding-left: 5px; }
.home-article-list span { font-family: var(--sans); font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-3); }
.home-article-list strong { font-family: var(--serif); font-size: 22px; line-height: 1.05; font-weight: 500; }
.home-article-list small { font-size: 12px; color: var(--muted-dark); }

/* ── Home figures ───────────────────────────────────────── */

.home-figures { background: var(--ink-2); }
.home-figures .home-section-head { margin-bottom: 40px; }
.figure-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-light);
  border: 1px solid var(--line-light);
}
.figure-tile {
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: var(--ink);
  transition: background 0.3s ease;
}
.figure-tile:hover { background: var(--ink-3); }
.figure-tile__portrait {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--ink-3);
}
.figure-tile__portrait img {
  width: 100%; height: 100%; object-fit: cover;
  filter: sepia(0.26) contrast(0.98) brightness(0.88);
  transition: transform 0.6s var(--ease), filter 0.4s ease;
}
.figure-tile:hover img { transform: scale(1.035); filter: sepia(0.16) contrast(1) brightness(0.96); }
.figure-tile__portrait::after { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(239, 229, 210, 0.16); }
.figure-tile__role {
  margin-top: 16px;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.figure-tile h3 { margin: 8px 0 6px; font-family: var(--serif); font-size: 25px; }
.figure-tile p { font-size: 11.5px; line-height: 1.6; color: var(--muted); }

/* ── Home daily / closing ───────────────────────────────── */

.home-daily { background: var(--paper); }
.home-daily__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 90px);
  align-items: start;
}
.home-daily__copy h2 { margin: 14px 0 18px; font-size: clamp(2.6rem, 4.4vw, 4.4rem); line-height: 0.9; }
.home-daily__copy p { color: rgba(20, 21, 15, 0.64); max-width: 390px; }
.home-daily .daily-card { background: var(--ink); color: var(--paper); }

.home-closing {
  position: relative;
  overflow: hidden;
  padding: clamp(80px, 10vw, 140px) 0;
  text-align: center;
  background:
    radial-gradient(circle at 50% 20%, rgba(189, 152, 87, 0.14), transparent 28rem),
    var(--ink);
}
.home-closing h2 { max-width: 780px; margin: 20px auto; font-size: clamp(2.8rem, 5.4vw, 5.4rem); line-height: 0.9; }
.home-closing p { max-width: 520px; margin: 0 auto 30px; color: var(--muted); }

/* ── Search overlay ─────────────────────────────────────── */

body.search-open { overflow: hidden; }

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: start center;
  padding: 10vh 20px 20px;
}
.search-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 8, 0.76);
  backdrop-filter: blur(8px);
}
.search-palette {
  position: relative;
  width: min(760px, 100%);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5);
  animation: palette-in 0.28s var(--ease) both;
}
@keyframes palette-in {
  from { opacity: 0; transform: translateY(-12px) scale(0.99); }
  to { opacity: 1; transform: none; }
}
.search-palette__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.search-palette__mark { font-size: 20px; color: var(--gold-3); }
.search-palette__head input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  outline: none;
}
.search-palette__head input::placeholder { color: var(--muted-dark); }
.search-palette__close {
  border: 1px solid var(--line);
  background: none;
  padding: 5px 8px;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.1em;
  color: var(--muted-dark);
}
.search-palette__close:hover { border-color: var(--gold-3); color: var(--ink); }
.search-palette__body { overflow-y: auto; padding: 18px; }
.search-palette__section { margin-bottom: 18px; }
.search-palette__label {
  display: block;
  margin-bottom: 10px;
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-dark);
}
.search-palette__chips { display: flex; flex-wrap: wrap; gap: 7px; }
.search-palette__chips button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.24);
  padding: 7px 10px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.search-palette__chips button:hover { border-color: var(--gold-3); background: var(--paper-3); }
.search-palette__legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-family: var(--sans); font-size: 9px; color: var(--muted-dark); }
.search-suggestion {
  display: grid;
  grid-template-columns: 78px 1fr auto 18px;
  gap: 10px;
  align-items: baseline;
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s ease, padding-left 0.2s ease;
}
.search-suggestion:hover { background: rgba(189, 152, 87, 0.12); padding-left: 12px; }
.search-suggestion__type {
  font-family: var(--sans);
  font-size: 7.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-3);
}
.search-suggestion__title { font-family: var(--body); font-size: 13.5px; font-weight: 600; }
.search-suggestion__meta { font-family: var(--sans); font-size: 8px; color: var(--muted-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.search-palette__all {
  display: block;
  padding: 12px 8px 4px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-3);
}
.search-palette__empty { display: flex; flex-direction: column; gap: 6px; padding: 22px 0; }
.search-palette__empty strong { font-family: var(--serif); font-size: 26px; }
.search-palette__empty span { font-size: 13px; color: var(--muted-dark); }
.search-palette__empty a { margin-top: 8px; font-family: var(--sans); font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-3); }
.search-palette__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-dark);
}
.search-palette__foot kbd {
  font-family: var(--sans);
  font-size: 7px;
  padding: 1px 4px;
  border: 1px solid var(--line);
}

mark { background: rgba(189, 152, 87, 0.34); color: inherit; padding: 0 1px; }

/* ── Search page ────────────────────────────────────────── */

.search-hero { --page-hero-image: none; }
.search-hero .page-title { max-width: 900px; }
.search-page-form {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 880px;
  margin-top: 30px;
  padding: 8px 8px 8px 20px;
  border: 1px solid var(--line-gold);
  background: rgba(239, 229, 210, 0.05);
}
.search-page-form > span { color: var(--gold-2); font-size: 20px; }
.search-page-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  outline: none;
  padding: 10px 0;
}
.search-page-form input::placeholder { color: var(--muted); }
.search-popular {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 18px;
  font-family: var(--sans);
  font-size: 9px;
  color: var(--muted);
}
.search-popular button {
  border: 0;
  border-bottom: 1px solid var(--line-light);
  background: none;
  padding: 2px 0;
  font: inherit;
  color: rgba(239, 229, 210, 0.74);
}
.search-popular button:hover { color: var(--gold-2); border-bottom-color: var(--gold-2); }

.search-page { padding: 38px 0 clamp(60px, 8vw, 110px); }
.search-filters { display: flex; flex-direction: column; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line-light); }
.search-type-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip {
  border: 1px solid var(--line-light);
  background: none;
  padding: 7px 11px;
  font-family: var(--sans);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.filter-chip:hover { border-color: var(--line-gold); color: var(--paper); }
.filter-chip.is-active { background: var(--gold-2); border-color: var(--gold-2); color: var(--ink); }
.section-paper .filter-chip { border-color: var(--line); color: var(--muted-dark); }
.section-paper .filter-chip:hover { border-color: var(--gold-3); color: var(--ink); }
.section-paper .filter-chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.search-selects, .catalog-selects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.search-selects label, .catalog-selects label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: var(--sans);
  font-size: 7.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.search-selects select, .catalog-selects select {
  width: 100%;
  min-height: 38px;
  padding: 7px 30px 7px 10px;
  border: 1px solid var(--line-light);
  border-radius: 0;
  background: rgba(239, 229, 210, 0.04);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.04em;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--gold-2) 50%), linear-gradient(135deg, var(--gold-2) 50%, transparent 50%);
  background-position: calc(100% - 14px) 16px, calc(100% - 9px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.search-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 18px 0;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.search-summary #search-count { color: var(--gold-2); }
.search-summary__hint { color: rgba(239, 229, 210, 0.38); }

.search-results { border-top: 1px solid var(--line-light); }
.search-result {
  display: grid;
  grid-template-columns: 42px 1fr 24px;
  gap: 18px;
  padding: 22px 6px;
  border-bottom: 1px solid var(--line-light);
  transition: background 0.2s ease, padding-left 0.25s ease;
}
.search-result:hover { background: rgba(239, 229, 210, 0.035); padding-left: 12px; }
.search-result__index { font-family: var(--sans); font-size: 9px; color: var(--gold-2); letter-spacing: 0.08em; padding-top: 4px; }
.search-result__body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.search-result__type {
  font-family: var(--sans);
  font-size: 7.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-3);
}
.search-result__body strong { font-family: var(--serif); font-size: clamp(1.35rem, 2vw, 1.9rem); font-weight: 500; line-height: 1.06; }
.search-result__snippet { font-size: 13px; line-height: 1.6; color: rgba(239, 229, 210, 0.62); }
.search-result__meta { font-family: var(--sans); font-size: 8px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.search-result__arrow { color: var(--gold-2); opacity: 0.5; transition: opacity 0.2s ease, transform 0.2s ease; }
.search-result:hover .search-result__arrow { opacity: 1; transform: translate(2px, -2px); }

.search-empty { padding: clamp(40px, 7vw, 86px) 0; max-width: 620px; }
.search-empty__mark { font-family: var(--serif); font-size: 54px; color: var(--gold); line-height: 1; }
.search-empty h2 { margin: 16px 0 10px; font-size: clamp(2rem, 3vw, 2.8rem); }
.search-empty p { color: var(--muted); font-size: 14px; }
.search-empty__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.search-recent {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 34px;
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.search-recent button {
  border: 1px solid var(--line-light);
  background: none;
  padding: 6px 9px;
  font: inherit;
  color: rgba(239, 229, 210, 0.7);
}
.search-recent button:hover { border-color: var(--line-gold); color: var(--gold-2); }
.search-recent__clear { margin-left: auto; color: var(--muted) !important; }

/* ── Catalog ────────────────────────────────────────────── */

.topics-hero { --page-hero-image: url("../assets/maps/ukraine-1918.jpg"); }
.topics-hero .page-title { max-width: 900px; }
.topics-hero__actions, .topic-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 28px; }
.catalog-page { padding: 34px 0 clamp(64px, 8vw, 110px); }
.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 18px;
  align-items: end;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-light);
}
.catalog-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-light);
  background: rgba(239, 229, 210, 0.04);
}
.catalog-search span { color: var(--gold-2); font-size: 18px; }
.catalog-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--paper);
  font-family: var(--body);
  font-size: 14px;
  outline: none;
}
.catalog-search input::placeholder { color: var(--muted); }
.catalog-categories { display: flex; flex-wrap: wrap; gap: 6px; padding: 18px 0; }
.catalog-summary {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding-bottom: 22px;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.text-button {
  border: 0;
  border-bottom: 1px solid var(--line-gold);
  background: none;
  padding: 2px 0;
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.text-button:hover { color: var(--paper); }
.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-light);
  border: 1px solid var(--line-light);
}
.topic-grid .topic-card { border: 0; min-height: 290px; background: var(--ink-2); color: var(--paper); }
.topic-grid .topic-card:hover { background: var(--ink-3); }
.topic-grid .topic-card__type { color: var(--gold-2); }
.topic-grid .topic-card p { color: var(--muted); }
.topic-grid .topic-card__tags span { border-color: var(--line-light); color: var(--muted); }
.topic-grid .topic-card__foot { border-top-color: var(--line-light); color: var(--muted); }
.topic-grid .topic-card__foot span:last-child { color: var(--gold-2); }

/* ── Topic page ─────────────────────────────────────────── */

.topic-hero { --page-hero-image: url("../assets/images/liberty-1830.jpg"); }
.topic-hero .page-title { max-width: 1000px; }
.topic-hero__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.topic-hero__tags span {
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 8px;
  border: 1px solid var(--line-light);
  color: var(--muted);
}
.topic-facts dl, .entity-facts dl { margin: 0; }
.topic-facts dl div, .entity-facts dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-light);
}
.topic-facts dt, .entity-facts dt {
  font-family: var(--sans);
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.topic-facts dd, .entity-facts dd { margin: 0; font-size: 12px; color: var(--paper); text-align: right; }

.topic-page { padding-top: clamp(50px, 6vw, 80px); }
.topic-layout, .entity-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.45fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.topic-section, .entity-section { margin-bottom: clamp(44px, 6vw, 72px); }
.topic-section:last-child, .entity-section:last-child { margin-bottom: 0; }
.topic-question-list { border-top: 1px solid var(--line-light); }
.topic-question {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 16px;
  padding: 22px 4px;
  border-bottom: 1px solid var(--line-light);
}
.topic-question__number { font-family: var(--sans); font-size: 9px; color: var(--gold-2); letter-spacing: 0.08em; padding-top: 4px; }
.topic-question__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--sans); font-size: 7.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.topic-question h3 { margin: 9px 0 14px; font-family: var(--body); font-size: clamp(1rem, 1.4vw, 1.15rem); font-weight: 600; line-height: 1.5; letter-spacing: 0; }
.topic-question__answer summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.topic-question__answer summary::-webkit-details-marker { display: none; }
.topic-question__answer summary:hover { color: var(--paper); }
.topic-question__answer > div { padding: 16px 0 4px; }
.topic-question__answer ol { display: grid; gap: 5px; margin-bottom: 14px; }
.topic-question__answer li { display: flex; gap: 10px; font-size: 13px; color: var(--muted); }
.topic-question__answer li span { font-family: var(--sans); font-size: 8px; color: var(--gold-2); padding-top: 3px; }
.topic-question__answer li.is-correct { color: var(--paper); }
.topic-question__answer p { font-size: 13px; line-height: 1.65; color: rgba(239, 229, 210, 0.7); }
.topic-question__answer .source-line { display: inline-block; margin-top: 12px; font-family: var(--sans); font-size: 8.5px; letter-spacing: 0.08em; color: var(--gold-2); border-bottom: 1px solid var(--line-gold); }
.topic-more { display: inline-block; margin-top: 18px; font-family: var(--sans); font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-2); }
.topic-more:hover { color: var(--paper); }

.topic-materials { display: grid; gap: 1px; background: var(--line-light); border: 1px solid var(--line-light); }
.topic-material { display: grid; grid-template-columns: 140px 1fr; gap: 18px; padding: 14px; background: var(--ink-2); transition: background 0.25s ease; }
.topic-material:hover { background: var(--ink-3); }
.topic-material__image { overflow: hidden; }
.topic-material__image img { width: 100%; height: 100%; min-height: 104px; object-fit: cover; filter: sepia(0.18); }
.topic-material__body { display: flex; flex-direction: column; gap: 5px; justify-content: center; }
.topic-material__body strong { font-family: var(--serif); font-size: 21px; line-height: 1.02; font-weight: 500; }
.topic-material__body > span:not(.kicker) { font-size: 12px; color: var(--muted); }
.topic-material__body small { margin-top: 5px; font-family: var(--sans); font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-2); }

.topic-timeline { border-top: 1px solid var(--line-light); }
.topic-timeline div { display: grid; grid-template-columns: 92px 1fr; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line-light); }
.topic-timeline strong { font-family: var(--sans); font-size: 9px; letter-spacing: 0.08em; color: var(--gold-2); padding-top: 3px; }
.topic-timeline span { font-size: 13px; color: rgba(239, 229, 210, 0.74); }

.topic-aside { position: sticky; top: calc(var(--header-h) + 24px); }
.topic-aside__block { padding: 20px 0; border-top: 1px solid var(--line-light); }
.topic-aside__block:first-child { border-top: 0; padding-top: 0; }
.topic-aside__block h3 {
  margin-bottom: 12px;
  font-family: var(--sans);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.topic-link-list { list-style: none; }
.topic-link-list li { border-bottom: 1px solid var(--line-light); }
.topic-link-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  font-size: 12.5px;
  color: rgba(239, 229, 210, 0.78);
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.topic-link-list a:hover { color: var(--gold-2); padding-left: 3px; }
.topic-link-list a span { font-family: var(--sans); font-size: 7px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.topic-aside__cta { margin-top: 24px; padding: 22px; border: 1px solid var(--line-gold); background: rgba(189, 152, 87, 0.06); }
.topic-aside__cta p { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.topic-aside__cta .kicker { margin-bottom: 8px; }

/* ── Entities ───────────────────────────────────────────── */

.entities-hero { --page-hero-image: url("../assets/images/iron-mill.jpg"); }
.entities-page { padding: 34px 0 clamp(64px, 8vw, 110px); }
.entities-toolbar { display: flex; flex-direction: column; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line-light); }
.entities-types { display: flex; flex-wrap: wrap; gap: 6px; }
.entities-count { padding: 16px 0 24px; font-family: var(--sans); font-size: 9px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--gold-2); }
.entity-group { margin-bottom: 46px; }
.entity-group > header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.entity-group__icon { color: var(--gold-2); }
.entity-group h2 { font-size: clamp(2rem, 3vw, 2.8rem); }
.entity-group h2 span { font-family: var(--sans); font-size: 9px; color: var(--muted); margin-left: 8px; }
.entity-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-light); border: 1px solid var(--line-light); }
.entity-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 190px;
  padding: 20px;
  background: var(--ink-2);
  transition: background 0.25s ease;
}
.entity-card:hover { background: var(--ink-3); }
.entity-card__type { font-family: var(--sans); font-size: 7px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-2); }
.entity-card strong { font-family: var(--serif); font-size: 22px; line-height: 1.02; font-weight: 500; }
.entity-card__meta { font-family: var(--sans); font-size: 7.5px; letter-spacing: 0.07em; color: var(--muted); }
.entity-card p { font-size: 11.5px; line-height: 1.55; color: rgba(239, 229, 210, 0.6); }
.entity-card__arrow { position: absolute; right: 16px; top: 16px; color: var(--gold-2); opacity: 0; transition: opacity 0.2s ease, transform 0.2s ease; }
.entity-card:hover .entity-card__arrow { opacity: 1; transform: translate(2px, -2px); }

.entity-hero { --page-hero-image: none; }
.entity-facts .folio { display: block; margin-bottom: 14px; }
.entity-portrait { margin-bottom: 14px; }
.entity-portrait img { width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover; filter: sepia(0.22); }
.entity-monogram {
  display: grid;
  place-items: center;
  width: 94px; height: 94px;
  margin-bottom: 18px;
  border: 1px solid var(--line-gold);
  font-family: var(--serif);
  font-size: 52px;
  color: var(--gold-2);
}
.entity-page { padding-top: clamp(50px, 6vw, 80px); }
.entity-articles { display: grid; gap: 1px; background: var(--line-light); border: 1px solid var(--line-light); }
.entity-article { display: grid; grid-template-columns: 130px 1fr; gap: 18px; padding: 14px; background: var(--ink-2); transition: background 0.25s ease; }
.entity-article:hover { background: var(--ink-3); }
.entity-article__image { overflow: hidden; }
.entity-article__image img { width: 100%; height: 100%; min-height: 96px; object-fit: cover; filter: sepia(0.18); }
.entity-article > span:last-child { display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.entity-article strong { font-family: var(--serif); font-size: 21px; line-height: 1.04; font-weight: 500; }
.entity-article small { font-size: 12px; color: var(--muted); line-height: 1.5; }
.entity-article__foot { margin-top: 4px; font-family: var(--sans); font-size: 8px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-2); }

/* ── Existing page refinements ──────────────────────────── */

.hero { min-height: 90vh; }
.archive-index { gap: 1px; background: var(--line-strong); border: 1px solid var(--line-strong); }
.index-panel { border: 0; background: var(--paper-3); }
.index-panel-ukraine { background: var(--ink-2); }
.era-row:hover { background: var(--ink-3); }
.century-grid { gap: 1px; background: var(--line-light); border: 1px solid var(--line-light); }
.century-card { border: 0 !important; background: var(--ink-2); }
.century-card:hover { background: var(--ink-3); }
.article-grid { gap: 1px; background: var(--line); border: 1px solid var(--line); }
.article-card { border: 0 !important; background: var(--paper-3); }
.daily-card { border-color: var(--line-gold); }
.paper-panel { border-color: var(--line-strong); }
.site-footer { border-top-color: var(--line-light); }
.footer-grid { gap: clamp(26px, 4vw, 60px); }

/* Quiz setup/result pages inherit the new tokens */
.quiz-hero, .result-hero { background: radial-gradient(circle at 20% 0%, rgba(189, 152, 87, 0.12), transparent 30rem), var(--ink); }
.setup-panel, .quiz-panel, .result-panel { border-color: var(--line-light); }
.option, .answer-option { border-color: var(--line-light); }
.option:hover, .answer-option:hover { border-color: var(--line-gold); background: rgba(189, 152, 87, 0.07); }

/* ── Footer refinements ─────────────────────────────────── */

.site-footer { padding: clamp(54px, 7vw, 90px) 0 0; }
.footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr; }
.century-theme-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.century-theme-actions .link-arrow { color: var(--gold-2); }
.related-links .micro { display: block; margin-top: 2px; color: var(--muted); }
.footer-col h3 { color: var(--gold-2); }
.footer-folio { color: var(--gold-2); }

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 1180px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .footer-grid .footer-col:last-child { grid-column: auto; }
  .home-hero__grid { grid-template-columns: minmax(0, 1.25fr) minmax(270px, 0.55fr); gap: 38px; }
  .entry-rail { grid-template-columns: 1.2fr 1fr 1fr; }
  .home-topic-grid, .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .entity-grid { grid-template-columns: repeat(3, 1fr); }
  .figure-rail { grid-template-columns: repeat(2, 1fr); }
  .catalog-toolbar { grid-template-columns: 1fr; }
  .catalog-selects { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 980px) {
  :root { --header-h: 70px; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-grid .footer-col:last-child { grid-column: 1 / -1; }
  .primary-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 18px var(--pad) 26px;
    background: rgba(20, 21, 15, 0.98);
    border-bottom: 1px solid var(--line-light);
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { padding: 14px 0; border-bottom: 1px solid var(--line-light); font-size: 11px; }
  .primary-nav a::after { display: none; }
  .menu-toggle { display: block; }
  .header-cta { display: none; }
  .header-search__label { display: none; }
  .header-search { padding: 0 9px; }
  .header-search kbd { display: none; }

  .home-hero__grid { grid-template-columns: 1fr; }
  .home-ledger { max-width: 520px; }
  .home-title { font-size: clamp(3.4rem, 11vw, 7rem); }
  .home-section-head { grid-template-columns: 1fr; }
  .home-section-head p { justify-self: start; }
  .entry-rail { grid-template-columns: 1fr 1fr; }
  .entry-card--lead { grid-row: span 2; }
  .century-rail { display: flex; overflow-x: auto; }
  .century-spine { flex: 0 0 82px; min-height: 168px; }
  .home-epoch__grid, .home-reading-grid, .home-daily__grid { grid-template-columns: 1fr; }
  .home-epoch figure img { aspect-ratio: 16 / 10; }
  .home-feature { grid-template-columns: 1fr; }
  .home-feature__image { min-height: 240px; }

  .page-hero-grid { grid-template-columns: 1fr; }
  .page-hero-aside { border-left: 0; border-top: 1px solid var(--line-gold); padding: 22px 0 0; max-width: 560px; }
  .topic-layout, .entity-layout { grid-template-columns: 1fr; }
  .topic-aside { position: static; }
  .topic-aside__block:first-child { padding-top: 20px; border-top: 1px solid var(--line-light); }
  .entity-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog-selects { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .container { width: min(calc(100% - 36px), var(--container)); }
  .header-actions { gap: 7px; }
  .seal-balance { display: none; }
  .brand-copy small { display: none; }
  .brand-copy strong { font-size: 17px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-mark svg { width: 27px; height: 27px; }
  .home-hero { padding-top: calc(var(--header-h) + 42px); }
  .home-title { font-size: clamp(3rem, 14vw, 5.2rem); }
  .home-search { flex-wrap: wrap; padding: 10px; }
  .home-search input { flex: 1 1 100%; padding: 6px 4px; }
  .home-search .btn { width: 100%; }
  .home-stats { gap: 18px 28px; }
  .home-stats strong { font-size: 1.8rem; }
  .entry-rail { grid-template-columns: 1fr; }
  .entry-card, .entry-card--lead { min-height: 220px; grid-row: auto; }
  .home-topic-grid, .topic-grid { grid-template-columns: 1fr; }
  .figure-rail { grid-template-columns: 1fr 1fr; gap: 1px; }
  .figure-tile { padding: 10px; }
  .figure-tile h3 { font-size: 21px; }
  .figure-tile p { display: none; }
  .section { padding: 64px 0; }
  .section-head { grid-template-columns: 1fr; }
  .section-head p { justify-self: start; }
  .search-overlay { padding: 0; place-items: stretch; }
  .search-palette { width: 100%; max-height: 100vh; height: 100vh; border: 0; }
  .search-palette__head { padding: 14px; }
  .search-palette__foot { display: none; }
  .search-suggestion { grid-template-columns: 64px 1fr 16px; }
  .search-suggestion__meta { display: none; }
  .search-selects, .catalog-selects { grid-template-columns: 1fr 1fr; }
  .search-result { grid-template-columns: 30px 1fr 16px; gap: 10px; }
  .search-result__body strong { font-size: 1.3rem; }
  .catalog-page, .search-page, .entities-page { padding-top: 24px; }
  .entity-grid { grid-template-columns: 1fr; }
  .topic-material, .entity-article { grid-template-columns: 84px 1fr; gap: 12px; }
  .topic-material__body > span:not(.kicker) { display: none; }
  .topic-timeline div { grid-template-columns: 64px 1fr; gap: 12px; }
  .topic-question { grid-template-columns: 28px 1fr; gap: 8px; }
  .page-title { font-size: clamp(2.7rem, 12vw, 4.6rem); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .article-head-grid, .article-body-layout { grid-template-columns: 1fr; }
  .article-aside { position: static; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .history-table { min-width: 620px; }
}

@media (max-width: 480px) {
  .home-stats div:nth-child(4) { display: none; }
  .search-selects, .catalog-selects { grid-template-columns: 1fr; }
  .figure-rail { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .home-epoch__list a { grid-template-columns: 34px 1fr; }
  .home-epoch__list small { display: none; }
}
